@grafana/openapi-to-k6 0.2.3 → 0.2.5

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 (55) hide show
  1. package/README.md +1 -1
  2. package/dist/generator/index.js +1 -1
  3. package/examples/basic_schema/single/simpleAPI.ts +2 -2
  4. package/examples/basic_schema/split/simpleAPI.schemas.ts +2 -2
  5. package/examples/basic_schema/split/simpleAPI.ts +2 -2
  6. package/examples/basic_schema/tags/default.ts +2 -2
  7. package/examples/basic_schema/tags/simpleAPI.schemas.ts +2 -2
  8. package/examples/form_data_schema/single/formDataAPI.ts +2 -2
  9. package/examples/form_data_schema/split/formDataAPI.schemas.ts +2 -2
  10. package/examples/form_data_schema/split/formDataAPI.ts +2 -2
  11. package/examples/form_data_schema/tags/default.ts +2 -2
  12. package/examples/form_data_schema/tags/formDataAPI.schemas.ts +2 -2
  13. package/examples/form_url_encoded_data_schema/single/formURLEncodedAPI.ts +2 -2
  14. package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.schemas.ts +2 -2
  15. package/examples/form_url_encoded_data_schema/split/formURLEncodedAPI.ts +2 -2
  16. package/examples/form_url_encoded_data_schema/tags/default.ts +2 -2
  17. package/examples/form_url_encoded_data_schema/tags/formURLEncodedAPI.schemas.ts +2 -2
  18. package/examples/form_url_encoded_data_with_query_params_schema/single/formURLEncodedAPIWithQueryParameters.ts +2 -2
  19. package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.schemas.ts +2 -2
  20. package/examples/form_url_encoded_data_with_query_params_schema/split/formURLEncodedAPIWithQueryParameters.ts +2 -2
  21. package/examples/form_url_encoded_data_with_query_params_schema/tags/default.ts +2 -2
  22. package/examples/form_url_encoded_data_with_query_params_schema/tags/formURLEncodedAPIWithQueryParameters.schemas.ts +2 -2
  23. package/examples/get_request_with_path_parameters_schema/single/simpleAPI.ts +2 -2
  24. package/examples/get_request_with_path_parameters_schema/split/simpleAPI.schemas.ts +2 -2
  25. package/examples/get_request_with_path_parameters_schema/split/simpleAPI.ts +2 -2
  26. package/examples/get_request_with_path_parameters_schema/tags/default.ts +2 -2
  27. package/examples/get_request_with_path_parameters_schema/tags/simpleAPI.schemas.ts +2 -2
  28. package/examples/headers_schema/single/headerDemoAPI.ts +2 -2
  29. package/examples/headers_schema/split/headerDemoAPI.schemas.ts +2 -2
  30. package/examples/headers_schema/split/headerDemoAPI.ts +2 -2
  31. package/examples/headers_schema/tags/default.ts +2 -2
  32. package/examples/headers_schema/tags/headerDemoAPI.schemas.ts +2 -2
  33. package/examples/no_title_schema/single/k6Client.ts +2 -2
  34. package/examples/no_title_schema/split/k6Client.schemas.ts +2 -2
  35. package/examples/no_title_schema/split/k6Client.ts +2 -2
  36. package/examples/no_title_schema/tags/default.ts +2 -2
  37. package/examples/no_title_schema/tags/k6Client.schemas.ts +2 -2
  38. package/examples/post_request_with_query_params/single/exampleAPI.ts +2 -2
  39. package/examples/post_request_with_query_params/split/exampleAPI.schemas.ts +2 -2
  40. package/examples/post_request_with_query_params/split/exampleAPI.ts +2 -2
  41. package/examples/post_request_with_query_params/tags/default.ts +2 -2
  42. package/examples/post_request_with_query_params/tags/exampleAPI.schemas.ts +2 -2
  43. package/examples/query_params_schema/single/exampleAPI.ts +2 -2
  44. package/examples/query_params_schema/split/exampleAPI.schemas.ts +2 -2
  45. package/examples/query_params_schema/split/exampleAPI.ts +2 -2
  46. package/examples/query_params_schema/tags/default.ts +2 -2
  47. package/examples/query_params_schema/tags/exampleAPI.schemas.ts +2 -2
  48. package/examples/simple_post_request_schema/single/exampleAPI.ts +2 -2
  49. package/examples/simple_post_request_schema/split/exampleAPI.schemas.ts +2 -2
  50. package/examples/simple_post_request_schema/split/exampleAPI.ts +2 -2
  51. package/examples/simple_post_request_schema/tags/default.ts +2 -2
  52. package/examples/simple_post_request_schema/tags/exampleAPI.schemas.ts +2 -2
  53. package/package.json +3 -2
  54. package/src/generator/index.ts +1 -1
  55. package/tests/functional-tests/generator.test.ts +1 -1
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  <div align="center">
2
2
 
3
3
  <img
4
- src="./images/openapi-to-k6.png"
4
+ src="https://raw.githubusercontent.com/grafana/openapi-to-k6/main/images/openapi-to-k6.png"
5
5
  width="600"
6
6
  style="pointer-events: none;" />
7
7
  <br />
@@ -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 ? [`OpenAPI spec version: ${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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Simple API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Simple API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Simple API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Simple API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Simple API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form Data API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form Data API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form Data API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form Data API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form Data API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Form URL Encoded API with Query Parameters
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Header Demo API
5
5
  * An API demonstrating the use of headers in different ways
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * K6Client
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * K6Client
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * K6Client
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * K6Client
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * K6Client
5
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
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
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of query parameters
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of query parameters
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of query parameters
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of query parameters
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of query parameters
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of data in the POST request body
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of data in the POST request body
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of data in the POST request body
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of data in the POST request body
6
- * OpenAPI spec version: 1.0.0
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.3
2
+ * Automatically generated by @grafana/openapi-to-k6: 0.2.5
3
3
  * Do not edit manually.
4
4
  * Example API
5
5
  * API with all formats of data in the POST request body
6
- * OpenAPI spec version: 1.0.0
6
+ * Service version: 1.0.0
7
7
  */
8
8
  export type CreateExampleData201Meta = {
9
9
  createdBy?: string
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/openapi-to-k6",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "A CLI tool to generate helper modules for K6 from OpenAPI schema",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -16,7 +16,8 @@
16
16
  "update-examples": "for dir in ./examples/*/; do (npm run dev -- \"$dir/schema.json\" \"$dir/single/\" -m single --include-sample-script && npm run dev -- \"$dir/schema.json\" \"$dir/split/\" -m split --include-sample-script && npm run dev -- \"$dir/schema.json\" \"$dir/tags/\" -m tags --include-sample-script); done",
17
17
  "prepare": "husky"
18
18
  },
19
- "author": "",
19
+ "author": "Grafana Labs",
20
+ "repository": "http://github.com/grafana/openapi-to-k6",
20
21
  "license": "AGPL-3.0",
21
22
  "dependencies": {
22
23
  "@types/k6": "^0.54.0",
@@ -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 ? [`OpenAPI spec version: ${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
- 'OpenAPI spec version',
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, };',