{ "swagger": "2.0", "info": { "description": "Sample API", "version": "1.0.0", "title": "Sample API", "termsOfService": "http://sample.com/terms-of-service", "contact": { "name": "API Team", "url": "http://sample.com/contact", "email": "apiteam@apigee.net" }, "license": { "name": "Apache 2.0", "url": "http://www.apache.org/licenses/LICENSE-2.0.html" } }, "host": "sample.com", "basePath": "/v1/sample", "schemes": [ "http" ], "paths": { "/sampleRequest": { "post": { "tags": ["Sample Spec"], "operationId": "sample", "produces": [ "application/json;charset=UTF-8" ], "responses": { "200": { "description": "OK" } }, "parameters": [ { "name": "body", "in": "body", "schema": { "$ref": "#/definitions/sampleRequest" }, "description": "Provide the request data", "required": true } ] } } }, "definitions": { "sampleRequest": { "description": "", "type": "object", "properties": { "SampleHeader": { "type": "object", "properties": { "FirstData": { "type": "string", "minLength": 1 } }, "required": [ "FirstData" ], "example": { "FirstData": "Header Value" } }, "SampleBody": { "type": "object", "properties": { "Data": { "type": "string", "minLength": 1 } }, "required": [ "Data" ], "example": { "Data": "Sample Value" } } }, "required": [ "SampleHeader" ] } } }