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).
MVC和Gson一起就会有这个错,具体不清楚,把maven的gson依赖去掉可以简单粗暴解决。
或者参考
Gson与SpringMVC一起使用