- Fix bug by deprecating
deployment
argument from exchange downloadersearch
command the argument is now optional and ignored. - Fix bug by deprecating
deployment
argument fromgetVersionByDeployment
the argument is now optional and ignored. - Fix bug by deprecating download command flags
-D, --deployment, --deployment-regex-flags
the options are now ignored. - Added custom field for class name if defined in RAML.
- Added new template helpers
getMediaTypeFromRequest
andisRequestWithPayload
. - Improved logging while rendering templates.
- TypeScript test files in
/resources
will no longer be published.
- Added new
parent
property toApiMetadata
. When a new instance is created with children, the new instance is set as the parent of each child instance.
- Disabled the linting rule which checked for presence of duplicate display names in RAMLs because it caused serious performance degradation
- Fixed the issue due to which raml-toolkit lint command was consuming too much memory and taking too much time to complete.
- Minor bug fixes
- Added
isTraitDefinition
Handlebars helper to test whether an object is an AMF model of a RAML trait. - Refactored validation profiles to import rules from libraries. The rules are unchanged, but they are now available for use in custom validation profiles.
- Updated profile validation rules to use SPARQL
- Minor bug fixes
- Added additional documentation for utilizing the Delta Checker
- Security updates
- Added Non-Breaking rule to detect addition of endpoint operations in Delta Checker
- Add retry option to fetch
- Fixed resource-name-validation rule in SLAS profile
- Upgraded AMF to v4.3.0
- Minor bug fixes
- NEW FEATURE Added new console formatter for diff command, see the README.
- BUG FIX RAML files with correct deployment tags are now downloaded
- NEW FEATURE Added CLI commands to download raml files directly from exchange
- NEW FEATURE Added ability to render templates from an API model
- Exports have been reorganized to match associated CLI commands
- Added additional ignore rules and other enhancements to the difftool to ensure a better signal to noise ratio.
- Added new profile for slas
- updated to typescript 3.9
- Added flag to
diff
command that adds the ability to find the difference between directories.
For complete documentation of the diff
command, see the README.
NEW USAGE
$ raml-toolkit diff --dir BASE NEW
ARGUMENTS
BASE The base API configuration file
NEW The new API configuration file
OPTIONS
-o, --out-file=out-file File to store the computed difference
DESCRIPTION
This command has three modes: ruleset, diff-only, and directory.
Directory mode compares all the files in two directories and determines if there are any differences.
In directory mode, the arguments must be API configuration (JSON) files.
Exit statuses:
0 - No differences found
1 - Differences found
2 - Evaluation could not be completed
- Added
diff
anddownload
commands.
Takes two API spec files as input and outputs the differences.
USAGE
$ raml-toolkit diff APISPECBASEPATH APISPECNEWPATH
ARGUMENTS
APISPECBASEPATH The base API spec file for the comparison
APISPECNEWPATH The new version of the API spec for comparison against the base version
OPTIONS
-h, --help show CLI help
-r, --ruleset=ruleset Path to ruleset to apply to diff
-v, --version show CLI version
--diff-only Only show differences without evaluating a ruleset. The exit status in this mode is 0 for no
changes, 1 for any difference and 2 when unsuccessful.
DESCRIPTION
By default, a ruleset is applied to determine if changes are breaking. Exit status is:
0 - all changes are non-breaking
1 - any changes are breaking
2 - evaluation could not be completed
The ruleset flag is used to evaluate a custom ruleset in place of the default rules. The diff-only flag disables
evaluation against any ruleset.
Download API specification files from Anypoint Exchange
USAGE
$ raml-toolkit download
OPTIONS
-D, --deployment=deployment [default: .] Deployment status to filter results from Anypoint
Exchange
-c, --config-file=config-file [default: api-config.json] Name of the target file to save the API
config
-d, --dest=dest [default: apis] Directory to download APIs into
-h, --help show CLI help
-s, --search=search Search query to filter results from Anypoint Exchange
--deployment-regex-flags=deployment-regex-flags RegExp flags to specify for advanced deployment matching
- Changed TypeScript annotations for
parseRamlFile
andresolveApiModel
to more accurateamf.model.document.Document
. - Added
amf-client-js
as an export (asamf
)
- Mercury rules updated
- Template parameters must be camelCase
- BaseURI pattern check slightly refactored
- Display Name must unique across an api definition
- RAML -> AMF code has been migrated from the commerce-sdk to the raml-toolkit
- Error messaging has been greatly improved
- You will get a specific error now when a profile fails to parse
- Now uses AMF 4.0!
- Fixed an issue where some transitive dependencies weren't resolved properly
baseUri
must now match the pattern -https://{shortCode}.api.commercecloud.salesforce.com/<api-family>/<api-name>/{version}
- Dependency issue fixed
- All the raml-toolkit code is now written in Typescript.
- Fixes the issue where transitive dependencies of the target RAML could not be parsed.
- Adds logging capability and allows the logging level to be configured.
import { ramlToolLogger } from "@commerce-apps/raml-toolkit";
ramlToolLogger.setLevel(ramlToolLogger.levels.INFO);