Skip to content

Commit

Permalink
Merge branch 'master' into path-handling
Browse files Browse the repository at this point in the history
* master: (142 commits)
  update python samples
  clarify direction of py client side validation flag (#6850)
  fix erronous cmd arg example for docker in readme (#6846)
  [BUG] [JAVA] Fix multiple files upload (#4803) (#6808)
  [kotlin][client] fix retrofit dependencies (#6836)
  [PowerShell] add more fields to be customized (#6835)
  [Java][WebClient]remove the dead code from java ApiClient.mustache (#6556)
  [PHP] Better handling of invalid data (array) (#6760)
  Make ApiClient in retrofit2 be able to use own OkHttpClient (#6699)
  mark python2 support in flask as deprecated (#6653)
  update samples
  [Java][jersey2] Add a getter for the User-Agent header value (#6831)
  Provides a default nil value for optional init parameters (#6827)
  [Java] Deprecate feignVersion option (#6824)
  [R] Enum R6Class Support, closes #3367 (#5728)
  [Rust][Client] Unify sync/async client structure (#6753)
  [php-ze-ph] Set required PHP version to ^7.2 (#6763)
  [Java][client][native][Gradle] Add missing jackson-databind-nullable (#6802)
  Improve sttpOpenApiClient generator (#6684)
  Update docker-tag-latest-release.yml
  ...
  • Loading branch information
jimschubert committed Jul 3, 2020
2 parents bbfc66d + 6178947 commit 3574e9c
Show file tree
Hide file tree
Showing 7,117 changed files with 140,144 additions and 163,257 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@

- [ ] 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) beforehand.
- [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/config/java*`.
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `master`, `4.3.x`, `5.0.x`. Default: `master`.
- [ ] Run the shell script `./bin/generate-samples.sh`to update all Petstore samples related to your fix. This is important, as CI jobs will verify _all_ generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example `./bin/generate-samples.sh bin/config/java*`. For Windows users, please run the script in [Git BASH](https://gitforwindows.org/).
- [ ] File the PR against the [correct branch](https://github.com/OpenAPITools/openapi-generator/wiki/Git-Branches): `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.
62 changes: 62 additions & 0 deletions .github/workflows/docker-tag-latest-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Docker Tag latest-release

# Run every couple of days
on:
schedule:
- cron: "30 12 */2 * *"

jobs:
# This pulls all containers for the last known release tag, and tags as latest-release or x-latest-release for shared repo
tagLatestRelease:
runs-on: ubuntu-latest

steps:

# Pull the code so we have git metadata
- name: Checkout code
uses: actions/checkout@v2

# This action will "unshallow" so we have all tag info
- name: Get latest tag
id: tagger
uses: jimschubert/query-tag-action@v1
with:
include: 'v*'
exclude: '*-rc*'
commit-ish: 'HEAD~'

- name: DockerHub Login
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin

# Tags openapitools/openapi-generator-online, which is an automated build
- name: "Tag openapi-generator-online:x"
id: tag-openapi-generator-online
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator-online:${{steps.tagger.outputs.tag}} openapitools/openapi-generator-online:latest-release
docker push openapitools/openapi-generator-online:latest-release
# Tags openapitools/openapi-generator's CLI image (this repo holds CLI + Online via tag prefix)
- name: "Tag openapi-generator:cli-x"
id: tag-cli
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator:cli-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:cli-latest-release
docker push openapitools/openapi-generator:cli-latest-release
# Tags openapitools/openapi-generator's ONLINE image (this repo holds CLI + Online via tag prefix)
- name: "Tag openapi-generator:online-x"
id: tag-online
run: |
echo 'Tagging as latest-release: ${{steps.tagger.outputs.tag}}'
docker pull openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}}
docker tag openapitools/openapi-generator:online-${{steps.tagger.outputs.tag}} openapitools/openapi-generator:online-latest-release
docker push openapitools/openapi-generator:online-latest-release
# Clean up docker credentials/configs/etc.
- name: Cleanup
if: always()
run: |
rm -f ${HOME}/.docker/config.json
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ cache:
- $HOME/samples/client/petstore/php/OpenAPIToolsClient-php/vendor
- $HOME/samples/client/petstore/ruby/vendor/bundle
- $HOME/samples/client/petstore/python/.venv/
- $HOME/samples/openapi3/client/petstore/typescript/tests/default/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/jquery/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/object_params/node_modules
- $HOME/samples/openapi3/client/petstore/typescript/tests/inversify/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/node_modules
- $HOME/samples/client/petstore/typescript-node/npm/typings/
- $HOME/samples/client/petstore/typescript-fetch/tests/default/node_modules
Expand All @@ -41,6 +45,7 @@ cache:
- $HOME/.npm
- $HOME/.rvm/gems/ruby-2.4.1
- $HOME/website/node_modules/
- $HOME/.cache/deno

services:
- docker
Expand Down Expand Up @@ -85,7 +90,8 @@ before_install:
#- sudo apt-get update
#- sudo apt-get install dart
# switch to php7
- phpenv global 7.1
- phpenv versions
- phpenv global 7.2.15
- php -v
# install perl module
#- cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
Expand Down Expand Up @@ -114,6 +120,9 @@ before_install:
gpg --check-trustdb ;
fi;
- pushd .; cd website; yarn install; popd
# install Deno
- curl -fsSL https://deno.land/x/install/install.sh | sh -s v1.1.2
- export PATH="$HOME/.deno/bin:$PATH"

install:
# Add Godeps dependencies to GOPATH and PATH
Expand Down
20 changes: 5 additions & 15 deletions CI/bitrise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ workflows:
- [email protected]:
inputs:
- packages: maven
- [email protected].5:
- [email protected].6:
title: Install Cocoapods
inputs:
- content: |
#!/usr/bin/env bash
sudo gem install cocoapods
- [email protected].5:
- [email protected].6:
inputs:
- content: |
#!/usr/bin/env bash
Expand All @@ -30,16 +30,16 @@ workflows:
mvn --no-snapshot-updates package -Dorg.slf4j.simpleLogger.defaultLogLevel=error
title: Build openapi-generator
- [email protected].5:
- [email protected].6:
title: Update Swift samples
inputs:
- content: |
#!/usr/bin/env bash
set -e
sh bin/generate-samples.sh bin/configs/swift5-*.yaml
- [email protected].5:
bin/generate-samples.sh ./bin/configs/other/swift5-*
- [email protected].6:
title: Run Swift5 tests
inputs:
- content: |
Expand All @@ -48,14 +48,4 @@ workflows:
set -e
./samples/client/test/swift5/swift5_test_all.sh
# comment out the following as it's causing timeout
# - [email protected]:
# title: Run all bin scripts
# inputs:
# - content: |-
# #!/usr/bin/env bash
#
# set -e
#
# ./bin/run-all-petstore
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ To add test cases (optional) covering the change in the code generator, please r

To test the templates, please perform the following:
- Update the Petstore sample by running the shell scripts under `bin` and `bin/openapi3` folder. For example, run `./bin/python-petstore.sh` and `./bin/openapi3/python-petstore.sh` to update the Python PetStore API client under [`samples/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/client/petstore/python) and [`samples/openapi3/client/petstore/python`](https://github.com/openapitools/openapi-generator/tree/master/samples/openapi3/client/petstore/python). For Windows, the batch files can be found under `bin\windows` folder. (If you find that there are new files generated or unexpected changes as a result of the update, that's not unusual as the test cases are added to the OpenAPI spec from time to time. If you've questions or concerns, please open a ticket to start a discussion)
- During development it can be helpful to quickly regenerate the samples without recompiling all of openapi-generator, e.g. when you have only updated the mustache templates. This can be done by passing the `-t` parameter: `./bin/python-petstore.sh -t modules/openapi-generator/src/main/resources/python`.
- Run the tests in the sample folder using maven `mvn integration-test -rf :<artifactId>`, e.g. open a shell in `samples/client/petstore/python`, run `mvn integration-test -rf :PythonPetstoreClientTests`. The artifactId of the project can be found in the pom.xml file. (some languages may not contain unit testing for Petstore and we're looking for contribution from the community to implement those tests)
- Finally, git commit the updated samples files: `git commit -a`
(`git add -A` if added files with new test cases)
Expand Down
Loading

0 comments on commit 3574e9c

Please sign in to comment.