Actions
Bug #21299
closeddocumentation of user_id in ssh_keys API controller is wrong
Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Description
In API v2 ssh_keys_controller in :index and :show method the 'user_id' parameter is documented as not required.
https://github.com/theforeman/foreman/blob/develop/app/controllers/api/v2/ssh_keys_controller.rb#L12
https://github.com/theforeman/foreman/blob/develop/app/controllers/api/v2/ssh_keys_controller.rb#L21
param :user_id, String, :desc => N_("ID of the user")
It is part of the resource URL and needs to be required. Wrong documentation leads to problems with parameter resolving in Hammer CLI.
hammer user ssh-keys delete --user admin --name test Could not delete the SSH Key: missing param 'user_id' in parameters
Actions