Sayi / Swagger Diff
Licence: apache-2.0
🎿 Compare two swagger API specifications(1.x or v2.0)
Stars: ✭ 161
Programming Languages
java
68154 projects - #9 most used programming language
Projects that are alternatives of or similar to Swagger Diff
Openapi Diff
Utility for comparing two OpenAPI specifications.
Stars: ✭ 208 (+29.19%)
Mutual labels: swagger, diff
Kotlin Openapi Spring Functional Template
🍃 Kotlin Spring 5 Webflux functional application with api request validation and interactive api doc
Stars: ✭ 159 (-1.24%)
Mutual labels: swagger
Go Micro Boilerplate
The boilerplate of the GoLang application with a clear microservices architecture.
Stars: ✭ 147 (-8.7%)
Mutual labels: swagger
Deepdiff
🦀Amazingly incredible extraordinary lightning fast diffing in Swift
Stars: ✭ 1,995 (+1139.13%)
Mutual labels: diff
Raml Server
run a mocked server JUST based on a RAML API's definition .. zero coding
Stars: ✭ 158 (-1.86%)
Mutual labels: swagger
Php Htmldiff
A library for comparing two HTML files/snippets and highlighting the differences using simple HTML. Includes support for comparing complex lists and tables
Stars: ✭ 145 (-9.94%)
Mutual labels: diff
Psswagger
The cmdlet generator from OpenAPI (f.k.a Swagger) specification
Stars: ✭ 160 (-0.62%)
Mutual labels: swagger
Study
全栈工程师学习笔记;Spring登录、shiro登录、CAS单点登录和Spring boot oauth2单点登录;Spring data cache 缓存,支持Redis和EHcahce; web安全,常见web安全漏洞以及解决思路;常规组件,比如redis、mq等;quartz定时任务,支持持久化数据库,动态维护启动暂停关闭;docker基本用法,常用image镜像使用,Docker-MySQL、docker-Postgres、Docker-nginx、Docker-nexus、Docker-Redis、Docker-RabbitMQ、Docker-zookeeper、Docker-es、Docker-zipkin、Docker-ELK等;mybatis实践、spring实践、spring boot实践等常用集成;基于redis的分布式锁;基于shared-jdbc的分库分表,支持原生jdbc和Spring Boot Mybatis
Stars: ✭ 159 (-1.24%)
Mutual labels: swagger
Prism
Turn any OpenAPI2/3 and Postman Collection file into an API server with mocking, transformations and validations.
Stars: ✭ 2,484 (+1442.86%)
Mutual labels: swagger
Composer Lock Diff
See what has changed after a composer update
Stars: ✭ 154 (-4.35%)
Mutual labels: diff
Morphlingjs
A CLI to mock with meaningful data a REST API from a Swagger file
Stars: ✭ 148 (-8.07%)
Mutual labels: swagger
Swagger meqa
Auto generate and run tests using swagger/OpenAPI spec, no coding needed
Stars: ✭ 151 (-6.21%)
Mutual labels: swagger
Ginrpc
gin auto binding,grpc, and annotated route,gin 注解路由, grpc,自动参数绑定工具
Stars: ✭ 157 (-2.48%)
Mutual labels: swagger
Graphtage
A semantic diff utility and library for tree-like files such as JSON, JSON5, XML, HTML, YAML, and CSV.
Stars: ✭ 2,062 (+1180.75%)
Mutual labels: diff
swagger-diff
Compare two swagger API specifications(1.x or v2.0) and render the difference to html file or markdown file.
⬛️ Command line interface (CLI)
$ java -jar swagger-diff.jar --help
Usage: java -jar swagger-diff.jar [options]
Options:
* -old
old api-doc location:Json file path or Http url
* -new
new api-doc location:Json file path or Http url
-v
swagger version:1.0 or 2.0
Default: 2.0
-output-mode
render mode: markdown or html
Default: markdown
--help
--version
swagger-diff tool version
Here is one command-line example(-old
and -new
is required, -v
and -output-mode
is optional):
java -jar swagger-diff.jar \
-old http://petstore.swagger.io/v2/swagger.json \
-new http://petstore.swagger.io/v2/swagger.json \
-v 2.0 \
-output-mode html > diff.html
Download the fatJar or view the changelog on the Release Page, and thanks to all contributors.
Feature
- Supports swagger spec v1.x and v2.0.
- Depth comparison of parameters, responses, notes, http method(GET,POST,PUT,DELETE...)
- Supports swagger api Authorization
- Render difference of property with Expression Language
- html & markdown render
- Command line interface
Maven
<dependency>
<groupId>com.deepoove</groupId>
<artifactId>swagger-diff</artifactId>
<version>1.2.2</version>
</dependency>
Gradle
compile group: 'com.deepoove', name: 'swagger-diff', version: '1.2.2'
Usage
SwaggerDiff can read swagger api spec from json file or http.
SwaggerDiff diff = SwaggerDiff.compareV2("petstore_v2_1.json", "http://petstore.swagger.io/v2/swagger.json");
Swagger version
v1.x
SwaggerDiff.compareV1("petstore_v1_1.json", "petstore_v1_2.json");
v2.0
SwaggerDiff.compareV2("petstore_v2_1.json", "petstore_v2_2.json");
Render difference
HTML
String html = new HtmlRender("Changelog",
"http://deepoove.com/swagger-diff/stylesheets/demo.css")
.render(diff);
try {
FileWriter fw = new FileWriter("testNewApi.html");
fw.write(html);
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
Markdown
String render = new MarkdownRender().render(diff);
try {
FileWriter fw = new FileWriter("testDiff.md");
fw.write(render);
fw.close();
} catch (IOException e) {
e.printStackTrace();
}
### What's New
---
* `GET` /pet/{petId} Find pet by ID
### What's Deprecated
---
* `POST` /pet/{petId} Updates a pet in the store with form data
### What's Changed
---
* `PUT` /pet Update an existing pet
Parameter
Add body.newFeild //a feild demo by sayi
Add body.category.newCatFeild
Delete body.category.name
* `POST` /pet Add a new pet to the store
Parameter
Add tags //add new query param demo
Add body.newFeild //a feild demo by sayi
Add body.category.newCatFeild
Delete body.category.name
* `DELETE` /pet/{petId} Deletes a pet
Parameter
Add newHeaderParam
* `POST` /pet/{petId}/uploadImage uploads an image for pet
Parameter
petId change into not required Notes ID of pet to update change into ID of pet to update, default false
* `POST` /user Create user
Parameter
Add body.newUserFeild //a new user feild demo
Delete body.phone
* `GET` /user/login Logs user into the system
Parameter
Delete password //The password for login in clear text
* `GET` /user/{username} Get user by user name
Return Type
Add newUserFeild //a new user feild demo
Delete phone
* `PUT` /user/{username} Updated user
Parameter
Add body.newUserFeild //a new user feild demo
Delete body.phone
How it works
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].