{ "info": { "author": "Tetsuya Morimoto", "author_email": "tetsuya.morimoto@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "# openapi-ext-tools\n\nextended tools for openapi spec\n\n## bundle multiple yaml files into single openapi.yaml\n\n```bash\n$ openapi-spec-cli --help\nusage: openapi-spec-cli [-h] --spec-path SPEC_PATH\n [--bundled-spec-path BUNDLED_SPEC_PATH] [--verbose]\n\noptional arguments:\n -h, --help show this help message and exit\n --spec-path SPEC_PATH\n set path to openapi spec file\n --bundled-spec-path BUNDLED_SPEC_PATH\n set path to bundled spec file\n --verbose set verbose mode\n```\n\n### How to use\n\n**Currently, bundling only support components object.**\n\nThe `tests/fixtures/simple/openapi.yaml` is openapi specification file and a part of schemas is defined in `tests/fixtures/simple/schemas.yaml`.\n\n```yaml\n...\n content:\n application/json:\n schema:\n $ref: 'schemas.yaml#/components/schemas/User'\n...\n```\n\nFor example, *User* schema is defined like this.\n\n```yaml\ncomponents:\n schemas:\n User:\n type: object\n properties:\n id:\n type: integer\n format: int64\n username:\n type: string\n firstName:\n type: string\n lastName:\n type: string\n birthday:\n type: string\n format: date\n email:\n type: string\n password:\n type: string\n phone:\n type: string\n userStatus:\n type: integer\n description: User Status\n format: int32\n```\n\nRun `openapi-spec-cli` to bundle yaml files and create single `openapi.yaml`.\n\n```bash\n$ openapi-spec-cli --spec-path tests/fixtures/simple/openapi.yaml\n2019-05-11 11:56:12,337 openapi.spec.ext INFO wrote bundled spec file to \"bundled_openapi.yaml\"\n2019-05-11 11:56:12,402 openapi.spec.ext INFO validating bundled spec: OK\n```\n\nYou can confirm `bundled_openapi.yaml` in current directory. Then, all schemas in `schemas.yaml` are moved to `bundled_openapi.yaml` and a `$ref` field also reffers as Local Reference.\n\n```yaml\n...\n content:\n application/json:\n schema:\n $ref: '#/components/schemas/User'\n...\n```\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/t2y/openapi-ext-tools", "keywords": "", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "openapi-ext-tools", "package_url": "https://pypi.org/project/openapi-ext-tools/", "platform": "any", "project_url": "https://pypi.org/project/openapi-ext-tools/", "project_urls": { "Homepage": "https://github.com/t2y/openapi-ext-tools" }, "release_url": "https://pypi.org/project/openapi-ext-tools/0.5.0/", "requires_dist": [ "PyYAML", "openapi-spec-validator" ], "requires_python": "", "summary": "Extended tools for openapi spec", "version": "0.5.0" }, "last_serial": 5254896, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "b990b315af11329eec79134e4622e638", "sha256": "020ad015934da881df5890ecd072733afcab5c8cde2921add2bd43e45483c17d" }, "downloads": -1, "filename": "openapi_ext_tools-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b990b315af11329eec79134e4622e638", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11389, "upload_time": "2019-05-11T03:41:55", "url": "https://files.pythonhosted.org/packages/e1/3d/358703dc345221f720e4ea836ce28d14fd2d0334361376723de73fbc9036/openapi_ext_tools-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40103aba6d626d2a908d488620c48080", "sha256": "77146f977abd15b015aaa294816289cd568013762207f42ee783fc91c00f2ff9" }, "downloads": -1, "filename": "openapi-ext-tools-0.5.0.tar.gz", "has_sig": false, "md5_digest": "40103aba6d626d2a908d488620c48080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11346, "upload_time": "2019-05-11T03:41:57", "url": "https://files.pythonhosted.org/packages/5d/73/b971a9a892b793da73d51c540e62029c0c58a22660ac0690dc56c466a21e/openapi-ext-tools-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b990b315af11329eec79134e4622e638", "sha256": "020ad015934da881df5890ecd072733afcab5c8cde2921add2bd43e45483c17d" }, "downloads": -1, "filename": "openapi_ext_tools-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b990b315af11329eec79134e4622e638", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11389, "upload_time": "2019-05-11T03:41:55", "url": "https://files.pythonhosted.org/packages/e1/3d/358703dc345221f720e4ea836ce28d14fd2d0334361376723de73fbc9036/openapi_ext_tools-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "40103aba6d626d2a908d488620c48080", "sha256": "77146f977abd15b015aaa294816289cd568013762207f42ee783fc91c00f2ff9" }, "downloads": -1, "filename": "openapi-ext-tools-0.5.0.tar.gz", "has_sig": false, "md5_digest": "40103aba6d626d2a908d488620c48080", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11346, "upload_time": "2019-05-11T03:41:57", "url": "https://files.pythonhosted.org/packages/5d/73/b971a9a892b793da73d51c540e62029c0c58a22660ac0690dc56c466a21e/openapi-ext-tools-0.5.0.tar.gz" } ] }