{ "$schema": "https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/schemas/v3.0/schema.json", "openapi": "3.0.0", "info": { "title": "My generated API", "description": "An example value to see, how it all works out", "version": "1.0.0" }, "servers": [ { "url": "http://localhost:8080" } ], "components": { "schemas": { "GraphNodePayload": { "type": "object", "required": [ "id", "name", "description", "ref" ], "properties": { "id": { "type": "integer", "format": "int32" }, "name": { "type": "string" }, "description": { "type": "string" }, "ref": { "type": "string", "format": "uri" } } } }, "responses": { "NotFound": { "description": "The specified resource does not exist.", "content": { "text/plain": { "schema": { "type": "string", "example": "not found" } } } } } }, "paths": { "/nodes": { "get": { "responses": { "200": { "description": "Lists all nodes", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GraphNodePayload" } } } } } } } }, "/nodes/{nodeId}": { "get": { "parameters": [ { "in": "path", "name": "nodeId", "required": true, "schema":{ "type": "integer" } } ], "responses": { "200": { "description": "Returns one specific node", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GraphNodePayload" } } } }, "404": { "$ref": "#/components/responses/NotFound" } } } } } }