Skip to content

Commit 1f24340

Browse files
committed
updated jeysey2 java6 sample
1 parent f5bab06 commit 1f24340

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+1246
-1147
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.0.6-SNAPSHOT
1+
3.0.11-SNAPSHOT

samples/client/petstore/java/jersey2-java6/build.gradle

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ if(hasProperty('target') && target == 'android') {
3232
targetSdkVersion 25
3333
}
3434
compileOptions {
35-
sourceCompatibility JavaVersion.VERSION_1_7
36-
targetCompatibility JavaVersion.VERSION_1_7
35+
sourceCompatibility JavaVersion.VERSION_1_8
36+
targetCompatibility JavaVersion.VERSION_1_8
3737
}
3838

3939
// Rename the aar correctly
@@ -77,8 +77,8 @@ if(hasProperty('target') && target == 'android') {
7777

7878
apply plugin: 'java'
7979
apply plugin: 'maven'
80-
sourceCompatibility = JavaVersion.VERSION_1_7
81-
targetCompatibility = JavaVersion.VERSION_1_7
80+
sourceCompatibility = JavaVersion.VERSION_1_8
81+
targetCompatibility = JavaVersion.VERSION_1_8
8282

8383
install {
8484
repositories.mavenInstaller {
@@ -94,7 +94,7 @@ if(hasProperty('target') && target == 'android') {
9494

9595
ext {
9696
swagger_annotations_version = "2.0.0"
97-
jackson_version = "2.8.9"
97+
jackson_version = "2.9.9"
9898
jersey_version = "2.25.1"
9999
commons_io_version=2.5
100100
commons_lang3_version=3.6
@@ -109,9 +109,8 @@ dependencies {
109109
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
110110
compile "com.fasterxml.jackson.core:jackson-annotations:$jackson_version"
111111
compile "com.fasterxml.jackson.core:jackson-databind:$jackson_version"
112+
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version",
112113
compile "commons-io:commons-io:$commons_io_version"
113114
compile "org.apache.commons:commons-lang3:$commons_lang3_version"
114-
compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version",
115-
compile "com.brsanthu:migbase64:2.2"
116115
testCompile "junit:junit:$junit_version"
117116
}

samples/client/petstore/java/jersey2-java6/build.sbt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@ lazy val root = (project in file(".")).
1313
"org.glassfish.jersey.core" % "jersey-client" % "2.25.1",
1414
"org.glassfish.jersey.media" % "jersey-media-multipart" % "2.25.1",
1515
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.25.1",
16-
"com.fasterxml.jackson.core" % "jackson-core" % "2.6.4" % "compile",
17-
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.4" % "compile",
18-
"com.fasterxml.jackson.core" % "jackson-databind" % "2.6.4" % "compile",
19-
"com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile",
20-
"com.brsanthu" % "migbase64" % "2.2",
16+
"com.fasterxml.jackson.core" % "jackson-core" % "2.9.9" % "compile",
17+
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.9.9" % "compile",
18+
"com.fasterxml.jackson.core" % "jackson-databind" % "2.9.9" % "compile",
19+
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.9.9" % "compile",
2120
"org.apache.commons" % "commons-lang3" % "3.6",
2221
"commons-io" % "commons-io" % "2.5",
2322
"junit" % "junit" % "4.12" % "test",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# AllPetsResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# OneOfAllPetsResponseItems
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# OneOfSinglePetResponsePet
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------

samples/client/petstore/java/jersey2-java6/docs/PetApi.md

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ Method | HTTP request | Description
88
[**deletePet**](PetApi.md#deletePet) | **DELETE** /pet/{petId} | Deletes a pet
99
[**findPetsByStatus**](PetApi.md#findPetsByStatus) | **GET** /pet/findByStatus | Finds Pets by status
1010
[**findPetsByTags**](PetApi.md#findPetsByTags) | **GET** /pet/findByTags | Finds Pets by tags
11+
[**getAllPets**](PetApi.md#getAllPets) | **GET** /allPets |
1112
[**getPetById**](PetApi.md#getPetById) | **GET** /pet/{petId} | Find pet by ID
13+
[**getRandomPet**](PetApi.md#getRandomPet) | **GET** /randomPet |
1214
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
1315
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
1416
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
@@ -221,6 +223,45 @@ Name | Type | Description | Notes
221223
- **Content-Type**: Not defined
222224
- **Accept**: application/xml, application/json
223225

226+
<a name="getAllPets"></a>
227+
# **getAllPets**
228+
> AllPetsResponse getAllPets()
229+
230+
231+
232+
### Example
233+
```java
234+
// Import classes:
235+
//import io.swagger.client.ApiException;
236+
//import io.swagger.client.api.PetApi;
237+
238+
239+
PetApi apiInstance = new PetApi();
240+
try {
241+
AllPetsResponse result = apiInstance.getAllPets();
242+
System.out.println(result);
243+
} catch (ApiException e) {
244+
System.err.println("Exception when calling PetApi#getAllPets");
245+
e.printStackTrace();
246+
}
247+
```
248+
249+
### Parameters
250+
This endpoint does not need any parameter.
251+
252+
### Return type
253+
254+
[**AllPetsResponse**](AllPetsResponse.md)
255+
256+
### Authorization
257+
258+
No authorization required
259+
260+
### HTTP request headers
261+
262+
- **Content-Type**: Not defined
263+
- **Accept**: application/json
264+
224265
<a name="getPetById"></a>
225266
# **getPetById**
226267
> Pet getPetById(petId)
@@ -276,6 +317,45 @@ Name | Type | Description | Notes
276317
- **Content-Type**: Not defined
277318
- **Accept**: application/xml, application/json
278319

320+
<a name="getRandomPet"></a>
321+
# **getRandomPet**
322+
> SinglePetResponse getRandomPet()
323+
324+
325+
326+
### Example
327+
```java
328+
// Import classes:
329+
//import io.swagger.client.ApiException;
330+
//import io.swagger.client.api.PetApi;
331+
332+
333+
PetApi apiInstance = new PetApi();
334+
try {
335+
SinglePetResponse result = apiInstance.getRandomPet();
336+
System.out.println(result);
337+
} catch (ApiException e) {
338+
System.err.println("Exception when calling PetApi#getRandomPet");
339+
e.printStackTrace();
340+
}
341+
```
342+
343+
### Parameters
344+
This endpoint does not need any parameter.
345+
346+
### Return type
347+
348+
[**SinglePetResponse**](SinglePetResponse.md)
349+
350+
### Authorization
351+
352+
No authorization required
353+
354+
### HTTP request headers
355+
356+
- **Content-Type**: Not defined
357+
- **Accept**: application/json
358+
279359
<a name="updatePet"></a>
280360
# **updatePet**
281361
> updatePet(body)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# SinglePetResponse
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**pet** | [**OneOfSinglePetResponsePet**](OneOfSinglePetResponsePet.md) | | [optional]

samples/client/petstore/java/jersey2-java6/docs/StoreApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ This endpoint does not need any parameter.
9393

9494
### Return type
9595

96-
[**Map&lt;String, Integer&gt;**](Map.md)
96+
**Map&lt;String, Integer&gt;**
9797

9898
### Authorization
9999

samples/client/petstore/java/jersey2-java6/pom.xml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@
119119
<artifactId>maven-compiler-plugin</artifactId>
120120
<version>3.6.1</version>
121121
<configuration>
122-
<source>1.7</source>
123-
<target>1.7</target>
122+
<source>1.8</source>
123+
<target>1.8</target>
124124
</configuration>
125125
</plugin>
126126
<plugin>
@@ -217,16 +217,10 @@
217217
<version>${jackson-version}</version>
218218
</dependency>
219219
<dependency>
220-
<groupId>com.github.joschi.jackson</groupId>
221-
<artifactId>jackson-datatype-threetenbp</artifactId>
220+
<groupId>com.fasterxml.jackson.datatype</groupId>
221+
<artifactId>jackson-datatype-jsr310</artifactId>
222222
<version>${jackson-version}</version>
223223
</dependency>
224-
<!-- Base64 encoding that works in both JVM and Android -->
225-
<dependency>
226-
<groupId>com.brsanthu</groupId>
227-
<artifactId>migbase64</artifactId>
228-
<version>2.2</version>
229-
</dependency>
230224
<dependency>
231225
<groupId>org.apache.commons</groupId>
232226
<artifactId>commons-lang3</artifactId>
@@ -250,7 +244,7 @@
250244
<jersey-version>2.6</jersey-version>
251245
<commons_io_version>2.5</commons_io_version>
252246
<commons_lang3_version>3.6</commons_lang3_version>
253-
<jackson-version>2.6.4</jackson-version>
247+
<jackson-version>2.9.9</jackson-version>
254248
<maven-plugin-version>1.0.0</maven-plugin-version>
255249
<junit-version>4.12</junit-version>
256250
</properties>

0 commit comments

Comments
 (0)