apigitlabs / apigit-support

APIGIT is a native Git based collaboration platform for API design, document, mock and share.
https://apigit.com
1 stars 0 forks source link

Share components between specs #31

Closed manuliner closed 1 month ago

manuliner commented 4 months ago

Is there an existing request for this feature?

Is your feature request related to a problem?

I have several API References for many different microservices. They may use same components, like parameters, reponses etc. duplication and keeping all up to date is much work

Describe the solution you'd like

centralised components accessable via ref

Describe alternatives you've considered

using another tooling

Additional context

No response

apigitlabs commented 4 months ago

Hi @manuliner, Apigit's API Editor supports a wide range of components (like parameters, headers, requests, responses, etc.) that can be referenced by all other objects as 'ref.' Could you explain more about the issue you encountered?

manuliner commented 4 months ago

I have several Microservices. For every single one i have an service-1-openapi.yaml

I want to keep all yamls in one repository. Service 1 and Service 2 to sharing the same responses, parameters, models and so on. Currently i store those in an folder (Common) and Link those specific files into the main yaml file to reduce duplication

Those common components yaml are not recognized by apigit

apigitlabs commented 3 months ago

hi @manuliner , this function is gotten supported in the latest deployment, please have a try! apigit-openapi-split

manuliner commented 3 months ago

nice. That was fast. Awesome

Sadly your "Form View" is not accepting it as valid openAPI.yaml grafik

and it would be nice to have those shared components acessable in the edit view of the "main" spec file grafik

apigitlabs commented 3 months ago

Thank you, @manuliner. Regarding the externally shared components, these could be either a component in JSON schema style or just a regular JSON. This makes it somewhat tricky to manage. We will conduct some research to see if there's a feasible way to handle this.

apigitlabs commented 1 month ago

hi @manuliner , we have basically supported json schema spec viewer and editor. Please try it and let us know if you have any questions. json-schema-editor json-schema-viewer

apigitlabs commented 1 month ago

I close the issue first. if you have any further request,please let us know.