From 6075f078b69bbab566787b3a0e3d28f152352f13 Mon Sep 17 00:00:00 2001 From: wing328 Date: Thu, 21 Apr 2016 17:18:44 +0800 Subject: [PATCH 1/2] minor fix to constructor --- .../src/main/resources/csharp/model.mustache | 2 +- .../Lib/SwaggerClient.Test/NameTests.cs | 8 ++++++++ .../Lib/SwaggerClient/README.md | 10 ++++++---- .../Lib/SwaggerClient/docs/Animal.md | 3 ++- .../Lib/SwaggerClient/docs/ApiResponse.md | 3 ++- .../Lib/SwaggerClient/docs/Cat.md | 3 ++- .../Lib/SwaggerClient/docs/Category.md | 3 ++- .../Lib/SwaggerClient/docs/Dog.md | 3 ++- .../Lib/SwaggerClient/docs/FormatTest.md | 3 ++- .../Lib/SwaggerClient/docs/Model200Response.md | 3 ++- .../Lib/SwaggerClient/docs/ModelReturn.md | 3 ++- .../Lib/SwaggerClient/docs/Name.md | 4 +++- .../Lib/SwaggerClient/docs/Order.md | 3 ++- .../Lib/SwaggerClient/docs/Pet.md | 3 ++- .../Lib/SwaggerClient/docs/PetApi.md | 16 ++++++++++++++++ .../Lib/SwaggerClient/docs/SpecialModelName.md | 3 ++- .../Lib/SwaggerClient/docs/StoreApi.md | 8 ++++++++ .../Lib/SwaggerClient/docs/Tag.md | 3 ++- .../Lib/SwaggerClient/docs/User.md | 3 ++- .../Lib/SwaggerClient/docs/UserApi.md | 16 ++++++++++++++++ .../src/main/csharp/IO/Swagger/Model/Name.cs | 18 +++++++++++++++++- ...rClientTest.csproj.FilesWrittenAbsolute.txt | 6 +++--- 22 files changed, 104 insertions(+), 23 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/csharp/model.mustache b/modules/swagger-codegen/src/main/resources/csharp/model.mustache index 3626da0f1c45..6d0878958471 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/model.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/model.mustache @@ -41,7 +41,7 @@ namespace {{packageName}}.Model /// {{#vars}}{{^isReadOnly}} /// {{#description}}{{description}}{{/description}}{{^description}}{{name}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{defaultValue}}){{/defaultValue}}. {{/isReadOnly}}{{/vars}} - public {{classname}}({{#vars}}{{^isReadOnly}}{{{datatypeWithEnum}}} {{name}} = null{{#hasMoreNonReadOnly}}, {{/hasMoreNonReadOnly}}{{/isReadOnly}}{{/vars}}) + public {{classname}}({{#vars}}{{^isReadOnly}}{{{datatypeWithEnum}}} {{name}} = null{{/isReadOnly}}{{#hasMoreNonReadOnly}}, {{/hasMoreNonReadOnly}}{{/vars}}) { {{#vars}}{{^isReadOnly}}{{#required}}// to ensure "{{name}}" is required (not null) if ({{name}} == null) diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs index 896cb8f12bff..c6c68253ca0e 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient.Test/NameTests.cs @@ -66,6 +66,14 @@ namespace IO.Swagger.Test { // TODO: unit test for the property 'SnakeCase' } + /// + /// Test the property 'Property' + /// + [Test] + public void PropertyTest() + { + // TODO: unit test for the property 'Property' + } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md index a73dec9973a4..81bd746a9b94 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md @@ -1,11 +1,12 @@ # IO.Swagger - the C# library for the Swagger Petstore + This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. This C# SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project: - API version: 1.0.0 -- Package version: 1.0.0 -- Build date: 2016-04-17T23:54:21.676+08:00 +- SDK version: 1.0.0 +- Build date: 2016-04-21T17:03:44.297+08:00 - Build package: class io.swagger.codegen.languages.CSharpClientCodegen ## Frameworks supported @@ -29,10 +30,11 @@ Run the following command to generate the DLL - [Mac/Linux] `/bin/sh compile-mono.sh` - [Windows] `compile.bat` -Then include the DLL (under the `bin` folder) in the C# project, and import the packages: +Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: ```csharp using IO.Swagger.Api; using IO.Swagger.Client; +using IO.Swagger.Model; ``` ## Getting Started @@ -42,7 +44,7 @@ using System; using System.Diagnostics; using IO.Swagger.Api; using IO.Swagger.Client; - +using IO.Swagger.Model; namespace Example { diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md index ef6727b89c4a..46eb96c05f42 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Animal.md @@ -1,8 +1,9 @@ # IO.Swagger.Model.Animal - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **ClassName** | **string** | | +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md index 4a551f439987..3e4b4c5e9cbb 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ApiResponse.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.ApiResponse - ## Properties Name | Type | Description | Notes @@ -8,3 +7,5 @@ Name | Type | Description | Notes **Type** | **string** | | [optional] **Message** | **string** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md index 0acd66d65304..e0034d4ab5d0 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Cat.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Cat - ## Properties Name | Type | Description | Notes @@ -7,3 +6,5 @@ Name | Type | Description | Notes **ClassName** | **string** | | **Declawed** | **bool?** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md index d0ebf1a1ec7e..20b56b1728c1 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Category.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Category - ## Properties Name | Type | Description | Notes @@ -7,3 +6,5 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md index 12949333e192..0acf4182d942 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Dog.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Dog - ## Properties Name | Type | Description | Notes @@ -7,3 +6,5 @@ Name | Type | Description | Notes **ClassName** | **string** | | **Breed** | **string** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md index b32763555077..d29dc6b5d795 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/FormatTest.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.FormatTest - ## Properties Name | Type | Description | Notes @@ -17,3 +16,5 @@ Name | Type | Description | Notes **DateTime** | **DateTime?** | | [optional] **Password** | **string** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md index 647d981bc529..5cd7e66ea7ea 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Model200Response.md @@ -1,8 +1,9 @@ # IO.Swagger.Model.Model200Response - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **Name** | **int?** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md index 859f217de9d4..9895ccde2b0c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/ModelReturn.md @@ -1,8 +1,9 @@ # IO.Swagger.Model.ModelReturn - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Return** | **int?** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md index a2b0df80869c..6cb961b6fcf9 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Name.md @@ -1,9 +1,11 @@ # IO.Swagger.Model.Name - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **_Name** | **int?** | | **SnakeCase** | **int?** | | [optional] +**Property** | **string** | | [optional] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md index b4ffb22e6bb2..32aeab388e52 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Order.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Order - ## Properties Name | Type | Description | Notes @@ -11,3 +10,5 @@ Name | Type | Description | Notes **Status** | **string** | Order Status | [optional] **Complete** | **bool?** | | [optional] [default to false] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md index 74d7b6caca77..e83933d1c60a 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Pet.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Pet - ## Properties Name | Type | Description | Notes @@ -11,3 +10,5 @@ Name | Type | Description | Notes **Tags** | [**List<Tag>**](Tag.md) | | [optional] **Status** | **string** | pet status in the store | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md index 46b1d566ba12..22255f593624 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md @@ -75,6 +75,8 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeletePet** > void DeletePet (long? petId, string apiKey = null) @@ -138,6 +140,8 @@ void (empty response body) - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **FindPetsByStatus** > List FindPetsByStatus (List status) @@ -200,6 +204,8 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **FindPetsByTags** > List FindPetsByTags (List tags) @@ -262,6 +268,8 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **GetPetById** > Pet GetPetById (long? petId) @@ -326,6 +334,8 @@ Name | Type | Description | Notes - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **UpdatePet** > void UpdatePet (Pet body) @@ -387,6 +397,8 @@ void (empty response body) - **Content-Type**: application/json, application/xml - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **UpdatePetWithForm** > void UpdatePetWithForm (long? petId, string name = null, string status = null) @@ -452,6 +464,8 @@ void (empty response body) - **Content-Type**: application/x-www-form-urlencoded - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **UploadFile** > ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null) @@ -518,3 +532,5 @@ Name | Type | Description | Notes - **Content-Type**: multipart/form-data - **Accept**: application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md index 1d6f2f252de8..ee1bc3168353 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/SpecialModelName.md @@ -1,8 +1,9 @@ # IO.Swagger.Model.SpecialModelName - ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **SpecialPropertyName** | **long?** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md index 382e56160ebe..5b12c672a359 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md @@ -68,6 +68,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **GetInventory** > Dictionary GetInventory () @@ -128,6 +130,8 @@ This endpoint does not need any parameter. - **Content-Type**: Not defined - **Accept**: application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **GetOrderById** > Order GetOrderById (long? orderId) @@ -187,6 +191,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **PlaceOrder** > Order PlaceOrder (Order body) @@ -246,3 +252,5 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md index a68cd6f0ecc5..64c5e6bdc720 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/Tag.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.Tag - ## Properties Name | Type | Description | Notes @@ -7,3 +6,5 @@ Name | Type | Description | Notes **Id** | **long?** | | [optional] **Name** | **string** | | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md index 54485476d2f3..fbea33c48b92 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/User.md @@ -1,5 +1,4 @@ # IO.Swagger.Model.User - ## Properties Name | Type | Description | Notes @@ -13,3 +12,5 @@ Name | Type | Description | Notes **Phone** | **string** | | [optional] **UserStatus** | **int?** | User Status | [optional] +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md index 11061b7a1e2c..0ba0d6357ec9 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md @@ -72,6 +72,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **CreateUsersWithArrayInput** > void CreateUsersWithArrayInput (List body) @@ -130,6 +132,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **CreateUsersWithListInput** > void CreateUsersWithListInput (List body) @@ -188,6 +192,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **DeleteUser** > void DeleteUser (string username) @@ -246,6 +252,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **GetUserByName** > User GetUserByName (string username) @@ -305,6 +313,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **LoginUser** > string LoginUser (string username, string password) @@ -366,6 +376,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **LogoutUser** > void LogoutUser () @@ -420,6 +432,8 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **UpdateUser** > void UpdateUser (string username, User body) @@ -480,3 +494,5 @@ No authorization required - **Content-Type**: Not defined - **Accept**: application/xml, application/json +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs index f9138390e3e2..fe9c89588c98 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/src/main/csharp/IO/Swagger/Model/Name.cs @@ -23,8 +23,9 @@ namespace IO.Swagger.Model /// Initializes a new instance of the class. /// /// _Name (required). + /// Property. - public Name(int? _Name = null) + public Name(int? _Name = null, string Property = null) { // to ensure "_Name" is required (not null) if (_Name == null) @@ -35,6 +36,7 @@ namespace IO.Swagger.Model { this._Name = _Name; } + this.Property = Property; } @@ -51,6 +53,12 @@ namespace IO.Swagger.Model [DataMember(Name="snake_case", EmitDefaultValue=false)] public int? SnakeCase { get; private set; } + /// + /// Gets or Sets Property + /// + [DataMember(Name="property", EmitDefaultValue=false)] + public string Property { get; set; } + /// /// Returns the string presentation of the object /// @@ -61,6 +69,7 @@ namespace IO.Swagger.Model sb.Append("class Name {\n"); sb.Append(" _Name: ").Append(_Name).Append("\n"); sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); + sb.Append(" Property: ").Append(Property).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -106,6 +115,11 @@ namespace IO.Swagger.Model this.SnakeCase == other.SnakeCase || this.SnakeCase != null && this.SnakeCase.Equals(other.SnakeCase) + ) && + ( + this.Property == other.Property || + this.Property != null && + this.Property.Equals(other.Property) ); } @@ -124,6 +138,8 @@ namespace IO.Swagger.Model hash = hash * 59 + this._Name.GetHashCode(); if (this.SnakeCase != null) hash = hash * 59 + this.SnakeCase.GetHashCode(); + if (this.Property != null) + hash = hash * 59 + this.Property.GetHashCode(); return hash; } } diff --git a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt index 0991d15f1187..323cad108c6b 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt +++ b/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.csproj.FilesWrittenAbsolute.txt @@ -1,9 +1,9 @@ /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/.NETFramework,Version=v4.5.AssemblyAttribute.cs /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.swagger-logo.png -/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll -/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll -/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll.mdb /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/SwaggerClientTest.dll /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll /Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/obj/Debug/SwaggerClientTest.dll.mdb +/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/Newtonsoft.Json.dll +/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/nunit.framework.dll +/Users/williamcheng/Code/swagger-codegen/samples/client/petstore/csharp/SwaggerClientTest/bin/Debug/RestSharp.dll From c4b32f24cf762091c2d82b23cd0e33d531295edf Mon Sep 17 00:00:00 2001 From: wing328 Date: Thu, 21 Apr 2016 17:23:36 +0800 Subject: [PATCH 2/2] remove trailing space --- .../src/main/resources/csharp/api_doc.mustache | 2 +- .../Lib/SwaggerClient/README.md | 2 +- .../Lib/SwaggerClient/docs/PetApi.md | 16 ++++++++-------- .../Lib/SwaggerClient/docs/StoreApi.md | 8 ++++---- .../Lib/SwaggerClient/docs/UserApi.md | 16 ++++++++-------- 5 files changed, 22 insertions(+), 22 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache index f1b3c15e6161..e445191085a3 100644 --- a/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache @@ -17,7 +17,7 @@ Method | HTTP request | Description {{{notes}}}{{/notes}} -### Example +### Example ```csharp using System; using System.Diagnostics; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md index 81bd746a9b94..a5c2cd333598 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/README.md @@ -6,7 +6,7 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c - API version: 1.0.0 - SDK version: 1.0.0 -- Build date: 2016-04-21T17:03:44.297+08:00 +- Build date: 2016-04-21T17:22:44.115+08:00 - Build package: class io.swagger.codegen.languages.CSharpClientCodegen ## Frameworks supported diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md index 22255f593624..6d05169a4ccf 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/PetApi.md @@ -21,7 +21,7 @@ Add a new pet to the store -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -84,7 +84,7 @@ Deletes a pet -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -149,7 +149,7 @@ Finds Pets by status Multiple status values can be provided with comma separated strings -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -213,7 +213,7 @@ Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -277,7 +277,7 @@ Find pet by ID Returns a single pet -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -343,7 +343,7 @@ Update an existing pet -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -406,7 +406,7 @@ Updates a pet in the store with form data -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -473,7 +473,7 @@ uploads an image -### Example +### Example ```csharp using System; using System.Diagnostics; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md index 5b12c672a359..f558166ecb04 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/StoreApi.md @@ -17,7 +17,7 @@ Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -77,7 +77,7 @@ Returns pet inventories by status Returns a map of status codes to quantities -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -139,7 +139,7 @@ Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -200,7 +200,7 @@ Place an order for a pet -### Example +### Example ```csharp using System; using System.Diagnostics; diff --git a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md index 0ba0d6357ec9..65c22f9f072c 100644 --- a/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md +++ b/samples/client/petstore/csharp/SwaggerClientTest/Lib/SwaggerClient/docs/UserApi.md @@ -21,7 +21,7 @@ Create user This can only be done by the logged in user. -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -81,7 +81,7 @@ Creates list of users with given input array -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -141,7 +141,7 @@ Creates list of users with given input array -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -201,7 +201,7 @@ Delete user This can only be done by the logged in user. -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -261,7 +261,7 @@ Get user by user name -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -322,7 +322,7 @@ Logs user into the system -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -385,7 +385,7 @@ Logs out current logged in user session -### Example +### Example ```csharp using System; using System.Diagnostics; @@ -441,7 +441,7 @@ Updated user This can only be done by the logged in user. -### Example +### Example ```csharp using System; using System.Diagnostics;