-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Java][jersey2] fix cast error for default value in DateTimeOffset ob…
…ject (#6547) * fix cast error for datetimeoff in java * add back files * fix datetime initialize * comment out ensure uptodate
- Loading branch information
Showing
121 changed files
with
19,553 additions
and
6 deletions.
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
21 changes: 21 additions & 0 deletions
21
samples/openapi3/client/petstore/java/jersey2-java8/.gitignore
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,21 @@ | ||
*.class | ||
|
||
# Mobile Tools for Java (J2ME) | ||
.mtj.tmp/ | ||
|
||
# Package Files # | ||
*.jar | ||
*.war | ||
*.ear | ||
|
||
# exclude jar for gradle wrapper | ||
!gradle/wrapper/*.jar | ||
|
||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml | ||
hs_err_pid* | ||
|
||
# build files | ||
**/target | ||
target | ||
.gradle | ||
build |
23 changes: 23 additions & 0 deletions
23
samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator-ignore
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 @@ | ||
# OpenAPI Generator Ignore | ||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator | ||
|
||
# Use this file to prevent files from being overwritten by the generator. | ||
# The patterns follow closely to .gitignore or .dockerignore. | ||
|
||
# As an example, the C# client generator defines ApiClient.cs. | ||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: | ||
#ApiClient.cs | ||
|
||
# You can match any string of characters against a directory, file or extension with a single asterisk (*): | ||
#foo/*/qux | ||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux | ||
|
||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): | ||
#foo/**/qux | ||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux | ||
|
||
# You can also negate patterns with an exclamation (!). | ||
# For example, you can ignore all files in a docs folder with the file extension .md: | ||
#docs/*.md | ||
# Then explicitly reverse the ignore rule for a single file: | ||
#!docs/README.md |
22 changes: 22 additions & 0 deletions
22
samples/openapi3/client/petstore/java/jersey2-java8/.travis.yml
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,22 @@ | ||
# | ||
# Generated by OpenAPI Generator: https://openapi-generator.tech | ||
# | ||
# Ref: https://docs.travis-ci.com/user/languages/java/ | ||
# | ||
language: java | ||
jdk: | ||
- openjdk12 | ||
- openjdk11 | ||
- openjdk10 | ||
- openjdk9 | ||
- openjdk8 | ||
before_install: | ||
# ensure gradlew has proper permission | ||
- chmod a+x ./gradlew | ||
script: | ||
# test using maven | ||
#- mvn test | ||
# test using gradle | ||
- gradle test | ||
# test using sbt | ||
# - sbt test |
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
125 changes: 125 additions & 0 deletions
125
samples/openapi3/client/petstore/java/jersey2-java8/build.gradle
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,125 @@ | ||
apply plugin: 'idea' | ||
apply plugin: 'eclipse' | ||
|
||
group = 'org.openapitools' | ||
version = '1.0.0' | ||
|
||
buildscript { | ||
repositories { | ||
maven { url "https://repo1.maven.org/maven2" } | ||
jcenter() | ||
} | ||
dependencies { | ||
classpath 'com.android.tools.build:gradle:2.3.+' | ||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5' | ||
} | ||
} | ||
|
||
repositories { | ||
jcenter() | ||
} | ||
|
||
|
||
if(hasProperty('target') && target == 'android') { | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'com.github.dcendents.android-maven' | ||
|
||
android { | ||
compileSdkVersion 25 | ||
buildToolsVersion '25.0.2' | ||
defaultConfig { | ||
minSdkVersion 14 | ||
targetSdkVersion 25 | ||
} | ||
compileOptions { | ||
sourceCompatibility JavaVersion.VERSION_1_8 | ||
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
|
||
// Rename the aar correctly | ||
libraryVariants.all { variant -> | ||
variant.outputs.each { output -> | ||
def outputFile = output.outputFile | ||
if (outputFile != null && outputFile.name.endsWith('.aar')) { | ||
def fileName = "${project.name}-${variant.baseName}-${version}.aar" | ||
output.outputFile = new File(outputFile.parent, fileName) | ||
} | ||
} | ||
} | ||
|
||
dependencies { | ||
provided 'javax.annotation:jsr250-api:1.0' | ||
} | ||
} | ||
|
||
afterEvaluate { | ||
android.libraryVariants.all { variant -> | ||
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar | ||
task.description = "Create jar artifact for ${variant.name}" | ||
task.dependsOn variant.javaCompile | ||
task.from variant.javaCompile.destinationDir | ||
task.destinationDir = project.file("${project.buildDir}/outputs/jar") | ||
task.archiveName = "${project.name}-${variant.baseName}-${version}.jar" | ||
artifacts.add('archives', task); | ||
} | ||
} | ||
|
||
task sourcesJar(type: Jar) { | ||
from android.sourceSets.main.java.srcDirs | ||
classifier = 'sources' | ||
} | ||
|
||
artifacts { | ||
archives sourcesJar | ||
} | ||
|
||
} else { | ||
|
||
apply plugin: 'java' | ||
apply plugin: 'maven' | ||
sourceCompatibility = JavaVersion.VERSION_1_8 | ||
targetCompatibility = JavaVersion.VERSION_1_8 | ||
|
||
install { | ||
repositories.mavenInstaller { | ||
pom.artifactId = 'petstore-openapi3-jersey2-java8' | ||
} | ||
} | ||
|
||
task execute(type:JavaExec) { | ||
main = System.getProperty('mainClass') | ||
classpath = sourceSets.main.runtimeClasspath | ||
} | ||
} | ||
|
||
ext { | ||
swagger_annotations_version = "1.5.22" | ||
jackson_version = "2.10.3" | ||
jackson_databind_version = "2.10.4" | ||
jackson_databind_nullable_version = "0.2.1" | ||
jersey_version = "2.27" | ||
junit_version = "4.13" | ||
scribejava_apis_version = "6.9.0" | ||
tomitribe_http_signatures_version = "1.3" | ||
} | ||
|
||
dependencies { | ||
compile "io.swagger:swagger-annotations:$swagger_annotations_version" | ||
compile "com.google.code.findbugs:jsr305:3.0.2" | ||
compile "org.glassfish.jersey.core:jersey-client:$jersey_version" | ||
compile "org.glassfish.jersey.media:jersey-media-multipart:$jersey_version" | ||
compile "org.glassfish.jersey.media:jersey-media-json-jackson:$jersey_version" | ||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version" | ||
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" | ||
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_databind_version" | ||
compile "org.openapitools:jackson-databind-nullable:$jackson_databind_nullable_version" | ||
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" | ||
compile "com.github.scribejava:scribejava-apis:$scribejava_apis_version" | ||
compile "org.tomitribe:tomitribe-http-signatures:$tomitribe_http_signatures_version" | ||
testCompile "junit:junit:$junit_version" | ||
} | ||
|
||
javadoc { | ||
options.tags = [ "http.response.details:a:Http Response Details" ] | ||
} |
25 changes: 25 additions & 0 deletions
25
samples/openapi3/client/petstore/java/jersey2-java8/build.sbt
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,25 @@ | ||
lazy val root = (project in file(".")). | ||
settings( | ||
organization := "org.openapitools", | ||
name := "petstore-openapi3-jersey2-java8", | ||
version := "1.0.0", | ||
scalaVersion := "2.11.4", | ||
scalacOptions ++= Seq("-feature"), | ||
javacOptions in compile ++= Seq("-Xlint:deprecation"), | ||
publishArtifact in (Compile, packageDoc) := false, | ||
resolvers += Resolver.mavenLocal, | ||
libraryDependencies ++= Seq( | ||
"io.swagger" % "swagger-annotations" % "1.5.22", | ||
"org.glassfish.jersey.core" % "jersey-client" % "2.25.1", | ||
"org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1", | ||
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1", | ||
"com.fasterxml.jackson.core" % "jackson-core" % "2.10.4" % "compile", | ||
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.10.4" % "compile", | ||
"com.fasterxml.jackson.core" % "jackson-databind" % "2.10.4" % "compile", | ||
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.10" % "compile", | ||
"com.github.scribejava" % "scribejava-apis" % "6.9.0" % "compile", | ||
"org.tomitribe" % "tomitribe-http-signatures" % "1.3" % "compile", | ||
"junit" % "junit" % "4.13" % "test", | ||
"com.novocode" % "junit-interface" % "0.10" % "test" | ||
) | ||
) |
Oops, something went wrong.