Requiredness of body parameter lost
See original GitHub issueInput
{
"name": "indexer",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Indexer"
},
"description": "The definition of the indexer to create or update."
}
Output
"requestBody": {
"content": {
"application/json": {
"description": "The definition of the indexer to create or update.",
"schema": {
"$ref": "#/components/schemas/Indexer"
}
}
}
}
Expected
"requestBody": {
"content": {
"application/json": {
"description": "The definition of the indexer to create or update.",
"schema": {
"$ref": "#/components/schemas/Indexer"
}
}
},
"required": true
}
Detail
According to https://github.com/OAI/OpenAPI-Specification/blob/OpenAPI.next/versions/3.0.md#request-body-object, required defaults to false, so it needs to be set to true explicitly 🙂
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Custom connector request body parameter lost
Hello, In my application I want to use Azure functions from Power Apps via a custom connector. All of my requests to Azure...
Read more >Spring post method "Required request body is missing"
My issue was that, when I was making requests from Postman, the "Content-Length" header was unchecked, so service was not considering the ...
Read more >Missing body parameters in OpenAPI v2 document · Issue #467
Hi, We experience the issue with generating OpenAPI v2 (Swagger) documents which have multiple entries (media types) in the request body's ...
Read more >How to properly handle missing parameters in @HttpPost ...
Is there any sufficient and maintainable approach of handling missing parameters passed to POST methods in request body ? Here is my code:...
Read more >Request Validation | Prism - Stoplight
Requests which expect a request body, query parameter, or a path parameter, will be validated. For example, make a POST with a JSON...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

v2.2.1 just published.
No, @olydis that’s cool - the fix is correct and helped me decide which branch to apply it to. (Let me know if you’re using the npm package and/or the web front-end and I will do a proper release).
Have applied a similar fix for 2.0
in: fileparameters.Thanks again for spotting the issue, and for the PR and kind comments.