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

enchancement: improves UX around validation errors #1209

Merged
merged 1 commit into from
Mar 16, 2022

Conversation

ssoroka
Copy link
Contributor

@ssoroka ssoroka commented Mar 16, 2022

Summary

Validation errors have details buried in them, but it's not exposed via the API. this exposes those validation field-specific errors and greatly improves the readability

Checklist

  • Wrote appropriate unit tests
  • Considered security implications of the change
  • Updated associated docs where necessary
  • Updated associated configuration where necessary
  • Change is backwards compatible if it needs to be (user can upgrade without manual steps?)
  • Nothing sensitive logged
  • Commit message conforms to Conventional Commit

Related Issues

Resolves #1143

@ssoroka ssoroka changed the title fix: improves UX around validation errors enchancement: improves UX around validation errors Mar 16, 2022
@@ -6,7 +6,7 @@ import (

type Destination struct {
ID uid.ID `json:"id"`
UniqueID string `json:"uniqueID" form:"uniqueID"`
UniqueID string `json:"uniqueID" form:"uniqueID" example:"94c2c570a20311180ec325fd56"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these examples still used with the new OpenAPI generator?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep. I adopted it.

@ssoroka ssoroka merged commit becacb0 into main Mar 16, 2022
@ssoroka ssoroka deleted the better-validation-errors branch March 16, 2022 20:29
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

Successfully merging this pull request may close these issues.

Improve API usability around bad request errors
2 participants