Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update samples for java/jersey2-java6 (and fix artifact ID) #5118

Merged
merged 3 commits into from
Mar 23, 2017
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
2 changes: 1 addition & 1 deletion bin/java-petstore-jersey2-java6.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi

# if you've executed sbt assembly previously it will use that instead.
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
ags="$@ generate -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true"
ags="$@ generate --artifact-id swagger-petstore-jersey2-java6 -i modules/swagger-codegen/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -l java -c bin/java-petstore-jersey2.json -o samples/client/petstore/java/jersey2-java6 -DhideGenerationTimestamp=true,supportJava6=true"

echo "Removing files and folders under samples/client/petstore/java/jersey2/src/main"
rm -rf samples/client/petstore/java/jersey2-java6/src/main
Expand Down
12 changes: 0 additions & 12 deletions samples/client/petstore/java/jersey2-java6/.travis.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,6 @@
#
# 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.
#
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From #4197.

language: java
jdk:
- oraclejdk8
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/java/jersey2-java6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if(hasProperty('target') && target == 'android') {

install {
repositories.mavenInstaller {
pom.artifactId = 'swagger-petstore-jersey2'
pom.artifactId = 'swagger-petstore-jersey2-java6'
}
}

Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/java/jersey2-java6/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
lazy val root = (project in file(".")).
settings(
organization := "io.swagger",
name := "swagger-petstore-jersey2",
name := "swagger-petstore-jersey2-java6",
version := "1.0.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
Expand Down
15 changes: 15 additions & 0 deletions samples/client/petstore/java/jersey2-java6/docs/Capitalization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

# Capitalization
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added by #4458.


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**smallCamel** | **String** | | [optional]
**capitalCamel** | **String** | | [optional]
**smallSnake** | **String** | | [optional]
**capitalSnake** | **String** | | [optional]
**scAETHFlowPoints** | **String** | | [optional]
**ATT_NAME** | **String** | Name of the pet | [optional]



10 changes: 10 additions & 0 deletions samples/client/petstore/java/jersey2-java6/docs/ClassModel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# ClassModel
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added by #4237.


## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**propertyClass** | **String** | | [optional]



Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Name | Type | Description | Notes
**enumString** | [**EnumStringEnum**](#EnumStringEnum) | | [optional]
**enumInteger** | [**EnumIntegerEnum**](#EnumIntegerEnum) | | [optional]
**enumNumber** | [**EnumNumberEnum**](#EnumNumberEnum) | | [optional]
**outerEnum** | [**OuterEnum**](OuterEnum.md) | | [optional]


<a name="EnumStringEnum"></a>
Expand Down
14 changes: 9 additions & 5 deletions samples/client/petstore/java/jersey2-java6/docs/FakeApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Method | HTTP request | Description

To test \&quot;client\&quot; model

To test \&quot;client\&quot; model
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This duplicated line is here because the summary and description is the same. With 9051848 (I don't see a PR for this) the key was fixed from descriptions (which was ignored) to description.


### Example
```java
// Import classes:
Expand Down Expand Up @@ -137,6 +139,8 @@ null (empty response body)

To test enum parameters

To test enum parameters

### Example
```java
// Import classes:
Expand All @@ -151,7 +155,7 @@ List<String> enumHeaderStringArray = Arrays.asList("enumHeaderStringArray_exampl
String enumHeaderString = "-efg"; // String | Header parameter enum test (string)
List<String> enumQueryStringArray = Arrays.asList("enumQueryStringArray_example"); // List<String> | Query parameter enum test (string array)
String enumQueryString = "-efg"; // String | Query parameter enum test (string)
BigDecimal enumQueryInteger = new BigDecimal(); // BigDecimal | Query parameter enum test (double)
Integer enumQueryInteger = 56; // Integer | Query parameter enum test (double)
Double enumQueryDouble = 3.4D; // Double | Query parameter enum test (double)
try {
apiInstance.testEnumParameters(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble);
Expand All @@ -171,8 +175,8 @@ Name | Type | Description | Notes
**enumHeaderString** | **String**| Header parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryStringArray** | [**List&lt;String&gt;**](String.md)| Query parameter enum test (string array) | [optional] [enum: >, $]
**enumQueryString** | **String**| Query parameter enum test (string) | [optional] [default to -efg] [enum: _abc, -efg, (xyz)]
**enumQueryInteger** | **BigDecimal**| Query parameter enum test (double) | [optional]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional]
**enumQueryInteger** | **Integer**| Query parameter enum test (double) | [optional] [enum: 1, -2]
**enumQueryDouble** | **Double**| Query parameter enum test (double) | [optional] [enum: 1.1, -1.2]

### Return type

Expand All @@ -184,6 +188,6 @@ No authorization required

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json
- **Content-Type**: */*
- **Accept**: */*

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Name | Type | Description | Notes
**binary** | **byte[]** | | [optional]
**date** | [**LocalDate**](LocalDate.md) | |
**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
**password** | **String** | |


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uuid** | **String** | | [optional]
**uuid** | [**UUID**](UUID.md) | | [optional]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks wrong. (The format: uuid was in the YAML from the beginning. Possibly #4739 changing to use java.util.UUID instead of String added the link here?

Related: #5026. #5027 might possibly fix this too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ePaul there's a discussion about updating isPrimitiveType to include UUID as well. IMO, isPrimitiveType should include UUID.

(the issue was caused by the change that maps uuid as UUID instead of String in Java)

**dateTime** | [**DateTime**](DateTime.md) | | [optional]
**map** | [**Map&lt;String, Animal&gt;**](Animal.md) | | [optional]

Expand Down
14 changes: 14 additions & 0 deletions samples/client/petstore/java/jersey2-java6/docs/OuterEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

# OuterEnum
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was added by #4164 for #4160/#4088.


## Enum


* `PLACED` (value: `"placed"`)

* `APPROVED` (value: `"approved"`)

* `DELIVERED` (value: `"delivered"`)



Loading