Skip to content

Base Url should be a path parameter #785

@andrueastman

Description

@andrueastman

With the latest URL templating changes, it seems the various request builders have the base URL e.g. https://graph.microsoft.com/v1.0/ is "hardcoded" in the URL templates.

Examples
Dotnet - https://github.com/microsoft/kiota-samples/blob/4f23266baf055c9e17bdc5bbef8efad6d7c79175/msgraph-mail/dotnet/Users/UsersRequestBuilder.cs#L31
Typescript - https://github.com/microsoft/kiota-samples/blob/4f23266baf055c9e17bdc5bbef8efad6d7c79175/msgraph-mail/typescript/src/users/usersRequestBuilder.ts#L19

This potentially could cause issues in the event we wish to override the base URL with a national cloud URL such as https://graph.microsoft.us. This wasn't an issue before given that the base URL would be passed forward as the URL would be built allowing the parameter at the GraphClient constructor to dictate this.

This could potentially be resolved if we set the base URL as a path parameter to allow it to be replaced/modified/overriden.

Metadata

Metadata

Assignees

Labels

CsharpPull requests that update .net codeGoJavaTypeScriptPull requests that update Javascript codeenhancementNew feature or requestfixedgeneratorIssues or improvements relater to generation capabilities.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions