Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Array type of RAML union being displayed incorrectly #33

Open
deiteris opened this issue Aug 15, 2021 · 0 comments
Open

Array type of RAML union being displayed incorrectly #33

deiteris opened this issue Aug 15, 2021 · 0 comments

Comments

@deiteris
Copy link
Contributor

deiteris commented Aug 15, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant