Manifest

Config manifest documentation

#data/app.config.yaml
version: v1.3
type: Config
body:
  logging:                        # 1
    headers: true                 # 1.1
    body: true                    # 1.2
  constants:                      # 2
    today: "20203-01-01"          # 2.1
  proxy:                          # 3
    - name: local                 # 3.1
      url: http://localhost:9080  # 3.2

Description

  • logging - logging setup unit

    • headers - controls whether to enable/disable header logging

    • body - controls whether to enable/disable request/response body logging

  • constants - constants setup unit

    • <constant name>: <constant value> - an enumeration (key, value) of user-defined constants

  • proxy - constants setup unit

    • name - name of proxy entry

    • url - url of proxy entry

Note

You can use constants in a route YAML:

version: v1.1
rules:
  - request:
      path: /hello-world
    response:
      headers:
        content-type: application/json
      body: |
        {
          "text": "Hello World!",
          "date": "${constants.today}"
        }

Backward Compatibility

The file name config.[yaml|yml] is reserved. You can still configure the project, but it will not support the manifest declaration. For config.yml you can declare settings in that way:

#data/config.yml
logging:
  headers: false
  body: false
constants:
  today: "2017-12-01"

Last updated