nrknithin commented on code in PR #6903:
URL: https://github.com/apache/incubator-kie/pull/6903#discussion_r3894207575
##########
kogito-apps-quarkus/jobs-service-quarkus/jobs-service-common/src/main/java/org/kie/kogito/jobs/service/openapi/JobServiceModelFilter.java:
##########
@@ -55,9 +57,18 @@ public class JobServiceModelFilter implements OASFilter {
@Override
public void filterOpenAPI(OpenAPI openAPI) {
+ // Since smallrye-open-api 4.2 both the components and their schemas
map can be null when the
+ // document declares no schemas (e.g. embedded job service without the
REST API).
+ Components components = openAPI.getComponents();
+ Map<String, Schema> schemas = components != null ?
components.getSchemas() : null;
+ if (schemas == null) {
+ LOGGER.warn("No component schemas are present in the OpenAPI
document, skipping job service schema adjustments.");
Review Comment:
Right, no schemas is the normal case for the embedded job service without
the REST API — changed it to debug.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]