forked from loafle/openapi-generator-original
[fix] Fix delete http verb (the k6 equivalent is del) (#6624)
This commit is contained in:
parent
f373f20639
commit
3b9cb14025
@ -143,7 +143,8 @@ public class K6ClientCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
|
||||
public HTTPRequest(String method, String path, @Nullable List<Parameter> query, @Nullable HTTPBody body,
|
||||
@Nullable HTTPParameters params, @Nullable List<k6Check> k6Checks) {
|
||||
this.method = method;
|
||||
// NOTE: https://k6.io/docs/javascript-api/k6-http/del-url-body-params
|
||||
this.method = method.equals("delete") ? "del" : method;
|
||||
this.path = path;
|
||||
this.query = query;
|
||||
this.body = body;
|
||||
|
@ -1 +1 @@
|
||||
4.3.0-SNAPSHOT
|
||||
5.0.0-SNAPSHOT
|
@ -1,13 +1,13 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
* This is a sample server Petstore server. For this sample, you can use the api key \"special-key\" to test the authorization filters
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator.
|
||||
* https://github.com/OpenAPITools/openapi-generator
|
||||
*
|
||||
* OpenAPI generator version: 4.3.0-SNAPSHOT
|
||||
* OpenAPI generator version: 5.0.0-SNAPSHOT
|
||||
*/
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ export default function() {
|
||||
|
||||
// Request No. 3
|
||||
params = {headers: {"api_key": `${apiKey}`}};
|
||||
request = http.delete(url, params);
|
||||
request = http.del(url, params);
|
||||
sleep(SLEEP_DURATION);
|
||||
});
|
||||
group("/pet/{petId}/uploadImage", () => {
|
||||
@ -125,7 +125,7 @@ export default function() {
|
||||
sleep(SLEEP_DURATION);
|
||||
|
||||
// Request No. 2
|
||||
request = http.delete(url);
|
||||
request = http.del(url);
|
||||
sleep(SLEEP_DURATION);
|
||||
});
|
||||
group("/user", () => {
|
||||
@ -198,7 +198,7 @@ export default function() {
|
||||
sleep(SLEEP_DURATION);
|
||||
|
||||
// Request No. 3
|
||||
request = http.delete(url);
|
||||
request = http.del(url);
|
||||
sleep(SLEEP_DURATION);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user