Skip to content
This repository was archived by the owner on Jan 21, 2024. It is now read-only.
This repository was archived by the owner on Jan 21, 2024. It is now read-only.

JS validation example: use toString() of validation result instead of printing the results array #55

@nkuehn

Description

@nkuehn

I was misled for quite a bit of time by this line in the example code:

https://github.com/raml-org/webapi-parser/blob/master/examples/js/raml10-string-validation.js#L47

It hinted that the results array ist the right place to start dumping / debugging / logging validation errors but it's only useful for programmatic access.

I suggest to just console.log the ValidationResult itself, it has a nice toString() function that is not amazing but by far enough to understand the problems reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions