Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update description of apoc.load.jsonParams #694

Merged
merged 4 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading