diff --git a/.github/actions/dotnetbuild/action.yml b/.github/actions/dotnetbuild/action.yml
new file mode 100644
index 000000000000..8c01e09bcae8
--- /dev/null
+++ b/.github/actions/dotnetbuild/action.yml
@@ -0,0 +1,33 @@
+name: 'DotNetBuild'
+description: 'build dotnet project'
+inputs:
+ path:
+ description: 'project root path'
+ required: true
+ job-name:
+ description: 'Job name'
+ required: true
+outputs:
+ logs:
+ description: "logs"
+ value: ${{ steps.build.outputs.logs }}
+ path:
+ description: "output path"
+ value: ${{ steps.build.outputs.path }}
+runs:
+ using: "composite"
+ steps:
+ - id: build
+ name: build
+ run: |
+ logfile=${{ inputs.job-name }}.log
+ echo "::set-output name=logs::$(echo $logfile)"
+ echo "::set-output name=path::$(echo generated/${{ inputs.job-name }})"
+ echo -e "\n****** dotnet build ******\n" >> $logfile
+ curdir=$(pwd)
+ cd ${{ inputs.path }}
+ echo -e "\n****** dotnet build ******\n" >> $curdir/$logfile
+ dotnet restore src/IO.Swagger/ | tee --append $curdir/$logfile
+ dotnet build src/IO.Swagger/ | tee --append $curdir/$logfile
+ cd ${curdir}
+ shell: bash
diff --git a/.github/actions/generate/action.yml b/.github/actions/generate/action.yml
new file mode 100644
index 000000000000..7de609f95d97
--- /dev/null
+++ b/.github/actions/generate/action.yml
@@ -0,0 +1,37 @@
+name: 'Generate'
+description: 'codegen generate'
+inputs:
+ spec-url:
+ description: 'Url of the openapi definition'
+ required: true
+ default: 'https://petstore3.swagger.io/api/v3/openapi.json'
+ language:
+ description: 'Language to generate'
+ required: true
+ job-name:
+ description: 'Job name'
+ required: true
+ options:
+ description: 'Language Options'
+ required: false
+ default: ""
+outputs:
+ logs:
+ description: "logs"
+ value: ${{ steps.generate.outputs.logs }}
+ path:
+ description: "output path"
+ value: ${{ steps.generate.outputs.path }}
+runs:
+ using: "composite"
+ steps:
+ - id: generate
+ name: generate
+ run: |
+ logfile=${{ inputs.job-name }}.log
+ echo "::set-output name=logs::$(echo $logfile)"
+ chmod +x ${{ github.action_path }}/generate.sh
+ echo -e "\n****** generate ******\n" > $logfile
+ ${{ github.action_path }}/generate.sh ${{ inputs.language }} ${{ inputs.job-name }} ${{ inputs.spec-url }} ${{ inputs.options }} >> $logfile
+ echo "::set-output name=path::$(echo generated/${{ inputs.job-name }})"
+ shell: bash
diff --git a/.github/actions/generate/generate.sh b/.github/actions/generate/generate.sh
new file mode 100755
index 000000000000..d4ee6f3ffcbb
--- /dev/null
+++ b/.github/actions/generate/generate.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+SCRIPT="$0"
+
+while [ -h "$SCRIPT" ] ; do
+ ls=`ls -ld "$SCRIPT"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ SCRIPT="$link"
+ else
+ SCRIPT=`dirname "$SCRIPT"`/"$link"
+ fi
+done
+
+
+executable="swagger-codegen-cli.jar"
+
+LANG=$1
+
+JOB_NAME=$2
+if [ -z "$JOB_NAME" ]
+then
+ JOB_NAME=$LANG
+fi
+
+SPEC_URL=$3
+if [[ $SPEC_URL == "null" ]];
+then
+ SPEC_URL="https://petstore3.swagger.io/api/v3/openapi.json"
+fi
+
+shift;
+shift;
+shift;
+
+export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -Dlogback.configurationFile=$SCRIPT/logback.xml"
+ags="generate -i ${SPEC_URL} -l ${LANG} -o generated/${JOB_NAME} $@"
+
+java $JAVA_OPTS -jar $executable $ags
+
+
diff --git a/.github/actions/generate/logback.xml b/.github/actions/generate/logback.xml
new file mode 100644
index 000000000000..656e397fa98c
--- /dev/null
+++ b/.github/actions/generate/logback.xml
@@ -0,0 +1,12 @@
+
+
+
+
+ %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
diff --git a/.github/actions/javabuild/action.yml b/.github/actions/javabuild/action.yml
new file mode 100644
index 000000000000..bd8692d8a543
--- /dev/null
+++ b/.github/actions/javabuild/action.yml
@@ -0,0 +1,31 @@
+name: 'JavaBuild'
+description: 'build java with maven'
+inputs:
+ path:
+ description: 'project root path'
+ required: true
+ job-name:
+ description: 'Job name'
+ required: true
+outputs:
+ logs:
+ description: "logs"
+ value: ${{ steps.build.outputs.logs }}
+ path:
+ description: "output path"
+ value: ${{ steps.build.outputs.path }}
+runs:
+ using: "composite"
+ steps:
+ - id: build
+ name: build
+ run: |
+ logfile=${{ inputs.job-name }}.log
+ echo "::set-output name=logs::$(echo $logfile)"
+ echo "::set-output name=path::$(echo generated/${{ inputs.job-name }})"
+ echo -e "\n****** mvn clean package ******\n" >> $logfile
+ curdir=$(pwd)
+ cd ${{ inputs.path }}
+ mvn clean package | tee --append $curdir/$logfile
+ cd ${curdir}
+ shell: bash
diff --git a/.github/actions/jsbuild/action.yml b/.github/actions/jsbuild/action.yml
new file mode 100644
index 000000000000..fac15387f30b
--- /dev/null
+++ b/.github/actions/jsbuild/action.yml
@@ -0,0 +1,33 @@
+name: 'JsBuild'
+description: 'build js with npm'
+inputs:
+ path:
+ description: 'project root path'
+ required: true
+ job-name:
+ description: 'Job name'
+ required: true
+outputs:
+ logs:
+ description: "logs"
+ value: ${{ steps.build.outputs.logs }}
+ path:
+ description: "output path"
+ value: ${{ steps.build.outputs.path }}
+runs:
+ using: "composite"
+ steps:
+ - id: build
+ name: build
+ run: |
+ logfile=${{ inputs.job-name }}.log
+ echo "::set-output name=logs::$(echo $logfile)"
+ echo "::set-output name=path::$(echo generated/${{ inputs.job-name }})"
+ echo -e "\n****** npm i ******\n" >> $logfile
+ curdir=$(pwd)
+ cd ${{ inputs.path }}
+ npm i 2>&1 | tee --append $curdir/$logfile
+ echo -e "\n****** npm run test ******\n" >> $curdir/$logfile
+ npm run test 2>&1 | tee --append $curdir/$logfile
+ cd ${curdir}
+ shell: bash
diff --git a/.github/actions/pythonbuild/action.yml b/.github/actions/pythonbuild/action.yml
new file mode 100644
index 000000000000..70964fe9ceb4
--- /dev/null
+++ b/.github/actions/pythonbuild/action.yml
@@ -0,0 +1,34 @@
+name: 'Python Build'
+description: 'build python project'
+inputs:
+ path:
+ description: 'project root path'
+ required: true
+ job-name:
+ description: 'Job name'
+ required: true
+outputs:
+ logs:
+ description: "logs"
+ value: ${{ steps.build.outputs.logs }}
+ path:
+ description: "output path"
+ value: ${{ steps.build.outputs.path }}
+runs:
+ using: "composite"
+ steps:
+ - id: build
+ name: build
+ run: |
+ logfile=${{ inputs.job-name }}.log
+ echo "::set-output name=logs::$(echo $logfile)"
+ echo "::set-output name=path::$(echo generated/${{ inputs.job-name }})"
+ echo -e "\n****** python ******\n" >> $logfile
+ curdir=$(pwd)
+ cd ${{ inputs.path }}
+ echo -e "\n****** python setup and build ******\n" >> $curdir/$logfile
+ python3 setup.py install --user | tee --append $curdir/$logfile
+ pip3 install nose2 --user
+ python3 -m nose2 | tee --append $curdir/$logfile
+ cd ${curdir}
+ shell: bash
diff --git a/.github/workflows/test-framework-dotnet.yml b/.github/workflows/test-framework-dotnet.yml
new file mode 100644
index 000000000000..d68157ef9961
--- /dev/null
+++ b/.github/workflows/test-framework-dotnet.yml
@@ -0,0 +1,158 @@
+name: Test Framework DotNet
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ spec-url: ${SPEC_URL}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ dotnet-version: [3.1.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ - name: Set up DotNet 3.1.x
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: ${{ matrix.dotnet-version }}
+ - name: build
+ id: build
+ uses: ./.github/actions/dotnetbuild
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
diff --git a/.github/workflows/test-framework-dynamic.yml b/.github/workflows/test-framework-dynamic.yml
new file mode 100644
index 000000000000..01cf85a3cfea
--- /dev/null
+++ b/.github/workflows/test-framework-dynamic.yml
@@ -0,0 +1,164 @@
+name: Test Framework Dynamic
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+ buildAction:
+ description: 'build action name'
+ required: true
+ default: "jsbuild"
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+ BUILD_ACTION: ${{ github.event.inputs.buildAction }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ #path: ${{ env.JOB_NAME }}.build.log
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: build
+ id: build
+ uses: ./.github/actions/${{ env.BUILD_ACTION }}
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+ BUILD_ACTION: ${{ github.event.inputs.buildAction }}
diff --git a/.github/workflows/test-framework-java.yml b/.github/workflows/test-framework-java.yml
new file mode 100644
index 000000000000..ccd0c8bdbfd5
--- /dev/null
+++ b/.github/workflows/test-framework-java.yml
@@ -0,0 +1,158 @@
+name: Test Framework JAVA
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ spec-url: ${SPEC_URL}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java-version: [1.8]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ - name: Set up JDK 1.8
+ uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java-version }}
+ - name: build
+ id: build
+ uses: ./.github/actions/javabuild
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
diff --git a/.github/workflows/test-framework-js.yml b/.github/workflows/test-framework-js.yml
new file mode 100644
index 000000000000..a6a60557b4df
--- /dev/null
+++ b/.github/workflows/test-framework-js.yml
@@ -0,0 +1,166 @@
+name: Test Framework JS
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ spec-url: ${SPEC_URL}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ #path: ${{ env.JOB_NAME }}.build.log
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ###############################################
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ##### TODO: pass also build buildCommands coming from workflow input steps
+ ###############################################
+ - name: build
+ id: build
+ uses: ./.github/actions/jsbuild
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
diff --git a/.github/workflows/test-framework-matrix.yml b/.github/workflows/test-framework-matrix.yml
new file mode 100644
index 000000000000..d0fbfb32c77b
--- /dev/null
+++ b/.github/workflows/test-framework-matrix.yml
@@ -0,0 +1,156 @@
+name: Test Framework Matrix
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ # generate a javascript client V3 from petstore3.swagger.io OpenAPI definition
+ generate-js-v3-petstore:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ java: [ 8 ]
+ url:
+ - "https://petstore3.swagger.io/api/v3/openapi.json"
+ - "https://raw.githubusercontent.com/swagger-api/swagger-codegen/3.0.0/modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-fake-endpoints-models-for-testing.yaml"
+ - "https://raw.githubusercontent.com/swagger-api/swagger-codegen/3.0.0/modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-composed-schemas.yaml"
+ include:
+ - java: 8
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstore3"
+ - java: 8
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstorefake"
+ - java: 8
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstorecomposed"
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ options: $OPTIONS
+ spec-url: ${{ matrix['url'] }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: generate_logs_${{ env.JOB_NAME }}
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: generated_${{ env.JOB_NAME }}
+ path: ${{ steps.generate.outputs.path }}
+ - run: |
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: generate_outcome_${{ env.JOB_NAME }}
+ path: generate_outcome_${{ env.JOB_NAME }}
+ env:
+ LANGUAGE: "javascript"
+ JOB_NAME: js-petstore-v3${{ matrix['specId'] }}
+ OPTIONS: " -DappName=PetstoreClient --additional-properties useES6=false"
+
+ build-js-v3-petstore:
+
+ needs: generate-js-v3-petstore
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ node-version: [12.x]
+ url:
+ - "https://petstore3.swagger.io/api/v3/openapi.json"
+ - "https://raw.githubusercontent.com/swagger-api/swagger-codegen/3.0.0/modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-fake-endpoints-models-for-testing.yaml"
+ - "https://raw.githubusercontent.com/swagger-api/swagger-codegen/3.0.0/modules/swagger-codegen/src/test/resources/3_0_0/petstore-with-composed-schemas.yaml"
+ include:
+ - node-version: 12.x
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstore3"
+ - node-version: 12.x
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstorefake"
+ - node-version: 12.x
+ url: "https://petstore3.swagger.io/api/v3/openapi.json"
+ specId: "petstorecomposed"
+
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: generated_${{ env.JOB_NAME }}
+ # todo replace with job output
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: generate_logs_${{ env.JOB_NAME }}
+ #path: ${{ env.JOB_NAME }}.build.log
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: jsbuild
+ id: jsbuild
+ uses: ./.github/actions/jsbuild
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ steps.jsbuild.outputs.logs }}
+ path: ${{ steps.jsbuild.outputs.logs }}
+ env:
+ JOB_NAME: js-petstore-v3${{ matrix['specId'] }}
diff --git a/.github/workflows/test-framework-python.yml b/.github/workflows/test-framework-python.yml
new file mode 100644
index 000000000000..911c446090cf
--- /dev/null
+++ b/.github/workflows/test-framework-python.yml
@@ -0,0 +1,158 @@
+name: Test Framework Python
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ spec-url: ${SPEC_URL}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ python-version: [3.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ - name: Setup python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: build
+ id: build
+ uses: ./.github/actions/pythonbuild
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
diff --git a/.github/workflows/test-framework-single.yml b/.github/workflows/test-framework-single.yml
new file mode 100644
index 000000000000..9848cb9fece7
--- /dev/null
+++ b/.github/workflows/test-framework-single.yml
@@ -0,0 +1,165 @@
+name: Test Framework Single
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+ inputs:
+ language:
+ description: 'Language'
+ required: true
+ specUrl:
+ description: 'URL of OpenAPI doc'
+ required: true
+ default: "https://petstore3.swagger.io/api/v3/openapi.json"
+ options:
+ description: 'language options'
+ default: ''
+ jobName:
+ description: 'job name'
+ required: true
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ generate:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+
+ outputs:
+ generate_outcome: ${{ steps.outcome.outputs.generate_outcome }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ options: $OPTIONS
+ - id: outcome
+ run: |
+ echo "::set-output name=generate_outcome::${{ steps.generate.outcome }}"
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_outcome
+ path: generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: ${{ steps.generate.outputs.path }}
+
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
+
+ build:
+
+ needs: generate
+ if: contains(needs.generate.outputs.generate_outcome, 'success')
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generated
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}generate_logs
+ #path: ${{ env.JOB_NAME }}.build.log
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ###############################################
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ ###############################################
+ ##### DYNAMIC: Dependent on build environment
+ ##### TODO: pass also build buildCommands coming from workflow input steps
+ ###############################################
+ - name: build
+ id: build
+ uses: ./.github/actions/jsbuild
+ continue-on-error: true
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - id: outcome
+ run: |
+ echo "::set-output name=build_outcome::${{ steps.build.outcome }}"
+ echo ${{ steps.build.outcome }} > ${{ env.JOB_NAME }}build_outcome
+ - name: upload build outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}build_outcome
+ path: ${{ env.JOB_NAME }}build_outcome
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ env.JOB_NAME }}logs
+ path: ${{ steps.build.outputs.logs }}
+ env:
+ LANGUAGE: ${{ github.event.inputs.language }}
+ JOB_NAME: ${{ github.event.inputs.jobName }}
+ OPTIONS: ${{ github.event.inputs.options }}
+ SPEC_URL: ${{ github.event.inputs.specUrl }}
diff --git a/.github/workflows/test-framework.yml b/.github/workflows/test-framework.yml
new file mode 100644
index 000000000000..0fc039cdaa3b
--- /dev/null
+++ b/.github/workflows/test-framework.yml
@@ -0,0 +1,125 @@
+name: Test Framework
+
+on:
+ # execute on demand
+ workflow_dispatch:
+ branches: ["master", "test-framework", "3.0.0"]
+
+jobs:
+
+ # builds codegen cli and uploads its artifact
+ build-codegen:
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: build codegen
+ run: |
+ mvn -q -B package -DskipTests
+ - name: prepare codegen cli
+ run: mkdir codegen-cli && cp modules/swagger-codegen-cli/target/swagger-codegen-cli.jar codegen-cli
+ - name: upload codegen cli
+ uses: actions/upload-artifact@v2
+ with:
+ name: codegen-cli
+ path: codegen-cli
+
+ # generate a javascript client V3 from petstore3.swagger.io OpenAPI definition
+ generate-js-v3-petstore:
+
+ needs: build-codegen
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ java: [ 8 ]
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-java@v1
+ with:
+ java-version: ${{ matrix.java }}
+ - name: Download codegen cli
+ uses: actions/download-artifact@v2
+ with:
+ name: codegen-cli
+ - name: generate
+ id: generate
+ continue-on-error: true
+ uses: ./.github/actions/generate
+ with:
+ language: $LANGUAGE
+ job-name: ${JOB_NAME}
+ options: $OPTIONS
+ - name: upload generate logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: generate_logs_${{ env.JOB_NAME }}
+ path: ${{ steps.generate.outputs.logs }}
+ - name: upload generated code
+ if: contains(steps.generate.outcome, 'success')
+ uses: actions/upload-artifact@v2
+ with:
+ name: generated_${{ env.JOB_NAME }}
+ path: ${{ steps.generate.outputs.path }}
+ - run: |
+ echo ${{ steps.generate.outcome }} > generate_outcome_${{ env.JOB_NAME }}
+ - name: upload generate outcome
+ uses: actions/upload-artifact@v2
+ with:
+ name: generate_outcome_${{ env.JOB_NAME }}
+ path: generate_outcome_${{ env.JOB_NAME }}
+ env:
+ LANGUAGE: "javascript"
+ JOB_NAME: "js-petstore-v3"
+ OPTIONS: " -DappName=PetstoreClient --additional-properties useES6=false"
+
+ build-js-v3-petstore:
+
+ needs: generate-js-v3-petstore
+
+ runs-on: ubuntu-latest
+
+ strategy:
+ matrix:
+ node-version: [12.x]
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Download artifacts
+ uses: actions/download-artifact@v2
+ with:
+ name: generated_${{ env.JOB_NAME }}
+ # todo replace with job output
+ path: generated/${{ env.JOB_NAME }}
+ - name: Download logs
+ uses: actions/download-artifact@v2
+ with:
+ name: generate_logs_${{ env.JOB_NAME }}
+ #path: ${{ env.JOB_NAME }}.build.log
+ - name: Use Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: jsbuild
+ id: jsbuild
+ uses: ./.github/actions/jsbuild
+ with:
+ path: generated/${{ env.JOB_NAME }}
+ job-name: ${{ env.JOB_NAME }}
+ - name: upload logs
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ steps.jsbuild.outputs.logs }}
+ path: ${{ steps.jsbuild.outputs.logs }}
+ env:
+ JOB_NAME: "js-petstore-v3"
diff --git a/.whitesource b/.whitesource
new file mode 100644
index 000000000000..db4b0fec82ca
--- /dev/null
+++ b/.whitesource
@@ -0,0 +1,15 @@
+{
+ "scanSettings": {
+ "configMode": "AUTO",
+ "configExternalURL": "",
+ "projectToken": "",
+ "baseBranches": []
+ },
+ "checkRunSettings": {
+ "vulnerableCheckRunConclusionLevel": "failure",
+ "displayMode": "diff"
+ },
+ "issueSettings": {
+ "minSeverityLevel": "LOW"
+ }
+}
\ No newline at end of file
diff --git a/README.md b/README.md
index 7a429b3d7b27..9c4d9f105cda 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,11 @@
[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/badge/icon?subject=jenkins%20build%20-%20java%207)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master-java7/)
-- Master (2.4.16-SNAPSHOT): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
+- Master (2.4.19-SNAPSHOT): [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/master.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
[![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-master)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=master&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
-- 3.0.22-SNAPSHOT: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
+- 3.0.25-SNAPSHOT: [![Build Status](https://img.shields.io/travis/swagger-api/swagger-codegen/3.0.0.svg?label=Petstore%20Integration%20Test)](https://travis-ci.org/swagger-api/swagger-codegen)
[![Java Test](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-3)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-3)
[![Windows Test](https://ci.appveyor.com/api/projects/status/github/swagger-api/swagger-codegen?branch=3.0.0&svg=true&passingText=Windows%20Test%20-%20OK&failingText=Windows%20Test%20-%20Fails)](https://ci.appveyor.com/project/swaggerhub-bot/swagger-codegen)
@@ -52,13 +52,13 @@ dependency example:
io.swagger
swagger-codegen-maven-plugin
- 2.4.15
+ 2.4.18
```
### Swagger Codegen 3.X ([`3.0.0` branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))
-Swagger Codegen 2.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
+Swagger Codegen 3.X supports OpenAPI version 3 (and version 2 via spec conversion to version 3)
[Online generator of version 3.X](https://github.com/swagger-api/swagger-codegen/tree/3.0.0#online-generators) supports both generation from Swagger/OpenAPI version 2 (by using engine + generators of 2.X) and version 3 specifications.
group id: `io.swagger.codegen.v3`
@@ -70,7 +70,7 @@ dependency example:
io.swagger.codegen.v3
swagger-codegen-maven-plugin
- 3.0.21
+ 3.0.24
```
@@ -134,8 +134,11 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
-------------------------- | ------------ | -------------------------- | -----
-3.0.22-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.22-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
-[3.0.21](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.21) (**current stable**) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-codegen/tree/v3.0.21)
+3.0.25-SNAPSHOT (current 3.0.0, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/codegen/v3/swagger-codegen-cli/3.0.25-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
+[3.0.24](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.24) (**current stable**) | 2020-12-29 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.23](https://github.com/swagger-api/swagger-codegen/tree/v3.0.24)
+[3.0.23](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.23) | 2020-11-02 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.23](https://github.com/swagger-api/swagger-codegen/tree/v3.0.23)
+[3.0.22](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.22) | 2020-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.22](https://github.com/swagger-api/swagger-codegen/tree/v3.0.22)
+[3.0.21](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.21) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.21](https://github.com/swagger-api/swagger-codegen/tree/v3.0.21)
[3.0.20](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.20) | 2020-05-18 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.20](https://github.com/swagger-api/swagger-codegen/tree/v3.0.20)
[3.0.19](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.19) | 2020-04-02 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.19](https://github.com/swagger-api/swagger-codegen/tree/v3.0.19)
[3.0.18](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.18) | 2020-02-26 | 1.0, 1.1, 1.2, 2.0, 3.0 | [tag v3.0.18](https://github.com/swagger-api/swagger-codegen/tree/v3.0.18)
@@ -156,8 +159,11 @@ Swagger Codegen Version | Release Date | OpenAPI Spec compatibility | Notes
[3.0.2](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.2)| 2018-10-19 | 1.0, 1.1, 1.2, 2.0, 3.0 | Minor release
[3.0.1](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.1)| 2018-10-05 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
[3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)| 2018-09-06 | 1.0, 1.1, 1.2, 2.0, 3.0 | Major release with breaking changes
-2.4.16-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.16-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
-[2.4.15](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.15) (**current stable**) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.15](https://github.com/swagger-api/swagger-codegen/tree/v2.4.15)
+2.4.19-SNAPSHOT (current master, upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/io/swagger/swagger-codegen-cli/2.4.18-SNAPSHOT/)| TBD | 1.0, 1.1, 1.2, 2.0 | Minor release
+[2.4.18](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.18) (**current stable**) | 2020-12-29 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.18](https://github.com/swagger-api/swagger-codegen/tree/v2.4.18)
+[2.4.17](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.17) | 2020-11-02 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.17](https://github.com/swagger-api/swagger-codegen/tree/v2.4.17)
+[2.4.16](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.16) | 2020-10-05 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.16](https://github.com/swagger-api/swagger-codegen/tree/v2.4.16)
+[2.4.15](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.15) | 2020-07-28 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.15](https://github.com/swagger-api/swagger-codegen/tree/v2.4.15)
[2.4.14](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.14) | 2020-05-18 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.14](https://github.com/swagger-api/swagger-codegen/tree/v2.4.14)
[2.4.13](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.13) | 2020-04-02 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.13](https://github.com/swagger-api/swagger-codegen/tree/v2.4.13)
[2.4.12](https://github.com/swagger-api/swagger-codegen/releases/tag/v2.4.12) | 2020-01-15 | 1.0, 1.1, 1.2, 2.0 | [tag v2.4.12](https://github.com/swagger-api/swagger-codegen/tree/v2.4.12)
@@ -186,17 +192,17 @@ If you're looking for the latest stable version, you can grab it directly from M
```sh
# Download current stable 2.x.x branch (Swagger and OpenAPI version 2)
-wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar -O swagger-codegen-cli.jar
+wget https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.18/swagger-codegen-cli-2.4.18.jar -O swagger-codegen-cli.jar
java -jar swagger-codegen-cli.jar help
# Download current stable 3.x.x branch (OpenAPI version 3)
-wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.21/swagger-codegen-cli-3.0.21.jar -O swagger-codegen-cli.jar
+wget https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.24/swagger-codegen-cli-3.0.24.jar -O swagger-codegen-cli.jar
java -jar swagger-codegen-cli.jar --help
```
-For Windows users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. `Invoke-WebRequest -OutFile swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar`
+For Windows users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g. `Invoke-WebRequest -OutFile swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.18/swagger-codegen-cli-2.4.18.jar`
On a mac, it's even easier with `brew`:
```sh
@@ -344,7 +350,7 @@ java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate \
```
(if you're on Windows, replace the last command with `java -jar modules\swagger-codegen-cli\target\swagger-codegen-cli.jar generate -i https://petstore.swagger.io/v2/swagger.json -l php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.15/swagger-codegen-cli-2.4.15.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.18/swagger-codegen-cli-2.4.18.jar)
To get a list of **general** options available, please run `java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar help generate` (for version 3.x check [3.0.0 branch](https://github.com/swagger-api/swagger-codegen/tree/3.0.0))
@@ -640,10 +646,10 @@ Your config file for Java can look like
```json
{
- "groupId":"com.my.company",
- "artifactId":"MyClient",
- "artifactVersion":"1.2.0",
- "library":"feign"
+ "groupId": "com.my.company",
+ "artifactId": "MyClient",
+ "artifactVersion": "1.2.0",
+ "library": "feign"
}
```
@@ -779,10 +785,10 @@ curl -X POST -H "content-type:application/json" -d '{"swaggerUrl":"https://petst
```
Then you will receive a JSON response with the URL to download the zipped code.
-To customize the SDK, you can `POST` to `https://generator.swagger.io/gen/clients/{language}` with the following HTTP body:
+To customize the SDK, you can `POST` to `https://generator.swagger.io/api/gen/clients/{language}` with the following HTTP body:
```json
{
- "options": {},
+ "options": {},
"swaggerUrl": "https://petstore.swagger.io/v2/swagger.json"
}
```
@@ -791,23 +797,23 @@ in which the `options` for a language can be obtained by submitting a `GET` requ
For example, `curl https://generator.swagger.io/api/gen/clients/python` returns
```json
{
- "packageName":{
- "opt":"packageName",
- "description":"python package name (convention: snake_case).",
- "type":"string",
- "default":"swagger_client"
+ "packageName": {
+ "opt": "packageName",
+ "description": "python package name (convention: snake_case).",
+ "type": "string",
+ "default": "swagger_client"
},
- "packageVersion":{
- "opt":"packageVersion",
- "description":"python package version.",
- "type":"string",
- "default":"1.0.0"
+ "packageVersion": {
+ "opt": "packageVersion",
+ "description": "python package version.",
+ "type": "string",
+ "default": "1.0.0"
},
- "sortParamsByRequiredFlag":{
- "opt":"sortParamsByRequiredFlag",
- "description":"Sort method arguments to place required parameters before optional parameters.",
- "type":"boolean",
- "default":"true"
+ "sortParamsByRequiredFlag": {
+ "opt": "sortParamsByRequiredFlag",
+ "description": "Sort method arguments to place required parameters before optional parameters.",
+ "type": "boolean",
+ "default": "true"
}
}
```
diff --git a/modules/swagger-codegen-cli/pom.xml b/modules/swagger-codegen-cli/pom.xml
index 3bf445909bda..2d40fadbb892 100644
--- a/modules/swagger-codegen-cli/pom.xml
+++ b/modules/swagger-codegen-cli/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.4.16-SNAPSHOT
+ 2.4.19-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen-maven-plugin/examples/java-client.xml b/modules/swagger-codegen-maven-plugin/examples/java-client.xml
index 43518b0e009b..16520f1dd03e 100644
--- a/modules/swagger-codegen-maven-plugin/examples/java-client.xml
+++ b/modules/swagger-codegen-maven-plugin/examples/java-client.xml
@@ -123,6 +123,6 @@
2.10.1
2.7
1.0.0
- 4.8.1
+ 4.13.1
diff --git a/modules/swagger-codegen-maven-plugin/pom.xml b/modules/swagger-codegen-maven-plugin/pom.xml
index c3803a573060..54e0bb2346b7 100644
--- a/modules/swagger-codegen-maven-plugin/pom.xml
+++ b/modules/swagger-codegen-maven-plugin/pom.xml
@@ -4,7 +4,7 @@
io.swagger
swagger-codegen-project
- 2.4.16-SNAPSHOT
+ 2.4.19-SNAPSHOT
../..
swagger-codegen-maven-plugin
diff --git a/modules/swagger-codegen/pom.xml b/modules/swagger-codegen/pom.xml
index b4c3f33faef0..0a5d49a18789 100644
--- a/modules/swagger-codegen/pom.xml
+++ b/modules/swagger-codegen/pom.xml
@@ -3,7 +3,7 @@
io.swagger
swagger-codegen-project
- 2.4.16-SNAPSHOT
+ 2.4.19-SNAPSHOT
../..
4.0.0
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
index d23c6d9b7472..41a9390f1a28 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/CodegenModel.java
@@ -56,6 +56,14 @@ public class CodegenModel {
allMandatory = mandatory;
}
+ public boolean getIsInteger() {
+ return "Integer".equalsIgnoreCase(this.dataType);
+ }
+
+ public boolean getIsNumber() {
+ return "BigDecimal".equalsIgnoreCase(this.dataType);
+ }
+
@Override
public String toString() {
return String.format("%s(%s)", name, classname);
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
index 01f903967db9..74665c0f09de 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultCodegen.java
@@ -11,6 +11,7 @@
import java.util.regex.Pattern;
import io.swagger.models.properties.UntypedProperty;
+import io.swagger.util.Yaml;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
@@ -293,8 +294,8 @@ public Map postProcessModelsEnum(Map objs) {
}
/**
- * Returns the common prefix of variables for enum naming if
- * two or more variables are present
+ * Returns the common prefix of variables for enum naming if
+ * two or more variables are present.
*
* @param vars List of variable names
* @return the common prefix for naming
@@ -347,7 +348,7 @@ public String toEnumDefaultValue(String value, String datatype) {
* @return the sanitized value for enum
*/
public String toEnumValue(String value, String datatype) {
- if ("number".equalsIgnoreCase(datatype)) {
+ if (isPrimivite(datatype)) {
return value;
} else {
return "\"" + escapeText(value) + "\"";
@@ -374,6 +375,12 @@ public String toEnumVarName(String value, String datatype) {
}
}
+ public boolean isPrimivite(String datatype) {
+ return "number".equalsIgnoreCase(datatype)
+ || "integer".equalsIgnoreCase(datatype)
+ || "boolean".equalsIgnoreCase(datatype);
+ }
+
// override with any special post-processing
@SuppressWarnings("static-method")
public Map postProcessOperations(Map objs) {
@@ -1500,6 +1507,10 @@ public CodegenModel fromModel(String name, Model model, Map allDe
properties.putAll(model.getProperties());
}
+ if (composed.getRequired() != null) {
+ required.addAll(composed.getRequired());
+ }
+
// child model (properties owned by the model itself)
Model child = composed.getChild();
if (child != null && child instanceof RefModel && allDefinitions != null) {
@@ -1525,6 +1536,9 @@ public CodegenModel fromModel(String name, Model model, Map allDe
// comment out below as allowableValues is not set in post processing model enum
m.allowableValues = new HashMap();
m.allowableValues.put("values", impl.getEnum());
+ if (m.dataType.equals("BigDecimal")) {
+ addImport(m, "BigDecimal");
+ }
}
if (impl.getAdditionalProperties() != null) {
addAdditionPropertiesToCodeGenModel(m, impl);
@@ -2762,6 +2776,7 @@ public CodegenParameter fromParameter(Parameter param, Set imports) {
p.isPrimitiveType = cp.isPrimitiveType;
p.isContainer = true;
p.isListContainer = true;
+ p.uniqueItems = impl.getUniqueItems() == null ? false : impl.getUniqueItems();
// set boolean flag (e.g. isString)
setParameterBooleanFlagWithCodegenProperty(p, cp);
diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
index ccb51ddc2073..d26987aa4198 100644
--- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
+++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/DefaultGenerator.java
@@ -261,6 +261,9 @@ protected void configureSwaggerInfo() {
if (info.getTermsOfService() != null) {
config.additionalProperties().put("termsOfService", config.escapeText(info.getTermsOfService()));
}
+ if (info.getVendorExtensions() != null && !info.getVendorExtensions().isEmpty()) {
+ config.additionalProperties().put("info-extensions", info.getVendorExtensions());
+ }
}
protected void generateModelTests(List files, Map models, String modelName) throws IOException {
@@ -765,10 +768,6 @@ public List generate() {
configureGeneratorProperties();
configureSwaggerInfo();
- // resolve inline models
- InlineModelResolver inlineModelResolver = new InlineModelResolver();
- inlineModelResolver.flatten(swagger);
-
List files = new ArrayList();
// models
List