Project

General

Profile

Bug #21299

documentation of user_id in ssh_keys API controller is wrong

Added by Martin Bacovsky about 1 year ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Users
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

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

Related issues

Related to Foreman - Bug #20986: user_id parameter in ssh key create action is wrongly documentedClosed2017-09-18

Associated revisions

Revision 5cb587b6 (diff)
Added by Martin Bacovsky about 1 year ago

Fixes #21299 - Make user_id required

user_id is part of the resource URL and needs to be mandatory.

Revision 9c4c00b1 (diff)
Added by Martin Bacovsky about 1 year ago

Fixes #21299 - Make user_id required

user_id is part of the resource URL and needs to be mandatory.

(cherry picked from commit 5cb587b6990ceb5f368e493f772c6748bd07f9c8)

History

#1 Updated by Martin Bacovsky about 1 year ago

  • Subject changed from documentation of user_id in ssh_keys controller is wrong to documentation of user_id in ssh_keys API controller is wrong

#2 Updated by Martin Bacovsky about 1 year ago

  • Status changed from New to Assigned
  • Assignee set to Martin Bacovsky
  • Target version set to 226
  • Difficulty set to easy

#3 Updated by Marek Hulán about 1 year ago

  • Related to Bug #20986: user_id parameter in ssh key create action is wrongly documented added

#4 Updated by Martin Bacovsky about 1 year ago

  • Project changed from Hammer CLI to Foreman
  • Category changed from Users and roles to Users

#5 Updated by The Foreman Bot about 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4907 added

#6 Updated by Timo Goebel about 1 year ago

  • Legacy Backlogs Release (now unused) set to 240

#7 Updated by Martin Bacovsky about 1 year ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF