Hi there,
I am creating a type library using datatypes to allow type reusing in my APIs, and I am using raml-1-parser to validate my files and generate the equivalent JSON.
Right now I have something like these:
typesLib.raml :
#%RAML 1.0 Library
types:
TestType:
type: !include testType.raml
OtherTestType:
type: !include otherTestType.raml
testType.raml :
#%RAML 1.0 DataType
type: object
properties:
hello: string
world: string
otherTestType.raml :
#%RAML 1.0 DataType
type: object
properties:
quote: TestType
The parser says that my API are valid, but the JSON doesn’t include the reference to OtherTestType
properties. It also validates the examples in my API.
I am looking at the RAML1.0 spec, but I found some confusing info in the resolving includes topic: the third paragraph said ...an included file SHALL NOT use a YAML reference to an anchor in a separate file...
, but, if you look at the example, it tells you quite the opposite! I am also looking in internet and I found other examples using the includes as I use.
I am a bit confused right now, I don’t know if I didn’t understand something or the spec is wrong. Could anyone clarify this?
Thanks!!