Repository navigation
feat(openapi): complete importer with query params, $ref bodies and form support - #148
Merged
Merged
Conversation
Member
Author
|
/prudence |
…orm support - Added support for path-level global parameters. - Implemented query parameters extraction and URL appending. - Added recursive $ref resolution for OAS3 requestBody objects. - Implemented support for application/x-www-form-urlencoded and multipart/form-data. - Added primitive fallback values (string, integer, boolean) when examples are missing. - Enhanced petstore_openapi.yaml with a comprehensive set of test cases. - Updated unit tests to verify headers, query params, and complex body structures.
matstech
marked this pull request as ready for review
May 9, 2026 13:44
…port
- Added support for Bruno query { ... } blocks.
- Implemented support for body:form-urlencoded and body:multipart-form.
- Refactored form formatting utilities to a shared internal/importer/utils.go file.
- Added new .bru test files and updated unit tests.
- Updated OpenAPI importer to use {{fieldName}} as fallback for missing examples.
- Standardized binary file placeholder to [BINARY_FILE_CONTENT] across all importers.
- Ensured deterministic output by sorting keys in query strings and multipart bodies.
- Updated all unit tests to reflect new placeholder logic and deterministic ordering.
matstech
force-pushed
the
fix/openapi_importer
branch
from
May 9, 2026 21:21
dc9fd04 to
5ed5775
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary 💡
This PR significantly enhances the OpenAPI/Swagger importer, making it "feature-complete" for standard API specifications. It adds support for query parameters, global path parameters, recursive request body resolution, and various form data types.
Description 📝
The OpenAPI importer has been overhauled to handle complex real-world specifications that were previously resulting in incomplete requests or empty bodies.
Key changes:
$refpointers withindefinitions(Swagger 2.0) andcomponents/schemas(OpenAPI 3.x).$refat therequestBodylevel (OAS 3.x)."string",0,false) when no examples or defaults are provided in the spec, ensuring non-empty, typed bodies.application/x-www-form-urlencoded.multipart/form-datawith automatic boundary generation (for textual fields).Tests performed 🧪
testdata/petstore_openapi.yamlto include a full suite of test cases (global headers, query params,$refbodies, and form data).internal/importerpackage.