Files
dj_beyhan/schema.yml
Beyhan Oğur 3de0ca1fb5 first commit
2026-04-26 22:23:47 +03:00

1132 lines
28 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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: v1_auth_jwt_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:
- v1
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: v1_auth_jwt_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:
- v1
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: v1_auth_jwt_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:
- v1
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: ''
/api/v1/auth/social/{provider}/:
post:
operationId: v1_auth_social_create
description: Authenticate user with social provider token.
parameters:
- in: path
name: provider
schema:
type: string
required: true
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SocialLogin'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SocialLogin'
multipart/form-data:
schema:
$ref: '#/components/schemas/SocialLogin'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SocialLogin'
description: ''
/api/v1/auth/social/success/:
get:
operationId: v1_auth_social_success_retrieve
description: Display success page with tokens.
tags:
- v1
security:
- {}
responses:
'200':
description: No response body
/api/v1/auth/users/:
get:
operationId: v1_auth_users_list
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/User'
description: ''
post:
operationId: v1_auth_users_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UserCreate'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UserCreate'
multipart/form-data:
schema:
$ref: '#/components/schemas/UserCreate'
required: true
security:
- jwtAuth: []
- {}
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/UserCreate'
description: ''
/api/v1/auth/users/{id}/:
get:
operationId: v1_auth_users_retrieve
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this user.
required: true
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
put:
operationId: v1_auth_users_update
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this user.
required: true
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
multipart/form-data:
schema:
$ref: '#/components/schemas/User'
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
patch:
operationId: v1_auth_users_partial_update
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this user.
required: true
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedUser'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedUser'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedUser'
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
delete:
operationId: v1_auth_users_destroy
parameters:
- in: path
name: id
schema:
type: integer
description: A unique integer value identifying this user.
required: true
tags:
- v1
security:
- jwtAuth: []
responses:
'204':
description: No response body
/api/v1/auth/users/activation/:
post:
operationId: v1_auth_users_activation_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Activation'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Activation'
multipart/form-data:
schema:
$ref: '#/components/schemas/Activation'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Activation'
description: ''
/api/v1/auth/users/me/:
get:
operationId: v1_auth_users_me_retrieve
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
put:
operationId: v1_auth_users_me_update
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/User'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/User'
multipart/form-data:
schema:
$ref: '#/components/schemas/User'
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
patch:
operationId: v1_auth_users_me_partial_update
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PatchedUser'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PatchedUser'
multipart/form-data:
schema:
$ref: '#/components/schemas/PatchedUser'
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/User'
description: ''
delete:
operationId: v1_auth_users_me_destroy
tags:
- v1
security:
- jwtAuth: []
responses:
'204':
description: No response body
/api/v1/auth/users/resend_activation/:
post:
operationId: v1_auth_users_resend_activation_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SendEmailReset'
multipart/form-data:
schema:
$ref: '#/components/schemas/SendEmailReset'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
description: ''
/api/v1/auth/users/reset_email/:
post:
operationId: v1_auth_users_reset_email_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SendEmailReset'
multipart/form-data:
schema:
$ref: '#/components/schemas/SendEmailReset'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
description: ''
/api/v1/auth/users/reset_email_confirm/:
post:
operationId: v1_auth_users_reset_email_confirm_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UsernameResetConfirm'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/UsernameResetConfirm'
multipart/form-data:
schema:
$ref: '#/components/schemas/UsernameResetConfirm'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UsernameResetConfirm'
description: ''
/api/v1/auth/users/reset_password/:
post:
operationId: v1_auth_users_reset_password_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SendEmailReset'
multipart/form-data:
schema:
$ref: '#/components/schemas/SendEmailReset'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SendEmailReset'
description: ''
/api/v1/auth/users/reset_password_confirm/:
post:
operationId: v1_auth_users_reset_password_confirm_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetConfirm'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/PasswordResetConfirm'
multipart/form-data:
schema:
$ref: '#/components/schemas/PasswordResetConfirm'
required: true
security:
- jwtAuth: []
- {}
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PasswordResetConfirm'
description: ''
/api/v1/auth/users/set_email/:
post:
operationId: v1_auth_users_set_email_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetUsername'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SetUsername'
multipart/form-data:
schema:
$ref: '#/components/schemas/SetUsername'
required: true
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SetUsername'
description: ''
/api/v1/auth/users/set_password/:
post:
operationId: v1_auth_users_set_password_create
tags:
- v1
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/SetPassword'
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/SetPassword'
multipart/form-data:
schema:
$ref: '#/components/schemas/SetPassword'
required: true
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SetPassword'
description: ''
/api/v1/categories/:
get:
operationId: v1_categories_list
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Category'
description: ''
/api/v1/categories/{slug}/:
get:
operationId: v1_categories_retrieve
parameters:
- in: path
name: slug
schema:
type: string
required: true
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CategoryPost'
description: ''
/api/v1/post/:
get:
operationId: v1_post_list
parameters:
- name: page
required: false
in: query
description: A page number within the paginated result set.
schema:
type: integer
- name: page_size
required: false
in: query
description: Number of results to return per page.
schema:
type: integer
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PaginatedPostList'
description: ''
/api/v1/post/{slug}/:
get:
operationId: v1_post_retrieve
parameters:
- in: path
name: slug
schema:
type: string
required: true
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Post'
description: ''
/api/v1/settings/:
get:
operationId: v1_settings_retrieve
tags:
- v1
security:
- jwtAuth: []
responses:
'200':
description: No response body
components:
schemas:
Activation:
type: object
properties:
uid:
type: string
token:
type: string
required:
- token
- uid
Cate:
type: object
properties:
title:
type: string
title: Kategori
maxLength: 254
parent:
type: string
readOnly: true
is_active:
allOf:
- $ref: '#/components/schemas/IsActiveEnum'
title: Yayındamı
created_at:
type: string
format: date-time
readOnly: true
title: Oluşturulma Tarihi
order:
type: integer
maximum: 2147483647
minimum: -2147483648
title: Görüntülenme Sırası
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
image:
type: string
format: uri
nullable: true
title: Resim 630 x 653 Olmali ve Transparan PNG Olmali
keywords:
type: string
title: Seo Kelimeleri Aralarına Virgül Koyunuz
maxLength: 254
description:
type: string
title: ıklama
maxLength: 254
required:
- created_at
- description
- keywords
- parent
- slug
- title
Category:
type: object
properties:
title:
type: string
title: Kategori
maxLength: 254
parent:
type: integer
nullable: true
title: Üst Kategorisi
is_active:
allOf:
- $ref: '#/components/schemas/IsActiveEnum'
title: Yayındamı
created_at:
type: string
format: date-time
readOnly: true
title: Oluşturulma Tarihi
order:
type: integer
maximum: 2147483647
minimum: -2147483648
title: Görüntülenme Sırası
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
image:
type: string
format: uri
nullable: true
title: Resim 630 x 653 Olmali ve Transparan PNG Olmali
keywords:
type: string
title: Seo Kelimeleri Aralarına Virgül Koyunuz
maxLength: 254
description:
type: string
title: ıklama
maxLength: 254
posts:
type: array
items:
$ref: '#/components/schemas/PostSYalinerializer'
readOnly: true
child:
type: string
readOnly: true
required:
- child
- created_at
- description
- keywords
- posts
- slug
- title
CategoryPost:
type: object
properties:
title:
type: string
title: Kategori
maxLength: 254
parent:
type: integer
nullable: true
title: Üst Kategorisi
is_active:
allOf:
- $ref: '#/components/schemas/IsActiveEnum'
title: Yayındamı
created_at:
type: string
format: date-time
readOnly: true
title: Oluşturulma Tarihi
order:
type: integer
maximum: 2147483647
minimum: -2147483648
title: Görüntülenme Sırası
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
image:
type: string
format: uri
nullable: true
title: Resim 630 x 653 Olmali ve Transparan PNG Olmali
keywords:
type: string
title: Seo Kelimeleri Aralarına Virgül Koyunuz
maxLength: 254
description:
type: string
title: ıklama
maxLength: 254
posts:
type: string
readOnly: true
child:
type: string
readOnly: true
required:
- child
- created_at
- description
- keywords
- posts
- slug
- title
IsActiveEnum:
enum:
- true
- false
type: boolean
description: |-
* `True` - Evet
* `False` - Hayır
IsFrontEnum:
enum:
- true
- false
type: boolean
description: |-
* `True` - Evet
* `False` - Hayır
PaginatedPostList:
type: object
required:
- count
- results
properties:
count:
type: integer
example: 123
next:
type: string
nullable: true
format: uri
example: http://api.example.org/accounts/?page=4
previous:
type: string
nullable: true
format: uri
example: http://api.example.org/accounts/?page=2
results:
type: array
items:
$ref: '#/components/schemas/Post'
PasswordResetConfirm:
type: object
properties:
uid:
type: string
token:
type: string
new_password:
type: string
required:
- new_password
- token
- uid
PatchedUser:
type: object
properties:
id:
type: integer
readOnly: true
email:
type: string
format: email
readOnly: true
title: Email address
Post:
type: object
properties:
title:
type: string
title: Post Başlığı
maxLength: 254
content:
type: string
nullable: true
title: Post İçeriği
categories:
type: array
items:
$ref: '#/components/schemas/Cate'
readOnly: true
keywords:
type: string
title: Seo Kelimeleri Aralarına Virgül Koyunuz
maxLength: 254
tags:
type: array
items:
$ref: '#/components/schemas/Tag'
readOnly: true
image:
type: string
format: uri
nullable: true
thumb:
type: string
format: uri
readOnly: true
nullable: true
video:
type: string
nullable: true
maxLength: 254
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
created_at:
type: string
format: date-time
readOnly: true
title: Oluşturulma Tarihi
updated_at:
type: string
format: date-time
readOnly: true
title: Güncelleme Tarihi
is_active:
allOf:
- $ref: '#/components/schemas/IsActiveEnum'
title: Yayındamı ?
is_front:
allOf:
- $ref: '#/components/schemas/IsFrontEnum'
title: Önde Görünsünmü ?
required:
- categories
- created_at
- keywords
- slug
- tags
- thumb
- title
- updated_at
PostSYalinerializer:
type: object
properties:
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
required:
- slug
ProviderEnum:
enum:
- google-oauth2
- github
- facebook
type: string
description: |-
* `google-oauth2` - google-oauth2
* `github` - github
* `facebook` - facebook
SendEmailReset:
type: object
properties:
email:
type: string
format: email
required:
- email
SetPassword:
type: object
properties:
new_password:
type: string
current_password:
type: string
required:
- current_password
- new_password
SetUsername:
type: object
properties:
current_password:
type: string
new_email:
type: string
format: email
title: Email address
maxLength: 254
required:
- current_password
- new_email
SocialLogin:
type: object
description: |-
Serializer for social authentication.
Accepts provider name and access_token from frontend.
properties:
provider:
allOf:
- $ref: '#/components/schemas/ProviderEnum'
description: |-
Social auth provider name
* `google-oauth2` - google-oauth2
* `github` - github
* `facebook` - facebook
access_token:
type: string
description: Access token from the social provider
id_token:
type: string
description: ID token (optional, used by some providers like Google)
required:
- access_token
- provider
Tag:
type: object
properties:
tag:
type: string
title: Post Tagları
maxLength: 254
slug:
type: string
maxLength: 250
pattern: ^[-a-zA-Z0-9_]+$
required:
- tag
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
User:
type: object
properties:
id:
type: integer
readOnly: true
email:
type: string
format: email
readOnly: true
title: Email address
required:
- email
- id
UserCreate:
type: object
properties:
email:
type: string
format: email
title: Email address
maxLength: 254
id:
type: integer
readOnly: true
password:
type: string
writeOnly: true
required:
- email
- id
- password
UsernameResetConfirm:
type: object
properties:
new_email:
type: string
format: email
title: Email address
maxLength: 254
required:
- new_email
securitySchemes:
jwtAuth:
type: http
scheme: bearer
bearerFormat: JWT