Tomas Cohen Arazi
748b2e91a3
This patch adds a 'summary' entry to all routes and verbs. This way, ReDoc will display a human-friendly description of the route, instead of the operationId. To test, repeat the testing steps in the previous patch, and notice that we now have good descriptions. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
66 lines
2.1 KiB
JSON
66 lines
2.1 KiB
JSON
{
|
|
"/oauth/token": {
|
|
"post": {
|
|
"x-mojo-to": "OAuth#token",
|
|
"operationId": "tokenOAuth",
|
|
"tags": ["oauth"],
|
|
"summary": "Get access token",
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "grant_type",
|
|
"in": "formData",
|
|
"description": "grant type (client_credentials)",
|
|
"required": true,
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "client_id",
|
|
"in": "formData",
|
|
"description": "client id",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "client_secret",
|
|
"in": "formData",
|
|
"description": "client secret",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_token": {
|
|
"type": "string"
|
|
},
|
|
"token_type": {
|
|
"type": "string"
|
|
},
|
|
"expires_in": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
}
|
|
},
|
|
"400": {
|
|
"description": "Bad Request",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
},
|
|
"403": {
|
|
"description": "Access forbidden",
|
|
"schema": {
|
|
"$ref": "../definitions.json#/error"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|