swagger-parser icon indicating copy to clipboard operation
swagger-parser copied to clipboard

Parsing error with date default

Open SCSreekanth opened this issue 3 years ago • 2 comments

Hi team,

Please find the attached yml file contents. The Swagger editor validates this yml file to indicate no errors; however, I get the following error when I use the parser to parse this file's contents. Failed. Reason: [attribute paths.'/test/{id}'(get).parameters.[id].schemas.default=2012-12-11T18:30:00.000+0000 is not of type date]

openapi: 3.0.1
info:
  title: hello
  version: "1.0"
servers:
- url: http://abc.com
paths:
  /test/{id}:
    get:
      operationId: get
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: date
            default: "2012-12-12"
      responses:
        200:
          description: OK

I have tried this with swagger-parser-v3-2.0.24. Please let me know if it has already been fixed.

Thanks, Sree

SCSreekanth avatar Jul 19 '21 09:07 SCSreekanth

Hi Team, Any update on this? Regards, Sree

SCSreekanth avatar Nov 17 '21 08:11 SCSreekanth

Any update?

SCSreekanth avatar Jan 05 '22 07:01 SCSreekanth