Error: unknown format "date-time" ignored in schema at path "#/properties/expires"
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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