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

Exclude null properties when rendering JSON #302

Merged

Conversation

gloeglm
Copy link
Contributor

@gloeglm gloeglm commented Dec 14, 2021

The generated JSON diff file is already fairly large for larger API specs, but is made especially large because a lot of unused properties in the objects are serialised as null properties.

As a comparison:
9.1M out_with_nulls.json
6.2M out_no_nulls.json

This changes that to ignore null value properties when rendering the json. Makes the files smaller, and also more human-readable.

@joschi joschi added this to the 2.1.0 milestone Dec 27, 2021
Copy link
Contributor

@joschi joschi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gloeglm Thanks for your contribution!

@joschi joschi merged commit 5666494 into OpenAPITools:master Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants