-
-
Notifications
You must be signed in to change notification settings - Fork 232
Labels
feature πNew feature or requestNew feature or requestprioritized πThis issue has been prioritized and will be worked on soonThis issue has been prioritized and will be worked on soon
Description
Describe the solution you'd like
As described at original issue and pull request openapi-typescript-codegen does not handle readOnly and writeOnly properties of openapi schemas.
With these properties, it is easier to model properties not for modifiable models.
OpenAPI example:
type: object
properties:
id:
# Returned by GET, not used in POST/PUT/PATCH
type: integer
readOnly: true
username:
type: string
password:
# Used in POST/PUT/PATCH, not returned by GET
type: string
writeOnly: true
Expected example types (not necessary to be generated separately, as @tiholic suggested in his PR):
UserGetResponse: { id: number, username?: string }
UserPostRequest: { id: number, username?, password?: string }
UserPutRequest: { id: number, username?, password?: string }
UserPatchRequest: { id: number, username?, password?: string }
vector-omalyutin, JTran-04 and omalyutinmrlubos, dan-cooke and mikhin
Metadata
Metadata
Assignees
Labels
feature πNew feature or requestNew feature or requestprioritized πThis issue has been prioritized and will be worked on soonThis issue has been prioritized and will be worked on soon