Skip to content

Commit

Permalink
Merge pull request #10646 from danidoni/document-person-command-action
Browse files Browse the repository at this point in the history
Document person command action
  • Loading branch information
dmarcoux committed Jan 25, 2021
2 parents 822926b + bc8af9b commit 95bfc41
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
description: |
Bad request.
XML Schema used for body validation: [status.xsd](../schema/status.xsd)
content:
application/xml; charset=utf-8:
schema:
$ref: '../schemas/api_response.yaml'
examples:
Unknown Command:
value:
code: unknown_command
summary: "Allowed command is 'register'."
Bad Request:
value:
code: err_register_save
summary: "Could not save the registration, details: Login is the name of an already existing user and Password can't be blank."
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
type: object
properties:
login:
type: string
realname:
type: string
email:
type: string
password:
type: string
note:
type: string
state:
type: string
xml:
name: unregisteredperson
30 changes: 30 additions & 0 deletions src/api/public/apidocs-new/paths/person.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,33 @@ get:
- name: 'Requestor'
tags:
- Person

post:
summary: Executes a command on the person endpoint.
description: |
Allows executing command on the person endpoint.
As of now, the only command allowed is 'register'.
parameters:
- in: query
name: cmd
schema:
type: string
enum: [register]
required: true
description: The command to execute
example: register
requestBody:
description: The data for the person to register.
required: true
content:
application/xml:
schema:
$ref: '../components/schemas/unregistered_person.yaml'
responses:
'200':
$ref: '../components/responses/succeeded.yaml'
'400':
$ref: '../components/responses/unknown_command_error.yaml'
tags:
- Person

0 comments on commit 95bfc41

Please sign in to comment.