Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
anypoint-cli-api-project-plugin
Advanced tools
$ npm install -g @mulesoft/anypoint-cli-api-project-plugin
$ anypoint-cli-api-project-plugin COMMAND
running command...
$ anypoint-cli-api-project-plugin (--version)
@mulesoft/anypoint-cli-api-project-plugin/1.0.0 darwin-x64 node-v16.14.2
$ anypoint-cli-api-project-plugin --help [COMMAND]
USAGE
$ anypoint-cli-api-project-plugin COMMAND
...
anypoint-cli-api-project-plugin api-project generate
anypoint-cli-api-project-plugin api-project publish
anypoint-cli-api-project-plugin api-project validate
anypoint-cli-api-project-plugin conf [KEY] [VALUE]
anypoint-cli-api-project-plugin help [COMMAND]
anypoint-cli-api-project-plugin version
anypoint-cli-api-project-plugin api-project generate
Generate a new Api Project (exchange.json file). By default, if the flag location is not present the command will create a new Api Spec with default values based on the flag values. Otherwise, the exchange.json file will be created based on the Api Specification file passed on the location flag.
USAGE
$ anypoint-cli-api-project-plugin api-project generate --name <value> [--api-spec-location <value>] [-l <value>]
[--api-version <value>] [--main <value>] [--json] [--classifier
raml-fragment|raml|oas|oas-components|evented-api|json-schema|avro-schema] [--format yaml|json] [--format-version
<value>] [--group-id <value>] [--asset-id <value>] [--asset-version <value>] [--fragment-type
trait|resource-type|library|overlay|extension|type|user-documentation|example|annotation-type|security-scheme]
FLAGS
-l, --location=<value> Location where the project will be generated
--api-spec-location=<value> Location to the api Spec file for the new API Project
--api-version=<value> Override the default (v1) Api Version in the exchange.json descriptor file
--asset-id=<value> Asset Name (GAV)
--asset-version=<value> Asset Version (GAV)
--classifier=<option> [default: oas] Define the Project Type
<options: raml-fragment|raml|oas|oas-components|evented-api|json-schema|avro-schema>
--format=<option> [default: yaml] Define Api Spec Format Type
<options: yaml|json>
--format-version=<value> Define Api Spec Format Type Version
--fragment-type=<option> The fragment type. Always use with --classifier raml-fragment, even for OAS 3.0 and JSON
schema fragments. This field is required if the type flag was set as raml-fragment
<options: trait|resource-type|library|overlay|extension|type|user-documentation|example|a
nnotation-type|security-scheme>
--group-id=<value> Group Id (GAV)
--json Format the default standard output to JSON
--main=<value> Override the default main file name
--name=<value> (required) Api Project Name, this will be the directory name and the default Api
Specification main file name
DESCRIPTION
Generate a new Api Project (exchange.json file). By default, if the flag location is not present the command will
create a new Api Spec with default values based on the flag values. Otherwise, the exchange.json file will be created
based on the Api Specification file passed on the location flag.
EXAMPLES
Generate a new Project Api from scrath named 'example-1' in the current directory, by default based on OAS
Specification 3.0.
$ anypoint-cli-api-project-plugin api-project generate --name=example-1
Generate a new Project Api from scrath named 'example-2' in the current directory, based on RAML Specification 1.0.
$ anypoint-cli-api-project-plugin api-project generate --name=example-2 --classifier=raml
Generate a new Project Api from scrath named 'example-3' in the current directory, by default based in OAS
Specification 3.0.
$ anypoint-cli-api-project-plugin api-project generate --name=example-3 \
--group-id=c8531dch-471c-479z-87ce-b3886d05b8ad --asset-id=assetName --asset-version=2.3.0
Generate a new Project Api from scrath named 'example-4' in the LOCATION directory, by default based on OAS
Specification 3.0.
$ anypoint-cli-api-project-plugin api-project generate --name=example-4 --location=~/projects/example4
Generate a new Project Api based on the Api Specification (valid.raml) specified in the location flag named
'example-5'.
$ anypoint-cli-api-project-plugin api-project generate --name=example-5 \
--location=~/projects/example5/valid.raml
anypoint-cli-api-project-plugin api-project publish
Validate the Api Project syntax and rulesets and Publish the project to Exchange.
USAGE
$ anypoint-cli-api-project-plugin api-project publish [--password <value> [--username <value> | --client_id <value> |
]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
<value>] [--collectMetrics] [-l <value>] [--skip-validation rulesets] [--tag <value>] [--custom-raml-tag <value>]
[--group-id <value>] [--asset-id <value>] [--asset-version <value>] [--json]
FLAGS
-l, --location=<value> [default: ./] Path to the API Project directory to Publish
--asset-id=<value> Asset Name (GAV)
--asset-version=<value> Asset Version (GAV)
--bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
--client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
--client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
--collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
--custom-raml-tag=<value> Name of the custom tag defined in the Raml Api Spec, to get custom tags values
--environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
--group-id=<value> Group Id (GAV)
--host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
environment variable.
--json Format the default standard output to JSON
--organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
--password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
--skip-validation=<option>... Validations to skip
<options: rulesets>
--tag=<value>... Add tags to Api Project
--username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
DESCRIPTION
Validate the Api Project syntax and rulesets and Publish the project to Exchange.
EXAMPLES
Validates the syntax and the rulesets defined in the API Project case that the validation passes, the project will
be Published to Exchange.
$ anypoint-cli-api-project-plugin api-project publish --l=./projectPath
Validates the syntax and the rulesets defined in the API Project case that the validations doesn't pass, can skip
them adding the skip-validation flag, so that the project will be published anyway.
$ anypoint-cli-api-project-plugin api-project publish --l=./projectPath --skip-validation=rulesets
Publish the project with another name or in another organization.
$ anypoint-cli-api-project-plugin api-project publish --l=./projectPath \
--group-id=c8531dch-471c-479z-87ce-b3886d05b8ad --asset-id=assetName --asset-version=2.3.0
anypoint-cli-api-project-plugin api-project validate
Validate an API Project definition
USAGE
$ anypoint-cli-api-project-plugin api-project validate [--password <value> [--username <value> | --client_id <value> |
]] [--client_secret <value> ] [--bearer <value> | | ] [--organization <value>] [--environment <value>] [--host
<value>] [--collectMetrics] [--local-ruleset <value>] [--ruleset <value>] [-l <value>] [-c] [--custom-raml-tag
<value>] [--filter-by <value>] [--page-size <value> | --json] [--junit] [--junit-loc <value>] [--local-policy
<value>] [--policy <value>]
FLAGS
-c, --centralized-rulesets Validates against centralized rulesets (API Governance Profiles)
-l, --location=<value> [default: ./] Path to the API Project directory to validate
--bearer=<value> Token Bearer. You can define this in the ANYPOINT_BEARER environment variable.
--client_id=<value> Client ID. You can define this in the ANYPOINT_CLIENT_ID environment variable.
--client_secret=<value> Client Secret. You can define this in the ANYPOINT_CLIENT_SECRET environment variable.
--collectMetrics collect metrics. You can define this in the COLLECT_METRICS environment variable.
--custom-raml-tag=<value> Name of the custom tag defined in the Raml Api Spec, to get custom tags values
--environment=<value> Environment Name. You can define this in the ANYPOINT_ENV environment variable.
--filter-by=<value>... Enables you to apply filters against the result report. Specify a multiple filters where
each filter has a type and value in the format filterField:filtervalue.
Example: --filter-by Severity:Warning
--host=anypoint.mulesoft.com [default: anypoint.mulesoft.com] Host URL. You can define this in the ANYPOINT_HOST
environment variable.
--json Format the default standard output to JSON
--junit Create a new junit format report based on the validation report
--junit-loc=<value> [default: ./] Specify the directory of junit report based.
--local-policy=<value>... [default: ] Policy path to files to add to validation
--local-ruleset=<value>... [default: ] Ruleset path to files to add to validation
--organization=<value> Organization Name. You can define this in the ANYPOINT_ORG environment variable.
--page-size=<value> Displays the content of Report in n lines.
--password=<value> Password. You can define this in the ANYPOINT_PASSWORD environment variable.
--policy=<value>... [default: ] Remote Policy groupid/assetid/version (GAV) to add to validation
--ruleset=<value>... [default: ] Remote Ruleset groupid/assetid/version (GAV) to add to validation
--username=<value> Username. You can define this in the ANYPOINT_USERNAME environment variable.
DESCRIPTION
Validate an API Project definition
EXAMPLES
Validates the syntax and the governance rulesets in the project passed in the flag location, the rulesets have to be
defined in the dependencies property in exchange.json file.
$ anypoint-cli-api-project-plugin api-project validate --l=./projectPath
Validates the syntax and the governance rulesets in the project passed in the flag location. Also in this case the
CLI download the ruleset specified in the ruleset flag with the asset identifier.
An asset identifier is a group ID, asset ID, and version (GAV) that uniquely identifies each asset in Exchange.
$ anypoint-cli-api-project-plugin api-project validate --l=./projectPath --ruleset \
68ef9520-24e9-4cf2-b2f5-620025690913/anypoint-best-practices/1.0.0
Validates the syntax and the governance rulesets in the project passed in the flag location. Also in this case the
CLI applies the ruleset located in the directory specified in the local-ruleset flag.
$ anypoint-cli-api-project-plugin api-project validate --location=./projectPath --local-ruleset \
~/mule/examples/demo/rulesets/
Validates the syntax and the governance rulesets in the project passed in the flag location. Also in this case the
CLI download and apply the rulesets that matches in the API Governance Profiles with the project to validate.
$ anypoint-cli-api-project-plugin api-project validate --l=./projectPath --centralized-rulesets
anypoint-cli-api-project-plugin conf [KEY] [VALUE]
Manage authentication credentials in a configuration file (config.json)
USAGE
$ anypoint-cli-api-project-plugin conf [KEY] [VALUE] [-h] [-k <value>] [-v <value>] [-d]
ARGUMENTS
KEY key of the config
VALUE value of the config
FLAGS
-d, --delete delete config key
-h, --help Show CLI help.
-k, --key=<value> key of the config
-v, --value=<value> value of the config
DESCRIPTION
Manage authentication credentials in a configuration file (config.json)
by adding and removing key value pairs. Set one key value pair per command execution.
CLI config file: ~/Library/Preferences/anypoint-cli-v4-nodejs/config.json
EXAMPLES
$ anypoint-cli-api-project-plugin conf username myuser
$ anypoint-cli-api-project-plugin conf password mypwd
anypoint-cli-api-project-plugin help [COMMAND]
Display help for anypoint-cli-api-project-plugin.
USAGE
$ anypoint-cli-api-project-plugin help [COMMAND] [-n]
ARGUMENTS
COMMAND Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for anypoint-cli-api-project-plugin.
See code: @oclif/plugin-help
anypoint-cli-api-project-plugin version
USAGE
$ anypoint-cli-api-project-plugin version
See code: @oclif/plugin-version
FAQs
Api Project CLI
The npm package anypoint-cli-api-project-plugin receives a total of 28 weekly downloads. As such, anypoint-cli-api-project-plugin popularity was classified as not popular.
We found that anypoint-cli-api-project-plugin demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.