From 9b1f8f44b79ba6f5da519633a9e52dfbb3cee77a Mon Sep 17 00:00:00 2001 From: "Stephen Lewis (Burrows)" Date: Fri, 12 Apr 2024 12:02:09 -0700 Subject: [PATCH] Documented api_name for fields (#10433) --- docs/content/develop/field-reference.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/content/develop/field-reference.md b/docs/content/develop/field-reference.md index cb38d0d42971..b1424939d3fc 100644 --- a/docs/content/develop/field-reference.md +++ b/docs/content/develop/field-reference.md @@ -225,6 +225,18 @@ Example: diff_suppress_func: 'tpgresource.CaseDiffSuppress' ``` +### `api_name` +Specifies a name to use for communication with the API that is different than +the name of the field in Terraform. In general, setting an `api_name` is not +recommended, because it makes it more difficult for users and maintainers to +understand how the resource maps to the underlying API. + +```yaml +- !ruby/object:Api::Type::String + name: 'fieldOne' + api_name: 'otherFieldName' +``` + ## `Enum` properties ### `values`