Skip to content

Commit bdb2447

Browse files
committed
Merge branch 'refs/heads/master' into feat/x-implements-overrides
2 parents 02dbf12 + b443080 commit bdb2447

1,476 files changed

Lines changed: 16241 additions & 7594 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.

.github/workflows/samples-python-fastapi-server.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: actions/checkout@v5
2222
- uses: actions/setup-python@v6
2323
with:
24-
python-version: '3.9'
24+
python-version: '3.10'
2525
- name: Install dependencies
2626
working-directory: ${{ matrix.sample }}
2727
run: |

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/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

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:

docs/customization.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,3 +723,10 @@ Into this securityScheme:
723723
scheme: bearer
724724
type: http
725725
```
726+
727+
- `SORT_MODEL_PROPERTIES`: When set to true, model properties will be sorted alphabetically by name. This ensures deterministic code generation output regardless of property ordering in the source spec.
728+
729+
Example:
730+
```
731+
java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o /tmp/java-okhttp/ --openapi-normalizer SORT_MODEL_PROPERTIES=true
732+
```

docs/generators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ The following generators are available:
6868
* [scala-sttp4-jsoniter (beta)](generators/scala-sttp4-jsoniter.md)
6969
* [scalaz](generators/scalaz.md)
7070
* [swift-combine](generators/swift-combine.md)
71-
* [swift5](generators/swift5.md)
71+
* [swift5 (deprecated)](generators/swift5.md)
7272
* [swift6](generators/swift6.md)
7373
* [typescript (experimental)](generators/typescript.md)
7474
* [typescript-angular](generators/typescript-angular.md)

docs/generators/python-fastapi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ title: Documentation for the python-fastapi Generator
1010
| generator stability | BETA | |
1111
| generator type | SERVER | |
1212
| generator language | Python | |
13-
| generator language version | 3.7 | |
13+
| generator language version | 3.10 | |
1414
| generator default templating engine | mustache | |
1515
| helpTxt | Generates a Python FastAPI server (beta). Models are defined with the pydantic library | |
1616

docs/generators/swift5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Documentation for the swift5 Generator
77
| Property | Value | Notes |
88
| -------- | ----- | ----- |
99
| generator name | swift5 | pass this to the generate command after -g |
10-
| generator stability | STABLE | |
10+
| generator stability | DEPRECATED | |
1111
| generator type | CLIENT | |
1212
| generator language | Swift | |
1313
| generator default templating engine | mustache | |

modules/openapi-generator/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@
488488
<dependency>
489489
<groupId>org.assertj</groupId>
490490
<artifactId>assertj-core</artifactId>
491-
<version>3.23.1</version>
491+
<version>3.27.7</version>
492492
<scope>test</scope>
493493
</dependency>
494494
<dependency>

0 commit comments

Comments
 (0)