Skip to content
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

@NotNull should not generate nullable: false #1180

Closed
MikeEdgar opened this issue Jul 14, 2022 · 1 comment · Fixed by #1181
Closed

@NotNull should not generate nullable: false #1180

MikeEdgar opened this issue Jul 14, 2022 · 1 comment · Fixed by #1181
Labels
bug Something isn't working
Milestone

Comments

@MikeEdgar
Copy link
Member

I just stumbled upon a similar issue, where

@NotNull
public Access access

results in

access:
  allOf:
          - $ref: '#/components/schemas/Access'
          - nullable: false

Naturally I don't want to remove the @NotNull as it is used for other validations. And for some reason when I process the generated document with openapi-generator to create Typescript API this results in

access: Access | null

Originally posted by @rvansa in #1023 (comment)

@MikeEdgar
Copy link
Member Author

nullable: false is the default and should not be added by the annotation scanner when @NotNull is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant