Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Allow support other formats on strings with a plugin #6131
Comments
|
@jclx The SwaggerUI Plugin API is available to the community for the reasons you cited. If you have a helpful plugin to share with the community, please feel free to create a PR. Thanks. |
Content & configuration
Swagger/OpenAPI definition:
{ "StartDate" : { "format" : "local-date-time", "type" : "string" } }Swagger-UI configuration options:
Is your feature request related to a problem?
Support for additional formats on strings other than those provide.
Describe the solution you'd like
Add support for a plugin to provide sample values for different formats other than default supplied.
In /swagger-ui/src/core/plugins/samples/fn.js , support for string_date-time is an example.
the format local-date-time is a custom format. Adding plugin could provide for other formats than the default provided. This could also support when an regexp is used for the format.
Describe alternatives you've considered
Additional context
Also having some context like name of field could allow different sample values.