Skip to content

googlemaps/openapi-specification

Repository files navigation

Google Maps Platform OpenAPI3 Specification

Build Release GitHub contributors semantic-release

Description

An OpenAPI specification for Google Maps Platform APIs.

API Status
Elevation Complete
GeoCoding Complete
GeoLocation Complete
Distance Complete
Roads Complete
Time Zone Complete
Directions Complete
Places Complete
Street View Complete
Maps Static Not Started

Note: New APIs will be documented using Google Discovery documents and Protobuf files.

Run in Postman

Development

The repository makes use of Bazel to generate outputs from the specification and sample requests.

Build and test

  1. npm i

  2. npm run build

    This generates the following outputs in the dist folder:

    • YAML file containing OpenAPI3 specification
    • JSON file containing OpenAPI3 specification
    • Structure Markdown documents for specification objects
    • Code snippets in multiple languages for sample requests

    Note: There is a bot that can be triggered in a pull request with a comment containing /update-dist. See the workflow at https://github.com/googlemaps/openapi-specification/blob/main/.github/workflows/command.yml.

    Note: The dist/ folder is included in this repo and should be updated with all changes.

    Note: If a documentation item is not generated, be sure it is included in the appropriate index.yml file.

  3. npm run responses (optional)

    Note: This is an optional step requiring an API key. Set the GOOGLE_MAPS_API_KEY environmental variable before running.

    Note: This step only needs to run when the generation code or sample requests have been updated.

    Note: The geolocation request that only provides an IP is not deterministic and skipped in the binary executed.

    Note: A single response can be updated similar to npm run responses -- --only maps_http_places_nearbysearch.

  4. npm run test