Skip to content

Commit 2a2c5c5

Browse files
committed
Merge branch 'master' of github.com:OpenAPITools/openapi-generator
* 'master' of github.com:OpenAPITools/openapi-generator: (88 commits) smaller tests, better code format (#4355) csharp-netcore: Replace null literals with default (#4345) [core] consider polymorphism when computing unused schemas (#4335) Fix issue 4326 forward throws for delegate to main method (#4327) [kotlin][client] annotate api exceptions (#4339) refactor java-vertx-web parameters and bugfix on non primitive parameter (#4353) Remove deprecated API use of ObjectFactory.property() (#2613) (#4352) [python][metadata]: Adding license and author fields (#4318) [Python] Avoid pep8 violation (#4316) [JS] Update package.json (#4261) Add slash-arun to Python technical committee (#4354) [typescript-fetch] Fix discriminator mapping name (#4340) fix security alerts reported by github (#4344) fix cpp-restbed-server json field serialization #4320 (#4323) typescript-angular: fix oneOf and anyOf generates incorrect model for primitive types (#4341) fix(typescript-angular): do not call .toISOString() on a string (#4330) (#4337) update samples (#4334) Prepare 4.2.0 release (#4333) [FEATURE][Haskell] Haskell-Servant serves static files (#4058) [FEATURE][Haskell] Add Middleware support for the haskell servant generator (#4056) ...
2 parents b0375f2 + 61d7d22 commit 2a2c5c5

File tree

3,575 files changed

+40960
-77092
lines changed

Some content is hidden

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

3,575 files changed

+40960
-77092
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
### PR checklist
55

66
- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
7-
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before .
7+
- [ ] If contributing template-only or documentation-only changes which will change sample output, [build the project](https://github.com/OpenAPITools/openapi-generator#14---build-projects) before.
88
- [ ] Run the shell script(s) under `./bin/` (or Windows batch scripts under`.\bin\windows`) to update Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run `./bin/{LANG}-petstore.sh`, `./bin/openapi3/{LANG}-petstore.sh` if updating the code or mustache templates for a language (`{LANG}`) (e.g. php, ruby, python, etc).
99
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.1.x`, `5.0.x`. Default: `master`.
1010
- [ ] Copy the [technical committee](https://github.com/openapitools/openapi-generator/#62---openapi-generator-technical-committee) to review the pull request if your PR is targeting a particular programming language.

.travis.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@ before_install:
7171
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
7272
- docker ps -a
7373
# Add bats test framework and cURL for Bash script integration tests
74-
#- sudo add-apt-repository ppa:duggan/bats --yes
75-
#- sudo apt-get update -qq
76-
#- sudo apt-get install -qq bats
77-
#- sudo apt-get install -qq curl
74+
- sudo add-apt-repository ppa:duggan/bats --yes
75+
- sudo apt-get update -qq
76+
- sudo apt-get install -qq bats
77+
- sudo apt-get install -qq curl
7878
# install dart
7979
#- sudo apt-get update
8080
#- sudo apt-get install apt-transport-https

CI/circle_parallel.sh

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ elif [ "$NODE_INDEX" = "2" ]; then
2424
# install elm-format
2525
npm install -g elm-format
2626

27+
# clear any changes to the samples
28+
git checkout -- .
29+
30+
# look for outdated samples
2731
./bin/utils/ensure-up-to-date
2832
fi
2933
#elif [ "$NODE_INDEX" = "3" ]; then

CI/samples.ci/client/petstore/java/test-manual/okhttp-gson/api/PetApiTest.java

+21-9
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public void testApiClient() {
6161
ApiClient oldClient = api.getApiClient();
6262

6363
ApiClient newClient = new ApiClient();
64+
newClient.setVerifyingSsl(true);
6465
newClient.setBasePath("http://example.com");
6566
newClient.setDebugging(true);
6667

@@ -145,6 +146,14 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
145146
}
146147
} while (result.isEmpty());
147148
assertPetMatches(pet, fetched);
149+
}
150+
151+
@Test
152+
public void testCreateAndGetPetAsyncInvalidID() throws Exception {
153+
Pet pet = createPet();
154+
api.addPet(pet);
155+
// to store returned Pet or error message/exception
156+
final Map<String, Object> result = new HashMap<String, Object>();
148157

149158
// test getting a nonexistent pet
150159
result.clear();
@@ -171,8 +180,11 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
171180
});
172181

173182
// wait for the asynchronous call to finish (at most 10 seconds)
174-
tryCount = 1;
183+
final int maxTry = 10;
184+
int tryCount = 1;
185+
Pet fetched = null;
175186
ApiException exception = null;
187+
176188
do {
177189
if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds");
178190
Thread.sleep(1000);
@@ -413,16 +425,16 @@ private void assertPetMatches(Pet expected, Pet actual) {
413425
assertEquals(expected.getId(), actual.getId());
414426
assertNotNull(actual.getCategory());
415427
assertEquals(expected.getCategory().getName(),
416-
actual.getCategory().getName());
428+
actual.getCategory().getName());
417429
}
418430

419431
/**
420432
* Assert that the given upload/download progress list satisfies the
421433
* following constraints:
422-
*
423-
* - List is not empty
424-
* - Byte count should be nondecreasing
425-
* - The last element, and only the last element, should have done=true
434+
* <p>
435+
* - List is not empty
436+
* - Byte count should be nondecreasing
437+
* - The last element, and only the last element, should have done=true
426438
*/
427439
private void assertValidProgress(List<Progress> progressList) {
428440
assertFalse(progressList.isEmpty());
@@ -433,7 +445,7 @@ private void assertValidProgress(List<Progress> progressList) {
433445
if (prev != null) {
434446
if (prev.done || prev.bytes > progress.bytes) {
435447
fail("Progress list out of order at index " + index
436-
+ ": " + progressList);
448+
+ ": " + progressList);
437449
}
438450
}
439451
prev = progress;
@@ -449,9 +461,9 @@ private static class TestApiCallback<T> implements ApiCallback<T> {
449461

450462
private final CountDownLatch latch;
451463
private final ConcurrentLinkedQueue<Progress> uploadProgress =
452-
new ConcurrentLinkedQueue<Progress>();
464+
new ConcurrentLinkedQueue<Progress>();
453465
private final ConcurrentLinkedQueue<Progress> downloadProgress =
454-
new ConcurrentLinkedQueue<Progress>();
466+
new ConcurrentLinkedQueue<Progress>();
455467

456468
private boolean done;
457469
private boolean success;

0 commit comments

Comments
 (0)