mulesoft / api-console

An interactive REST console based on RAML/OAS files
Other
911 stars 237 forks source link

Union types - description not displayed #590

Open eNcacz opened 5 years ago

eNcacz commented 5 years ago

I have this sample RAML file:

#%RAML 1.0
title: Test Case
version: 1.0
mediaType: [ application/json ]

types:
  Obj1:
    type: object
    description: The Obj1 description
    properties:
      aaa:
        type: string
        description: The string

  Obj2:
    type: object
    description: The Obj2 description
    properties:
      bbb:
        type: number
        description: The number

  Obj3:
    type: object
    description: The Obj3 description
    properties:
      bbb:
        type: boolean
        description: The boolean

  UnionObjects: Obj1 | Obj2 | Obj3

/foo:
  get:
    responses:
      200:
        description: everything OK
        body:
          type: object
          description: The response body description
          properties:
            foo:
              type: UnionObjects[]

I expect that the description of the chosen union variant will be shown at the place to which the violet arrow points to. The Obj1 is chosen in the screenshot so I expect the "The Obj1 description" text will be shown there. screenshot It will help to better describe the meaning of variants in the union type.

jarrodek commented 5 years ago

Thank you for the issue report. This makes sense. I will try to schedule it soon for development.