Skip to content

Commit

Permalink
Merge branch 'master' of github.com:OpenAPITools/openapi-generator
Browse files Browse the repository at this point in the history
* '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)
  ...
  • Loading branch information
jimschubert committed Nov 3, 2019
2 parents b0375f2 + 61d7d22 commit 2a2c5c5
Show file tree
Hide file tree
Showing 3,575 changed files with 40,960 additions and 77,092 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
### PR checklist

- [ ] Read the [contribution guidelines](https://github.com/openapitools/openapi-generator/blob/master/CONTRIBUTING.md).
- [ ] 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 .
- [ ] 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.
- [ ] 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).
- [ ] 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`.
- [ ] 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.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ before_install:
- docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- docker ps -a
# Add bats test framework and cURL for Bash script integration tests
#- sudo add-apt-repository ppa:duggan/bats --yes
#- sudo apt-get update -qq
#- sudo apt-get install -qq bats
#- sudo apt-get install -qq curl
- sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- sudo apt-get install -qq curl
# install dart
#- sudo apt-get update
#- sudo apt-get install apt-transport-https
Expand Down
4 changes: 4 additions & 0 deletions CI/circle_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ elif [ "$NODE_INDEX" = "2" ]; then
# install elm-format
npm install -g elm-format

# clear any changes to the samples
git checkout -- .

# look for outdated samples
./bin/utils/ensure-up-to-date
fi
#elif [ "$NODE_INDEX" = "3" ]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void testApiClient() {
ApiClient oldClient = api.getApiClient();

ApiClient newClient = new ApiClient();
newClient.setVerifyingSsl(true);
newClient.setBasePath("http://example.com");
newClient.setDebugging(true);

Expand Down Expand Up @@ -145,6 +146,14 @@ public void onDownloadProgress(long bytesRead, long contentLength, boolean done)
}
} while (result.isEmpty());
assertPetMatches(pet, fetched);
}

@Test
public void testCreateAndGetPetAsyncInvalidID() throws Exception {
Pet pet = createPet();
api.addPet(pet);
// to store returned Pet or error message/exception
final Map<String, Object> result = new HashMap<String, Object>();

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

// wait for the asynchronous call to finish (at most 10 seconds)
tryCount = 1;
final int maxTry = 10;
int tryCount = 1;
Pet fetched = null;
ApiException exception = null;

do {
if (tryCount > maxTry) fail("have not got result of getPetByIdAsync after 10 seconds");
Thread.sleep(1000);
Expand Down Expand Up @@ -413,16 +425,16 @@ private void assertPetMatches(Pet expected, Pet actual) {
assertEquals(expected.getId(), actual.getId());
assertNotNull(actual.getCategory());
assertEquals(expected.getCategory().getName(),
actual.getCategory().getName());
actual.getCategory().getName());
}

/**
* Assert that the given upload/download progress list satisfies the
* following constraints:
*
* - List is not empty
* - Byte count should be nondecreasing
* - The last element, and only the last element, should have done=true
* <p>
* - List is not empty
* - Byte count should be nondecreasing
* - The last element, and only the last element, should have done=true
*/
private void assertValidProgress(List<Progress> progressList) {
assertFalse(progressList.isEmpty());
Expand All @@ -433,7 +445,7 @@ private void assertValidProgress(List<Progress> progressList) {
if (prev != null) {
if (prev.done || prev.bytes > progress.bytes) {
fail("Progress list out of order at index " + index
+ ": " + progressList);
+ ": " + progressList);
}
}
prev = progress;
Expand All @@ -449,9 +461,9 @@ private static class TestApiCallback<T> implements ApiCallback<T> {

private final CountDownLatch latch;
private final ConcurrentLinkedQueue<Progress> uploadProgress =
new ConcurrentLinkedQueue<Progress>();
new ConcurrentLinkedQueue<Progress>();
private final ConcurrentLinkedQueue<Progress> downloadProgress =
new ConcurrentLinkedQueue<Progress>();
new ConcurrentLinkedQueue<Progress>();

private boolean done;
private boolean success;
Expand Down
Loading

0 comments on commit 2a2c5c5

Please sign in to comment.