Migrating to 1.0, running into some Date related issues #1453
Unanswered
justinkwaugh
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Well I figured out the first issue which was that I needed to implement Convert in my Base extension. Still not sure about the second |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here are my goals (and which I believe are working in .34):
In .34 I have a type defined as such:
I have a
toAPISchemamethod that does this:It's used to help generate a schema for Fastify like so:
Alternately I have done the following to define the request schema for other requests where I just want to pass a date as string:
When handling a request the first way I do this:
When handling a request the second way I do this:
And all is well, as far as I can tell.
I am trying to migrate to 1.0 and I see that
Type.Date()was removed, so I added the fallback as described in the migration guide, but now using the first methodValue.Convertdoes not actually convert the dates. Furthermore, I cannot seem to use the second way I described either, as if I replace[Kind]with['~kind']I get an error.So I am wondering what would be the right way to achieve my goals using 1.0?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions