GithubHelp home page GithubHelp logo

Comments (3)

dongxuny avatar dongxuny commented on May 16, 2024

@careyyoung Hi, I will look at this problem~

from rk-boot.

dongxuny avatar dongxuny commented on May 16, 2024

@careyyoung rk-boot 默认会从 api/gen/v1 和 docs/ 文件夹搜寻 swagger config 配置文件。在这个 Case 当中,Gin swagger UI 没有成功加载 Swagger Config 文件,可能是因为 swagger config 文件路径没找到,或者它从 proto 文件生成的时候,出现了一些兼容性问题(不过这种情况几乎不会出现)。

此外,TLS 错误这个问题,应该不是 rk-boot 的配置问题,因为你的 boot.yaml 里没有涉及到 TLS 相关配置。

我的猜想,应该是 swagger config 文件没有成功加载正确的配置文件。

我这里创建了一个例子,同时启动 Gin & gRPC,可以参考一下。
https://github.com/rookie-ninja/rk-demo/tree/master/grpc/v2/multiple-entry

另外,可以尝试一下在 boot.yaml 中,通过 sw.jsonPath 来指定 Swagger Config 文件所在的文件夹,来 Debug 是否依然不能成功加载。

举例:

grpc:
  - name: grpc-api
    enabled: true
    port: 8080
    enableReflection: true
    sw:
      enabled: true
      # define swagger config file path if we hope to use different one
      # jsonPath: ""
gin:
  - name: rest-api
    port: 8081
    enabled: true
    sw:
      enabled: true
      # define swagger config file path if we hope to use different one
      # jsonPath: ""

from rk-boot.

dongxuny avatar dongxuny commented on May 16, 2024

@careyyoung Hi,上面的问题解决了吗?如果没有解决,请继续留下错误码和相关信息。

from rk-boot.

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.