Where to find Swagger or YAML documentation for BigQuery API v2?

Viewed 217

My company does not allow calling the external API directly. The API call must go through API gateway. To request the API integration, I have to submit swagger or YAML documentation with all end points.

I have BigQuery API reference document - https://cloud.google.com/bigquery/docs/reference/rest.

Please assist with where I can find the swagger/yaml doc.

1 Answers

I've not generated OpenAPI (formerly swagger) docs for Google APIs but it should be possible.

Historically, Google published descriptions (schema) for all its services using so-called Discovery documents. Here's BigQuery's page on APIs Explorer. It includes the discovery document for BigQuery

Increasingly, Google's services are now defined using protocol buffers and Google uses gRPC|HTTP transcoding to surface the API as REST and I know that, when Cloud Endpoints uses this, the API is described using an OpenAPI document too.

But, I'm not aware that Google publishes its APIs as OpenAPI documents directly and think you will probably want to convert the Discovery document into an OpenAPI document.

In theory an annotated (with REST methods) Protocol Buffer document would be functionally equivalent to a Discovery document and could be used instead but there aren't Protocol Buffer documents published for all Google services and evidently not for BigQuery.

This document is comprehensive and references tools that generate OpenAPI documents from Discovery documents. I can't attest to any of these as I've not used any of them:

https://github.com/googleapis/googleapis.github.io#openapi

Related