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

Fix: prevent warnings when importing decoder #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ricbir
Copy link

@ricbir ricbir commented Sep 21, 2021

Currently, importing a decoder with format enabled causes warnings such as:

  console.warn
    unknown format "date" ignored in schema at path "#/definitions/User/properties/createdAt"

      at console.<anonymous> (node_modules/jest-mock/build/index.js:845:25)
      at unknownFormat (node_modules/ajv/lib/vocabularies/format/format.ts:84:23)
      at validateFormat (node_modules/ajv/lib/vocabularies/format/format.ts:75:9)
      at Object.code (node_modules/ajv/lib/vocabularies/format/format.ts:40:10)

This PR fixes that by flipping the order of addFormats and ajv.compile

@inluxc
Copy link

inluxc commented Jul 28, 2022

Please i need this PR resolve :(

Got lot of warning about this.

@inluxc
Copy link

inluxc commented Aug 2, 2022

@ricbir, can you fix the conflicts please?

@ssbarnea
Copy link

ssbarnea commented Mar 1, 2023

With @ricbir not responding, it might be wise to make another PR and get this annoying warning addressed.

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.

3 participants