【错误记录】swagger Unable to render this definition

Unable to render this definition

The provided definition does not specify a valid version field.

Please indicate a valid Swagger or OpenAPI version field. Supported version fields are swagger: "2.0" and those that match openapi: 3.0.n (for example, openapi: 3.0.0).

 

possible reason:

1, api the Controller / Action Join [HttpPost] or [HttpGet]

2, api in the Controller have private methods (all writes Service)

3, incoming parameters of the model in question.

Visit the link: http: // localhost: Document <port> /swagger/v1/swagger.json view the generated description endpoint are shown below json format, can troubleshoot some errors.

 If you see this text, indicating that you are using an RSS reader or switched from "a tree - blog Park", the original address: https://www.cnblogs.com/atree/p/error-swagger-definition.html 

Guess you like

Origin www.cnblogs.com/atree/p/error-swagger-definition.html