Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate doesnt indicate which line number or element is problematic #134

Open
jayvdb opened this issue Sep 5, 2022 · 0 comments
Open

Comments

@jayvdb
Copy link

jayvdb commented Sep 5, 2022

Expected Behaviour

When command prance validate reports a problem, it would be helpful for it to show which part of the document the error relates to, ideally with a line number, but failing that

If I intentionally make a yaml schema invalid, e.g. by changing a type: integer to type: unknown, then prance validate --backend openapi-spec-validator foo.yaml dumps out a large json representation of the schema (maybe a subset of the schema, but it was too big to diagnose) without any line breaks, despite the input being yaml, and thus no line number to indicate the problem.

The error seen at #133 indicates that using the flex backend probably also doesnt show line numbers.

If the backends, especially openapi-spec-validator, don't provide enough information for prance to be able to show better error diagnostics, then perhaps enhancements could be filed in those projects in order to allow this.

Minimal Example Spec

Actual Behaviour

Steps to Reproduce

Environment

  • OS: openSUSE Tumbleweed Linux
  • Python version: 3.10
  • Swagger/OpenAPI version used: 3.0
  • Backend: flex and openapi-spec-validator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant