Files
insta/schema.yml
Beyhan Oğur 2be3a313ad first commit
2026-04-26 22:26:46 +03:00

130 lines
3.4 KiB
YAML

openapi: 3.0.3
info:
title: Your Project API
version: 1.0.0
description: Your project description
paths:
/api/v1/auth/jwt/create/:
post:
operationId: create_create
description: |-
Takes a set of user credentials and returns an access and refresh JSON web
token pair to prove the authentication of those credentials.
tags:
- create
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenObtainPair'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenObtainPair'
multipart/form-data:
schema:
$ref: '#/components/schemas/TokenObtainPair'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenObtainPair'
description: ''
/api/v1/auth/jwt/refresh/:
post:
operationId: refresh_create
description: |-
Takes a refresh type JSON web token and returns an access type JSON web
token if the refresh token is valid.
tags:
- refresh
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenRefresh'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenRefresh'
multipart/form-data:
schema:
$ref: '#/components/schemas/TokenRefresh'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenRefresh'
description: ''
/api/v1/auth/jwt/verify/:
post:
operationId: verify_create
description: |-
Takes a token and indicates if it is valid. This view provides no
information about a token's fitness for a particular use.
tags:
- verify
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/TokenVerify'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/TokenVerify'
multipart/form-data:
schema:
$ref: '#/components/schemas/TokenVerify'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/TokenVerify'
description: ''
components:
schemas:
TokenObtainPair:
type: object
properties:
email:
type: string
writeOnly: true
password:
type: string
writeOnly: true
access:
type: string
readOnly: true
refresh:
type: string
readOnly: true
required:
- access
- email
- password
- refresh
TokenRefresh:
type: object
properties:
access:
type: string
readOnly: true
refresh:
type: string
writeOnly: true
required:
- access
- refresh
TokenVerify:
type: object
properties:
token:
type: string
writeOnly: true
required:
- token