fix(docs): always emit single top-level docs.json#202
Merged
Conversation
- Emit only gen/docs.json regardless of number of roots - Preserve JSON tag transforms and inlining across multi-package builds - Merge services and definitions across roots deterministically - Remove per-API service-scoped path emission - Update tests to expect a single file Rationale: Goa designs have a single API; per-API path caused confusion and inconsistent consumer behavior. This change standardizes the output location and resolves inlining discrepancies observed in multi-package designs (e.g., Aura).
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.
This PR standardizes the docs plugin output and resolves $ref inlining inconsistencies in multi‑package designs.
Summary
gen/docs.jsonregardless of number of roots$refinlining across multi‑package buildsgen/http/<API>/docs.jsonemissionRationale
Goa designs declare a single API. Emitting per‑API docs under
gen/http/<API>/docs.jsoncreated path inconsistency and consumer confusion. It also made$refinlining appear unreliable when scripts consumed the legacygen/docs.json. This change restores the expected single top‑level output and keeps inlining behavior correct by scoping OpenAPI definitions per root during aggregation.Notes
docs.json; no changes needed.gen/docs.jsonproduced with zero$refoccurrences