VSChina / magic-modules

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

[Feature request] MM should flatten the property in array whose item contains only one property of id #39

Open ArcturusZhang opened 5 years ago

ArcturusZhang commented 5 years ago

There is an array has the following schema:

- !ruby/object:Api::Type::Array
        name: 'publicIpAddresses'
        description: 'An array of public ip addresses associated with the nat gateway resource.'
        required: false
        azure_sdk_references: ['/publicIpAddresses', '/properties/publicIpAddresses']
        item_type: !ruby/object:Api::Type::NestedObject
          properties:
            - !ruby/object:Api::Azure::Type::ResourceReference
              name: 'id'
              description: 'Resource ID.'
              required: false
              sample_value: /subscriptions/{{ subscription_id }}/resourceGroups/{{ resource_group }}/providers/Microsoft.Network/publicIPAddresses/{{ name }}
              resource_type_name: TBD
              azure_sdk_references: ['/publicIpAddresses/id', '/properties/publicIpAddresses/id']

This is an array whose item contains only on property of id. What I need is to transform it into an array of id, instead of an array of object who contains only one property of id.

houkms commented 4 years ago

I assume this shall be resolved in autorest.cli.