Skip to content

Commit

Permalink
Merge pull request #51 from znsio/npm-docs
Browse files Browse the repository at this point in the history
Documentation Update: Specmatic NPM Commands For Getting Started and Backward Compatibility Tests
  • Loading branch information
harikrishnan83 authored Feb 2, 2024
2 parents 329c02b + 6ad407b commit f5386f9
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions _includes/setup_command_line.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ java -jar specmatic.jar
{% endtab %}
{% tab install npm %}

Install specmatic npm package
Install specmatic npm package globally

``` bash
npm install -g specmatic
```

Run specmatic by
Or you can run specmatic without installing it as below

``` bash
$ npx specmatic
npx specmatic
```
{% endtab %}

Expand Down
20 changes: 20 additions & 0 deletions documentation/backward_compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ Run the specmatic compare command to confirm this, and see the result:
java -jar specmatic.jar compare api_products_v1.yaml api_products_v2.yaml
```
{% endtab %}
{% tab compare npm %}
```bash
npx specmaitc compare api_products_v1.yaml api_products_v2.yaml
```
{% endtab %}
{% tab compare docker %}
```bash
docker run -v "/local-directory:/specs" znsio/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
Expand Down Expand Up @@ -218,6 +223,11 @@ Now try it again:
java -jar specmatic.jar compare api_products_v1.yaml api_products_v2.yaml
```
{% endtab %}
{% tab compare2 npm %}
```bash
npx specmaitc compare api_products_v1.yaml api_products_v2.yaml
```
{% endtab %}
{% tab compare2 docker %}
```bash
docker run -v "/local-directory:/specs" znsio/specmatic compare "/specs/api_products_v1.yaml" "/specs/api_products_v2.yaml"
Expand Down Expand Up @@ -252,6 +262,11 @@ Then to confirm that it is a backward compatible change, before committing the c
java -jar specmatic.jar compatible git file ./run/specmatic/examples/api_products_v1.yaml
```
{% endtab %}
{% tab git-compare npm %}
```bash
npx specmatic compatible git file api_products_v1.yaml
```
{% endtab %}
{% tab git-compare docker %}
```bash
docker run -v "/git-repo:/git-repo" znsio/specmatic compatible git file "/git-repo/api_products_v1.yaml"
Expand All @@ -277,6 +292,11 @@ You can do this with the following command:
java -jar specmatic.jar compatible git commits api_products_v1.yaml HEAD HEAD^1
```
{% endtab %}
{% tab ci-compare npm %}
```bash
npx specmatic compatible git commits api_products_v1.yaml HEAD HEAD^1
```
{% endtab %}
{% tab ci-compare docker %}
```bash
docker run -v "/git-repo:/git-repo" znsio/specmatic compatible git commits "/git-repo/api_products_v1.yaml" HEAD HEAD^1
Expand Down

0 comments on commit f5386f9

Please sign in to comment.