Skip to content

YAML to API Proxy

This command takes a YAML document and converts it into a ready-to-use Apigee API proxy bundle.

Workflow

This command plays a crucial part in streamlining your Apigee development process.

  • Design

    Craft your API proxy configuration using the more readable and manageable YAML format.

  • Convert

    Feed your YAML document into the command to get a fully compliant API proxy bundle.

  • Deploy

    Use the Apigee CLI to deploy the bundle

Usage

The yaml-to-apiproxy command takes two parameters -input and -output

  • --input is the YAML document that contains the API proxy definitions

  • --output is either a bundle zip or a bundle directory to be created

  • --output full path is created if it does not exist (like mkdir -p)

Bundle resources are read relative to the location of the --input

Examples

Below are a few examples for using the yaml-to-apiproxy command.

Create bundle zip

Creating a bundle zip

apigee-go-gen transform yaml-to-apiproxy \
  --input ./examples/yaml-first/petstore/apiproxy.yaml \
  --output ./out/apiproxies/petstore.zip 

Create bundle dir

Creating a bundle directory

apigee-go-gen transform yaml-to-apiproxy \
  --input ./examples/yaml-first/petstore/apiproxy.yaml \
  --output ./out/apiproxies/petstore