forked from loafle/openapi-generator-original
bump version to .net8 (#20384)
This commit is contained in:
parent
bd8cd8bf9f
commit
8fa8530cd0
@ -1,12 +1,12 @@
|
||||
name: Samples C# .Net 6 Client Echo API
|
||||
name: Samples C# .Net 8 Client Echo API
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/echo_api/csharp-restsharp/**
|
||||
- samples/client/echo_api/csharp/restsharp/net8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/echo_api/csharp-restsharp/**
|
||||
- samples/client/echo_api/csharp/restsharp/net8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net clients
|
||||
@ -16,12 +16,12 @@ jobs:
|
||||
matrix:
|
||||
sample:
|
||||
# clients
|
||||
- samples/client/echo_api/csharp-restsharp/
|
||||
- samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Run echo server
|
||||
run: |
|
||||
git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
|
@ -1,12 +1,12 @@
|
||||
name: Samples C# .Net 6 Client
|
||||
name: Samples C# .Net 8 Client
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/restsharp/net6/**
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
pull_request:
|
||||
paths:
|
||||
- samples/client/petstore/csharp/restsharp/net6/**
|
||||
- samples/client/petstore/csharp/restsharp/net8/**
|
||||
jobs:
|
||||
build:
|
||||
name: Build .Net clients
|
||||
@ -15,12 +15,12 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
sample:
|
||||
- samples/client/petstore/csharp/restsharp/net6/ParameterMappings/
|
||||
- samples/client/petstore/csharp/restsharp/net8/ParameterMappings/
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-dotnet@v4.2.0
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
dotnet-version: '8.0.x'
|
||||
- name: Build
|
||||
working-directory: ${{ matrix.sample }}
|
||||
run: dotnet build Org.OpenAPITools.sln
|
@ -90,10 +90,10 @@ test_script:
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\MultipleFrameworks\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net4.7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net4.8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net6\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net7\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net7\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net7\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net8\ParameterMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net8\EnumMappings\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net8\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\net8\UseDateTimeForDate\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
- dotnet test samples\client\petstore\csharp\restsharp\standard2.0\Petstore\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net7/Petstore
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/Petstore
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
targetFramework: net7.0
|
||||
targetFramework: net8.0
|
||||
useCompareNetObjects: "true"
|
||||
equatable: true
|
@ -1,10 +1,10 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/echo_api/csharp-restsharp
|
||||
outputDir: samples/client/echo_api/csharp/restsharp/net8/EchoApi
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{322C8CAF-0156-40C1-AE42-D59761FB9B6C}'
|
||||
targetFramework: net6.0
|
||||
targetFramework: net8.0
|
||||
setCompareNetObjects: "true"
|
||||
hideGenerationTimestamp: "true"
|
||||
equatable: true
|
@ -1,5 +1,5 @@
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net6/ParameterMappings
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/ParameterMappings
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/name-parameter-mappings.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
nameMappings:
|
||||
@ -15,5 +15,5 @@ modelNameMappings:
|
||||
additionalProperties:
|
||||
packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
|
||||
hideGenerationTimestamp: "true"
|
||||
targetFramework: net6.0
|
||||
targetFramework: net8.0
|
||||
equatable: true
|
@ -1,9 +1,9 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net7/UseDateTimeForDate
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/UseDateTimeForDate
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/dates-api.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
packageGuid: '{D0A67E81-4061-48EB-B4B8-C73BDF8B2D95}'
|
||||
targetFramework: net7.0
|
||||
targetFramework: net8.0
|
||||
useDateTimeForDate: true
|
@ -1,6 +1,6 @@
|
||||
# for .net standard
|
||||
generatorName: csharp
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net7/EnumMappings
|
||||
outputDir: samples/client/petstore/csharp/restsharp/net8/EnumMappings
|
||||
inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature-oneof-primitive-types.yaml
|
||||
templateDir: modules/openapi-generator/src/main/resources/csharp
|
||||
additionalProperties:
|
||||
@ -8,7 +8,7 @@ additionalProperties:
|
||||
useCompareNetObjects: true
|
||||
disallowAdditionalPropertiesIfNotPresent: false
|
||||
useOneOfDiscriminatorLookup: true
|
||||
targetFramework: net7.0
|
||||
targetFramework: net8.0
|
||||
equatable: true
|
||||
enumNameMappings:
|
||||
delivered: Shipped
|
@ -1,2 +0,0 @@
|
||||
[*.cs]
|
||||
dotnet_diagnostic.xUnit1031.severity = none
|
@ -1,68 +0,0 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Xml;
|
||||
using Xunit;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
public class CustomTest
|
||||
{
|
||||
private QueryApi api = new QueryApi();
|
||||
private BodyApi bodyApi = new BodyApi();
|
||||
|
||||
[Fact]
|
||||
public void TestEchoBodyPet()
|
||||
{
|
||||
Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List<string> { "http://a.com", "http://b.com" });
|
||||
Pet p = bodyApi.TestEchoBodyPet(queryObject);
|
||||
Assert.NotNull(p);
|
||||
Assert.Equal("Hello World", p.Name);
|
||||
Assert.Equal(12345L, p.Id);
|
||||
|
||||
// response is empty body
|
||||
Pet p2 = bodyApi.TestEchoBodyPet(null);
|
||||
Assert.Null(p2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
* <p>
|
||||
* Test query parameter(s)
|
||||
*
|
||||
* @throws ApiException if the Api call fails
|
||||
*/
|
||||
[Fact]
|
||||
public void TestQueryStyleFormExplodeTrueObjectTest()
|
||||
{
|
||||
Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List<string> { "http://a.com", "http://b.com" });
|
||||
String response = api.TestQueryStyleFormExplodeTrueObject(queryObject);
|
||||
EchoServerResponseParser p = new EchoServerResponseParser(response);
|
||||
Assert.Equal("/query/style_form/explode_true/object?query_object=class%20Pet%20%7b%0a%20%20Id%3a%2012345%0a%20%20Name%3a%20Hello%20World%0a%20%20Category%3a%20class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a%0a%20%20PhotoUrls%3a%20System.Collections.Generic.List%601%5bSystem.String%5d%0a%20%20Tags%3a%20%0a%20%20Status%3a%20%0a%7d%0a", p.path);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void testQueryStyleDeepObjectExplodeTrueObjectTest()
|
||||
{
|
||||
Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List<string> { "http://a.com", "http://b.com" });
|
||||
String response = api.TestQueryStyleDeepObjectExplodeTrueObject(queryObject);
|
||||
EchoServerResponseParser p = new EchoServerResponseParser(response);
|
||||
Assert.Equal("/query/style_deepObject/explode_true/object?queryObject%5bid%5d=12345&queryObject%5bname%5d=Hello%20World&queryObject%5bcategory%5d=class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a&queryObject%5bphotoUrls%5d=http%3a%2f%2fa.com%2chttp%3a%2f%2fb.com", p.path);
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public void testQueryStyleDeepObjectExplodeTrueObjectAsyncTest()
|
||||
{
|
||||
Pet queryObject = new Pet(12345L, "Hello World", new Category(987L, "new category"), new List<string> { "http://a.com", "http://b.com" });
|
||||
Task<String> responseTask = api.TestQueryStyleDeepObjectExplodeTrueObjectAsync(queryObject);
|
||||
EchoServerResponseParser p = new EchoServerResponseParser(responseTask.Result);
|
||||
Assert.Equal("/query/style_deepObject/explode_true/object?queryObject%5bid%5d=12345&queryObject%5bname%5d=Hello%20World&queryObject%5bcategory%5d=class%20Category%20%7b%0a%20%20Id%3a%20987%0a%20%20Name%3a%20new%20category%0a%7d%0a&queryObject%5bphotoUrls%5d=http%3a%2f%2fa.com%2chttp%3a%2f%2fb.com", p.path);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
/*
|
||||
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using static System.Net.Mime.MediaTypeNames;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
public class EchoServerResponseParser
|
||||
{
|
||||
public String method; // e.g. GET
|
||||
public String path; // e.g. /query/style_form/explode_true/object?id=12345
|
||||
public String protocol; // e.g. HTTP/1.1
|
||||
public Dictionary<String, String> headers = new Dictionary<String, String>();
|
||||
public String body; // e.g. <html><head></head><body>Hello World!</body></html>
|
||||
|
||||
public EchoServerResponseParser(String response)
|
||||
{
|
||||
if (response == null)
|
||||
{
|
||||
throw new SystemException("Echo server response cannot be null");
|
||||
}
|
||||
|
||||
String[] lines = Regex.Split(response, "\r\n|\r|\n");
|
||||
bool firstLine = true;
|
||||
bool bodyStart = false;
|
||||
StringBuilder bodyBuilder = new StringBuilder();
|
||||
|
||||
foreach (String line in lines)
|
||||
{
|
||||
if (firstLine)
|
||||
{
|
||||
String[] items = line.Split(" ");
|
||||
this.method = items[0];
|
||||
this.path = items[1];
|
||||
this.protocol = items[2];
|
||||
firstLine = false;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (bodyStart)
|
||||
{
|
||||
bodyBuilder.Append(line);
|
||||
bodyBuilder.Append("\n");
|
||||
}
|
||||
|
||||
if (String.IsNullOrEmpty(line))
|
||||
{
|
||||
bodyStart = true;
|
||||
continue;
|
||||
}
|
||||
|
||||
// store the header key-value pair in headers
|
||||
String[] keyValue = line.Split(": ");
|
||||
if (keyValue.Length == 2)
|
||||
{ // skip blank line, non key-value pair
|
||||
this.headers.Add(keyValue[0], keyValue[1]);
|
||||
}
|
||||
}
|
||||
|
||||
body = bodyBuilder.ToString();
|
||||
}
|
||||
}
|
||||
}
|
@ -63,5 +63,16 @@ namespace Org.OpenAPITools.Test.Api
|
||||
//var response = instance.TestAuthHttpBasic();
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestAuthHttpBearer
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestAuthHttpBearerTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//var response = instance.TestAuthHttpBearer();
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
}
|
||||
}
|
@ -19,7 +19,6 @@ using Xunit;
|
||||
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
// uncomment below to import models
|
||||
//using Org.OpenAPITools.Model;
|
||||
|
||||
@ -79,6 +78,42 @@ namespace Org.OpenAPITools.Test.Api
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestBodyMultipartFormdataArrayOfBinary
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestBodyMultipartFormdataArrayOfBinaryTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//List<System.IO.Stream> files = null;
|
||||
//var response = instance.TestBodyMultipartFormdataArrayOfBinary(files);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestBodyMultipartFormdataSingleBinary
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestBodyMultipartFormdataSingleBinaryTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//System.IO.Stream? myFile = null;
|
||||
//var response = instance.TestBodyMultipartFormdataSingleBinary(myFile);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestEchoBodyAllOfPet
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestEchoBodyAllOfPetTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//Pet? pet = null;
|
||||
//var response = instance.TestEchoBodyAllOfPet(pet);
|
||||
//Assert.IsType<Pet>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestEchoBodyFreeFormObjectResponseString
|
||||
/// </summary>
|
||||
@ -97,9 +132,10 @@ namespace Org.OpenAPITools.Test.Api
|
||||
[Fact]
|
||||
public void TestEchoBodyPetTest()
|
||||
{
|
||||
Pet? pet = new Pet(123, "cat", new Category() { Id = 12, Name = "Test" }, new List<string>(){"http://google.com"},null, null);
|
||||
var response = instance.TestEchoBodyPet(pet);
|
||||
Assert.IsType<Pet>(response);
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//Pet? pet = null;
|
||||
//var response = instance.TestEchoBodyPet(pet);
|
||||
//Assert.IsType<Pet>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -114,6 +150,18 @@ namespace Org.OpenAPITools.Test.Api
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestEchoBodyStringEnum
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestEchoBodyStringEnumTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//string? body = null;
|
||||
//var response = instance.TestEchoBodyStringEnum(body);
|
||||
//Assert.IsType<StringEnumRef>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestEchoBodyTagResponseString
|
||||
/// </summary>
|
@ -19,6 +19,8 @@ using Xunit;
|
||||
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
// uncomment below to import models
|
||||
//using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
@ -66,5 +68,34 @@ namespace Org.OpenAPITools.Test.Api
|
||||
//var response = instance.TestFormIntegerBooleanString(integerForm, booleanForm, stringForm);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestFormObjectMultipart
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestFormObjectMultipartTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//TestFormObjectMultipartRequestMarker marker = null;
|
||||
//var response = instance.TestFormObjectMultipart(marker);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestFormOneof
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestFormOneofTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//string? form1 = null;
|
||||
//int? form2 = null;
|
||||
//string? form3 = null;
|
||||
//bool? form4 = null;
|
||||
//long? id = null;
|
||||
//string? name = null;
|
||||
//var response = instance.TestFormOneof(form1, form2, form3, form4, id, name);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
}
|
||||
}
|
@ -19,6 +19,8 @@ using Xunit;
|
||||
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
// uncomment below to import models
|
||||
//using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
@ -54,16 +56,18 @@ namespace Org.OpenAPITools.Test.Api
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestHeaderIntegerBooleanString
|
||||
/// Test TestHeaderIntegerBooleanStringEnums
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestHeaderIntegerBooleanStringTest()
|
||||
public void TestHeaderIntegerBooleanStringEnumsTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//int? integerHeader = null;
|
||||
//bool? booleanHeader = null;
|
||||
//string? stringHeader = null;
|
||||
//var response = instance.TestHeaderIntegerBooleanString(integerHeader, booleanHeader, stringHeader);
|
||||
//string? enumNonrefStringHeader = null;
|
||||
//StringEnumRef? enumRefStringHeader = null;
|
||||
//var response = instance.TestHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
}
|
@ -19,6 +19,8 @@ using Xunit;
|
||||
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
// uncomment below to import models
|
||||
//using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
@ -54,15 +56,17 @@ namespace Org.OpenAPITools.Test.Api
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestsPathStringPathStringIntegerPathInteger
|
||||
/// Test TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestsPathStringPathStringIntegerPathIntegerTest()
|
||||
public void TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//string pathString = null;
|
||||
//int pathInteger = null;
|
||||
//var response = instance.TestsPathStringPathStringIntegerPathInteger(pathString, pathInteger);
|
||||
//string enumNonrefStringPath = null;
|
||||
//StringEnumRef enumRefStringPath = null;
|
||||
//var response = instance.TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
}
|
@ -62,8 +62,9 @@ namespace Org.OpenAPITools.Test.Api
|
||||
public void TestEnumRefStringTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//string? enumNonrefStringQuery = null;
|
||||
//StringEnumRef? enumRefStringQuery = null;
|
||||
//var response = instance.TestEnumRefString(enumRefStringQuery);
|
||||
//var response = instance.TestEnumRefString(enumNonrefStringQuery, enumRefStringQuery);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
@ -75,7 +76,7 @@ namespace Org.OpenAPITools.Test.Api
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//DateTime? datetimeQuery = null;
|
||||
//DateTime? dateQuery = null;
|
||||
//DateOnly? dateQuery = null;
|
||||
//string? stringQuery = null;
|
||||
//var response = instance.TestQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
|
||||
//Assert.IsType<string>(response);
|
||||
@ -119,6 +120,30 @@ namespace Org.OpenAPITools.Test.Api
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestQueryStyleFormExplodeFalseArrayInteger
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestQueryStyleFormExplodeFalseArrayIntegerTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//List<int>? queryObject = null;
|
||||
//var response = instance.TestQueryStyleFormExplodeFalseArrayInteger(queryObject);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestQueryStyleFormExplodeFalseArrayString
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void TestQueryStyleFormExplodeFalseArrayStringTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//List<string>? queryObject = null;
|
||||
//var response = instance.TestQueryStyleFormExplodeFalseArrayString(queryObject);
|
||||
//Assert.IsType<string>(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test TestQueryStyleFormExplodeTrueArrayString
|
||||
/// </summary>
|
@ -65,21 +65,21 @@ namespace Org.OpenAPITools.Test.Model
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'VarFloat'
|
||||
/// Test the property 'Float'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VarFloatTest()
|
||||
public void FloatTest()
|
||||
{
|
||||
// TODO unit test for the property 'VarFloat'
|
||||
// TODO unit test for the property 'Float'
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'VarDouble'
|
||||
/// Test the property 'Double'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void VarDoubleTest()
|
||||
public void DoubleTest()
|
||||
{
|
||||
// TODO unit test for the property 'VarDouble'
|
||||
// TODO unit test for the property 'Double'
|
||||
}
|
||||
}
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<AssemblyName>Org.OpenAPITools.Test</AssemblyName>
|
||||
<RootNamespace>Org.OpenAPITools.Test</RootNamespace>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<Nullable>annotations</Nullable>
|
||||
</PropertyGroup>
|
@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo><!-- setting GenerateAssemblyInfo to false causes this bug https://github.com/dotnet/project-system/issues/3934 -->
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<AssemblyName>Org.OpenAPITools</AssemblyName>
|
||||
<PackageId>Org.OpenAPITools</PackageId>
|
||||
<OutputType>Library</OutputType>
|
@ -1,10 +0,0 @@
|
||||
# Org.OpenAPITools.Model.CatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**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)
|
||||
|
@ -1,11 +0,0 @@
|
||||
# Org.OpenAPITools.Model.ChildCatAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | | [optional]
|
||||
**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -1,10 +0,0 @@
|
||||
# Org.OpenAPITools.Model.DogAllOf
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**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)
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Org.OpenAPITools.Model.MixedEnumType
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Org.OpenAPITools.Model.MixedNullableEnumType
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -1,9 +0,0 @@
|
||||
# Org.OpenAPITools.Model.PetStatusFilter
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -1,10 +0,0 @@
|
||||
# Org.OpenAPITools.Model.UpdatePet200Response
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**VarString** | [**Pet**](Pet.md) | | [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)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user