Tomas Cohen Arazi
d6c67eddd3
This patch moves all the REST API spec pieces into YAML. To test: 1. Run: $ kshell k$ prove t/db_dependent/api/v1/* => SUCCESS: Tests pass 2. Apply this patch 3. Repeat 1 => SUCCESS: Tests still pass! 4. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
45 lines
1 KiB
YAML
45 lines
1 KiB
YAML
---
|
|
/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.yaml#/error
|
|
"403":
|
|
description: Access forbidden
|
|
schema:
|
|
$ref: ../definitions.yaml#/error
|