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

Empty String for Date #764

Open
oleg-andreyev opened this issue Oct 12, 2023 · 0 comments
Open

Empty String for Date #764

oleg-andreyev opened this issue Oct 12, 2023 · 0 comments
Labels

Comments

@oleg-andreyev
Copy link
Contributor

Jane version(s) affected: 7.5.4

Description

Based on openapi documentation https://swagger.io/docs/specification/data-models/data-types/#string

Note that an empty string "" is a valid string unless minLength or pattern is specified.

but generated Normalizer does not respect it.
Normalizer just validate that key exists, but does not validate empty, pattern or minLength

How to reproduce

                    "estimated_collection_date" : {
                      "type" : "string",
                      "format" : "date",
                      "pattern" : "yyyy-mm-dd",
                      "description" : "Date of collection for shipment"
                    },
                    "estimated_delivery_date" : {
                      "type" : "string",
                      "format" : "date",
                      "pattern" : "yyyy-mm-dd",
                      "description" : "Date of delivery for shipment, if present"
                    },

and JSON response with estimated_collection_date or estimated_delivery_date as empty string

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant