Class OpenApiQueryMethodFilter
java.lang.Object
org.gcube.informationsystem.resourceregistry.rest.providers.OpenApiQueryMethodFilter
- All Implemented Interfaces:
org.eclipse.microprofile.openapi.OASFilter
public class OpenApiQueryMethodFilter
extends Object
implements org.eclipse.microprofile.openapi.OASFilter
Programmatic OpenAPI filter that scans classes for custom
QUERY methods and dynamically
generates their standard POST fallback endpoints in the resulting OpenAPI specification.
Because OpenAPI 3.x specifications only support standard HTTP methods (such as GET,
POST, PUT, DELETE), custom non-standard verbs like QUERY
(RFC 10008) are omitted during standard annotation scanning. This filter inspects all registered
REST controllers for methods annotated with QUERY and constructs equivalent standard
POST operations mapped to their corresponding compatibility fallback URIs
(e.g. /contexts/query or /admin/raw-query/query), preserving full OpenAPI documentation
(descriptions, request bodies, query parameters, headers, and responses).
- Author:
- Luca Frosini (ISTI - CNR)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfilterOpenAPI(org.eclipse.microprofile.openapi.models.OpenAPI openAPI) Applies post-processing to the generatedOpenAPIdefinition by scanning registered controller classes forQUERY-annotated endpoints and adding theirPOSTfallback representations.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.microprofile.openapi.OASFilter
filterAPIResponse, filterCallback, filterHeader, filterLink, filterOperation, filterParameter, filterPathItem, filterRequestBody, filterSchema, filterSecurityScheme, filterServer, filterTag
-
Constructor Details
-
OpenApiQueryMethodFilter
public OpenApiQueryMethodFilter()Default constructor forOpenApiQueryMethodFilter.
-
-
Method Details
-
filterOpenAPI
public void filterOpenAPI(org.eclipse.microprofile.openapi.models.OpenAPI openAPI) Applies post-processing to the generatedOpenAPIdefinition by scanning registered controller classes forQUERY-annotated endpoints and adding theirPOSTfallback representations.- Specified by:
filterOpenAPIin interfaceorg.eclipse.microprofile.openapi.OASFilter- Parameters:
openAPI- the OpenAPI model being processed
-