xiaoymin / knife4j

Knife4j is a set of Swagger2 and OpenAPI3 All-in-one enhancement solution
https://doc.xiaominfo.com
Apache License 2.0
4.09k stars 615 forks source link

当使用注解时出现未知的描述 #783

Open liusuyi2021 opened 5 months ago

liusuyi2021 commented 5 months ago

Describe the bug A clear and concise description of what the bug is. image image 红框中的描述哪来的?是不是bug To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Knife4j Version (please complete the following information): 4.4.0 Additional context Add any other context about the problem here.

xiaoymin commented 5 months ago

这个应该你自己查查原因

liusuyi2021 commented 5 months ago

这个应该你自己查查原因

这个我自己咋查啊 描述是knife4j获取的,到底是怎么获取的我也不清楚,能否指导一下?

liusuyi2021 commented 5 months ago

这个应该你自己查查原因

com.github.xiaoymin knife4j-openapi2-spring-boot-starter 4.4.0 我使用这个就出现上述问题 但是当我切换成 com.github.xiaoymin knife4j-spring-boot-starter 3.0.3 就没有问题
xiaoymin commented 5 months ago

@liusuyi2021 Knife4j界面上不会无缘无故加东西的,这个如果你是依赖的openapi2的规范

你看看springfox在生成openapi2规范的时候,是否出现了兼容性的问题,他在生成规范的时候,加了不必要的内容

界面层可以通过F12看/v2/api-docs接口的内容,knife4j是根据这个来渲染的