Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

format: date-time not honoured in inline schema handling #44

Open
ysangkok opened this issue Sep 18, 2024 · 0 comments
Open

format: date-time not honoured in inline schema handling #44

ysangkok opened this issue Sep 18, 2024 · 0 comments

Comments

@ysangkok
Copy link
Contributor

#43 adds an inline format: date-time which doesn't get turned into any date/time type in the code gen, instead it is a T.Text.

Other branches generate errors when they see inline schemas in unsupported locations. Should we generate an error when we see format: date-time, or should we just fix the functionality and make it work? One could argue that mkInlineStringSchema should always get enough information, and always be able to generate an appropriate date/time type. But then it would also need TypeOptions, to support the overriding we have for those.

mkInlineOneOfSchema [...] =
[...]
    Just OA.OpenApiString -> mkInlineStringSchema schemaKey schema              
[...]                  
    Just OA.OpenApiObject -> raiseError "Inline OpenApiObject schemas are not currently supported in oneOf."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant