diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json
index 2397f9da78..91764e80f2 100644
--- a/.config/dotnet-tools.json
+++ b/.config/dotnet-tools.json
@@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"jetbrains.resharper.globaltools": {
- "version": "2024.1.0",
+ "version": "2024.1.2",
"commands": [
"jb"
]
@@ -15,7 +15,7 @@
]
},
"dotnet-reportgenerator-globaltool": {
- "version": "5.2.4",
+ "version": "5.3.0",
"commands": [
"reportgenerator"
]
@@ -27,7 +27,7 @@
]
},
"microsoft.openapi.kiota": {
- "version": "1.11.1",
+ "version": "1.14.0",
"commands": [
"kiota"
]
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 50efe80ae6..0ed54e41f8 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -38,7 +38,7 @@ jobs:
- name: Tune GitHub-hosted runner network
uses: smorimoto/tune-github-hosted-runner-network@v1
- name: Setup PostgreSQL
- uses: ikalnytskyi/action-setup-postgres@v5
+ uses: ikalnytskyi/action-setup-postgres@v6
with:
username: postgres
password: postgres
@@ -302,7 +302,7 @@ jobs:
dotnet nuget push "$env:GITHUB_WORKSPACE/packages/*.nupkg" --api-key "$env:GITHUB_TOKEN" --source 'github'
- name: Publish documentation
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
- uses: peaceiris/actions-gh-pages@v3
+ uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml
index f1a64da824..8ce0acd5db 100644
--- a/.github/workflows/qodana.yml
+++ b/.github/workflows/qodana.yml
@@ -22,7 +22,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
fetch-depth: 0 # a full history is required for pull request analysis
- name: 'Qodana Scan'
- uses: JetBrains/qodana-action@v2023.3
+ uses: JetBrains/qodana-action@v2024.1
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
- name: Upload results to artifacts on failure
diff --git a/package-versions.props b/package-versions.props
index 7ade7107e3..33447163ef 100644
--- a/package-versions.props
+++ b/package-versions.props
@@ -11,7 +11,7 @@
8.0.*
0.13.*
1.0.*
- 35.2.*
+ 35.5.*
4.9.*
6.0.*
2.1.*
@@ -23,10 +23,9 @@
13.20.*
13.0.*
8.0.*
- 6.5.*
- 17.8.*
- 2.6.*
- 2.5.*
+ 6.6.*
+ 17.9.*
+ 2.8.*
@@ -35,7 +34,7 @@
8.0.*
- 8.0.*-*
+ 8.0.*
$(AspNetCoreVersion)
diff --git a/src/Examples/DapperExample/appsettings.json b/src/Examples/DapperExample/appsettings.json
index b4ddb2dac9..7854646e7f 100644
--- a/src/Examples/DapperExample/appsettings.json
+++ b/src/Examples/DapperExample/appsettings.json
@@ -4,9 +4,9 @@
// docker run --rm --detach --name dapper-example-postgresql-db -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres:latest
// docker run --rm --detach --name dapper-example-postgresql-management --link dapper-example-postgresql-db:db -e PGADMIN_DEFAULT_EMAIL=admin@admin.com -e PGADMIN_DEFAULT_PASSWORD=postgres -p 5050:80 dpage/pgadmin4:latest
"DapperExamplePostgreSql": "Host=localhost;Database=DapperExample;User ID=postgres;Password=postgres;Include Error Detail=true",
- // docker run --rm --detach --name dapper-example-mysql-db -e MYSQL_ROOT_PASSWORD=mysql -e MYSQL_DATABASE=DapperExample -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -p 3306:3306 mysql:latest --default-authentication-plugin=mysql_native_password
+ // docker run --rm --detach --name dapper-example-mysql-db -e MYSQL_ROOT_PASSWORD=mysql -e MYSQL_DATABASE=DapperExample -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql -p 3306:3306 mysql:latest
// docker run --rm --detach --name dapper-example-mysql-management --link dapper-example-mysql-db:db -p 8081:80 phpmyadmin/phpmyadmin
- "DapperExampleMySql": "Host=localhost;Database=DapperExample;User ID=mysql;Password=mysql",
+ "DapperExampleMySql": "Host=localhost;Database=DapperExample;User ID=mysql;Password=mysql;SSL Mode=None;AllowPublicKeyRetrieval=True",
// docker run --rm --detach --name dapper-example-sqlserver -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=Passw0rd!" -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
"DapperExampleSqlServer": "Server=localhost;Database=DapperExample;User ID=sa;Password=Passw0rd!;TrustServerCertificate=true"
},
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs
index f67774090a..4bd6ebd6b3 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs
@@ -12,32 +12,38 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api {
///
/// Builds and executes requests for operations under \api
///
- public class ApiRequestBuilder : BaseRequestBuilder {
+ public class ApiRequestBuilder : BaseRequestBuilder
+ {
/// The people property
- public PeopleRequestBuilder People { get =>
- new PeopleRequestBuilder(PathParameters, RequestAdapter);
+ public PeopleRequestBuilder People
+ {
+ get => new PeopleRequestBuilder(PathParameters, RequestAdapter);
}
/// The tags property
- public TagsRequestBuilder Tags { get =>
- new TagsRequestBuilder(PathParameters, RequestAdapter);
+ public TagsRequestBuilder Tags
+ {
+ get => new TagsRequestBuilder(PathParameters, RequestAdapter);
}
/// The todoItems property
- public TodoItemsRequestBuilder TodoItems { get =>
- new TodoItemsRequestBuilder(PathParameters, RequestAdapter);
+ public TodoItemsRequestBuilder TodoItems
+ {
+ get => new TodoItemsRequestBuilder(PathParameters, RequestAdapter);
}
///
- /// Instantiates a new ApiRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public ApiRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api", pathParameters) {
+ public ApiRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api", pathParameters)
+ {
}
///
- /// Instantiates a new ApiRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public ApiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api", rawUrl) {
+ public ApiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api", rawUrl)
+ {
}
}
}
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
index 5773981c9f..52081b8d19 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
@@ -12,35 +12,44 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.AssignedTodoIt
///
/// Builds and executes requests for operations under \api\people\{id}\assignedTodoItems
///
- public class AssignedTodoItemsRequestBuilder : BaseRequestBuilder {
+ public class AssignedTodoItemsRequestBuilder : BaseRequestBuilder
+ {
///
- /// Instantiates a new AssignedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", pathParameters) {
+ public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new AssignedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", rawUrl) {
+ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", rawUrl)
+ {
}
///
/// Retrieves the related todoItems of an individual person's assignedTodoItems relationship.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
@@ -53,24 +62,29 @@ public async Task GetAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Retrieves the related todoItems of an individual person's assignedTodoItems relationship.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -80,13 +94,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -95,14 +112,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
///
+ /// A
/// The raw URL to use for the request builder.
- public AssignedTodoItemsRequestBuilder WithUrl(string rawUrl) {
+ public AssignedTodoItemsRequestBuilder WithUrl(string rawUrl)
+ {
return new AssignedTodoItemsRequestBuilder(rawUrl, RequestAdapter);
}
///
/// Retrieves the related todoItems of an individual person's assignedTodoItems relationship.
///
- public class AssignedTodoItemsRequestBuilderGetQueryParameters {
+ public class AssignedTodoItemsRequestBuilderGetQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -117,7 +137,8 @@ public class AssignedTodoItemsRequestBuilderGetQueryParameters {
///
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
- public class AssignedTodoItemsRequestBuilderHeadQueryParameters {
+ public class AssignedTodoItemsRequestBuilderHeadQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
index d13bb455d0..8215a1831d 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
@@ -12,35 +12,44 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.OwnedTodoItems
///
/// Builds and executes requests for operations under \api\people\{id}\ownedTodoItems
///
- public class OwnedTodoItemsRequestBuilder : BaseRequestBuilder {
+ public class OwnedTodoItemsRequestBuilder : BaseRequestBuilder
+ {
///
- /// Instantiates a new OwnedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", pathParameters) {
+ public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new OwnedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", rawUrl) {
+ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", rawUrl)
+ {
}
///
/// Retrieves the related todoItems of an individual person's ownedTodoItems relationship.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
@@ -53,24 +62,29 @@ public async Task GetAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Retrieves the related todoItems of an individual person's ownedTodoItems relationship.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -80,13 +94,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -95,14 +112,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
///
+ /// A
/// The raw URL to use for the request builder.
- public OwnedTodoItemsRequestBuilder WithUrl(string rawUrl) {
+ public OwnedTodoItemsRequestBuilder WithUrl(string rawUrl)
+ {
return new OwnedTodoItemsRequestBuilder(rawUrl, RequestAdapter);
}
///
/// Retrieves the related todoItems of an individual person's ownedTodoItems relationship.
///
- public class OwnedTodoItemsRequestBuilderGetQueryParameters {
+ public class OwnedTodoItemsRequestBuilderGetQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -117,7 +137,8 @@ public class OwnedTodoItemsRequestBuilderGetQueryParameters {
///
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
- public class OwnedTodoItemsRequestBuilderHeadQueryParameters {
+ public class OwnedTodoItemsRequestBuilderHeadQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs
index 27ab0fb180..7cf26c0077 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs
@@ -15,47 +15,57 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item {
///
/// Builds and executes requests for operations under \api\people\{id}
///
- public class PeopleItemRequestBuilder : BaseRequestBuilder {
+ public class PeopleItemRequestBuilder : BaseRequestBuilder
+ {
/// The assignedTodoItems property
- public AssignedTodoItemsRequestBuilder AssignedTodoItems { get =>
- new AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
+ public AssignedTodoItemsRequestBuilder AssignedTodoItems
+ {
+ get => new AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
}
/// The ownedTodoItems property
- public OwnedTodoItemsRequestBuilder OwnedTodoItems { get =>
- new OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
+ public OwnedTodoItemsRequestBuilder OwnedTodoItems
+ {
+ get => new OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
}
/// The relationships property
- public RelationshipsRequestBuilder Relationships { get =>
- new RelationshipsRequestBuilder(PathParameters, RequestAdapter);
+ public RelationshipsRequestBuilder Relationships
+ {
+ get => new RelationshipsRequestBuilder(PathParameters, RequestAdapter);
}
///
- /// Instantiates a new PeopleItemRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public PeopleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", pathParameters) {
+ public PeopleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new PeopleItemRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", rawUrl) {
+ public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", rawUrl)
+ {
}
///
/// Deletes an existing person by its identifier.
///
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
@@ -63,17 +73,23 @@ public async Task DeleteAsync(Action
/// Retrieves an individual person by its identifier.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
@@ -86,30 +102,40 @@ public async Task GetAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Updates an existing person.
///
+ /// A
/// The request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
+ /// When receiving a 422 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PatchAsync(PersonPatchRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(PersonPatchRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PatchAsync(PersonPatchRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(PersonPatchRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -120,13 +146,16 @@ public async Task PatchAsync(PersonPatchRequestDo
///
/// Deletes an existing person by its identifier.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -136,13 +165,16 @@ public RequestInformation ToDeleteRequestInformation(Action
/// Retrieves an individual person by its identifier.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -152,13 +184,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -167,14 +202,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Updates an existing person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToPatchRequestInformation(PersonPatchRequestDocument body, Action>? requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(PersonPatchRequestDocument body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToPatchRequestInformation(PersonPatchRequestDocument body, Action> requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(PersonPatchRequestDocument body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters);
@@ -186,14 +224,17 @@ public RequestInformation ToPatchRequestInformation(PersonPatchRequestDocument b
///
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
///
+ /// A
/// The raw URL to use for the request builder.
- public PeopleItemRequestBuilder WithUrl(string rawUrl) {
+ public PeopleItemRequestBuilder WithUrl(string rawUrl)
+ {
return new PeopleItemRequestBuilder(rawUrl, RequestAdapter);
}
///
/// Retrieves an individual person by its identifier.
///
- public class PeopleItemRequestBuilderGetQueryParameters {
+ public class PeopleItemRequestBuilderGetQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -208,7 +249,8 @@ public class PeopleItemRequestBuilderGetQueryParameters {
///
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
- public class PeopleItemRequestBuilderHeadQueryParameters {
+ public class PeopleItemRequestBuilderHeadQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -223,7 +265,8 @@ public class PeopleItemRequestBuilderHeadQueryParameters {
///
/// Updates an existing person.
///
- public class PeopleItemRequestBuilderPatchQueryParameters {
+ public class PeopleItemRequestBuilderPatchQueryParameters
+ {
/// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
index bcf5b07d9c..b45212a50f 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs
@@ -12,20 +12,23 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.
///
/// Builds and executes requests for operations under \api\people\{id}\relationships\assignedTodoItems
///
- public class AssignedTodoItemsRequestBuilder : BaseRequestBuilder {
+ public class AssignedTodoItemsRequestBuilder : BaseRequestBuilder
+ {
///
- /// Instantiates a new AssignedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", pathParameters) {
+ public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new AssignedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", rawUrl) {
+ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", rawUrl)
+ {
}
///
/// Removes existing todoItems from the assignedTodoItems relationship of an individual person.
@@ -33,16 +36,22 @@ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAda
/// The request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task DeleteAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task DeleteAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToDeleteRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -52,17 +61,23 @@ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action
/// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
@@ -75,13 +90,15 @@ public async Task GetAsync(Action<
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Assigns existing todoItems to the assignedTodoItems relationship of an individual person.
@@ -89,16 +106,22 @@ public async Task HeadAsync(ActionThe request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PatchAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PatchAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -111,16 +134,22 @@ public async Task PatchAsync(ToManyTodoItemInRequest body, ActionThe request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PostAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PostAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -130,14 +159,17 @@ public async Task PostAsync(ToManyTodoItemInRequest body, Action
/// Removes existing todoItems from the assignedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
@@ -149,13 +181,16 @@ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest bod
///
/// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -165,13 +200,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -180,14 +218,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Assigns existing todoItems to the assignedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters);
@@ -199,14 +240,17 @@ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body
///
/// Adds existing todoItems to the assignedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@@ -218,14 +262,17 @@ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body,
///
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
///
+ /// A
/// The raw URL to use for the request builder.
- public AssignedTodoItemsRequestBuilder WithUrl(string rawUrl) {
+ public AssignedTodoItemsRequestBuilder WithUrl(string rawUrl)
+ {
return new AssignedTodoItemsRequestBuilder(rawUrl, RequestAdapter);
}
///
/// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship.
///
- public class AssignedTodoItemsRequestBuilderGetQueryParameters {
+ public class AssignedTodoItemsRequestBuilderGetQueryParameters
+ {
/// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -240,7 +287,8 @@ public class AssignedTodoItemsRequestBuilderGetQueryParameters {
///
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
- public class AssignedTodoItemsRequestBuilderHeadQueryParameters {
+ public class AssignedTodoItemsRequestBuilderHeadQueryParameters
+ {
/// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
index 80c5a9bc9b..1379b9098e 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs
@@ -12,20 +12,23 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.
///
/// Builds and executes requests for operations under \api\people\{id}\relationships\ownedTodoItems
///
- public class OwnedTodoItemsRequestBuilder : BaseRequestBuilder {
+ public class OwnedTodoItemsRequestBuilder : BaseRequestBuilder
+ {
///
- /// Instantiates a new OwnedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", pathParameters) {
+ public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new OwnedTodoItemsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", rawUrl) {
+ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", rawUrl)
+ {
}
///
/// Removes existing todoItems from the ownedTodoItems relationship of an individual person.
@@ -33,16 +36,22 @@ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte
/// The request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task DeleteAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task DeleteAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToDeleteRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -52,17 +61,23 @@ public async Task DeleteAsync(ToManyTodoItemInRequest body, Action
/// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
@@ -75,13 +90,15 @@ public async Task GetAsync(Action<
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Assigns existing todoItems to the ownedTodoItems relationship of an individual person.
@@ -89,16 +106,22 @@ public async Task HeadAsync(ActionThe request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PatchAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PatchAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PatchAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPatchRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -111,16 +134,22 @@ public async Task PatchAsync(ToManyTodoItemInRequest body, ActionThe request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PostAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PostAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"409", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -130,14 +159,17 @@ public async Task PostAsync(ToManyTodoItemInRequest body, Action
/// Removes existing todoItems from the ownedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
@@ -149,13 +181,16 @@ public RequestInformation ToDeleteRequestInformation(ToManyTodoItemInRequest bod
///
/// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -165,13 +200,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -180,14 +218,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Assigns existing todoItems to the ownedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters);
@@ -199,14 +240,17 @@ public RequestInformation ToPatchRequestInformation(ToManyTodoItemInRequest body
///
/// Adds existing todoItems to the ownedTodoItems relationship of an individual person.
///
+ /// A
/// The request body
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default) {
+ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default) {
+ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body, Action> requestConfiguration = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
@@ -218,14 +262,17 @@ public RequestInformation ToPostRequestInformation(ToManyTodoItemInRequest body,
///
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
///
+ /// A
/// The raw URL to use for the request builder.
- public OwnedTodoItemsRequestBuilder WithUrl(string rawUrl) {
+ public OwnedTodoItemsRequestBuilder WithUrl(string rawUrl)
+ {
return new OwnedTodoItemsRequestBuilder(rawUrl, RequestAdapter);
}
///
/// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship.
///
- public class OwnedTodoItemsRequestBuilderGetQueryParameters {
+ public class OwnedTodoItemsRequestBuilderGetQueryParameters
+ {
/// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
@@ -240,7 +287,8 @@ public class OwnedTodoItemsRequestBuilderGetQueryParameters {
///
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
- public class OwnedTodoItemsRequestBuilderHeadQueryParameters {
+ public class OwnedTodoItemsRequestBuilderHeadQueryParameters
+ {
/// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs
index f1adfee806..7788191044 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs
@@ -11,28 +11,33 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships
///
/// Builds and executes requests for operations under \api\people\{id}\relationships
///
- public class RelationshipsRequestBuilder : BaseRequestBuilder {
+ public class RelationshipsRequestBuilder : BaseRequestBuilder
+ {
/// The assignedTodoItems property
- public AssignedTodoItemsRequestBuilder AssignedTodoItems { get =>
- new AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
+ public AssignedTodoItemsRequestBuilder AssignedTodoItems
+ {
+ get => new AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
}
/// The ownedTodoItems property
- public OwnedTodoItemsRequestBuilder OwnedTodoItems { get =>
- new OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
+ public OwnedTodoItemsRequestBuilder OwnedTodoItems
+ {
+ get => new OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter);
}
///
- /// Instantiates a new RelationshipsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships", pathParameters) {
+ public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships", pathParameters)
+ {
}
///
- /// Instantiates a new RelationshipsRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships", rawUrl) {
+ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships", rawUrl)
+ {
}
}
}
diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs
index 17bf80acf6..c850739a21 100644
--- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs
+++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs
@@ -13,42 +13,55 @@ namespace OpenApiKiotaClientExample.GeneratedCode.Api.People {
///
/// Builds and executes requests for operations under \api\people
///
- public class PeopleRequestBuilder : BaseRequestBuilder {
+ public class PeopleRequestBuilder : BaseRequestBuilder
+ {
/// Gets an item from the OpenApiKiotaClientExample.GeneratedCode.api.people.item collection
/// The identifier of the person to retrieve.
- public PeopleItemRequestBuilder this[string position] { get {
- var urlTplParams = new Dictionary(PathParameters);
- urlTplParams.Add("id", position);
- return new PeopleItemRequestBuilder(urlTplParams, RequestAdapter);
- } }
+ /// A
+ public PeopleItemRequestBuilder this[string position]
+ {
+ get
+ {
+ var urlTplParams = new Dictionary(PathParameters);
+ urlTplParams.Add("id", position);
+ return new PeopleItemRequestBuilder(urlTplParams, RequestAdapter);
+ }
+ }
///
- /// Instantiates a new PeopleRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// Path parameters for the request
/// The request adapter to use to execute the requests.
- public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", pathParameters) {
+ public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", pathParameters)
+ {
}
///
- /// Instantiates a new PeopleRequestBuilder and sets the default values.
+ /// Instantiates a new and sets the default values.
///
/// The raw URL to use for the request builder.
/// The request adapter to use to execute the requests.
- public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", rawUrl) {
+ public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", rawUrl)
+ {
}
///
/// Retrieves a collection of people.
///
+ /// A
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
};
return await RequestAdapter.SendAsync(requestInfo, PersonCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
@@ -60,30 +73,41 @@ public async Task GetAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
var requestInfo = ToHeadRequestInformation(requestConfiguration);
- return await RequestAdapter.SendPrimitiveAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
+ await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false);
}
///
/// Creates a new person.
///
+ /// A
/// The request body
/// Cancellation token to use when cancelling requests
/// Configuration for the request such as headers, query parameters, and middleware options.
+ /// When receiving a 400 status code
+ /// When receiving a 403 status code
+ /// When receiving a 404 status code
+ /// When receiving a 409 status code
+ /// When receiving a 422 status code
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public async Task PostAsync(PersonPostRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(PersonPostRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#nullable restore
#else
- public async Task PostAsync(PersonPostRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) {
+ public async Task PostAsync(PersonPostRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default)
+ {
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
- var errorMapping = new Dictionary> {
+ var errorMapping = new Dictionary>
+ {
{"400", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"403", ErrorResponseDocument.CreateFromDiscriminatorValue},
{"404", ErrorResponseDocument.CreateFromDiscriminatorValue},
@@ -95,13 +119,16 @@ public async Task PostAsync(PersonPostRequestDocu
///
/// Retrieves a collection of people.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -111,13 +138,16 @@ public RequestInformation ToGetRequestInformation(Action
/// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched.
///
+ /// A
/// Configuration for the request such as headers, query parameters, and middleware options.
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
- public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action>? requestConfiguration = default)
+ {
#nullable restore
#else
- public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) {
+ public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default)
+ {
#endif
var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters);
requestInfo.Configure(requestConfiguration);
@@ -126,14 +156,17 @@ public RequestInformation ToHeadRequestInformation(Action
/// Creates a new person.
///
+ /// A