Comments (5)
解决方案有二:
- 在
parseSwaggerMods
的时候将basePath
和path
进行拼接 - 在生成代码的时候将
basePath
和path
进行拼接
@jimliang @jasonHzq @gaoletian 大家觉得哪种方案更好?我个人倾向于方案二,理由是不改变元数据,而只改变消费数据的方式
from pont.
经确认,最终生成的api-lock
文件里面其实是有basePath
属性,只是数据结构里面没有类型描述,所以考虑先加一下basePath
的类型描述,在生成代码的时候再做拼接了。
from pont.
请问需要basePath做什么呢? 如果是接口 url 的拼接,完全可以写在业务方的公共请求方法内部。
from pont.
有需要的!!!现在requeset里只有paths的部分没有添加上basePath;我有十几个这种swagger,basePath不一样,ip端口一样,公共请求没法封装啊;
from pont.
有需要的!!!现在requeset里只有paths的部分没有添加上basePath;我有十几个这种swagger,basePath不一样,ip端口一样,公共请求没法封装啊;
我现在的做法是用projectAssess做datasource Name,重写getInterfaceContent方法取name转/project/assess + path;
勉强可以使用。。。。
from pont.
Related Issues (20)
- 不生成 pontCore.js HOT 2
- 请问有没有nodejs api使用文档? HOT 1
- swagger V2生成baseClass时,超过两层的对象属性未读取 HOT 2
- nestjs swagger3.0 mods为空 HOT 1
- vs-code插件没有自动启动mock服务 HOT 1
- Java后端入参类型是List<Object>,生成的代码入参是Object,不识别List格式 HOT 1
- 无法设置rootDir
- "spiltApiLock": true, 执行pont scan 报错 找不到api.lock.json HOT 1
- "parameters" 原有的parameters数据,被覆盖,导致数据丢失 HOT 1
- 如何给单独请求添加headers HOT 1
- 获远程接口数据失败 Error: compiler error in defname: HOT 1
- 群号是不加不上了啊33661609 HOT 1
- 配置跳过翻译流程 HOT 1
- 关闭生成mod跟pontCore的方法 HOT 4
- pont对swagger2生成的Form post表单参数的支持 HOT 1
- 处理循环嵌套类型 HOT 2
- 获远程接口数据失败 Error: compiler error in defname: ZDYTJSXQ配置-支持的查询字段,字段类型 HOT 1
- 获远程接口数据失败 Error: compiler error in defname: ZDYTJSXQ配置-支持的查询字段,字段类型
- pont不支持nestjs/swagger ApiTags,会导致api丢失 HOT 1
- 获远程接口数据失败 TypeError: Cannot destructure property 'items' of 'schema' as it is undefined
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 pont.