Console does not show me any type information inside the response section
sichvoge opened this issue · 6 comments
Might be related:
Using the following example:
#%RAML 1.0
title: TestRAML
baseUri: http://someapi.com/api
mediaType: application/json
resourceTypes:
collection:
usage: Use this resourceType to represent a collection of <<resourcePathName|!singularize>> items
description: A collection of <<resourcePathName>>
get:
description: |
Get all <<resourcePathName>>,
optionally filtered
responses:
200:
body:
type: <<typeName|!singularize>>[]
types:
Member:
properties:
firstName: string
lastName: string
age: integer
examples:
Bob:
value:
firstName: "Bob"
lastName: "Slidell"
age: 42
Bill:
value:
firstName: "Bill"
lastName: "Lumberg"
age: 41
/members:
type:
collection:
typeName: <<resourcePathName|!uppercamelcase>>
get:
I don't see anything in the console anymore:
That was working before.
UPDATE
Using the current state, the informations are back for the initial problem:
Problems remain with the example in #432 (comment)
@sichvoge I tried out the example in the comment, and got this result:
This error happens when this syntax is used for the arrays:
type: <<typeName|!singularize>>[]
If instead it is written this way, it works:
type: array
items: <<typeName|!singularize>>
The difference is in the JSON generated by the parser in the api-console. The first one generate this:
While the second one has a different structure in "items":
We could change the generated JSON in the api-designer. But maybe it is a better idea to fix this directly in the parser. What do you think about this?
That might be fixed with raml-org/raml-js-parser-2#407. Hope that is going to be in the sprint release on Monday.