diff --git a/jsonrpc/src/content/results.json b/jsonrpc/src/content/results.json index 8e511a3b..b991f74b 100644 --- a/jsonrpc/src/content/results.json +++ b/jsonrpc/src/content/results.json @@ -220,12 +220,25 @@ "$ref": "#/components/schemas/hexString" } }, - "GossipResult": { - "name": "gossipResult", - "description": "Returns the number of peers that the content was gossiped to", + "PutContentResult": { + "name": "PutContentResult", + "description": "Returns the number of peers that the content was gossiped to and a flag indicating whether the content was stored locally or not.", "schema": { - "title": "number of peers", - "type": "number" + "type": "object", + "required": [ + "peerCount", + "storedLocally" + ], + "properties": { + "peerCount": { + "description": "Indicates how many peers the content was gossiped to.", + "type": "number" + }, + "storedLocally": { + "description": "Indicates whether the content was stored locally or not.", + "type": "boolean" + } + } } } } diff --git a/jsonrpc/src/methods/beacon.json b/jsonrpc/src/methods/beacon.json index f423f2d9..dd69f364 100644 --- a/jsonrpc/src/methods/beacon.json +++ b/jsonrpc/src/methods/beacon.json @@ -134,7 +134,7 @@ }, { "name": "portal_beaconGetContent", - "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -143,9 +143,11 @@ "result": { "$ref": "#/components/contentDescriptors/GetContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundError" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundError" + } + ] }, { "name": "portal_beaconTraceGetContent", @@ -158,9 +160,11 @@ "result": { "$ref": "#/components/contentDescriptors/TraceGetContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" + } + ] }, { "name": "portal_beaconStore", @@ -188,13 +192,15 @@ "result": { "$ref": "#/components/contentDescriptors/LocalContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundError" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundError" + } + ] }, { - "name": "portal_beaconGossip", - "summary": "Send the provided content item to interested peers. Clients may choose to send to some or all peers.", + "name": "portal_beaconPutContent", + "summary": "Store the content in the local database if storage criteria is met, then send the content to interested peers using the client's default gossip mechanisms.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -204,7 +210,7 @@ } ], "result": { - "$ref": "#/components/contentDescriptors/GossipResult" + "$ref": "#/components/contentDescriptors/PutContentResult" } } ] diff --git a/jsonrpc/src/methods/history.json b/jsonrpc/src/methods/history.json index 165d6743..d0c166d4 100644 --- a/jsonrpc/src/methods/history.json +++ b/jsonrpc/src/methods/history.json @@ -126,7 +126,7 @@ }, { "name": "portal_historyGetContent", - "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -135,9 +135,11 @@ "result": { "$ref": "#/components/contentDescriptors/GetContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundError" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundError" + } + ] }, { "name": "portal_historyTraceGetContent", @@ -150,9 +152,11 @@ "result": { "$ref": "#/components/contentDescriptors/TraceGetContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundErrorWithTrace" + } + ] }, { "name": "portal_historyStore", @@ -180,13 +184,15 @@ "result": { "$ref": "#/components/contentDescriptors/LocalContentResult" }, - "errors":[{ - "$ref": "#/components/errors/ContentNotFoundError" - }] + "errors": [ + { + "$ref": "#/components/errors/ContentNotFoundError" + } + ] }, { - "name": "portal_historyGossip", - "summary": "Send the provided content item to interested peers. Clients may choose to send to some or all peers.", + "name": "portal_historyPutContent", + "summary": "Store the content in the local database if storage criteria is met, then send the content to interested peers using the client's default gossip mechanisms.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -196,7 +202,7 @@ } ], "result": { - "$ref": "#/components/contentDescriptors/GossipResult" + "$ref": "#/components/contentDescriptors/PutContentResult" } } ] diff --git a/jsonrpc/src/methods/state.json b/jsonrpc/src/methods/state.json index 1ffe1585..bc16a28f 100644 --- a/jsonrpc/src/methods/state.json +++ b/jsonrpc/src/methods/state.json @@ -126,7 +126,7 @@ }, { "name": "portal_stateGetContent", - "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is validated and stored in the local database if storage criteria is met before being returned.", + "summary": "Get content from the local database if it exists, otherwise look up the target content key in the network. After fetching from the network the content is stored in the local database if storage criteria is met before being returned.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -185,8 +185,8 @@ }] }, { - "name": "portal_stateGossip", - "summary": "Send the provided content item to interested peers. Clients may choose to send to some or all peers.", + "name": "portal_statePutContent", + "summary": "Store the content in the local database if storage criteria is met, then send the content to interested peers using the client's default gossip mechanisms.", "params": [ { "$ref": "#/components/contentDescriptors/ContentKey" @@ -196,7 +196,7 @@ } ], "result": { - "$ref": "#/components/contentDescriptors/GossipResult" + "$ref": "#/components/contentDescriptors/PutContentResult" } } ]