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
    Constructor
    Description
    Default constructor for OpenApiQueryMethodFilter.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    filterOpenAPI(org.eclipse.microprofile.openapi.models.OpenAPI openAPI)
    Applies post-processing to the generated OpenAPI definition by scanning registered controller classes for QUERY-annotated endpoints and adding their POST fallback representations.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.eclipse.microprofile.openapi.OASFilter

    filterAPIResponse, filterCallback, filterHeader, filterLink, filterOperation, filterParameter, filterPathItem, filterRequestBody, filterSchema, filterSecurityScheme, filterServer, filterTag
  • Constructor Details

  • Method Details

    • filterOpenAPI

      public void filterOpenAPI(org.eclipse.microprofile.openapi.models.OpenAPI openAPI)
      Applies post-processing to the generated OpenAPI definition by scanning registered controller classes for QUERY-annotated endpoints and adding their POST fallback representations.
      Specified by:
      filterOpenAPI in interface org.eclipse.microprofile.openapi.OASFilter
      Parameters:
      openAPI - the OpenAPI model being processed