A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/api-gateway/docs/openapi-overview below:

OpenAPI overview | API Gateway Documentation

Skip to main content

Stay organized with collections Save and categorize content based on your preferences.

OpenAPI overview

API Gateway supports APIs that are described using the OpenAPI specification, version 2.0. Your API can be implemented using any publicly available REST framework such as Django or Jersey.

You describe your API in a YAML file referred to as an OpenAPI document. This page describes some of the benefits to using OpenAPI, shows a basic OpenAPI document, and provides additional information to help you get started with OpenAPI.

Note: For API Gateway, you use the same Open API syntax for defining your APIs as described in the Cloud Endpoints doc at OpenAPI overview. Benefits

One of the primary benefits to using OpenAPI is for documentation; once you have an OpenAPI document that describes your API, it is easy to generate reference documentation for your API.

There are other benefits to using OpenAPI. For example, you can:

Basic structure of an OpenAPI document

An OpenAPI document describes the surface of your REST API, and defines information such as:

If you are new to OpenAPI, take a look at the Swagger basic structure website, which provides a sample OpenAPI document (also referred to as a Swagger specification) and briefly explains each section of the file. The following example illustrates this basic structure:

    swagger: "2.0"
    info:
      title: API_ID optional-string
      description: "Get the name of an airport from its three-letter IATA code."
      version: "1.0.0"
    host: DNS_NAME_OF_DEPLOYED_API
    schemes:
      - "https"
    paths:
      "/airportName":
        get:
          description: "Get the airport name for a given IATA code."
          operationId: "airportName"
          parameters:
            -
              name: iataCode
              in: query
              required: true
              type: string
          responses:
            200:
              description: "Success."
              schema:
                type: string
            400:
              description: "The IATA code is invalid or missing."
Note: For API Gateway, use of the host property in your API definition is optional. You can either omit the host property entirely from the API definition or set it to the DNS name of the deployed API. API providers often set it to the DNS name when sharing the OpenAPI Spec with their API consumers. Do not set the host property to null or an empty value, as this will result in an error.

In addition to the basic structure, use the openapi.yaml file to configure:

Generating an OpenAPI document

Depending on what language you are using, you might be able to generate an OpenAPI document. In Java, there are open source projects for both Jersey and Spring that can generate an OpenAPI document from annotations. There is also a Maven plugin. For Python and Node developers, OpenAPI.Tools might be an interesting project.

The OpenAPI community is continually developing tools to help in the composition (and, for some languages, automatic generation) of OpenAPI documents. See the The OpenAPI Specification for more.

What's next Note: Because you use the same Open API syntax for the API Gateway as you used for Cloud Endpoints, these links refer to locations in the Cloud Endpoints documentation.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["API Gateway supports APIs described using the OpenAPI specification, specifically version 2.0, allowing implementation with any public REST framework like Django or Jersey."],["OpenAPI documents, written in YAML, define the structure and surface of a REST API, including its name, description, endpoints, and authentication methods."],["Using OpenAPI provides significant benefits, such as generating API reference documentation, client libraries, server stubs, and verification tools."],["An OpenAPI document's basic structure includes defining the API's title, description, version, host, schemes, and paths, with an example provided for airport name retrieval."],["The `openapi.yaml` file can be used to configure various aspects of the API such as title, optional description, API key usage, security schemes, and OpenAPI extensions."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4