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. 【MySQL】完整性约束条件与设计范式

    完整性约束条件 概念: 对表中的数据进行限定,保证数据的正确性.有效性和完整性. 分类: 主键约束:primary key 非空约束:not null 唯一约束:unique 外键约束:foreign ...

  2. 算法初步---基本的数据结构(java为例)

    最近搞算法,觉得超级吃力的,一直以为数学好的,数学可以考试满分,算法一定没什么问题,贱贱地,我发现我自己想多了,还是自己的基础薄弱吧,今天我来补补最基础的知识. 算法(Algorithm)是指解题方案 ...

  3. Could not find resource——mybatis 找不到映射器xml文件

    今天用IDEA写Mybatis的时候,测试报了如图所示的错,恶心死我了,后来解决了,总结一下,防止下回跳坑,当然,也是做一个分享,如果有朋友遇到这个错,希望有所帮助 Error parsing SQL ...

  4. NumPy 文件数据读写

    写数据 NumPy 数组可以使用 np.save 方法保存到本地磁盘中,默认扩展名是 .npy,并且是未压缩的二进制格式. import numpy as np a = np.array([[0, 1 ...

  5. flask-script、flask-admin组件

    目录 flask-script 安装 使用 自定制命令 flask-admin 安装 简单使用 将表模型注册到admin中 如果有个字段是图片字段 flask-script 用于实现类似于django ...

  6. java9模块不可见问题

    问题描述 jdk.internal.reflect包不可见 问题原因 java9模块化之后,java.base只把jdk.internal.reflect暴露给了少数几个内部包而没有向当前模块暴露. ...

  7. 【微信小程序】动态设置图片大小

    我们都知道微信小程序的组件image是用来显示图片的,它有一下几个属性:1.src              图片资源地址2.mode          图片裁剪.缩放的模式3.binderror   ...

  8. 深入浅出讲解低功耗蓝牙(BLE)协议栈

    详解BLE连接建立过程https://www.cnblogs.com/iini/p/8972635.html 详解BLE 空中包格式—兼BLE Link layer协议解析https://www.cn ...

  9. AutoresizingMask 的使用

    (1)先了解一下这几个枚举值的含义: (2)代码演说: 在viewcontroller 用代码创建一个红色的view,如下: UIView *redView = [[UIView alloc] ini ...

  10. shell 大小关系 -eq -ne

    -eq:等于-ne:不等于-le:小于等于-ge:大于等于-lt:小于-gt:大于