From 3113cae092f3e82b8b2f13a9eb1a9b8574bfa758 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 17 Jan 2023 14:51:31 +0200 Subject: [PATCH 1/2] Improve files object description --- core-concepts/did-ddo.md | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index 85b6cda6..b5b39743 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -226,9 +226,9 @@ where "files" contains one or more storage objects. Static URLs. Parameters: -* `url` - File url -* `method` - The HTTP method -* `headers` - Additional HTTP headers +* `url` - File url, required +* `method` - The HTTP method, required +* `headers` - Additional HTTP headers, optional ``` { @@ -236,10 +236,10 @@ Parameters: "url": "https://url.com/file1.csv", "method": "GET", "headers": - [ - {"Authorization": "Bearer 123"}, - {"APIKEY": "124"}, - ] + { + "Authorization": "Bearer 123", + "APIKEY": "124", + } } ``` @@ -262,8 +262,9 @@ Parameters: [GraphQL](https://graphql.org/) is a query language for APIs and a runtime for fulfilling those queries with your existing data. Parameters: -* `url` - Server endpoint url -* `query` - The query to be executed +* `url` - Server endpoint url, required +* `query` - The query to be executed, required +* `headers` - Additional HTTP headers, optional ``` { @@ -285,9 +286,9 @@ Use a smart contract as data source. Parameters: -* `chainId` - The chainId used to query the contract -* `address` - The smartcontract address -* `abi` - The function abi (NOT the entire contract abi) +* `chainId` - The chainId used to query the contract, required +* `address` - The smartcontract address, required +* `abi` - The function abi (NOT the entire contract abi), required ``` { From bed550daed5424a70b44200f16f31e2d3f5b3bd6 Mon Sep 17 00:00:00 2001 From: Alex Coseru Date: Tue, 17 Jan 2023 16:50:01 +0200 Subject: [PATCH 2/2] add graphql headers example --- core-concepts/did-ddo.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core-concepts/did-ddo.md b/core-concepts/did-ddo.md index b5b39743..71308250 100644 --- a/core-concepts/did-ddo.md +++ b/core-concepts/did-ddo.md @@ -270,6 +270,10 @@ Parameters: { "type": "graphql", "url": "http://172.15.0.15:8000/subgraphs/name/oceanprotocol/ocean-subgraph", + "headers":{ + "Authorization": "Bearer 123", + "APIKEY": "124", + }, "query": """query{ nfts(orderBy: createdTimestamp,orderDirection:desc){ id