Commit 8dabe43
committed
fix: Add proper constraints to RoleUserAssignmentViewSet OpenAPI spec
Implements complete schema override using allOf + $ref pattern to document
mutually exclusive field requirements for POST /role_user_assignments:
- Exactly one of 'user' or 'user_ansible_id' must be provided
- At most one of 'object_id' or 'object_ansible_id' can be provided
Uses extend_schema_if_available with full content type support (JSON,
form-encoded, multipart). Preserves auto-generated schema via $ref while
adding oneOf constraints for MCP consumption.
Documentation-only fix - no API behavior changes.
This prevents MCP clients from submitting invalid requests and improves
API documentation accuracy for automated consumption.
Co-Authored-By: Claude <[email protected]>
Vibe-Coder: Andrew Potozniak <[email protected]>
AIA: Entirely AI, Human-initiated, Reviewed, Claude Code [Sonnet 4] v1.0
https://aiattribution.github.io/statements/AIA-EAI-Hin-R-?model=Claude%20Code%20%5BSonnet%204%5D-v1.01 parent 4398287 commit 8dabe43
1 file changed
+56
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
257 | 258 | | |
258 | 259 | | |
259 | 260 | | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
260 | 316 | | |
261 | 317 | | |
262 | 318 | | |
| |||
0 commit comments