chore: Add logic for put and get by id handler
Some checks failed
Backend ci / build (push) Has been cancelled
Some checks failed
Backend ci / build (push) Has been cancelled
This commit is contained in:
@@ -24,6 +24,8 @@ definitions:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
type: object
|
||||
@@ -91,6 +93,12 @@ paths:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get post by id
|
||||
parameters:
|
||||
- description: Post ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -98,6 +106,18 @@ paths:
|
||||
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
|
||||
@@ -105,13 +125,25 @@ paths:
|
||||
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.Post'
|
||||
$ref: '#/definitions/gitea_d3m0k1d_ru_d3m0k1d_d3m0k1d_ru_backend_internal_storage.PostCreate'
|
||||
summary: Update post
|
||||
tags:
|
||||
- posts
|
||||
|
||||
Reference in New Issue
Block a user