Skip to content

Commit

Permalink
Merge pull request #16 from MahdiyarGHD/develop
Browse files Browse the repository at this point in the history
update HasKey
  • Loading branch information
Ali-YousefiTelori authored Sep 3, 2023
2 parents ba49849 + f9f2aeb commit 976b71a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,18 @@ public string BaseUrl

/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System.Threading.Tasks.Task<MessageContract> IsKeyExistsAsync(IsKeyExistRequestContract body)
public virtual System.Threading.Tasks.Task<CategoryContractMessageContract> HasKeyAsync(IsKeyExistRequestContract body)
{
return IsKeyExistsAsync(body, System.Threading.CancellationToken.None);
return HasKeyAsync(body, System.Threading.CancellationToken.None);
}

/// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual async System.Threading.Tasks.Task<MessageContract> IsKeyExistsAsync(IsKeyExistRequestContract body, System.Threading.CancellationToken cancellationToken)
public virtual async System.Threading.Tasks.Task<CategoryContractMessageContract> HasKeyAsync(IsKeyExistRequestContract body, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Category/IsKeyExists");
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Category/HasKey");

var client_ = _httpClient;
var disposeClient_ = false;
Expand Down Expand Up @@ -104,7 +104,7 @@ public virtual async System.Threading.Tasks.Task<MessageContract> IsKeyExistsAsy
var status_ = (int)response_.StatusCode;
if (status_ == 200)
{
var objectResponse_ = await ReadObjectResponseAsync<MessageContract>(response_, headers_, cancellationToken).ConfigureAwait(false);
var objectResponse_ = await ReadObjectResponseAsync<CategoryContractMessageContract>(response_, headers_, cancellationToken).ConfigureAwait(false);
if (objectResponse_.Object == null)
{
throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
"version": "1.0"
},
"paths": {
"/api/Category/IsKeyExists": {
"/api/Category/HasKey": {
"post": {
"tags": [
"Category"
],
"operationId": "IsKeyExists",
"operationId": "HasKey",
"requestBody": {
"content": {
"application/json": {
Expand All @@ -36,17 +36,17 @@
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/CategoryContractMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/CategoryContractMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
"$ref": "#/components/schemas/CategoryContractMessageContract"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.0.0.7</Version>
<Version>0.0.0.8</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,Content,Contents,client</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public CategoryController(IContractLogic<CategoryEntity, CreateCategoryRequestCo


[HttpPost]
public async Task<MessageContract> IsKeyExists(IsKeyExistRequestContract request)
public async Task<MessageContract<CategoryContract>> HasKey(IsKeyExistRequestContract request)
{
var isKeyExists = await _contractlogic.GetBy(o => o.Key == request.Key);

Expand Down

0 comments on commit 976b71a

Please sign in to comment.