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

string with format: date not working #260

Open
mnj93 opened this issue Apr 24, 2020 · 2 comments
Open

string with format: date not working #260

mnj93 opened this issue Apr 24, 2020 · 2 comments

Comments

@mnj93
Copy link

mnj93 commented Apr 24, 2020

Hi,

I'm trying to validate requests using request validation middleware. In one of my API, I'm using following rule for one of my query params in API.

{
            "name" : "from_date",
            "in" : "query",
            "schema" : {
              "type" : "string",
              "format" : "date",
              "example" : "2017-09-24"
            }
 }

As per, this rule request should fail if passed value is not a valid date but it's not failing if I pass from_date=abc.

If I update format to date-time and then if I pass from_date=abc then it's giving me error as expected.

Request should fail if format is date and I pass from_date=abc.

@boiiiboi
Copy link

boiiiboi commented Jun 5, 2022

Has there been any progress?

@uplus
Copy link
Contributor

uplus commented Jun 6, 2022

This problem may be fixed by this PR (ota42y/openapi_parser#130)

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

No branches or pull requests

4 participants