OpenAPI.NET icon indicating copy to clipboard operation
OpenAPI.NET copied to clipboard

Quoted string parsed as number when in array example

Open vfedonkin opened this issue 7 years ago • 1 comments

Data and type mismatch found. [#/paths/~1test/get/responses/200/content/application~1json/schema/example/0/notes] Only happens when "type: array" used.

Works well when - notes: '12345' replaced to - notes: 'x12345'

Schema:

openapi: 3.0.0 info: title: This is a simple example version: 1.0.0 paths: /test: get: summary: Test. responses: '200': description: Successful operation content: application/json: schema: type: array items: $ref: '#/components/schemas/testbody' example: - notes: '12345' components: schemas: testbody: type: object properties: notes: type: string description: string

vfedonkin avatar Oct 10 '19 22:10 vfedonkin

Fixed by @VitaliyKurokhtin , expected to be published in new nuget version

vfedonkin avatar Jan 08 '20 20:01 vfedonkin