File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33This project presents a Flask-based API for validating RO-Crates.
44
5+ ## API
6+
7+ #### Request Validation of RO-Crate
8+
9+ #### Get RO-Crate Validation Result
10+
11+ #### Validate RO-Crate Metadata
12+
13+ <details >
14+ <summary ><code >POST</code > <code ><b >/</b ></code > <code >(validates submitted RO-Crate Metadata)</code ></summary >
15+
16+ ##### Parameters
17+
18+ > | name | type | data type | description |
19+ > | ------------| -----------| -------------------------| -----------------------------------------------------------------------|
20+ > | crate_json | required | string | RO-Crate metadata, stored as a single string |
21+ > | profile_name | optional | string | RO-Crate profile to validate against |
22+
23+
24+ ##### Responses
25+
26+ > | http code | content-type | response |
27+ > | ---------------| -----------------------------------| ---------------------------------------------------------------------|
28+ > | ` 200 ` | ` application/json ` | ` Successful Validation ` |
29+ > | ` 422 ` | ` application/json ` | ` Error: Details of Validation Error ` |
30+
31+ ##### Example cURL
32+
33+ > ``` javascript
34+ > curl - X ' POST' \
35+ > ' http://localhost:5001/v1/ro_crates/validate_metadata' \
36+ > - H ' accept: application/json' \
37+ > - H ' Content-Type: application/json' \
38+ > - d ' {
39+ > "crate_json": "{' \' ' test1' \' ' : ' \' ' test2' \' ' }"
40+ > }'
41+ > ```
42+
43+ </details>
44+
45+
46+
547## Project Structure
648
749```
You can’t perform that action at this time.
0 commit comments