168 lines
4.0 KiB
YAML
168 lines
4.0 KiB
YAML
definitions:
|
|
gin.H:
|
|
additionalProperties: {}
|
|
type: object
|
|
gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.Post:
|
|
properties:
|
|
content:
|
|
type: string
|
|
createdAt:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
title:
|
|
type: string
|
|
type: object
|
|
gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostCreate:
|
|
properties:
|
|
content:
|
|
type: string
|
|
title:
|
|
type: string
|
|
type: object
|
|
gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq:
|
|
properties:
|
|
content:
|
|
type: string
|
|
id:
|
|
type: integer
|
|
title:
|
|
type: string
|
|
type: object
|
|
info:
|
|
contact: {}
|
|
paths:
|
|
/callback/github:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Callback for oauth2 providers
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Callback for oauth2 providers
|
|
tags:
|
|
- auth
|
|
/posts:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get all posts
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
items:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq'
|
|
type: array
|
|
summary: Get all posts
|
|
tags:
|
|
- posts
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create new post
|
|
parameters:
|
|
- description: Post data
|
|
in: body
|
|
name: post
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/gin.H'
|
|
summary: Create post
|
|
tags:
|
|
- posts
|
|
/posts/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete post
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.Post'
|
|
summary: Delete post
|
|
tags:
|
|
- posts
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get post by id
|
|
parameters:
|
|
- description: Post ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq'
|
|
"400":
|
|
description: Invalid ID format
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
summary: Get post by id
|
|
tags:
|
|
- posts
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update post
|
|
parameters:
|
|
- description: Post ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: integer
|
|
- description: Post data
|
|
in: body
|
|
name: post
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostCreate'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostCreate'
|
|
summary: Update post
|
|
tags:
|
|
- posts
|
|
swagger: "2.0"
|