mulesoft-labs / api-console-cli

A CLI tools for the API console.
Other
14 stars 15 forks source link

Incorrect type name for nested models #3

Closed wis3guy closed 4 years ago

wis3guy commented 7 years ago

When i generate one of my own RAML files into JSON, i notice that all properties of nested models are copied into the response format description, without a reference to the original model. The type of the nested models is always object rather than the actual model name.

Suppose i have:

SearchResult
   criteria: SearchCriteria
   results: Item[]

Then in the JSON i see the model definitions at the bottom, but a resource that returns the SearchResult model has all of the properties of SearchCriteria and Item incorporated without and are marked as object.

Make sense?

jarrodek commented 6 years ago

If I understand correctly,

On a resource level (in JSON output) the type describes an object that have combined properties from both criteria and results?

jarrodek commented 4 years ago

Closing for the lack of response.