fix(api): document 400 on topology read endpoints for schemathesis contract
DECNET's app-level RequestValidationError handler remaps structural
422→400, including query/path constraint violations (limit bounds,
the next-subnet base pattern, etc.). Schemathesis fuzzing will drive
those code paths and fail response_schema_conformance unless 400 is
declared in responses={}. Adds the entry to every phase-3 read route.
This commit is contained in:
@@ -30,6 +30,7 @@ router = APIRouter()
|
||||
tags=["MazeNET Topologies"],
|
||||
response_model=ServiceCatalogResponse,
|
||||
responses={
|
||||
400: {"description": "Malformed query parameters"},
|
||||
401: {"description": "Missing or invalid credentials"},
|
||||
403: {"description": "Insufficient permissions"},
|
||||
},
|
||||
@@ -70,6 +71,7 @@ async def api_next_subnet(
|
||||
tags=["MazeNET Topologies"],
|
||||
response_model=NextIPResponse,
|
||||
responses={
|
||||
400: {"description": "Malformed path parameters"},
|
||||
401: {"description": "Missing or invalid credentials"},
|
||||
403: {"description": "Insufficient permissions"},
|
||||
404: {"description": "Topology or LAN not found"},
|
||||
|
||||
@@ -23,6 +23,7 @@ router = APIRouter()
|
||||
tags=["MazeNET Topologies"],
|
||||
response_model=TopologyDetail,
|
||||
responses={
|
||||
400: {"description": "Malformed path parameters"},
|
||||
401: {"description": "Missing or invalid credentials"},
|
||||
403: {"description": "Insufficient permissions"},
|
||||
404: {"description": "Topology not found"},
|
||||
@@ -49,6 +50,7 @@ async def api_get_topology(
|
||||
tags=["MazeNET Topologies"],
|
||||
response_model=list[TopologyStatusEventRow],
|
||||
responses={
|
||||
400: {"description": "Malformed query parameters"},
|
||||
401: {"description": "Missing or invalid credentials"},
|
||||
403: {"description": "Insufficient permissions"},
|
||||
404: {"description": "Topology not found"},
|
||||
|
||||
@@ -17,6 +17,7 @@ router = APIRouter()
|
||||
tags=["MazeNET Topologies"],
|
||||
response_model=TopologyListResponse,
|
||||
responses={
|
||||
400: {"description": "Malformed query parameters"},
|
||||
401: {"description": "Missing or invalid credentials"},
|
||||
403: {"description": "Insufficient permissions"},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user