{ "openapi": "3.0.1", "info": { "title": "Simple Sample", "version": "1.0.0" }, "tags": [ { "name": "Person", "description": " CRUD-Service for persons" } ], "paths": { "/api/person/{key}": { "get": { "tags": [ "Person" ], "description": " Retrieve the person associated with the provided key", "parameters": [ { "name": "key", "description": "the key of the person", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "the person", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Person" } } } }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } } } }, "patch": { "tags": [ "Person" ], "description": " update a person entity", "parameters": [ { "name": "key", "description": "the key of the person to update", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PersonPatch" } } } }, "responses": { "204": { "description": "success" } } }, "delete": { "tags": [ "Person" ], "description": " delete a person entity", "parameters": [ { "name": "key", "description": "the key of the person", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "204": { "description": "success" }, "404": { "description": "", "content": { "application/json": { "schema": { "type": "string" } } } } } } }, "/api/person": { "get": { "tags": [ "Person" ], "description": " get all persons", "parameters": [], "responses": { "200": { "description": "all persons known to the system", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Person" } } } } } } }, "post": { "tags": [ "Person" ], "description": " create a new person", "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "firstname": { "type": "string" }, "lastname": { "type": "string" }, "shoesize": { "type": "number", "format": "double" } } } } } }, "responses": { "201": { "description": "a new person instance", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Person" } } } } } } } }, "components": { "schemas": { "Person": { "type": "object", "properties": { "id": { "type": "string" }, "firstname": { "type": "string" }, "lastname": { "type": "string" }, "shoesize": { "type": "number", "format": "double" } }, "required": [ "id", "firstname", "lastname" ] }, "PersonPatch": { "type": "object", "properties": { "firstname": { "type": "string" }, "lastname": { "type": "string" }, "shoesize": { "type": "number", "format": "double", "nullable": true } } } } } }