Vincit / Vincit/objection.js

Error: unknown format "date-time" ignored in schema at path "#/properties/expires"

Open
#2,249 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
7.3k
Forks
637
PR merge metrics
No merged PRs in 30d

Description

date-time format is not working correctly in Objection 3.
I'm working in a new project using a model structure I'm used to and can be found in this repo:
https://github.com/RodrigoNovais/rocketseat-nlw-3

The problematic model is Tokens, a use case can be found here.

This syntax used to work in Objection 2.
Using Objection 3, attempting to insert a new token gives me this error:
Error: unknown format "date-time" ignored in schema at path "#/properties/expires"

My use case in the new project is pretty much the same.
I'm not sure if this error only relates to the specific 'date-time' format or if it expands for other strings formats.

If there's anything I can change in my code or even in the dependences by my own in order for it to work again it would be enough for me.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the insert described in the Tokens model and recover.password.controller.ts from the linked project, then inspect how Objection 3 handles the schema's date-time format. Compare the behavior with Objection 2 and confirm that inserting a token no longer reports the unknown-format error while preserving the intended date-time validation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.