Skip to content

Commit

Permalink
Document person show endpoint
Browse files Browse the repository at this point in the history
The OpenAPI documentation for the `person#show` action.
  • Loading branch information
danidoni committed Jan 19, 2021
1 parent b207d8b commit 79ed0dc
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api/public/apidocs-new/OBS-v2.10.50.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ servers:
tags:
- name: General Information
- name: Groups
- name: Person

info:
description: Open Build Service API
Expand Down Expand Up @@ -34,6 +35,9 @@ paths:
/group/{group_title}:
$ref: 'paths/group_group_title.yaml'

/person:
$ref: 'paths/person.yaml'

components:
securitySchemes:
basic_authentication:
Expand Down
40 changes: 40 additions & 0 deletions src/api/public/apidocs-new/paths/person.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
get:
summary: List all people.
description: >
List all people.
security:
- basic_authentication: []
parameters:
- in: query
name: prefix
schema:
type: string
required: false
description: A prefix to filter the people to look for
example: 'Adm'
responses:
'200':
description: >
OK. The request has succeeded.
XML Schema used for body validation: [directory.xsd](../schema/directory.xsd)
content:
application/xml; charset=utf-8:
schema:
$ref: '../components/schemas/directory.yaml'
example:
count: '9'
entry:
- name: 'Admin'
- name: '_nobody_'
- name: 'Iggy'
- name: 'user_1'
- name: 'repo-checker'
- name: 'reviewhero'
- name: 'user_2'
- name: 'user_3'
- name: 'Requestor'
'401':
$ref: '../components/responses/unauthorized.yaml'
tags:
- Person
18 changes: 18 additions & 0 deletions src/api/public/apidocs-new/paths/person_register.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
post:
summary: Registers a new person
security:
- basic_authentication: []
requestBody:
description: Data for the person to register.
required: true
content:
application/xml:
schema:
$ref: '../components/schemas/unregisteredperson.yaml'
responses:
'200':
$ref: '../components/responses/succeeded.yaml'
'401':
$ref: '../components/responses/unauthorized.yaml'
tags:
- Person

0 comments on commit 79ed0dc

Please sign in to comment.