Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/java-petstore-jersey2-java6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@ ags="$@ generate --artifact-id swagger-petstore-jersey2-java6 -i modules/swagger
echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main"
rm -rf samples/client/petstore/java/jersey2-java6/src/main
find samples/client/petstore/java/jersey2-java6 -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
# TODO: uncomment the java commmand when the issue with this script is fixed, see https://github.com/swagger-api/swagger-codegen-generators/issues/52
# java $JAVA_OPTS -jar $executable $ags
java $JAVA_OPTS -jar $executable $ags
3 changes: 1 addition & 2 deletions bin/java-petstore-okhttp-gson-parcelable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with

rm -rf samples/client/petstore/java/okhttp-gson-parcelableModel/src/main
find samples/client/petstore/java/okhttp-gson-parcelableModel -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
# TODO: uncomment the java commmand when the issue with this script is fixed, see https://github.com/swagger-api/swagger-codegen-generators/issues/52
# java $JAVA_OPTS -jar $executable $ags
java $JAVA_OPTS -jar $executable $ags
3 changes: 1 addition & 2 deletions bin/java-petstore-okhttp-gson.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,4 @@ ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with

rm -rf samples/client/petstore/java/okhttp-gson/src/main
find samples/client/petstore/java/okhttp-gson -maxdepth 1 -type f ! -name "README.md" -exec rm {} +
# TODO: uncomment the java commmand when the issue with this script is fixed, see https://github.com/swagger-api/swagger-codegen-generators/issues/52
# java $JAVA_OPTS -jar $executable $ags
java $JAVA_OPTS -jar $executable $ags
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.1-SNAPSHOT
3.0.0-SNAPSHOT
31 changes: 24 additions & 7 deletions samples/client/petstore/java/jersey2-java6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,16 @@ import java.util.*;
public class AnotherFakeApiExample {

public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();



AnotherFakeApi apiInstance = new AnotherFakeApi();
Client body = new Client(); // Client | client model

Client client = ; // Client | client model

try {
Client result = apiInstance.testSpecialTags(body);
Client result = apiInstance.testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
Expand Down Expand Up @@ -127,14 +132,15 @@ Class | Method | HTTP request | Description

- [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
- [Animal](docs/Animal.md)
- [AnimalFarm](docs/AnimalFarm.md)
- [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
- [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
- [ArrayTest](docs/ArrayTest.md)
- [Capitalization](docs/Capitalization.md)
- [Cat](docs/Cat.md)
- [Category](docs/Category.md)
- [ClassModel](docs/ClassModel.md)
- [Client](docs/Client.md)
- [Dog](docs/Dog.md)
- [EnumArrays](docs/EnumArrays.md)
- [EnumClass](docs/EnumClass.md)
- [EnumTest](docs/EnumTest.md)
Expand All @@ -155,8 +161,6 @@ Class | Method | HTTP request | Description
- [SpecialModelName](docs/SpecialModelName.md)
- [Tag](docs/Tag.md)
- [User](docs/User.md)
- [Cat](docs/Cat.md)
- [Dog](docs/Dog.md)


## Documentation for Authorization
Expand All @@ -168,24 +172,37 @@ Authentication schemes defined for the API:
- **API key parameter name**: api_key
- **Location**: HTTP header




### api_key_query

- **Type**: API key
- **API key parameter name**: api_key_query
- **Location**: URL query string




### http_basic_test


- **Type**: HTTP basic authentication



### petstore_auth



- **Type**: OAuth
- **Flow**: implicit
- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
- **Scopes**:
- write:pets: modify pets in your account
- read:pets: read your pets
- :





## Recommendation
Expand Down
18 changes: 17 additions & 1 deletion samples/client/petstore/java/jersey2-java6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,11 @@ if(hasProperty('target') && target == 'android') {
targetSdkVersion 25
}
compileOptions {


sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7

}

// Rename the aar correctly
Expand Down Expand Up @@ -77,8 +80,11 @@ if(hasProperty('target') && target == 'android') {

apply plugin: 'java'
apply plugin: 'maven'


sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7


install {
repositories.mavenInstaller {
Expand All @@ -95,9 +101,11 @@ if(hasProperty('target') && target == 'android') {
ext {
swagger_annotations_version = "1.5.15"
jackson_version = "2.8.9"
jersey_version = "2.6"
jersey_version = "2.25.1"

commons_io_version=2.5
commons_lang3_version=3.6

junit_version = "4.12"
}

Expand All @@ -109,9 +117,17 @@ dependencies {
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_version"



compile "commons-io:commons-io:$commons_io_version"
compile "org.apache.commons:commons-lang3:$commons_lang3_version"


compile "com.github.joschi.jackson:jackson-datatype-threetenbp:$jackson_version",


compile "com.brsanthu:migbase64:2.2"

testCompile "junit:junit:$junit_version"
}
14 changes: 11 additions & 3 deletions samples/client/petstore/java/jersey2-java6/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@ lazy val root = (project in file(".")).
resolvers += Resolver.mavenLocal,
libraryDependencies ++= Seq(
"io.swagger" % "swagger-annotations" % "1.5.15",
"org.glassfish.jersey.core" % "jersey-client" % "2.6",
"org.glassfish.jersey.media" % "jersey-media-multipart" % "2.6",
"org.glassfish.jersey.media" % "jersey-media-json-jackson" % "2.6",
"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.6.4" % "compile",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.6.4" % "compile",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.6.4" % "compile",



"com.github.joschi.jackson" % "jackson-datatype-threetenbp" % "2.6.4" % "compile",


"com.brsanthu" % "migbase64" % "2.2",


"org.apache.commons" % "commons-lang3" % "3.6",
"commons-io" % "commons-io" % "2.5",

"junit" % "junit" % "4.12" % "test",
"com.novocode" % "junit-interface" % "0.10" % "test"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Name | Type | Description | Notes




1 change: 1 addition & 0 deletions samples/client/petstore/java/jersey2-java6/docs/Animal.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Name | Type | Description | Notes




9 changes: 0 additions & 9 deletions samples/client/petstore/java/jersey2-java6/docs/AnimalFarm.md

This file was deleted.

16 changes: 12 additions & 4 deletions samples/client/petstore/java/jersey2-java6/docs/AnotherFakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ Method | HTTP request | Description
[**testSpecialTags**](AnotherFakeApi.md#testSpecialTags) | **PATCH** /another-fake/dummy | To test special tags




<a name="testSpecialTags"></a>
# **testSpecialTags**
> Client testSpecialTags(body)
> Client testSpecialTags(client)

To test special tags

Expand All @@ -22,10 +24,13 @@ To test special tags
//import io.swagger.client.api.AnotherFakeApi;



AnotherFakeApi apiInstance = new AnotherFakeApi();
Client body = new Client(); // Client | client model

Client client = ; // Client | client model

try {
Client result = apiInstance.testSpecialTags(body);
Client result = apiInstance.testSpecialTags(client);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnotherFakeApi#testSpecialTags");
Expand All @@ -37,7 +42,8 @@ try {

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | [**Client**](Client.md)| client model |
**client** | [**Client**](.md)| client model |


### Return type

Expand All @@ -52,3 +58,5 @@ No authorization required
- **Content-Type**: application/json
- **Accept**: application/json



Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Name | Type | Description | Notes




Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Name | Type | Description | Notes




Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ Name | Type | Description | Notes




Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ Name | Type | Description | Notes




3 changes: 3 additions & 0 deletions samples/client/petstore/java/jersey2-java6/docs/Cat.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | | [optional]
**declawed** | **Boolean** | | [optional]




Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Name | Type | Description | Notes




Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Name | Type | Description | Notes




1 change: 1 addition & 0 deletions samples/client/petstore/java/jersey2-java6/docs/Client.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ Name | Type | Description | Notes




3 changes: 3 additions & 0 deletions samples/client/petstore/java/jersey2-java6/docs/Dog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | | [optional]
**breed** | **String** | | [optional]




Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Name | Type | Description | Notes
**arrayEnum** | [**List&lt;ArrayEnumEnum&gt;**](#List&lt;ArrayEnumEnum&gt;) | | [optional]



<a name="JustSymbolEnum"></a>
## Enum: JustSymbolEnum
Name | Value
Expand All @@ -20,8 +21,6 @@ DOLLAR | &quot;$&quot;
## Enum: List&lt;ArrayEnumEnum&gt;
Name | Value
---- | -----
FISH | &quot;fish&quot;
CRAB | &quot;crab&quot;



Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]



<a name="EnumStringEnum"></a>
## Enum: EnumStringEnum
Name | Value
Expand Down
Loading