Open ziyeqf opened 1 year ago
@ziyeqf that's a Swagger bug which would need to be fixed - would you mind sending a PR to fix that?
thanks @tombuildsstuff, but I may not get the point. If I submit a PR to rename nextLink
to @odata.nextlink
, the service will still return in the original format?
@ziyeqf the Swagger should be defining x-ms-pageable
to state which field contains the nextLink
, see here: https://github.com/Azure/autorest/tree/main/docs/extensions#x-ms-pageable
As such just updating the API definition should be sufficient there, I don't think we need a Pandora change for this, I'm kinda surprised there isn't a linter to catch a field containing nextLink
without a x-ms-pageable
defined actually?
@tombuildsstuff I think it has been defined with x-ms-pageable
( swagger ) but the new base layer only support @odata.nextlink
as a next link property? (code)
I'm not familiar with the new base layer... But just found it's calling ExecutePaged
which only accepts @odata.nextlink
as the next link property. (sdk code)
Got it, thanks - in which case yeah this is a bug in the new base layer here where we're relying on the OData value rather than using the value we're expecting:
@manicminer mind taking a look into that one?
Hey @tombuildsstuff, I assume the issue should be resolved when the importer/generator has been updated. Maybe we should keep this issue open, WDYT?
Yeah agreed
Is there an existing issue for this?
Community Note
Service Used
Migrate
API Versions Used
2020-01-01
Description
The response is paged with
nextLink
not in OData and sdk ignored it.References
Swagger: https://github.com/Azure/azure-rest-api-specs/blob/main/specification/migrate/resource-manager/Microsoft.OffAzure/stable/2020-01-01/migrate.json#L3685