Koha/api/v1/swagger/paths/oauth.yaml
Martin Renvoize 9e50bcc1b5 Bug 30194: (follow-up) Simply OpenAPI Specification
This patch simplifies the specification directory further by doing the
following:

* Inlines paths.yml into swagger.yaml
* Inlines definitions.yaml into swagger.yaml
* Inlines parameters.yaml into swagger.yaml
* Drops x-primitives.yaml

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2022-03-29 16:44:31 +02:00

45 lines
1.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: "../swagger.yaml#/definitions/error"
"403":
description: Access forbidden
schema:
$ref: "../swagger.yaml#/definitions/error"