We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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" } ] }
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:
time
string
Steps to reproduce the behavior:
The current time as the example value
The text was updated successfully, but these errors were encountered:
fix(json-schema-5-samples): fix example for time string (swagger-api#…
d79a67c
…10420)
53b17ca
On second thought the https://spec.openapis.org/oas/v3.0.4.html#data-type-format doesn't mention time, is this why this format is not supported?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Q&A (please complete the following information)
Content & configuration
Example Swagger/OpenAPI definition:
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 astring
with format set totime
:To reproduce...
Steps to reproduce the behavior:
Expected behavior
The current time as the example value
The text was updated successfully, but these errors were encountered: