Skip to content

Parsing RAML 1.0 response examples #20

Description

@Plackier

For RAML 1.0 APIs, in ramlo\src\modules\api.js:328

apiExample = {
    response: body.toJSON().example,
    code: response.code().value()
};

the apiExample.response returns an object, so the following code

apiExample.response = apiExample.response && hljs.highlight('json', apiExample.response).value;

throws a [TypeError: value.substr is not a function].

For RAML 0.8 APIs, it works fine - the apiExample.response is a string. It might be something with the parser tools.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions