Skip to content

Commit

Permalink
Merge branch 'master' into patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeeD authored Dec 6, 2024
2 parents 95354e2 + ffce5a1 commit 72767b6
Show file tree
Hide file tree
Showing 161 changed files with 7,407 additions and 1,313 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
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"]
91 changes: 91 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
schedule:
- cron: '16 04 * * 2'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: java-kotlin
build-mode: none # This mode only analyzes Java. Set this to 'autobuild' or 'manual' to analyze Kotlin too.
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
16 changes: 16 additions & 0 deletions .github/workflows/dependency-review.yml
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
3 changes: 1 addition & 2 deletions .github/workflows/maven-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 11, 17 ]

env:
GENERATORS_VERSION_PROPERTY: ""
Expand Down Expand Up @@ -48,7 +48,6 @@ jobs:
"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}
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/maven-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 8, 11, 17 ]
java: [ 11, 17 ]

env:
GENERATORS_VERSION_PROPERTY: ""
Expand Down Expand Up @@ -51,7 +51,6 @@ jobs:
"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}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# Log file
*.log

# Temporary files
*.tmp
tmp/

# BlueJ files
*.ctxt

Expand Down
15 changes: 6 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# <img src="https://raw.githubusercontent.com/swagger-api/swagger.io/wordpress/images/assets/SWC-logo-clr.png" height="80">

- Master: [![Build Status](https://img.shields.io/jenkins/build.svg?jobUrl=https://jenkins.swagger.io/job/oss-swagger-codegen-generators-master-java-8)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-generators-master-java-8)

[![Build Status](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-generators-master-java-8/badge/icon?subject=jenkins%20build%20-%20master)](https://jenkins.swagger.io/view/OSS%20-%20Java/job/oss-swagger-codegen-generators-master-java-8/)

## Overview
**Swagger Codegen Generators** project is a set of classes and templates ([Handlebars](https://jknack.github.io/handlebars.java)) used by [Swagger Codegen 3.0.0 project](https://github.com/swagger-api/swagger-codegen/tree/3.0.0) in its code generation process for a specific language or language framework. The main differents with **Swagger Codegen 2.x.x** are:

- **Handlebars as template engine:** with Handelbars feature is possible to create more logic-less templates.
- **Handlebars as template engine:** with Handlebars feature is possible to create more logic-less templates.
- **OAS 3 support:** generator classes work with OpenAPI Specification V3.

More details about these and more differences are referenced at [https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0](https://github.com/swagger-api/swagger-codegen/releases/tag/v3.0.0)
Expand All @@ -18,16 +15,16 @@ You need the following installed and available in your $PATH:
* Java 8 (http://java.oracle.com)
* Apache maven 3.0.4 or greater (http://maven.apache.org/)

## How to contribute.
Right now the templates and generators classes are migrated from [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) **3.0.0** branch.
## How to Contribute.
Right now the templates and generators classes are migrated from [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) **3.0.0** branch.
If you want to migrate an existing language/framework, you can follow this [guide](https://github.com/swagger-api/swagger-codegen/wiki/Swagger-Codegen-migration-(swagger-codegen-generators-repository)).
Also you need to keep in mind that **Handlebars** is used as template engines and besides it's pretty similar to **Mustache** there are different that can not be ignored. So you can follow this [guide](https://github.com/swagger-api/swagger-codegen/wiki/Swagger-Codegen-migration-from-Mustache-and-Handlebars-templates.) which explains steps to migrate templates from **Mustaches** to **Handelbars**.
Also you need to keep in mind that **Handlebars** is used as the template engine. It's pretty similar to **Mustache**, but there are differences that can not be ignored. So you can follow this [guide](https://github.com/swagger-api/swagger-codegen/wiki/Swagger-Codegen-migration-from-Mustache-and-Handlebars-templates.) which explains steps to migrate templates from **Mustaches** to **Handlebars**.

## Security contact
## Security Contact

Please disclose any security-related issues or vulnerabilities by emailing [[email protected]](mailto:[email protected]), instead of using the public issue tracker.

## License information on Generated Code
## License Information on Generated Code

The Swagger Codegen project is intended as a benefit for users of the Swagger / Open API Specification. The project itself has the [License](#license) as specified. In addition, please understand the following points:

Expand Down
30 changes: 15 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<groupId>io.swagger.codegen.v3</groupId>
<artifactId>swagger-codegen-generators</artifactId>
<version>1.0.43</version>
<version>1.0.55-SNAPSHOT</version>
<packaging>jar</packaging>

<build>
Expand Down Expand Up @@ -68,7 +68,7 @@
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit4</artifactId>
<version>3.0.0</version>
<version>${surefire-version}</version>
</dependency>
</dependencies>
<configuration>
Expand Down Expand Up @@ -251,33 +251,33 @@
<dependency>
<groupId>com.atlassian.commonmark</groupId>
<artifactId>commonmark</artifactId>
<version>0.9.0</version>
<version>0.17.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.8.47</version>
<version>5.14.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<maven.compiler.release>8</maven.compiler.release>
<swagger-codegen-version>3.0.47</swagger-codegen-version>
<swagger-parser-version>2.1.16</swagger-parser-version>
<swagger-core-version>2.2.16</swagger-core-version>
<jackson-version>2.15.2</jackson-version>
<jackson-databind-version>2.15.1</jackson-databind-version>
<swagger-codegen-version>3.0.64</swagger-codegen-version>
<swagger-parser-version>2.1.22</swagger-parser-version>
<swagger-core-version>2.2.25</swagger-core-version>
<jackson-version>2.17.2</jackson-version>
<jackson-databind-version>2.17.2</jackson-databind-version>
<scala-version>2.11.1</scala-version>
<felix-version>3.3.0</felix-version>
<commons-io-version>2.11.0</commons-io-version>
<commons-cli-version>1.5.0</commons-cli-version>
<commons-io-version>2.17.0</commons-io-version>
<commons-cli-version>1.9.0</commons-cli-version>
<junit-version>4.13.2</junit-version>
<maven-plugin-version>1.0.0</maven-plugin-version>
<commons-lang-version>3.12.0</commons-lang-version>
<slf4j-version>1.7.36</slf4j-version>
<commons-lang-version>3.17.0</commons-lang-version>
<slf4j-version>2.0.9</slf4j-version>
<scala-maven-plugin-version>3.2.1</scala-maven-plugin-version>
<testng-version>7.7.1</testng-version>
<surefire-version>3.0.0</surefire-version>
<testng-version>7.10.2</testng-version>
<surefire-version>3.5.1</surefire-version>
<jmockit-version>1.49</jmockit-version>
<reflections-version>0.10.2</reflections-version>

Expand Down
Loading

0 comments on commit 72767b6

Please sign in to comment.