{ "info": { "author": "", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python", "Programming Language :: Python :: Implementation :: CPython" ], "description": "json2swagger\n========================================\n\n.. image:: https://travis-ci.org/podhmo/json2swagger.svg?branch=master\n :target: https://travis-ci.org/podhmo/json2swagger\n\n\n\n.. code-block:: bash\n\n $ json2swagger --help\n \n usage: json2swagger [-h] [--name NAME] [--annotations ANNOTATIONS]\n [--show-minimap]\n [--logging {CRITICAL,NOTSET,DEBUG,WARN,INFO,ERROR,WARNING}]\n [--emit {schema,info}] [--dst DST]\n src\n \n positional arguments:\n src\n \n optional arguments:\n -h, --help show this help message and exit\n --name NAME\n --annotations ANNOTATIONS\n --show-minimap\n --logging {CRITICAL,NOTSET,DEBUG,WARN,INFO,ERROR,WARNING}\n --emit {schema,info}\n --dst DST\n \n\nexample\n----------------------------------------\n\ndata.yaml\n\n.. code-block:: yaml\n\n # from: https://github.com/nfarina/homebridge/blob/master/config-sample.json\n bridge:\n name: Homebridge\n username: CC:22:3D:E3:CE:30\n port: 51826\n pin: 031-45-154\n description: This is an example configuration file with one fake accessory and one\n fake platform. You can use this as a template for creating your own configuration\n file containing devices you actually own.\n accessories:\n - accessory: WeMo\n name: Coffee Maker\n platforms:\n - platform: PhilipsHue\n name: Hue\n\n\n.. code-block:: bash\n\n $ json2swagger examples/readme/data.yaml > examples/readme/swagger.yaml\n \n\nswagger.yaml\n\n.. code-block:: yaml\n\n definitions:\n bridge:\n type: object\n properties:\n name:\n type: string\n example: Homebridge\n username:\n type: string\n example: CC:22:3D:E3:CE:30\n port:\n type: integer\n example: 51826\n pin:\n type: string\n example: 031-45-154\n required:\n - name\n - username\n - port\n - pin\n accessoriesItem:\n type: object\n properties:\n accessory:\n type: string\n example: WeMo\n name:\n type: string\n example: Coffee Maker\n required:\n - accessory\n - name\n accessories:\n type: array\n items:\n $ref: '#/definitions/accessoriesItem'\n platformsItem:\n type: object\n properties:\n platform:\n type: string\n example: PhilipsHue\n name:\n type: string\n example: Hue\n required:\n - platform\n - name\n platforms:\n type: array\n items:\n $ref: '#/definitions/platformsItem'\n top:\n type: object\n properties:\n bridge:\n $ref: '#/definitions/bridge'\n description:\n type: string\n example: This is an example configuration file with one fake accessory and\n one fake platform. You can use this as a template for creating your own\n configuration file containing devices you actually own.\n accessories:\n $ref: '#/definitions/accessories'\n platforms:\n $ref: '#/definitions/platforms'\n required:\n - bridge\n - description\n - accessories\n - platforms\n\n\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "json2swagger", "package_url": "https://pypi.org/project/json2swagger/", "platform": "", "project_url": "https://pypi.org/project/json2swagger/", "project_urls": null, "release_url": "https://pypi.org/project/json2swagger/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "generate swagger spec from json (or yaml) file", "version": "0.1.0" }, "last_serial": 2846875, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f552fc96626192aebda17f4251ca5924", "sha256": "3a94dea8a8378ddb3a936ef268a72c362685138067215034d12690bfe026560d" }, "downloads": -1, "filename": "json2swagger-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f552fc96626192aebda17f4251ca5924", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6023, "upload_time": "2017-05-02T16:27:54", "url": "https://files.pythonhosted.org/packages/62/e8/460a6b55f46e3c401ddd9ef78f2d7d5356742e60a7114f93a149a7f440bc/json2swagger-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4dfef3b038df9c0fe61f1f887face607", "sha256": "a9c5b41c412f0d3d694d56b951b390b08651dd069629c346b4104197111762d8" }, "downloads": -1, "filename": "json2swagger-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4dfef3b038df9c0fe61f1f887face607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4449, "upload_time": "2017-05-02T16:27:52", "url": "https://files.pythonhosted.org/packages/cd/58/3860a76550079ba58ffb75644313a92fb60ff4c52c1ae90f61fa1be50df6/json2swagger-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f552fc96626192aebda17f4251ca5924", "sha256": "3a94dea8a8378ddb3a936ef268a72c362685138067215034d12690bfe026560d" }, "downloads": -1, "filename": "json2swagger-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f552fc96626192aebda17f4251ca5924", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 6023, "upload_time": "2017-05-02T16:27:54", "url": "https://files.pythonhosted.org/packages/62/e8/460a6b55f46e3c401ddd9ef78f2d7d5356742e60a7114f93a149a7f440bc/json2swagger-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4dfef3b038df9c0fe61f1f887face607", "sha256": "a9c5b41c412f0d3d694d56b951b390b08651dd069629c346b4104197111762d8" }, "downloads": -1, "filename": "json2swagger-0.1.0.tar.gz", "has_sig": false, "md5_digest": "4dfef3b038df9c0fe61f1f887face607", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4449, "upload_time": "2017-05-02T16:27:52", "url": "https://files.pythonhosted.org/packages/cd/58/3860a76550079ba58ffb75644313a92fb60ff4c52c1ae90f61fa1be50df6/json2swagger-0.1.0.tar.gz" } ] }