Configuration validation
Ocean validates integration configuration against .port/spec.yaml before the integration starts its work. Invalid types or missing required fields prevent a bad config from running mid-sync.
Declare parameters under configurations in spec.yaml. See define configuration files.
Supported types
| Type | Example value |
|---|---|
string | my-token |
integer | 123 |
boolean | true |
object | {"key": "value"} |
url | https://api.example.com |
.port/spec.yaml
configurations:
- name: apiBaseUrl
type: url
required: true
description: Base URL of the third-party API
- name: enableFeature
type: boolean
required: false
description: Toggle an optional feature
If a user sets enableFeature to a non-boolean value, Ocean rejects the configuration at startup.
Values arrive in your code through ocean.integration_config after validation. For local runs, set the matching OCEAN__INTEGRATION__CONFIG__* environment variables as described in test and run locally.