forked from swagger-api/swagger-codegen-generators
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1,540 changed files
with
37,471 additions
and
53,034 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "maven" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
ignore: | ||
- dependency-name: "*" | ||
update-types: ["version-update:semver-major"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: Dependency Review | ||
uses: actions/dependency-review-action@v3 | ||
with: | ||
fail-on-severity: high |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
name: Build Test PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build_pr: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ 8, 11, 17 ] | ||
|
||
env: | ||
GENERATORS_VERSION_PROPERTY: "" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: git checkout | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
cache: maven | ||
- name: preliminary checks | ||
run: | | ||
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }} | ||
set -e | ||
# fail if templates/generators contain carriage return '\r' | ||
/bin/bash ./bin/utils/detect_carriage_return.sh | ||
# fail if generators contain merge conflicts | ||
/bin/bash ./bin/utils/detect_merge_conflict.sh | ||
# fail if generators contain tab '\t' | ||
/bin/bash ./bin/utils/detect_tab_in_java_class.sh | ||
- uses: s4u/maven-settings-action@v2.8.0 | ||
name: setup maven settings.xml | ||
with: | ||
servers: | | ||
[{ | ||
"id": "sonatype-nexus-staging", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}, | ||
{ | ||
"id": "sonatype-nexus-snapshots", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}] | ||
- name: Build with Maven | ||
if: ${{ matrix.java != 8 }} | ||
run: | | ||
export MY_POM_VERSION=`mvn -Dswagger-codegen-version=3.0.38 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec` | ||
echo "POM VERSION" ${MY_POM_VERSION} | ||
export CODEGEN_VERSION=`sed -n 's/<swagger\-codegen\-version>\([^\s]*\)<\/swagger\-codegen\-version>/\1/p' pom.xml` | ||
export CODEGEN_VERSION=`echo ${CODEGEN_VERSION} | tr -d '[:space:]'` | ||
echo "CODEGEN_VERSION" ${CODEGEN_VERSION} | ||
export CODEGEN_VERSION_PROPERTY="" | ||
if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]]; | ||
then | ||
if [[ ! $CODEGEN_VERSION =~ ^.*SNAPSHOT$ ]]; | ||
then | ||
# check release version exists | ||
export CODEGEN_FOUND_JSON=`curl -s --max-time 60 --retry 15 --connect-timeout 20 https://search.maven.org/solrsearch/select?q=g:io.swagger.codegen.v3%20AND%20a:swagger-codegen%20AND%20v:${CODEGEN_VERSION}%20AND%20p:jar` | ||
export CODEGEN_FOUND=`echo ${CODEGEN_FOUND_JSON} | jq '.response.numFound'` | ||
echo "CODEGEN_FOUND" ${CODEGEN_FOUND} | ||
if [[ $CODEGEN_FOUND == '0' ]]; | ||
then | ||
echo "codegen version not found" | ||
rm -f maven-metadata.json | ||
curl -o maven-metadata.json -s --max-time 60 --retry 15 --connect-timeout 30 -H "accept: application/json" https://oss.sonatype.org/service/local/repositories/snapshots/content/io/swagger/codegen/v3/swagger-codegen/ | ||
LAST_SNAP=`jq '[.data | sort_by(.lastModified) | reverse | .[] | select( .text | contains("3."))]| .[0].text' maven-metadata.json` | ||
export LAST_SNAP=${LAST_SNAP:1:${#LAST_SNAP}-2} | ||
echo "LAST_SNAP $LAST_SNAP" | ||
export CODEGEN_VERSION_PROPERTY=-Dswagger-codegen-version=$LAST_SNAP | ||
fi | ||
fi | ||
fi | ||
echo "CODEGEN_VERSION_PROPERTY ${CODEGEN_VERSION_PROPERTY}" | ||
echo "CODEGEN_VERSION_PROPERTY=${CODEGEN_VERSION_PROPERTY}" >> $GITHUB_ENV | ||
./mvnw clean verify -U ${CODEGEN_VERSION_PROPERTY} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Build Test Push | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build_push: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
java: [ 8, 11, 17 ] | ||
|
||
env: | ||
GENERATORS_VERSION_PROPERTY: "" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
name: git checkout | ||
with: | ||
ref: master | ||
- name: Set up Java | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: ${{ matrix.java }} | ||
distribution: temurin | ||
cache: maven | ||
- name: preliminary checks | ||
run: | | ||
docker login --username=${{ secrets.DOCKERHUB_SB_USERNAME }} --password=${{ secrets.DOCKERHUB_SB_PASSWORD }} | ||
set -e | ||
# fail if templates/generators contain carriage return '\r' | ||
/bin/bash ./bin/utils/detect_carriage_return.sh | ||
# fail if generators contain merge conflicts | ||
/bin/bash ./bin/utils/detect_merge_conflict.sh | ||
# fail if generators contain tab '\t' | ||
/bin/bash ./bin/utils/detect_tab_in_java_class.sh | ||
- uses: s4u/maven-settings-action@v2.8.0 | ||
name: setup maven settings.xml | ||
with: | ||
servers: | | ||
[{ | ||
"id": "sonatype-nexus-staging", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}, | ||
{ | ||
"id": "sonatype-nexus-snapshots", | ||
"username": "${{ secrets.OSSRH_USERNAME }}", | ||
"password": "${{ secrets.OSSRH_TOKEN }}" | ||
}] | ||
- name: Build with Maven | ||
if: ${{ matrix.java != 8 }} | ||
run: | | ||
export MY_POM_VERSION=`mvn -Dswagger-codegen-version=3.0.38 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec` | ||
echo "POM VERSION" ${MY_POM_VERSION} | ||
export CODEGEN_VERSION=`sed -n 's/<swagger\-codegen\-version>\([^\s]*\)<\/swagger\-codegen\-version>/\1/p' pom.xml` | ||
export CODEGEN_VERSION=`echo ${CODEGEN_VERSION} | tr -d '[:space:]'` | ||
echo "CODEGEN_VERSION" ${CODEGEN_VERSION} | ||
export CODEGEN_VERSION_PROPERTY="" | ||
if [[ ! $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]]; | ||
then | ||
if [[ ! $CODEGEN_VERSION =~ ^.*SNAPSHOT$ ]]; | ||
then | ||
# check release version exists | ||
export CODEGEN_FOUND_JSON=`curl -s --max-time 60 --retry 15 --connect-timeout 20 https://search.maven.org/solrsearch/select?q=g:io.swagger.codegen.v3%20AND%20a:swagger-codegen%20AND%20v:${CODEGEN_VERSION}%20AND%20p:jar` | ||
export CODEGEN_FOUND=`echo ${CODEGEN_FOUND_JSON} | jq '.response.numFound'` | ||
echo "CODEGEN_FOUND" ${CODEGEN_FOUND} | ||
if [[ $CODEGEN_FOUND == '0' ]]; | ||
then | ||
echo "codegen version not found" | ||
rm -f maven-metadata.json | ||
curl -o maven-metadata.json -s --max-time 60 --retry 15 --connect-timeout 30 -H "accept: application/json" https://oss.sonatype.org/service/local/repositories/snapshots/content/io/swagger/codegen/v3/swagger-codegen/ | ||
LAST_SNAP=`jq '[.data | sort_by(.lastModified) | reverse | .[] | select( .text | contains("3."))]| .[0].text' maven-metadata.json` | ||
export LAST_SNAP=${LAST_SNAP:1:${#LAST_SNAP}-2} | ||
echo "LAST_SNAP $LAST_SNAP" | ||
export CODEGEN_VERSION_PROPERTY=-Dswagger-codegen-version=$LAST_SNAP | ||
fi | ||
fi | ||
fi | ||
echo "CODEGEN_VERSION_PROPERTY ${CODEGEN_VERSION_PROPERTY}" | ||
echo "CODEGEN_VERSION_PROPERTY=${CODEGEN_VERSION_PROPERTY}" >> $GITHUB_ENV | ||
./mvnw clean verify -U ${CODEGEN_VERSION_PROPERTY} | ||
- name: Deploy Maven Snapshot | ||
if: ${{ matrix.java == 17 }} | ||
run: | | ||
export MY_POM_VERSION=`mvn -Dswagger-codegen-version=3.0.38 -q -Dexec.executable="echo" -Dexec.args='${projects.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec` | ||
echo "POM VERSION" ${MY_POM_VERSION} | ||
if [[ $MY_POM_VERSION =~ ^.*SNAPSHOT$ ]]; | ||
then | ||
./mvnw clean deploy -U --settings $HOME/.m2/settings.xml | ||
else | ||
echo "not deploying release: " ${MY_POM_VERSION} | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,18 @@ | ||
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# https://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.4/apache-maven-3.8.4-bin.zip | ||
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"settingsInheritedFrom": "swagger-api/whitesource-config@main" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.