This handler is part of the light-rest-4j which is built on top of light-4j but focused on RESTful API only. Also, it only works with the OpenAPI 3.0 specification.
It is designed based on OpenAPI specification, so it is our best interest to utilize the openapi.yaml or openapi.json to its full potential. Currently, two components are using the OpenAPI specification during runtime.
openapi-security - Verify scopes in the JWT token against the scopes defined in OpenAPI specification if scope verification is true.
openapi-validator - Validate request and response based on the definition in the OpenAPI specification for the path and method.
As you have noticed, both components need to have the OpenAPI operation available based on the current request path and method combination.
A specification file openapi.yaml or openapi.json should be in the config folder of your API implementation, and it will be loaded to memory with OpenApiHelper during server startup. It will be cached in memory until the server is shut down.
To match the incoming request path to the paths defined in the OpenAPI specification, all paths are normalized before matching action. OpenApiHelper provides an API to match the request path to the paths in OpenAPI specification.
It is an HttpHandler to parse the OpenAPI spec based on the request path and method and attach an OpenApiOperation object to the exchange. The openapi-security and openapi-validator modules are using it to do their jobs without parsing the openapi.yaml or openapi.json second time.