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

Add an option to minify the output. #1120

Closed
arthurfiorette opened this issue Feb 9, 2022 · 2 comments · Fixed by #1121
Closed

Add an option to minify the output. #1120

arthurfiorette opened this issue Feb 9, 2022 · 2 comments · Fixed by #1121

Comments

@arthurfiorette
Copy link
Contributor

This line is formatting the json schema output. I have some files generated by this tool with 5K+ lines, and just by not formatting the output, i can reduce around 2K lines.

const schemaString = config.sortProps ? stringify(schema, null, 2) : JSON.stringify(schema, null, 2);

An option --no-format can resolve this issue.

@domoritz
Copy link
Member

domoritz commented Feb 9, 2022

Could you post process the json or use the generator programmatically?

I'd be happy to review a pull request.

@arthurfiorette
Copy link
Contributor Author

In my environment, post processing would require a lot of work :)

I'll take the time to do a PR, I just don't promise to be today.

@arthurfiorette arthurfiorette changed the title Add an option to not format the output. Add an option to minify the output. Feb 9, 2022
domoritz pushed a commit that referenced this issue Feb 11, 2022
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 a pull request may close this issue.

2 participants