{ "x-generator": "NSwag v13.9.4.0 (NJsonSchema v10.3.1.0 (Newtonsoft.Json v12.0.0.0))", "openapi": "3.0.0", "info": { "title": "Hacker news like API in .Net", "version": "1.0.0" }, "paths": { "/api/links": { "get": { "tags": [ "Links" ], "summary": "Retrieve all links already posted.", "operationId": "Links_GetLinks", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LinkDto" } } } } }, "400": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProblemDetails" } } } } } }, "post": { "tags": [ "Links" ], "summary": "Post a new link.", "operationId": "Links_CreateLink", "requestBody": { "x-name": "command", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddLinkCommand" } } }, "required": true, "x-position": 1 }, "responses": { "200": { "description": "", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } } } } } }, "components": { "schemas": { "LinkDto": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string", "format": "guid" }, "url": { "type": "string", "nullable": true }, "createdAt": { "type": "string", "format": "date-time" }, "createdByName": { "type": "string", "nullable": true }, "upVotes": { "type": "integer", "format": "int32" }, "downVotes": { "type": "integer", "format": "int32" } } }, "ProblemDetails": { "type": "object", "additionalProperties": { "nullable": true }, "properties": { "type": { "type": "string", "nullable": true }, "title": { "type": "string", "nullable": true }, "status": { "type": "integer", "format": "int32", "nullable": true }, "detail": { "type": "string", "nullable": true }, "instance": { "type": "string", "nullable": true }, "extensions": { "type": "object", "nullable": true, "additionalProperties": {} } } }, "AddLinkCommand": { "type": "object", "additionalProperties": false, "required": [ "url" ], "properties": { "url": { "type": "string", "format": "uri", "minLength": 1 } } } } } }