@grafana/openapi-to-k6 0.2.3 → 0.2.4
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.
- package/dist/generator/index.js +1 -1
- package/examples/basic_schema/single/simpleAPI.ts +2 -2
- package/examples/basic_schema/split/simpleAPI.schemas.ts +2 -2
- package/examples/basic_schema/split/simpleAPI.ts +2 -2
- package/examples/basic_schema/tags/default.ts +2 -2
- package/examples/basic_schema/tags/simpleAPI.schemas.ts +2 -2
- package/examples/form_data_schema/single/formDataAPI.ts +2 -2
- package/examples/form_data_schema/split/formDataAPI.schemas.ts +2 -2
- package/examples/form_data_schema/split/formDataAPI.ts +2 -2
- package/examples/form_data_schema/tags/default.ts +2 -2
- package/examples/form_data_schema/tags/formDataAPI.schemas.ts +2 -2
- package/examples/form_url_encoded_data_schema/single/formURLEncodedAPI.ts +2 -2
- package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.schemas.ts +2 -2
- package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.ts +2 -2
- package/examples/form_url_encoded_data_schema/tags/default.ts +2 -2
- package/examples/form_url_encoded_data_schema/tags/formURLEncodedAPI.schemas.ts +2 -2
- package/examples/form_url_encoded_data_with_query_params_schema/single/formURLEncodedAPIWithQueryParameters.ts +2 -2
- package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.schemas.ts +2 -2
- package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.ts +2 -2
- package/examples/form_url_encoded_data_with_query_params_schema/tags/default.ts +2 -2
- package/examples/form_url_encoded_data_with_query_params_schema/tags/formURLEncodedAPIWithQueryParameters.schemas.ts +2 -2
- package/examples/get_request_with_path_parameters_schema/single/simpleAPI.ts +2 -2
- package/examples/get_request_with_path_parameters_schema/split/simpleAPI.schemas.ts +2 -2
- package/examples/get_request_with_path_parameters_schema/split/simpleAPI.ts +2 -2
- package/examples/get_request_with_path_parameters_schema/tags/default.ts +2 -2
- package/examples/get_request_with_path_parameters_schema/tags/simpleAPI.schemas.ts +2 -2
- package/examples/headers_schema/single/headerDemoAPI.ts +2 -2
- package/examples/headers_schema/split/headerDemoAPI.schemas.ts +2 -2
- package/examples/headers_schema/split/headerDemoAPI.ts +2 -2
- package/examples/headers_schema/tags/default.ts +2 -2
- package/examples/headers_schema/tags/headerDemoAPI.schemas.ts +2 -2
- package/examples/no_title_schema/single/k6Client.ts +2 -2
- package/examples/no_title_schema/split/k6Client.schemas.ts +2 -2
- package/examples/no_title_schema/split/k6Client.ts +2 -2
- package/examples/no_title_schema/tags/default.ts +2 -2
- package/examples/no_title_schema/tags/k6Client.schemas.ts +2 -2
- package/examples/post_request_with_query_params/single/exampleAPI.ts +2 -2
- package/examples/post_request_with_query_params/split/exampleAPI.schemas.ts +2 -2
- package/examples/post_request_with_query_params/split/exampleAPI.ts +2 -2
- package/examples/post_request_with_query_params/tags/default.ts +2 -2
- package/examples/post_request_with_query_params/tags/exampleAPI.schemas.ts +2 -2
- package/examples/query_params_schema/single/exampleAPI.ts +2 -2
- package/examples/query_params_schema/split/exampleAPI.schemas.ts +2 -2
- package/examples/query_params_schema/split/exampleAPI.ts +2 -2
- package/examples/query_params_schema/tags/default.ts +2 -2
- package/examples/query_params_schema/tags/exampleAPI.schemas.ts +2 -2
- package/examples/simple_post_request_schema/single/exampleAPI.ts +2 -2
- package/examples/simple_post_request_schema/split/exampleAPI.schemas.ts +2 -2
- package/examples/simple_post_request_schema/split/exampleAPI.ts +2 -2
- package/examples/simple_post_request_schema/tags/default.ts +2 -2
- package/examples/simple_post_request_schema/tags/exampleAPI.schemas.ts +2 -2
- package/package.json +1 -1
- package/src/generator/index.ts +1 -1
- package/tests/functional-tests/generator.test.ts +1 -1
package/dist/generator/index.js
CHANGED
|
@@ -27,7 +27,7 @@ const generatedFileHeaderGenerator = (info) => {
|
|
|
27
27
|
`Do not edit manually.`,
|
|
28
28
|
...(info.title ? [info.title] : []),
|
|
29
29
|
...(info.description ? [info.description] : []),
|
|
30
|
-
...(info.version ? [`
|
|
30
|
+
...(info.version ? [`Service version: ${info.version}`] : []),
|
|
31
31
|
];
|
|
32
32
|
};
|
|
33
33
|
const afterAllFilesWriteHandler = (filePaths) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type GetExample200 = {
|
|
8
8
|
message?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type GetExample200 = {
|
|
8
8
|
message?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form Data API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js'
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form Data API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostUpload400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form Data API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js'
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form Data API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { FormData } from 'https://jslib.k6.io/formdata/0.0.2/index.js'
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form Data API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostUpload400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostSubmitForm400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostSubmitForm400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API with Query Parameters
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API with Query Parameters
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostSubmitForm400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API with Query Parameters
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API with Query Parameters
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Form URL Encoded API with Query Parameters
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type PostSubmitForm400 = {
|
|
8
8
|
error?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
5
|
* An API with a single GET request that takes a path parameter
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
5
|
* An API with a single GET request that takes a path parameter
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetItemById200 = {
|
|
9
9
|
description?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
5
|
* An API with a single GET request that takes a path parameter
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
5
|
* An API with a single GET request that takes a path parameter
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Simple API
|
|
5
5
|
* An API with a single GET request that takes a path parameter
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetItemById200 = {
|
|
9
9
|
description?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Header Demo API
|
|
5
5
|
* An API demonstrating the use of headers in different ways
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Header Demo API
|
|
5
5
|
* An API demonstrating the use of headers in different ways
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetExampleResponseHeaders200 = {
|
|
9
9
|
status?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Header Demo API
|
|
5
5
|
* An API demonstrating the use of headers in different ways
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Header Demo API
|
|
5
5
|
* An API demonstrating the use of headers in different ways
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Header Demo API
|
|
5
5
|
* An API demonstrating the use of headers in different ways
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetExampleResponseHeaders200 = {
|
|
9
9
|
status?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* K6Client
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* K6Client
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type GetExample200 = {
|
|
8
8
|
message?: string
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* K6Client
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* K6Client
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
8
8
|
import http from 'k6/http'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* K6Client
|
|
5
|
-
*
|
|
5
|
+
* Service version: 1.0.0
|
|
6
6
|
*/
|
|
7
7
|
export type GetExample200 = {
|
|
8
8
|
message?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with a POST request having an object as the body and query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with a POST request having an object as the body and query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type CreateExampleData201 = {
|
|
9
9
|
/** The data from the body */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with a POST request having an object as the body and query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with a POST request having an object as the body and query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with a POST request having an object as the body and query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type CreateExampleData201 = {
|
|
9
9
|
/** The data from the body */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetExampleData200 = {
|
|
9
9
|
age?: number
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL, URLSearchParams } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of query parameters
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type GetExampleData200 = {
|
|
9
9
|
age?: number
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of data in the POST request body
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of data in the POST request body
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type CreateExampleData201Meta = {
|
|
9
9
|
createdBy?: string
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of data in the POST request body
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of data in the POST request body
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
import { URL } from 'https://jslib.k6.io/url/1.0.0/index.js'
|
|
9
9
|
import http from 'k6/http'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Automatically generated by @grafana/openapi-to-k6: 0.2.
|
|
2
|
+
* Automatically generated by @grafana/openapi-to-k6: 0.2.4
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
* Example API
|
|
5
5
|
* API with all formats of data in the POST request body
|
|
6
|
-
*
|
|
6
|
+
* Service version: 1.0.0
|
|
7
7
|
*/
|
|
8
8
|
export type CreateExampleData201Meta = {
|
|
9
9
|
createdBy?: string
|
package/package.json
CHANGED
package/src/generator/index.ts
CHANGED
|
@@ -21,7 +21,7 @@ const generatedFileHeaderGenerator = (info: InfoObject) => {
|
|
|
21
21
|
`Do not edit manually.`,
|
|
22
22
|
...(info.title ? [info.title] : []),
|
|
23
23
|
...(info.description ? [info.description] : []),
|
|
24
|
-
...(info.version ? [`
|
|
24
|
+
...(info.version ? [`Service version: ${info.version}`] : []),
|
|
25
25
|
]
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -30,7 +30,7 @@ const loadFixture = (filename: string) => {
|
|
|
30
30
|
const commonSubstringsForAllSDK = [
|
|
31
31
|
'Automatically generated by',
|
|
32
32
|
'Do not edit manually',
|
|
33
|
-
'
|
|
33
|
+
'Service version',
|
|
34
34
|
'const mergedRequestParameters = this._mergeRequestParameters( requestParameters || {}, this.commonRequestParameters, );',
|
|
35
35
|
'try { data = response.json(); } catch { data = response.body; }',
|
|
36
36
|
'return { response, data, };',
|