Skip to content

provide examples field to set example value for a field. #356

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sreekesh93
Copy link

Add feature to set examples for each json field as part of schema

@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 91.59% when pulling 683bbcd on sreekesh93:master into a8dc686 on everit-org:master.

Copy link
Contributor

@erosb erosb left a comment

Choose a reason for hiding this comment

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

Hello @sreekesh93 , thank you for working on this.

Currently we don't support the "examples" keyword because it appeared only in the latest version of the json schema spec (2019-09), and we don't support this new version at all yet.

I think we can merge this PR once in the future, when we will start working on the 2019-09 draft version. Until then, please address my comment in the PR.

Thank you.

public abstract S build();

}
private final String examples;
Copy link
Contributor

Choose a reason for hiding this comment

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

A parsed Object would be much more useful than a string.

@sakthivel-pro
Copy link

@erosb Thank you for the awesome library. Regarding the examples keyword, the spec says it was introduced in Draft 6 ?

https://json-schema.org/understanding-json-schema/reference/generic.html?highlight=examples

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants