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
Is there any way to make all output properties readonly? #214
Comments
maybe you could do it with a custom handlebars template ? another simple way would be to traverse your OpenAPI schemas and add readonly on each properties before passing that OpenAPI document to |
The documentation on how to use the custom handlebars template is far from ideal. I've been trying to figure it out for a minute, I haven't used handlebars very much but it seems simple enough. The big issue for me is understanding all the different context variables that are available and how to use them. Again, I don't see good documentation about this. As for marking things as readonly in the OpenAPI schema, that is something I hadn't considered. I will investigate this option. |
I'm not seeing any easy ways with handlebars to customize things to the point of making all types readonly. Customizing the openapi schema isn't always an option as well. I'm really hoping that this feature could be added in the future. |
what's the issue with your case ?
feel free to send a PR 🙏 |
Thanks for the invitation. Here is the PR adding the requested functionality: #221 |
I'm a strong proponent of immutable data structures. I would love if there was some way that the schemas generated would have all properties set to readonly. I'm currently exploring the API of this library, and I don't see a way to do this yet. Hoping there is a solution, or that a new argument can be added to the CLI.
Thanks.
The text was updated successfully, but these errors were encountered: