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

When processing primitive types look for the 'format' field and if can add getters/setters that enforce this/use appropriate php types #2

Open
SDParish opened this issue Nov 6, 2020 · 0 comments

Comments

@SDParish
Copy link

SDParish commented Nov 6, 2020

See https://swagger.io/specification/v2/#data-types for information on the format field.
Note that format is both optional, and can be any string, so if not found or recognised, will need to gracefully ignore.

Specifically, where format is date/date-time the model could enforce that set strings are in the required format, and could also allow setting from a DateTimeInterface, or allow getting as a DateTimeImmutable or DateTime.

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