advanced-rest-client / api-type-document

⛔️ DEPRECATED This component is being deprecated. Use `api-documentation` instead.
0 stars 2 forks source link

Array type of RAML union being displayed incorrectly #33

Open deiteris opened 3 years ago

deiteris commented 3 years ago

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.
```yaml
#%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.