-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Importing Requests from OpenAPI Specification file #121
Comments
Update: The frontend is already implemented. |
OPENAPI specification document contains multiple endpoints and these endpoints branched into folders based on tags and into sub-folders based on /paths |
@sajid-31 You can use this package to parse the OpenAPI spec file - https://pub.dev/packages/openapi_spec |
There is no documentation for openapi_spec. I'm not sure how to implement using this package. |
Query parameters can be added directly to the request model for each request endpoint. |
@sajid-31 There is no need to create a new environment. You can add path parameters enclosed as |
@ashitaprasad , I will work on this just few question for clarification, and my approach being by adding OpenAPI to our ImportFormat enum and building a parser with the openapi_spec package. Where I will extract endpoints, parameters, and examples from JSON/YAML specifications, then let users select which endpoints they want to add to their API Dash collection. I'll convert selected endpoints to RequestModel objects, handling path parameters, query parameters, and headers appropriately.
I'd like to know if anyone has previously started work on this feature or if I need to build it from scratch, As as you mentioned UI is completed for these right? |
@ashitaprasad, I successfully set up the application locally and explored it. If you can answer my query, I can kickstart the issue. Also, while using the application, I noticed how it allows importing from a Postman collection. Similarly, in the same kind of UI, we would need to add OpenAPI specs, right, to conclude? |
@akshayw1 Figuring out answers to these questions are part of the task. |
@ashitaprasad, I have everything figured out and can start now. I asked for confirmation earlier, but no worries—I’ll implement the integration similar to what we have for Postman and Insomnia, but for OpenAPI. |
@ashitaprasad I have completed work on the issue. Now, I can import OpenAPI JSON or YAML files, select/delete items via a dialog, and import them into the side panel. Below is the demo video of implementation—please review it, and if everything looks good, I'll proceed with the PR. Screen.Recording.2025-03-03.at.8.42.30.PM.mp4 |
@akshayw1 You can send across a draft PR. |
Okay will do , Just wanted to confirm the flow seems correct right? Will make PR in morning |
@ashitaprasad I would appreciate it if you could review the PR. If there are any issues, please let me know, and I'll be happy to address them promptly. It's been open for over 48 hours now. |
Tell us about the task you want to perform and are unable to do so because the feature is not available
Add support for importing requests from the json or yaml files in OpenAPI 3 and Swagger 2 data formats. The developed code should be able to parse the data & examples provided in the specs, let user choose the requests he wants to add to the API Dash collection and create the corresponding request items.
The text was updated successfully, but these errors were encountered: