{ "openapi": "3.0.1", "info": { "title": "sample application API", "description": "Demo project for Spring Boot with openapi 3 documentation", "termsOfService": "http://swagger.io/terms/", "license": { "name": "Apache 2.0", "url": "http://springdoc.org" }, "version": "0.0.1-SNAPSHOT" }, "servers": [ { "url": "http://localhost:8080", "description": "Generated server url" } ], "paths": { "/personByLastName": { "get": { "tags": [ "person-controller" ], "operationId": "findByLastName", "parameters": [ { "name": "lastName", "in": "query", "required": true, "schema": { "maxLength": 10, "minLength": 0, "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/sample.Person" } } } } } } } }, "/person": { "post": { "tags": [ "person-controller" ], "operationId": "person", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/sample.Person" } } }, "required": true }, "responses": { "200": { "description": "OK", "content": { "*/*": { "schema": { "$ref": "#/components/schemas/sample.Person" } } } } } } } }, "components": { "schemas": { "org.springdoc.core.converters.MonetaryAmount": { "type": "object", "properties": { "amount": { "type": "number", "example": 99.96 }, "currency": { "type": "string", "example": "USD" } } }, "sample.Person": { "required": [ "lastName" ], "type": "object", "properties": { "id": { "type": "integer", "format": "int64" }, "worth": { "$ref": "#/components/schemas/org.springdoc.core.converters.MonetaryAmount" }, "registrationDate": { "type": "string", "x-LocalDateTimeFormat": "pattern='yyyyMMdd',dateTimeType='Date'" }, "firstName": { "maxLength": 2147483647, "minLength": 2, "type": "string" }, "lastName": { "maxLength": 10, "minLength": 0, "type": "string" }, "email": { "pattern": ".+@.+\\..+", "type": "string" }, "email1": { "type": "string", "x-Email": true }, "age": { "maximum": 30, "minimum": 18, "type": "integer", "format": "int32" }, "creditCardNumber": { "type": "string", "x-CreditCardNumber": true } } } } } }