Skip to content

Configuration File

Configure your APICHAP instance by using the yaml format. Full configuration examples are available in our Samples.

Config Specification Versioning

The APICHAP configuration files are versioned using a numeric value to indicate the syntax version. Best place to keep your specification is in a settings.yaml file at the very top.

specification: "1.0"

Changelog

Version Description
1.0 Initial specification for the APICHAP configuration language.

Please note that as APICHAP evolves, future versions may introduce additional features or syntax changes. Check our Release Notes for more information.

Configuration File Setup

In APICHAP, you can split your configuration across multiple YAML files, all located in the specs folder. This approach helps you organize settings, data sources, and operations more efficiently.

Key Points:

  • Reserved File: The name openapi.yaml file is reserved for your OpenAPI specification.
  • Other Files: All other YAML files within the specs folder are read. Currently subfolders are not supported.
  • It is recommended to split your configuration by:
    • A separate file for each data source.
    • A separate file for each operation or endpoint.
    • A file for settings.
  • Note: It is not allowed to split a single operation configuration into multiple files.
  • Environment Configuration: You can also add a separate file for environment variables. This allows for easy configuration of different environments.

Below is an example of a project structure showing how files could be organized:

- datasource_xy.yaml
- operation_GET_xy_.yaml
- operation_xy.yaml
- openapi.yaml                    // The reserved file for your openapi specs.
- .environment.yaml               // If this file holds secrets you my not want to commit this file.

By organizing your configuration in this way, it becomes easier to maintain and update different aspects of your APICHAP project.

Structure

The APICHAP configuration file comes in yaml format and contains the following sections.

Section Description
Operations Each endpoint from your openAPI yaml configuration can be configured by creating an operation. In each operation you are able to define how your endpoint will process, map and return data.
Datasources APICHAP works with many datasources such as your databaseĀ“s or a 3rd party API. Each datasource specified is usable in your fulfillments.
Authentications Specifies your authentifications and security for your endpoints.
Settings Specify global settings like for example debug mode or your licence.

Methods & Data Processing

APICHAP features a specialized syntax tailored for data processing and manipulation. Possible with the APICHAP core functionality of methods, placeholders and conditions to facilitate smooth data access, filtering, and transformation tasks.

More Information