Skip to content

Commit bd9958b

Browse files
committed
Readme update
1 parent 7f32c78 commit bd9958b

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

README.md

Lines changed: 33 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Raml Toolkit <!-- omit in toc -->
22

3-
A collection of raml tools for commerce cloud and beyond
3+
A collection of raml an OAS tools for commerce cloud and beyond
44

55
[![CircleCI][circleci-image]][circleci-url]
66

@@ -26,13 +26,42 @@ npm install -g @commerce-apps/raml-toolkit
2626

2727
## Usage
2828

29-
The npm installs the binaries as both `raml-toolkit` and `ramlint` and they can be used interchangeably. You can always run with `--help` to get available options, currently the options are as follows.
29+
Npm installs the binaries as both `raml-toolkit` and `ramlint` and they can be used interchangeably. You can always run with `--help` to get available options, currently the options are as follows.
3030

31-
### Commands
31+
## Commands
3232

3333
**Note:** Some commands require environment variables to be set. This can be done using a [.env file](https://www.npmjs.com/package/dotenv#rules) in your working directory (the directory from which you run `raml-toolkit`).
3434

35-
<!-- commands -->
35+
### Commands for OAS
36+
37+
- [`raml-toolkit diff BASE NEW -s oas`](#raml-toolkit-diff-base-new-s-oas)
38+
- [`raml-toolkit download`](#raml-toolkit-download)
39+
40+
#### `raml-toolkit diff BASE NEW -s oas`
41+
42+
**Note:** This command requires that oasdiff is. installed. Install oasdiff according to https://github.com/oasdiff/oasdiff#installation
43+
44+
USAGE
45+
$ raml-toolkit diff BASE NEW -s oas
46+
47+
ARGUMENTS
48+
BASE The base API spec file or directory
49+
NEW The new API spec file or directory
50+
51+
OPTIONS
52+
-f, --format=(json|console) Format of the output. Defaults to JSON if --out-file is specified,
53+
otherwise text.
54+
55+
-o, --out-file=out-file File to store the computed difference
56+
57+
--dir Find the differences for files in two directory trees
58+
59+
-s, --spec Toggles OAS mode. Set this to `oas`. Otherwise, the command will run the RAML version
60+
61+
62+
### Commands for RAML
63+
64+
<!-- commands for RAML -->
3665
- [`raml-toolkit diff BASE NEW`](#raml-toolkit-diff-base-new)
3766
- [`raml-toolkit download`](#raml-toolkit-download)
3867
- [`raml-toolkit lint [FILENAME]`](#raml-toolkit-lint-filename)

src/diff/oasDiff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { execSync } from "child_process";
1717
async function _saveOrLogOas(changes: string, flags): Promise<void> {
1818
const file = flags["out-file"];
1919
if (file) {
20-
console.log("Saving results to file");
20+
console.log(`API Changes found! Saving results to file ${file}`);
2121
if (flags.format === "json") {
2222
console.log("Using json format");
2323
await fs.writeJson(file, JSON.parse(changes));

0 commit comments

Comments
 (0)