Comments (3)
@careyyoung Hi, I will look at this problem~
from rk-boot.
@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.
@careyyoung Hi,上面的问题解决了吗?如果没有解决,请继续留下错误码和相关信息。
from rk-boot.
Related Issues (20)
- New API error format requested
- grpc的sw中的自定义headers没有效果 HOT 2
- connect mongodb cluster error, can you provide a case? Thank you. HOT 3
- how can I find the jwt endpoints? HOT 3
- HTTP Access logs HOT 1
- 如何自訂支援如asynq gRPC: 实现分布式日志跟踪? HOT 30
- Cannot override boot config values using environment variables HOT 3
- Is there anyway to configure the default event log at stdout when starting app? HOT 5
- 微信群二维码过期了 HOT 2
- Swagger/Docs Panic: no / before catch-all in path '\/sw\*any' HOT 7
- NewBoot should find boot.yaml in default project dir when called via Go Unit Test HOT 2
- Any plan to support orm `xorm`? HOT 1
- Unable to use Postgres DB in gRPC gateway endpoint HOT 1
- support rk-boot reload config on sighup or watch config HOT 1
- Does rk-boot provides integration with cobra CLI creating tool HOT 1
- Wechat group QRCode is expired
- http://localhost:8080/sw/ render failed HOT 1
- Any plan to support entgo HOT 1
- Enable Grafana Loki writer syncer in rk-boot family which will send logs to Loki directly. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rk-boot.