{ "openapi": "3.0.0", "info": { "version": "1.0.0", "title": "Swagger Report" }, "servers": [ { "url": "http://localhost:51131" } ], "paths": { "/posts": { "post": { "tags": [ "Posts" ], "description": "Positive: create blog post", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string", "example": "quite cotton although shadow" }, "body": { "type": "string", "example": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball" }, "thumbnail": { "type": "string", "example": "http://lakkik.ng/kupa" } }, "example": { "title": "quite cotton although shadow", "body": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball", "thumbnail": "http://lakkik.ng/kupa" } } }, "example": { "data": { "title": "quite cotton although shadow", "body": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball", "thumbnail": "http://lakkik.ng/kupa" } } } } } }, "responses": { "201": { "description": "Positive: create blog post", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "title": { "type": "string", "example": "quite cotton although shadow" }, "body": { "type": "string", "example": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball" }, "thumbnail": { "type": "string", "example": "http://lakkik.ng/kupa" } }, "example": { "title": "quite cotton although shadow", "body": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball", "thumbnail": "http://lakkik.ng/kupa" } }, "id": { "type": "number", "example": 4 } }, "example": { "data": { "title": "quite cotton although shadow", "body": "mood income built field throw badly finest seat accurate ago seldom allow invented exactly past garage baseball", "thumbnail": "http://lakkik.ng/kupa" }, "id": 4 } } } } } } } }, "/posts/1": { "get": { "tags": [ "Posts" ], "description": "Positive: show first post", "parameters": [], "responses": { "200": { "description": "Positive: show first post", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "number", "example": 1, "minimum": 0, "maximum": 1 }, "title": { "type": "string", "example": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit" }, "body": { "type": "string", "example": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto" }, "thumbnail": { "type": "null", "nullable": true, "example": null } }, "example": { "id": 1, "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit", "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto", "thumbnail": null } } } } } } } }, "/posts/:id": { "get": { "tags": [ "Posts" ], "description": "Positive: show single post by id. Negative: post not found. Negative: bad id", "parameters": [], "responses": { "200": { "description": "Positive: show single post by id", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "number", "example": 2 }, "title": { "type": "string", "example": "qui est esse" }, "body": { "type": "string", "example": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla" }, "thumbnail": { "type": "string", "example": "https://via.placeholder.com/150/24f355" } }, "example": { "id": 2, "title": "qui est esse", "body": "est rerum tempore vitae\nsequi sint nihil reprehenderit dolor beatae ea dolores neque\nfugiat blanditiis voluptate porro vel nihil molestiae ut reiciendis\nqui aperiam non debitis possimus qui neque nisi nulla", "thumbnail": "https://via.placeholder.com/150/24f355" } } } } }, "404": { "description": "Negative: post not found", "content": { "application/json": { "schema": { "type": "object", "properties": {} }, "examples": { "Negative: post not found": { "summary": "Negative: post not found", "value": {} }, "Negative: bad id": { "summary": "Negative: bad id", "value": {} } } } } } } } } } }