Skip to content

Commit 71ecc87

Browse files
Add steps for generating test .Net code files (#245)
1 parent a5dffbf commit 71ecc87

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,26 @@ The output C# code files will go in to the `output` directory.
8383

8484
`.\typewriter.exe -v Info -m D:\v1.0_2018_10_23_source.xml -o output -l CSharp -d D:\repos\microsoft-graph-docs -g Full`
8585

86+
## Use Typewriter to test your beta metadata
8687

88+
We assume that the metadata you are using is based off the beta metadata file.
89+
90+
1. Download the [latest Typewriter release](https://github.com/microsoftgraph/MSGraph-SDK-Code-Generator/releases).
91+
2. Run Typewriter to generate a clean metadata file from your test metadata file. The output file will be `cleanMetadata.xml`.
92+
93+
`.\typewriter.exe -v Info -m <TODO-SET-PATH-TO-YOUR-METADATA> -g Transform -t https://raw.githubusercontent.com/microsoftgraph/msgraph-metadata/master/transforms/csdl/preprocess_csdl.xsl`
94+
95+
<!-- Excludes documentation which would make for an ugly diff. May need to add the doc step for diff purposes. -->
96+
97+
3. Generate .NET code files with Typewriter using the generated `cleanMetadata.xml`.
98+
99+
`.\typewriter.exe -v Info -m D:\cleanMetadata.xml -o outputDirectory -g Files`
100+
101+
4. Clone the Beta .NET SDK https://github.com/microsoftgraph/msgraph-beta-sdk-dotnet.
102+
5. Replace the files under `src/Microsoft.Graph/Requests/Generated` and `src/Microsoft.Graph/Models/Generated` in the Beta .Net SDK with the generated files.
103+
6. Build the Beta .Net SDK to validate that the generated files compile.
104+
105+
At this point you should have a valid SDK.
87106

88107
## Using Vipr with this Writer
89108

0 commit comments

Comments
 (0)