Skip to content
This repository was archived by the owner on Dec 25, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
27b41e7
Updates version to 3.0.0
spacether Apr 26, 2023
edf7d8f
Removes get_item_ (#159)
spacether Apr 26, 2023
c89a639
v3 reduce typing overloads (#165)
spacether May 5, 2023
87da2d7
Reduces generated code (#166)
spacether May 9, 2023
92c5c05
v3 more code reduction (#167)
spacether May 9, 2023
56524d6
v3 code reduction w/ shared_imports (#168)
spacether May 9, 2023
3eff13f
v3 adds generic type info to schema classes/properties/items (#174)
spacether May 23, 2023
3db1b61
v3 fixes type errors (#175)
spacether May 24, 2023
5bafc7a
v3 fix operation overloads (#176)
spacether May 29, 2023
90e9d30
v3 convert nested schemas into sequential schemas (#177)
spacether Jun 6, 2023
ccfc719
Updates __new__ to take one arg input (#183)
spacether Jun 13, 2023
b08b533
v3 adds new overload (#184)
spacether Jun 14, 2023
38e8560
v3 simplifies validation (#185)
spacether Jul 7, 2023
a8b84b6
v3 adds enum literal input and output type hints (#186)
spacether Jul 10, 2023
038d5f8
v3 adds mypy (#187)
spacether Jul 19, 2023
57157b9
v3 improves enums (#188)
spacether Jul 19, 2023
0651c7e
v3 java package consolidation, folder cleanup, docker image size redu…
spacether Jul 22, 2023
6e84144
v3 root file cleanup (#190)
spacether Jul 24, 2023
fef4bae
v3 updates java version 11 (#192)
spacether Jul 24, 2023
f535124
Updates python version to >= 3.8 (#193)
spacether Jul 24, 2023
2f3684f
Samples simplified (#194)
spacether Jul 25, 2023
7d0bf9e
Shortens operation + response files, improves request body serialize …
spacether Jul 31, 2023
8ee9f12
v3 upgrades immutabledict (#196)
spacether Aug 1, 2023
3e03cf3
Adds XSchemaDict constructor using named arguments (#197)
spacether Aug 4, 2023
b0438de
CircleCi cleanup (#198)
spacether Aug 7, 2023
6a91b8c
v3 updates format fn names (#199)
spacether Aug 7, 2023
cab7d09
v3 updates docs to correctly describe shemas + schema.validate input …
spacether Aug 15, 2023
338c928
v3 docs update including migration doc (#201)
spacether Aug 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
101 changes: 19 additions & 82 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ version: 2.1
commands: # a reusable command with parameters
command_build_and_test:
parameters:
nodeNo:
default: "0"
jobId:
default: "unset"
type: string
steps:
# Restore the dependency cache
Expand All @@ -13,17 +13,6 @@ commands: # a reusable command with parameters
- source-v2-{{ .Branch }}-{{ .Revision }}
- source-v2-{{ .Branch }}-
- source-v2-
# Machine Setup
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
- run:
name: Install Headless Chrome dependencies
command: |
sudo apt-get update && sudo apt-get install -yq \
gconf-service libasound2 libatk1.0-0 libatk-bridge2.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \
libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates \
fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget libgbm1
# The following `checkout` command checks out your code to your working directory. In 1.0 we did this implicitly. In 2.0 you can choose where in the course of a job your code should be checked out.
- checkout
# Prepare for artifact and test results collection equivalent to how it was done on 1.0.
Expand All @@ -32,67 +21,46 @@ commands: # a reusable command with parameters
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# This is based on your 1.0 configuration file or project settings
- run:
command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
- run:
command: 'sudo docker info >/dev/null 2>&1 || sudo service docker start; '
- run:
command: |-
printf '127.0.0.1 petstore.swagger.io
' | sudo tee -a /etc/hosts
# - run: docker pull openapijsonschematools/openapi-petstore
# - run: docker run -d -e OPENAPI_BASE_PATH=/v3 -e DISABLE_API_KEY=1 -e DISABLE_OAUTH=1 -p 80:8080 openapijsonschematools/openapi-petstore
- run: docker pull swaggerapi/petstore
- run: docker run --name petstore.swagger -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
- run: docker ps -a
- run: sleep 30
- run: cat /etc/hosts
command: java -version
# Test
- run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
command: echo 'export CIRCLE_JOB_ID="<<parameters.jobId>>"' >> $BASH_ENV
- run: ./.circleci/parallel.sh
# Save dependency cache
- save_cache:
key: source-v2-{{ .Branch }}-{{ .Revision }}
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- ~/R
# save "default" cache using the key "source-v2-"
- save_cache:
key: source-v2-
paths:
# This is a broad list of cache paths to include many possible development environments
# You can probably delete some of these entries
- vendor/bundle
- ~/.nvm
- ~/.pyenv
- ~/virtualenvs
- ~/.m2
- ~/.ivy2
- ~/.sbt
- ~/.bundle
- ~/.go_workspace
- ~/.gradle
- ~/.cache/bower
- ".git"
- ~/.stack
- /home/circleci/OpenAPITools/openapi-json-schema-generator/samples/client/petstore/haskell-http-client/.stack-work
- ~/R
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
Expand All @@ -105,8 +73,8 @@ commands: # a reusable command with parameters
path: /tmp/circleci-test-results
command_docker_build_and_test:
parameters:
nodeNo:
default: "0"
jobId:
default: "unset"
type: string
steps:
# Machine Setup
Expand All @@ -117,16 +85,10 @@ commands: # a reusable command with parameters
# In many cases you can simplify this from what is generated here.
# 'See docs on artifact collection here https://circleci.com/docs/2.0/artifacts/'
- run: mkdir -p $CIRCLE_ARTIFACTS $CIRCLE_TEST_REPORTS
# This is based on your 1.0 configuration file or project settings
# - run:
# command: sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java; sudo update-alternatives --set javac /usr/lib/jvm/java-8-openjdk-amd64/bin/javac; echo -e "export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64" >> $BASH_ENV
# - run:
# Test
# - run: mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error
- run:
name: "Setup custom environment variables"
command: echo 'export CIRCLE_NODE_INDEX="<<parameters.nodeNo>>"' >> $BASH_ENV
- run: ./CI/circle_parallel.sh
command: echo 'export CIRCLE_JOB_ID="<<parameters.jobId>>"' >> $BASH_ENV
- run: ./.circleci/parallel.sh
# Teardown
# If you break your build into multiple jobs with workflows, you will probably want to do the parts of this that are relevant in each
# Save test results
Expand All @@ -138,18 +100,7 @@ commands: # a reusable command with parameters
- store_artifacts:
path: /tmp/circleci-test-results
jobs:
node0:
machine:
image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- command_build_and_test:
nodeNo: "0"
node1:
ensureSamplesAndGeneratorDocsUpToDate:
machine:
image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-json-schema-generator
Expand All @@ -159,8 +110,8 @@ jobs:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- command_build_and_test:
nodeNo: "1"
node2:
jobId: "ensureSamplesAndGeneratorDocsUpToDate"
mvnCleanInstall:
machine:
image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-json-schema-generator
Expand All @@ -170,22 +121,10 @@ jobs:
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- command_build_and_test:
nodeNo: "2"
node3:
machine:
image: ubuntu-2004:202201-02
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
CIRCLE_ARTIFACTS: /tmp/circleci-artifacts
CIRCLE_TEST_REPORTS: /tmp/circleci-test-results
steps:
- checkout
- command_build_and_test:
nodeNo: "3"
node4:
jobId: "mvnCleanInstall"
testPythonClientSamples:
docker:
- image: fkrull/multi-python
- image: python:3.8
working_directory: ~/OpenAPITools/openapi-json-schema-generator
shell: /bin/bash --login
environment:
Expand All @@ -194,13 +133,11 @@ jobs:
steps:
- checkout
- command_docker_build_and_test:
nodeNo: "4"
jobId: "testPythonClientSamples"
workflows:
version: 2
build:
jobs:
- node0
- node1
- node2
- node3
- node4
- ensureSamplesAndGeneratorDocsUpToDate
- mvnCleanInstall
- testPythonClientSamples
32 changes: 32 additions & 0 deletions .circleci/parallel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# A bash script to run CircleCI node/test in parallel
#

JOB_ID=${CIRCLE_JOB_ID:-"unset"}

set -e

export NODE_ENV=test

if [ "$JOB_ID" = "ensureSamplesAndGeneratorDocsUpToDate" ]; then
echo "Running job $JOB_ID"
./bin/utils/ensure-up-to-date

elif [ "$JOB_ID" = "mvnCleanInstall" ]; then
echo "Running job $JOB_ID"
mvn --no-snapshot-updates --quiet clean install -Dorg.slf4j.simpleLogger.defaultLogLevel=error

elif [ "$JOB_ID" = "testPythonClientSamples" ]; then
echo "Running job $JOB_ID ..."
(cd samples/client/petstore/python && make test)
(cd samples/client/3_0_3_unit_test/python && make test)
(cd samples/client/openapi_features/nonCompliantUseDiscriminatorIfCompositionFails/python && make test)
(cd samples/client/openapi_features/security/python && make test)

else
echo "Running job $JOB_ID"

fi


8 changes: 0 additions & 8 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ docs/ @OpenAPITools/generator-core-team

## Individual interests
.github/**/* @jimschubert
scripts/**/* @jimschubert
website/**/* @jimschubert
bin/ci/**/* @jimschubert

## Build related
Expand All @@ -27,9 +25,3 @@ bin/utils/**/* @OpenAPITools/build
modules/openapi-generator-cli/**/* @jimschubert
modules/openapi-generator-gradle-plugin/**/* @jimschubert
modules/openapi-generator-maven-plugin/**/* @jimschubert

# Martin Delille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtClientCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/java/org/openapijsonschematools/codegen/languages/CppQtAbstractCodegen.java @martindelille
/Users/martin/dev/clone/openapi-generator/modules/openapi-generator/src/main/resources/cpp-qt-client @martindelille
/Users/martin/dev/clone/openapi-generator/samples/client/petstore/cpp-qt @martindelille
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
<!-- Please check the completed items below -->
### PR checklist

- [ ] Read the [contribution guidelines](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/CONTRIBUTING.md).
- [ ] Read the [contribution guidelines](https://github.com/openapi-json-schema-tools/openapi-json-schema-generator/blob/master/docs/contributing.md).
- [ ] Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
- [ ] Run the following to [build the project](https://github.com/OpenAPITools/openapi-json-schema-generator#14---build-projects) and update samples:
```
./mvnw clean package
mvn clean package
./bin/generate-samples.sh
./bin/utils/export_docs_generators.sh
```
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/check-supported-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [8, 11]
java: [11, 17]
os: [ubuntu-latest]
include:
- java: 8
- java: 11
os: windows-latest
- java: 17
os: ubuntu-latest
Expand Down Expand Up @@ -51,7 +51,7 @@ jobs:

- name: Upload Maven build artifact
uses: actions/upload-artifact@v3
if: matrix.java == '8' && matrix.os == 'ubuntu-latest'
if: matrix.java == '11' && matrix.os == 'ubuntu-latest'
with:
name: artifact
path: modules/openapi-generator-cli/target/openapi-generator-cli.jar
Expand All @@ -61,7 +61,7 @@ jobs:
run: gradle -b modules/openapi-generator-gradle-plugin/samples/local-spec/build.gradle buildGoSdk --stacktrace

- name: Test Maven plugin integration
if: matrix.java == '8'
if: matrix.java == '11'
shell: bash
run: |
cd modules/openapi-generator-maven-plugin
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/openapi-generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Cache maven dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -52,10 +52,10 @@ jobs:
- build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Cache maven dependencies
uses: actions/cache@v3
Expand Down Expand Up @@ -87,10 +87,10 @@ jobs:
- build
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v3
Expand All @@ -101,7 +101,6 @@ jobs:
run: |
bash bin/meta-codegen.sh
bash bin/utils/export_docs_generators.sh
bash bin/utils/copy-to-website.sh
bash bin/utils/export_generators_readme.sh
- name: Verify git status
run: |
Expand All @@ -126,10 +125,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 11
distribution: 'temurin'
- name: Download openapi-generator-cli.jar artifact
uses: actions/download-artifact@v3
Expand Down
Loading