Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16923

Specifying OpenAPI license & contact info causes a NullPointerException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.11.2, 3.12.0
    • camel-openapi-java
    • None
    • Unknown

    Description

      When configuring any of the license or contact info API properties on the REST DSL configuration, it results an NPE when Camel attempts to render the OpenAPI document.

      Error rendering OpenApi API due null: java.lang.NullPointerException
      	at io.apicurio.datamodels.core.io.DataModelWriter.lookupParentJson(DataModelWriter.java:112)
      	at io.apicurio.datamodels.core.io.DataModelWriter.visitLicense(DataModelWriter.java:189)
      	at io.apicurio.datamodels.core.models.common.License.accept(License.java:41)
      	at io.apicurio.datamodels.core.visitors.Traverser.visitLicense(Traverser.java:179)
      	at io.apicurio.datamodels.core.models.common.License.accept(License.java:41)
      	at io.apicurio.datamodels.core.visitors.Traverser.traverseIfNotNull(Traverser.java:110)
      	at io.apicurio.datamodels.core.visitors.Traverser.visitInfo(Traverser.java:159)
      	at io.apicurio.datamodels.core.models.common.Info.accept(Info.java:46)
      	at io.apicurio.datamodels.core.visitors.Traverser.traverseIfNotNull(Traverser.java:110)
      	at io.apicurio.datamodels.core.visitors.Traverser.traverseDocument(Traverser.java:130)
      	at io.apicurio.datamodels.openapi.visitors.OasTraverser.traverseDocument(OasTraverser.java:60)
      	at io.apicurio.datamodels.openapi.v3.visitors.Oas30Traverser.traverseDocument(Oas30Traverser.java:84)
      	at io.apicurio.datamodels.core.visitors.Traverser.visitDocument(Traverser.java:120)
      	at io.apicurio.datamodels.core.models.Document.accept(Document.java:58)
      	at io.apicurio.datamodels.core.visitors.Traverser.traverse(Traverser.java:101)
      	at io.apicurio.datamodels.core.util.VisitorUtil.visitTree(VisitorUtil.java:36)
      	at io.apicurio.datamodels.Library.visitTree(Library.java:97)
      	at io.apicurio.datamodels.Library.writeNode(Library.java:174)
      	at org.apache.camel.openapi.RestOpenApiSupport.renderResourceListing(RestOpenApiSupport.java:421)
      	at org.apache.camel.openapi.RestOpenApiProcessor.process(RestOpenApiProcessor.java:122)
      

      Attachments

        Issue Links

          Activity

            People

              jamesnetherton James Netherton
              jamesnetherton James Netherton
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: