Skip to content

writeOnly fields are not marked as such in the generated DTO #136

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

Closed
davidjohnstonverint opened this issue Dec 21, 2021 · 1 comment · Fixed by openapi-processor/openapi-processor-core#83
Labels
enhancement New feature or request
Milestone

Comments

@davidjohnstonverint
Copy link

davidjohnstonverint commented Dec 21, 2021

If I mark a field in the open API spec as writeOnly: true, e.g. as you might do for a password/token:

accessToken:
type: string
writeOnly: true

The generated DTO class does not mark the field as write only. Ideally it would mark the field on the DTO with JsonProperty.Access.WRITE_ONLY in the @JsonProperty annotation

@hauner hauner added the enhancement New feature or request label Dec 22, 2021
@hauner
Copy link
Member

hauner commented Dec 22, 2021

This should be easy to implement, looking at it.

Thanks for the feedback. :-)

hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
hauner added a commit to openapi-processor/openapi-processor-core that referenced this issue Dec 23, 2021
@hauner hauner added this to the 2022.1 milestone Dec 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants