Publish API doc model as pipeline artifact; extract shared api-extractor.json config into rigs#5663
Merged
Publish API doc model as pipeline artifact; extract shared api-extractor.json config into rigs#5663
Conversation
08cf9ec to
45a3a95
Compare
Move the shared api-extractor.json configuration (mainEntryPointFilePath, apiReport, docModel, dtsRollup) into base configs in local-node-rig, decoupled-local-node-rig, and local-web-rig. Each project's config now uses 'extends' to inherit from its rig, with only project-specific overrides remaining.
Change apiJsonFilePath from the shared common/temp/api/ directory to per-project <projectFolder>/temp/api/ folders. Add temp/api to the build phase outputFolderNames in all three rig rush-project.json configs so the API JSON files are included in the Rush build cache.
Rename CollectJsonSchemasAction to CollectProjectFilesAction and add a --subfolder parameter so the same action can collect files from any per-project subfolder. Update post-publish.yaml and ci.yml to use 'collect-project-files --subfolder temp/json-schemas' for JSON schemas and 'collect-project-files --subfolder temp/api' for API review files, replacing the previous bash cp command.
d59fb25 to
89990ba
Compare
octogonz
approved these changes
Feb 22, 2026
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 makes API Extractor
.api.jsondoc model files available as pipeline artifacts and reduces config duplication across 55 projects.Changes
1. Publish API artifact from pipelines
Add a post-publish step to the AzDO
npm-publishandnpm-publish-rushpipelines that collects.api.jsonfiles and publishes them as a build artifact.2. Extract shared api-extractor.json into rig configs
Create
api-extractor-base.jsoninlocal-node-rig,decoupled-local-node-rig, andlocal-web-rigcontaining the common settings (mainEntryPointFilePath,apiReport,docModel,dtsRollup). Each project'sapi-extractor.jsonnow usesextendsto inherit from its rig, keeping only project-specific overrides. This eliminates ~950 lines of duplicated config.The file is named
api-extractor-base.json(notapi-extractor.json) to avoid unintentional auto-discovery by Heft's rig resolution for projects that don't use API Extractor.3. Move docModel output to per-project
temp/api/Change
apiJsonFilePathfrom the sharedcommon/temp/api/directory to per-project<projectFolder>/temp/api/folders. This is already covered by the upstream rig'soutputFolderNames(which includestemp), so the files participate in the Rush build cache automatically.4. Refactor
collect-json-schemasinto genericcollect-project-filesRename
CollectJsonSchemasActiontoCollectProjectFilesActionand add a--subfolderparameter so it can collect files from any per-project subfolder. Updatepost-publish.yamlandci.ymlto use the new action for both JSON schemas and API doc model files.Stats