You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "claudemamo (via GitHub)" <gi...@apache.org> on 2024/03/20 13:34:31 UTC

[I] allowableValues are not populated correctly when generating routes in REST DSL from an OpenAPI definition [camel-karavan]

claudemamo opened a new issue, #1187:
URL: https://github.com/apache/camel-karavan/issues/1187

   From Karavan's VS Code extension, I've generated routes in REST DSL from the following OpenAPI definition: [us-core-server.openapi.json](https://github.com/apache/camel-karavan/files/14666994/us-core-server.openapi.json). As far as I can tell, the `allowableValues` key is never populated correctly. For example:
   
   Expected (as generated from JBang with Camel 4.4.0)
   ```yaml
     - id: "createCareTeam"
       path: "/CareTeam"
       consumes: "application/fhir+json,application/fhir+xml"
       produces: "application/fhir+json,application/fhir+xml"
       param:
       - collectionFormat: "multi"
         dataType: "string"
         description: "Requests the server to return a designated subset of the resource"
         name: "_summary"
         required: false
         type: "query"
         allowableValues:
         - "true"
         - "text"
         - "data"
         - "count"
         - "false"
       - collectionFormat: "multi"
         dataType: "string"
         description: "Specify alternative response formats by their MIME-types (when\
           \ a client is unable acccess accept: header)"
         name: "_format"
         required: false
         type: "query"
       - collectionFormat: "multi"
         dataType: "boolean"
         description: "Ask for a pretty printed response for human convenience"
         name: "_pretty"
         required: false
         type: "query"
       - collectionFormat: "csv"
         dataType: "array"
         description: "Requests the server to return a collection of elements from\
           \ the resource"
         name: "_elements"
         required: false
         type: "query"
       - description: "The new state of the resource"
         name: "body"
         required: true
         type: "body"
       to: "direct:createCareTeam"
   ```
   
   Actual (as generated from Karavan v4.4.0)
   ```yaml
       - id: createCareTeam
         path: /CareTeam
         to: direct:createCareTeam
         consumes: application/fhir+json,application/fhir+xml
         produces: application/fhir+json,application/fhir+xml
         param:
           - description: Requests the server to return a designated subset of the resource
             name: _summary
             type: query
             required: false
             collectionFormat: multi
             dataType: string
             allowableValues:
               - '0': t
                 '1': r
                 '2': u
                 '3': e
               - '0': t
                 '1': e
                 '2': x
                 '3': t
               - '0': d
                 '1': a
                 '2': t
                 '3': a
               - '0': c
                 '1': o
                 '2': u
                 '3': 'n'
                 '4': t
               - '0': f
                 '1': a
                 '2': l
                 '3': s
                 '4': e
           - description: >-
               Specify alternative response formats by their MIME-types (when a
               client is unable acccess accept: header)
             name: _format
             type: query
             required: false
             collectionFormat: multi
             dataType: string
           - description: Ask for a pretty printed response for human convenience
             name: _pretty
             type: query
             required: false
             collectionFormat: multi
             dataType: boolean
           - description: >-
               Requests the server to return a collection of elements from the
               resource
             name: _elements
             type: query
             required: false
             collectionFormat: csv
             dataType: array
           - description: The new state of the resource
             name: body
             type: body
             required: true
   ```
   


-- 
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: commits-unsubscribe@camel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] allowableValues are not populated correctly when generating routes in REST DSL from an OpenAPI definition [camel-karavan]

Posted by "mgubaidullin (via GitHub)" <gi...@apache.org>.
mgubaidullin closed issue #1187: allowableValues are not populated correctly when generating routes in REST DSL from an OpenAPI definition
URL: https://github.com/apache/camel-karavan/issues/1187


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] allowableValues are not populated correctly when generating routes in REST DSL from an OpenAPI definition [camel-karavan]

Posted by "claudemamo (via GitHub)" <gi...@apache.org>.
claudemamo commented on issue #1187:
URL: https://github.com/apache/camel-karavan/issues/1187#issuecomment-2009666742

   Additionally, I've observed that `allowedValues` also becomes messed up after opening the REST YAML from the REST tab:
   
   ![image](https://github.com/apache/camel-karavan/assets/823038/6dffc858-6989-4731-b69d-32383140cb83)
   


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org