***********************
wadl2swagger |PyPI|
***********************
wadl2swagger is a command line tool for converting WADL_ description of an API into Swagger_. It's intended to work with generic WADL documents as much as possible, but some of the conversion is mapped to conventions used in OpenStack WADL rather concepts defined in the WADL standard itself.
============
Installation
============
wadl2swagger can be installed (and updated) from PyPI using `pip`_:
.. code-block:: bash
$ pip install --upgrade wadl2swagger
Conversely, it can be uninstalled using `pip`_ as well.
.. code-block:: bash
$ pip uninstall wadl2swagger
=====
Usage
=====
wadl2swagger provides two utilities. The ``wadlcrawler`` utility can be used to fetch WADL files off a website. For example:
.. code-block:: bash
$ wadlcrawler http://api.rackspace.com/wadls/
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/OS-KSADM-admin.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/RAX-AUTH.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/RAX-KSKEY-admin.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/autoscale.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cbd-devguide.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cloud_monitoring.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cq-devguide.wadl
...
Now that you have a set of WADL files, you can use wadl2swagger to convert them:
.. code-block:: bash
$ wadl2swagger --autofix wadls/*.wadl --swagger-dir swagger/
Saving swagger to swagger/OS-KSADM-admin.yaml
Saving swagger to swagger/RAX-AUTH.yaml
Saving swagger to swagger/RAX-KSKEY-admin.yaml
Saving swagger to swagger/autoscale.yaml
Saving swagger to swagger/cbd-devguide.yaml
Saving swagger to swagger/cq-devguide.yaml
...
===
Options
===
See ``wadlcrawler -h`` and ``wadl2swagger -h`` for a full list of options. Some important options are below.
``--autofix``
----------------
Tells wadl2swagger to detect and attempt to fix common problems, like inferring a default value for a required Swagger concept that is optional and not specified in one of the WADLs. If you don't use this option than wadl2swagger may fail until you clean up your WADL files.
``--wadl-dir WADL_DIR``
----------------
The directory to save WADL files to when downloading via wadlcrawler.
``--swagger-dir SWAGGER_DIR``
----------------
The directory to save Swagger files to when converting via wadl2swagger.
============
Contributing
============
See `CONTRIBUTING.rst`_.
=======
License
=======
wadl2swagger is licensed under the `Apache License`_.
.. |PyPI| image:: http://img.shields.io/pypi/v/wadl2swagger.svg?style=flat
:alt: PyPI Version
:target: https://pypi.python.org/pypi/wadl2swagger/
.. _pip: http://www.pip-installer.org/en/latest/index.html
.. _WADL: http://www.w3.org/Submission/wadl/
.. _Swagger: http://swagger.io
.. _CONTRIBUTING.rst: https://github.com/rackerlabs/wadl2swagger/blob/master/CONTRIBUTING.rst
.. _Apache License: https://github.com/rackerlabs/wadl2swagger/blob/master/LICENSE
wadl2swagger |PyPI|
***********************
wadl2swagger is a command line tool for converting WADL_ description of an API into Swagger_. It's intended to work with generic WADL documents as much as possible, but some of the conversion is mapped to conventions used in OpenStack WADL rather concepts defined in the WADL standard itself.
============
Installation
============
wadl2swagger can be installed (and updated) from PyPI using `pip`_:
.. code-block:: bash
$ pip install --upgrade wadl2swagger
Conversely, it can be uninstalled using `pip`_ as well.
.. code-block:: bash
$ pip uninstall wadl2swagger
=====
Usage
=====
wadl2swagger provides two utilities. The ``wadlcrawler`` utility can be used to fetch WADL files off a website. For example:
.. code-block:: bash
$ wadlcrawler http://api.rackspace.com/wadls/
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/OS-KSADM-admin.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/RAX-AUTH.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/RAX-KSKEY-admin.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/autoscale.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cbd-devguide.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cloud_monitoring.wadl
INFO:root:Downloading http://api.rackspace.com/wadls/ to wadls/cq-devguide.wadl
...
Now that you have a set of WADL files, you can use wadl2swagger to convert them:
.. code-block:: bash
$ wadl2swagger --autofix wadls/*.wadl --swagger-dir swagger/
Saving swagger to swagger/OS-KSADM-admin.yaml
Saving swagger to swagger/RAX-AUTH.yaml
Saving swagger to swagger/RAX-KSKEY-admin.yaml
Saving swagger to swagger/autoscale.yaml
Saving swagger to swagger/cbd-devguide.yaml
Saving swagger to swagger/cq-devguide.yaml
...
===
Options
===
See ``wadlcrawler -h`` and ``wadl2swagger -h`` for a full list of options. Some important options are below.
``--autofix``
----------------
Tells wadl2swagger to detect and attempt to fix common problems, like inferring a default value for a required Swagger concept that is optional and not specified in one of the WADLs. If you don't use this option than wadl2swagger may fail until you clean up your WADL files.
``--wadl-dir WADL_DIR``
----------------
The directory to save WADL files to when downloading via wadlcrawler.
``--swagger-dir SWAGGER_DIR``
----------------
The directory to save Swagger files to when converting via wadl2swagger.
============
Contributing
============
See `CONTRIBUTING.rst`_.
=======
License
=======
wadl2swagger is licensed under the `Apache License`_.
.. |PyPI| image:: http://img.shields.io/pypi/v/wadl2swagger.svg?style=flat
:alt: PyPI Version
:target: https://pypi.python.org/pypi/wadl2swagger/
.. _pip: http://www.pip-installer.org/en/latest/index.html
.. _WADL: http://www.w3.org/Submission/wadl/
.. _Swagger: http://swagger.io
.. _CONTRIBUTING.rst: https://github.com/rackerlabs/wadl2swagger/blob/master/CONTRIBUTING.rst
.. _Apache License: https://github.com/rackerlabs/wadl2swagger/blob/master/LICENSE
Release files for wadl2swagger 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wadl2swagger-0.0.5.tar.gz | 8.0 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wadl2swagger-0.0.5.macosx-10.9-intel.tar.gz | Details | |||
| wadl2swagger-0.0.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 33.3 kB
Release files / wadl2swagger-0.0.5.tar.gz
| Download URL | wadl2swagger-0.0.5.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4e1f61e0f0d2d6ade4395f004e0df113d01559b1ef5f97e1dc21219aa6bcab6
|
|
BLAKE2b-256 checksum How to use checksums |
ee4b7b35f56c339edda8836c5972d75d45a8d8dc11b7de144f243002be465f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wadl2swagger-0.0.5.macosx-10.9-intel.tar.gz
| Download URL | wadl2swagger-0.0.5.macosx-10.9-intel.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
977569ce144f2fca92cd6bdc77ed6858712a9c83d5d53c5ba00249e26ac56e80
|
|
BLAKE2b-256 checksum How to use checksums |
00f45b962e7ffdf7b643a83be44ad3c251110988e9014cc4db2433b158e45f00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / wadl2swagger-0.0.5-py2.py3-none-any.whl
| Download URL | wadl2swagger-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 10.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
055a045bf8883735aef1ac2861216059a7a605a41c2c6c41a73435e736b1a3da
|
|
BLAKE2b-256 checksum How to use checksums |
12d4ce6eff8a6b5409f6d7e8d180e6f45a1c730134e07f523a1f3193691cd6e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |