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).

可能的原因:

1、api中的Controller/Action 请加入[HttpPost]或者 [HTTPGet]

2、api中的Controller中有私有方法(全部写道Service)

3、传入参数模型有问题.

访问链接:http://localhost:<port>/swagger/v1/swagger.json 查看生成的描述终结点的文档显示如下json格式,可排查部分错误。

如果你看到这段文字,说明您正使用RSS阅读或转自《一棵树-博客园》,原文地址:https://www.cnblogs.com/atree/p/error-swagger-definition.html 

swagger Unable to render this definition的更多相关文章

  1. swagger Failed to load Api definition 的问题

    这个问题是由于Tomcat乱码问题导致的,修改server.xml文件的编码格式修改成UTF-8

  2. swagger生成错误问题 汇总解决

    Unable to render this definition The provided definition does not specify a valid version field. Ple ...

  3. Class loading in JBoss AS 7--官方文档

    Class loading in AS7 is considerably different to previous versions of JBoss AS. Class loading is ba ...

  4. swagger-editor

    前言 上一篇文章我们有提到Swagger做接口的定义是采用yaml语言的,当然,yaml是个啥,大家自行百度.阿福在此不做赘述了.但是,今天我们要来讲的是yaml支持比较好的Swagger-Edito ...

  5. 关于ArcGIS API for JavaScript中basemap的总结介绍(一)

    实际上basemap这个概念并不只在arcgis中才有,在Python中有一个matplotlib basemap toolkit(https://pypi.python.org/pypi/basem ...

  6. Codeforces Round #339 (Div.2)

    A. Link/Cut Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard in ...

  7. Codeforces Round #339 (Div. 2) A. Link/Cut Tree 水题

    A. Link/Cut Tree 题目连接: http://www.codeforces.com/contest/614/problem/A Description Programmer Rostis ...

  8. Introducing the Blog Module

    Introducing the Blog Module Now that we know about the basics of the zend-mvc skeleton application, ...

  9. 常见的HTTPS攻击方法

    0x00 背景 研究常见的https攻击方法 Beast crime breach,并针对https的特性提出一些安全部署https的建议. 针对于HTTPS的攻击,多存在于中间人攻击的环境中,主要是 ...

随机推荐

  1. virtualbox 配置记录

    virtualbox 网络模式 Host-only Internal Bridged NAT 之间的区别 host-only模式,host与vm一起在内部网络 Internal模式,仅vm在内部网络 ...

  2. yii2.0的学习之旅(二)

    前言:上一次我们简单认识了一下yii2.0安装,模型基本(增,删,改,查)操作 一.前后台数据交互 *如果你觉得默认的top样式太丑,可以这样关掉* *底部也可以这样关掉* (1)mvc合作操作数据 ...

  3. SpringBoot与Swagger整合

    1 SpringBoot与Swagger整合https://blog.csdn.net/jamieblue1/article/details/99847744 2 Swagger详解(SpringBo ...

  4. VS工具箱不显示DEV控件解决方法

    VS工具箱中不显示DEV控件解决方法 之前先装vs,再装dev控件,vs工具栏中自动会加载并显示dev相关组件,但是,在更新vs(我用2017版)后,原先安装好的dev控件库不显示在vs的工具栏中了. ...

  5. JS初始

      简单只和复杂值的区别 1.简单值 简单值表示JS中可用的数据或信息的最底层简单形式. 注:简单之不可被细化. 也就是说,数字是数字,字符是字符,布尔值是true或false,null和undefi ...

  6. if,for,异常,random模块,计算圆周率

    一.分支结构 单分支结构 if 一般用于判断选择 score = 95 if score > 90: print('优秀') 双分支结构 if...else age = 20 if age &g ...

  7. 函数arguments讲解

         // 总结:1- 函数内部有一个实参 arguments 可以获取所有的实参.      //2- arguments是一个伪数组,如果要使用数组的方法, 将它转为真数组      // 3 ...

  8. E09【餐厅】Can I have the bill,please?

    核心句型: Can I have the bill ,please? 请给我账单,好吗? 场景对话: A:Excuse me. Can I have the bill ,please? 你好,请给我账 ...

  9. 201871010126 王亚涛 《面向对象程序设计(Java)》第八周实验总结

    项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.com/nwnu-daizh/p ...

  10. 201871010107-公海瑜《面向对象程序设计(java)》第6-7周学习总结

    201871010107-公海瑜<面向对象程序设计(java)>第6-7周学习总结                项目                                内容 ...