Skip to content

Commit aaeae3f

Browse files
committed
2 parents 82c3963 + cb71c4c commit aaeae3f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+334
-75
lines changed

modules/swagger-codegen/src/main/resources/csharp/README.mustache

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ This C# SDK is automatically generated by the [Swagger Codegen](https://github.c
2424
{{/supportUWP}}
2525

2626
## Dependencies
27-
- [RestSharp] (https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
28-
- [Json.NET] (https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
27+
- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later
28+
- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later
2929

3030
The DLLs included in the package may not be the latest version. We recommned using [NuGet] (https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages:
3131
```
@@ -105,6 +105,7 @@ namespace Example
105105
}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}}
106106
```
107107

108+
<a name="documentation-for-api-endpoints"></a>
108109
## Documentation for API Endpoints
109110

110111
All URIs are relative to *{{{basePath}}}*
@@ -114,6 +115,7 @@ Class | Method | HTTP request | Description
114115
{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
115116
{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
116117

118+
<a name="documentation-for-models"></a>
117119
## Documentation for Models
118120

119121
{{#modelPackage}}
@@ -126,6 +128,7 @@ No model defined in this package
126128

127129
## Documentation for Authorization
128130

131+
<a name="{{#authMethods}}{{name}}"></a>
129132
{{^authMethods}} All endpoints do not require authorization.
130133
{{/authMethods}}{{#authMethods}}{{#last}} Authentication schemes defined for the API:{{/last}}{{/authMethods}}
131134
{{#authMethods}}### {{name}}

modules/swagger-codegen/src/main/resources/csharp/api_doc.mustache

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Method | HTTP request | Description
1010

1111
{{#operations}}
1212
{{#operation}}
13+
<a name="{{{operationIdLowerCase}}}"></a>
1314
# **{{{operationId}}}**
1415
> {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}})
1516

samples/client/petstore/csharp/SwaggerClient/docs/ArrayTest.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ Name | Type | Description | Notes
66
**ArrayOfString** | **List&lt;string&gt;** | | [optional]
77
**ArrayArrayOfInteger** | **List&lt;List&lt;long?&gt;&gt;** | | [optional]
88
**ArrayArrayOfModel** | **List&lt;List&lt;ReadOnlyFirst&gt;&gt;** | | [optional]
9-
**ArrayOfEnum** | **List&lt;string&gt;** | | [optional]
109

1110
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1211

samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Method | HTTP request | Description
88
[**TestEnumQueryParameters**](FakeApi.md#testenumqueryparameters) | **GET** /fake | To test enum query parameters
99

1010

11+
<a name="testendpointparameters"></a>
1112
# **TestEndpointParameters**
1213
> void TestEndpointParameters (decimal? number, double? _double, string _string, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, byte[] binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null)
1314
@@ -90,6 +91,7 @@ No authorization required
9091

9192
[[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)
9293

94+
<a name="testenumqueryparameters"></a>
9395
# **TestEnumQueryParameters**
9496
> void TestEnumQueryParameters (string enumQueryString = null, decimal? enumQueryInteger = null, double? enumQueryDouble = null)
9597
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# IO.Swagger.Model.MapTest
2+
## Properties
3+
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**MapMapOfString** | **Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt;** | | [optional]
7+
**MapOfEnumString** | **Dictionary&lt;string, string&gt;** | | [optional]
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+

samples/client/petstore/csharp/SwaggerClient/docs/PetApi.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Method | HTTP request | Description
1414
[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image
1515

1616

17+
<a name="addpet"></a>
1718
# **AddPet**
1819
> void AddPet (Pet body)
1920
@@ -77,6 +78,7 @@ void (empty response body)
7778

7879
[[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)
7980

81+
<a name="deletepet"></a>
8082
# **DeletePet**
8183
> void DeletePet (long? petId, string apiKey = null)
8284
@@ -142,6 +144,7 @@ void (empty response body)
142144

143145
[[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)
144146

147+
<a name="findpetsbystatus"></a>
145148
# **FindPetsByStatus**
146149
> List<Pet> FindPetsByStatus (List<string> status)
147150
@@ -206,6 +209,7 @@ Name | Type | Description | Notes
206209

207210
[[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)
208211

212+
<a name="findpetsbytags"></a>
209213
# **FindPetsByTags**
210214
> List<Pet> FindPetsByTags (List<string> tags)
211215
@@ -270,6 +274,7 @@ Name | Type | Description | Notes
270274

271275
[[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)
272276

277+
<a name="getpetbyid"></a>
273278
# **GetPetById**
274279
> Pet GetPetById (long? petId)
275280
@@ -336,6 +341,7 @@ Name | Type | Description | Notes
336341

337342
[[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)
338343

344+
<a name="updatepet"></a>
339345
# **UpdatePet**
340346
> void UpdatePet (Pet body)
341347
@@ -399,6 +405,7 @@ void (empty response body)
399405

400406
[[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)
401407

408+
<a name="updatepetwithform"></a>
402409
# **UpdatePetWithForm**
403410
> void UpdatePetWithForm (long? petId, string name = null, string status = null)
404411
@@ -466,6 +473,7 @@ void (empty response body)
466473

467474
[[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)
468475

476+
<a name="uploadfile"></a>
469477
# **UploadFile**
470478
> ApiResponse UploadFile (long? petId, string additionalMetadata = null, System.IO.Stream file = null)
471479

samples/client/petstore/csharp/SwaggerClient/docs/StoreApi.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Method | HTTP request | Description
1010
[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet
1111

1212

13+
<a name="deleteorder"></a>
1314
# **DeleteOrder**
1415
> void DeleteOrder (string orderId)
1516
@@ -70,6 +71,7 @@ No authorization required
7071

7172
[[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)
7273

74+
<a name="getinventory"></a>
7375
# **GetInventory**
7476
> Dictionary<string, int?> GetInventory ()
7577
@@ -132,6 +134,7 @@ This endpoint does not need any parameter.
132134

133135
[[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)
134136

137+
<a name="getorderbyid"></a>
135138
# **GetOrderById**
136139
> Order GetOrderById (long? orderId)
137140
@@ -193,6 +196,7 @@ No authorization required
193196

194197
[[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)
195198

199+
<a name="placeorder"></a>
196200
# **PlaceOrder**
197201
> Order PlaceOrder (Order body)
198202

samples/client/petstore/csharp/SwaggerClient/docs/UserApi.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Method | HTTP request | Description
1414
[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user
1515

1616

17+
<a name="createuser"></a>
1718
# **CreateUser**
1819
> void CreateUser (User body)
1920
@@ -74,6 +75,7 @@ No authorization required
7475

7576
[[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)
7677

78+
<a name="createuserswitharrayinput"></a>
7779
# **CreateUsersWithArrayInput**
7880
> void CreateUsersWithArrayInput (List<User> body)
7981
@@ -134,6 +136,7 @@ No authorization required
134136

135137
[[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)
136138

139+
<a name="createuserswithlistinput"></a>
137140
# **CreateUsersWithListInput**
138141
> void CreateUsersWithListInput (List<User> body)
139142
@@ -194,6 +197,7 @@ No authorization required
194197

195198
[[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)
196199

200+
<a name="deleteuser"></a>
197201
# **DeleteUser**
198202
> void DeleteUser (string username)
199203
@@ -254,6 +258,7 @@ No authorization required
254258

255259
[[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)
256260

261+
<a name="getuserbyname"></a>
257262
# **GetUserByName**
258263
> User GetUserByName (string username)
259264
@@ -315,6 +320,7 @@ No authorization required
315320

316321
[[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)
317322

323+
<a name="loginuser"></a>
318324
# **LoginUser**
319325
> string LoginUser (string username, string password)
320326
@@ -378,6 +384,7 @@ No authorization required
378384

379385
[[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)
380386

387+
<a name="logoutuser"></a>
381388
# **LogoutUser**
382389
> void LogoutUser ()
383390
@@ -434,6 +441,7 @@ No authorization required
434441

435442
[[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)
436443

444+
<a name="updateuser"></a>
437445
# **UpdateUser**
438446
> void UpdateUser (string username, User body)
439447
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/*
2+
* Swagger Petstore
3+
*
4+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
5+
*
6+
* OpenAPI spec version: 1.0.0
7+
* Contact: [email protected]
8+
* Generated by: https://github.com/swagger-api/swagger-codegen.git
9+
*
10+
* Licensed under the Apache License, Version 2.0 (the "License");
11+
* you may not use this file except in compliance with the License.
12+
* You may obtain a copy of the License at
13+
*
14+
* http://www.apache.org/licenses/LICENSE-2.0
15+
*
16+
* Unless required by applicable law or agreed to in writing, software
17+
* distributed under the License is distributed on an "AS IS" BASIS,
18+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19+
* See the License for the specific language governing permissions and
20+
* limitations under the License.
21+
*/
22+
23+
24+
using NUnit.Framework;
25+
26+
using System;
27+
using System.Linq;
28+
using System.IO;
29+
using System.Collections.Generic;
30+
using IO.Swagger.Api;
31+
using IO.Swagger.Model;
32+
using IO.Swagger.Client;
33+
using System.Reflection;
34+
35+
namespace IO.Swagger.Test
36+
{
37+
/// <summary>
38+
/// Class for testing MapTest
39+
/// </summary>
40+
/// <remarks>
41+
/// This file is automatically generated by Swagger Codegen.
42+
/// Please update the test case below to test the model.
43+
/// </remarks>
44+
[TestFixture]
45+
public class MapTestTests
46+
{
47+
// TODO uncomment below to declare an instance variable for MapTest
48+
//private MapTest instance;
49+
50+
/// <summary>
51+
/// Setup before each test
52+
/// </summary>
53+
[SetUp]
54+
public void Init()
55+
{
56+
// TODO uncomment below to create an instance of MapTest
57+
//instance = new MapTest();
58+
}
59+
60+
/// <summary>
61+
/// Clean up after each test
62+
/// </summary>
63+
[TearDown]
64+
public void Cleanup()
65+
{
66+
67+
}
68+
69+
/// <summary>
70+
/// Test an instance of MapTest
71+
/// </summary>
72+
[Test]
73+
public void MapTestInstanceTest()
74+
{
75+
// TODO uncomment below to test "IsInstanceOfType" MapTest
76+
//Assert.IsInstanceOfType<MapTest> (instance, "variable 'instance' is a MapTest");
77+
}
78+
79+
/// <summary>
80+
/// Test the property 'MapMapOfString'
81+
/// </summary>
82+
[Test]
83+
public void MapMapOfStringTest()
84+
{
85+
// TODO unit test for the property 'MapMapOfString'
86+
}
87+
/// <summary>
88+
/// Test the property 'MapOfEnumString'
89+
/// </summary>
90+
[Test]
91+
public void MapOfEnumStringTest()
92+
{
93+
// TODO unit test for the property 'MapOfEnumString'
94+
}
95+
96+
}
97+
98+
}

samples/client/petstore/csharp/SwaggerClient/src/IO.Swagger/Api/FakeApi.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* Swagger Petstore
33
*
4-
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
4+
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
55
*
66
* OpenAPI spec version: 1.0.0
77
* Contact: [email protected]

0 commit comments

Comments
 (0)