Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6531

Broken Swagger-UI Quarkus for DMN OpenAPI references

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 1.15.0.Final
    • DMN Engine
    • None
    • False
    • False
    • 2022 Week 02-04 (from Jan 10)

      Errors such as:

      Resolver error at paths./ <modelname> .post.requestBody.content.application/json.schema.$ref
      Could not resolve reference: Failed to fetch
      Resolver error at paths./ <modelname> .post.responses.default.content.application/json.schema.$ref
      Could not resolve reference: Failed to fetch
      

      using specific Kogito DMN Quarkus example like:

      Resolver error at paths./Traffic Violation.post.requestBody.content.application/json.schema.$ref
      Could not resolve reference: Failed to fetch
      Resolver error at paths./Traffic Violation.post.responses.default.content.application/json.schema.$ref
      Could not resolve reference: Failed to fetch
      

      Are likely caused by the Swagger-UI not able to dereference when the JSON Schema $ref contains double // (or even triple, etc ///) for path.

      To be noted the Swagger Parser (io.swagger.v3.parser.OpenAPIV3Parser) is able to dereference without any issue, and same any browser if you put in the URL bar something like http://localhost:8080//q/openapi (notice the double //)

      This seems related to the Swagger-UI spa only.

      There is then a problem about serving /dmnDefinitions.json in Dev Mode which occurs only from 1.16.x

              mmortari@redhat.com Matteo Mortari
              mmortari@redhat.com Matteo Mortari
              Daniel Rosa Daniel Rosa
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: