Commit 135d65e
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 135d65e
1 file changed
+43
-10
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 | | |
| |||
236 | 237 | | |
237 | 238 | | |
238 | 239 | | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
243 | | - | |
244 | | - | |
245 | | - | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
246 | 265 | | |
247 | | - | |
248 | | - | |
249 | | - | |
| 266 | + | |
| 267 | + | |
250 | 268 | | |
251 | 269 | | |
252 | 270 | | |
| |||
257 | 275 | | |
258 | 276 | | |
259 | 277 | | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
260 | 293 | | |
261 | 294 | | |
262 | 295 | | |
| |||
0 commit comments