Bug 28463: Add summary to all routes
[koha.git] / api / v1 / swagger / paths / oauth.json
1 {
2     "/oauth/token": {
3         "post": {
4             "x-mojo-to": "OAuth#token",
5             "operationId": "tokenOAuth",
6             "tags": ["oauth"],
7             "summary": "Get access token",
8             "produces": [
9                 "application/json"
10             ],
11             "parameters": [
12                 {
13                     "name": "grant_type",
14                     "in": "formData",
15                     "description": "grant type (client_credentials)",
16                     "required": true,
17                     "type": "string"
18                 },
19                 {
20                     "name": "client_id",
21                     "in": "formData",
22                     "description": "client id",
23                     "type": "string"
24                 },
25                 {
26                     "name": "client_secret",
27                     "in": "formData",
28                     "description": "client secret",
29                     "type": "string"
30                 }
31             ],
32             "responses": {
33                 "200": {
34                     "description": "OK",
35                     "schema": {
36                         "type": "object",
37                         "properties": {
38                             "access_token": {
39                                 "type": "string"
40                             },
41                             "token_type": {
42                                 "type": "string"
43                             },
44                             "expires_in": {
45                                 "type": "integer"
46                             }
47                         },
48                         "additionalProperties": false
49                     }
50                 },
51                 "400": {
52                     "description": "Bad Request",
53                     "schema": {
54                         "$ref": "../definitions.json#/error"
55                     }
56                 },
57                 "403": {
58                     "description": "Access forbidden",
59                     "schema": {
60                         "$ref": "../definitions.json#/error"
61                     }
62                 }
63             }
64         }
65     }
66 }