From 5982f58ccbd907ad9e5d6d7c16ea6873b9c43801 Mon Sep 17 00:00:00 2001 From: JoelNiemela Date: Fri, 27 Sep 2024 14:50:52 -0500 Subject: [PATCH 1/3] Add script syntax hint for cfswitch --- data/en/cfswitch.json | 1 + 1 file changed, 1 insertion(+) diff --git a/data/en/cfswitch.json b/data/en/cfswitch.json index 4f604c36a..7ea9bf9c6 100644 --- a/data/en/cfswitch.json +++ b/data/en/cfswitch.json @@ -2,6 +2,7 @@ "name":"cfswitch", "type":"tag", "syntax":"", + "script":"switch (expression) { }", "related":["cfcase","cfdefaultcase"], "description":"Evaluates a passed expression and passes control to the cfcase tag that matches the expression result. You can, optionally, code a cfdefaultcase tag, which receives control if there is no matching cfcase tag value. Note the difference in the tag and script syntax when providing multiple values for a case.", "params": [ From 065c39cbe403e37b8e8a654cfc48d839411cf1ad Mon Sep 17 00:00:00 2001 From: Mark Drew Date: Fri, 11 Oct 2024 14:55:17 +0100 Subject: [PATCH 2/3] #1665 adding a configImport example --- data/en/configimport.json | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 data/en/configimport.json diff --git a/data/en/configimport.json b/data/en/configimport.json new file mode 100644 index 000000000..b1770cac7 --- /dev/null +++ b/data/en/configimport.json @@ -0,0 +1,73 @@ +{ + "name":"configImport", + "type":"function", + "syntax":"configImport(path path, [, type] [, password], [, params], [, charset])", + + "returns":"Struct", + "related":["configTranslate"], + "description":"Imports a configuration based on the CFConfig format.", + "params": [ + + { + "name":"path", + "description":"Path to the .CFConfig.json file or the data itself as a Struct.", + "required":true, + "default":"false", + "type":"any", + "values":[] + }, + + { + "name":"type", + "description":"Config Context to manipulate, server or web context.", + "required":false, + "default":"server", + "type":"string", + "values":["web", "server"] + }, + + { + "name":"password", + "description":"password to access the configuration, depending on the value set for the attribute type.", + "required":false, + "default":"false", + "type":"string", + "values":[] + }, + + { + "name":"params", + "description":"placeholder parameters to use as actual data for the placeholders inside the configuration.", + "required":false, + "default":"false", + "type":"struct", + "values":[] + }, + + { + "name":"charset", + "description":"charset to use to read the .CFConfig file, if not defined, Lucee will use the default resource charset.", + "required":false, + "default":"false", + "type":"string", + "values":[] + } + + ], + "engines": { + "lucee": {"minimum_version":"5.3.8.207", "notes":"", "docs":"https://docs.lucee.org/reference/functions/configimport.html"} + }, + "links": [{ + "title":"configimport", + "description":"Lucee Documentation for configimport", + "url":"https://docs.lucee.org/reference/functions/configimport.html" + }], + "examples": [ + { + "title": "Example for importing a configuration", + "description": "Imports a configuration based on the CFConfig format from a file using a passeword stored in an environment variable.", + "code": "configImport(\n\tpath: expandPath('/config/config.json'),\n\ttype: 'server',\n\tpassword: SERVER.system.environment.PASSWORD\n);", + "runnable":false + } + ] +} \ No newline at end of file From 0f420ef7a62bbba8989b4347ed30012de49702af Mon Sep 17 00:00:00 2001 From: Mark Drew Date: Fri, 11 Oct 2024 22:19:40 +0100 Subject: [PATCH 3/3] #1665 updating the returntype --- data/en/configimport.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/en/configimport.json b/data/en/configimport.json index b1770cac7..017cbf151 100644 --- a/data/en/configimport.json +++ b/data/en/configimport.json @@ -2,8 +2,7 @@ "name":"configImport", "type":"function", "syntax":"configImport(path path, [, type] [, password], [, params], [, charset])", - - "returns":"Struct", + "returns":"struct", "related":["configTranslate"], "description":"Imports a configuration based on the CFConfig format.", "params": [