Repository navigation
Web playground (WASM) and merge correctness fixes - #12
Merged
Merged
Conversation
- respect output.format from config in the CLI (-f still overrides)
- emit components in a stable order
- never overwrite an existing component when renaming (b_2_Pet)
- merge paths/webhooks per operation; identical definitions are shared
- sanitise source names used in paths/component names; URL sources default to host
- merge webhooks and top-level security; keep components.pathItems and extensions
- warn when sources mix OpenAPI minor versions (aggregate_with_report)
- reject unknown config keys and ambiguous sources with clear errors
- expand ${VAR} in HTTP source url and headers
- load sources concurrently with a shared HTTP client
… discriminator renames
- push a source's top-level security down to its operations when sources disagree
- rename security requirement keys and discriminator.mapping values with their components
- keep ${VAR} values out of HTTP error messages
…e edits - configs opened from a share link don't fetch URL sources until the user allows it - error messages show URL templates, never substituted variable values - New file and Rename no longer overwrite or shadow an existing file - the API reference shows the latest spec after its first load and retries a failed load
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.
Adds a browser playground for openapi-aggregator, hosted on GitHub Pages. It runs the same merge engine as the CLI, compiled to WebAssembly. The PR also fixes several merge-correctness issues in the CLI and library.
Merge and CLI fixes
output.formatfrom the config.-fstill overrides it.GET /usersfrom one source andPOST /usersfrom another now merge into one path instead of conflicting.b_2_Petis used whenb_Petis taken). Security-requirement keys anddiscriminator.mappingvalues are now updated along with$refs.securitystays top-level only when every source declares the same requirements. Otherwise each source's requirements are copied onto its own operations, so no operation gains or loses authentication.webhooksmerge like paths, andcomponents.pathItemsis kept.nameis named after its host.pathorurl, andheadersis only allowed on URL sources.${VAR}in a URL source'surland header values is read from the environment. Expanded values never appear in error messages.Cargo.lock, and release notes are passed throughenv:instead of being pasted into the shell.Workspace split
crates/openapi-aggregator-corewasm32-unknown-unknown.crates/openapi-aggregatoropenapi_aggregator::*paths keep working.crates/openapi-aggregator-wasmwasm-bindgenwrapper exposingparseConfigandaggregate.Web playground (
web/)The app is plain TypeScript built with Vite.
Breaking changes
These need a changelog note for 0.7.0.
openapi_aggregator::Error: theParse,InvalidSpec,MergeConflict,ConfigandNoSourcesvariants now sit behindError::Core(..). Display messages are unchanged.${...}in a URL or header with no matching environment variable, now fail instead of being silently accepted.conflict_strategy: errormay now merge cleanly.Testing
cargo test --all-features). Clippy and fmt are clean..wasmbuild. 4 Playwright end-to-end tests, including one that checks a shared config makes no request before consent.Before merging
pages.ymlcan't deploy.Known follow-ups (not in this PR)
$refchains (about 1 s at depth 1,000).tag_prefix: source_nameis set.rename, a moved path can duplicate anoperationId. This already happened onmain.pagesandid-tokenpermissions too; move them to the deploy job. Pages also deploys even if CI fails.?url=drops the target URL's own query string; the target URL should be encoded.version.