@grafana/openapi-to-k6 0.3.2 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/.github/workflows/publish.yaml +39 -13
  2. package/.github/workflows/tests.yaml +23 -10
  3. package/.nvmrc +1 -1
  4. package/CODEOWNERS +2 -0
  5. package/README.md +34 -39
  6. package/catalog-info.yaml +13 -0
  7. package/dist/generator/k6Client.js +7 -4
  8. package/examples/basic_schema/single/simpleAPI.ts +5 -3
  9. package/examples/basic_schema/split/simpleAPI.schemas.ts +1 -1
  10. package/examples/basic_schema/split/simpleAPI.ts +5 -3
  11. package/examples/basic_schema/tags/default.ts +5 -3
  12. package/examples/basic_schema/tags/simpleAPI.schemas.ts +1 -1
  13. package/examples/form_data_schema/single/formDataAPI.ts +5 -3
  14. package/examples/form_data_schema/split/formDataAPI.schemas.ts +1 -1
  15. package/examples/form_data_schema/split/formDataAPI.ts +5 -3
  16. package/examples/form_data_schema/tags/default.ts +5 -3
  17. package/examples/form_data_schema/tags/formDataAPI.schemas.ts +1 -1
  18. package/examples/form_url_encoded_data_schema/single/formURLEncodedAPI.ts +5 -3
  19. package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.schemas.ts +1 -1
  20. package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.ts +5 -3
  21. package/examples/form_url_encoded_data_schema/tags/default.ts +5 -3
  22. package/examples/form_url_encoded_data_schema/tags/formURLEncodedAPI.schemas.ts +1 -1
  23. package/examples/form_url_encoded_data_with_query_params_schema/single/formURLEncodedAPIWithQueryParameters.ts +5 -3
  24. package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.schemas.ts +1 -1
  25. package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.ts +5 -3
  26. package/examples/form_url_encoded_data_with_query_params_schema/tags/default.ts +5 -3
  27. package/examples/form_url_encoded_data_with_query_params_schema/tags/formURLEncodedAPIWithQueryParameters.schemas.ts +1 -1
  28. package/examples/get_request_with_path_parameters_schema/single/simpleAPI.ts +5 -3
  29. package/examples/get_request_with_path_parameters_schema/split/simpleAPI.schemas.ts +1 -1
  30. package/examples/get_request_with_path_parameters_schema/split/simpleAPI.ts +5 -3
  31. package/examples/get_request_with_path_parameters_schema/tags/default.ts +5 -3
  32. package/examples/get_request_with_path_parameters_schema/tags/simpleAPI.schemas.ts +1 -1
  33. package/examples/headers_schema/single/headerDemoAPI.ts +13 -7
  34. package/examples/headers_schema/split/headerDemoAPI.schemas.ts +1 -1
  35. package/examples/headers_schema/split/headerDemoAPI.ts +13 -7
  36. package/examples/headers_schema/tags/default.ts +13 -7
  37. package/examples/headers_schema/tags/headerDemoAPI.schemas.ts +1 -1
  38. package/examples/no_title_schema/single/k6Client.ts +5 -3
  39. package/examples/no_title_schema/split/k6Client.schemas.ts +1 -1
  40. package/examples/no_title_schema/split/k6Client.ts +5 -3
  41. package/examples/no_title_schema/tags/default.ts +5 -3
  42. package/examples/no_title_schema/tags/k6Client.schemas.ts +1 -1
  43. package/examples/post_request_with_query_params/single/exampleAPI.ts +5 -3
  44. package/examples/post_request_with_query_params/split/exampleAPI.schemas.ts +1 -1
  45. package/examples/post_request_with_query_params/split/exampleAPI.ts +5 -3
  46. package/examples/post_request_with_query_params/tags/default.ts +5 -3
  47. package/examples/post_request_with_query_params/tags/exampleAPI.schemas.ts +1 -1
  48. package/examples/query_params_schema/single/exampleAPI.ts +5 -3
  49. package/examples/query_params_schema/split/exampleAPI.schemas.ts +1 -1
  50. package/examples/query_params_schema/split/exampleAPI.ts +5 -3
  51. package/examples/query_params_schema/tags/default.ts +5 -3
  52. package/examples/query_params_schema/tags/exampleAPI.schemas.ts +1 -1
  53. package/examples/simple_post_request_schema/single/exampleAPI.ts +5 -3
  54. package/examples/simple_post_request_schema/split/exampleAPI.schemas.ts +1 -1
  55. package/examples/simple_post_request_schema/split/exampleAPI.ts +5 -3
  56. package/examples/simple_post_request_schema/tags/default.ts +5 -3
  57. package/examples/simple_post_request_schema/tags/exampleAPI.schemas.ts +1 -1
  58. package/package.json +19 -19
  59. package/renovate.json +6 -0
  60. package/src/generator/k6Client.ts +9 -3
  61. package/tests/functional-tests/test-generator/fixtures/form_data_schema.json +2 -2
  62. package/tests/functional-tests/test-generator/fixtures/form_url_encoded_data_schema.json +2 -2
  63. package/tests/functional-tests/test-generator/fixtures/form_url_encoded_data_with_query_params_schema.json +1 -1
  64. package/tests/functional-tests/test-generator/fixtures/get_request_with_path_parameters_schema.json +1 -1
  65. package/tests/functional-tests/test-generator/fixtures/headers_schema.json +6 -6
  66. package/tests/functional-tests/test-generator/fixtures/simple_post_request_schema.json +1 -1
  67. package/tests/functional-tests/test-generator/generator.test.ts +9 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
5
  * Service version: 1.0.0
@@ -52,15 +52,16 @@ export class FormURLEncodedAPIClient {
52
52
  ): {
53
53
  response: Response
54
54
  data: PostSubmitForm200
55
+ operationId: string
55
56
  } {
56
- const url = new URL(this.cleanBaseUrl + `/submit-form`)
57
+ const k6url = new URL(this.cleanBaseUrl + `/submit-form`)
57
58
  const mergedRequestParameters = this._mergeRequestParameters(
58
59
  requestParameters || {},
59
60
  this.commonRequestParameters
60
61
  )
61
62
  const response = http.request(
62
63
  'POST',
63
- url.toString(),
64
+ k6url.toString(),
64
65
  JSON.stringify(postSubmitFormBody),
65
66
  {
66
67
  ...mergedRequestParameters,
@@ -80,6 +81,7 @@ export class FormURLEncodedAPIClient {
80
81
  return {
81
82
  response,
82
83
  data,
84
+ operationId: 'PostSubmitForm',
83
85
  }
84
86
  }
85
87
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
5
  * Service version: 1.0.0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
5
  * Service version: 1.0.0
@@ -38,15 +38,16 @@ export class FormURLEncodedAPIClient {
38
38
  ): {
39
39
  response: Response
40
40
  data: PostSubmitForm200
41
+ operationId: string
41
42
  } {
42
- const url = new URL(this.cleanBaseUrl + `/submit-form`)
43
+ const k6url = new URL(this.cleanBaseUrl + `/submit-form`)
43
44
  const mergedRequestParameters = this._mergeRequestParameters(
44
45
  requestParameters || {},
45
46
  this.commonRequestParameters
46
47
  )
47
48
  const response = http.request(
48
49
  'POST',
49
- url.toString(),
50
+ k6url.toString(),
50
51
  JSON.stringify(postSubmitFormBody),
51
52
  {
52
53
  ...mergedRequestParameters,
@@ -66,6 +67,7 @@ export class FormURLEncodedAPIClient {
66
67
  return {
67
68
  response,
68
69
  data,
70
+ operationId: 'PostSubmitForm',
69
71
  }
70
72
  }
71
73
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
5
  * Service version: 1.0.0
@@ -38,15 +38,16 @@ export class DefaultClient {
38
38
  ): {
39
39
  response: Response
40
40
  data: PostSubmitForm200
41
+ operationId: string
41
42
  } {
42
- const url = new URL(this.cleanBaseUrl + `/submit-form`)
43
+ const k6url = new URL(this.cleanBaseUrl + `/submit-form`)
43
44
  const mergedRequestParameters = this._mergeRequestParameters(
44
45
  requestParameters || {},
45
46
  this.commonRequestParameters
46
47
  )
47
48
  const response = http.request(
48
49
  'POST',
49
- url.toString(),
50
+ k6url.toString(),
50
51
  JSON.stringify(postSubmitFormBody),
51
52
  {
52
53
  ...mergedRequestParameters,
@@ -66,6 +67,7 @@ export class DefaultClient {
66
67
  return {
67
68
  response,
68
69
  data,
70
+ operationId: 'PostSubmitForm',
69
71
  }
70
72
  }
71
73
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
5
  * Service version: 1.0.0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
5
  * Service version: 1.0.0
@@ -64,8 +64,9 @@ export class FormURLEncodedAPIWithQueryParametersClient {
64
64
  ): {
65
65
  response: Response
66
66
  data: PostSubmitForm200
67
+ operationId: string
67
68
  } {
68
- const url = new URL(
69
+ const k6url = new URL(
69
70
  this.cleanBaseUrl +
70
71
  `/submit-form` +
71
72
  `?${new URLSearchParams(params).toString()}`
@@ -76,7 +77,7 @@ export class FormURLEncodedAPIWithQueryParametersClient {
76
77
  )
77
78
  const response = http.request(
78
79
  'POST',
79
- url.toString(),
80
+ k6url.toString(),
80
81
  JSON.stringify(postSubmitFormBody),
81
82
  {
82
83
  ...mergedRequestParameters,
@@ -96,6 +97,7 @@ export class FormURLEncodedAPIWithQueryParametersClient {
96
97
  return {
97
98
  response,
98
99
  data,
100
+ operationId: 'PostSubmitForm',
99
101
  }
100
102
  }
101
103
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
5
  * Service version: 1.0.0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
5
  * Service version: 1.0.0
@@ -40,8 +40,9 @@ export class FormURLEncodedAPIWithQueryParametersClient {
40
40
  ): {
41
41
  response: Response
42
42
  data: PostSubmitForm200
43
+ operationId: string
43
44
  } {
44
- const url = new URL(
45
+ const k6url = new URL(
45
46
  this.cleanBaseUrl +
46
47
  `/submit-form` +
47
48
  `?${new URLSearchParams(params).toString()}`
@@ -52,7 +53,7 @@ export class FormURLEncodedAPIWithQueryParametersClient {
52
53
  )
53
54
  const response = http.request(
54
55
  'POST',
55
- url.toString(),
56
+ k6url.toString(),
56
57
  JSON.stringify(postSubmitFormBody),
57
58
  {
58
59
  ...mergedRequestParameters,
@@ -72,6 +73,7 @@ export class FormURLEncodedAPIWithQueryParametersClient {
72
73
  return {
73
74
  response,
74
75
  data,
76
+ operationId: 'PostSubmitForm',
75
77
  }
76
78
  }
77
79
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
5
  * Service version: 1.0.0
@@ -40,8 +40,9 @@ export class DefaultClient {
40
40
  ): {
41
41
  response: Response
42
42
  data: PostSubmitForm200
43
+ operationId: string
43
44
  } {
44
- const url = new URL(
45
+ const k6url = new URL(
45
46
  this.cleanBaseUrl +
46
47
  `/submit-form` +
47
48
  `?${new URLSearchParams(params).toString()}`
@@ -52,7 +53,7 @@ export class DefaultClient {
52
53
  )
53
54
  const response = http.request(
54
55
  'POST',
55
- url.toString(),
56
+ k6url.toString(),
56
57
  JSON.stringify(postSubmitFormBody),
57
58
  {
58
59
  ...mergedRequestParameters,
@@ -72,6 +73,7 @@ export class DefaultClient {
72
73
  return {
73
74
  response,
74
75
  data,
76
+ operationId: 'PostSubmitForm',
75
77
  }
76
78
  }
77
79
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
5
  * Service version: 1.0.0
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Simple API
5
5
  * An API with a single GET request that takes a path parameter
@@ -40,15 +40,16 @@ export class SimpleAPIClient {
40
40
  ): {
41
41
  response: Response
42
42
  data: GetItemById200
43
+ operationId: string
43
44
  } {
44
- const url = new URL(this.cleanBaseUrl + `/items/${id}`)
45
+ const k6url = new URL(this.cleanBaseUrl + `/items/${id}`)
45
46
  const mergedRequestParameters = this._mergeRequestParameters(
46
47
  requestParameters || {},
47
48
  this.commonRequestParameters
48
49
  )
49
50
  const response = http.request(
50
51
  'GET',
51
- url.toString(),
52
+ k6url.toString(),
52
53
  undefined,
53
54
  mergedRequestParameters
54
55
  )
@@ -62,6 +63,7 @@ export class SimpleAPIClient {
62
63
  return {
63
64
  response,
64
65
  data,
66
+ operationId: 'getItemById',
65
67
  }
66
68
  }
67
69
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Simple API
5
5
  * An API with a single GET request that takes a path parameter
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Simple API
5
5
  * An API with a single GET request that takes a path parameter
@@ -36,15 +36,16 @@ export class SimpleAPIClient {
36
36
  ): {
37
37
  response: Response
38
38
  data: GetItemById200
39
+ operationId: string
39
40
  } {
40
- const url = new URL(this.cleanBaseUrl + `/items/${id}`)
41
+ const k6url = new URL(this.cleanBaseUrl + `/items/${id}`)
41
42
  const mergedRequestParameters = this._mergeRequestParameters(
42
43
  requestParameters || {},
43
44
  this.commonRequestParameters
44
45
  )
45
46
  const response = http.request(
46
47
  'GET',
47
- url.toString(),
48
+ k6url.toString(),
48
49
  undefined,
49
50
  mergedRequestParameters
50
51
  )
@@ -58,6 +59,7 @@ export class SimpleAPIClient {
58
59
  return {
59
60
  response,
60
61
  data,
62
+ operationId: 'getItemById',
61
63
  }
62
64
  }
63
65
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Simple API
5
5
  * An API with a single GET request that takes a path parameter
@@ -36,15 +36,16 @@ export class DefaultClient {
36
36
  ): {
37
37
  response: Response
38
38
  data: GetItemById200
39
+ operationId: string
39
40
  } {
40
- const url = new URL(this.cleanBaseUrl + `/items/${id}`)
41
+ const k6url = new URL(this.cleanBaseUrl + `/items/${id}`)
41
42
  const mergedRequestParameters = this._mergeRequestParameters(
42
43
  requestParameters || {},
43
44
  this.commonRequestParameters
44
45
  )
45
46
  const response = http.request(
46
47
  'GET',
47
- url.toString(),
48
+ k6url.toString(),
48
49
  undefined,
49
50
  mergedRequestParameters
50
51
  )
@@ -58,6 +59,7 @@ export class DefaultClient {
58
59
  return {
59
60
  response,
60
61
  data,
62
+ operationId: 'getItemById',
61
63
  }
62
64
  }
63
65
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Simple API
5
5
  * An API with a single GET request that takes a path parameter
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
@@ -60,13 +60,14 @@ export class HeaderDemoAPIClient {
60
60
  ): {
61
61
  response: Response
62
62
  data: GetExampleGet200
63
+ operationId: string
63
64
  } {
64
- const url = new URL(this.cleanBaseUrl + `/example-get`)
65
+ const k6url = new URL(this.cleanBaseUrl + `/example-get`)
65
66
  const mergedRequestParameters = this._mergeRequestParameters(
66
67
  requestParameters || {},
67
68
  this.commonRequestParameters
68
69
  )
69
- const response = http.request('GET', url.toString(), undefined, {
70
+ const response = http.request('GET', k6url.toString(), undefined, {
70
71
  ...mergedRequestParameters,
71
72
  headers: {
72
73
  ...mergedRequestParameters?.headers,
@@ -89,6 +90,7 @@ export class HeaderDemoAPIClient {
89
90
  return {
90
91
  response,
91
92
  data,
93
+ operationId: 'GetExampleGet',
92
94
  }
93
95
  }
94
96
 
@@ -103,15 +105,16 @@ export class HeaderDemoAPIClient {
103
105
  ): {
104
106
  response: Response
105
107
  data: void
108
+ operationId: string
106
109
  } {
107
- const url = new URL(this.cleanBaseUrl + `/example-post`)
110
+ const k6url = new URL(this.cleanBaseUrl + `/example-post`)
108
111
  const mergedRequestParameters = this._mergeRequestParameters(
109
112
  requestParameters || {},
110
113
  this.commonRequestParameters
111
114
  )
112
115
  const response = http.request(
113
116
  'POST',
114
- url.toString(),
117
+ k6url.toString(),
115
118
  JSON.stringify(postExamplePostBody),
116
119
  {
117
120
  ...mergedRequestParameters,
@@ -138,6 +141,7 @@ export class HeaderDemoAPIClient {
138
141
  return {
139
142
  response,
140
143
  data,
144
+ operationId: 'PostExamplePost',
141
145
  }
142
146
  }
143
147
 
@@ -148,15 +152,16 @@ export class HeaderDemoAPIClient {
148
152
  getExampleResponseHeaders(requestParameters?: Params): {
149
153
  response: Response
150
154
  data: GetExampleResponseHeaders200
155
+ operationId: string
151
156
  } {
152
- const url = new URL(this.cleanBaseUrl + `/example-response-headers`)
157
+ const k6url = new URL(this.cleanBaseUrl + `/example-response-headers`)
153
158
  const mergedRequestParameters = this._mergeRequestParameters(
154
159
  requestParameters || {},
155
160
  this.commonRequestParameters
156
161
  )
157
162
  const response = http.request(
158
163
  'GET',
159
- url.toString(),
164
+ k6url.toString(),
160
165
  undefined,
161
166
  mergedRequestParameters
162
167
  )
@@ -170,6 +175,7 @@ export class HeaderDemoAPIClient {
170
175
  return {
171
176
  response,
172
177
  data,
178
+ operationId: 'GetExampleResponseHeaders',
173
179
  }
174
180
  }
175
181
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
@@ -42,13 +42,14 @@ export class HeaderDemoAPIClient {
42
42
  ): {
43
43
  response: Response
44
44
  data: GetExampleGet200
45
+ operationId: string
45
46
  } {
46
- const url = new URL(this.cleanBaseUrl + `/example-get`)
47
+ const k6url = new URL(this.cleanBaseUrl + `/example-get`)
47
48
  const mergedRequestParameters = this._mergeRequestParameters(
48
49
  requestParameters || {},
49
50
  this.commonRequestParameters
50
51
  )
51
- const response = http.request('GET', url.toString(), undefined, {
52
+ const response = http.request('GET', k6url.toString(), undefined, {
52
53
  ...mergedRequestParameters,
53
54
  headers: {
54
55
  ...mergedRequestParameters?.headers,
@@ -71,6 +72,7 @@ export class HeaderDemoAPIClient {
71
72
  return {
72
73
  response,
73
74
  data,
75
+ operationId: 'GetExampleGet',
74
76
  }
75
77
  }
76
78
 
@@ -85,15 +87,16 @@ export class HeaderDemoAPIClient {
85
87
  ): {
86
88
  response: Response
87
89
  data: void
90
+ operationId: string
88
91
  } {
89
- const url = new URL(this.cleanBaseUrl + `/example-post`)
92
+ const k6url = new URL(this.cleanBaseUrl + `/example-post`)
90
93
  const mergedRequestParameters = this._mergeRequestParameters(
91
94
  requestParameters || {},
92
95
  this.commonRequestParameters
93
96
  )
94
97
  const response = http.request(
95
98
  'POST',
96
- url.toString(),
99
+ k6url.toString(),
97
100
  JSON.stringify(postExamplePostBody),
98
101
  {
99
102
  ...mergedRequestParameters,
@@ -120,6 +123,7 @@ export class HeaderDemoAPIClient {
120
123
  return {
121
124
  response,
122
125
  data,
126
+ operationId: 'PostExamplePost',
123
127
  }
124
128
  }
125
129
 
@@ -130,15 +134,16 @@ export class HeaderDemoAPIClient {
130
134
  getExampleResponseHeaders(requestParameters?: Params): {
131
135
  response: Response
132
136
  data: GetExampleResponseHeaders200
137
+ operationId: string
133
138
  } {
134
- const url = new URL(this.cleanBaseUrl + `/example-response-headers`)
139
+ const k6url = new URL(this.cleanBaseUrl + `/example-response-headers`)
135
140
  const mergedRequestParameters = this._mergeRequestParameters(
136
141
  requestParameters || {},
137
142
  this.commonRequestParameters
138
143
  )
139
144
  const response = http.request(
140
145
  'GET',
141
- url.toString(),
146
+ k6url.toString(),
142
147
  undefined,
143
148
  mergedRequestParameters
144
149
  )
@@ -152,6 +157,7 @@ export class HeaderDemoAPIClient {
152
157
  return {
153
158
  response,
154
159
  data,
160
+ operationId: 'GetExampleResponseHeaders',
155
161
  }
156
162
  }
157
163
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
@@ -42,13 +42,14 @@ export class DefaultClient {
42
42
  ): {
43
43
  response: Response
44
44
  data: GetExampleGet200
45
+ operationId: string
45
46
  } {
46
- const url = new URL(this.cleanBaseUrl + `/example-get`)
47
+ const k6url = new URL(this.cleanBaseUrl + `/example-get`)
47
48
  const mergedRequestParameters = this._mergeRequestParameters(
48
49
  requestParameters || {},
49
50
  this.commonRequestParameters
50
51
  )
51
- const response = http.request('GET', url.toString(), undefined, {
52
+ const response = http.request('GET', k6url.toString(), undefined, {
52
53
  ...mergedRequestParameters,
53
54
  headers: {
54
55
  ...mergedRequestParameters?.headers,
@@ -71,6 +72,7 @@ export class DefaultClient {
71
72
  return {
72
73
  response,
73
74
  data,
75
+ operationId: 'GetExampleGet',
74
76
  }
75
77
  }
76
78
  /**
@@ -84,15 +86,16 @@ export class DefaultClient {
84
86
  ): {
85
87
  response: Response
86
88
  data: void
89
+ operationId: string
87
90
  } {
88
- const url = new URL(this.cleanBaseUrl + `/example-post`)
91
+ const k6url = new URL(this.cleanBaseUrl + `/example-post`)
89
92
  const mergedRequestParameters = this._mergeRequestParameters(
90
93
  requestParameters || {},
91
94
  this.commonRequestParameters
92
95
  )
93
96
  const response = http.request(
94
97
  'POST',
95
- url.toString(),
98
+ k6url.toString(),
96
99
  JSON.stringify(postExamplePostBody),
97
100
  {
98
101
  ...mergedRequestParameters,
@@ -119,6 +122,7 @@ export class DefaultClient {
119
122
  return {
120
123
  response,
121
124
  data,
125
+ operationId: 'PostExamplePost',
122
126
  }
123
127
  }
124
128
  /**
@@ -128,15 +132,16 @@ export class DefaultClient {
128
132
  getExampleResponseHeaders(requestParameters?: Params): {
129
133
  response: Response
130
134
  data: GetExampleResponseHeaders200
135
+ operationId: string
131
136
  } {
132
- const url = new URL(this.cleanBaseUrl + `/example-response-headers`)
137
+ const k6url = new URL(this.cleanBaseUrl + `/example-response-headers`)
133
138
  const mergedRequestParameters = this._mergeRequestParameters(
134
139
  requestParameters || {},
135
140
  this.commonRequestParameters
136
141
  )
137
142
  const response = http.request(
138
143
  'GET',
139
- url.toString(),
144
+ k6url.toString(),
140
145
  undefined,
141
146
  mergedRequestParameters
142
147
  )
@@ -150,6 +155,7 @@ export class DefaultClient {
150
155
  return {
151
156
  response,
152
157
  data,
158
+ operationId: 'GetExampleResponseHeaders',
153
159
  }
154
160
  }
155
161
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * K6Client
5
5
  * Service version: 1.0.0
@@ -33,15 +33,16 @@ export class K6ClientClient {
33
33
  getExample(requestParameters?: Params): {
34
34
  response: Response
35
35
  data: GetExample200
36
+ operationId: string
36
37
  } {
37
- const url = new URL(this.cleanBaseUrl + `/example`)
38
+ const k6url = new URL(this.cleanBaseUrl + `/example`)
38
39
  const mergedRequestParameters = this._mergeRequestParameters(
39
40
  requestParameters || {},
40
41
  this.commonRequestParameters
41
42
  )
42
43
  const response = http.request(
43
44
  'GET',
44
- url.toString(),
45
+ k6url.toString(),
45
46
  undefined,
46
47
  mergedRequestParameters
47
48
  )
@@ -55,6 +56,7 @@ export class K6ClientClient {
55
56
  return {
56
57
  response,
57
58
  data,
59
+ operationId: 'GetExample',
58
60
  }
59
61
  }
60
62
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Automatically generated by @grafana/openapi-to-k6: 0.3.2
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.4.1
3
3
  * Do not edit manually.
4
4
  * K6Client
5
5
  * Service version: 1.0.0