Skip to content

Commit 9131452

Browse files
committed
PEP8 conformance for validation classes
1 parent f1f3dad commit 9131452

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

app/ro_crates/routes/post_routes.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@
1515

1616
post_routes_bp = APIBlueprint("post_routes", __name__)
1717

18-
class validate_data(Schema):
18+
class ValidateData(Schema):
1919
crate_id = String(required=True)
2020
profile_name = String(required=False)
2121
webhook_url = String(required=False)
2222

23-
class validate_json(Schema):
23+
class ValidateJSON(Schema):
2424
crate_json = String(required=True)
2525
profile_name = String(required=False)
2626

2727

2828
@post_routes_bp.post("/validate_by_id")
29-
@post_routes_bp.input(validate_data(partial=True), location='json')
29+
@post_routes_bp.input(ValidateData(partial=True), location='json')
3030
def validate_ro_crate_from_id(json_data) -> tuple[Response, int]:
3131
"""
3232
Endpoint to validate an RO-Crate using its ID from MinIO.
@@ -60,7 +60,7 @@ def validate_ro_crate_from_id(json_data) -> tuple[Response, int]:
6060
return queue_ro_crate_validation_task(crate_id, profile_name, webhook_url)
6161

6262
@post_routes_bp.post("/validate_by_id_no_webhook")
63-
@post_routes_bp.input(validate_data(partial=True), location='json') # -> json_data
63+
@post_routes_bp.input(ValidateData(partial=True), location='json') # -> json_data
6464
def validate_ro_crate_from_id_no_webhook(json_data) -> tuple[Response, int]:
6565
"""
6666
Endpoint to validate an RO-Crate using its ID from MinIO.
@@ -90,7 +90,7 @@ def validate_ro_crate_from_id_no_webhook(json_data) -> tuple[Response, int]:
9090

9191

9292
@post_routes_bp.post("/validate_metadata")
93-
@post_routes_bp.input(validate_json(partial=True), location='json') # -> json_data
93+
@post_routes_bp.input(ValidateJSON(partial=True), location='json') # -> json_data
9494
def validate_ro_crate_metadata(json_data) -> tuple[Response, int]:
9595
"""
9696
Endpoint to validate an RO-Crate JSON file uploaded to the Service.

0 commit comments

Comments
 (0)