From 20b841f90e2b6fb8b8d0e5bec770a4f3e4812e4a Mon Sep 17 00:00:00 2001 From: hvub Date: Wed, 27 Nov 2024 11:25:10 +0100 Subject: [PATCH 1/4] adjust description --- core/src/main/java/apoc/load/LoadJson.java | 8 +++++--- core/src/test/resources/procedures.json | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/apoc/load/LoadJson.java b/core/src/main/java/apoc/load/LoadJson.java index 5bc942e95..4ad105cfe 100644 --- a/core/src/main/java/apoc/load/LoadJson.java +++ b/core/src/main/java/apoc/load/LoadJson.java @@ -113,12 +113,12 @@ public Stream 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`.\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`.\n" + "If the given JSON file is a `MAP`, this procedure imports a single value instead.") public Stream 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 headers, @@ -127,7 +127,9 @@ public Stream 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", diff --git a/core/src/test/resources/procedures.json b/core/src/test/resources/procedures.json index 8f46da476..8b9bee3c0 100644 --- a/core/src/test/resources/procedures.json +++ b/core/src/test/resources/procedures.json @@ -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`.\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`.\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.", @@ -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" }, { @@ -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" From 860ccddc1d3d373ac1bbbac3e442124c9f05402e Mon Sep 17 00:00:00 2001 From: hvub Date: Wed, 27 Nov 2024 14:37:32 +0100 Subject: [PATCH 2/4] [NOID] add an awesome linebreak --- core/src/main/java/apoc/load/LoadJson.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/apoc/load/LoadJson.java b/core/src/main/java/apoc/load/LoadJson.java index 4ad105cfe..ff5468b8f 100644 --- a/core/src/main/java/apoc/load/LoadJson.java +++ b/core/src/main/java/apoc/load/LoadJson.java @@ -118,7 +118,8 @@ public Stream json( public Stream jsonParams( @Name( value = "urlOrKeyOrBinary", - 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.") + 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 headers, From d2f985c66726009e77a10c35a4719a691da3edb5 Mon Sep 17 00:00:00 2001 From: hvub Date: Thu, 28 Nov 2024 11:57:03 +0100 Subject: [PATCH 3/4] even more awesome linebreak chicanery --- core/src/main/java/apoc/load/LoadJson.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/apoc/load/LoadJson.java b/core/src/main/java/apoc/load/LoadJson.java index ff5468b8f..478bea69c 100644 --- a/core/src/main/java/apoc/load/LoadJson.java +++ b/core/src/main/java/apoc/load/LoadJson.java @@ -112,9 +112,8 @@ public Stream json( @Procedure(name = "apoc.load.jsonParams", deprecatedBy = "This procedure is being moved to APOC Extended.") @Deprecated @QueryLanguageScope(scope = {QueryLanguage.CYPHER_5}) - @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`.\n" - + "If 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`.\n" + + "If the given JSON file is a `MAP`, this procedure imports a single value instead.") public Stream jsonParams( @Name( value = "urlOrKeyOrBinary", From 315e6610fd4bf8df5df02d8008011a9a8334d7de Mon Sep 17 00:00:00 2001 From: hvub Date: Thu, 28 Nov 2024 13:16:57 +0100 Subject: [PATCH 4/4] spotless apply --- core/src/main/java/apoc/load/LoadJson.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/apoc/load/LoadJson.java b/core/src/main/java/apoc/load/LoadJson.java index 478bea69c..75bbe9680 100644 --- a/core/src/main/java/apoc/load/LoadJson.java +++ b/core/src/main/java/apoc/load/LoadJson.java @@ -112,13 +112,14 @@ public Stream json( @Procedure(name = "apoc.load.jsonParams", deprecatedBy = "This procedure is being moved to APOC Extended.") @Deprecated @QueryLanguageScope(scope = {QueryLanguage.CYPHER_5}) - @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`.\n" - + "If 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`.\n" + + "If the given JSON file is a `MAP`, this procedure imports a single value instead.") public Stream jsonParams( @Name( value = "urlOrKeyOrBinary", - 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.") + 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 headers, @@ -127,9 +128,10 @@ public Stream jsonParams( @Name( value = "path", defaultValue = "", - 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: ``.") + 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",