Open
Description
Examples
New Spec: #34050
Existing Spec: #34049
Another Spec: #34537
Policy
- All new TSP specs (totally new services, initial conversions to TSP) must use folder structure v2
- Existing TSP specs are allowed to use folder structure v1 in main/RPSaaSMaster. However, they will be required to upgrade to folder structure v2 in their next PR.
A. The error will include a link to a document explaining how spec authors should migrate to v2. - The scoping will be the top-level folder under "specification". So, all of "specification/contosowidgetmanager" must use either v1 or v2, they cannot be mixed in sub-folders.
- There will be no dedicated exception mechanism for the requirement to upgrade to v2. However, EngSys can always merge PRs with checks failing as our "break-glass" solution.
Implementation
- TSV will internally support both v1 and v2.
- By default, TSV requires v2.
- Specs can opt-in to v1 (only during TypeSpecValidation-All) using the existing suppressions mechanism to "suppress" v2
- When run as part of "TypeSpecValidation - All", the suppressions are honored.
- When run as part of PR validation, or by running TSV locally on your dev machine, the suppression is "ignored", and v2 is required regardless.
The suppression would look something like this:
specification/contosowidgetmanager/suppressions.yaml
- tool: TypeSpecValidationAll
rules: [FolderStructure]
sub-rules: [FolderStructureV2]
reason: Existing spec using folder structure v1
paths:
- Contoso.WidgetManager
- Contoso.Management
When the spec is converted to v2, the suppression must also be removed, otherwise the check will fail in the opposite direction (expected structure v1, actual structure v2).
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🐝 Dev