You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
My examples are being converted to integers although they should be strings (ex: phone numbers).
This causes problem when validating my openapi file, as the parameter is set as "string" but has a number as example.
To Reproduce
Given this OpenAPI document
openapi: 3.0.0
info:
title: My title
version: 1.0.0
paths:
/my/route:
post:
summary: My route
requestBody:
content:
application/json:
schema:
type: object
properties:
phone:
type: string
example: "0612345678"
required: true
responses:
'204':
description: No Content
'400':
description: Bad Request
I execute the combine command
I get the following document (Notice the number example)
openapi: 3.0.0
info:
title: My title
version: 1.0.0
paths:
/my/route:
post:
summary: My route
requestBody:
content:
application/json:
schema:
type: object
properties:
phone:
type: string
example: 0612345678
required: true
responses:
'204':
description: No Content
'400':
description: Bad Request
Expected behavior
I expected my example to stay as a string.
The text was updated successfully, but these errors were encountered:
Describe the bug
My examples are being converted to integers although they should be strings (ex: phone numbers).
This causes problem when validating my openapi file, as the parameter is set as "string" but has a number as example.
To Reproduce
Expected behavior
I expected my example to stay as a string.
The text was updated successfully, but these errors were encountered: