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

tsp: can we remove the paged response envelope #1123

Open
jhendrixMSFT opened this issue Jan 26, 2024 · 2 comments
Open

tsp: can we remove the paged response envelope #1123

jhendrixMSFT opened this issue Jan 26, 2024 · 2 comments

Comments

@jhendrixMSFT
Copy link
Member

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
Copy link
Member Author

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

@tadelesh
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants