Open piersmacdonald opened 6 years ago
+1
There is a bug since #16 which ignores request body and path parameters which is solved by PR #24.
@David-Sellen I don't see it is solved by now, which version do you use?
I run serverless openapi generate -o swagger.json -f json
and this is path of swagger.json
"paths": {
"/create": {
"post": {
"operationId": "createUser",
"summary": "Create User",
"description": "Creates a user and then sends a generated password email",
"responses": {
"201": {
"description": "A user object along with generated API Keys",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PutDocumentResponse"
}
}
}
},
"500": {
"description": "An error message when creating a new user",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
}
@pig800509 that is because the fix has not been merged into this repo
@David-Sellen I see, thank you so much.
The
serverless.docs.yml
andserverless.yml
duplicate the same documentation and it's not clear which was used to generate theopenapi.yml
in the directory.When I run the sample my
createUser
endpoint fails to create arequestBody
, I can't replicate theopenapi.yml
in the test/project directory. If I run theserverless.yml
in the sample I get this in my output