json2swagger
$ json2swagger --help
usage: json2swagger [-h] [--name NAME] [--annotations ANNOTATIONS]
[--show-minimap]
[--logging {CRITICAL,NOTSET,DEBUG,WARN,INFO,ERROR,WARNING}]
[--emit {schema,info}] [--dst DST]
src
positional arguments:
src
optional arguments:
-h, --help show this help message and exit
--name NAME
--annotations ANNOTATIONS
--show-minimap
--logging {CRITICAL,NOTSET,DEBUG,WARN,INFO,ERROR,WARNING}
--emit {schema,info}
--dst DST
example
data.yaml
# from: https://github.com/nfarina/homebridge/blob/master/config-sample.json
bridge:
name: Homebridge
username: CC:22:3D:E3:CE:30
port: 51826
pin: 031-45-154
description: This is an example configuration file with one fake accessory and one
fake platform. You can use this as a template for creating your own configuration
file containing devices you actually own.
accessories:
- accessory: WeMo
name: Coffee Maker
platforms:
- platform: PhilipsHue
name: Hue
$ json2swagger examples/readme/data.yaml > examples/readme/swagger.yaml
swagger.yaml
definitions:
bridge:
type: object
properties:
name:
type: string
example: Homebridge
username:
type: string
example: CC:22:3D:E3:CE:30
port:
type: integer
example: 51826
pin:
type: string
example: 031-45-154
required:
- name
- username
- port
- pin
accessoriesItem:
type: object
properties:
accessory:
type: string
example: WeMo
name:
type: string
example: Coffee Maker
required:
- accessory
- name
accessories:
type: array
items:
$ref: '#/definitions/accessoriesItem'
platformsItem:
type: object
properties:
platform:
type: string
example: PhilipsHue
name:
type: string
example: Hue
required:
- platform
- name
platforms:
type: array
items:
$ref: '#/definitions/platformsItem'
top:
type: object
properties:
bridge:
$ref: '#/definitions/bridge'
description:
type: string
example: This is an example configuration file with one fake accessory and
one fake platform. You can use this as a template for creating your own
configuration file containing devices you actually own.
accessories:
$ref: '#/definitions/accessories'
platforms:
$ref: '#/definitions/platforms'
required:
- bridge
- description
- accessories
- platforms
Metadata
Release files for json2swagger 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| json2swagger-0.1.0.tar.gz | 4.4 kB | Without provenance | Details for json2swagger-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| json2swagger-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for json2swagger-0.1.0-py2.py3-none-any.whl |
Total release size: 10.5 kB
Release files / json2swagger-0.1.0.tar.gz
| Download URL | json2swagger-0.1.0.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9c5b41c412f0d3d694d56b951b390b08651dd069629c346b4104197111762d8
|
|
BLAKE2b-256 checksum How to use checksums |
cd583860a76550079ba58ffb75644313a92fb60ff4c52c1ae90f61fa1be50df6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / json2swagger-0.1.0-py2.py3-none-any.whl
| Download URL | json2swagger-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
3a94dea8a8378ddb3a936ef268a72c362685138067215034d12690bfe026560d
|
|
BLAKE2b-256 checksum How to use checksums |
62e8460a6b55f46e3c401ddd9ef78f2d7d5356742e60a7114f93a149a7f440bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for json2swagger 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.