Skip to content

Array type of RAML union being displayed incorrectly #33

@deiteris

Description

@deiteris

There are three cases, when an array type of RAML union is displayed incorrectly:

  1. Should display Array of: containing just a string type (see how StringArray is displayed), but just string type is displayed.
#%RAML 1.0
title: Test API

types:
  StringArray:
    type: string[]
  UnionArray:
    type: StringArray | string
  1. Same as above, except it additionally shows items like it's an object property.
#%RAML 1.0
title: Test API

types:
  StringArray:
    type: array
    items: string
  UnionArray:
    type: StringArray | string
  1. Should be displayed as Array of: listing object properties (see how ArrayType is displayed), but displays just object properties like it's an object.
#%RAML 1.0
title: Test API

types:
  ArrayType:
    type: array
    items:
      type: object
      properties:
        test: string
  UnionArray:
    type: ArrayType | string

Apparently, this.hasParentType check is missing for them for some reason. I might look into it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions