Skip to content

3.1.0 Release fails to validate strings via regex #612

@amisevsk

Description

@amisevsk

A CI build of ours pulled the new release (3.1.0) and all validation is failing with messages like

u'go' does not match u'^[^\\s]+$'

Building with <3.1.0 does not have this issue.

Reproducer:

test.json:

{
  "test": "testString"
}

schema.json;

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Reproducer",
  "type": "object",
  "properties": {
    "test": {
      "type": "string",
      "pattern": "^[^\\s]+$"
    }
  }
}

dockerfile (or just install 3.1.0 locally)

FROM alpine:3.10
RUN apk add --no-cache py-pip jq && pip install jsonschema

COPY . /build
RUN jsonschema --version
RUN jsonschema /build/schema.json -i /build/test.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething doesn't work the way it should.Needs Test UpstreamIssues that need to have a test added to https://github.com/json-schema-org/JSON-Schema-Test-Suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions