raml-org / raml-js-parser-2

(deprecated)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wrong error for missing type in array

agirorn opened this issue · comments

I have the following RAML where id should be changed to type: string

type: object
properties:
  name: string
  description: string
  routes:
    type: array
    items:
      id: string

And this is the error I get

Error: Component type has error:
  INVALID_COMPONENT_TYPE
  at: types/cutter/portion/properties.raml:4:2

And I think it would be better if I got an error stating that the type has not been set for the routes array. Something like:

MISSING_ITEMS_TYPE
Type not set for "routes" Array items

Note that raml-js-parser-2 has been deprecated, the new official parser is webapi-parser. Feel free to attempt to reproduce this issue with webapi-parser and report any issue you may have on that repository.