Skip to content

Fix: Convert properties to string before regex #401

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

Closed
wants to merge 1 commit into from
Closed

Fix: Convert properties to string before regex #401

wants to merge 1 commit into from

Conversation

gcallaghan
Copy link

It is not uncommon for developers to create schemas in YAML, for example
when developing an Open API Specification. When keys are numeric and
parsed with the yaml parser they are typed and throw an error when
attempting to validate patternProperties or similar pattern matching
validation. This changeset converts the property to a string before
attempting to match the regex.

It is not uncommon for developers to create schemas in YAML, for example
when developing an Open API Specification. When keys are numeric and
parsed with the yaml parser they are typed and throw an error when
attempting to validate patternProperties or similar pattern matching
validation. This changeset converts the property to a string before
attempting to match the regex.
@Julian
Copy link
Member

Julian commented Apr 25, 2018

Hey, thanks.

This is a dupe of #286 / #285.

Have a look and let me know what you think.

@Julian
Copy link
Member

Julian commented Apr 25, 2018

(for which by the way my opinion at the minute is still that this should be up to the deserializer totake care of immediately after deserializing)

@gcallaghan
Copy link
Author

Sounds fair. I'll move down stream to open API validator that lead me here in the first place and probably round trip yaml to JSON.

The Type Error was cryptic and annoying, but again more of a down stream issue.

@gcallaghan gcallaghan closed this Apr 26, 2018
@Julian
Copy link
Member

Julian commented Apr 26, 2018 via email

Julian added a commit that referenced this pull request Jun 20, 2020
fc05651cc Merge pull request #409 from Stranger6667/dd/add-jsonschema-rs
5f1575a93 Add Rust `jsonschema` crate
2bf95beec Merge pull request #407 from fisxoj/master
9ae956b21 Add common lisp implementation to the list
d4ffd569b Merge pull request #401 from json-schema-org/ether/format-uuid
2d6c45711 tests for the "uuid" format
08f6cdaff Merge pull request #400 from json-schema-org/ether/more-format-ipv6
d3064eb3a some more tests for the "ipv6" format
1f34d3321 Merge pull request #399 from json-schema-org/ether/more-format-idn-email
22adda78c also test the "email" inputs against "idn-email"
25598a3b4 Merge pull request #392 from rjmill/rjmill/test-prop-named-ref-containing-a-ref
8dfa8adc9 Merge pull request #380 from ChALkeR/fix-ecmascript-regex
d595dbf9d backport $ref cases, changing "$defs" to "definitions"
ca8319c9e Fix \W test description
452b5f8f4 Test property named $ref, containing an actual $ref
a01ae5404 Fix ECMA 262 regex whitespace tests.

git-subtree-dir: json
git-subtree-split: fc05651cce3889975f8dbcca38c203d6a396694b
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.

2 participants