Skip to content

Commit 364b252

Browse files
committed
Merge remote-tracking branch 'upstream/master' into remove-barrel-imports
2 parents f54219e + 67cbfb3 commit 364b252

9,481 files changed

Lines changed: 36404 additions & 25663 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ghcr.io/snebjorn/devcontainer-feature/chromium:latest": {},
1414
"ghcr.io/devcontainers/features/docker-in-docker:2": {
1515
"version": "latest",
16-
"moby": true
16+
"moby": false
1717
}
1818
},
1919
// Configure tool-specific properties.
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Mill plugin tests
2+
3+
on:
4+
push:
5+
paths:
6+
- modules/openapi-generator-mill-plugin/**
7+
pull_request:
8+
paths:
9+
- modules/openapi-generator-mill-plugin/**
10+
11+
jobs:
12+
test:
13+
name: Mill plugin tests
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v5
17+
- name: Set up JDK 11
18+
uses: actions/setup-java@v5
19+
with:
20+
java-version: 11
21+
distribution: 'temurin'
22+
- name: Restore cache (read-only)
23+
# only use restore keys, no save key because we need to clear the cache before running the examples
24+
uses: actions/cache/restore@v5
25+
with:
26+
path: |
27+
~/.m2/repository
28+
~/.gradle
29+
~/.cache/coursier
30+
!~/.gradle/caches/*/plugin-resolution/
31+
!~/.m2/repository/org/openapitools/
32+
!~/.cache/coursier/v1/https/repo1.maven.org/maven2/org/openapitools/
33+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
34+
35+
- name: Maven Clean Install
36+
env:
37+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
38+
run: |
39+
./mvnw clean install -DskipTests -Dmaven.javadoc.skip=true
40+
41+
# This is needed because of differences in how Maven and Coursier download artifacts
42+
# Maven will only download the pom when the transitive dependency is not needed in the current projects compile classpath
43+
# whereas Coursier expects the artifact (jar) to be present in a Maven repository. When Coursier encounters a
44+
# artifact folder with a pom it considers the artifact to be available and will then crash when the jar is missing.
45+
- name: Clear m2 cache except openapitools (because otherwise coursier will fail to resolve artifacts where only poms are downloaded)
46+
run: |
47+
mv ~/.m2/repository/org/openapitools /tmp/openapitools-backup || true
48+
rm -rf ~/.m2/repository/*
49+
mkdir -p ~/.m2/repository/org
50+
mv /tmp/openapitools-backup ~/.m2/repository/org/openapitools || true
51+
52+
- name: Mill Example - Test Validation Command
53+
env:
54+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
55+
run: |
56+
(cd modules/openapi-generator-mill-plugin/example/ && ./mill validateOpenapiSpec $(pwd)/api/petstore-invalid.yaml)
57+
58+
- name: Mill Example - Test Validation Task
59+
env:
60+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
61+
run: |
62+
(cd modules/openapi-generator-mill-plugin/example/ && ./mill openapi.validate)
63+
64+
- name: Mill Example - Test Compile Task
65+
env:
66+
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
67+
run: |
68+
(cd modules/openapi-generator-mill-plugin/example/ && ./mill __.compile)
69+

.github/workflows/samples-r.yaml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Samples R clients
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/R/**
7+
- samples/client/petstore/R-httr2/**
8+
- samples/client/petstore/R-httr2-wrapper/**
9+
pull_request:
10+
paths:
11+
- samples/client/petstore/R/**
12+
- samples/client/petstore/R-httr2/**
13+
- samples/client/petstore/R-httr2-wrapper/**
14+
jobs:
15+
build:
16+
name: Build R projects
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
sample:
22+
# clients
23+
- samples/client/petstore/R/
24+
- samples/client/petstore/R-httr2/
25+
- samples/client/petstore/R-httr2-wrapper/
26+
services:
27+
petstore-api:
28+
image: swaggerapi/petstore
29+
ports:
30+
- 80:8080
31+
env:
32+
SWAGGER_HOST: http://petstore.swagger.io
33+
SWAGGER_BASE_PATH: /v2
34+
steps:
35+
- uses: actions/checkout@v5
36+
- name: Add hosts to /etc/hosts
37+
run: |
38+
sudo echo "127.0.0.1 petstore.swagger.io" | sudo tee -a /etc/hosts
39+
- uses: r-lib/actions/setup-r@v2
40+
with:
41+
use-public-rspm: true
42+
43+
- name: Install devtools
44+
run: install.packages("devtools")
45+
shell: Rscript {0}
46+
working-directory: ${{ matrix.sample }}
47+
48+
- name: Build
49+
run: devtools::build()
50+
shell: Rscript {0}
51+
working-directory: ${{ matrix.sample }}
52+
53+
- uses: r-lib/actions/setup-r-dependencies@v2
54+
with:
55+
working-directory: ${{ matrix.sample }}
56+
extra-packages: any::rcmdcheck
57+
needs: check
58+
59+
- uses: r-lib/actions/check-r-package@v2
60+
with:
61+
working-directory: ${{ matrix.sample }}
62+
upload-snapshots: true
63+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
64+
error-on: '"error"'
65+
66+
- name: Install local package
67+
run: R CMD INSTALL .
68+
shell: bash # Ensure correct shell for command execution
69+
working-directory: ${{ matrix.sample }}

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<div align="center">
1717

18-
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.19.0`):
18+
[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`7.20.0`):
1919
[![Integration Test2](https://circleci.com/gh/OpenAPITools/openapi-generator.svg?style=shield)](https://circleci.com/gh/OpenAPITools/openapi-generator)
2020
[![Bitrise](https://img.shields.io/bitrise/4a2b10a819d12b67/master?label=bitrise%3A%20Swift+4,5&token=859FMDR8QHwabCzwvZK6vQ)](https://app.bitrise.io/app/4a2b10a819d12b67)
2121

@@ -148,8 +148,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
148148

149149
| OpenAPI Generator Version | Release Date | Notes |
150150
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
151-
| 7.19.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 22.01.2026 | Minor release with breaking changes (with fallback) |
152-
| [7.18.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.18.0) (latest stable release) | 22.12.2025 | Minor release with breaking changes (with fallback) |
151+
| 7.20.0 (upcoming minor release) [SNAPSHOT](https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-to-test-with-the-latest-master-of-openapi-generator) | 20.02.2026 | Minor release with breaking changes (with fallback) |
152+
| [7.19.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v7.19.0) (latest stable release) | 20.01.2026 | Minor release with breaking changes (with fallback) |
153153
| [6.6.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v6.6.0) | 11.05.2023 | Minor release with breaking changes (with fallback) |
154154
| [5.4.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.4.0) | 31.01.2022 | Minor release with breaking changes (with fallback) |
155155
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
@@ -212,16 +212,16 @@ See the different versions of the [openapi-generator-cli](https://search.maven.o
212212
<!-- RELEASE_VERSION -->
213213
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 11 runtime at a minimum):
214214

215-
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.0.jar`
215+
JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar`
216216

217217
For **Mac/Linux** users:
218218
```sh
219-
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.0.jar -O openapi-generator-cli.jar
219+
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar -O openapi-generator-cli.jar
220220
```
221221

222222
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.
223223
```
224-
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.0.jar
224+
Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar
225225
```
226226

227227
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -456,7 +456,7 @@ openapi-generator-cli version
456456
To use a specific version of "openapi-generator-cli"
457457

458458
```sh
459-
openapi-generator-cli version-manager set 7.18.0
459+
openapi-generator-cli version-manager set 7.19.0
460460
```
461461

462462
Or install it as dev-dependency:
@@ -480,7 +480,7 @@ pip install openapi-generator-cli
480480

481481
To install a specific version
482482
```
483-
pip install openapi-generator-cli==7.18.0
483+
pip install openapi-generator-cli==7.19.0
484484
```
485485

486486
You can also install with [jdk4py](https://github.com/activeviam/jdk4py) instead of java binary. (python>=3.10 is required)
@@ -506,7 +506,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
506506
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
507507

508508
<!-- RELEASE_VERSION -->
509-
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.18.0/openapi-generator-cli-7.18.0.jar)
509+
You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.19.0/openapi-generator-cli-7.19.0.jar)
510510
<!-- /RELEASE_VERSION -->
511511

512512
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`

bin/configs/html.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
generatorName: html
2+
outputDir: samples/documentation/html
3+
inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore.yaml
4+
templateDir: modules/openapi-generator/src/main/resources/htmlDocs
5+
additionalProperties:
6+
hideGenerationTimestamp: "true"

bin/configs/java-native-useGzipFeature.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ additionalProperties:
77
artifactId: petstore-native-useGzipFeature
88
hideGenerationTimestamp: "true"
99
useJakartaEe: "true"
10+
useGzipFeature: "true"

bin/configs/swift6-vapor.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ generateAliasAsModel: true
77
additionalProperties:
88
projectName: PetstoreClient
99
useSPMFileStructure: true
10-
useClasses: true
10+
useClasses: false
1111
useBacktickEscapes: true
1212
mapFileBinaryToData: true

bin/generate-samples.sh

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,26 +47,26 @@ For example:
4747

4848
echo "$header"
4949

50+
tmpfile=$(mktemp)
51+
trap "rm -f $tmpfile" EXIT
52+
5053
if [[ ${#files[@]} -eq 1 && "${files[0]}" != *'*'* ]]; then
51-
# shellcheck disable=SC2086
52-
# shellcheck disable=SC2068
53-
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]}
54+
# shellcheck disable=SC2086
55+
# shellcheck disable=SC2068
56+
java ${JAVA_OPTS} -jar "$executable" generate -c ${files[0]} ${args[@]} 2>&1 | tee "$tmpfile"
57+
retcode=${PIPESTATUS[0]}
5458
else
55-
echo "Please press CTRL+C to stop or the script will continue in 5 seconds."
56-
#sleep 5
57-
if [ ${#files[@]} -eq 0 ]; then
58-
files=("${root}"/bin/configs/*.yaml)
59-
fi
59+
if [ ${#files[@]} -eq 0 ]; then
60+
files=("${root}"/bin/configs/*.yaml)
61+
fi
6062

61-
# shellcheck disable=SC2086
62-
# shellcheck disable=SC2068
63-
if java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]} 2>&1 | tee /dev/pts/0 | grep -q -i "exception"; then
64-
echo "Found exception(s) when running the generator(s) to update the samples."
65-
export GENERATE_ERROR=1
66-
fi
63+
# shellcheck disable=SC2086
64+
# shellcheck disable=SC2068
65+
java ${JAVA_OPTS} -jar "$executable" batch ${BATCH_OPTS} --includes-base-dir "${root}" --fail-fast -- ${files[@]} 2>&1 | tee "$tmpfile"
66+
retcode=${PIPESTATUS[0]}
6767
fi
6868

69-
if [[ -n "$GENERATE_ERROR" ]]; then
69+
if [[ $retcode -ne 0 ]] || grep -q -i "at org.openapitools" "$tmpfile"; then
7070
echo "Found exception(s) when running the generator(s) to update the samples."
7171
exit 1
7272
fi

bin/utils/release/release_version_update.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ declare -a xml_files=(
9393
declare -a properties_files=(
9494
"${root}/modules/openapi-generator-gradle-plugin/gradle.properties"
9595
"${root}/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties"
96+
"${root}/modules/openapi-generator-mill-plugin/example/mill-build/version.properties"
9697
)
9798

9899
${cwd}/bump.sh -f ${version} -i ${inc} ${xml_files[@]}

bitrise.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,6 @@ workflows:
2727
set -e
2828
2929
./samples/client/petstore/swift6/swift6_test_all.sh
30-
- script@1.2.0:
31-
title: Run Swift5 tests
32-
inputs:
33-
- content: |
34-
#!/usr/bin/env bash
35-
36-
set -e
37-
38-
./samples/client/petstore/swift5/swift5_test_all.sh
3930
- script@1.2.0:
4031
title: Run swift-combine tests
4132
inputs:

0 commit comments

Comments
 (0)