update map to use String instead of string

This commit is contained in:
wing328 2015-09-11 18:02:51 +08:00
parent 46f78f2180
commit 16afd4ee9b
10 changed files with 20 additions and 23 deletions

View File

@ -218,7 +218,7 @@ public class CSharpClientCodegen extends DefaultCodegen implements CodegenConfig
MapProperty mp = (MapProperty) p; MapProperty mp = (MapProperty) p;
Property inner = mp.getAdditionalProperties(); Property inner = mp.getAdditionalProperties();
return getSwaggerType(p) + "<String, " + getTypeDeclaration(inner) + ">"; return getSwaggerType(p) + "<string, " + getTypeDeclaration(inner) + ">";
} }
return super.getTypeDeclaration(p); return super.getTypeDeclaration(p);
} }

View File

@ -175,9 +175,8 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Gets the base path of the API client. /// Gets the base path of the API client.
/// </summary> /// </summary>
/// <param name="basePath">The base path</param>
/// <value>The base path</value> /// <value>The base path</value>
public String GetBasePath(String basePath) public String GetBasePath()
{ {
return this.ApiClient.BasePath; return this.ApiClient.BasePath;
} }

View File

@ -14,14 +14,14 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities /// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary> /// </summary>
/// <returns>Dictionary<String, int?></returns> /// <returns>Dictionary<string, int?></returns>
Dictionary<String, int?> GetInventory (); Dictionary<string, int?> GetInventory ();
/// <summary> /// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities /// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary> /// </summary>
/// <returns>Dictionary<String, int?></returns> /// <returns>Dictionary<string, int?></returns>
System.Threading.Tasks.Task<Dictionary<String, int?>> GetInventoryAsync (); System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ();
/// <summary> /// <summary>
/// Place an order for a pet /// Place an order for a pet
@ -107,9 +107,8 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Gets the base path of the API client. /// Gets the base path of the API client.
/// </summary> /// </summary>
/// <param name="basePath">The base path</param>
/// <value>The base path</value> /// <value>The base path</value>
public String GetBasePath(String basePath) public String GetBasePath()
{ {
return this.ApiClient.BasePath; return this.ApiClient.BasePath;
} }
@ -124,8 +123,8 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities /// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary> /// </summary>
/// <returns>Dictionary<String, int?></returns> /// <returns>Dictionary<string, int?></returns>
public Dictionary<String, int?> GetInventory () public Dictionary<string, int?> GetInventory ()
{ {
@ -156,14 +155,14 @@ namespace IO.Swagger.Api
else if (((int)response.StatusCode) == 0) else if (((int)response.StatusCode) == 0)
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.ErrorMessage, response.ErrorMessage); 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> /// <summary>
/// Returns pet inventories by status Returns a map of status codes to quantities /// Returns pet inventories by status Returns a map of status codes to quantities
/// </summary> /// </summary>
/// <returns>Dictionary<String, int?></returns> /// <returns>Dictionary<string, int?></returns>
public async System.Threading.Tasks.Task<Dictionary<String, int?>> GetInventoryAsync () public async System.Threading.Tasks.Task<Dictionary<string, int?>> GetInventoryAsync ()
{ {
@ -191,7 +190,7 @@ namespace IO.Swagger.Api
if (((int)response.StatusCode) >= 400) if (((int)response.StatusCode) >= 400)
throw new ApiException ((int)response.StatusCode, "Error calling GetInventory: " + response.Content, response.Content); 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> /// <summary>

View File

@ -84,14 +84,14 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Get user by user name /// Get user by user name
/// </summary> /// </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> /// <returns>User</returns>
User GetUserByName (string username); User GetUserByName (string username);
/// <summary> /// <summary>
/// Get user by user name /// Get user by user name
/// </summary> /// </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> /// <returns>User</returns>
System.Threading.Tasks.Task<User> GetUserByNameAsync (string username); System.Threading.Tasks.Task<User> GetUserByNameAsync (string username);
@ -167,9 +167,8 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Gets the base path of the API client. /// Gets the base path of the API client.
/// </summary> /// </summary>
/// <param name="basePath">The base path</param>
/// <value>The base path</value> /// <value>The base path</value>
public String GetBasePath(String basePath) public String GetBasePath()
{ {
return this.ApiClient.BasePath; return this.ApiClient.BasePath;
} }
@ -573,7 +572,7 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Get user by user name /// Get user by user name
/// </summary> /// </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> /// <returns>User</returns>
public User GetUserByName (string username) public User GetUserByName (string username)
{ {
@ -616,7 +615,7 @@ namespace IO.Swagger.Api
/// <summary> /// <summary>
/// Get user by user name /// Get user by user name
/// </summary> /// </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> /// <returns>User</returns>
public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username) public async System.Threading.Tasks.Task<User> GetUserByNameAsync (string username)
{ {

View File

@ -170,7 +170,7 @@ namespace IO.Swagger.Client
/// <returns>Escaped string.</returns> /// <returns>Escaped string.</returns>
public string EscapeString(string str) public string EscapeString(string str)
{ {
return RestSharp.Extensions.StringExtensions.UrlDecode(str); return RestSharp.Extensions.StringExtensions.UrlEncode(str);
} }
/// <summary> /// <summary>

View File

@ -2,7 +2,7 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" />
<MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs"> <MonoDevelop.Ide.Workbench ActiveDocument="TestPet.cs">
<Files> <Files>
<File FileName="TestPet.cs" Line="68" Column="30" /> <File FileName="TestPet.cs" Line="1" Column="1" />
</Files> </Files>
</MonoDevelop.Ide.Workbench> </MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints> <MonoDevelop.Ide.DebuggingService.Breakpoints>