Hi Willem,
I mean OpenAPI yaml written by hand. And yes, we need to  track all
the change by means of git.
And large Swagger often needs to be maintained by several people, and
that's the conflict happens.
OpenAPI v3 provide Components[1] to reuse Schema, Response, Request,
etc. But that's no enough if we have a lot of Paths and Operations.
OpenAPI v3 also provide Reference Object[2], but it's like the
Components and has the same problem.
For example, AliPay API[3]. Another example, K8S API[4]. They are all huge API.

[1]: 
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#components-object
[2]: 
https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#referenceObject
[3]: https://docs.open.alipay.com/api_2
[4]: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.17/

Willem Jiang <willem.ji...@gmail.com> 于2019年12月23日周一 上午9:05写道:
>
> Hi Daniel
>
> Could you explain more about it?
> If the Swagger yaml is generated from the code, it's make sense that
> we don't put this yaml files into VCS.
> But if we write the Swagger yaml file by hand, I think we need to keep
> the track of all the changes.
>
>
> Willem Jiang
>
> Twitter: willemjiang
> Weibo: 姜宁willem
>
> On Sun, Dec 22, 2019 at 8:52 PM Daniel Qian <chanjars...@gmail.com> wrote:
> >
> > Hi toolkit guys,
> >
> > OpenAPI/Swagger yaml is a good standard to describe the APIs, but it's
> > easy to get hundreds, even thousands lines in the file. That becomes
> > hard to maintain and easy to get into the VCS conflict situation.
> > How do you guys solve this problem in real development? I've heard
> > that some teams use template engine to merge snippets into a final
> > yaml.
> > May be toolkit can do something helpful to make the life easier. Any ideas?
> >
> > --
> > Daniel Qian
> > Apache Committer(chanjarster)
> > blog:https://chanjarster.github.io
> > github:https://github.com/chanjarster
> > segmentfault: https://segmentfault.com/u/chanjarster



-- 
Daniel Qian
Apache Committer(chanjarster)
blog:https://chanjarster.github.io
github:https://github.com/chanjarster
segmentfault: https://segmentfault.com/u/chanjarster

Reply via email to