-
-
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,6 @@ before_install: | |
- gem install bundler | ||
- npm install -g typescript | ||
- npm install -g npm | ||
#- npm install -g [email protected] | ||
- npm config set registry http://registry.npmjs.org/ | ||
# set python 3.6.3 as default | ||
- source ~/virtualenv/python3.6/bin/activate | ||
|
@@ -102,6 +101,9 @@ before_install: | |
# install Qt5 | ||
- sudo apt install -y --no-install-recommends qt5-default | ||
- cmake --version | ||
# perl dep | ||
- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib) | ||
- cpanm --quiet --no-interactive Test::Exception Test::More Log::Any LWP::UserAgent URI::Query Module::Runtime DateTime Module::Find Moose::Role JSON || echo "Igorned failure from cpanm" | ||
# show host table to confirm petstore.swagger.io is mapped to localhost | ||
- cat /etc/hosts | ||
# show java version | ||
|
@@ -136,13 +138,13 @@ script: | |
- /bin/bash ./bin/utils/detect_tab_in_java_class.sh | ||
# run integration tests defined in maven pom.xml | ||
# WARN: Travis will timeout after 10 minutes of no stdout/stderr activity, which is problematic with mvn --quiet. | ||
- mvn --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet --batch-mode --show-version clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet --batch-mode --show-version verify -Psamples -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
# test maven plugin | ||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/java-client.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/multi-module/pom.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/kotlin.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
- mvn --no-snapshot-updates --quiet clean compile -f modules/openapi-generator-maven-plugin/examples/spring.xml -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
# test gradle plugin | ||
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew buildGoSdk) | ||
- (cd modules/openapi-generator-gradle-plugin/samples/local-spec && ./gradlew openApiGenerate) | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ workflows: | |
set -e | ||
mvn package -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error | ||
title: Build openapi-generator | ||
- [email protected]: | ||
title: Update Swift samples | ||
|
@@ -38,18 +38,7 @@ workflows: | |
set -e | ||
sh bin/swift4-all.sh | ||
sh bin/swift5-all.sh | ||
- [email protected]: | ||
title: Run Swift4 tests | ||
inputs: | ||
- content: | | ||
#!/usr/bin/env bash | ||
set -e | ||
./samples/client/petstore/swift4/swift4_test_all.sh | ||
./samples/client/test/swift4/swift4_test_all.sh | ||
- [email protected]: | ||
title: Run Swift5 tests | ||
inputs: | ||
|
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.