-
Notifications
You must be signed in to change notification settings - Fork 890
Closed
Description
I'm using the Ruby JSON Schema Validator (https://github.com/ruby-json-schema/json-schema) and an accompanying matcher to match API responses to JSON schema definitions.
When I match against the JSONAPI schema found at http://jsonapi.org/schema I get the following error:
Failure/Error: response.body.should match_json_schema('json-api')
RegexpError:
empty range in char class: /^(?!relationships$|links$)\w[\w-_]*$/
The [\w-_]
char class seems to be a problem.
See also: http://stackoverflow.com/questions/13161903/regular-expression-empty-range-in-char-class-error
The solution is to move the dash to the front of the char class like so: [-\w_]
. I'll supply a PR shortly.
Metadata
Metadata
Assignees
Labels
No labels