changes
This commit is contained in:
33
openapi.yaml
33
openapi.yaml
@ -4,24 +4,16 @@ info:
|
||||
version: "0.1"
|
||||
|
||||
paths:
|
||||
/auth/{login}:
|
||||
/auth:
|
||||
post:
|
||||
tags: [ "JWT" ]
|
||||
summary: Return JWT token
|
||||
operationId: auth.generateToken
|
||||
parameters:
|
||||
- name: login
|
||||
description: Login
|
||||
in: path
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
- name: password
|
||||
description: Password
|
||||
in: body
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
requestBody:
|
||||
content:
|
||||
'application/json':
|
||||
schema:
|
||||
$ref: '#/components/schemas/User'
|
||||
responses:
|
||||
'200':
|
||||
description: JWT token
|
||||
@ -33,7 +25,7 @@ paths:
|
||||
get:
|
||||
tags: [ "JWT" ]
|
||||
summary: Return secret string
|
||||
operationId: auth.getSecret
|
||||
operationId: test.getSecret
|
||||
responses:
|
||||
'200':
|
||||
description: secret response
|
||||
@ -50,4 +42,13 @@ components:
|
||||
type: http
|
||||
scheme: bearer
|
||||
bearerFormat: JWT
|
||||
x-bearerInfoFunc: auth.decodeToken
|
||||
x-bearerInfoFunc: test.decodeToken
|
||||
schemas:
|
||||
User:
|
||||
description: Login/Password tuple
|
||||
type: object
|
||||
properties:
|
||||
login:
|
||||
type: string
|
||||
password:
|
||||
type: string
|
||||
|
Reference in New Issue
Block a user