Skip to content

Commit

Permalink
Update description of apoc.load.jsonParams (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
hvub authored Nov 29, 2024
1 parent 5018823 commit f6a13c9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions core/src/main/java/apoc/load/LoadJson.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,13 @@ public Stream<LoadDataMapResult> json(
@Deprecated
@QueryLanguageScope(scope = {QueryLanguage.CYPHER_5})
@Description(
"Loads parameters from a JSON URL (e.g. web-API) as a stream of values if the given JSON file is a `LIST<ANY>`.\n"
"Loads a JSON document from a URL (e.g. web-API) as a stream of values if the given JSON document is a `LIST<ANY>`.\n"
+ "If the given JSON file is a `MAP`, this procedure imports a single value instead.")
public Stream<LoadDataMapResult> jsonParams(
@Name(
value = "urlOrKeyOrBinary",
description = "The name of the file or binary data to import the data from.")
description = "The name of the file or binary data to import the data from. "
+ "Note that a URL needs to be properly encoded to conform with the URI standard.")
Object urlOrKeyOrBinary,
@Name(value = "headers", description = "Headers to be used when connecting to the given URL.")
Map<String, Object> headers,
Expand All @@ -127,7 +128,10 @@ public Stream<LoadDataMapResult> jsonParams(
@Name(
value = "path",
defaultValue = "",
description = "A JSON path expression used to extract a certain part from the list.")
description =
"A JSON path expression used to extract specific subparts of the JSON document "
+ "(extracted by a link:https://en.wikipedia.org/wiki/JSONPath[JSONPath] expression). "
+ "The default is: ``.")
String path,
@Name(
value = "config",
Expand Down
6 changes: 3 additions & 3 deletions core/src/test/resources/procedures.json
Original file line number Diff line number Diff line change
Expand Up @@ -4464,7 +4464,7 @@
"isDeprecated" : true,
"signature" : "apoc.load.jsonParams(urlOrKeyOrBinary :: ANY, headers :: MAP, payload :: STRING, path = :: STRING, config = {} :: MAP) :: (value :: MAP)",
"name" : "apoc.load.jsonParams",
"description" : "Loads parameters from a JSON URL (e.g. web-API) as a stream of values if the given JSON file is a `LIST<ANY>`.\nIf the given JSON file is a `MAP`, this procedure imports a single value instead.",
"description" : "Loads a JSON document from a URL (e.g. web-API) as a stream of values if the given JSON document is a `LIST<ANY>`.\nIf the given JSON file is a `MAP`, this procedure imports a single value instead.",
"returnDescription" : [ {
"name" : "value",
"description" : "A map of data loaded from the given file.",
Expand All @@ -4474,7 +4474,7 @@
"deprecatedBy" : "This procedure is being moved to APOC Extended.",
"argumentDescription" : [ {
"name" : "urlOrKeyOrBinary",
"description" : "The name of the file or binary data to import the data from.",
"description" : "The name of the file or binary data to import the data from. Note that a URL needs to be properly encoded to conform with the URI standard.",
"isDeprecated" : false,
"type" : "ANY"
}, {
Expand All @@ -4489,7 +4489,7 @@
"type" : "STRING"
}, {
"name" : "path",
"description" : "A JSON path expression used to extract a certain part from the list.",
"description" : "A JSON path expression used to extract specific subparts of the JSON document (extracted by a link:https://en.wikipedia.org/wiki/JSONPath[JSONPath] expression). The default is: ``.",
"isDeprecated" : false,
"default" : "DefaultParameterValue{value=, type=STRING}",
"type" : "STRING"
Expand Down

0 comments on commit f6a13c9

Please sign in to comment.