@@ -1,14 +1,35 @@
1−# CompaREST
1+# compaREST
3−[](https://hackage.haskell.org/package/comparest)
3+[](https://hackage.haskell.org/package/comparest)
4−[](http://stackage.org/lts/package/comparest)
4+[](http://stackage.org/lts/package/comparest)
5[](http://stackage.org/nightly/package/comparest)
5[](http://stackage.org/nightly/package/comparest)
6[](LICENSE)
6[](LICENSE)
8Compatibility checker for OpenAPI
8Compatibility checker for OpenAPI
10+## Using compaREST in Github Actions
12+Add the following step to your Github Actions workflow:
15+- uses: typeable/comparest
16+ if: ${{ github.event_name == 'pull_request' }}
18+ old: old-openapi.yaml
19+ new: new-openapi.yaml
22+The `new` and `old` values should be paths to your OpenAPI specifications you want to compare.
24+You will get something like this in your pull requests:
26+
28+For more detail please see our [integration guide](docs/Integration_guide.md).
11−## Your situation
32+### Your situation
13You are developing a very important server with a REST API. You have clients who use your API that you do not control. Say, you are also developing a mobile app that uses your API and you can't force someone to update to the latest version. (Or you prefer not to for UX reasons.)
34You are developing a very important server with a REST API. You have clients who use your API that you do not control. Say, you are also developing a mobile app that uses your API and you can't force someone to update to the latest version. (Or you prefer not to for UX reasons.)
@@ -75,7 +96,7 @@ components:
75 $ref: "#/components/schemas/Pet"
96 $ref: "#/components/schemas/Pet"
78−## Evolving your product
99+### Evolving your product
80Enthused over your initial success you hurry to release a new and improved version of your API and mobile app.
101Enthused over your initial success you hurry to release a new and improved version of your API and mobile app.
@@ -144,7 +165,7 @@ components:
145Looking at the very large and complex API description, you grow more and more concerned that your old mobile app might stop working when you update the server. But the spec is too large and too complex to reasonably assess this manually.
166Looking at the very large and complex API description, you grow more and more concerned that your old mobile app might stop working when you update the server. But the spec is too large and too complex to reasonably assess this manually.
147−## Assessing compatibility automatically
168+### Assessing compatibility automatically
149Luckily, you have access to compaREST which can programmatically analyze your APIs and determine what, if anything, breaks compatibility and what doesn't.
170Luckily, you have access to compaREST which can programmatically analyze your APIs and determine what, if anything, breaks compatibility and what doesn't.
@@ -158,15 +179,15 @@ Running this command will output a file `report.md`, containing the compatibilit
159> # Summary
180> # Summary
161−> | [⚠️ Breaking changes](#breaking-changes) | [🙆 Non-breaking changes](#non-breaking-changes) | 🤷 Unsupported feature changes |
182+> | [❌ Breaking changes](#breaking-changes) | [⚠️ Non-breaking changes](#non-breaking-changes) |
162−> |------------------------------------------|-------------------------------------------------|-------------------------------|
183+> |------------------------------------------|--------------------------------------------------|
163−> | 5 | 6 | 0 |
184+> | 5 | 6 |
165−> # <span id="breaking-changes"></span>⚠️ Breaking changes
186+> # <span id="breaking-changes"></span>❌ Breaking changes
167> ## **GET** /pets
188> ## **GET** /pets
169−> ### 📱⬅️ JSON Response – 200
190+> ### ⬅️☁️ JSON Response – 200
171> #### `$[*].name(String)`
192> #### `$[*].name(String)`
@@ -176,7 +197,7 @@ Running this command will output a file `report.md`, containing the compatibilit
177> ## **POST** /pets
198> ## **POST** /pets
179−> ### 📱➡️ JSON Request
200+> ### ➡️☁️ JSON Request
181> #### `$.weight`
202> #### `$.weight`
@@ -191,7 +212,7 @@ Running this command will output a file `report.md`, containing the compatibilit
192> Value is now a multiple of 1.0.
213> Value is now a multiple of 1.0.
194−> # <span id="non-breaking-changes"></span>🙆 Non-breaking changes
215+> # <span id="non-breaking-changes"></span>⚠️ Non-breaking changes
196> ## **GET** /pets
217> ## **GET** /pets
@@ -203,7 +224,7 @@ Running this command will output a file `report.md`, containing the compatibilit
204> Upper bound changed from 20.0 inclusive to 30.0 inclusive.
225> Upper bound changed from 20.0 inclusive to 30.0 inclusive.
206−> ### 📱⬅️ JSON Response – 200
227+> ### ⬅️☁️ JSON Response – 200
208> #### `$[*].weight`
229> #### `$[*].weight`
@@ -220,7 +241,7 @@ Running this command will output a file `report.md`, containing the compatibilit
221> ## **POST** /pets
242> ## **POST** /pets
223−> ### 📱➡️ JSON Request
244+> ### ➡️☁️ JSON Request
225> #### `$.name(String)`
246> #### `$.name(String)`
@@ -230,7 +251,7 @@ Running this command will output a file `report.md`, containing the compatibilit
231You now know exactly in what situations and in what way your 1.0 version of the app will break if you deploy your 1.1 version of the server.
252You now know exactly in what situations and in what way your 1.0 version of the app will break if you deploy your 1.1 version of the server.
233−## Additional formats
254+### Additional formats
235You can also produce a self-contained HTML report that you can open in your browser by simply omitting the file extension of the output file:
256You can also produce a self-contained HTML report that you can open in your browser by simply omitting the file extension of the output file:
@@ -238,7 +259,9 @@ You can also produce a self-contained HTML report that you can open in your brow
238docker run --rm -v $(pwd):/data:rw typeable/comparest --client /data/api-1.0.0.yaml --server /data/api-1.1.0.yaml --output /data/report
259docker run --rm -v $(pwd):/data:rw typeable/comparest --client /data/api-1.0.0.yaml --server /data/api-1.1.0.yaml --output /data/report
241−# CLI docs
262+## CLI docs
264+For more detail please see our [user guide](docs/User_guide.md).
244Usage: comparest (-c|--client ARG) (-s|--server ARG)
267Usage: comparest (-c|--client ARG) (-s|--server ARG)