Skip to main content

swagger-diff

Project description

swaggerjmx-diff

Build Status PyPI PyPI - Python Version GitHub top language PyPI - Downloads GitHub stars https://blog.csdn.net/flower_drop

安装

pip install swaggerjmx-diff

仓库地址:

适用场景

  1. 由于接口测试脚本编写耗时,而且需要持续维护,耗时耗力,使用此工具可以一键生成接口测试脚本.
  2. swagger-ui接口文档一键生成jmx文件供jmeter使用.

功能

  1. 对比2个 swagger json 是否有变化,监控 swagger的变动
  2. 将新增/修改 的接口 组装成新的 swagger json

Demo

# -*- coding: utf-8 -*-

from swaggerjmx_diff.diff import *

with open('open-api-v1.json', 'r', encoding='utf8')as fp:
    json_data_v1 = json.load(fp)

with open('open-api-v2.json', 'r', encoding='utf8')as fp:
    json_data_v2 = json.load(fp)

contrast_result, result = contrast_swagger(json_data_v1, json_data_v2)

format_swagger_v2(diff_result=contrast_result, latest_swagger=json_data_v2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

swaggerjmx-diff-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Built Distribution

swaggerjmx_diff-1.0.0-py3-none-any.whl (4.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page