Skip to content

Commit

Permalink
Issue OpenAPITools#795: Add microprofile OpenAPI annotations for quar…
Browse files Browse the repository at this point in the history
…kus library in JaxRsSpec
  • Loading branch information
Nuno Borges authored and Nuno Borges committed May 3, 2023
1 parent a717e68 commit 4c68904
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -613,14 +613,14 @@ void generateApis(List<File> files, List<OperationsMap> allOperations, List<Mode
.filter(Objects::nonNull)
.filter(tag::equalsIgnoreCase)
.findFirst()
.ifPresent(tagName -> operation.put("tagName", tagName));
operation.put("tagDescription", "");
.ifPresent(tagName -> operation.put("operationTagName", tagName));
operation.put("operationTagDescription", "");
Optional.ofNullable(openAPI.getTags()).orElseGet(Collections::emptyList).stream()
.filter(t -> tag.equalsIgnoreCase(t.getName()))
.map(Tag::getDescription)
.filter(Objects::nonNull)
.findFirst()
.ifPresent(description -> operation.put("tagDescription", description));
.ifPresent(description -> operation.put("operationTagDescription", description));
Optional.ofNullable(config.additionalProperties().get("appVersion")).ifPresent(version -> operation.put("version", version));
operation.put("apiPackage", config.apiPackage());
operation.put("modelPackage", config.modelPackage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ import {{javaxPackage}}.validation.Valid;{{/useBeanValidation}}

{{#useMicroProfileOpenAPIAnnotations}}@OpenAPIDefinition(
info = @Info(
title = "{{{tagName}}}", version="{{{version}}}", description="{{{tagDescription}}}"{{#license}},
title = "{{{operationTagName}}}", version="{{{version}}}", description="{{{operationTagDescription}}}"{{#license}},
license = @License(name = "{{{name}}}", url = "{{{url}}}"){{/license}}{{#contact}},
contact = @Contact(name = "{{{name}}}", email = "{{{email}}}"){{/contact}}
),
tags = @Tag(name="{{{tagName}}}", description="{{{tagDescription}}}")
tags = @Tag(name="{{{operationTagName}}}", description="{{{operationTagDescription}}}")
){{#hasAuthMethods}}
@SecuritySchemes(value = {
{{#authMethods}}{{#isOAuth}}@SecurityScheme(securitySchemeName = "{{name}}", type = SecuritySchemeType.OAUTH2,
Expand Down

0 comments on commit 4c68904

Please sign in to comment.