Non IS0-8601 compliant date time format #4118
-
HI all, I have a question regarding using Kiota on an OpenAPI specification that has the following excerpt:
Since the date time format is not ISO-8601 compliant, Kiota creates a
It is a 3rd party API and unfortunately I can't change anything on the specification part, but I'm wondering if I can do something on my end to enforce a Thank you for the help. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Hi @bmarkovic17
We've been talking about adding support for OpenAPI overlays lately to support those kind of scenarios, let us know if this is something you'd be interested in. |
Beta Was this translation helpful? Give feedback.
-
Thank you @baywet for the quick reply. Yeah, I currently have a local copy that I altered to have a DateTimeOffset property, but that isn't ideal in the long term as the description will have changes, so I'm gonna suggest the publisher to move it to the pattern field as you suggested. In case that fails, I'd be interested in OpenAPI overlays, can you tell me a bit more how would they work? |
Beta Was this translation helpful? Give feedback.
-
Yes you're correct I thought exactly as you and It worked, but I have to
parse the string later.
…On Sun, 11 Feb 2024 at 06:25, Boris Marković ***@***.***> wrote:
I'm guessing that the issue here is that a property is marked with a
date-time format but the actual value that is coming in, isn't formated
as such.
You can make the property a string and then manually parse it or maybe
implement a custom serializer/deserializer that will know how to transform
these properties to DateTimeOffset.
If I'm wrong please provide more details on what is happening and I can
take a look.
—
Reply to this email directly, view it on GitHub
<#4118 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEBESU5X2PSDROCB6NXPTPDYTBI3VAVCNFSM6AAAAABCWWWSCSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DIMZRGA3DI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Hi @bmarkovic17
Thanks for using kiota and for reaching out.
For your information, here is the format registry for OAS
You can:
We've been talking about adding support for OpenAPI overlays lately to support those kind of scenarios, let us know if this is something you'd be interested in.