Skip to content

Commit cf1e31f

Browse files
committed
merge master
2 parents 442141e + df1d562 commit cf1e31f

File tree

136 files changed

+6979
-58
lines changed

Some content is hidden

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

136 files changed

+6979
-58
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1270,7 +1270,7 @@ If you want to join the committee, please kindly apply by sending an email to te
12701270
| Python | @cbornet (2017/09) @tomplus (2018/10) @krjakbrjak (2023/02) @fa0311 (2023/10) @multani (2023/10) |
12711271
| R | @Ramanth (2019/07) @saigiridhar21 (2019/07) |
12721272
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
1273-
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) @@dsteeley (2025/07) |
1273+
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) @dsteeley (2025/07) |
12741274
| Scala | @clasnake (2017/07), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) @fish86 (2023/06) |
12751275
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) |
12761276
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) @joscha (2024/10) |

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +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
topLevelApiClient: true
8-
packageName: petstore-reqwest
8+
packageName: petstore-reqwest-trait
99
mockall: true
1010
enumNameMappings:
1111
delivered: shipped

modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api_test.mustache

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,18 @@ namespace {{packageName}}.Test.{{apiPackage}}
3737
{{#allParams}}
3838
{{^required}}Client.Option<{{/required}}{{{dataType}}}{{>NullConditionalParameter}}{{^required}}>{{/required}} {{paramName}} = default{{nrt!}};
3939
{{/allParams}}
40-
{{#returnType}}
40+
{{#responses}}
41+
{{#-first}}
42+
{{#dataType}}
4143
var response = await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
42-
var model = response.{{#lambda.first}}{{#responses}}{{#dataType}}{{vendorExtensions.x-http-status}} {{/dataType}}{{/responses}}{{/lambda.first}}();
44+
var model = response.{{vendorExtensions.x-http-status}}();
4345
Assert.IsType<{{{.}}}>(model);
44-
{{/returnType}}
45-
{{^returnType}}
46+
{{/dataType}}
47+
{{^dataType}}
4648
await _instance.{{operationId}}Async({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});
47-
{{/returnType}}
49+
{{/dataType}}
50+
{{/-first}}
51+
{{/responses}}
4852
}
4953
{{/operation}}
5054
{{/operations}}

modules/openapi-generator/src/main/resources/rust/reqwest-trait/api.mustache

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ impl {{classname}} for {{classname}}Client {
245245
_ => local_var_req_builder.query(&[("{{{baseName}}}", &param_value.into_iter().map(|p| p.to_string()).collect::<Vec<String>>().join(",").to_string())]),
246246
};
247247
{{/isArray}}
248+
{{^isArray}}
248249
{{#isDeepObject}}
249250
{{^isExplode}}
250251
let params = crate::apis::parse_deep_object("{{{baseName}}}", &serde_json::to_value(param_value)?);
@@ -276,6 +277,7 @@ impl {{classname}} for {{classname}}Client {
276277
{{/isModel}}
277278
{{/isObject}}
278279
{{/isDeepObject}}
280+
{{/isArray}}
279281
}
280282
{{/required}}
281283
{{/queryParams}}

modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,19 @@ paths:
612612
- api_key_query: []
613613
requestBody:
614614
$ref: '#/components/requestBodies/Client'
615+
/redirectOrDefault:
616+
get:
617+
operationId: redirectOrDefault
618+
responses:
619+
'301':
620+
description: redirect
621+
# response that does not provide any content
622+
default:
623+
description: default
624+
content:
625+
application/json:
626+
schema:
627+
$ref: '#/components/schemas/Bar'
615628
/fake:
616629
patch:
617630
tags:
@@ -1780,6 +1793,10 @@ components:
17801793
string_formatted_as_decimal_required:
17811794
format: decimal
17821795
type: string
1796+
duplicate_property_name:
1797+
type: string
1798+
'@duplicate_property_name':
1799+
type: string
17831800
EnumClass:
17841801
type: string
17851802
default: '-efg'

samples/client/petstore/csharp/generichost/net4.7/FormModels/api/openapi.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,18 @@ paths:
639639
summary: To test class name in snake case
640640
tags:
641641
- fake_classname_tags 123#$%^
642+
/redirectOrDefault:
643+
get:
644+
operationId: redirectOrDefault
645+
responses:
646+
"301":
647+
description: redirect
648+
default:
649+
content:
650+
application/json:
651+
schema:
652+
$ref: "#/components/schemas/Bar"
653+
description: default
642654
/fake:
643655
delete:
644656
description: Fake endpoint to test group parameters (optional)
@@ -1673,6 +1685,10 @@ components:
16731685
string_formatted_as_decimal_required:
16741686
format: decimal
16751687
type: string
1688+
duplicate_property_name:
1689+
type: string
1690+
'@duplicate_property_name':
1691+
type: string
16761692
required:
16771693
- byte
16781694
- date

samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/apis/DefaultApi.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
77
| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
88
| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
99
| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
10+
| [**RedirectOrDefault**](DefaultApi.md#redirectordefault) | **GET** /redirectOrDefault | |
1011
| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
1112
| [**Test**](DefaultApi.md#test) | **GET** /test | Retrieve an existing Notificationtest&#39;s Elements |
1213

@@ -106,6 +107,37 @@ No authorization required
106107

107108
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
108109

110+
<a id="redirectordefault"></a>
111+
# **RedirectOrDefault**
112+
> string RedirectOrDefault ()
113+
114+
115+
116+
117+
### Parameters
118+
This endpoint does not need any parameter.
119+
### Return type
120+
121+
**string**
122+
123+
### Authorization
124+
125+
No authorization required
126+
127+
### HTTP request headers
128+
129+
- **Content-Type**: Not defined
130+
- **Accept**: application/json
131+
132+
133+
### HTTP response details
134+
| Status code | Description | Response headers |
135+
|-------------|-------------|------------------|
136+
| **301** | redirect | - |
137+
| **0** | default | - |
138+
139+
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
140+
109141
<a id="rolesreportget"></a>
110142
# **RolesReportGet**
111143
> List&lt;List&lt;RolesReportsHash&gt;&gt; RolesReportGet ()

samples/client/petstore/csharp/generichost/net4.7/FormModels/docs/models/FormatTest.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Name | Type | Description | Notes
1313
**DateTime** | **DateTime** | | [optional]
1414
**Decimal** | **decimal** | | [optional]
1515
**Double** | **double** | | [optional]
16+
**DuplicatePropertyName2** | **string** | | [optional]
17+
**DuplicatePropertyName** | **string** | | [optional]
1618
**Float** | **float** | | [optional]
1719
**Int32** | **int** | | [optional]
1820
**Int32Range** | **int** | | [optional]

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ public async Task HelloAsyncTest()
8282
Assert.IsType<List<Guid>>(model);
8383
}
8484

85+
/// <summary>
86+
/// Test RedirectOrDefault
87+
/// </summary>
88+
[Fact (Skip = "not implemented")]
89+
public async Task RedirectOrDefaultAsyncTest()
90+
{
91+
await _instance.RedirectOrDefaultAsync();
92+
}
93+
8594
/// <summary>
8695
/// Test RolesReportGet
8796
/// </summary>
@@ -90,7 +99,7 @@ public async Task RolesReportGetAsyncTest()
9099
{
91100
var response = await _instance.RolesReportGetAsync();
92101
var model = response.Ok();
93-
Assert.IsType<List<List<RolesReportsHash>>>(model);
102+
Assert.IsType<List<List>>(model);
94103
}
95104

96105
/// <summary>

samples/client/petstore/csharp/generichost/net4.7/FormModels/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,24 @@ public void DoubleTest()
134134
// TODO unit test for the property 'Double'
135135
}
136136

137+
/// <summary>
138+
/// Test the property 'DuplicatePropertyName2'
139+
/// </summary>
140+
[Fact]
141+
public void DuplicatePropertyName2Test()
142+
{
143+
// TODO unit test for the property 'DuplicatePropertyName2'
144+
}
145+
146+
/// <summary>
147+
/// Test the property 'DuplicatePropertyName'
148+
/// </summary>
149+
[Fact]
150+
public void DuplicatePropertyNameTest()
151+
{
152+
// TODO unit test for the property 'DuplicatePropertyName'
153+
}
154+
137155
/// <summary>
138156
/// Test the property 'Float'
139157
/// </summary>

0 commit comments

Comments
 (0)