Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-4374

Procedure missing for an OData metadata request to a Swagger VDB

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.1
    • 9.0, 9.0.1, 9.0.2
    • Misc. Connectors
    • Hide

      1) The Teiid 9.0 server environment has to be updated to work with the newest version of the swagger translator with the importer.swaggerFilePath support.
      a) Copy an updated swagger translator jar to the 'org.jboss.teiid.translator.swagger' module location.
      b) Copy the 'org.apache.commons.io' module from 'base' to 'dv'.
      c) Add the org.apache.commons.io' module as a dependency to the 'io.swagger.core' module in 'dv'.

      2) Copy the attached swagger.json to a location referenced in rhq-vdb.xml

      3) Start the Teiid server and deploy the attached VDB 'rhq-vdb.xml'.

      4) View the DDL in the Teiid subsystem console to confirm that a procedure was created for 'executeOperation'.

      5) Execute an OData query: http://localhost:8080/odata4/rhq/rhqModel/$metadata

      6) The returned metadata will have all operations defined in the Swagger except for 'executeOperation' (see attached rhq-metadata.xml).

      Show
      1) The Teiid 9.0 server environment has to be updated to work with the newest version of the swagger translator with the importer.swaggerFilePath support. a) Copy an updated swagger translator jar to the 'org.jboss.teiid.translator.swagger' module location. b) Copy the 'org.apache.commons.io' module from 'base' to 'dv'. c) Add the org.apache.commons.io' module as a dependency to the 'io.swagger.core' module in 'dv'. 2) Copy the attached swagger.json to a location referenced in rhq-vdb.xml 3) Start the Teiid server and deploy the attached VDB 'rhq-vdb.xml'. 4) View the DDL in the Teiid subsystem console to confirm that a procedure was created for 'executeOperation'. 5) Execute an OData query: http://localhost:8080/odata4/rhq/rhqModel/$metadata 6) The returned metadata will have all operations defined in the Swagger except for 'executeOperation' (see attached rhq-metadata.xml).

    Description

      When a REST PUT path defined in Swagger has a path parameter and a body it does not appear in OData metadata.

      See the attached swagger.json for an example. The operation 'executeOperation' does not appear in OData metadata.

      The code that determines if a procedure is allowed is in:
      org.teiid.olingo.service.ODataSchemaBuilder.allowedProcedure()

      The comment seems to indicate that as long as there is only a single LOB, multiple 'in' parameters are allowed. But the actual code does not allow any other 'in' parameters if there is a LOB parameter.

      Attachments

        1. resource-adapter-rhq.xml
          0.7 kB
        2. rhq-metadata.xml
          10 kB
        3. rhq-vdb.xml
          0.6 kB
        4. swagger.json
          25 kB

        Activity

          People

            rhn-engineering-rareddy Ramesh Reddy
            evdillon Van Dillon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: