Skip to content

Commit db5c81f

Browse files
committed
after bin execution
1 parent 9195cf9 commit db5c81f

5 files changed

Lines changed: 53 additions & 24 deletions

File tree

samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/api/openapi.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ paths:
9090
- petstore_auth:
9191
- write:pets
9292
- read:pets
93+
- petstore_auth2:
94+
- write:pets
95+
- read:pets
9396
summary: Add a new pet to the store
9497
tags:
9598
- pet
@@ -3136,6 +3139,14 @@ components:
31363139
write:pets: modify pets in your account
31373140
read:pets: read your pets
31383141
type: oauth2
3142+
petstore_auth2:
3143+
flows:
3144+
implicit:
3145+
authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
3146+
scopes:
3147+
write:pets: modify pets in your account
3148+
read:pets: read your pets
3149+
type: oauth2
31393150
api_key:
31403151
in: header
31413152
name: api-key

samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/docs/apis/PetApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void (empty response body)
3434

3535
### Authorization
3636

37-
[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
37+
[petstore_auth](../README.md#petstore_auth), [petstore_auth2](../README.md#petstore_auth2), [http_signature_test](../README.md#http_signature_test)
3838

3939
### HTTP request headers
4040

samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ public class DependencyInjectionTest
4545

4646
OAuthToken oauthToken1 = new("token", timeout: TimeSpan.FromSeconds(1));
4747
options.AddTokens(oauthToken1);
48+
49+
OAuthToken oauthToken2 = new("token", timeout: TimeSpan.FromSeconds(1));
50+
options.AddTokens(oauthToken2);
4851
})
4952
.Build();
5053

@@ -67,8 +70,11 @@ public class DependencyInjectionTest
6770
HttpSignatureToken httpSignatureToken1 = new(config1, timeout: TimeSpan.FromSeconds(1));
6871
options.AddTokens(httpSignatureToken1);
6972

70-
OAuthToken oauthToken = new("token", timeout: TimeSpan.FromSeconds(1));
71-
options.AddTokens(oauthToken);
73+
OAuthToken oauthToken1 = new("token", timeout: TimeSpan.FromSeconds(1));
74+
options.AddTokens(oauthToken1);
75+
76+
OAuthToken oauthToken2 = new("token", timeout: TimeSpan.FromSeconds(1));
77+
options.AddTokens(oauthToken2);
7278
options.AddApiHttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS));
7379
})
7480
.Build();
@@ -96,6 +102,9 @@ public class DependencyInjectionTest
96102

97103
OAuthToken oauthToken1 = new("token", timeout: TimeSpan.FromSeconds(1));
98104
options.AddTokens(oauthToken1);
105+
106+
OAuthToken oauthToken2 = new("token", timeout: TimeSpan.FromSeconds(1));
107+
options.AddTokens(oauthToken2);
99108
});
100109
})
101110
.Build();
@@ -123,6 +132,9 @@ public class DependencyInjectionTest
123132

124133
OAuthToken oauthToken1 = new("token", timeout: TimeSpan.FromSeconds(1));
125134
options.AddTokens(oauthToken1);
135+
136+
OAuthToken oauthToken2 = new("token", timeout: TimeSpan.FromSeconds(1));
137+
options.AddTokens(oauthToken2);
126138
options.AddApiHttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS));
127139
});
128140
})

samples/client/petstore/csharp/generichost/latest/UseDateTimeOffset/src/Org.OpenAPITools/Api/PetApi.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,14 +849,20 @@ public async Task<IAddPetApiResponse> AddPetAsync(Pet pet, System.Threading.Canc
849849

850850
oauthTokenLocalVar1.UseInHeader(httpRequestMessageLocalVar, "");
851851

852-
HttpSignatureToken httpSignatureTokenLocalVar2 = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false);
852+
OAuthToken oauthTokenLocalVar2 = (OAuthToken) await OauthTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false);
853853

854-
tokenBaseLocalVars.Add(httpSignatureTokenLocalVar2);
854+
tokenBaseLocalVars.Add(oauthTokenLocalVar2);
855+
856+
oauthTokenLocalVar2.UseInHeader(httpRequestMessageLocalVar, "");
857+
858+
HttpSignatureToken httpSignatureTokenLocalVar3 = (HttpSignatureToken) await HttpSignatureTokenProvider.GetAsync(cancellation: cancellationToken).ConfigureAwait(false);
859+
860+
tokenBaseLocalVars.Add(httpSignatureTokenLocalVar3);
855861

856862
if (httpRequestMessageLocalVar.Content != null) {
857863
string requestBodyLocalVar = await httpRequestMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
858864

859-
httpSignatureTokenLocalVar2.UseInHeader(httpRequestMessageLocalVar, requestBodyLocalVar, cancellationToken);
865+
httpSignatureTokenLocalVar3.UseInHeader(httpRequestMessageLocalVar, requestBodyLocalVar, cancellationToken);
860866
}
861867

862868
string[] contentTypes = new string[] {

samples/server/petstore/kotlin-server/ktor2/src/main/kotlin/org/openapitools/server/Paths.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,43 @@ object Paths {
2121
*
2222
* @param pet Pet object that needs to be added to the store
2323
*/
24-
@Serializable @Resource("/pet") class addPet(val pet: Pet)
24+
@Serializable @Resource("/pet") class addPet(@SerialName("Pet") val pet: Pet)
2525

2626
/**
2727
* Deletes a pet
2828
*
2929
* @param petId Pet id to delete
3030
* @param apiKey (optional)
3131
*/
32-
@Serializable @Resource("/pet/{petId}") class deletePet(val petId: kotlin.Long, val apiKey: kotlin.String? = null)
32+
@Serializable @Resource("/pet/{petId}") class deletePet(@SerialName("petId") val petId: kotlin.Long, @SerialName("api_key") val apiKey: kotlin.String? = null)
3333

3434
/**
3535
* Finds Pets by status
3636
* Multiple status values can be provided with comma separated strings
3737
* @param status Status values that need to be considered for filter
3838
*/
39-
@Serializable @Resource("/pet/findByStatus") class findPetsByStatus(val status: kotlin.collections.List<kotlin.String>)
39+
@Serializable @Resource("/pet/findByStatus") class findPetsByStatus(@SerialName("status") val status: kotlin.collections.List<kotlin.String>)
4040

4141
/**
4242
* Finds Pets by tags
4343
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
4444
* @param tags Tags to filter by
4545
*/
46-
@Serializable @Resource("/pet/findByTags") class findPetsByTags(val tags: kotlin.collections.List<kotlin.String>)
46+
@Serializable @Resource("/pet/findByTags") class findPetsByTags(@SerialName("tags") val tags: kotlin.collections.List<kotlin.String>)
4747

4848
/**
4949
* Find pet by ID
5050
* Returns a single pet
5151
* @param petId ID of pet to return
5252
*/
53-
@Serializable @Resource("/pet/{petId}") class getPetById(val petId: kotlin.Long)
53+
@Serializable @Resource("/pet/{petId}") class getPetById(@SerialName("petId") val petId: kotlin.Long)
5454

5555
/**
5656
* Update an existing pet
5757
*
5858
* @param pet Pet object that needs to be added to the store
5959
*/
60-
@Serializable @Resource("/pet") class updatePet(val pet: Pet)
60+
@Serializable @Resource("/pet") class updatePet(@SerialName("Pet") val pet: Pet)
6161

6262
/**
6363
* Updates a pet in the store with form data
@@ -66,7 +66,7 @@ object Paths {
6666
* @param name Updated name of the pet (optional)
6767
* @param status Updated status of the pet (optional)
6868
*/
69-
@Serializable @Resource("/pet/{petId}") class updatePetWithForm(val petId: kotlin.Long, val name: kotlin.String? = null, val status: kotlin.String? = null)
69+
@Serializable @Resource("/pet/{petId}") class updatePetWithForm(@SerialName("petId") val petId: kotlin.Long, @SerialName("name") val name: kotlin.String? = null, @SerialName("status") val status: kotlin.String? = null)
7070

7171
/**
7272
* uploads an image
@@ -75,14 +75,14 @@ object Paths {
7575
* @param additionalMetadata Additional data to pass to server (optional)
7676
* @param file file to upload (optional)
7777
*/
78-
@Serializable @Resource("/pet/{petId}/uploadImage") class uploadFile(val petId: kotlin.Long, val additionalMetadata: kotlin.String? = null, val file: java.io.File? = null)
78+
@Serializable @Resource("/pet/{petId}/uploadImage") class uploadFile(@SerialName("petId") val petId: kotlin.Long, @SerialName("additionalMetadata") val additionalMetadata: kotlin.String? = null, @SerialName("file") val file: java.io.File? = null)
7979

8080
/**
8181
* Delete purchase order by ID
8282
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
8383
* @param orderId ID of the order that needs to be deleted
8484
*/
85-
@Serializable @Resource("/store/order/{orderId}") class deleteOrder(val orderId: kotlin.String)
85+
@Serializable @Resource("/store/order/{orderId}") class deleteOrder(@SerialName("orderId") val orderId: kotlin.String)
8686

8787
/**
8888
* Returns pet inventories by status
@@ -95,57 +95,57 @@ object Paths {
9595
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
9696
* @param orderId ID of pet that needs to be fetched
9797
*/
98-
@Serializable @Resource("/store/order/{orderId}") class getOrderById(val orderId: kotlin.Long)
98+
@Serializable @Resource("/store/order/{orderId}") class getOrderById(@SerialName("orderId") val orderId: kotlin.Long)
9999

100100
/**
101101
* Place an order for a pet
102102
*
103103
* @param order order placed for purchasing the pet
104104
*/
105-
@Serializable @Resource("/store/order") class placeOrder(val order: Order)
105+
@Serializable @Resource("/store/order") class placeOrder(@SerialName("Order") val order: Order)
106106

107107
/**
108108
* Create user
109109
* This can only be done by the logged in user.
110110
* @param user Created user object
111111
*/
112-
@Serializable @Resource("/user") class createUser(val user: User)
112+
@Serializable @Resource("/user") class createUser(@SerialName("User") val user: User)
113113

114114
/**
115115
* Creates list of users with given input array
116116
*
117117
* @param user List of user object
118118
*/
119-
@Serializable @Resource("/user/createWithArray") class createUsersWithArrayInput(val user: kotlin.collections.List<User>)
119+
@Serializable @Resource("/user/createWithArray") class createUsersWithArrayInput(@SerialName("User") val user: kotlin.collections.List<User>)
120120

121121
/**
122122
* Creates list of users with given input array
123123
*
124124
* @param user List of user object
125125
*/
126-
@Serializable @Resource("/user/createWithList") class createUsersWithListInput(val user: kotlin.collections.List<User>)
126+
@Serializable @Resource("/user/createWithList") class createUsersWithListInput(@SerialName("User") val user: kotlin.collections.List<User>)
127127

128128
/**
129129
* Delete user
130130
* This can only be done by the logged in user.
131131
* @param username The name that needs to be deleted
132132
*/
133-
@Serializable @Resource("/user/{username}") class deleteUser(val username: kotlin.String)
133+
@Serializable @Resource("/user/{username}") class deleteUser(@SerialName("username") val username: kotlin.String)
134134

135135
/**
136136
* Get user by user name
137137
*
138138
* @param username The name that needs to be fetched. Use user1 for testing.
139139
*/
140-
@Serializable @Resource("/user/{username}") class getUserByName(val username: kotlin.String)
140+
@Serializable @Resource("/user/{username}") class getUserByName(@SerialName("username") val username: kotlin.String)
141141

142142
/**
143143
* Logs user into the system
144144
*
145145
* @param username The user name for login
146146
* @param password The password for login in clear text
147147
*/
148-
@Serializable @Resource("/user/login") class loginUser(val username: kotlin.String, val password: kotlin.String)
148+
@Serializable @Resource("/user/login") class loginUser(@SerialName("username") val username: kotlin.String, @SerialName("password") val password: kotlin.String)
149149

150150
/**
151151
* Logs out current logged in user session
@@ -159,6 +159,6 @@ object Paths {
159159
* @param username name that need to be deleted
160160
* @param user Updated user object
161161
*/
162-
@Serializable @Resource("/user/{username}") class updateUser(val username: kotlin.String, val user: User)
162+
@Serializable @Resource("/user/{username}") class updateUser(@SerialName("username") val username: kotlin.String, @SerialName("User") val user: User)
163163

164164
}

0 commit comments

Comments
 (0)