Skip to content

Commit

Permalink
feat: update swagger docs for some of the /admin endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
pieterlukasse committed Nov 8, 2024
1 parent 7bda74a commit 49ade83
Showing 1 changed file with 114 additions and 0 deletions.
114 changes: 114 additions & 0 deletions openapis/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,73 @@ paths:
'*/*':
schema:
$ref: '#/components/schemas/UserInfo'
'/admin/user/{username}':
get:
tags:
- 'admin/user/{username}'
summary: Return info about a given user
description: Admin method to retrieve info about any given user
parameters:
- name: username
required: true
in: path
description: Username of user to find
schema:
type: string
security:
- OAuth2:
- user
operationId: getUserInfo
responses:
'200':
description: successful operation
content:
'*/*':
schema:
$ref: '#/components/schemas/UserInfo'
'404':
description: Couldn't find user
'/admin/user/{username}/soft':
delete:
tags:
- 'admin/user/{username}/soft'
summary: Soft-delete user
description: Soft-deletes user, setting user to inactive
security:
- OAuth2:
- admin
operationId: softDeleteUser
parameters:
- name: username
required: true
in: path
description: Username of user to deactivate
schema:
type: string
responses:
'204':
description: successful deletion
'404':
description: Couldn't find user
/admin/user:
post:
tags:
- /admin/user
summary: Add a new user
description: Admin method to add a new user
security:
- OAuth2:
- admin
operationId: createUser
responses:
'200':
description: New user
content:
'*/*':
schema:
$ref: '#/components/schemas/UserInfo'
requestBody:
$ref: '#/components/requestBodies/APIKey'
/logout:
get:
tags:
Expand Down Expand Up @@ -1683,6 +1750,13 @@ components:
$ref: '#/components/schemas/APIKeyScopes'
description: API key scopes
required: false
NewUser:
content:
application/json:
schema:
$ref: '#/components/schemas/NewUser'
description: New User
required: true
securitySchemes:
OAuth2:
type: oauth2
Expand All @@ -1693,6 +1767,46 @@ components:
scopes:
user: generic user access
schemas:
NewUser:
type: object
required:
- username
- role
- email
properties:
username:
type: string
description: 'This value is deprecated in favor of name.'
role:
type: string
description: 'Set to "admin" if the user should be given admin rights. Any other value is not parsed or used, and results in user being a normal/regular user.'
email:
type: string
description: 'The email of the end-user'
display_name:
type: string
description: 'The display name of the end-user.'
phone_number:
type: string
description: 'The phone number of the end-user.'
idp_name:
type: string
description: |
Name of the preferred Identity Provider used to autheticate the user. Given instances of Fence
may or may not have all of these available (the set of IDPs available is a configuration).
* *google* - Google/GSuite
* *ras* - NIH's Researcher Auth Service (RAS)
* *itrust* - NIH Login / iTrust / eRA Commons
* *fence* - Upstream Fence (the idp used depends on the specific configuration, consult the Gen3 Operators)
* *orcid* - ORCHID
* *microsoft* - Microsoft
* *elixir* - Elixir
* *synapse* - Synapse
* *cognito* - AWS Cognito
* More may be added in the future...
tags:
type: object
description: User's tags
RequestUploadBlank:
type: object
required:
Expand Down

0 comments on commit 49ade83

Please sign in to comment.