mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-22 22:06:43 +00:00
91 lines
1.7 KiB
JSON
91 lines
1.7 KiB
JSON
{
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"title": "API V1",
|
|
"version": "v1"
|
|
},
|
|
"paths": {
|
|
"/blogs": {
|
|
"post": {
|
|
"tags": [
|
|
"Blogs API"
|
|
],
|
|
"summary": "creates a new blog",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "blog",
|
|
"in": "body",
|
|
"schema": {
|
|
"type": "object",
|
|
"properties": {
|
|
"title": {
|
|
"type": "string"
|
|
},
|
|
"content": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"201": {
|
|
"description": "valid request"
|
|
},
|
|
"422": {
|
|
"description": "invalid request"
|
|
}
|
|
}
|
|
},
|
|
"get": {
|
|
"tags": [
|
|
"Blogs API"
|
|
],
|
|
"summary": "searches existing blogs",
|
|
"consumes": null,
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "valid request"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/blogs/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"Blogs API"
|
|
],
|
|
"summary": "retreives a specific blog",
|
|
"consumes": null,
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"name": "id",
|
|
"in": "path",
|
|
"type": "string"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "blog found"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|