Skip to content

Add support for readOnly and writeOnly OAS specification. #1184

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

Open
andrelambru opened this issue Apr 21, 2025 · 0 comments
Open

Add support for readOnly and writeOnly OAS specification. #1184

andrelambru opened this issue Apr 21, 2025 · 0 comments

Comments

@andrelambru
Copy link

Please consider adding support for readOnly and writeOnly.
I still haven't found any generator that supports this with axios, i really like your generator!
I made a postScript in python that works for some cases but not with others (can share it if help).

What is readOnly and writeOnly?
In OAS specification an readOnly attribute is an attribute that do not appear on request body.
So you should Omit<> them or do not put them in Post and Put interfaces.

In OAS specification an writeOnly attribute is an attribute that do not appear on response body.
So you should Omit<> them or do not put them in GET, DELETE... Interfaces

This will help us backender spare a lot of lines of code in our models definition =)
Thanks for your time!

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

1 participant