-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
requestBody is not present in express #22
Comments
Hi @mehtatejas. I'm not sure I understand your concern. Can you please provide a better explanation? Thanks. |
Oh, I understood now. You're right, this is missing. It's being done via parameters with Would you mind adding this feature? It's should be a matter of iterating over |
Hi @fmvilas. I tried as follows :
However, I am not sure this is correct approach |
I haven't tested it but I think is like this: {{#each ../requestBody.content.['application/json'].schema.properties as |prop|}}
{{prop}}: req.body.{{prop}}{{#unless @last}},{{/unless}}
{{/each}} There's no need to check for existence in Handlebars. For instance, in the expression |
Following code works.
|
Can you paste your OpenAPI description here? Just the excerpt where requestBody is. |
post: |
Oh! I see. Yeah it should be correct 👍 |
Hi,
I am generating code for petstore-expanded.yaml. However I found that requestBody schema is not present in router.
og -o ./my-docs petstore.yaml express
Kindly guide.
The text was updated successfully, but these errors were encountered: