yamlopenapigoogle-cloud-endpoints-v2

Deploy Openapi YAML config to Google Endpoint with $ref


Is it possible to deploy Openapi YAML config to Google Endpoints if it references from multiple files, having the files stored in a folder structure?

For example:

-\ openapi.yaml
--\service1\service1.yaml
--\service2\service2.yaml
.
.
.

Let's say openapi.yaml has $ref to one or more definitions within service1.yaml and service2.yaml.

Please note that I have a big number of folders and YAMLs, and the above is just an example of what I am trying to achieve.

How can I deploy this structure as-is to Google Endpoints using service-management?


Solution

  • Unfortunately, Endpoints' support for OpenAPI doesn't handle external type references. Even if it did, the path structure is not preserved during the OpenAPI upload in gcloud endpoints services deploy.