Skip to content

Commit

Permalink
[C#] Switch the spec to OAS v3 from v2 (#7176)
Browse files Browse the repository at this point in the history
* switch to 3.0 spec in c# clients

* remove samples/openapi3/client/petstore/csharp

* remove samples/openapi3/client/petstore/csharp-netcore/OpenAPIClient

* remove samples/openapi3/client/petstore/csharp-netcore/OpenAPIClientCore/

* update samples
  • Loading branch information
wing328 authored Aug 10, 2020
1 parent 780b55a commit 1ee57ea
Show file tree
Hide file tree
Showing 834 changed files with 3,184 additions and 98,614 deletions.
2 changes: 1 addition & 1 deletion bin/configs/csharp-OpenAPIClient.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
generatorName: csharp
outputDir: samples/client/petstore/csharp/OpenAPIClient
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
2 changes: 1 addition & 1 deletion bin/configs/csharp-netcore-OpenAPIClient.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: csharp-netcore
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
Expand Down
2 changes: 1 addition & 1 deletion bin/configs/csharp-netcore-OpenAPIClientCore.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
generatorName: csharp-netcore
outputDir: samples/client/petstore/csharp-netcore/OpenAPIClientCore
inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
additionalProperties:
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
.gitignore
Org.OpenAPITools.sln
README.md
docs/AdditionalPropertiesAnyType.md
docs/AdditionalPropertiesArray.md
docs/AdditionalPropertiesBoolean.md
docs/AdditionalPropertiesClass.md
docs/AdditionalPropertiesInteger.md
docs/AdditionalPropertiesNumber.md
docs/AdditionalPropertiesObject.md
docs/AdditionalPropertiesString.md
docs/Animal.md
docs/AnotherFakeApi.md
docs/ApiResponse.md
docs/ArrayOfArrayOfNumberOnly.md
docs/ArrayOfNumberOnly.md
docs/ArrayTest.md
docs/BigCat.md
docs/BigCatAllOf.md
docs/Capitalization.md
docs/Cat.md
docs/CatAllOf.md
docs/Category.md
docs/ClassModel.md
docs/DefaultApi.md
docs/Dog.md
docs/DogAllOf.md
docs/EnumArrays.md
Expand All @@ -31,32 +23,43 @@ docs/FakeApi.md
docs/FakeClassnameTags123Api.md
docs/File.md
docs/FileSchemaTestClass.md
docs/Foo.md
docs/FormatTest.md
docs/HasOnlyReadOnly.md
docs/HealthCheckResult.md
docs/InlineObject.md
docs/InlineObject1.md
docs/InlineObject2.md
docs/InlineObject3.md
docs/InlineObject4.md
docs/InlineObject5.md
docs/InlineResponseDefault.md
docs/List.md
docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelClient.md
docs/Name.md
docs/NullableClass.md
docs/NumberOnly.md
docs/Order.md
docs/OuterComposite.md
docs/OuterEnum.md
docs/OuterEnumDefaultValue.md
docs/OuterEnumInteger.md
docs/OuterEnumIntegerDefaultValue.md
docs/Pet.md
docs/PetApi.md
docs/ReadOnlyFirst.md
docs/Return.md
docs/SpecialModelName.md
docs/StoreApi.md
docs/Tag.md
docs/TypeHolderDefault.md
docs/TypeHolderExample.md
docs/User.md
docs/UserApi.md
docs/XmlItem.md
git_push.sh
src/Org.OpenAPITools/Api/AnotherFakeApi.cs
src/Org.OpenAPITools/Api/DefaultApi.cs
src/Org.OpenAPITools/Api/FakeApi.cs
src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs
src/Org.OpenAPITools/Api/PetApi.cs
Expand All @@ -77,21 +80,12 @@ src/Org.OpenAPITools/Client/ISynchronousClient.cs
src/Org.OpenAPITools/Client/Multimap.cs
src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs
src/Org.OpenAPITools/Client/RequestOptions.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs
src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs
src/Org.OpenAPITools/Model/Animal.cs
src/Org.OpenAPITools/Model/ApiResponse.cs
src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs
src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs
src/Org.OpenAPITools/Model/ArrayTest.cs
src/Org.OpenAPITools/Model/BigCat.cs
src/Org.OpenAPITools/Model/BigCatAllOf.cs
src/Org.OpenAPITools/Model/Capitalization.cs
src/Org.OpenAPITools/Model/Cat.cs
src/Org.OpenAPITools/Model/CatAllOf.cs
Expand All @@ -104,25 +98,35 @@ src/Org.OpenAPITools/Model/EnumClass.cs
src/Org.OpenAPITools/Model/EnumTest.cs
src/Org.OpenAPITools/Model/File.cs
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
src/Org.OpenAPITools/Model/Foo.cs
src/Org.OpenAPITools/Model/FormatTest.cs
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
src/Org.OpenAPITools/Model/HealthCheckResult.cs
src/Org.OpenAPITools/Model/InlineObject.cs
src/Org.OpenAPITools/Model/InlineObject1.cs
src/Org.OpenAPITools/Model/InlineObject2.cs
src/Org.OpenAPITools/Model/InlineObject3.cs
src/Org.OpenAPITools/Model/InlineObject4.cs
src/Org.OpenAPITools/Model/InlineObject5.cs
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
src/Org.OpenAPITools/Model/List.cs
src/Org.OpenAPITools/Model/MapTest.cs
src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
src/Org.OpenAPITools/Model/Model200Response.cs
src/Org.OpenAPITools/Model/ModelClient.cs
src/Org.OpenAPITools/Model/Name.cs
src/Org.OpenAPITools/Model/NullableClass.cs
src/Org.OpenAPITools/Model/NumberOnly.cs
src/Org.OpenAPITools/Model/Order.cs
src/Org.OpenAPITools/Model/OuterComposite.cs
src/Org.OpenAPITools/Model/OuterEnum.cs
src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs
src/Org.OpenAPITools/Model/OuterEnumInteger.cs
src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs
src/Org.OpenAPITools/Model/Pet.cs
src/Org.OpenAPITools/Model/ReadOnlyFirst.cs
src/Org.OpenAPITools/Model/Return.cs
src/Org.OpenAPITools/Model/SpecialModelName.cs
src/Org.OpenAPITools/Model/Tag.cs
src/Org.OpenAPITools/Model/TypeHolderDefault.cs
src/Org.OpenAPITools/Model/TypeHolderExample.cs
src/Org.OpenAPITools/Model/User.cs
src/Org.OpenAPITools/Model/XmlItem.cs
src/Org.OpenAPITools/Org.OpenAPITools.csproj
44 changes: 28 additions & 16 deletions samples/client/petstore/csharp-netcore/OpenAPIClient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new AnotherFakeApi(config);
var body = new ModelClient(); // ModelClient | client model
var modelClient = new ModelClient(); // ModelClient | client model
try
{
// To test special tags
ModelClient result = apiInstance.Call123TestSpecialTags(body);
ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
Debug.WriteLine(result);
}
catch (ApiException e)
Expand All @@ -92,15 +92,17 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags
*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem
*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo |
*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint
*FakeApi* | [**FakeHttpSignatureTest**](docs/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication
*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean |
*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite |
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters
*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
Expand Down Expand Up @@ -133,21 +135,12 @@ Class | Method | HTTP request | Description
<a name="documentation-for-models"></a>
## Documentation for Models

- [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
- [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
- [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
- [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
- [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
- [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
- [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
- [Model.Animal](docs/Animal.md)
- [Model.ApiResponse](docs/ApiResponse.md)
- [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [Model.ArrayTest](docs/ArrayTest.md)
- [Model.BigCat](docs/BigCat.md)
- [Model.BigCatAllOf](docs/BigCatAllOf.md)
- [Model.Capitalization](docs/Capitalization.md)
- [Model.Cat](docs/Cat.md)
- [Model.CatAllOf](docs/CatAllOf.md)
Expand All @@ -160,27 +153,37 @@ Class | Method | HTTP request | Description
- [Model.EnumTest](docs/EnumTest.md)
- [Model.File](docs/File.md)
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
- [Model.Foo](docs/Foo.md)
- [Model.FormatTest](docs/FormatTest.md)
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
- [Model.InlineObject](docs/InlineObject.md)
- [Model.InlineObject1](docs/InlineObject1.md)
- [Model.InlineObject2](docs/InlineObject2.md)
- [Model.InlineObject3](docs/InlineObject3.md)
- [Model.InlineObject4](docs/InlineObject4.md)
- [Model.InlineObject5](docs/InlineObject5.md)
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
- [Model.List](docs/List.md)
- [Model.MapTest](docs/MapTest.md)
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model.Model200Response](docs/Model200Response.md)
- [Model.ModelClient](docs/ModelClient.md)
- [Model.Name](docs/Name.md)
- [Model.NullableClass](docs/NullableClass.md)
- [Model.NumberOnly](docs/NumberOnly.md)
- [Model.Order](docs/Order.md)
- [Model.OuterComposite](docs/OuterComposite.md)
- [Model.OuterEnum](docs/OuterEnum.md)
- [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md)
- [Model.OuterEnumInteger](docs/OuterEnumInteger.md)
- [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md)
- [Model.Pet](docs/Pet.md)
- [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md)
- [Model.Return](docs/Return.md)
- [Model.SpecialModelName](docs/SpecialModelName.md)
- [Model.Tag](docs/Tag.md)
- [Model.TypeHolderDefault](docs/TypeHolderDefault.md)
- [Model.TypeHolderExample](docs/TypeHolderExample.md)
- [Model.User](docs/User.md)
- [Model.XmlItem](docs/XmlItem.md)


<a name="documentation-for-authorization"></a>
Expand All @@ -200,11 +203,20 @@ Class | Method | HTTP request | Description
- **API key parameter name**: api_key_query
- **Location**: URL query string

<a name="bearer_test"></a>
### bearer_test

- **Type**: Bearer Authentication

<a name="http_basic_test"></a>
### http_basic_test

- **Type**: HTTP basic authentication

<a name="http_signature_test"></a>
### http_signature_test


<a name="petstore_auth"></a>
### petstore_auth

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,8 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**MapString** | **Dictionary&lt;string, string&gt;** | | [optional]
**MapNumber** | **Dictionary&lt;string, decimal&gt;** | | [optional]
**MapInteger** | **Dictionary&lt;string, int&gt;** | | [optional]
**MapBoolean** | **Dictionary&lt;string, bool&gt;** | | [optional]
**MapArrayInteger** | **Dictionary&lt;string, List&lt;int&gt;&gt;** | | [optional]
**MapArrayAnytype** | **Dictionary&lt;string, List&lt;Object&gt;&gt;** | | [optional]
**MapMapString** | **Dictionary&lt;string, Dictionary&lt;string, string&gt;&gt;** | | [optional]
**MapMapAnytype** | **Dictionary&lt;string, Dictionary&lt;string, Object&gt;&gt;** | | [optional]
**Anytype1** | **Object** | | [optional]
**Anytype2** | **Object** | | [optional]
**Anytype3** | **Object** | | [optional]
**MapProperty** | **Dictionary&lt;string, string&gt;** | | [optional]
**MapOfMapProperty** | **Dictionary&lt;string, Dictionary&lt;string, string&gt;&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
Expand Up @@ -9,7 +9,7 @@ Method | HTTP request | Description

<a name="call123testspecialtags"></a>
# **Call123TestSpecialTags**
> ModelClient Call123TestSpecialTags (ModelClient body)
> ModelClient Call123TestSpecialTags (ModelClient modelClient)
To test special tags

Expand All @@ -32,12 +32,12 @@ namespace Example
Configuration config = new Configuration();
config.BasePath = "http://petstore.swagger.io:80/v2";
var apiInstance = new AnotherFakeApi(config);
var body = new ModelClient(); // ModelClient | client model
var modelClient = new ModelClient(); // ModelClient | client model
try
{
// To test special tags
ModelClient result = apiInstance.Call123TestSpecialTags(body);
ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
Debug.WriteLine(result);
}
catch (ApiException e)
Expand All @@ -55,7 +55,7 @@ namespace Example

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**ModelClient**](ModelClient.md)| client model |
**modelClient** | [**ModelClient**](ModelClient.md)| client model |

### Return type

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Name | Type | Description | Notes
**EnumInteger** | **int** | | [optional]
**EnumNumber** | **double** | | [optional]
**OuterEnum** | **OuterEnum** | | [optional]
**OuterEnumInteger** | **OuterEnumInteger** | | [optional]
**OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
**OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [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)

Loading

0 comments on commit 1ee57ea

Please sign in to comment.