Skip to content
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

URI format doesn't work with newer ajv lib #28

Open
andorsk opened this issue Jan 12, 2023 · 3 comments
Open

URI format doesn't work with newer ajv lib #28

andorsk opened this issue Jan 12, 2023 · 3 comments
Assignees
Labels
editorial Editorial, examples, or implementation notes; not substantive change to the spec v1
Milestone

Comments

@andorsk
Copy link
Collaborator

andorsk commented Jan 12, 2023

Expected: upgrade libs and all tests pass
Actual: Entity schema tests fails with URI format. AJV was anchored on the test suite at 6.12.5. Upgrade breaks the test.

Valid Entity Schema Test:
     Error: unknown format "uri" ignored in schema at path "#/definitions/image/properties/uri"

Recent AJV lib 8.12.0 does not permit uri as schema format, and test will fail.

-    "ajv": "^8.12.0",
+    "ajv": "^6.12.5",

Suggested fixes:

  • Reformat format path as regex, so preformat rules aren't a problem.
  • Possibly an issue with ajv implementation. Might have updated to need to use https://github.com/ajv-validator/ajv-formats
  • Check if JSONSchema spec actually updated directly, such that it doesn't support uri format anymore.
@andorsk andorsk changed the title URI format doesn't work with newer ajv. URI format doesn't work with newer ajv lib Jan 12, 2023
@bumblefudge
Copy link

just need to be explicit about which JSON Schema drafts work with v1 when we publish v1

@bumblefudge bumblefudge added editorial Editorial, examples, or implementation notes; not substantive change to the spec v1 labels Jan 12, 2023
@bumblefudge bumblefudge self-assigned this Jan 12, 2023
@andorsk
Copy link
Collaborator Author

andorsk commented Jan 12, 2023

yea..the weird thing about this to be clear: It's the same schema. Just a different version of the lib processing this. 🤷

@brentzundel
Copy link
Member

editorial changes in v1 (unless we get the actual fix in place)
actual fix in v2

@brentzundel brentzundel added this to the v1 milestone Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editorial Editorial, examples, or implementation notes; not substantive change to the spec v1
Projects
None yet
Development

No branches or pull requests

3 participants