Azure / autorest.go

Extension for AutoRest (https://github.com/Azure/autorest) that generates Go code
MIT License
69 stars 43 forks source link

tsp: can we remove the paged response envelope #1123

Open jhendrixMSFT opened 9 months ago

jhendrixMSFT commented 9 months ago

Example: https://github.com/Azure/autorest.go/blob/main/packages/autorest.go/test/autorest/paginggroup/zz_models.go#L11-L14

This is an artifact of OpenAPI. With tsp, we can conceivably remove this. It would not be a breaking change for greenfield projects. The question is, for brownfield, what's the impact? If brownfield is 100% converting OpenAPI to tsp then presumably these intermediate models will be preserved.

jhendrixMSFT commented 9 months ago

@tadelesh will swagger->tsp converter keep the intermediate paged response envelope from swagger (see above link)?

tadelesh commented 8 months ago

For conversion, all pageable operation response will be a Azure.Core.Page<Resource> template instance. Whether it is explicitly generated is depended on the TCGC/emitter logic.