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

Add support requiredMode #968

Merged

Conversation

altro3
Copy link
Collaborator

@altro3 altro3 commented Mar 25, 2023

Fixed #962

boolean isRequiredDefaultValueSet = false;
if (schemaAnnotationValue != null) {
elementSchemaRequired = schemaAnnotationValue.get("required", Argument.of(Boolean.TYPE));
isRequiredDefaultValueSet = !schemaAnnotationValue.contains("required");
io.swagger.v3.oas.annotations.media.Schema.RequiredMode requiredMode = schemaAnnotationValue.get("requiredMode", io.swagger.v3.oas.annotations.media.Schema.RequiredMode.class).orElse(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enumValue(..) instead of converting in this way it is less expensive

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@altro3 altro3 force-pushed the add_support_required_mode branch from 46538b0 to 402cb50 Compare March 29, 2023 13:11
@altro3 altro3 requested a review from graemerocher March 29, 2023 13:25
@graemerocher graemerocher merged commit 7cd22d8 into micronaut-projects:4.8.x Mar 29, 2023
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

Successfully merging this pull request may close these issues.

2 participants