From e24ea27bf92ac93e2e0d4e924dfbe6d3a637453e Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Wed, 27 Dec 2023 15:24:15 -0800 Subject: [PATCH 1/6] Draft of additional ruleset upload info --- .../custom-rulesets-validate-and-publish.adoc | 44 ++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index 2bdd347a..cb731ce4 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -20,7 +20,7 @@ include::anypoint-cli::partial$api-governance.adoc[tag=governance-ruleset-valida [[generate-ruleset-doc]] == Generate the Ruleset Documentation -Use the following command to generate a documentation ZIP file for a ruleset YAML file. The resulting documentation ZIP file can then be used in an Exchange asset upload using the `--files.docs.zip` option. +Use the following command to generate a documentation ZIP file for a ruleset YAML file. The resulting documentation ZIP file can then be used in an Exchange asset upload using the `--files` flag with the `docs.zip` option. include::anypoint-cli::partial$api-governance.adoc[tag=governance-document,leveloffset=+1] @@ -29,6 +29,48 @@ include::anypoint-cli::partial$api-governance.adoc[tag=governance-document,level You can publish (upload) a ruleset and its documentation to Exchange using Anypoint CLI. You cannot use the Exchange UI to upload ruleset assets. +You can upload the following in a single upload command: + +[%header,cols="35a,65a"] +|=== +|Flag and Option|Result +|The ruleset YAML using the `--files` flag with the `"ruleset.yaml"` option. +| +This uploads the ruleset information included in the YAML file and ignores any other files detected in the same folder, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `--ruleset.yaml` option. +| +The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option. +| +This uploads the ruleset information included in the YAML file and evaluates other files in the zip file, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `"ruleset.zip"` option. +|The ruleset YAML using the `--files` flag with the `"ruleset.yaml"` option with the `"docs.zip"` option in the same `--files` flag. +|This uploads the ruleset YAML information plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option with the `"docs.zip"` option in the same `--files` flag. +|This uploads the ruleset ZIP file information, evaluating any `exchange.json` file properties, plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|=== + +=== Guidelines for Ruleset Exchange JSON Files + +You can use an `exchange.json` file to define the Exchange settings for rulesets. You can use any of the following properties: + +[%header,cols="35a,65a"] +|=== +|Property|Description +|main| +|name| +|organizationId| +|groupId| +|assetId| +|version| +|classifier| +|dependencies| +|tags| +|descriptorVersion| +|=== ++ +For example: +---- +{ "main":"ruleset.yaml", "name":"My Mule API Management Best Practices", "organizationId":"68ef9520-24e9-4cf2-b2f5-620025690913", "groupId":"68ef9520-24e9-4cf2-b2f5-620025690913", "assetId":"my-mule-api-management-best-practices", "version":"1.0.0", "classifier":"ruleset", "dependencies":[], "tags":["instances"], "descriptorVersion": "1.0.0" } +---- + Use the following command to upload a ruleset and its documentation to Exchange. include::anypoint-cli::partial$exchange-assets.adoc[tag=exchange-asset-upload,leveloffset=+1] From 6cde855efb6479f5528b4ebf069b29ba9bd1bc88 Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Tue, 2 Jan 2024 14:45:31 -0800 Subject: [PATCH 2/6] Added descs --- .../custom-rulesets-validate-and-publish.adoc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index cb731ce4..31614327 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -54,13 +54,13 @@ You can use an `exchange.json` file to define the Exchange settings for rulesets [%header,cols="35a,65a"] |=== |Property|Description -|main| -|name| -|organizationId| -|groupId| -|assetId| -|version| -|classifier| +|main|The main file of your asset. Ensure that this matches the name of your ruleset when publishing a ruleset. +|name|The artifact name of your asset. You cannot change the name of an asset that's already published. +|organizationId|The Anypoint Platform organization or business group in which to publish the asset. +|groupId|The Anypoint Platform group in which to publish the asset. +|assetId|The Exchange asset ID assigned to the asset. +|version|The asset version. +|classifier|The asset type. Use the value `"ruleset"` when publishing a ruleset asset. |dependencies| |tags| |descriptorVersion| From 24e644b8db6b3d7692c9bb93ac1e1758ff84056c Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Wed, 3 Jan 2024 10:56:47 -0800 Subject: [PATCH 3/6] Added examples and other edits --- .../custom-rulesets-validate-and-publish.adoc | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index 31614327..c185268c 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -27,24 +27,25 @@ include::anypoint-cli::partial$api-governance.adoc[tag=governance-document,level [[publish-ruleset]] == Publish the Custom Ruleset -You can publish (upload) a ruleset and its documentation to Exchange using Anypoint CLI. You cannot use the Exchange UI to upload ruleset assets. +You can publish (upload) a ruleset and its documentation to Exchange using Anypoint CLI. You cannot use the Exchange UI to upload ruleset documentation. You can upload the following in a single upload command: -[%header,cols="35a,65a"] +[%header,cols="20a,40a,40a"] |=== -|Flag and Option|Result +|Flag and Options|Result|Example |The ruleset YAML using the `--files` flag with the `"ruleset.yaml"` option. -| -This uploads the ruleset information included in the YAML file and ignores any other files detected in the same folder, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `--ruleset.yaml` option. -| -The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option. -| -This uploads the ruleset information included in the YAML file and evaluates other files in the zip file, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `"ruleset.zip"` option. +|This uploads the ruleset information included in the YAML file and ignores any other files detected in the same folder, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `--ruleset.yaml` option. +|`--files='{"ruleset.yaml":"mynewruleset.yaml", "docs.zip": "ruleset.doc.zip"}'` +|The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option. +|This uploads the ruleset information included in the YAML file and evaluates other files in the zip file, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `"ruleset.zip"` option. +|`--files='{"ruleset.zip":"mynewruleset.zip"}'` |The ruleset YAML using the `--files` flag with the `"ruleset.yaml"` option with the `"docs.zip"` option in the same `--files` flag. |This uploads the ruleset YAML information plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|`--files='{"ruleset.yaml":"mynewruleset.yaml", "docs.zip": "ruleset.doc.zip"}'` |The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option with the `"docs.zip"` option in the same `--files` flag. |This uploads the ruleset ZIP file information, evaluating any `exchange.json` file properties, plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|`--files='{"ruleset.zip":"mynewruleset.zip", "docs.zip": "ruleset.doc.zip"}'` |=== === Guidelines for Ruleset Exchange JSON Files @@ -65,13 +66,13 @@ You can use an `exchange.json` file to define the Exchange settings for rulesets |tags| |descriptorVersion| |=== -+ + For example: ---- { "main":"ruleset.yaml", "name":"My Mule API Management Best Practices", "organizationId":"68ef9520-24e9-4cf2-b2f5-620025690913", "groupId":"68ef9520-24e9-4cf2-b2f5-620025690913", "assetId":"my-mule-api-management-best-practices", "version":"1.0.0", "classifier":"ruleset", "dependencies":[], "tags":["instances"], "descriptorVersion": "1.0.0" } ---- -Use the following command to upload a ruleset and its documentation to Exchange. +Use the following command documentation as a reference as you upload the ruleset and its documentation to Exchange. include::anypoint-cli::partial$exchange-assets.adoc[tag=exchange-asset-upload,leveloffset=+1] From fa14e77699b1271b22cfb14dd0483d260be9ce73 Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Wed, 3 Jan 2024 16:21:59 -0800 Subject: [PATCH 4/6] Edits --- .../pages/custom-rulesets-validate-and-publish.adoc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index c185268c..c02ab588 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -27,7 +27,7 @@ include::anypoint-cli::partial$api-governance.adoc[tag=governance-document,level [[publish-ruleset]] == Publish the Custom Ruleset -You can publish (upload) a ruleset and its documentation to Exchange using Anypoint CLI. You cannot use the Exchange UI to upload ruleset documentation. +You can publish (upload) a ruleset and its documentation to Exchange using Anypoint CLI. You can't use the Exchange UI to upload ruleset documentation. You can upload the following in a single upload command: @@ -40,11 +40,11 @@ You can upload the following in a single upload command: |The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option. |This uploads the ruleset information included in the YAML file and evaluates other files in the zip file, such as the `exchange.json` file. You can use `--type=ruleset`. If you don't, the type is inferred from the `--files` flag `"ruleset.zip"` option. |`--files='{"ruleset.zip":"mynewruleset.zip"}'` -|The ruleset YAML using the `--files` flag with the `"ruleset.yaml"` option with the `"docs.zip"` option in the same `--files` flag. -|This uploads the ruleset YAML information plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|The ruleset YAML and the ruleset documentation ZIP file using the `--files` flag with the `"ruleset.yaml"` and `"docs.zip"` options in the same `--files` flag. +|This uploads the ruleset YAML information plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload documentation separately later, but can add it manually. |`--files='{"ruleset.yaml":"mynewruleset.yaml", "docs.zip": "ruleset.doc.zip"}'` -|The ruleset ZIP using the `--files` flag with the `"ruleset.zip"` option with the `"docs.zip"` option in the same `--files` flag. -|This uploads the ruleset ZIP file information, evaluating any `exchange.json` file properties, plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload it separately later. +|The ruleset ZIP and the ruleset documentation ZIP file using the `--files` flag with the `"ruleset.zip"` option with the `"docs.zip"` option in the same `--files` flag. +|This uploads the ruleset ZIP file information, evaluating any `exchange.json` file properties, plus the documentation for the ruleset. You must upload the documentation along with the ruleset. You cannot upload documentation separately later, but can add it manually. |`--files='{"ruleset.zip":"mynewruleset.zip", "docs.zip": "ruleset.doc.zip"}'` |=== From e673bd94e762895fdaae6b0fcc4e55ad40954dda Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Sun, 21 Jan 2024 17:32:57 -0800 Subject: [PATCH 5/6] Added placeholder text fro last 3 exchange json props --- modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index c02ab588..1f0a3aa6 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -62,8 +62,8 @@ You can use an `exchange.json` file to define the Exchange settings for rulesets |assetId|The Exchange asset ID assigned to the asset. |version|The asset version. |classifier|The asset type. Use the value `"ruleset"` when publishing a ruleset asset. -|dependencies| -|tags| +|dependencies| Rulesets can have fragments defined as dependencies. +|tags| Tags for ruleset asset's details in Exchange. |descriptorVersion| |=== From 6bcd0cd0a6a8817e39c292b1ea06761bf3c91199 Mon Sep 17 00:00:00 2001 From: Beth Joson Date: Wed, 24 Jan 2024 14:44:45 -0800 Subject: [PATCH 6/6] Added a descriptorVersion defn but need to get it validated --- modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc index 1f0a3aa6..1a664830 100644 --- a/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc +++ b/modules/ROOT/pages/custom-rulesets-validate-and-publish.adoc @@ -63,8 +63,8 @@ You can use an `exchange.json` file to define the Exchange settings for rulesets |version|The asset version. |classifier|The asset type. Use the value `"ruleset"` when publishing a ruleset asset. |dependencies| Rulesets can have fragments defined as dependencies. -|tags| Tags for ruleset asset's details in Exchange. -|descriptorVersion| +|tags| Tags for a ruleset asset's details in Exchange. +|descriptorVersion|The version of the descriptor model a ruleset is based on. |=== For example: