mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
update map to use String instead of string
This commit is contained in:
parent
46f78f2180
commit
16afd4ee9b
@ -218,7 +218,7 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig
|
||||
MapProperty mp = (MapProperty) p;
|
||||
Property inner = mp.getAdditionalProperties();
|
||||
|
||||
return getSwaggerType(p) + "<String, " + getTypeDeclaration(inner) + ">";
|
||||
return getSwaggerType(p) + "<string, " + getTypeDeclaration(inner) + ">";
|
||||
}
|
||||
return super.getTypeDeclaration(p);
|
||||
}
|
||||
|
@ -175,9 +175,8 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path</param>
|
||||
/// <value>The base path</value>
|
||||
public String GetBasePath(String basePath)
|
||||
public String GetBasePath()
|
||||
{
|
||||
return this.ApiClient.BasePath;
|
||||
}
|
||||
|
@ -14,14 +14,14 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <returns>Dictionary<String, int?></returns>
|
||||
Dictionary<String, int?> GetInventory ();
|
||||
/// <returns>Dictionary<string, int?></returns>
|
||||
Dictionary<string, int?> GetInventory ();
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <returns>Dictionary<String, int?></returns>
|
||||
System.Threading.Tasks.Task<Dictionary<String, int?>> GetInventoryAsync ();
|
||||
/// <returns>Dictionary<string, int?></returns>
|
||||
System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
|
||||
|
||||
/// <summary>
|
||||
/// Place an order for a pet
|
||||
@ -107,9 +107,8 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path</param>
|
||||
/// <value>The base path</value>
|
||||
public String GetBasePath(String basePath)
|
||||
public String GetBasePath()
|
||||
{
|
||||
return this.ApiClient.BasePath;
|
||||
}
|
||||
@ -124,8 +123,8 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <returns>Dictionary<String, int?></returns>
|
||||
public Dictionary<String, int?> GetInventory ()
|
||||
/// <returns>Dictionary<string, int?></returns>
|
||||
public Dictionary<string, int?> GetInventory ()
|
||||
{
|
||||
|
||||
|
||||
@ -156,14 +155,14 @@ namespace IO.Swagger.Api
|
||||
else if (((int)response.StatusCode) == 0)
|
||||
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage);
|
||||
|
||||
return (Dictionary<String, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>), response.Headers);
|
||||
return (Dictionary<string, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<string, int?>), response.Headers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns pet inventories by status Returns a map of status codes to quantities
|
||||
/// </summary>
|
||||
/// <returns>Dictionary<String, int?></returns>
|
||||
public async System.Threading.Tasks.Task<Dictionary<String, int?>> GetInventoryAsync ()
|
||||
/// <returns>Dictionary<string, int?></returns>
|
||||
public async System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ()
|
||||
{
|
||||
|
||||
|
||||
@ -191,7 +190,7 @@ namespace IO.Swagger.Api
|
||||
if (((int)response.StatusCode) >= 400)
|
||||
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.Content, response.Content);
|
||||
|
||||
return (Dictionary<String, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<String, int?>), response.Headers);
|
||||
return (Dictionary<string, int?>) ApiClient.Deserialize(response.Content, typeof(Dictionary<string, int?>), response.Headers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,14 +84,14 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <returns>User</returns>
|
||||
User GetUserByName (string username);
|
||||
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <returns>User</returns>
|
||||
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username);
|
||||
|
||||
@ -167,9 +167,8 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <param name="basePath">The base path</param>
|
||||
/// <value>The base path</value>
|
||||
public String GetBasePath(String basePath)
|
||||
public String GetBasePath()
|
||||
{
|
||||
return this.ApiClient.BasePath;
|
||||
}
|
||||
@ -573,7 +572,7 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <returns>User</returns>
|
||||
public User GetUserByName (string username)
|
||||
{
|
||||
@ -616,7 +615,7 @@ namespace IO.Swagger.Api
|
||||
/// <summary>
|
||||
/// Get user by user name
|
||||
/// </summary>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing. </param>
|
||||
/// <param name="username">The name that needs to be fetched. Use user1 for testing.</param>
|
||||
/// <returns>User</returns>
|
||||
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username)
|
||||
{
|
||||
|
@ -170,7 +170,7 @@ namespace IO.Swagger.Client
|
||||
/// <returns>Escaped string.</returns>
|
||||
public string EscapeString(string str)
|
||||
{
|
||||
return RestSharp.Extensions.StringExtensions.UrlDecode(str);
|
||||
return RestSharp.Extensions.StringExtensions.UrlEncode(str);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -2,7 +2,7 @@
|
||||
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
|
||||
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
|
||||
<Files>
|
||||
<File FileName="TestPet.cs" Line="68" Column="30" />
|
||||
<File FileName="TestPet.cs" Line="1" Column="1" />
|
||||
</Files>
|
||||
</MonoDevelop.Ide.Workbench>
|
||||
<MonoDevelop.Ide.DebuggingService.Breakpoints>
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user