Skip to content

Commit 02f8ef9

Browse files
committed
docs: adds instructions for the typespec annotations
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent c5606e7 commit 02f8ef9

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

additions/README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# TypeSpec annotations additions
2+
3+
This TypeSpec project allows you to define additional annotations to inject in the CSDL files. It's an alternative to the XLST in `/transform`.
4+
The copy scripts (in `/scripts/copy-annotations-to-csdl.ps1`) ONLY considers annotations, and DOES NOT perform any deduplication other than the ones enforced by XML keys.
5+
6+
## Requirements
7+
8+
- Node 22.x or above
9+
- TypeScript `npm i -g typescript`
10+
- TypeSpec compiler `npm i -g @typespec/compiler`
11+
- dependencies installed `npm ci`
12+
- vscode (or equivalent) `sudo winget install Microsoft.VisualStudioCode`
13+
14+
## Getting started
15+
16+
1. Make changes to the TypeSpec (.tsp) file
17+
1. Run the compilation `tsp compile . --watch`
18+
1. Run the copy scripts `.\scripts\copy-annotations-to-csdl.ps1 -sourceCsdlDirectoryPath $pwd\additions\tsp-output -targetCsdlPath $pwd\clean_v10_metadata\cleanMetadataWithDescriptionsAndAnnotationsAndErrorsv1.0.xml`
19+
1. Diff the changes to ensure this is what you expect
20+
21+
> Note: Do not commit any changes to the target CSDL as those are generated weekly.

0 commit comments

Comments
 (0)