VSChina / magic-modules

Magic Modules: Automagically generate Google Cloud Platform support for OSS
Apache License 2.0
1 stars 4 forks source link

can not generate code when handling field: `syncStatus` (parameter required: false) #82

Closed njuCZ closed 4 years ago

njuCZ commented 4 years ago

using file: https://github.com/Azure/azure-rest-api-specs/blob/master/specification/appplatform/resource-manager/Microsoft.AppPlatform/preview/2019-05-01-preview/appplatform.json

using mm to generate appplatformapp/package-2019-05-01-preview/api.yml terraform code, it throws error and can not generate codes.

there seems something wrong when handling field syncStatus

magodo commented 4 years ago

The problem here is that MM tries to find a sdk field named syncStatus among CreateOrUpdate request fields, and it failed to find one. From api.yaml, you can see it only exists in Read request.

The reason why MM will look for it in CreateOrUpdate is because syncStatus property is not output only, which means it will be used at Create/Update method in TF.

magodo commented 4 years ago

Duplicate of #88