Coder Social home page Coder Social logo

Support basePath about pont HOT 5 CLOSED

alibaba avatar alibaba commented on May 6, 2024
Support basePath

from pont.

Comments (5)

loveholly avatar loveholly commented on May 6, 2024

解决方案有二:

  • parseSwaggerMods的时候将basePathpath进行拼接
  • 在生成代码的时候将basePathpath进行拼接

@jimliang @jasonHzq @gaoletian 大家觉得哪种方案更好?我个人倾向于方案二,理由是不改变元数据,而只改变消费数据的方式

from pont.

loveholly avatar loveholly commented on May 6, 2024

经确认,最终生成的api-lock文件里面其实是有basePath属性,只是数据结构里面没有类型描述,所以考虑先加一下basePath的类型描述,在生成代码的时候再做拼接了。

from pont.

jasonHzq avatar jasonHzq commented on May 6, 2024

请问需要basePath做什么呢? 如果是接口 url 的拼接,完全可以写在业务方的公共请求方法内部。

from pont.

xxbld avatar xxbld commented on May 6, 2024

有需要的!!!现在requeset里只有paths的部分没有添加上basePath;我有十几个这种swagger,basePath不一样,ip端口一样,公共请求没法封装啊;
image

from pont.

xxbld avatar xxbld commented on May 6, 2024

有需要的!!!现在requeset里只有paths的部分没有添加上basePath;我有十几个这种swagger,basePath不一样,ip端口一样,公共请求没法封装啊;
image

我现在的做法是用projectAssess做datasource Name,重写getInterfaceContent方法取name转/project/assess + path;
勉强可以使用。。。。

from pont.

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.