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

[REQUEST] pretty_generate the JSON file served from rswag-api #681

Open
ghost opened this issue Oct 12, 2023 · 0 comments · May be fixed by #682
Open

[REQUEST] pretty_generate the JSON file served from rswag-api #681

ghost opened this issue Oct 12, 2023 · 0 comments · May be fixed by #682

Comments

@ghost
Copy link

ghost commented Oct 12, 2023

Is your feature request related to a problem? Please describe.

My mobile engineers want to read the openapi.json file that our backend serves, but it is not pretty.

Describe the solution you'd like

Use JSON.pretty_generate instead of JSON.dump in RSwag::API::Middleware#unload_swagger. The output will more closely match the input and be more readable.

What support could we give you, so you could implement this yourself?

I'll have a PR up shortly.

Describe alternatives you've considered

We considered switching to YAML because it's more readable by default, but we have Strings that look like Dates which is broken. (See #562)

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

Successfully merging a pull request may close this issue.

1 participant