{
"info": {
"author": "Yelp, Inc.",
"author_email": "opensource+swagger-spec-compatibility@yelp.com",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Topic :: Software Development :: Libraries :: Python Modules"
],
"description": ".. image:: https://img.shields.io/travis/com/Yelp/swagger-spec-compatibility.svg\n :target: https://travis-ci.com/Yelp/swagger-spec-compatibility?branch=master\n\n.. image:: https://img.shields.io/codecov/c/gh/Yelp/swagger-spec-compatibility.svg\n :target: https://codecov.io/gh/Yelp/swagger-spec-compatibility\n\n.. image:: https://img.shields.io/pypi/v/swagger-spec-compatibility.svg\n :target: https://pypi.python.org/pypi/swagger-spec-compatibility/\n :alt: PyPi version\n\n.. image:: https://img.shields.io/pypi/pyversions/swagger-spec-compatibility.svg\n :target: https://pypi.python.org/pypi/swagger-spec-compatibility/\n :alt: Supported Python versions\n\nswagger-spec-compatibility\n==========================\n\nAbout\n-----\n\n\n``swagger-spec-compatibility`` is a Yelp maintained library that provides tools to automatically detect\nthe safety of `Swagger/OpenAPI 2.0 specification `_ changes\nwith respect to **backwards compatibility**.\n\n\n``swagger-spec-compatibility`` aims to give developers confidence that their spec changes are safe and that clients\nbuilt with previous versions of the Swagger spec can continue to communicate correctly.\n\nDocumentation\n-------------\n\nMore documentation is available at `swagger-spec-compatibility.readthedocs.org `__.\n\nHow to Install\n--------------\n\n.. code-block:: bash\n\n # to install the latest released version\n $ pip install swagger-spec-compatiblity\n\n # to install the latest master [from Github]\n $ pip install git+https://github.com/Yelp/swagger-spec-compatibility\n\nExample Usage\n-------------\nThe commands below assume that the library is already installed\n\n.. code-block:: bash\n\n $ swagger_spec_compatibility -h\n\n usage: swagger_spec_compatibility [-h]\n [-r {MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} [{MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} ...]]\n {explain,run} ...\n\n Tool for the identification of backward incompatible changes between two swagger specs.\n\n The tool provides the following level of results:\n - WARNING: the Swagger specs are technically compatible but the are likely to break known Swagger implementations\n - ERROR: new Swagger spec does introduce a breaking change respect the old implementation\n\n positional arguments:\n {explain,run} help for sub-command\n explain explain selected rules\n run run backward compatibility detection\n\n optional arguments:\n -h, --help show this help message and exit\n -r {MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} [{MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} ...], --rules {MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} [{MIS-E001,MIS-E002,REQ-E001,REQ-E002,REQ-E003,RES-E001,RES-E002,RES-E003} ...]\n Rules to apply for compatibility detection. (default:\n ['MIS-E001', 'MIS-E002', 'REQ-E001', 'REQ-E002',\n 'REQ-E003', 'RES-E001', 'RES-E002', 'RES-E003'])\n\n.. code-block:: bash\n\n $ swagger_spec_compatibility explain -r=REQ-E001 -r=REQ-E002 explain\n Rules explanation\n [REQ-E001] Added Required Property in Request contract:\n \tAdding a required property to an object used in requests leads client request to fail if the property is not present.\n [REQ-E002] Removed Enum value from Request contract:\n \tRemoving an enum value from a request parameter is backward incompatible as a previously valid request will not be\n \tvalid. This happens because a request containing the removed enum value, valid according to the \"old\" Swagger spec, is\n \tnot valid according to the new specs.\n\n.. code-block:: bash\n\n $ old_spec_path=docs/source/rules/examples/REQ-E001/old.yaml\n $ new_spec_path=docs/source/rules/examples/REQ-E001/new.yaml\n\n # Run with all the registered rules\n $ swagger_spec_compatibility run ${old_spec_path} ${new_spec_path}\n ERROR rules:\n \t[REQ-E001] Added Required Property in Request contract : #/paths//endpoint/post/parameters/0/schema\n $ echo $?\n 1\n\n # Run with a subset of registered rules\n $ swagger_spec_compatibility -r=MIS-E001 -r=MIS-E002 run ${old_spec_path} ${new_spec_path}\n $ echo $?\n 0\n\nDevelopment\n-----------\n\nCode is documented using `Sphinx `__.\n\n`virtualenv `__ is\nrecommended to keep dependencies and libraries isolated.\n\nSetup\n~~~~~\n\n.. code-block:: bash\n\n # Initialize your dev environment\n $ make minimal\n\n # Ensure that you have activated the virtualenvironment\n $ source ./venv/bin/activate\n\nTip: If you have `aactivator `__ installed the virtual environment will\nbe automatically activated\n\nHow to define a new compatibility rule\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nUse the following steps to define a new rule:\n\n1. Define a new rule class in ``swagger_spec_compatibility/rules/``\n\n.. code-block:: python\n\n # Example of the file content (assume that the file will be named FILE.py)\n class RuleClassName(BaseRule):\n description = ''\n error_code = 'ERROR_CODE'\n error_level = Level.LEVEL\n rule_type = RuleType.TYPE\n short_name = ''\n\n @classmethod\n def validate(cls, left_spec, right_spec):\n # type: (Spec, Spec) -> typing.Iterable[ValidationMessage]\n # Implement here your logic\n raise NotImplemented()\n\n # Please make sure that:\n # * `description` and `short_name` are reasonably explicative to support `swagger_spec_compatibility explain` command\n # * `error_code` has REQ- prefix for `RuleType.REQUEST_CONTRACT`, RES- for `RuleType.RESPONSE_CONTRACT` and MIS- for `RuleType.MISCELLANEOUS`\n\n\n3. Add tests to ensure that your rule behaves as expected (tests in ``tests/rules/FILE_test.py``)\n\n3. Add documentation for the defined rule in ``docs/source/rules/ERROR_CODE.rst``. Try to be consistent with the style\n of the others documentation pages\n\n4. Add example of a Swagger spec change that triggers the rule in ``docs/source/rules/examples/ERROR_CODE.rst``.\n Ensure to define a `tester.py` file that will make explicit the backward incompatible change through the usage of a\n `bravado `_ client (check the other testers for examples).\n **NOTE**: The testers are executed by automated tests, this is intended to ensure that documentation is in sync with\n the codebase.\n5. [Optional] Add integration tests to ensure that no regressions will be introduced and/or to validate edge cases of the new rule.\n Integration tests are defined as follow: ``case---reports-`` directory\n with two files: ``old.yaml`` and ``new.yaml``. The two files represent two versions of the swagger specs that need to be checked for\n backward compatibility.\n\nContributing\n~~~~~~~~~~~~\n\n1. Fork it ( http://github.com/Yelp/swagger-spec-compatibility/fork )\n2. Create your feature branch (``git checkout -b my-new-feature``)\n3. Add your modifications\n4. Commit your changes (``git commit -m \"Add some feature\"``)\n5. Push to the branch (``git push origin my-new-feature``)\n6. Create new Pull Request\n\nLicense\n-------\n\nCopyright 2019 Yelp, Inc.\n\nSwagger Spec Compatibility is licensed with a `Apache License 2.0 `__.\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/Yelp/swagger-spec-compatibility",
"keywords": "",
"license": "Copyright Yelp, Inc. 2018",
"maintainer": "",
"maintainer_email": "",
"name": "swagger-spec-compatibility",
"package_url": "https://pypi.org/project/swagger-spec-compatibility/",
"platform": "",
"project_url": "https://pypi.org/project/swagger-spec-compatibility/",
"project_urls": {
"Homepage": "https://github.com/Yelp/swagger-spec-compatibility"
},
"release_url": "https://pypi.org/project/swagger-spec-compatibility/1.2.0/",
"requires_dist": [
"bravado",
"bravado-core",
"swagger-spec-validator",
"six",
"termcolor",
"typing-extensions",
"venusian",
"functools32 ; python_version<\"3.2\"",
"typing ; python_version<\"3.5\""
],
"requires_python": "",
"summary": "Python library to check Swagger Spec backward compatibility",
"version": "1.2.0"
},
"last_serial": 4993736,
"releases": {
"1.0.0": [
{
"comment_text": "",
"digests": {
"md5": "f28c53eb90dd830aedf7644087365e36",
"sha256": "351216c8b04a93235c074f2107b8a1976344245ff112acf05d49b07661fd4178"
},
"downloads": -1,
"filename": "swagger_spec_compatibility-1.0.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "f28c53eb90dd830aedf7644087365e36",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 34122,
"upload_time": "2019-02-26T16:04:15",
"url": "https://files.pythonhosted.org/packages/80/5d/021b325254be1e041a73101fcabb4a46fe0e73cf75105e8011ea45dd933b/swagger_spec_compatibility-1.0.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "99599c0b719da6a09e6996a334f5cfda",
"sha256": "dd46aed18c1de30249c1b7cc331355f49ff733f503c2fd6ed5b3cbfd94cd1dd0"
},
"downloads": -1,
"filename": "swagger-spec-compatibility-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "99599c0b719da6a09e6996a334f5cfda",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15915,
"upload_time": "2019-02-26T16:04:17",
"url": "https://files.pythonhosted.org/packages/5e/34/ea696e254e119264b47a6611cd195ebca3878ca9e5713487aaa33f367405/swagger-spec-compatibility-1.0.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "c489f27eca0920ccb6471354b35f30c6",
"sha256": "9c22df6cdef17bcf461e2fee4a4c7981159f9301f1a7203632393650eb61c3bb"
},
"downloads": -1,
"filename": "swagger_spec_compatibility-1.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c489f27eca0920ccb6471354b35f30c6",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 36663,
"upload_time": "2019-02-26T17:03:49",
"url": "https://files.pythonhosted.org/packages/41/fb/07893b8f25451982cff570c6d0f9e06deb64f7887cc6a29a377f47681470/swagger_spec_compatibility-1.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "286cf736bf44c9125945b4fdbcb1439c",
"sha256": "41985ef830c83f74cbb51f7037fdeee4f7e7bff79a920d051087f760b6d612f9"
},
"downloads": -1,
"filename": "swagger-spec-compatibility-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "286cf736bf44c9125945b4fdbcb1439c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19242,
"upload_time": "2019-02-26T17:03:51",
"url": "https://files.pythonhosted.org/packages/ef/bc/57b0a954c6a434303e64dbbdb54ab9037546f6fee0705431757ca8c84802/swagger-spec-compatibility-1.0.1.tar.gz"
}
],
"1.1.0": [
{
"comment_text": "",
"digests": {
"md5": "bff8a2411d00c57e4464afb84fe6780c",
"sha256": "bbb4d004b52502e6214a0dc23c73cb50296d7d0a0f2398335922b7a8fe88c20a"
},
"downloads": -1,
"filename": "swagger_spec_compatibility-1.1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "bff8a2411d00c57e4464afb84fe6780c",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 38900,
"upload_time": "2019-03-07T17:05:03",
"url": "https://files.pythonhosted.org/packages/5c/05/67994c8bc5fdd8e10c98162e741443344e61b86695abd0162fb71c24a2b2/swagger_spec_compatibility-1.1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "db71954f91bc188c5834518c3140e873",
"sha256": "4457c6180f00eed416786ff366cfdcd56570c657afeabcad34d6db94407a4210"
},
"downloads": -1,
"filename": "swagger-spec-compatibility-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "db71954f91bc188c5834518c3140e873",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19125,
"upload_time": "2019-03-07T17:05:04",
"url": "https://files.pythonhosted.org/packages/21/e4/9832c80eb3a9ed2d0524e454a8e1a0bd5dbdd716078e08b06ee3619fc988/swagger-spec-compatibility-1.1.0.tar.gz"
}
],
"1.2.0": [
{
"comment_text": "",
"digests": {
"md5": "8c833afb9be29dfb7ff03fcc1fd03de3",
"sha256": "a2215558fec8ef66f7b938c7de8d96efceacfa05e1fa575c7a45d4fcabf4eb01"
},
"downloads": -1,
"filename": "swagger_spec_compatibility-1.2.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c833afb9be29dfb7ff03fcc1fd03de3",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 39277,
"upload_time": "2019-03-27T16:37:22",
"url": "https://files.pythonhosted.org/packages/09/c6/7e7ee99991c5b9d5eed24eecdc8b9ddb976d012344d73a4f80de29f492d3/swagger_spec_compatibility-1.2.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5c4a48398cc2f624bde57e518eced226",
"sha256": "0e9b92660b1297c9e3ae5dd422dd23f33dcc2cea169d585d8946c027cf7b082c"
},
"downloads": -1,
"filename": "swagger-spec-compatibility-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5c4a48398cc2f624bde57e518eced226",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19440,
"upload_time": "2019-03-27T16:37:23",
"url": "https://files.pythonhosted.org/packages/18/74/a4c026fa909688e570f6223e57ec84cf321cf1ec44f8f64a2b26a55e9ca3/swagger-spec-compatibility-1.2.0.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "8c833afb9be29dfb7ff03fcc1fd03de3",
"sha256": "a2215558fec8ef66f7b938c7de8d96efceacfa05e1fa575c7a45d4fcabf4eb01"
},
"downloads": -1,
"filename": "swagger_spec_compatibility-1.2.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "8c833afb9be29dfb7ff03fcc1fd03de3",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 39277,
"upload_time": "2019-03-27T16:37:22",
"url": "https://files.pythonhosted.org/packages/09/c6/7e7ee99991c5b9d5eed24eecdc8b9ddb976d012344d73a4f80de29f492d3/swagger_spec_compatibility-1.2.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5c4a48398cc2f624bde57e518eced226",
"sha256": "0e9b92660b1297c9e3ae5dd422dd23f33dcc2cea169d585d8946c027cf7b082c"
},
"downloads": -1,
"filename": "swagger-spec-compatibility-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "5c4a48398cc2f624bde57e518eced226",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 19440,
"upload_time": "2019-03-27T16:37:23",
"url": "https://files.pythonhosted.org/packages/18/74/a4c026fa909688e570f6223e57ec84cf321cf1ec44f8f64a2b26a55e9ca3/swagger-spec-compatibility-1.2.0.tar.gz"
}
]
}