Skip to content

Commit

Permalink
v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Sayi authored May 16, 2018
1 parent 38ad923 commit e9f53e5
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

Compare two swagger API specifications(1.x or v2.0) and render the difference to html file or markdown file.

## Command line interface (CLI)
## :black_large_square: Command line interface (CLI)

```shell
$ java -jar swagger-diff.jar --help
Usage: java -jar swagger-diff.jar [options]
Expand Down Expand Up @@ -57,20 +58,17 @@ java -jar swagger-diff.jar \
## Usage
SwaggerDiff can read swagger api spec from json file or http.
```java
final String SWAGGER_V2_DOC1 = "petstore_v2_1.json";
final String SWAGGER_V2_DOC2 = "http://petstore.swagger.io/v2/swagger.json";

SwaggerDiff diff = SwaggerDiff.compareV2(SWAGGER_V2_DOC1, SWAGGER_V2_DOC2);
SwaggerDiff diff = SwaggerDiff.compareV2("petstore_v2_1.json", "http://petstore.swagger.io/v2/swagger.json");
```
## Swagger version
v1.x
```java
SwaggerDiff.compareV1(SWAGGER_V1_DOC1, SWAGGER_V1_DOC2);
SwaggerDiff.compareV1("petstore_v1_1.json", "petstore_v1_2.json");
```

v2.0
```java
SwaggerDiff.compareV2(SWAGGER_V2_DOC1, SWAGGER_V2_DOC2);
SwaggerDiff.compareV2("petstore_v2_1.json", "petstore_v2_2.json");
```

## Render difference
Expand Down

0 comments on commit e9f53e5

Please sign in to comment.