domains / cloud-infra / Azure/azure-powershell
Pinned Spec Configuration
When configuration files drive code generation (e.g., AutoRest README YAML), pin the exact spec snapshot and use the correct configuration semantics.
When configuration files drive code generation (e.g., AutoRest README YAML), pin the exact spec snapshot and use the correct configuration semantics.
Standard
- Pin spec inputs: use a git commit SHA or an explicit spec tag; avoid branch-ambiguous references.
- Respect field meaning:
module-versionis generation metadata (do not treat it as the shipped package version). Usetag(or equivalent) to select the underlying spec set. - Follow
input-fileURL/path conventions: theinput-fileentries must use the expected base path/template so generation pulls the intended files.
Example (canonical pattern)
require:
- $(this-folder)/../../readme.azure.noprofile.md
# Use a spec tag to select the spec content snapshot
# (module-version is generation metadata, not the shipped module version)
tag: package-2026-03-01-preview
module-version: 1.1.0
input-file:
- https://github.com/Azure/azure-rest-api-specs/blob/$(commit)/specification/apimanagement/resource-manager/Microsoft.ApiManagement/ApiManagement/stable/2022-08-01/apimanagement.json
Apply this rule to any AutoRest/config-driven SDK generation changes to keep outputs reproducible and prevent accidental mismatches between generation metadata and released artifacts.