Get started with YAML configuration
2 minute read
- Install or upgrade your API Gateway to its latest version.
- Upgrade your XML federated configuration using upgradeconfig or projupgrade before converting it.
If you are using Git for your YAML configurations on a Windows operating system, ensure to set Git configuration setting
core.longpaths to avoid filename too long error on checkout.
git config core.longpaths true
Convert XML federated configuration to YAML
You must start with an existing XML federated configuration. If you do not have an existing XML federated configuration you can create a new one in Policy Studio using one of the factory templates.
If your project is called, for example,
test, then the XML files for it will exist in
~/apiprojects/test. The federated URL is
NoteEnsure that you have upgraded any old Policy Studio installation and your existing XML federated configuration to the latest version before converting it to YAML.
If the XML federated configuration is encrypted with a passphrase, you do not need to decrypt it before or after the conversion to YAML. The converted YAML configuration will remain encrypted as all values are copied from one configuration to the other.
To convert your XML federated configuration to YAML:
Open a terminal and change directory to the API Gateway installation directory
Convert the XML to YAML:
./yamles fed2yaml -s /home/user/apiprojects/test -o /path/to/yamles
Validate the converted YAML configuration:
./yamles validate -s /path/to/yamles
For deployment to an API Gateway runtime, see Packaging and deployment.
For troubleshooting any errors, and more details on options and commands, see CLI Tool.