Rebuilt jersey1 client sample

This commit is contained in:
ant3 2016-06-21 00:16:17 +01:00
parent b107b4693d
commit b7e4be77c6
8 changed files with 46 additions and 11 deletions

View File

@ -13,3 +13,9 @@
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid* hs_err_pid*
# build files
**/target
target
.gradle
build

View File

@ -14,7 +14,7 @@
# You can recursively match patterns against a directory, file or extension with a double asterisk (**): # You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux #foo/**/qux
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!). # You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md: # For example, you can ignore all files in a docs folder with the file extension .md:

View File

@ -0,0 +1,29 @@
#
# Generated by: https://github.com/swagger-api/swagger-codegen.git
#
# 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
#
# http://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.
#
language: java
jdk:
- oraclejdk8
- oraclejdk7
before_install:
# ensure gradlew has proper permission
- chmod a+x ./gradlew
script:
# test using maven
- mvn test
# uncomment below to test using gradle
# - gradle test
# uncomment below to test using sbt
# - sbt test

View File

@ -95,9 +95,9 @@ if(hasProperty('target') && target == 'android') {
ext { ext {
swagger_annotations_version = "1.5.8" swagger_annotations_version = "1.5.8"
jackson_version = "2.7.0" jackson_version = "2.7.5"
jersey_version = "1.19.1" jersey_version = "1.19.1"
jodatime_version = "2.9.3" jodatime_version = "2.9.4"
junit_version = "4.12" junit_version = "4.12"
} }
@ -109,7 +109,7 @@ dependencies {
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version" compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version" compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version" compile "com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:$jackson_version"
compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" compile "com.fasterxml.jackson.datatype:jackson-datatype-joda:$jackson_version"
compile "joda-time:joda-time:$jodatime_version" compile "joda-time:joda-time:$jodatime_version"
compile "com.brsanthu:migbase64:2.2" compile "com.brsanthu:migbase64:2.2"
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"

View File

@ -146,7 +146,7 @@
<dependency> <dependency>
<groupId>com.fasterxml.jackson.datatype</groupId> <groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-joda</artifactId> <artifactId>jackson-datatype-joda</artifactId>
<version>2.1.5</version> <version>${jackson-version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>joda-time</groupId> <groupId>joda-time</groupId>
@ -173,8 +173,8 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<swagger-annotations-version>1.5.8</swagger-annotations-version> <swagger-annotations-version>1.5.8</swagger-annotations-version>
<jersey-version>1.19.1</jersey-version> <jersey-version>1.19.1</jersey-version>
<jackson-version>2.7.0</jackson-version> <jackson-version>2.7.5</jackson-version>
<jodatime-version>2.9.3</jodatime-version> <jodatime-version>2.9.4</jodatime-version>
<maven-plugin-version>1.0.0</maven-plugin-version> <maven-plugin-version>1.0.0</maven-plugin-version>
<junit-version>4.12</junit-version> <junit-version>4.12</junit-version>
</properties> </properties>

View File

@ -75,8 +75,8 @@ public class ApiClient {
// Setup authentications (key: authentication name, value: authentication). // Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>(); authentications = new HashMap<String, Authentication>();
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("petstore_auth", new OAuth()); authentications.put("petstore_auth", new OAuth());
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
// Prevent the authentications from being modified. // Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications); authentications = Collections.unmodifiableMap(authentications);

View File

@ -9,8 +9,8 @@ import io.swagger.client.model.*;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import org.joda.time.LocalDate; import org.joda.time.LocalDate;
import org.joda.time.DateTime;
import java.math.BigDecimal; import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -9,8 +9,8 @@ import io.swagger.client.model.*;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import java.io.File;
import io.swagger.client.model.ModelApiResponse; import io.swagger.client.model.ModelApiResponse;
import java.io.File;
import java.util.ArrayList; import java.util.ArrayList;