diff --git a/api/type.rb b/api/type.rb index 696a6a74243e..b3f369477b41 100644 --- a/api/type.rb +++ b/api/type.rb @@ -456,10 +456,12 @@ def item_type_class # Represents an enum, and store is valid values class Enum < Primitive attr_reader :values + attr_reader :skip_docs_values def validate super check :values, type: ::Array, item_type: [Symbol, ::String, ::Integer], required: true + check :skip_docs_values, type: :boolean end end diff --git a/products/compute/api.yaml b/products/compute/api.yaml index 9b5d541ce961..7bd60a51e164 100644 --- a/products/compute/api.yaml +++ b/products/compute/api.yaml @@ -9819,13 +9819,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -10238,13 +10244,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -10301,13 +10313,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -10390,13 +10408,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -14803,13 +14827,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -15482,12 +15512,18 @@ objects: - !ruby/object:Api::Type::Enum name: 'redirectResponseCode' description: | - The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method - will be retained. - PERMANENT_REDIRECT, which corresponds to 308. In this case, - the request method will be retained. + The HTTP Status code to use for this RedirectAction. Supported values are: + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -15547,13 +15583,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT @@ -15952,13 +15994,19 @@ objects: name: 'redirectResponseCode' description: | The HTTP Status code to use for this RedirectAction. Supported values are: - - MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. - - FOUND, which corresponds to 302. - - SEE_OTHER which corresponds to 303. - - TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method + + * MOVED_PERMANENTLY_DEFAULT, which is the default value and corresponds to 301. + + * FOUND, which corresponds to 302. + + * SEE_OTHER which corresponds to 303. + + * TEMPORARY_REDIRECT, which corresponds to 307. In this case, the request method will be retained. - - PERMANENT_REDIRECT, which corresponds to 308. In this case, + + * PERMANENT_REDIRECT, which corresponds to 308. In this case, the request method will be retained. + skip_docs_values: true values: - :FOUND - :MOVED_PERMANENTLY_DEFAULT diff --git a/templates/terraform/property_documentation.erb b/templates/terraform/property_documentation.erb index d7831549024f..ca30bc5216ab 100644 --- a/templates/terraform/property_documentation.erb +++ b/templates/terraform/property_documentation.erb @@ -14,11 +14,12 @@ <% end -%> <% end -%> <%= indent(property.description.strip.gsub("\n\n", "\n"), 2) -%> -<% if property.is_a?(Api::Type::Enum) && !property.output -%> +<% if property.is_a?(Api::Type::Enum) && !property.output && !property.skip_docs_values -%> <% unless property.default_value.nil? || property.default_value == "" -%> Default value: `<%= property.default_value %>` + <% end -%> Possible values are: <% property.values.select { |v| v != "" }.each do |v| -%>