Skip to content
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

Empty request body is not generated, but it should #196

Merged
merged 3 commits into from
Mar 28, 2024
Merged

Conversation

exoego
Copy link
Owner

@exoego exoego commented Mar 27, 2024

Closes #195

The current implementation does not generate an empty request body (e.g., {} for application/javascript).
This leads to always-required top-level properties reported in #195

 PostUsersRequest: 
   type: object 
   properties: 
     name: 
       type: string 
   required:
     - name

@exoego exoego changed the title Some of top-level optional fields are wrongly marked as required Generate empty request body Mar 28, 2024
@exoego exoego added the bug Something isn't working label Mar 28, 2024
Copy link

codecov bot commented Mar 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.09%. Comparing base (5c875d7) to head (57ee078).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #196   +/-   ##
=======================================
  Coverage   97.09%   97.09%           
=======================================
  Files          15       15           
  Lines         516      517    +1     
  Branches      125      125           
=======================================
+ Hits          501      502    +1     
  Misses         15       15           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@exoego exoego marked this pull request as ready for review March 28, 2024 06:54
@exoego exoego merged commit 6592af4 into master Mar 28, 2024
13 checks passed
@exoego exoego deleted the optional-field branch March 28, 2024 06:54
@exoego exoego changed the title Generate empty request body Empty request body is not generated, but it should Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can we remove required parameters for request body?
1 participant