xiaoymin / blog-comments

blog-comments
0 stars 0 forks source link

knife4j #146

Open xiaoymin opened 5 years ago

xiaoymin commented 5 years ago

https://doc.xiaominfo.com/faq/

knife4j 指南

lxyer commented 4 years ago

springboot 单项目,调试接口时返回数据(json格式)在swagger上没有显示

Li-Stone commented 4 years ago

个性化设置点击保存后不起作用

langmanyinghua commented 4 years ago

http://${host}:${port}/doc.html 默认访问路径可以修改吗

819536266 commented 4 years ago

方法参数加@NotBlank或者@NotNull一类的注解,文档会显示是为body类型,希望作者能解决

lipeng1802 commented 4 years ago

knife4j -- 忽略参数属性,无效问题

版本号:

io.springfox springfox-swagger2 2.9.2
    <dependency>
        <groupId>com.github.xiaoymin</groupId>
        <artifactId>knife4j-spring-boot-starter</artifactId>
        <version>${swagger-knife4j}</version>
    </dependency>

controller: @ApiOperationSupport(ignoreParameters = {"sysRole.id","sysRole.createUser","sysRole.createTime","sysRole.modifyUser","sysRole.modifyTime","sysRole.delFlag"}) public Result save(@RequestBody SysRole sysRole) {


生成后没有效果, 一级参数,没有问题

lipeng1802 commented 4 years ago

自行排查,knife4j-spring-boot-starter 版本为1.9.6时没有问题 官方demo运行在2.0.1下也是不起作用的,等待作者恢复

s3863 commented 4 years ago

您好,目前“下载word、下载PDF”还不能正常使用下载,大概什么时候会更新版本可以下载?感谢

xiaoymin commented 4 years ago

您好,目前“下载word、下载PDF”还不能正常使用下载,大概什么时候会更新版本可以下载?感谢

可以下载一个Markdown软件Typora,支持将MD文件导出为PDF或者word

819536266 commented 4 years ago

好的,感谢 ------------------ 原始邮件 ------------------ 发件人: "xiaoymin"<notifications@github.com>; 发送时间: 2020年3月9日(星期一) 下午2:57 收件人: "xiaoymin/blog-comments"<blog-comments@noreply.github.com>; 抄送: "819536266"<819536266@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [xiaoymin/blog-comments] knife4j (#146)

您好,目前“下载word、下载PDF”还不能正常使用下载,大概什么时候会更新版本可以下载?感谢

可以下载一个Markdown软件Typora,支持将MD文件导出为PDF或者word

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

yangzan0816 commented 4 years ago

请问现在不支持webflux的接口访问吗

ReveeWu commented 4 years ago

请问可以支持文档搜索吗

littleantfly commented 4 years ago

接口返回文件时,显示乱码这个能解决下不

chenchenggen007 commented 4 years ago

Greenwich.SR2 版本 启用Knife4j提供的增强功能 导致 host和basePath 数据缺失

yongjiang-jy commented 4 years ago

调试下载功能接口,响应乱码这个问题能解决吗

suifengJC614 commented 4 years ago

allowMultiple swagger 注解中 这个属性好像你这里不支持

literatureandyou commented 4 years ago

在docker环境中。springcloud聚合knife4j报错,开发环境正常:有哪位大神遇到过,求解,求解,求解,求解,求解,求解,求解,求解······ error: "Internal Server Error" message: "Request processing failed; nested exception is java.lang.IllegalArgumentException: Version must not be null o empty!" path: "/v2/api-docs" status: 500 timestamp: 1595319635539

literatureandyou commented 4 years ago

请求地址:http://xxx.xxx.xx.xx:1234/organization/v2/api-docs

HackenPai commented 4 years ago

knife4j 2.0.4版本使用是EnableSwagger2注解没有了,看springfox引用的版本为2.10.5,去github上看原来得知EnableSwagger2被移除了,在3.0.0版本中又恢复该注解,请问楼主提供的knife4j是不是需要升级对应的依赖?

shuaizinanyihao commented 4 years ago

gateway方式如何增加权限控制呢?我加了配置不管用啊

literatureandyou commented 4 years ago

knife4j安全配置

knife4j: production: false #false代表当前环境文档可用,true代表当前环境文档不可用 basic: enable: false #false代表当前环境文档不受账号密码限制,true代表当前环境文档查看需要账号密码登录 username: 123456 password: 123456 与下游服务保持一致

shuaizinanyihao commented 4 years ago

下游服务的每个微服务都需要配置吗? 不能直接在gateway服务统一配置吗?

literatureandyou commented 4 years ago

下游需要配置,gateway只负责聚合和分发请求

------------------ 原始邮件 ------------------ 发件人: "xiaoymin/blog-comments" <notifications@github.com>; 发送时间: 2020年8月19日(星期三) 下午2:43 收件人: "xiaoymin/blog-comments"<blog-comments@noreply.github.com>; 抄送: "黄文学"<895367830@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [xiaoymin/blog-comments] knife4j (#146)

下游服务的每个微服务都需要配置吗? 不能直接在gateway服务统一配置吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

shuaizinanyihao commented 4 years ago

好的谢谢,还有一个问题: 如果用户开启了basic认证功能,但是并未配置用户名及密码,SwaggerBootstrapUi提供了默认的用户名和密码; 我试了一下不好使,登录不成功。只有自己自定义的账号密码才关于,默认的不行

literatureandyou commented 4 years ago

配置自己的    相信自己验证了的结果

------------------ 原始邮件 ------------------ 发件人: "xiaoymin/blog-comments" <notifications@github.com>; 发送时间: 2020年8月19日(星期三) 下午2:52 收件人: "xiaoymin/blog-comments"<blog-comments@noreply.github.com>; 抄送: "黄文学"<895367830@qq.com>;"Comment"<comment@noreply.github.com>; 主题: Re: [xiaoymin/blog-comments] knife4j (#146)

好的谢谢,还有一个问题: 如果用户开启了basic认证功能,但是并未配置用户名及密码,SwaggerBootstrapUi提供了默认的用户名和密码; 我试了一下不好使,登录不成功。只有自己自定义的账号密码才关于,默认的不行

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

shuaizinanyihao commented 4 years ago

没看懂您说的啥意思。

Graydonyu commented 4 years ago

配置没问题但是其中一个controller进不去,点击就是一片空白。后来找到原因了,api注解里的tags不能有斜杠。

langmanyinghua commented 4 years ago

导出 word 和 pdf 的功能有安排上吗

langmanyinghua commented 4 years ago

提一个需求,第二个接口的参数为第一个接口返回的数据,不然token 每次都需要输入代麻烦了

takeMeFlyToAir commented 3 years ago

/v2/api-docs接口有数据返回,但是页面没有渲染出接口,请问是什么问题

leqixiaozi commented 3 years ago

支持swagger3吗?后续会支持吗

lzl-anonym commented 3 years ago

接口能直接导入postman么