You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Split content of original crate_validator.mdx file into three files: (1) crate_validator.mdx, which is fpcised on the end user, and (2) rest_api.mdx and (3) developer_architecture.mdx, which are focused on a developer perspective.
Copy file name to clipboardExpand all lines: docs/website-src/pages/deployment.mdx
+49-45Lines changed: 49 additions & 45 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,63 +19,59 @@ import Diagram from "./components/c4_diagram.mdx";
19
19
20
20
## Service Snapshot
21
21
22
-
Cratey Validator is a web service that checks whether RO-Crates follow the expected structure and metadata rules. It can validate a full RO-Crate stored in MinIO-compatible object storage, or it can validate only the contents of an `ro-crate-metadata.json` file.
22
+
Cratey Validator is a web service that checks whether RO-Crates follow the
23
+
expected structure and metadata rules. It can validate a complete RO-Crate
24
+
stored in MinIO-compatible object storage, or it can validate the contents
25
+
of an `ro-crate-metadata.json` file directly.
23
26
24
-
At a high level, a client sends a validation request, the service runs the RO-Crate validation checks, and the result is either returned directly or saved so it can be retrieved later.
27
+
At a high level, a client sends a validation request, the service runs the
28
+
RO-Crate validation checks, and the result is either returned directly or
29
+
saved so it can be retrieved later.
25
30
26
-
The service is exposed through the following three endpoints:
31
+
## What You Can Validate
27
32
28
-
-`POST /v1/ro_crates/{crate_id}/validation`
29
-
Validates an RO-Crate that already exists in MinIO. The service queues a background task, downloads the crate, runs the validation checks, and saves the validation result back to MinIO.
33
+
### Stored RO-Crates
30
34
31
-
-`POST /v1/ro_crates/validate_metadata`
32
-
Validates RO-Crate metadata directly. This route is useful when the caller only needs to check the crate metadata file and does not need the service to download a full crate from object storage.
35
+
Use this option when the RO-Crate already exists in MinIO-compatible object
36
+
storage. The service reads the crate from the configured bucket, runs the
37
+
validation checks, and saves the validation result back to object storage.
33
38
34
-
-`GET /v1/ro_crates/{crate_id}/validation`
35
-
Retrieves the saved validation result for an RO-Crate that was previously validated from MinIO.
39
+
This is useful for validating complete crates as part of an upload, review,
40
+
or publication workflow.
36
41
37
-
## Current Architecture
38
42
39
-
The service is built as a Flask/APIFlask web API backed by Celery workers for longer-running validation jobs.
40
-
RO-Crates are read from MinIO-compatible object storage, Redis is used by Celery to pass work between the API and the worker,
41
-
and validation is performed by the CRS4 `rocrate_validator` library.
43
+
### Metadata Files
42
44
45
+
Use this option when you only need to check the contents of
46
+
`ro-crate-metadata.json`. Instead of asking the service to download a full
47
+
crate, you submit the metadata JSON directly and receive the validation result
48
+
in the response.
43
49
44
-
## Runtime Flow
50
+
This is useful for quick checks while editing metadata or before a complete
51
+
crate has been assembled.
45
52
46
-
### Validate RO-Crate From MinIO
47
53
48
-
1. Client sends a request to `POST /v1/ro_crates/{crate_id}/validation`.
49
-
2. Request includes `minio_config` and optional `root_path` and `profile_name`.
50
-
3. Flask route passes the request to `queue_ro_crate_validation_task`.
51
-
4. Service creates a MinIO client and checks that the target crate exists.
52
-
5. Celery queues `process_validation_task_by_id`.
53
-
6. Worker downloads the RO-Crate into a temporary local path.
0 commit comments