Commit 01bfbe8
[python] add emitter options and docs (#6537)
1. Update to `@azure-tools/typespec-client-generator-core` version
`0.53.0` (and update corresponding libraries
2. Have your library's emitter options in `lib.ts` extend from tcgc's
`SdkEmitterOptions`
([code](https://github.com/microsoft/typespec/pull/6537/files#diff-312d0aa386e3732696ebc167c3a63647ce3d44791fbe44392b01042119635f87R9))
3. Spread `SdkEmitterOptionsSchema.properties` into the implementation
of your options
([code](https://github.com/microsoft/typespec/pull/6537/files#diff-312d0aa386e3732696ebc167c3a63647ce3d44791fbe44392b01042119635f87R57))
- If you haven't added documentation for each of your emitter options,
be sure to include them so they properly render in the website
4. Split your flags between your unbranded and branded emitter. Include
only `azure` specific flags in your branded emitter
5. Now, we need to make sure these changes get published to the website.
Follow the remaining steps if you haven't already started adding website
documentation
6. Suggestion is to add `"regen-docs": "node
../../packages/tspd/cmd/tspd.js doc . --enable-experimental --output-dir
../../website/src/content/docs/docs/emitters/clients/http-client-<emitter-name>/reference
--skip-js"` to your `package.json`
- Make sure you pull from main before doing this step and building
`tspd`
- If you have any custom documentation in your `README.md`, this will
overwrite everything. If you have any extra handwritten content you'd
like to add, you can add `.tspd/docs/usage.md` file, and that will get
injected into your readme
7. Add `npm run regen-docs` to your generation pipeline
- I added it in
[`Generate.ps1`](https://github.com/microsoft/typespec/pull/6537/files#diff-d01183da000e95538fa4d2d813fb61cc208ffc624c406f53a0a8c22047d106a0R13)
8. Add an entry into
[`website/src/content/current-sidebar.ts`](https://github.com/microsoft/typespec/pull/6537/files#diff-2dedc394c7548f077bab3ebbc97904b254707dc4107e83bbd841d34900b7a202R153)
with your emitter
---------
Co-authored-by: iscai-msft <isabellavcai@gmail.com>
Co-authored-by: tadelesh <tadelesh.shi@live.cn>1 parent 1c9397b commit 01bfbe8
18 files changed
Lines changed: 1032 additions & 1352 deletions
File tree
- packages/http-client-python
- emitter/src
- eng/scripts
- ci
- generator/test/azure
- mock_api_tests
- asynctests
- website/src/content
- docs/docs/emitters/clients/http-client-python/reference
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
8 | 12 | | |
9 | | - | |
| 13 | + | |
10 | 14 | | |
11 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
12 | 18 | | |
13 | | - | |
| 19 | + | |
14 | 20 | | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
19 | 24 | | |
20 | 25 | | |
21 | | - | |
| 26 | + | |
22 | 27 | | |
23 | | - | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
24 | 35 | | |
25 | | - | |
| 36 | + | |
26 | 37 | | |
27 | | - | |
| 38 | + | |
28 | 39 | | |
29 | | - | |
| 40 | + | |
30 | 41 | | |
31 | | - | |
| 42 | + | |
32 | 43 | | |
33 | | - | |
34 | | - | |
35 | | - | |
| 44 | + | |
36 | 45 | | |
37 | | - | |
| 46 | + | |
38 | 47 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 48 | + | |
42 | 49 | | |
43 | | - | |
| 50 | + | |
44 | 51 | | |
45 | | - | |
| 52 | + | |
46 | 53 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
| 58 | + | |
61 | 59 | | |
62 | | - | |
| 60 | + | |
63 | 61 | | |
64 | | - | |
65 | | - | |
66 | | - | |
| 62 | + | |
67 | 63 | | |
68 | | - | |
| 64 | + | |
69 | 65 | | |
70 | | - | |
| 66 | + | |
71 | 67 | | |
72 | | - | |
| 68 | + | |
73 | 69 | | |
74 | | - | |
| 70 | + | |
75 | 71 | | |
76 | | - | |
| 72 | + | |
77 | 73 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 74 | + | |
86 | 75 | | |
87 | | - | |
| 76 | + | |
88 | 77 | | |
89 | | - | |
| 78 | + | |
90 | 79 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
99 | 143 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
| 144 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
| 86 | + | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
156 | | - | |
| 156 | + | |
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
230 | | - | |
| 230 | + | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
274 | | - | |
275 | | - | |
| 273 | + | |
276 | 274 | | |
277 | 275 | | |
278 | 276 | | |
| |||
0 commit comments