You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that the typespec-python emitter doesn't always add xml metadata on generated models. Example of models that arent getting xml metadata on them: ListBlobsFlatSegmentResponse, BlobHierarchyListSegment, BlobItemInternal, etc). Seems we're currently only generating xml metadata if that model is used in an operation with application/xml. However, if a service team has defined a model with xml data on it, we should respect that and always generate the model with xml rest metadata to ensure proper serialization/deserialization whenever that model is being used.
Additional context, some services define models used for convenience that arent specifically linked to any operations. Regardless of where the model is used, we should add any relevant xml metadata on them if they were specified in the tsp.
Related bug, @xml.name should be respect for every property that has it. Since we arent generating some models with their xml metadata, they're getting incorrect rest field names. Example of bug:
I noticed that the typespec-python emitter doesn't always add xml metadata on generated models. Example of models that arent getting xml metadata on them: ListBlobsFlatSegmentResponse, BlobHierarchyListSegment, BlobItemInternal, etc). Seems we're currently only generating xml metadata if that model is used in an operation with
application/xml
. However, if a service team has defined a model with xml data on it, we should respect that and always generate the model with xml rest metadata to ensure proper serialization/deserialization whenever that model is being used.Additional context, some services define models used for convenience that arent specifically linked to any operations. Regardless of where the model is used, we should add any relevant xml metadata on them if they were specified in the tsp.
Example spec using xml: https://github.com/Azure/azure-rest-api-specs/tree/feature/blob-tsp/specification/storage/Microsoft.BlobStorage
The text was updated successfully, but these errors were encountered: