I am trying to extend an existing spec, including a type extension. It works fine if base type has no type: specified. Otherwise, it shows the following error
Effectively, this bug makes extensions unusable. Has anyone seen this problem before ?
Thanks
-Igor
Original RAML Spec:
#%RAML 1.0
title: An example
version: v1
mediaType: application/json
baseUri: http://api.example.io/
types:
existing_type:
properties:
existing_property:
type: string
The following extension work correctly:
Example 1. Works - existing type is extended correctly and has 2 properties as a result.
#%RAML 1.0 Extension
usage: Type Extension Example
extends: ./api.raml
types:
existing_type:
properties:
new_property:
type: string
Example 2: Does NOT work. In the original RAML, “type: object” is added (it can reference any other type). The extension from example 1 no longer works.
#%RAML 1.0
title: An example
version: v1
mediaType: application/json
baseUri: http://api.example.io/
types:
existing_type:
type: object
properties:
existing_property:
type: string