Skip to content

Instantly share code, notes, and snippets.

@david-vde
Created September 19, 2016 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-vde/a593a9781e9da13f5a547b2f24cd2070 to your computer and use it in GitHub Desktop.
Save david-vde/a593a9781e9da13f5a547b2f24cd2070 to your computer and use it in GitHub Desktop.
Swagger json issue with POST in php client generated
{
"swagger": "2.0",
"info": {
"title": "[%api-title%]",
"description": "[%api-description%]",
"version": "1.0.0"
},
"host": "my.website.com",
"schemes": [
"http"
],
"produces": [
"application/json"
],
"paths": {
"/v{version}/apicheck": {
"parameters": [
{"$ref": "#/parameters/apiVersion"}
],
"post": {
"summary": "apicheck-apicheckpost-summary",
"description": "[%apicheck-apicheckpost-description%]",
"parameters": [
{"$ref": "#/parameters/apicheckTestParameter"}
],
"tags": ["apicheck"],
"responses": {
"200": {
"description": "[%apicheck-apicheckpost-response-200-description%]",
"schema": {
"$ref": "#/definitions/apicheckPost"
}
}
}
}
}
},
"parameters": {
"apicheckTestParameter": {
"name": "test_param",
"in": "formData",
"description": "[%parameter-apicheck-test-param-description%]",
"required": false,
"type": "string"
}
},
"definitions": {
"apicheckPost": {
"type": "object",
"properties": {
"body": {
"type": "object",
"description": "[%response-header-body%]",
"properties": {
"test_param": {
"type": "string",
"description": "[%response-apicheck-test-parameter%]"
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment