Project

General

Profile

Bug #20986

user_id parameter in ssh key create action is wrongly documented

Added by Tomáš Strachota about 3 years ago. Updated 4 months ago.

Status:
Closed
Priority:
Normal
Category:
Users, Roles and Permissions
Target version:
Difficulty:
trivial
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

The API docs for

POST /api/users/:user_id/ssh_keys

document the :user_id parameter as nested in ssh_key hash but the server expect it on the first level as it's a route parameter. This causes issues in hammer that uses the documentation to automatically build the request data.

The current documetation:

Param name        Validations  Description
 ssh_key           Hash
 ssh_key[name]     String
 ssh_key[key]      String       Public SSH key
 ssh_key[user_id]  String       ID of the user

Expected result:
The :user_id parameter should be documented on the first level, outside of the ssh_key hash:

Param name        Validations  Description
 user_id           String       ID of the user
 ssh_key           Hash
 ssh_key[name]     String
 ssh_key[key]      String       Public SSH key

Related issues

Related to Hammer CLI - Bug #20476: Creating SSH Key in User Template functionality missing in hammer CLIClosed2017-08-01
Related to Foreman - Bug #21299: documentation of user_id in ssh_keys API controller is wrongClosed

Associated revisions

Revision 609f0181 (diff)
Added by Tomáš Strachota about 3 years ago

Fixes #20986 - wrongly documented :user_id in ssh_keys#create

History

#1 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Tomáš Strachota
  • Pull request https://github.com/theforeman/foreman/pull/4855 added

#2 Updated by Marek Hulán about 3 years ago

  • Related to Bug #20476: Creating SSH Key in User Template functionality missing in hammer CLI added

#3 Updated by Marek Hulán about 3 years ago

  • Legacy Backlogs Release (now unused) set to 296

#4 Updated by Anonymous about 3 years ago

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

#5 Updated by Marek Hulán about 3 years ago

  • Related to Bug #21299: documentation of user_id in ssh_keys API controller is wrong added

#6 Updated by Tomer Brisker 4 months ago

  • Category changed from 218 to Users, Roles and Permissions

Also available in: Atom PDF