-
Notifications
You must be signed in to change notification settings - Fork 278
Open
Description
Describe the bug
Framework is failing to parse the document with scientific notation values for integers properties with message like Failed to parse input: The input string '1.1e3' was not in a correct format..
I identified following list of properties which show that issue. This list is definitely not exhaustive.
- maxItems
- minItems
- maxProperties
- minProperties
- maxLength
- minLength
OpenApi File To Reproduce
swagger: '2.0'
info:
version: 1.0.0
title: Swagger Petstore
host: petstore.swagger.io
produces:
- application/json
schemes:
- https
paths:
/pets:
get:
responses:
'200':
description: Should parse properties with e format
schema:
type: object
properties:
items:
type: array
maxItems: 1.1e3
minItems: 1.2e1
items:
type: string
props:
type: object
maxProperties: 1.3e2
minProperties: 1.4e1
additionalProperties: true
length:
type: string
maxLength: 1.5e2
minLength: 1.6e1
Expected behaviour
Parse should succeed for all the values which are positive integers.
Example of correct values: 1e0, 1.1e1, 1.01e2, 10e-1
Example of incorrect values: 1e-1, 0.1e0, 1.01e1
Additional context
I was checking in the https://editor.swagger.io/ and parsing is successful for integers in scientific notation. For a fraction number in scientific notation the editor is failing to parse the document.
Metadata
Metadata
Assignees
Labels
No labels
