Skip to content

Commit

Permalink
Merge pull request #15 from rwth-iat/http_api/remove_submodel_submount
Browse files Browse the repository at this point in the history
adapter.http: remove `/submodel` submount from Submodel repository
  • Loading branch information
jkhsjdhjs authored Mar 16, 2024
2 parents 9a22020 + 5bfbad3 commit d5cb103
Showing 1 changed file with 32 additions and 36 deletions.
68 changes: 32 additions & 36 deletions basyx/aas/adapter/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,47 +442,43 @@ def __init__(self, object_store: model.AbstractObjectStore):
Rule("/", methods=["GET"], endpoint=self.get_submodel),
Rule("/", methods=["PUT"], endpoint=self.put_submodel),
Rule("/", methods=["DELETE"], endpoint=self.delete_submodel),
Submount("/submodel", [
Rule("/", methods=["GET"], endpoint=self.get_submodel),
Rule("/", methods=["PUT"], endpoint=self.put_submodel),
Submount("/submodel-elements", [
Rule("/", methods=["GET"], endpoint=self.get_submodel_submodel_elements),
Submount("/submodel-elements", [
Rule("/", methods=["GET"], endpoint=self.get_submodel_submodel_elements),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_elements_id_short_path),
Submount("/<id_short_path:id_shorts>", [
Rule("/", methods=["GET"],
endpoint=self.get_submodel_submodel_elements_id_short_path),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_elements_id_short_path),
Submount("/<id_short_path:id_shorts>", [
Rule("/", methods=["PUT"],
endpoint=self.put_submodel_submodel_elements_id_short_path),
Rule("/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_elements_id_short_path),
Submount("/constraints", [
Rule("/", methods=["GET"],
endpoint=self.get_submodel_submodel_elements_id_short_path),
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_elements_id_short_path),
Rule("/", methods=["PUT"],
endpoint=self.put_submodel_submodel_elements_id_short_path),
Rule("/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_elements_id_short_path),
Submount("/constraints", [
Rule("/", methods=["GET"],
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["GET"],
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["PUT"],
endpoint=self.put_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_element_constraints),
])
]),
endpoint=self.post_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["GET"],
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["PUT"],
endpoint=self.put_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_element_constraints),
])
]),
Submount("/constraints", [
Rule("/", methods=["GET"], endpoint=self.get_submodel_submodel_element_constraints),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["GET"],
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["PUT"],
endpoint=self.put_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_element_constraints),
])
]),
Submount("/constraints", [
Rule("/", methods=["GET"], endpoint=self.get_submodel_submodel_element_constraints),
Rule("/", methods=["POST"],
endpoint=self.post_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["GET"],
endpoint=self.get_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["PUT"],
endpoint=self.put_submodel_submodel_element_constraints),
Rule("/<path:qualifier_type>/", methods=["DELETE"],
endpoint=self.delete_submodel_submodel_element_constraints),
])
])
])
Expand Down

0 comments on commit d5cb103

Please sign in to comment.