Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/importer-rest-api-specs: parsing the dfe types into regular Object Definition Types #4026

Closed
tombuildsstuff opened this issue Apr 2, 2024 · 2 comments · Fixed by #4237
Labels
area/data-canonicalisation Issues around Data Normalisation/Canonicalisation enhancement New feature or request tool/importer-rest-api-specs Swagger Data Importer issues

Comments

@tombuildsstuff
Copy link
Contributor

Rather than using the type field to define the type for a given field within the Swagger API Definition like other services, Data Factory uses a meaningless value for type (typically object) which gets overridden by an x-ms-format value that references some dfe specific types - which refer to these C# types hand-defined within the C# AutoRest generator (HT @ziyeqf)

Since importer-rest-api-specs doesn't know to check for this field, this means that the following field within the API Definition:

        "headers": {
          "type": "object",
          "x-ms-format": "dfe-key-value-pairs",
          "additionalProperties": {
            "type": "string",
            "x-ms-format": "dfe-string"
          }
        },

Gets parsed out as an Object rather than a Dictionary[String]. There's a bunch of these DFE types and these can be found within the DataFactory API definitions, but these will align with the list defined in the C# generator above.

As such, we need to update importer-rest-api-specs to parse the Data Factory specific types into a regular Object Definition Types so that hashicorp/go-azure-sdk can output the correct types.

See also Azure/azure-rest-api-specs#28380

@tombuildsstuff
Copy link
Contributor Author

We might also need to do some additional duck-typing here to find out the values for this field, since this is being masked in the API definition with the way Expressions are implemented: Azure/azure-rest-api-specs#28538 / #4076

@tombuildsstuff
Copy link
Contributor Author

Split List[Reference] out into #4238

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/data-canonicalisation Issues around Data Normalisation/Canonicalisation enhancement New feature or request tool/importer-rest-api-specs Swagger Data Importer issues
Projects
None yet
1 participant