Swagger UI does not show request parameter's validation information. I want to show parameter's min value, max value, format, pattern(regex). Does anyone know the way how I express the parameter's validation information on Swagger UI?
相关问题
- Design RESTful service with multiple ids
- How to refer to an external JSON file containing r
- Axios OPTIONS instead of POST Request. Express Res
- Plain (non-HTML) error pages in REST api
- Laravel 5.1 MethodNotAllowedHttpException on store
相关文章
- 我用scrapy写了一个蛮简单的爬虫怎么封装成一个api啊
- 后端给前端的API接口是怎么用代码写的
- swagger3.0,版本的接口都没有了
- Convert C# Object to Json Object
- Android camera2 API get focus distance in AF mode
- Got ActiveRecord::AssociationTypeMismatch on model
- Multiple parameters in AngularJS $resource GET
- Global Exception Handling in Jersey & Spring?
By using openapi 3.0.0 I got a UI with validation information like that displayed in http://editor.swagger.io/. Conversion from openapi 2 to openapi 3 could be done at the following URL. https://mermade.org.uk/openapi-converter
Assuming you use Swagger UI 3.x (the latest version), add
showCommonExtensions: true
to the Swagger UI initialization code in yourindex.html
file:Learn more about Swagger UI configuration parameters.