-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into bugfix/4999
* master: (345 commits) [kotlin][spring] Fix ApiUtil compilation (#6084) update python samples [Python] Fixed docstrings in api.mustache (#6391) [BUG][python] Support named arrays (#6493) [Go] whitelist AdditionalProperties in the field name (#6543) [kotlin][client] remove tabs usage (#6526) [PS] automatically derive discriminator mapping for oneOf/anyOf (#6542) [C++][Ue4] various bus fixes (#6539) Fix incorrect npx command (#6537) update pester to 5.x (#6536) comment out openapi3 java jersey2-java8 tests add additional properties support to powershell client generator (#6528) [Go][Experimental] Support additionalProperties (#6525) #5476 [kotlin] [spring] fix swagger and spring annotation for defaultValue (#6101) [samples] regenerate (#6533) [python] Fix date-time parsing (#6458) Register OAuth2ClientContext as bean (#6172) [Go][Experimental] Fix discriminator lookup (#6521) Typescript-rxjs: print param name (#6368) add oneof discrimistrator lookup to go experimental (#6517) ...
- Loading branch information
Showing
10,251 changed files
with
253,716 additions
and
471,040 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...t/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.42000 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Reflection; | ||
|
||
[assembly: System.Reflection.AssemblyCompanyAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] | ||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] | ||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] | ||
[assembly: System.Reflection.AssemblyProductAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyTitleAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] | ||
|
||
// Generated by the MSBuild WriteCodeFragment class. | ||
|
1 change: 1 addition & 0 deletions
1
....OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
19e887ae0fddb9fd03c4341951ee9077703a652f |
23 changes: 23 additions & 0 deletions
23
...e/src/Org.OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
//------------------------------------------------------------------------------ | ||
// <auto-generated> | ||
// This code was generated by a tool. | ||
// Runtime Version:4.0.30319.42000 | ||
// | ||
// Changes to this file may cause incorrect behavior and will be lost if | ||
// the code is regenerated. | ||
// </auto-generated> | ||
//------------------------------------------------------------------------------ | ||
|
||
using System; | ||
using System.Reflection; | ||
|
||
[assembly: System.Reflection.AssemblyCompanyAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] | ||
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] | ||
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")] | ||
[assembly: System.Reflection.AssemblyProductAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyTitleAttribute("Org.OpenAPITools.Test")] | ||
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] | ||
|
||
// Generated by the MSBuild WriteCodeFragment class. | ||
|
1 change: 1 addition & 0 deletions
1
....OpenAPITools.Test/obj/Debug/netcoreapp2.0/Org.OpenAPITools.Test.AssemblyInfoInputs.cache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
19e887ae0fddb9fd03c4341951ee9077703a652f |
Binary file added
BIN
+2.03 KB
...t/src/Org.OpenAPITools.Test/obj/Debug/Org.OpenAPITools.Test.csprojAssemblyReference.cache
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
CI/samples.ci/client/petstore/java/test-manual/jersey2-java8/JSONComposedSchemaTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
package org.openapitools.client; | ||
|
||
import org.openapitools.client.model.Mammal; | ||
import org.openapitools.client.model.AppleReq; | ||
import org.openapitools.client.model.BananaReq; | ||
import org.openapitools.client.model.FruitReq; | ||
import org.openapitools.client.model.BasquePig; | ||
import org.openapitools.client.model.Pig; | ||
import org.openapitools.client.model.Whale; | ||
import org.openapitools.client.model.Zebra; | ||
import java.lang.Exception; | ||
|
||
import org.junit.*; | ||
import static org.junit.Assert.*; | ||
|
||
|
||
public class JSONComposedSchemaTest { | ||
JSON json = null; | ||
Mammal mammal = null; | ||
|
||
@Before | ||
public void setup() { | ||
json = new JSON(); | ||
mammal = new Mammal(); | ||
} | ||
|
||
/** | ||
* Validate a oneOf schema can be deserialized into the expected class. | ||
* The oneOf schema does not have a discriminator. | ||
*/ | ||
@Test | ||
public void testOneOfSchemaWithoutDiscriminator() throws Exception { | ||
// BananaReq and AppleReq have explicitly defined properties that are different by name. | ||
// There is no discriminator property. | ||
String str = "{ \"cultivar\": \"golden delicious\", \"mealy\": false }"; | ||
FruitReq o = json.getContext(null).readValue(str, FruitReq.class); | ||
assertTrue(o.getActualInstance() instanceof AppleReq); | ||
} | ||
|
||
/** | ||
* Validate a oneOf schema can be deserialized into the expected class. | ||
* The oneOf schema has a discriminator. | ||
*/ | ||
@Test | ||
public void testOneOfSchemaWithDiscriminator() throws Exception { | ||
// Mammal can be one of whale, pig and zebra. | ||
// pig has sub-classes. | ||
String str = "{ \"className\": \"whale\", \"hasBaleen\": true, \"hasTeeth\": false }"; | ||
/* | ||
DISABLING unit test for now until ambiguity of discriminator is resolved. | ||
// Note that the 'zebra' schema does not have any explicit property defined AND | ||
// it has additionalProperties: true. Hence without a discriminator the above | ||
// JSON payload would match both 'whale' and 'zebra'. This is because the 'hasBaleen' | ||
// and 'hasTeeth' would be considered additional (undeclared) properties for 'zebra'. | ||
Mammal o = json.getContext(null).readValue(str, Mammal.class); | ||
assertTrue(o.getActualInstance() instanceof Whale); | ||
str = "{ \"className\": \"zebra\" }"; | ||
o = json.getContext(null).readValue(str, Mammal.class); | ||
assertTrue(o.getActualInstance() instanceof Zebra); | ||
str = "{ \"className\": \"BasquePig\" }"; | ||
o = json.getContext(null).readValue(str, Mammal.class); | ||
assertTrue(o.getActualInstance() instanceof BasquePig); | ||
*/ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.