Skip to content

Commit 5da4d37

Browse files
committed
Merge branch 'master' into issue-20213
2 parents 4a9c7bb + 1c2fd67 commit 5da4d37

712 files changed

Lines changed: 3028 additions & 1574 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.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Samples Dart (build, test)
2+
3+
on:
4+
push:
5+
branches:
6+
paths:
7+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
8+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
9+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
10+
- samples/openapi3/client/petstore/dart-dio/oneof/**
11+
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
12+
- samples/openapi3/client/petstore/dart-dio/binary_response/**
13+
pull_request:
14+
paths:
15+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/**
16+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/**
17+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/**
18+
- samples/openapi3/client/petstore/dart-dio/oneof/**
19+
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/**
20+
- samples/openapi3/client/petstore/dart-dio/binary_response/**
21+
22+
jobs:
23+
test:
24+
runs-on: ${{ matrix.os }}
25+
strategy:
26+
matrix:
27+
os: [ubuntu-latest, windows-latest]
28+
sdk: ["3.9.0"]
29+
sample:
30+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake-json_serializable/
31+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake_tests/
32+
#- samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/
33+
- samples/openapi3/client/petstore/dart-dio/oneof/
34+
- samples/openapi3/client/petstore/dart-dio/oneof_polymorphism_and_inheritance/
35+
- samples/openapi3/client/petstore/dart-dio/binary_response/
36+
steps:
37+
- uses: actions/checkout@v4
38+
39+
- uses: dart-lang/setup-dart@v1
40+
with:
41+
sdk: ${{ matrix.sdk }}
42+
43+
- name: pub get
44+
working-directory: ${{ matrix.sample }}
45+
run: dart pub get
46+
47+
- name: build_runner build
48+
working-directory: ${{ matrix.sample }}
49+
run: dart run build_runner build
50+
51+
- name: test
52+
working-directory: ${{ matrix.sample }}
53+
run: dart test

.github/workflows/samples-kotlin-client.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
- samples/client/petstore/kotlin-moshi-codegen
3434
- samples/client/petstore/kotlin-multiplatform
3535
- samples/client/petstore/kotlin-multiplatform-kotlinx-datetime
36+
- samples/client/petstore/kotlin-multiplatform-allOf-discriminator
3637
- samples/client/petstore/kotlin-nonpublic
3738
- samples/client/petstore/kotlin-nullable
3839
- samples/client/petstore/kotlin-retrofit2
@@ -69,7 +70,7 @@ jobs:
6970
- samples/client/others/kotlin-jvm-okhttp-parameter-tests
7071
- samples/client/others/kotlin-jvm-okhttp-path-comments
7172
- samples/client/others/kotlin-integer-enum
72-
- samples/client/petstore/kotlin-allOff-discriminator-kotlinx-serialization
73+
- samples/client/petstore/kotlin-allOf-discriminator-kotlinx-serialization
7374
steps:
7475
- uses: actions/checkout@v5
7576
- uses: actions/setup-java@v5
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Samples PHP (Server) Syntax Checker
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
7+
#- samples/server/petstore/php-laravel/**
8+
- samples/server/petstore/php-flight/**
9+
- samples/server/petstore/php-mezzio-ph-modern/**
10+
- samples/server/petstore/php-mezzio-ph/**
11+
- samples/server/petstore/php-slim4/**
12+
pull_request:
13+
paths:
14+
- samples/server/petstore/php-symfony/SymfonyBundle-php/**
15+
#- samples/server/petstore/php-laravel/**
16+
- samples/server/petstore/php-flight/**
17+
- samples/server/petstore/php-mezzio-ph-modern/**
18+
- samples/server/petstore/php-mezzio-ph/**
19+
- samples/server/petstore/php-slim4/**
20+
jobs:
21+
build:
22+
name: Build PHP projects
23+
runs-on: ubuntu-latest
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
php:
28+
- "8.1"
29+
- "8.2"
30+
- "8.3"
31+
- "8.4"
32+
sample:
33+
# servers
34+
- samples/server/petstore/php-symfony/SymfonyBundle-php/
35+
#- samples/server/petstore/php-laravel/
36+
- samples/server/petstore/php-flight/
37+
- samples/server/petstore/php-mezzio-ph-modern/
38+
- samples/server/petstore/php-mezzio-ph/
39+
- samples/server/petstore/php-slim4/
40+
steps:
41+
- uses: actions/checkout@v5
42+
- name: Setup PHP with tools
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: "${{ matrix.php }}"
46+
- name: php -l
47+
working-directory: ${{ matrix.sample }}
48+
run: find . -name "*.php" -exec php -l {} +
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Samples Rust Clients
2+
3+
on:
4+
push:
5+
paths:
6+
- "samples/client/others/rust/**"
7+
- "samples/client/petstore/rust-server/**"
8+
pull_request:
9+
paths:
10+
- "samples/client/others/rust/**"
11+
- "samples/client/petstore/rust/**"
12+
13+
jobs:
14+
build:
15+
name: Build Rust
16+
runs-on: ubuntu-latest
17+
services:
18+
petstore-api:
19+
image: swaggerapi/petstore
20+
ports:
21+
- 80:8080
22+
env:
23+
SWAGGER_HOST: http://petstore.swagger.io
24+
SWAGGER_BASE_PATH: /v2
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
sample:
29+
# these folders contain sub-projects of rust clients, servers
30+
- samples/client/others/rust/
31+
- samples/client/petstore/rust/
32+
steps:
33+
- uses: actions/checkout@v5
34+
- uses: actions-rs/toolchain@v1
35+
with:
36+
toolchain: stable
37+
38+
- name: Rust cache
39+
uses: Swatinem/rust-cache@v2
40+
with:
41+
cache-targets: false # Don't cache workspace target directories as they don't exist
42+
cache-directories:
43+
${{ matrix.sample }}/target
44+
workspaces: |
45+
${{ matrix.sample }}/output/*
46+
47+
- name: Build
48+
working-directory: ${{ matrix.sample }}
49+
run: cargo build --all-targets --all-features
50+
- name: Tests
51+
working-directory: ${{ matrix.sample }}
52+
run: |
53+
set -e
54+
55+
# Iterate through each example and test various features
56+
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
57+
do
58+
# Not all versions have a client example
59+
if test -f examples/client/main.rs; then
60+
cargo build --example client --features="client"
61+
fi
62+
63+
# Test the CLI works if present
64+
if test -f bin/cli.rs; then
65+
cargo build --bin ${package##*/} --features cli
66+
target/debug/${package##*/} --help
67+
fi
68+
cargo fmt
69+
cargo test
70+
cargo clippy
71+
cargo doc
72+
done

.github/workflows/samples-rust.yaml renamed to .github/workflows/samples-rust-server.yaml

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
name: Samples Rust
1+
name: Samples Rust Servers
22

33
on:
44
push:
55
paths:
6-
- "samples/client/others/rust/**"
76
- "samples/server/petstore/rust-server/**"
8-
- "samples/client/petstore/rust-server/**"
97
- "samples/server/petstore/rust-axum/**"
108
pull_request:
119
paths:
12-
- "samples/client/others/rust/**"
13-
- "samples/client/petstore/rust/**"
1410
- "samples/server/petstore/rust-server/**"
1511
- "samples/server/petstore/rust-axum/**"
1612

@@ -23,8 +19,6 @@ jobs:
2319
matrix:
2420
sample:
2521
# these folders contain sub-projects of rust clients, servers
26-
- samples/client/others/rust/
27-
- samples/client/petstore/rust/
2822
- samples/server/petstore/rust-server/
2923
- samples/server/petstore/rust-server-deprecated/
3024
- samples/server/petstore/rust-axum/
@@ -50,19 +44,10 @@ jobs:
5044
working-directory: ${{ matrix.sample }}
5145
run: |
5246
set -e
53-
# Skip samples/client/petstore/rust/ as its tests are failing.
54-
if [[ "${{ matrix.sample }}" == "samples/client/petstore/rust/" ]]; then
55-
echo "Skipping tests for samples/client/petstore/rust/"
56-
exit 0
57-
fi
5847
5948
# Iterate through each example and test various features
6049
for package in $(find . -maxdepth 1 -mindepth 1 -type d)
6150
do
62-
# Not all versions have a client example
63-
if test -f examples/client/main.rs; then
64-
cargo build --example client --features="client"
65-
fi
6651
# Not all versions have a server example
6752
if test -f examples/server/main.rs; then
6853
cargo build --example server --features="server"

0 commit comments

Comments
 (0)