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

fix(validation): unclear distinction between "true" errors and "validationErrors" when using ValidationCommand #266

Closed
3 tasks done
mike-winberry opened this issue Jun 17, 2024 · 0 comments · Fixed by #267
Assignees
Labels
bug Something isn't working chore Any refactor or uncategorized chore.

Comments

@mike-winberry
Copy link
Collaborator

mike-winberry commented Jun 17, 2024

Describe what should be investigated or refactored

  • validation.ValidationCommand should return error == nil when validation is successfully executed regardless of wether or not there are ValidationErrors present as those can be handled using the ValidationResponse.Result
  • validator.Validate() should no longer return the basicErrors and instead return the jsonschema.ValidatonError to allow for additional handling by the consumer of the original jsonschema error
  • make above accessible to the ValidationResponse via the JsonSchemaError field of type *jsonschema.ValidationError

Additional context

@mike-winberry mike-winberry added bug Something isn't working chore Any refactor or uncategorized chore. labels Jun 17, 2024
@mike-winberry mike-winberry self-assigned this Jun 17, 2024
@github-actions github-actions bot added the triage Awaiting triage from the team label Jun 17, 2024
mike-winberry added a commit that referenced this issue Jun 18, 2024
… an error when the validation has been successfully run

fix(validator)!: validator.Validate() no longer returns the parsed basic output as an error and instead returns the jsonschema.ValidationError
fix(cmd): validate cmd updated to handle ValidationCommand & validator.Validate changes
@mike-winberry mike-winberry removed the triage Awaiting triage from the team label Jun 18, 2024
mike-winberry added a commit that referenced this issue Jun 18, 2024
… error if validation was run (#267)

* fix(validation)!: #266 validation.ValidationCommand no longer returns an error when the validation has been successfully run
fix(validator)!: validator.Validate() no longer returns the parsed basic output as an error and instead returns the jsonschema.ValidationError
fix(cmd): validate cmd updated to handle ValidationCommand & validator.Validate changes

* fix(validation_command): added safety err handling with commment to issue opened to resolve the GetValidationResult returning an error

* fix(cmd): validate cmd now returns the Result json as an error instead of validationResponse.JsonSchemaError
This was referenced Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chore Any refactor or uncategorized chore.
Projects
Archived in project
1 participant