chore: coded post req for create posts on db
All checks were successful
Backend ci / build (push) Successful in 7m43s
All checks were successful
Backend ci / build (push) Successful in 7m43s
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
definitions:
|
||||
storage.Post:
|
||||
gin.H:
|
||||
additionalProperties: {}
|
||||
type: object
|
||||
gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.Post:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
@@ -10,10 +13,24 @@ definitions:
|
||||
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
|
||||
title:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
paths:
|
||||
/api/v1/posts:
|
||||
/posts:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -25,7 +42,7 @@ paths:
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq'
|
||||
type: array
|
||||
summary: Get all posts
|
||||
tags:
|
||||
@@ -33,18 +50,29 @@ paths:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Create post
|
||||
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/storage.Post'
|
||||
$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
|
||||
/api/v1/posts/{id}:
|
||||
/posts/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -55,7 +83,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.Post'
|
||||
summary: Delete post
|
||||
tags:
|
||||
- posts
|
||||
@@ -69,7 +97,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostReq'
|
||||
summary: Get post by id
|
||||
tags:
|
||||
- posts
|
||||
@@ -83,7 +111,7 @@ paths:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.Post'
|
||||
summary: Update post
|
||||
tags:
|
||||
- posts
|
||||
|
||||
Reference in New Issue
Block a user