chore: add docs to swagger and add pass handlers
All checks were successful
Backend ci / build (push) Successful in 7m15s
All checks were successful
Backend ci / build (push) Successful in 7m15s
This commit is contained in:
@@ -1,4 +1,90 @@
|
||||
definitions:
|
||||
storage.Post:
|
||||
properties:
|
||||
content:
|
||||
type: string
|
||||
createdAt:
|
||||
type: string
|
||||
id:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
type: object
|
||||
info:
|
||||
contact: {}
|
||||
paths: {}
|
||||
paths:
|
||||
/api/v1/posts:
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get all posts
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
items:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
type: array
|
||||
summary: Get all posts
|
||||
tags:
|
||||
- posts
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Create post
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
summary: Create post
|
||||
tags:
|
||||
- posts
|
||||
/api/v1/posts/{id}:
|
||||
delete:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Delete post
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
summary: Delete post
|
||||
tags:
|
||||
- posts
|
||||
get:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Get post by id
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
summary: Get post by id
|
||||
tags:
|
||||
- posts
|
||||
put:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Update post
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/storage.Post'
|
||||
summary: Update post
|
||||
tags:
|
||||
- posts
|
||||
swagger: "2.0"
|
||||
|
||||
Reference in New Issue
Block a user