Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API client namespace conflicts across Equinix's SDK #4

Open
VamshikShetty opened this issue Jan 24, 2023 · 1 comment
Open

API client namespace conflicts across Equinix's SDK #4

VamshikShetty opened this issue Jan 24, 2023 · 1 comment

Comments

@VamshikShetty
Copy link

VamshikShetty commented Jan 24, 2023

APIs, Models and supporting files are created in following namespace for :

Metal :

  1. Supporting files such as api client are in : com.equinix.openapi
  2. APIs are in : com.equinix.openapi.metal.v1.api
  3. Models are in : com.equinix.openapi.metal.v1.model

ref : https://github.com/equinix-labs/metal-java/blob/main/spec/oas3.config.json

Fabric :

  1. Supporting files such as api client are in : com.equinix.openapi.fabric
  2. APIs are in : com.equinix.openapi.fabric.v4.api
  3. Models are in : com.equinix.openapi.fabric.v4.model

ref : https://github.com/equinix-labs/fabric-java/blob/main/spec/oas3.fabric.config.json

Initial vision was to have different openapi generated java sdk such as metal-java, fabric-java etc and eventually merge them into one equinix-java SDK. Which would share API client and other supporting files hence ideally Supporting files such as api client for fabric should be generated in com.equinix.openapi.

But in our case API client generated for fabric differs from metal due to shift in supported authorization model. Hence we need to maintain two different API clients. These leads to the realisation that even though they are in different project if API clients and supporting files are generated under com.equinix.openapi namespace then there will be a conflict during importing API client when both SDKs are consumed together.

@displague
Copy link
Member

displague commented Jan 24, 2023

Agreed. The packages only differ by these lines:

A common APIClient would open cleaner possibilities for a unified Equinix API(s) Java package. We may be able to do that with Fabric and other services (everything else) that use OAuth Bearer tokens. Metal is the stand-out here. Perhaps we should put the Metal API client behind the added namespace instead of Fabric.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants