From 4107e1548be47881184fe2f769ffb34500c8414b Mon Sep 17 00:00:00 2001 From: Ali Yousefi Date: Fri, 23 Feb 2024 14:03:07 +0330 Subject: [PATCH] update packages --- .../OpenAPI.cs | 78 +++++++++++++++++++ .../OpenAPI.nswag.json | 49 ++++++++++++ ...mplateGeneratorMicroservice.Clients.csproj | 2 +- 3 files changed, 128 insertions(+), 1 deletion(-) diff --git a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.cs b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.cs index 2145023..45cce23 100644 --- a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.cs +++ b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.cs @@ -7120,6 +7120,84 @@ public virtual async System.Threading.Tasks.Task GetBigges } } + /// Success + /// A server side error occurred. + public virtual System.Threading.Tasks.Task UpdateFormValuesOnlyAsync(FormValuesContract body) + { + return UpdateFormValuesOnlyAsync(body, System.Threading.CancellationToken.None); + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// Success + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateFormValuesOnlyAsync(FormValuesContract body, System.Threading.CancellationToken cancellationToken) + { + var urlBuilder_ = new System.Text.StringBuilder(); + urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/FormValues/UpdateFormValuesOnly"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = await CreateHttpRequestMessageAsync(cancellationToken).ConfigureAwait(false)) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value); + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + /// Success /// A server side error occurred. public virtual System.Threading.Tasks.Task AddBulkAsync(FormValuesContractCreateBulkRequestContract body) diff --git a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.nswag.json b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.nswag.json index 331c075..a02235a 100644 --- a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.nswag.json +++ b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/Connected Services/TemplateGeneratorGeneratedServices/OpenAPI.nswag.json @@ -3928,6 +3928,55 @@ } } }, + "/api/FormValues/UpdateFormValuesOnly": { + "post": { + "tags": [ + "FormValues" + ], + "operationId": "UpdateFormValuesOnly", + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/FormValuesContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/FormValuesContract" + } + }, + "application/*+json": { + "schema": { + "$ref": "#/components/schemas/FormValuesContract" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "text/plain": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "application/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + }, + "text/json": { + "schema": { + "$ref": "#/components/schemas/MessageContract" + } + } + } + } + } + } + }, "/api/FormValues/AddBulk": { "post": { "tags": [ diff --git a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/EasyMicroservices.TemplateGeneratorMicroservice.Clients.csproj b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/EasyMicroservices.TemplateGeneratorMicroservice.Clients.csproj index f15eac2..c687634 100644 --- a/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/EasyMicroservices.TemplateGeneratorMicroservice.Clients.csproj +++ b/src/CSharp/EasyMicroservices.TemplateGeneratorMicroservice.Clients/EasyMicroservices.TemplateGeneratorMicroservice.Clients.csproj @@ -5,7 +5,7 @@ AnyCPU;x64;x86 EasyMicroservices true - 0.0.0.31 + 0.0.0.32 client generated code. EasyMicroservices@gmail.com Label,microservice,whitelabel,tenant,tenants