Commit f26aa71
authored
fix: make service config optional in API design (#325)
Remove config from Required fields in the Goa DSL and add omitempty
to the JSON tag. The custom validation layer already handles nil
configs with sensible defaults, but the generated validation was
rejecting requests before custom parsing could run.
Normalize nil config to an empty map in the API conversion layer so
downstream code never needs nil checks.1 parent b6b6f3b commit f26aa71
14 files changed
Lines changed: 99 additions & 62 deletions
File tree
- api/apiv1
- design
- gen
- control_plane
- http
- control_plane
- client
- server
- docs/services
- server/internal/api/apiv1
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 14 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments