Open
Description
Q&A (please complete the following information)
- OS: Windows 11
- Browser: Firefox
- Version: 137.0.2
- Method of installation: https://editor-next.swagger.io/
- Swagger-UI version: https://editor-next.swagger.io/
- Swagger/OpenAPI version: latest/openapi: 3.0.1
Content & configuration
Example Swagger/OpenAPI definition:
{
"openapi": "3.0.1",
"info": {
"title": "Mvc | v1",
"version": "1.0.0"
},
"servers": [
{
"url": "http://localhost:5125/"
}
],
"paths": {
"/WeatherForecast": {
"get": {
"tags": [
"WeatherForecast"
],
"operationId": "GetWeatherForecast",
"responses": {
"200": {
"description": "OK",
"content": {
"text/plain": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeatherForecast"
}
}
},
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeatherForecast"
}
}
},
"text/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WeatherForecast"
}
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"WeatherForecast": {
"type": "object",
"properties": {
"date": {
"type": "string",
"format": "date"
},
"time": {
"type": "string",
"format": "time"
},
"duration": {
"pattern": "^-?(\\d+\\.)?\\d{2}:\\d{2}:\\d{2}(\\.\\d{1,7})?$",
"type": "string"
}
}
}
}
},
"tags": [
{
"name": "WeatherForecast"
}
]
}
Describe the bug you're encountering
As you can see in the screenshot, Swagger UI is not producing an example for the time
property, which is a string
with format set to time
:
To reproduce...
Steps to reproduce the behavior:
- Go to https://editor-next.swagger.io/
- Import the OpenAPI specification above
- Check the Example Value
Expected behavior
The current time as the example value
Metadata
Metadata
Assignees
Labels
No labels