Documented auth endpoint

This commit is contained in:
Antoine Gersant 2019-04-07 14:46:01 -07:00
parent 2be0fc90c0
commit 50cc373b69

View file

@ -133,6 +133,26 @@
] ]
} }
}, },
"/auth": {
"post": {
"tags": ["Other"],
"summary": "Returns information about user permissions and a session cookie for future authenticated requests.",
"operationId": "postAuth",
"requestBody": {
"required": true,
"content": { "application/json": { "schema": { "$ref": "#components/schemas/AuthCredentials" } } }
},
"responses": {
"200": {
"description": "Successful operation",
"content": { "application/json": { "schema": { "$ref":"#components/schemas/AuthOutput" } } }
},
"401": {
"description": "Invalid credentials"
}
}
}
},
"/pet": { "/pet": {
"post": { "post": {
"tags": [ "tags": [
@ -1011,7 +1031,25 @@
} }
} }
}, },
"AuthCredentials": {
"type": "object",
"properties": {
"username": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"AuthOutput": {
"type": "object",
"properties": {
"admin": {
"type": "boolean"
}
}
},
"Order": { "Order": {
"type": "object", "type": "object",
"properties": { "properties": {