Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated csharp samples with security dependency issue fixed #11902

Merged
merged 1 commit into from
Sep 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.25-SNAPSHOT
3.0.36-SNAPSHOT
19 changes: 10 additions & 9 deletions samples/client/petstore/csharp/SwaggerClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,26 +147,24 @@ Class | Method | HTTP request | Description
- [Model.AllOfSubCategoryPetsItems](docs/AllOfSubCategoryPetsItems.md)
- [Model.AllPetsResponse](docs/AllPetsResponse.md)
- [Model.Animal](docs/Animal.md)
- [Model.AnimalAnimalIdBody](docs/AnimalAnimalIdBody.md)
- [Model.AnimalFarm](docs/AnimalFarm.md)
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [Model.ArrayTest](docs/ArrayTest.md)
- [Model.Body](docs/Body.md)
- [Model.Body1](docs/Body1.md)
- [Model.Body2](docs/Body2.md)
- [Model.Body3](docs/Body3.md)
- [Model.Body4](docs/Body4.md)
- [Model.Body5](docs/Body5.md)
- [Model.Body6](docs/Body6.md)
- [Model.Body7](docs/Body7.md)
- [Model.Capitalization](docs/Capitalization.md)
- [Model.Cat](docs/Cat.md)
- [Model.Category](docs/Category.md)
- [Model.ClassModel](docs/ClassModel.md)
- [Model.Dog](docs/Dog.md)
- [Model.DogDogIdBody](docs/DogDogIdBody.md)
- [Model.EnumArrays](docs/EnumArrays.md)
- [Model.EnumClass](docs/EnumClass.md)
- [Model.EnumFormBody](docs/EnumFormBody.md)
- [Model.EnumTest](docs/EnumTest.md)
- [Model.FakeBody](docs/FakeBody.md)
- [Model.FakeBody1](docs/FakeBody1.md)
- [Model.FakeJsonFormDataBody](docs/FakeJsonFormDataBody.md)
- [Model.FormatTest](docs/FormatTest.md)
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [Model.MapTest](docs/MapTest.md)
Expand All @@ -185,6 +183,8 @@ Class | Method | HTTP request | Description
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.Pet](docs/Pet.md)
- [Model.PetIdUploadImageBody](docs/PetIdUploadImageBody.md)
- [Model.PetPetIdBody](docs/PetPetIdBody.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.SinglePetResponse](docs/SinglePetResponse.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)
Expand Down Expand Up @@ -221,5 +221,6 @@ Class | Method | HTTP request | Description
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- :
- write:pets: modify pets in your account
- read:pets: read your pets

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# IO.Swagger.Model.AnimalAnimalIdBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | Updated name of the animal | [optional]
**Status** | **string** | Updated status of the animal | [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)

10 changes: 10 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/DogDogIdBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# IO.Swagger.Model.DogDogIdBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | Updated name of the dog | [optional]
**Status** | **string** | Updated status of the dog | [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)

11 changes: 11 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/EnumFormBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# IO.Swagger.Model.EnumFormBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional]
**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg]
**EnumQueryDouble** | **double?** | Query parameter enum test (double) | [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)

18 changes: 9 additions & 9 deletions samples/client/petstore/csharp/SwaggerClient/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ No authorization required
[[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)
<a name="testendpointparameters"></a>
# **TestEndpointParameters**
> void TestEndpointParameters (Body2 body)
> void TestEndpointParameters (FakeBody body)

Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트

Expand All @@ -338,7 +338,7 @@ namespace Example
Configuration.Default.Password = "YOUR_PASSWORD";

var apiInstance = new FakeApi();
var body = new Body2(); // Body2 |
var body = new FakeBody(); // FakeBody |

try
{
Expand All @@ -358,7 +358,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Body2**](Body2.md)| |
**body** | [**FakeBody**](FakeBody.md)| |

### Return type

Expand Down Expand Up @@ -443,7 +443,7 @@ No authorization required
[[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)
<a name="testenumrequestbody"></a>
# **TestEnumRequestBody**
> void TestEnumRequestBody (Body4 body = null)
> void TestEnumRequestBody (EnumFormBody body = null)

To test enum parameters

Expand All @@ -464,7 +464,7 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var body = new Body4(); // Body4 | (optional)
var body = new EnumFormBody(); // EnumFormBody | (optional)

try
{
Expand All @@ -484,7 +484,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Body4**](Body4.md)| | [optional]
**body** | [**EnumFormBody**](EnumFormBody.md)| | [optional]

### Return type

Expand Down Expand Up @@ -559,7 +559,7 @@ No authorization required
[[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)
<a name="testjsonformdata"></a>
# **TestJsonFormData**
> void TestJsonFormData (Body5 body)
> void TestJsonFormData (FakeJsonFormDataBody body)

test json serialization of form data

Expand All @@ -578,7 +578,7 @@ namespace Example
public void main()
{
var apiInstance = new FakeApi();
var body = new Body5(); // Body5 |
var body = new FakeJsonFormDataBody(); // FakeJsonFormDataBody |

try
{
Expand All @@ -598,7 +598,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Body5**](Body5.md)| |
**body** | [**FakeJsonFormDataBody**](FakeJsonFormDataBody.md)| |

### Return type

Expand Down
22 changes: 22 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/FakeBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# IO.Swagger.Model.FakeBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | **int?** | None | [optional]
**Int32** | **int?** | None | [optional]
**Int64** | **long?** | None | [optional]
**Number** | [**decimal?**](BigDecimal.md) | None |
**_Float** | **float?** | None | [optional]
**_Double** | **double?** | None |
**_String** | **string** | None | [optional]
**PatternWithoutDelimiter** | **string** | None |
**_Byte** | **byte[]** | None |
**Binary** | **byte[]** | None | [optional]
**Date** | **DateTime?** | None | [optional]
**DateTime** | **DateTime?** | None | [optional]
**Password** | **string** | None | [optional]
**Callback** | **string** | None | [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)

22 changes: 22 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/FakeBody1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# IO.Swagger.Model.FakeBody1
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Integer** | **int?** | None | [optional]
**Int32** | **int?** | None | [optional]
**Int64** | **long?** | None | [optional]
**Number** | [**decimal?**](BigDecimal.md) | None |
**_Float** | **float?** | None | [optional]
**_Double** | **double?** | None |
**_String** | **string** | None | [optional]
**PatternWithoutDelimiter** | **string** | None |
**_Byte** | **byte[]** | None |
**Binary** | **byte[]** | None | [optional]
**Date** | **DateTime?** | None | [optional]
**DateTime** | **DateTime?** | None | [optional]
**Password** | **string** | None | [optional]
**Callback** | **string** | None | [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)

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# IO.Swagger.Model.FakeJsonFormDataBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Param** | **string** | field1 |
**Param2** | **string** | field2 |

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# IO.Swagger.Model.PetIdUploadImageBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
**File** | **byte[]** | file to upload | [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)

10 changes: 10 additions & 0 deletions samples/client/petstore/csharp/SwaggerClient/docs/PetPetIdBody.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# IO.Swagger.Model.PetPetIdBody
## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Name** | **string** | Updated name of the pet | [optional]
**Status** | **string** | Updated status of the pet | [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)

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional]
**Pet** | **OneOfSinglePetResponsePet** | | [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)

Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Category** | [**AllOfSubCategoryCategory**](AllOfSubCategoryCategory.md) | | [optional]
**Category** | **AllOfSubCategoryCategory** | | [optional]
**Category2** | [**Category**](Category.md) | | [optional]
**Pets** | [**List&lt;AllOfSubCategoryPetsItems&gt;**](.md) | | [optional]
**Pets** | **List&lt;AllOfSubCategoryPetsItems&gt;** | | [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)

Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/*
* Swagger Petstore
*
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* OpenAPI spec version: 1.0.0
* Contact: [email protected]
* Generated by: https://github.com/swagger-api/swagger-codegen.git
*/

using NUnit.Framework;

using System;
using System.Linq;
using System.IO;
using System.Collections.Generic;
using IO.Swagger.Api;
using IO.Swagger.Model;
using IO.Swagger.Client;
using System.Reflection;
using Newtonsoft.Json;

namespace IO.Swagger.Test
{
/// <summary>
/// Class for testing AnimalAnimalIdBody
/// </summary>
/// <remarks>
/// This file is automatically generated by Swagger Codegen.
/// Please update the test case below to test the model.
/// </remarks>
[TestFixture]
public class AnimalAnimalIdBodyTests
{
// TODO uncomment below to declare an instance variable for AnimalAnimalIdBody
//private AnimalAnimalIdBody instance;

/// <summary>
/// Setup before each test
/// </summary>
[SetUp]
public void Init()
{
// TODO uncomment below to create an instance of AnimalAnimalIdBody
//instance = new AnimalAnimalIdBody();
}

/// <summary>
/// Clean up after each test
/// </summary>
[TearDown]
public void Cleanup()
{

}

/// <summary>
/// Test an instance of AnimalAnimalIdBody
/// </summary>
[Test]
public void AnimalAnimalIdBodyInstanceTest()
{
// TODO uncomment below to test "IsInstanceOfType" AnimalAnimalIdBody
//Assert.IsInstanceOfType<AnimalAnimalIdBody> (instance, "variable 'instance' is a AnimalAnimalIdBody");
}


/// <summary>
/// Test the property 'Name'
/// </summary>
[Test]
public void NameTest()
{
// TODO unit test for the property 'Name'
}
/// <summary>
/// Test the property 'Status'
/// </summary>
[Test]
public void StatusTest()
{
// TODO unit test for the property 'Status'
}

}

}
Loading