-
Notifications
You must be signed in to change notification settings - Fork 164
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
Add procedures to Get/Remove for UriBuilder Query Paramaters/Flags #2247
base: main
Are you sure you want to change the base?
Conversation
I guess we have an edge case for the contribution workflow, since I had an issue/approval for the idea in another repo. I hope this is okay? |
Let's take this for spin 🥳 |
…yParameter instead
Thanks @JesperSchulz, I was thinking about feedback on the signatures and if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
There seems to be a small issue in the tests during compilation. Once addressed, I think we're good to go 🥳 |
@JesperSchulz sorry about that, I was trying to use the opportunity to get AL help from Github Copilot to write the extra test scenario for me since it was a simple case, since I was told it was really smart about that kind of scenario, but turns out it wasn't. |
Let's give this another run! 🚀 |
….. added slash to all UriBuilder.Init, so Init is closer to the value of Expected (the slash is irrelevant, since the focus is on the query-parameters)
@JesperSchulz I noticed the tests were failing, since But judging by how hard it is to catch this little hardcoded detail (for us humans and apparently AI as well), I changed them and the new tests so the "Init-URI" is closer to the final "Expected-URI", so they both have the forward-slash in all scenarios. Hopefully it's finally ready for the pipelines now, I didn't want to spend too much time on the autotests initially, in case the PR (or parts of it) would be rejected on first review. |
That's a fine strategy 😊 I don't mind at all taking a few turns to get things right. Let's try again and hope this time it passes 😎 |
…rror options (DuplicateActions only applies if multiple values are found)
Summary
UriBuilder procedures can only Add/Replace Query Flags/Parameters, while the internal procedure can parse them and set them, so I want to be able to use that to only Get/Remove from the collection.
There are different ways to implement this and many ways to test this, I just wanted to propose this approach which reuses what's already there for AddQueryFlag/Parameter, figuring we might need something like this for the upcoming HttpClient mocking: https://www.yammer.com/dynamicsnavdev/#/threads/show?threadId=3029127257333760 (why expose a special QueryParameter dictionary if we already have Uri/UriBuilder codeunits that are supposed to expose these structures for us?)
The new procedures added are:
Work Item(s)
Fixes #2248
Fixes AB#555623