Skip to content

Commit

Permalink
Merge pull request #25 from kjjuno/feature/docker-readme
Browse files Browse the repository at this point in the history
Improving README files
  • Loading branch information
kjjuno committed Feb 19, 2019
2 parents 8fa16d4 + e74dc5e commit bb4efd0
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 3 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# swagger-compare

makes use of [x-replaced-by] and [x-remove-on] provide a concise summary of api changes.
Provides a concise summary of api changes by making use of [x-replaced-by] and [x-remove-on]

[x-replaced-by]: https://github.com/kjjuno/swagger-extensions/blob/master/x-replaced-by.md
[x-remove-on]: https://github.com/kjjuno/swagger-extensions/blob/master/x-remove-on.md
[x-replaced-by]: https://github.com/kjjuno/swagger-extensions/blob/master/x-replaced-by.md
[x-remove-on]: https://github.com/kjjuno/swagger-extensions/blob/master/x-remove-on.md

| Platform | Badges |
| :------------ | :-------------------------------------------------------------------------------------------------- |
Expand All @@ -29,10 +29,31 @@ makes use of [x-replaced-by] and [x-remove-on] provide a concise summary of api
[docker-pulls-badge]: https://img.shields.io/docker/pulls/kjjuno/swagger-compare.svg?style=flat
[docker-page]: https://hub.docker.com/r/kjjuno/swagger-compare

## Installation
```
npm install -g swagger-compare
```

## Usage

```
swagger-compare [options] <baseline> <new>
{version}
arguments:
baseline path or url to baseline swagger document
new path or url to new swagger document
options:
-f,--format default: yaml. Must be on of [yaml|json]
--help display this help page
--version display the version of swagger-compare
Any paths marked as deprecated that show up only in the <new>
document will be included in the report.
```

## Example
```
swagger-compare https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore.yaml https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore-new.yaml
```
Expand Down
File renamed without changes.
59 changes: 59 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# swagger-compare

Provides a concise summary of api changes by making use of [x-replaced-by] and [x-remove-on]

[x-replaced-by]: https://github.com/kjjuno/swagger-extensions/blob/master/x-replaced-by.md
[x-remove-on]: https://github.com/kjjuno/swagger-extensions/blob/master/x-remove-on.md

## Tags

[latest (Dockerfile)][Dockerfile]

[Dockerfile]: https://github.com/kjjuno/swagger-compare/blob/master/docker/Dockerfile

## Usage

```
docker run --rm kjjuno/swagger-compare [options] <baseline> <new>
{version}
arguments:
baseline path or url to baseline swagger document
new path or url to new swagger document
options:
-f,--format default: yaml. Must be on of [yaml|json]
--help display this help page
--version display the version of swagger-compare
Any paths marked as deprecated that show up only in the <new>
document will be included in the report.
```

## Example

```
docker run --rm kjjuno/swagger-compare https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore.yaml https://raw.githubusercontent.com/kjjuno/swagger-compare/master/test/petstore-new.yaml
```

```yaml
version: 1.0.0
deprecated:
paths:
/v1/pet:
post:
x-replaced-by:
path: /v2/pet
verb: post
x-remove-on: undefined
put:
x-replaced-by: undefined
x-remove-on: 3/4/2019
/v2/pet:
post:
x-replaced-by:
path: /v3/pet
verb: post
x-remove-on: 2/13/2019
```

0 comments on commit bb4efd0

Please sign in to comment.