-
Notifications
You must be signed in to change notification settings - Fork 114
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
JSON Schema support for schema.Dict #88
Conversation
README.md
Outdated
|
||
### Custom FieldValidators | ||
|
||
For a custom `FieldValidator` to support encoding to JSON Schema, it must implement the `jsonschema.Builder` interface: | ||
For a custom `FieldValidator` to support encoding to JSON Schema, it must implement the `jsonschema.Builder` interface: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opps extra space...
cf26f74
to
912d4a7
Compare
}`), | ||
}, | ||
{ | ||
name: `KeyValidator=String{Regex:"re"},ValuesValidator=Integer{}"`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be Regexp in name
912d4a7
to
a289649
Compare
Validator: &schema.Dict{ | ||
KeysValidator: &schema.String{ | ||
Regexp: "tch", | ||
Allowed: []string{"match1", "match2"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should not have passed...
a289649
to
cfce041
Compare
Let's wait for #90 to be merged first and then rebase. |
This commits resolves rs#33 by adding JSON Schema support for schema.Dict. The support limits KeysValidator instances to be a schema.String instance or nil as explained in the README.
cfce041
to
ec5433b
Compare
This commits resolves #33 by adding JSON Schema support for schema.Dict.
The support limits KeysValidator instances to be a schema.String
instance or nil as explained in the README.