<@U04SE163WC8> I'm using Octavia and I would like ...
# help-api-cli-orchestration
a
@kapa.ai I'm using Octavia and I would like to know if there is a way to get allowed values for resources in the .yml file without running octavia generate <resource_type>. The purpose is to create a yml configuration checker that will map the fields filled in by a user and compare to the allowed values and this according to the current version. I want to validate yml configuration files before deploying in CD
u
Based on the provided extracts, there isn't a direct way to get the allowed values for resources in the .yml file without running
octavia generate <resource_type>
. The
octavia generate
command is used to auto-generate a YAML config file that matches the resources' schemas, which includes the allowed values for each field. However, when you edit the YAML configuration files, Octavia will validate the new configuration and compute a diff before applying the changes. If you edit a field with the wrong syntax or an invalid value, Octavia will fail to apply the changes and display an error message with the field that failed to validate. For example:
Copy code
bash octavia apply -f connections/postgres_to_bigquery/configuration.yaml | tail -n 1  airbyte_api_client.exceptions.ApiValueError: Invalid value for `time_unit` (hour), must be one of ['minutes', 'hours', 'days', 'weeks', 'months']
In this case, the
time_unit
field was given an invalid value of 'hour', and Octavia provided an error message indicating the allowed values for this field. While this doesn't provide a way to validate the YAML configuration files before deploying in CD, it does provide a way to catch and correct errors before the changes are applied. For more information on using Octavia to manage Airbyte configurations, you can refer to the [Octavia CLI documentation](https://docs.airbyte.com/cli-documentation) and the [Airbyte tutorials](https://airbyte.com/tutorials/version-control-airbyte-configurations).