{ "info": { "author": "hawry", "author_email": "hawry@hawry.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2.7" ], "description": "# deforest\n\n[![PyPI version](https://badge.fury.io/py/deforest.svg)](https://badge.fury.io/py/deforest) [![Build Status](https://travis-ci.com/hawry/deforest.svg?branch=master)](https://travis-ci.com/hawry/deforest)\n\nRemove all `x-amazon`-tags from your Open API 3 or Swagger 2 specification. Useful if you are using Cloudformation to specify your API Gateways, and want to provide your consumers with the same specification but not wanting to disclose your internal Amazon integrations.\n\n# Installation\n\n`pip install --user deforest`\n\n## Features\n\n- Clean keys starting with the string `x-amazon`\n- Handles JSON and YAML input\n- Handles JSON and YAML output (defaults to YAML)\n- Support for AWS CloudFormation templates\n - AWS::ApiGateway::RestApi resource type\n - AWS::Serverless::Api resource type\n\n# Usage\n\n```\nUsage: deforest [OPTIONS] INFILE\n\nOptions:\n -o, --outfile TEXT specify output file, default is\n ./-<version>.<format>, ignored if input is\n a CloudFormation template and the template\n contains more than one ApiGateway resource)\n -f, --format [yaml|json] output format [default: yaml]\n -i, --indent INTEGER if output format is json, specify indentation\n -d, --debug if enabled, show debug logs\n --no-ignore if set, deforest will export paths marked as\n ignored\n --version Show the version and exit.\n --help Show this message and exit.\n```\n\n## CloudFormation templates\n\nVersion 0.1.1 and later supports CloudFormation templates as input. If more than one API Gateway is part of the template, the `--outfile` flag will be ignored.\n\n## Hide paths\n\nVersion 0.2.0 introduced support for deforest to ignore certain paths. If you specify `x-deforest-ignore: true` anywhere in your specification, deforest will not extract its _parent_ node to the end results. Example:\n\n```yaml\npaths:\n \"/validation\":\n post:\n responses:\n \"200\":\n schema:\n type: array\n items:\n \"$ref\": \"#/definitions/Error\"\n headers:\n test-method-response-header:\n type: string\n get:\n x-deforest-ignore: true\n parameters:\n - name: q1\n in: query\n required: true\n responses:\n \"200\":\n schema:\n type: array\n items:\n \"$ref\": \"#/definitions/Error\"\n headers:\n test-method-response-header:\n type: string\n```\n\nwill result in\n\n```yaml\npaths:\n /validation:\n post:\n responses:\n \"200\":\n headers:\n test-method-response-header:\n type: string\n schema:\n items:\n $ref: \"#/definitions/Error\"\n type: array\n```\n\nIf we'd written this:\n\n```yaml\npaths:\n \"/validation\":\n x-deforest-ignore: true\n post:\n responses:\n \"200\":\n schema:\n type: array\n items:\n \"$ref\": \"#/definitions/Error\"\n headers:\n test-method-response-header:\n type: string\n get:\n parameters:\n - name: q1\n in: query\n required: true\n responses:\n \"200\":\n schema:\n type: array\n items:\n \"$ref\": \"#/definitions/Error\"\n headers:\n test-method-response-header:\n type: string\n```\n\nwe'd get an empty result since the _parent_ node is removed:\n\n```yaml\npaths: {}\n```\n\nIf `x-deforest-ignore: false`, or missing, the node will be extracted as usual. If the runtime flag `--no-ignore` is set, the nodes will be extracted as usual as well.\n\n# Limitations\n\nThe output file looses its order of the keys in the file, which shouldn't affect you if you're using a converter to create a graphical documentation/specification - but can be confusing if you have a specific internal order you wish to keep.\n\n# Contribute\n\nIf you wish to see a specific feature, please create an issue in the issue tracker - and if you want to help develop deforest, you're free to create a pull request as well. All submitted code will be subject to the licensing specified in the LICENSE file.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hawry/deforest", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "deforest", "package_url": "https://pypi.org/project/deforest/", "platform": "", "project_url": "https://pypi.org/project/deforest/", "project_urls": { "Homepage": "https://github.com/hawry/deforest" }, "release_url": "https://pypi.org/project/deforest/0.2.3/", "requires_dist": [ "pyyaml (==5.1.1)", "click (==6.7)", "coloredlogs (==10.0)" ], "requires_python": "", "summary": "Remove all x-amazon tags from your OAS3 specification", "version": "0.2.3" }, "last_serial": 6002581, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "2cd3f7d73d897894e161027d0e280c34", "sha256": "aa329ae95d6ef7b011f95c50b1f4e0f3ae3a1da0c57a2f328040e23555f55ed2" }, "downloads": -1, "filename": "deforest-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "2cd3f7d73d897894e161027d0e280c34", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 4099, "upload_time": "2019-06-16T12:55:23", "url": "https://files.pythonhosted.org/packages/fe/6e/4e50d19e2ff402f226de25d1367ab342bec3b4e20b83e009ce48ebf5ead8/deforest-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "018bc600259c5ad0d02208cf6f8ebd8f", "sha256": "5c29d46badd818bcac7e2684a582e30647f4d72cd6c19b8611a72a96383d32c2" }, "downloads": -1, "filename": "deforest-0.1.0.tar.gz", "has_sig": false, "md5_digest": "018bc600259c5ad0d02208cf6f8ebd8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2993, "upload_time": "2019-06-16T12:55:25", "url": "https://files.pythonhosted.org/packages/2b/f0/d1bfa9810850d89323cbc6fd06f5e200d8b7242f5153ace27a3488b981bb/deforest-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "122b72010f0dacfe67e2cc41cdfc4ae3", "sha256": "1293c97d6b39e55c984e2f4d0024a4ffb6f37b8d18257a9caef166e6c477bbbd" }, "downloads": -1, "filename": "deforest-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "122b72010f0dacfe67e2cc41cdfc4ae3", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6229, "upload_time": "2019-10-13T11:11:42", "url": "https://files.pythonhosted.org/packages/6e/d7/140cde4f98cf0ec993dd294bc2176ee770fc71e63a04feff70123b0a201d/deforest-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23c5057b8ed7f323482265835fefdd85", "sha256": "6eab564abfe0c33c1b04803b9a2d48379a6dc6bdfe50acf2edb5f98fe0fb644b" }, "downloads": -1, "filename": "deforest-0.1.1.tar.gz", "has_sig": false, "md5_digest": "23c5057b8ed7f323482265835fefdd85", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4124, "upload_time": "2019-10-13T11:11:50", "url": "https://files.pythonhosted.org/packages/71/fc/68faa665df4431056fd2d16ea84c4c3141531dbe75473c3d8048e3219f76/deforest-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "0d9a34d24b38d53d6ea8927503577ebd", "sha256": "aae4a1ec174b72896f331ad275621ee517963ccbc20e8a1afe0f216ef03b9532" }, "downloads": -1, "filename": "deforest-0.2.0-py2-none-any.whl", "has_sig": false, "md5_digest": "0d9a34d24b38d53d6ea8927503577ebd", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9594, "upload_time": "2019-10-13T14:21:54", "url": "https://files.pythonhosted.org/packages/6b/ff/494e24709e9e3a7dd7d2c2665a51760661c24f3c893109749085d44bc8d3/deforest-0.2.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f523916c8cf845ed82ab00e3a809ac23", "sha256": "072a55ea34d2df99ece87f232a2946e64bccbe487a8548c51dd56092b784ccc2" }, "downloads": -1, "filename": "deforest-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f523916c8cf845ed82ab00e3a809ac23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5462, "upload_time": "2019-10-13T14:21:55", "url": "https://files.pythonhosted.org/packages/7b/86/1d3e1c35c911bd64ad5c8d93eb7e0484043f3dd4abace6722329aaadb9cc/deforest-0.2.0.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "77ea6bffe6d7c4837c04768c89395a88", "sha256": "b4ad500a9a978d94680f0de83809ddfbe7376c9f448e1e0012767f97863dc4f3" }, "downloads": -1, "filename": "deforest-0.2.2-py2-none-any.whl", "has_sig": false, "md5_digest": "77ea6bffe6d7c4837c04768c89395a88", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 9682, "upload_time": "2019-10-14T19:07:30", "url": "https://files.pythonhosted.org/packages/19/b5/04ab27ab32e36da7a3b040e8cabf69d79c8c800fb67ae362c6b14ee11247/deforest-0.2.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5c7258ac58c723a944289eee9cdc015a", "sha256": "048cb54510a0c77e26e6d4fb8cc523de9eda1a5058523276b7caeb8ff15e10c8" }, "downloads": -1, "filename": "deforest-0.2.2.tar.gz", "has_sig": false, "md5_digest": "5c7258ac58c723a944289eee9cdc015a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5592, "upload_time": "2019-10-14T19:07:32", "url": "https://files.pythonhosted.org/packages/b4/7e/7e217c8f5883023c62b31a6f032253994e4354a13c681a4a1d5c017eb825/deforest-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "77520ecf6cfe95f6477dbe04ee146a7a", "sha256": "0effb81e3809289f0a714e321fc90343d70a9314925e5baabfd89c434eebf672" }, "downloads": -1, "filename": "deforest-0.2.3-py2-none-any.whl", "has_sig": false, "md5_digest": "77520ecf6cfe95f6477dbe04ee146a7a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 12832, "upload_time": "2019-10-20T10:28:07", "url": "https://files.pythonhosted.org/packages/8e/31/6606c4853a2f6f9a188931d0c1a227f4e97a0527b5d62ae977064c807191/deforest-0.2.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9487db88ca4e971cefb8585ccde2dfe9", "sha256": "3f3fe030e4311c89876003a4237ccf51a4845a9d4015a35800d78fa617d62182" }, "downloads": -1, "filename": "deforest-0.2.3.tar.gz", "has_sig": false, "md5_digest": "9487db88ca4e971cefb8585ccde2dfe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7175, "upload_time": "2019-10-20T10:28:08", "url": "https://files.pythonhosted.org/packages/42/a4/98efb023d2e4ca7aec21276827b450c861d4101f749ca4359014d2927e6b/deforest-0.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "77520ecf6cfe95f6477dbe04ee146a7a", "sha256": "0effb81e3809289f0a714e321fc90343d70a9314925e5baabfd89c434eebf672" }, "downloads": -1, "filename": "deforest-0.2.3-py2-none-any.whl", "has_sig": false, "md5_digest": "77520ecf6cfe95f6477dbe04ee146a7a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 12832, "upload_time": "2019-10-20T10:28:07", "url": "https://files.pythonhosted.org/packages/8e/31/6606c4853a2f6f9a188931d0c1a227f4e97a0527b5d62ae977064c807191/deforest-0.2.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9487db88ca4e971cefb8585ccde2dfe9", "sha256": "3f3fe030e4311c89876003a4237ccf51a4845a9d4015a35800d78fa617d62182" }, "downloads": -1, "filename": "deforest-0.2.3.tar.gz", "has_sig": false, "md5_digest": "9487db88ca4e971cefb8585ccde2dfe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7175, "upload_time": "2019-10-20T10:28:08", "url": "https://files.pythonhosted.org/packages/42/a4/98efb023d2e4ca7aec21276827b450c861d4101f749ca4359014d2927e6b/deforest-0.2.3.tar.gz" } ] }