summaryrefslogtreecommitdiff
path: root/web-server/opendc/api
diff options
context:
space:
mode:
Diffstat (limited to 'web-server/opendc/api')
-rw-r--r--web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py7
-rw-r--r--web-server/opendc/api/v2/topologies/topologyId/endpoint.py6
2 files changed, 4 insertions, 9 deletions
diff --git a/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py b/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py
index ecf80353..09c84019 100644
--- a/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py
+++ b/web-server/opendc/api/v2/simulations/simulationId/topologies/endpoint.py
@@ -9,12 +9,7 @@ from opendc.util.database import Database
def POST(request):
"""Add a new Topology to the specified simulation and return it"""
- request.check_required_parameters(path={'simulationId': 'string'},
- body={
- 'topology': {
- 'name': 'string'
- }
- })
+ request.check_required_parameters(path={'simulationId': 'string'}, body={'topology': {'name': 'string'}})
simulation = Simulation.from_id(request.params_path['simulationId'])
diff --git a/web-server/opendc/api/v2/topologies/topologyId/endpoint.py b/web-server/opendc/api/v2/topologies/topologyId/endpoint.py
index a4f71ed6..84f20903 100644
--- a/web-server/opendc/api/v2/topologies/topologyId/endpoint.py
+++ b/web-server/opendc/api/v2/topologies/topologyId/endpoint.py
@@ -9,7 +9,7 @@ from opendc.util.rest import Response
def GET(request):
"""Get this Topology."""
- request.check_required_parameters(path={'topologyId': 'int'})
+ request.check_required_parameters(path={'topologyId': 'string'})
topology = Topology.from_id(request.params_path['topologyId'])
@@ -21,7 +21,7 @@ def GET(request):
def PUT(request):
"""Update this topology"""
- request.check_required_parameters(path={'topologyId': 'int'}, body={'topology': {'name': 'string', 'rooms': {}}})
+ request.check_required_parameters(path={'topologyId': 'string'}, body={'topology': {'name': 'string', 'rooms': {}}})
topology = Topology.from_id(request.params_path['topologyId'])
topology.check_exists()
@@ -38,7 +38,7 @@ def PUT(request):
def DELETE(request):
"""Delete this topology"""
- request.check_required_parameters(path={'topologyId': 'int'})
+ request.check_required_parameters(path={'topologyId': 'string'})
topology = Topology.from_id(request.params_path['topologyId'])