Skip to content

Commit 864cf8d

Browse files
authored
Made metadata.yaml format match serialized output (#15946)
1 parent 5ef1f01 commit 864cf8d

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
resource: '{{ $.TerraformName }}'
2-
generation_type: 'mmv1'
3-
source_file: '{{ $.SourceYamlFile }}'
4-
api_service_name: '{{ $.ProductMetadata.ServiceName }}'
5-
api_version: '{{ or $.ProductMetadata.ServiceVersion $.ServiceVersion }}'
6-
api_resource_type_kind: '{{ or $.ApiResourceTypeKind $.Name }}'
1+
resource: {{ $.TerraformName }}
2+
generation_type: mmv1
3+
source_file: {{ $.SourceYamlFile }}
4+
api_service_name: {{ $.ProductMetadata.ServiceName }}
5+
api_version: {{ or $.ProductMetadata.ServiceVersion $.ServiceVersion }}
6+
api_resource_type_kind: {{ or $.ApiResourceTypeKind $.Name }}
77
{{- if $.CAIFormatOverride }}
8-
cai_asset_name_format: '{{ $.CAIFormatOverride }}'
8+
cai_asset_name_format: {{ $.CAIFormatOverride }}
99
{{- end }}
1010
{{- if gt (len $.ApiVariantPatterns) 0 }}
1111
api_variant_patterns:
1212
{{- range $v := $.ApiVariantPatterns }}
13-
- '{{ $v }}'
13+
- {{ $v }}
1414
{{- end }}
1515
{{- end }}
1616
{{- if $.AutogenStatus }}
@@ -19,18 +19,18 @@ autogen_status: true
1919
fields:
2020
{{- range $p := $.LeafProperties }}
2121
{{- if $p.ProviderOnly }}
22-
- field: '{{ $p.MetadataLineage }}'
23-
provider_only: true
22+
- field: {{ $p.MetadataLineage }}
23+
provider_only: true
2424
{{- else}}
25-
- api_field: '{{ $p.MetadataApiLineage }}'
26-
{{- if ne $p.MetadataLineage $p.MetadataDefaultLineage }}
27-
field: '{{ $p.MetadataLineage }}'
28-
{{- end}}
29-
{{- if $p.IsJsonField }}
30-
json: true
31-
{{- end }}
25+
- api_field: {{ $p.MetadataApiLineage }}
26+
{{- if ne $p.MetadataLineage $p.MetadataDefaultLineage }}
27+
field: {{ $p.MetadataLineage }}
28+
{{- end}}
29+
{{- if $p.IsJsonField }}
30+
json: true
31+
{{- end }}
3232
{{- end}}
3333
{{- end }}
3434
{{- if $.HasSelfLink }}
35-
- api_field: 'selfLink'
35+
- api_field: selfLink
3636
{{- end }}

0 commit comments

Comments
 (0)