Skip to content

Commit

Permalink
Apply requested change
Browse files Browse the repository at this point in the history
  • Loading branch information
MahdiyarGHD committed Nov 21, 2023
1 parent 7256a6f commit 9120c42
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4725,18 +4725,18 @@ public string BaseUrl

/// <returns>Success</returns>
/// <exception cref="ApiException">A server side error occurred.</exception>
public virtual System.Threading.Tasks.Task<UserContractMessageContract> UserHasExistsByUsernameAsync(UserHasExistsByUsernameRequestContract body)
public virtual System.Threading.Tasks.Task<UserContractMessageContract> GetUserByUserNameAsync(GetUserByUserNameRequestContract body)
{
return UserHasExistsByUsernameAsync(body, System.Threading.CancellationToken.None);
return GetUserByUserNameAsync(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<UserContractMessageContract> UserHasExistsByUsernameAsync(UserHasExistsByUsernameRequestContract body, System.Threading.CancellationToken cancellationToken)
public virtual async System.Threading.Tasks.Task<UserContractMessageContract> GetUserByUserNameAsync(GetUserByUserNameRequestContract body, System.Threading.CancellationToken cancellationToken)
{
var urlBuilder_ = new System.Text.StringBuilder();
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/UserHasExistsByUsername");
urlBuilder_.Append(BaseUrl != null ? BaseUrl.TrimEnd('/') : "").Append("/api/Users/GetUserByUserName");

var client_ = _httpClient;
var disposeClient_ = false;
Expand Down Expand Up @@ -6898,6 +6898,36 @@ public enum GetUniqueIdentityType

}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")]
public partial class GetUserByUserNameRequestContract : System.ComponentModel.INotifyPropertyChanged
{
private string _username;

[Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Username
{
get { return _username; }

set
{
if (_username != value)
{
_username = value;
RaisePropertyChanged();
}
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")]
public partial class Int64DeleteBulkRequestContract : System.ComponentModel.INotifyPropertyChanged
{
Expand Down Expand Up @@ -8606,36 +8636,6 @@ protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.Cal
}
}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")]
public partial class UserHasExistsByUsernameRequestContract : System.ComponentModel.INotifyPropertyChanged
{
private string _username;

[Newtonsoft.Json.JsonProperty("username", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
public string Username
{
get { return _username; }

set
{
if (_username != value)
{
_username = value;
RaisePropertyChanged();
}
}
}

public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;

protected virtual void RaisePropertyChanged([System.Runtime.CompilerServices.CallerMemberName] string propertyName = null)
{
var handler = PropertyChanged;
if (handler != null)
handler(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "13.19.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.3.0))")]
public partial class UserRoleContract : System.ComponentModel.INotifyPropertyChanged
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2526,27 +2526,27 @@
}
}
},
"/api/Users/UserHasExistsByUsername": {
"/api/Users/GetUserByUserName": {
"post": {
"tags": [
"Users"
],
"operationId": "UserHasExistsByUsername",
"operationId": "GetUserByUserName",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UserHasExistsByUsernameRequestContract"
"$ref": "#/components/schemas/GetUserByUserNameRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/UserHasExistsByUsernameRequestContract"
"$ref": "#/components/schemas/GetUserByUserNameRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/UserHasExistsByUsernameRequestContract"
"$ref": "#/components/schemas/GetUserByUserNameRequestContract"
}
}
}
Expand Down Expand Up @@ -3623,6 +3623,16 @@
7
]
},
"GetUserByUserNameRequestContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"username": {
"type": "string",
"nullable": true
}
}
},
"Int64DeleteBulkRequestContract": {
"title": "DeleteBulkRequestContract<Int64>",
"type": "object",
Expand Down Expand Up @@ -4145,16 +4155,6 @@
}
}
},
"UserHasExistsByUsernameRequestContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"username": {
"type": "string",
"nullable": true
}
}
},
"UserRoleContract": {
"type": "object",
"additionalProperties": false,
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.12</Version>
<Version>0.0.0.13</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,auth,authentication,client</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace EasyMicroservices.AuthenticationsMicroservice.Contracts.Requests
{
public class UserHasExistsByUsernameRequestContract
public class GetUserByUserNameRequestContract
{
public string Username { get; set; }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public UsersController(IUnitOfWork unitOfWork/*, IJWTManager jwtManager*/) : bas
}

[HttpPost]
public async Task<MessageContract<UserContract>> UserHasExistsByUsername(UserHasExistsByUsernameRequestContract request)
public async Task<MessageContract<UserContract>> GetUserByUserName(GetUserByUserNameRequestContract request)
{
return await _unitOfWork.GetContractLogic<UserEntity, AddUserRequestContract, UserContract, UserContract, long>().GetBy(x => x.UserName == request.Username);
}
Expand Down

0 comments on commit 9120c42

Please sign in to comment.