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

feat: add preserveEmptyObjects filter option + remove keepEmptySchema option #85

Merged
merged 1 commit into from
Aug 13, 2023

Conversation

mamatsunami
Copy link
Contributor

Having a dedicated option--keepEmptySchema to prevent removal of empty schema object wasn't flexible enough.

I decided to completely remove it and instead I added a preserveEmptyObjects which is a filtering option.

It can be :

  • undefined : we keep original behavior (removal of all empty objects except for examples)
  • false : we remove all (even examples)
  • true : we keep all
  • [...] : for instance with ['examples', 'schema'] value, we preserve all empty objects defined inside examples and schema paths.

@thim81
Copy link
Owner

thim81 commented Aug 13, 2023

@mamatsunami this is a great addition for the filtering option. It suits better than making it a separate option. Thanks again for taking the time and effort to provide a ready to merge PR.

@thim81 thim81 merged commit a57bc27 into thim81:main Aug 13, 2023
4 checks passed
@thim81
Copy link
Owner

thim81 commented Sep 18, 2023

hi @mamatsunami,

Just wanted to let you know, that there is a new release of OpenAPI format which contains your PR.
I wanted to thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants