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
Copy file name to clipboardExpand all lines: README.md
+46
Original file line number
Diff line number
Diff line change
@@ -622,3 +622,49 @@ The tests included in this repository can be run locally to test different endpo
622
622
```bash
623
623
pnpm build && pnpm test
624
624
```
625
+
626
+
## Updating the JSON Schema
627
+
The Schema is generated from the OpenRPC specification. To update the schema, follow the steps below:
628
+
629
+
1. Run [DAS](https://github.com/metaplex-foundation/digital-asset-rpc-infrastructure) locally
630
+
2. Run the following command to generate the schema:
631
+
632
+
```bash
633
+
curl --request POST --url http://localhost:9090 --header 'Content-Type: application/json' --data '{
634
+
"jsonrpc": "2.0",
635
+
"method": "schema",
636
+
"id": 0
637
+
}'| jq '.'> metaplex-das-api.json
638
+
```
639
+
640
+
3. Update the beginning of the schema in the `specification` folder manually to allow it being used in the [OpenRPC playground](https://playground.open-rpc.org/?url=https://raw.githubusercontent.com/metaplex-foundation/digital-asset-standard-api/main/specification/metaplex-das-api.json).
641
+
642
+
```json
643
+
// E.g. Instead of the following:
644
+
645
+
{
646
+
"jsonrpc": "2.0",
647
+
"result": {
648
+
"openrpc": "1.2.6",
649
+
"info": {
650
+
"title": "",
651
+
"version": ""
652
+
},
653
+
[...]
654
+
655
+
// replace it with this.
656
+
{
657
+
"openrpc": "1.2.6",
658
+
"info": {
659
+
"title": "Metaplex Digital Asset Standard API"
660
+
"version": "1.1.0",
661
+
},
662
+
[...]
663
+
664
+
// And remove this part of the bottom of the file:
665
+
,
666
+
"id": 0
667
+
}
668
+
```
669
+
4. Format the JSON file (e.g. using [jq](https://stedolan.github.io/jq/), vscode, etc.).
670
+
5. Update the schema in the `specification` folder with the new file.
0 commit comments