Skip to content
New issue

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

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

Already on GitHub? # to your account

Update jsonschema-rs & error messages formatting #9

Merged
merged 4 commits into from
Jun 2, 2021

Conversation

driv3r
Copy link
Owner

@driv3r driv3r commented Jun 2, 2021

No description provided.

@driv3r driv3r added the enhancement New feature or request label Jun 2, 2021
"'\"rusty\"' is not of type 'number'",
"'1' is not of type 'string'",
"'baz' is a required property"
%("rusty" is not of type "number" at /bar),
Copy link

@mobileka mobileka Jun 2, 2021

Choose a reason for hiding this comment

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

Just a matter of taste but I would format this as follows:

path "foo": "rusty" is not of type "number"

I think that it's easier for humans to read this as most of them, in my opinion, think in property -> value and not value -> property :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

makes sense! I'll set it to path "/foo": ... and at root: ..., does it make sense? @mobileka

Copy link
Owner Author

Choose a reason for hiding this comment

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

or even better path "/": ...

Copy link

Choose a reason for hiding this comment

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

Yup, I would also vote for "/" 👍

@driv3r driv3r merged commit 12fb1a8 into main Jun 2, 2021
@driv3r driv3r deleted the feature/update-error-messages branch June 2, 2021 15:54
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants