Class OpenApiNamespaceResolver
java.lang.Object
io.quarkiverse.openapi.generator.deployment.template.OpenApiNamespaceResolver
- All Implemented Interfaces:
io.quarkus.qute.NamespaceResolver,io.quarkus.qute.Resolver,io.quarkus.qute.WithPriority
Collection of OpenAPI specific methods to use in the templates.
It can be enhanced to have even more methods. See the usage of the method #genDeprecatedModelAttr to understand how to
implement and use them.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkus.qute.NamespaceResolver
io.quarkus.qute.NamespaceResolver.Builder, io.quarkus.qute.NamespaceResolver.NamespaceResolverImpl -
Field Summary
Fields inherited from interface io.quarkus.qute.WithPriority
DEFAULT_PRIORITY -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanList<org.openapitools.codegen.CodegenSecurity>getUniqueOAuthOperations(List<org.openapitools.codegen.CodegenSecurity> oauthOperations) Ignore the OAuth flows by filtering every oauth instance by name.booleanhasAuthMethods(org.openapitools.codegen.model.OperationMap operations) resolve(io.quarkus.qute.EvalContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkus.qute.WithPriority
getPriority
-
Method Details
-
genDeprecatedModelAttr
public boolean genDeprecatedModelAttr(String pkg, String classname, HashMap<String, Object> codegenConfig) - Parameters:
pkg- name of the given packageclassname- name of the Model classcodegenConfig- Map with the model codegen properties- Returns:
- true if the given model class should generate the deprecated attributes
-
genDeprecatedApiAttr
public boolean genDeprecatedApiAttr(String pkg, String classname, HashMap<String, Object> codegenConfig) - Parameters:
pkg- name of the given packageclassname- name of the Model classcodegenConfig- Map with the model codegen properties- Returns:
- true if the given model class should generate the deprecated attributes
-
parseUri
-
hasAuthMethods
public boolean hasAuthMethods(org.openapitools.codegen.model.OperationMap operations) -
getUniqueOAuthOperations
public List<org.openapitools.codegen.CodegenSecurity> getUniqueOAuthOperations(List<org.openapitools.codegen.CodegenSecurity> oauthOperations) Ignore the OAuth flows by filtering every oauth instance by name. The inner openapi-generator library duplicates the OAuth instances per flow in the openapi spec. So a specification file with more than one flow defined has two entries in the list. For now, we do not use this information in runtime so it can be safely filtered and ignored.- Parameters:
oauthOperations- passed through the Qute template- Returns:
- The list filtered by unique auth name
- See Also:
-
- "resources/templates/libraries/microprofile/auth/compositeAuthenticationProvider.qute"
-
resolve
- Specified by:
resolvein interfaceio.quarkus.qute.Resolver
-
getNamespace
- Specified by:
getNamespacein interfaceio.quarkus.qute.NamespaceResolver
-