raml-java-parser
raml-java-parser copied to clipboard
Error parsing Parameters in RAML 1.0
When parsing valid 1.0 RAML with passing parameters, there is a parser error E.g.
Resource type library with parameters defined
#%RAML 1.0 Library
usage: Standard resourceTypes
uses:
standardTraits: ../traits/standardTraits.raml
standardDataTypes: ../libraries/standardDataTypes.raml
resourceTypes:
base:
get:
responses:
200:
body:
application/json:
type: <<itemType>>
read-only-collection:
type: { base: { itemType : <<itemType>> } }
get:
responses:
200:
body:
application/json:
type: <<itemType>>[]
example: <<exampleCollection>>
And in the api RAML
/marketingPlans:
description: Return list of Marketing Plans
displayName: List of Marketing Plans
type:
standardResourceTypes.read-only-collection:
itemType : planType.Plan-Paginated
exampleCollection: !include examples/plans.json
Getting a parser error saying Invalid Element { type: <<itemType>> } which is a parameter that is passed in.
Aha! Link: https://mulesoft-roadmap.aha.io/features/APIRAML-103