Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

OAS 3 query parameter description is lost in RAML 0.8 #82

Description

@postatum

Hello, here it is. I'm also using the code I mentioned in my previous reply for parsing (and switched between Raml08 and Ram10 classes). As you can see below, description is missing for the parameter name def in RAML 8.0.
About amf prefixes, is there a way to remove it before generating RAML file? Because the CMS I'm using, does not recognize these amf variables and sees them as invalid, but If I remove them manually it becomes valid.

Input

{
   "openapi":"3.0.1",
   "info":{
      "title":"API Endpoints",
      "version":"v1"
   },
   "servers":[
      {
         "url":"http://localhost:8080",
         "description":"Generated server url"
      }
   ],
   "paths":{
      "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/api/users":{
         "get":{
            "tags":[
               "user-controller"
            ],
            "summary":"getAllUsers() summary..",
            "operationId":"getAllUsers",
            "parameters":[
               {
                  "name":"def",
                  "in":"query",
                  "description":"default parameter description..",
                  "required":true,
                  "schema":{
                     "type":"string"
                  }
               }
            ],
            "responses":{
               "default":{
                  "description":"default response",
                  "content":{
                     "application/json":{
                        "schema":{
                           "$ref":"#/components/schemas/User"
                        }
                     }
                  }
               }
            }
         }
      }
   },
   "components":{
      "schemas":{
         "Page":{
            "type":"object",
            "properties":{
               "number":{
                  "type":"integer",
                  "format":"int32"
               },
               "name":{
                  "type":"string"
               },
               "content":{
                  "type":"string"
               }
            }
         },
         "User":{
            "type":"object",
            "properties":{
               "name":{
                  "type":"string"
               },
               "username":{
                  "type":"string"
               },
               "password":{
                  "type":"string"
               }
            }
         }
      }
   }
}

Output RAML 0.8

#%RAML 0.8
title: API Endpoints
baseUri: http://localhost:8080
(amf-serverDescription): Generated server url
version: v1
/api/users:
  get:
    displayName: getAllUsers
    (amf-summary): getAllUsers() summary..
    (amf-tags):
      - user-controller
    queryParameters:
      def:
        type: string
        required: true
    (amf-defaultResponse):
      default:
        description: default response
        body:
          application/json:
            formParameters:
              name:
                type: string
                required: false
              username:
                type: string
                required: false
              password:
                type: string
                required: false

Output RAML 1.0

#%RAML 1.0
title: API Endpoints
baseUri: http://localhost:8080
(amf-serverDescription): Generated server url
version: v1
/api/users:
  get:
    displayName: getAllUsers
    (amf-summary): getAllUsers() summary..
    (amf-tags):
      - user-controller
    queryParameters:
      def:
        **description: default parameter description..**
        required: true
        type: string
    (amf-defaultResponse):
      default:
        description: default response
        body:
          application/json:
            type: object
            additionalProperties: true
            properties:
              name:
                type: string
                required: false
              username:
                type: string
                required: false
              password:
                type: string
                required: false

Originally posted by @cytor in #81 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    amfRelated to AMF issue, bug or specific behaviorbugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions