Skip to content

Commit aae8ca1

Browse files
authored
Merge branch 'OpenAPITools:master' into fix/protobuf-discriminator-issues
2 parents 8c2fd2b + 4f9f14a commit aae8ca1

319 files changed

Lines changed: 8105 additions & 3944 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: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Samples Crystal clients
2+
3+
on:
4+
push:
5+
paths:
6+
- samples/client/petstore/crystal/**
7+
pull_request:
8+
paths:
9+
- samples/client/petstore/crystal/**
10+
jobs:
11+
build:
12+
name: Build Crystal projects
13+
runs-on: ubuntu-latest
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
sample:
18+
# clients
19+
- samples/client/petstore/crystal/
20+
services:
21+
petstore-api:
22+
image: swaggerapi/petstore
23+
ports:
24+
- 80:8080
25+
env:
26+
SWAGGER_HOST: http://petstore.swagger.io
27+
SWAGGER_BASE_PATH: /v2
28+
steps:
29+
- uses: actions/checkout@v5
30+
- name: Install Crystal
31+
uses: crystal-lang/install-crystal@v1
32+
- name: Shards Install
33+
run: shards install
34+
working-directory: ${{ matrix.sample }}
35+
- name: Run tests
36+
run: crystal spec
37+
working-directory: ${{ matrix.sample }}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ jobs:
3939
4040
- name: Build
4141
working-directory: ${{ matrix.sample }}
42-
run: cargo build --all-targets --all-features
42+
run: |
43+
set -e
44+
cargo build --all-targets --all-features
45+
cargo build --all-targets --no-default-features
4346
- name: Tests
4447
working-directory: ${{ matrix.sample }}
4548
run: |

.github/workflows/samples-swift5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ${{ matrix.os }}
3636
steps:
3737
- uses: actions/checkout@v5
38-
- uses: swift-actions/setup-swift@v2
38+
- uses: swift-actions/setup-swift@v3
3939
if: ${{ matrix.os == 'ubuntu-latest' }}
4040
with:
4141
swift-version: '5'

bin/configs/crystal.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ additionalProperties:
66
shardVersion: 1.0.0
77
moduleName: Petstore
88
shardName: petstore
9+
#paramsEncoder: Crest::EnumeratedFlatParamsEncoder
910
strictSpecBehavior: false
1011
modelNameMappings:
1112
PropertyNameMapping: AnotherPropertyNameMapping

bin/configs/rust-reqwest-petstore-async-middleware.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/rust
66
additionalProperties:
77
supportAsync: true
8+
useAsyncFileStream: true
89
supportMiddleware: true
910
supportMultipleResponses: true
1011
packageName: petstore-reqwest-async-middleware

bin/configs/rust-reqwest-petstore-async-tokensource.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/rust
66
additionalProperties:
77
supportAsync: true
8+
useAsyncFileStream: true
89
supportTokenSource: true
910
supportMultipleResponses: true
1011
packageName: petstore-reqwest-async-tokensource

bin/configs/rust-reqwest-petstore-async.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/rust
66
additionalProperties:
77
supportAsync: true
8+
useAsyncFileStream: true
89
supportMultipleResponses: true
910
packageName: petstore-reqwest-async
1011
useSingleRequestParameter: true

bin/configs/rust-reqwest-petstore-avoid-box.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/rust
66
additionalProperties:
77
supportAsync: true
8+
useAsyncFileStream: true
89
supportMultipleResponses: true
910
avoidBoxedModels: true
1011
packageName: petstore-reqwest-avoid-box

bin/configs/rust-reqwest-petstore-serde-path-to-error.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ inputSpec: modules/openapi-generator/src/test/resources/3_0/rust/petstore.yaml
55
templateDir: modules/openapi-generator/src/main/resources/rust
66
additionalProperties:
77
packageName: petstore-reqwest-serde-path-to-error
8+
useAsyncFileStream: true
89
useSerdePathToError: true
910
enumNameMappings:
1011
delivered: shipped

docs/generators/crystal.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
2525
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
2626
|legacyDiscriminatorBehavior|Set to false for generators with better support for discriminators. (Python, Java, Go, PowerShell, C# have this enabled by default).|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.</dd></dl>|true|
2727
|moduleName|module name (e.g. TwitterClient| |OpenAPIClient|
28+
|paramsEncoder|params_encoder setting (e.g. Crest::NestedParamsEncoder, Crest::EnumeratedFlatParamsEncoder, Crest::ZeroEnumeratedFlatParamsEncoder| |Crest::NestedParamsEncoder|
2829
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
2930
|shardAuthor|shard author (only one is supported).| |null|
3031
|shardAuthorEmail|shard author email (only one is supported).| |null|

0 commit comments

Comments
 (0)