Skip to content

with v3: error unknown format "date-time" #2146

@alqu

Description

@alqu

I updated objection in my project from v2.2.18 to v3.0.0 and suddenly my models are kind of invalid:
image
and there is an error at passwordUpdatedAt-field, which has the "date-time"-Format:

error: Error in request unknown format "date-time" ignored in schema at path "#/properties/passwordUpdatedAt"
    at unknownFormat (.../node_modules/ajv/lib/vocabularies/format/format.ts:87:15)
    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)
    at keywordCode (.../node_modules/ajv/lib/compile/validate/index.ts:523:9)
    at .../node_modules/ajv/lib/compile/validate/index.ts:265:9
    at CodeGen.code (.../node_modules/ajv/lib/compile/codegen/index.ts:525:33)
    at CodeGen.block (.../node_modules/ajv/lib/compile/codegen/index.ts:680:20)
    at iterateKeywords (.../node_modules/ajv/lib/compile/validate/index.ts:262:7)
    at groupKeywords (.../node_modules/ajv/lib/compile/validate/index.ts:241:7)
    at .../node_modules/ajv/lib/compile/validate/index.ts:233:38

I am running a koaJS-app on node v14.18.1. with knex v0.95.14.

Regarding the upgrade instructions at https://vincit.github.io/objection.js/release-notes/migration.html everything should work out of the box - no problems there.

The model was working perfectly in v2.x.
Do you have any clue, what am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions