grafana / k6-vscode-extension

Brings k6 to your favorite IDE!
https://marketplace.visualstudio.com/items?itemName=k6.k6
Apache License 2.0
13 stars 3 forks source link

Enriching the k6-vscode-extension with OpenAPI Generation #18

Open Yeshwanth-Athmakuri opened 1 month ago

Yeshwanth-Athmakuri commented 1 month ago

Dear k6-vscode-extension open source community,

Currently, our extension supports only a few commands, such as "k6 run currentfile" and "k6 run currentfile in k6 cloud."

However, we believe that enriching this extension to include an OpenAPI generator would be highly beneficial.

Specifically, we are looking to create a new Visual Studio Code command that allows users to convert an OpenAPI YAML file into a k6 script seamlessly. Your thoughts and any leads on how we can achieve this enhancement would be greatly appreciated.

Thank you for your support and collaboration.

Best regards, Yeshwanth

Yeshwanth-Athmakuri commented 1 month ago

Dear k6-vscode-extension open source community, I

'm currently working on the requirement mentioned above. Could I please proceed with it, or is someone else already assigned to this task? Any leads or information would greatly assist me in moving forward smoothly.

ppcano commented 1 month ago

Hi Yeshwanth!

Thanks for participating in this project.

Have you seen the k6-openapi-generator project? The project converts OpenAPI specs to k6 scripts, however it is not integrated in VSCode.

We have recently discussed improving this tool. But I am unsure if we want to pursue a VSCode integration.

Yeshwanth-Athmakuri commented 1 month ago

Dear Pepe Cano,

I would like to enhance this repository by incorporating the attached code. This code utilizes the OpenAPI Generator to convert OpenAPI YAML into a K6 script, enabling developers to execute a simple command directly within Visual Studio Code.

If this aligns with the project's goals, I can proceed to raise a pull request accordingly.

Best regards, Yeshwanth

tsconfig.json

Screenshot 2024-05-10 at 6 03 29 PM
ppcano commented 1 month ago

I chat with the team about this and it seems the openapi-generator k6 does not currently cover the entire OpenAPI specification.

Given that, I think it is not desired to integrate it within the k6 VSCode extension in its current state. IMO, I'd be better to dedicate the efforts to improve the openapi-generator k6 command.

cc @markjmeier

Yeshwanth-Athmakuri commented 1 month ago

if you could provide a reference document or GitHub repository that outlines the possibilities and limitations of OpenAPI-Generator K6. This information would greatly enhance our understanding and enable us to contribute more effectively towards improving OpenAPI-Generator K6.

Your assistance in this matter would be highly appreciated.

Thank you for your time and consideration.

Best regards, Yeshwanth