Commit ae64581
feat(csharp): added generator and integration tests (#97)
* feat: adds c# generator
Adds a new generator for C# to create typesafe clients.
This allows users to generate C# code based on feature flag
definitions, streamlining integration with .NET applications.
Includes necessary command-line flags, templates, and tests.
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* feat(csharp): adds C# generator integration test
Adds a C# code generator integration test to ensure the generated C# code compiles correctly.
This includes:
- A new C# generator based on templates
- Updates to the build process and documentation to support C# generation and testing
- An integration test using Docker to compile the generated C# code
- Fixes and adjustments to data type mappings for C# compatibility
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* chore: go fmt fixes
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* Update .github/workflows/csharp-integration.yml
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* Update CONTRIBUTING.md
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* Update internal/generators/csharp/csharp.go
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* chore(ci): moved the csharp integration into pr-test workflow as a separate job
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* chore: cleaned up generate code to private funcs are private
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* feat(csharp): implemented di for generated code
- updated openfeature to 2.3.2
- introduced IServiceCollection and DI patterns
- updated tests and expectations
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
* Update .github/workflows/pr-test.yml
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
* Update .github/workflows/pr-test.yml
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
---------
Signed-off-by: Kris Coleman <kriscodeman@gmail.com>
Signed-off-by: Kris Coleman <kris.blacksuitmedia@gmail.com>
Co-authored-by: André Silva <2493377+askpt@users.noreply.github.com>
Co-authored-by: Michael Beemer <beeme1mr@users.noreply.github.com>1 parent 1f8f43a commit ae64581
File tree
30 files changed
+1457
-117
lines changed- .github/workflows
- cmd
- testdata
- docs/commands
- internal
- config
- flagset
- generators
- csharp
- manifest
- schema
- v0
- test/csharp-integration
- expected
30 files changed
+1457
-117
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
54 | 53 | | |
55 | 54 | | |
56 | | - | |
57 | | - | |
| 55 | + | |
| 56 | + | |
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
64 | 63 | | |
65 | | - | |
| 64 | + | |
66 | 65 | | |
67 | 66 | | |
68 | | - | |
| 67 | + | |
69 | 68 | | |
70 | | - | |
| 69 | + | |
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
| |||
81 | 80 | | |
82 | 81 | | |
83 | 82 | | |
84 | | - | |
| 83 | + | |
85 | 84 | | |
86 | 85 | | |
87 | 86 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
17 | 44 | | |
18 | 45 | | |
19 | 46 | | |
| |||
37 | 64 | | |
38 | 65 | | |
39 | 66 | | |
40 | | - | |
| 67 | + | |
41 | 68 | | |
42 | 69 | | |
43 | 70 | | |
| |||
69 | 96 | | |
70 | 97 | | |
71 | 98 | | |
72 | | - | |
| 99 | + | |
73 | 100 | | |
74 | | - | |
| 101 | + | |
75 | 102 | | |
76 | 103 | | |
77 | 104 | | |
| |||
81 | 108 | | |
82 | 109 | | |
83 | 110 | | |
84 | | - | |
| 111 | + | |
85 | 112 | | |
86 | 113 | | |
87 | 114 | | |
| |||
95 | 122 | | |
96 | 123 | | |
97 | 124 | | |
98 | | - | |
| 125 | + | |
99 | 126 | | |
100 | 127 | | |
101 | 128 | | |
| |||
113 | 140 | | |
114 | 141 | | |
115 | 142 | | |
116 | | - | |
| 143 | + | |
117 | 144 | | |
118 | | - | |
| 145 | + | |
119 | 146 | | |
120 | 147 | | |
121 | 148 | | |
| |||
125 | 152 | | |
126 | 153 | | |
127 | 154 | | |
128 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
129 | 206 | | |
130 | 207 | | |
131 | 208 | | |
| |||
140 | 217 | | |
141 | 218 | | |
142 | 219 | | |
143 | | - | |
| 220 | + | |
144 | 221 | | |
145 | 222 | | |
146 | 223 | | |
| |||
161 | 238 | | |
162 | 239 | | |
163 | 240 | | |
164 | | - | |
| 241 | + | |
165 | 242 | | |
166 | | - | |
| 243 | + | |
167 | 244 | | |
168 | 245 | | |
169 | 246 | | |
| |||
219 | 296 | | |
220 | 297 | | |
221 | 298 | | |
222 | | - | |
223 | | - | |
224 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
225 | 302 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
| 303 | + | |
252 | 304 | | |
0 commit comments