feat: Add JSON tags to SDK structs so it's easier to know how the resulting JSON would look like #23882
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
feature-request
This issue requires a new behavior in the product in order be resolved.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Feature Request
Somehow related to #19356 from a another angle.
Since the Azure SDK uses custom JSON marshalling without
json
tags it's hard to know the resulting json structure statically.Example in
azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/models_serde.go
Line 15897 in d9d44c0
azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/models.go
Line 6520 in d9d44c0
For context, using the standard library JSON encoding will use the original field names.
Is this something you're willing to consider? Not sure how the code gen is done, but if you're open to it I can take a look at adding it.
The use case is statically generating a JSON schema for the models, so it can later be used to validate access to the JSON data (e.g. catch a typo in a field).
The text was updated successfully, but these errors were encountered: