Giter VIP home page Giter VIP logo

Comments (11)

xiaoymin avatar xiaoymin commented on June 8, 2024

#751

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

这个ssues我已经试过了,不起作用 是去掉@ Data是吧?

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

這個issues和我的情况很像,但是没有生效, 如果不能用lombok那代码会很臃肿啊, 能给解释一下为什么吗? 之前的spring boot2和spring fox方式是可以显示的 @xiaoymin

from knife4j.

xiaoymin avatar xiaoymin commented on June 8, 2024

泛型类不能用@Schema注解标注

from knife4j.

xiaoymin avatar xiaoymin commented on June 8, 2024

https://doc.xiaominfo.com/docs/faq/swagger-des-not-found

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

泛型类如果不能用@Schema注解那就没有意义了, 泛型类是实体类或者是主要的VO类,就是这个泛型类要展示到文档上去,有没有解决方案? 之前的spring boot2和spring fox方式是可以显示的,上面的文档我已经看过没有相关使用spring boot3和spring doc的解决方案 @xiaoymin

from knife4j.

xiaoymin avatar xiaoymin commented on June 8, 2024

@Schema标注了就是代表唯一,这个本身和泛型类冲突。

你要改自定义,不用Schema注解,自己写个扩展注解,用springdoc的插件体系去重写更改解析规则即可

image

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

这个扩展有点成本,或者knife4j直接提供一个注解解决这个问题不就好了?而且这种泛型方式比较常用,我看issue里挺多的,knife4j最好能出个完整的解决方案,, 咱们提供的UI解决方案就比swagger官方强太多 @xiaoymin

from knife4j.

xiaoymin avatar xiaoymin commented on June 8, 2024

@DreamPWJ 欢迎PR

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

水平有限啊

from knife4j.

DreamPWJ avatar DreamPWJ commented on June 8, 2024

去掉泛型属性 @Schema注解解决

from knife4j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.