swagger-typescript-api icon indicating copy to clipboard operation
swagger-typescript-api copied to clipboard

Add support for readOnly and writeOnly OAS specification.

Open andrelambru opened this issue 8 months ago • 1 comments

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!

andrelambru avatar Apr 21 '25 21:04 andrelambru