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

Export schemas to JSON/Swagger/OpenAPI #1

Open
ezekg opened this issue Jun 8, 2023 · 2 comments
Open

Export schemas to JSON/Swagger/OpenAPI #1

ezekg opened this issue Jun 8, 2023 · 2 comments

Comments

@ezekg
Copy link
Member

ezekg commented Jun 8, 2023

Could create a Rake task that can read in the schemas and export to an OpenAPI spec:

rake typed_params:export[<format>]

One caveat here would be that this only documents requests, not responses. But responses could always be filled in afterwards using schemas, so I think it's still worth exploring.

@ezekg
Copy link
Member Author

ezekg commented Jun 8, 2023

Doesn't even necessarily have to be Swagger/OpenAPI specific. At the very least, we could export all schemas to JSON so that the schemas can be used elsewhere to generate e.g. TypeScript types or even documenation.

@ezekg ezekg changed the title Export schemas to a Swagger/OpenAPI spec Export schemas to JSON/Swagger/OpenAPI Jun 8, 2023
@dylandamsma
Copy link

This would be cool! I am using this gem in combination with Rswag, some automatic declaration would be amazing.

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

No branches or pull requests

2 participants