Skip to content

Conversation

@irvinesunday
Copy link
Contributor

Fixes #259

This PR:

  • Aliases optional parameters of OData functions by appending @ together with the parameter name to denote the parameter alias.
  • Updates tests to validate the above

Paths of functions with optional parameters will look like below:

image

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

part of the issue what that path parameters were described as in: query. And I haven't seen any code change related to that aspect. A miss?

@irvinesunday
Copy link
Contributor Author

part of the issue what that path parameters were described as in: query. And I haven't seen any code change related to that aspect. A miss?

We don't describe path parameters as in: query

Given this function example:

image

And this path which is bound to that function

image
You can see that the path parameters: team-id and channel-id are defined as in: path whereas the function parameters: userId, tenantId and userPrincipalName are all defined as in: query

@baywet
Copy link
Member

baywet commented Sep 6, 2022

what happens for required parameters? I believe the fact they were present in the path but documented to be part of query was the original defect reported by @peombwa

@irvinesunday
Copy link
Contributor Author

what happens for required parameters? I believe the fact they were present in the path but documented to be part of query was the original defect reported by @peombwa

Given this function which has a required parameter userid

image

And the subsequently generated path...

image

You can see that the required parameter userid is generated as in: path and with the correct syntax in the path.

The function that @peombwa was referencing in the target issue had all optional parameters:

image

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the clarification

@irvinesunday irvinesunday merged commit a850df6 into master Sep 7, 2022
@irvinesunday irvinesunday deleted the fix/is/alias-optional-params branch September 7, 2022 15:11
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

Successfully merging this pull request may close these issues.

Semantic violation: Certain OData functions have path parameters referenced in query

3 participants