Swagger UI shows resolver errors - complains about json.schema.$ref

Skip to first unread message

Doug F

Mar 15, 2021, 1:30:25 PMMar 15
to Kogito development mailing list

I've built a few of the kogito examples projects and some by using the maven archetype. My focus is on using quarkus and decision tables. It seems to be working very well.

The one issue I'm having is that the generated swagger UI will not show example values or example schema for the projects that I've created via the archetype. There is also no example value or schema shown for the output.

It shows the endpoints, but when I click "post", the resolver error pops up and there is no representation of the data types for the request or response.

If I enter appropriate structures for the DMN input and click Execute, the calls work fine - it just seems to be that the generated swagger-ui is incomplete.

The resolver errors and pop up are:
Resolver error at paths./calcMMValuationClass.post.requestBody.content.application/json.schema.$ref
Could not resolve reference: Not Found

Resolver error at
Could not resolve reference: Not Found

I added the property quarkus.smallrye-openapi.store-schema-directory to the application.properties file and examined the generated openapi.json and openapi.yaml files which look like they have the required information.

I also inspected the dmnDefinitions.json file in target/classes/META-INF/resources, which also looks like it has everything needed.

If I navigate to localhost:8080/openapi?format=json it returns a document that for the API call I'm interested in shows:
    description:  "DMN input"
        $ref:  "dmnDefinitions.json#/definitions/InputSet1"

But at this point I'm stuck as to how to resolve the resolver errors in the swagger UI.

Any guidance would be appreciated!



Matteo Mortari

Mar 15, 2021, 2:19:50 PMMar 15
to Kogito development mailing list
Hi Doug,
thank you for reporting AND providing details.

I think you are experiencing the problem we fixed with KOGITO-4185, just by looking at the generated OAS descriptor...

I believe migrating to a newer version of Kogito including that fix, meaning >=1.3.0.Final, should resolve the issue.

If you are still experiencing this problem after having fully migrated to a newer version, don't hesitate to let us know, but we will also need a reproducer (for instance the kogito-examples shows this feature just fine with no error in the swagger-ui)

Hope this helps,

You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/2c796346-1759-4667-bd0a-8ef82863816an%40googlegroups.com.

Doug F

Mar 15, 2021, 4:32:37 PMMar 15
to Kogito development mailing list
Hi MM,

I was not able to figure out the version I was using or how to upgrade an existing project, but I created a new project as follows using the maven archetype specified in the Kogito 1.3 documentation:

mvn archetype:generate -DarchetypeGroupId=org.kie.kogito -DarchetypeArtifactId=kogito-quarkus-archetype -DgroupId=org.acme -DartifactId=sample-kogito -DarchetypeVersion=1.3.0.Final -Dversion=1.0-SNAPSHOT

...and the problem was resolved.

Many thanks!!


Matteo Mortari

Mar 15, 2021, 6:55:08 PMMar 15
to Kogito development mailing list
> ...and the problem was resolved.
> Many thanks!!

Glad to hear that helped in solving the problem!


Reply all
Reply to author
0 new messages