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

How to get validation errors? #29

Closed
daniel-stockhausen opened this issue Jul 18, 2018 · 4 comments
Closed

How to get validation errors? #29

daniel-stockhausen opened this issue Jul 18, 2018 · 4 comments
Assignees

Comments

@daniel-stockhausen
Copy link

Hi,

I'm using api-console v3 additionally to api-console-cli, because api-console v3 validates and renders the RAML file in the browser and displays validation errors, if found.

api-console-cli just seems to keep rendering and most of the time the documentation looks fine in the browser, even if there were errors - because instead of any error message shown, invalid stuff just seems to be missing.

There doesn't seem to be a way to display validation errors when using api-console-cli, --verbose option also doesn't seem to print them.

Any suggestions?

Thanks!

@jarrodek
Copy link
Contributor

Hi,
Thank you for the issue report.

The console does not support validation nor we want it to support it. The idea is to allow to document as much as possible, event if RAML contains error. The console's target audience is API consumers that want to learn about the API. For API designers and API developers we have API design tools (API workbench, API designer) that render errors when writing the API model.

The CLI (and underlying builder module) does not test the API for validation. What I can suggest is to enable API validation on build time, print the warning and error messages to the output but continue the build. Would it solve your query?

Thanks
Pawel

@daniel-stockhausen
Copy link
Author

Hey Pawel!

thanks for your response. Yes, actually this would probably completely solve my problem. Of course it makes sense to render the documentation as good as possible, even if there are errors - I just would like to see them in the CLI - maybe with the verbose option or another additional option? That would be perfect for me :)

It would be great if you could implement anything like that!

Thank you :)

jarrodek added a commit to mulesoft-labs/api-console-builder that referenced this issue Sep 20, 2018
@jarrodek
Copy link
Contributor

API validation message will be printed when verbose option is set when building the console with next version.

@jarrodek
Copy link
Contributor

Actually, I lowered default logging level to warning messages so validation errors will always be send to the output.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants