-
Notifications
You must be signed in to change notification settings - Fork 79
Description
I've been looking to do a migration from kermit to go-azure-sdk for the azurerm data factory resources and have encountered an issue.
The Azure API spec for Data Factory LinkedService has a field additionalProperties which represents a dictionary of values that can be added to the request body as defined in OpenAPI 3.0. https://swagger.io/docs/specification/v3_0/data-models/dictionaries/
The kermit library is able to extract this field into its models and accounts for it when marshalling with a custom JSON marshaler for the type, manually extracting each additional property as it's own field. However, the go-azure-sdk version of this does not seem to have this. The field is ignored when marshalling into the BaseLinkedService type for the request body since it does not exist in the struct.
Investigating the imported api definitions for this model, it seems like the spec importer may not account for this field as it is missing from the first step?
Line 4 in ac5f183
| { |
I've seen existing additionalProperties fields in the pandora api-definitions (other than explicitly defined ones) however it is nested (as are the test data) so I'm hazarding a guess that it may be because it is at the root level? I believe there was a related issue addressed a while back #96 but this only seems to cover the nested additionalProperties.
I've briefly step through this custom data factory test adding an additionalProperties at the root level
Line 4 in ac5f183
| package parser_test |
It seems to never reach this line to process the field because there are existing properties?
Line 148 in ac5f183
| if input.AdditionalProperties != nil && input.AdditionalProperties.Schema != nil { |