question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

paging.member is erroneously kept when x-ms-paging.operationName is deleted via a transform

See original GitHub issue

In the following config.

https://github.com/Azure/azure-rest-api-specs/blob/main/specification/policyinsights/resource-manager/readme.md

The x-ms-pageable.operationName is deleted via a transform for a few operations. While this removes the language.default.paging.nextLinkOperation from the model, the language.default.paging.member is still present.

The Go code generator uses the existence of language.default.paging.member to determine if a paged operation is to use a separate operation for fetching the next page. Maybe this is in error?

We can work around this easily enough by predicating on the existence of language.default.paging.nextLinkOperation. Just raising that there looks to be an inconsistency in this presumably rare case.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
timotheeguerincommented, Jan 4, 2022

Yeah that assumption should be correct right now. I’ll look into the types/documentation for this. I do find it weird that all those links are under language feel like there should be a better dedicated property for it.

0reactions
jhendrixMSFTcommented, Jan 4, 2022

I am actually not fully sure what all those properties are meant to correspond to. There is no strong typing for it and no doc.

Initially, this was a bit of a problem for us and so we just reverse-engineered it based on our tests (not a great way to write software). Is there better data we should be looking at in the model for paged operations? If not, it would be nice to add strong typing and docs for it.

I’ve switched to predicate this on the existence of nextLinkOperation as I assume that if it exists then so will member. Assuming this is sane, no need to introduce a breaking change as this is a real corner-case (maybe doc this behavior).

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to delete users from group using transform map...
Hello all, I have a requirement that while loading data from excel sheet in sys_user_grmrmber table then the existing record related to the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found