{ "swagger": "2.0", "info": { "description": "Api Documentation", "version": "1.0", "title": "Api Documentation", "termsOfService": "urn:tos", "contact": {}, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0" } }, "consumes": [ "application/xml" ], "produces": [ "application/json" ], "host": "localhost:8080", "basePath": "/api", "tags": [ { "name": "Customer Entity", "description": "Simple Jpa Repository" }, { "name": "basic-error-controller", "description": "Basic Error Controller" }, { "name": "profile-controller", "description": "Profile Controller" } ], "paths": { "/pets": { "get": { "tags": ["pet", "multiple"], "summary": "find all pets", "description": "description text", "operationId": "findPets", "parameters": [ { "name": "tags", "in": "query", "description": "tags to filter by", "required": false, "type": "array", "collectionFormat": "csv", "items": { "type": "string" } }, { "name": "limit", "in": "query", "description": "maximum number of results to return", "required": false, "type": "integer", "format": "int32" } ], "responses": { "200": { "description": "pet response", "schema": { "type": "array", "items": { "$ref": "#/definitions/Pet" } } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/Error" } } } }, "post": { "summary": "Add Pet", "description": "Creates a new pet in the store. Duplicates are allowed", "operationId": "addPet", "consumes": [ "application/binary" ], "produces": [ "application/pdf", "application/json" ], "parameters": [ { "name": "pet", "in": "body", "description": "Pet to add to the store", "required": true, "schema": { "$ref": "#/definitions/NewPet" } } ], "responses": { "200": { "description": "pet response", "schema": { "$ref": "#/definitions/Pet" } }, "default": { "description": "unexpected error", "schema": { "$ref": "#/definitions/Error" } } } } }, "/dummy": { "get": { "summary": "dummy operation", "operationId": "dummyOp", "produces": [ "application/json" ], "parameters": [], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/NonExisting" } }} } }, "/customers": { "get": { "tags": [ "customer", "single" ], "summary": "findAllCustomer", "operationId": "findAllCustomerUsingGET", "produces": [ "application/json", "application/hal+json", "text/uri-list", "application/x-spring-data-compact+json" ], "parameters": [ { "name": "page", "in": "query", "description": "page", "required": false, "type": "string" }, { "name": "size", "in": "query", "description": "size", "required": false, "type": "string" }, { "name": "sort", "in": "query", "description": "sort", "required": false, "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resources«Customer»" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } }, "post": { "tags": [ "customer", "single" ], "summary": "saveCustomer", "operationId": "saveCustomerUsingPOST", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "in": "body", "name": "body", "description": "body", "required": true, "schema": { "$ref": "#/definitions/Customer" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resource«Customer»" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/customers/search/findAllByOrderByLastName": { "get": { "tags": [ "customer", "multiple" ], "summary": "find all customers ordered by last name", "operationId": "findAllByOrderByLastNameCustomerUsingGET", "produces": [ "*/*" ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resource«Iterable«Customer»»" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } } }, "/customers/{id}": { "get": { "tags": [ "customer", "single" ], "summary": "findOneCustomer", "operationId": "findOneCustomerUsingGET", "description": "find one *customer*", "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resource«Customer»" } }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } }, "put": { "tags": [ "customer", "write" ], "summary": "saveCustomer", "operationId": "saveCustomerUsingPUT", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64" }, { "in": "body", "name": "body", "description": "body", "required": true, "schema": { "$ref": "#/definitions/Customer" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resource«Customer»" } }, "201": { "description": "Created" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" }, "404": { "description": "Not Found" } } }, "delete": { "tags": [ "customer", "write" ], "summary": "deleteCustomer", "operationId": "deleteCustomerUsingDELETE", "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64" } ], "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } } }, "patch": { "tags": [ "customer", "write" ], "summary": "saveCustomer", "operationId": "saveCustomerUsingPATCH", "consumes": [ "application/json" ], "produces": [ "*/*" ], "parameters": [ { "name": "id", "in": "path", "description": "id", "required": true, "type": "integer", "format": "int64" }, { "in": "body", "name": "body", "description": "body", "required": true, "schema": { "$ref": "#/definitions/Customer" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Resource«Customer»" } }, "204": { "description": "No Content" }, "401": { "description": "Unauthorized" }, "403": { "description": "Forbidden" } } } } }, "definitions": { "Pet": { "type": "object", "allOf": [ { "$ref": "#/definitions/NewPet" }, { "required": [ "id" ], "properties": { "id": { "type": "integer", "format": "int64" } } } ] }, "NewPet": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "pet name" }, "tag": { "type": "string" } } }, "Error": { "type": "object", "required": [ "code", "message" ], "properties": { "code": { "type": "integer", "format": "int32" }, "message": { "type": "string" } } }, "Customer": { "type": "object", "properties": { "firstName": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "lastName": { "type": "string" } }, "title": "Customer" }, "Iterable«Customer»": { "type": "object", "title": "Iterable«Customer»" }, "Link": { "type": "object", "properties": { "deprecation": { "type": "string", "xml": { "name": "deprecation", "attribute": true, "wrapped": false } }, "href": { "type": "string", "xml": { "name": "href", "attribute": true, "wrapped": false } }, "hreflang": { "type": "string", "xml": { "name": "hreflang", "attribute": true, "wrapped": false } }, "media": { "type": "string", "xml": { "name": "media", "attribute": true, "wrapped": false } }, "rel": { "type": "string", "xml": { "name": "rel", "attribute": true, "wrapped": false } }, "templated": { "type": "boolean" }, "title": { "type": "string", "xml": { "name": "title", "attribute": true, "wrapped": false } }, "type": { "type": "string", "xml": { "name": "type", "attribute": true, "wrapped": false } } }, "title": "Link", "xml": { "name": "link", "namespace": "http://www.w3.org/2005/Atom", "attribute": false, "wrapped": false } }, "ModelAndView": { "type": "object", "properties": { "empty": { "type": "boolean" }, "model": { "type": "object" }, "modelMap": { "type": "object", "additionalProperties": { "type": "object" } }, "reference": { "type": "boolean" }, "status": { "type": "string", "enum": [ "100", "101", "102", "103", "200", "201", "202", "203", "204", "205", "206", "207", "208", "226", "300", "301", "302", "303", "304", "305", "307", "308", "400", "401", "402", "403", "404", "405", "406", "407", "408", "409", "410", "411", "412", "413", "414", "415", "416", "417", "418", "419", "420", "421", "422", "423", "424", "426", "428", "429", "431", "451", "500", "501", "502", "503", "504", "505", "506", "507", "508", "509", "510", "511" ] }, "view": { "$ref": "#/definitions/View" }, "viewName": { "type": "string" } }, "title": "ModelAndView" }, "ResourceSupport": { "type": "object", "properties": { "links": { "type": "array", "xml": { "name": "link", "namespace": "http://www.w3.org/2005/Atom", "attribute": false, "wrapped": false }, "items": { "$ref": "#/definitions/Link" } } }, "title": "ResourceSupport" }, "Resources«Customer»": { "type": "object", "properties": { "content": { "type": "array", "items": { "$ref": "#/definitions/Customer" } }, "links": { "type": "array", "xml": { "name": "link", "namespace": "http://www.w3.org/2005/Atom", "attribute": false, "wrapped": false }, "items": { "$ref": "#/definitions/Link" } } }, "title": "Resources«Customer»" }, "Resource«Customer»": { "type": "object", "properties": { "firstName": { "type": "string" }, "id": { "type": "integer", "format": "int64" }, "lastName": { "type": "string" }, "links": { "type": "array", "xml": { "name": "link", "namespace": "http://www.w3.org/2005/Atom", "attribute": false, "wrapped": false }, "items": { "$ref": "#/definitions/Link" } } }, "title": "Resource«Customer»" }, "Resource«Iterable«Customer»»": { "type": "object", "properties": { "links": { "type": "array", "xml": { "name": "link", "namespace": "http://www.w3.org/2005/Atom", "attribute": false, "wrapped": false }, "items": { "$ref": "#/definitions/Link" } } }, "title": "Resource«Iterable«Customer»»" }, "View": { "type": "object", "properties": { "contentType": { "type": "string" } }, "title": "View" } } }