-
Notifications
You must be signed in to change notification settings - Fork 301
Closed
Labels
CsharpPull requests that update .net codePull requests that update .net codeGoJavaRubyTypeScriptPull requests that update Javascript codePull requests that update Javascript codefixedgeneratorIssues or improvements relater to generation capabilities.Issues or improvements relater to generation capabilities.
Milestone
Description
Recent feedback in the following issues has proven limitations in the way URLs are built via the fluent API. Kiota generated request builders are currently storing the previously built URL in a current path property, and appending the current segment (with it's parameters) to it to pass it to the next request builder and/or execute the request.
This shows shortcomings for:
- exploded query parameters add pet store examples to the samples repo #135 (select=option1&select=option2... instead of select=option1,option2)
- multiple path parameters in segments Duplicate import identitfier #527 OData function/action dotnet generation #623
- imperative programing paradigms (CLIs, where no fluent API can be used, so we don't have a context to get the current path from)
- using request builders with existing URLs Add support for using nextLink in the typescript sdk #410 (nextLink case from OData)
We need to rework the generator, the language writers and the abstractions libraries to properly implement the query and path parameters and a proper way to do so would be to use URI templates.
Here is a high-level list of what needs to happen:
- The current Path property needs to be renamed to Uri template and contain the full URI + an expansion of any query parameter
- An additional dictionary/map of currentUriTemplateValues property needs to be added to request builders, and request builders constructors
- Code writers for each language need to be updated to account for those changes, and pass the current values instead of the current path
- Code indexers/navigation methods (path parameters) need to add the additional parameters to the map before passing it to the next request builder
- The request information needs a setter method for the URI that takes in a template and the parameters and resolves to as URI
- once changes are made in other languages check the progress on PHP Generation #664 and either rebase to implement changes in PHP or create a separate issue for it.
AB#11152
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CsharpPull requests that update .net codePull requests that update .net codeGoJavaRubyTypeScriptPull requests that update Javascript codePull requests that update Javascript codefixedgeneratorIssues or improvements relater to generation capabilities.Issues or improvements relater to generation capabilities.