cornice-swagger


Namecornice-swagger JSON
Version 1.0.1 PyPI version JSON
download
home_pagehttps://github.com/Cornices/cornice.ext.swagger
SummaryGenerate swagger from a Cornice application
upload_time2021-08-30 11:12:04
maintainer
docs_urlhttps://pythonhosted.org/cornice-swagger/
authorJosip Delic
requires_python
licenseApache License (2.0)
keywords web services
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            Cornice Swagger
===============

|pypi| |docs| |slack| |travis| |master-coverage|


.. |travis| image::  https://travis-ci.org/Cornices/cornice.ext.swagger.png
    :target: https://travis-ci.org/Cornices/cornice.ext.swagger

.. |master-coverage| image:: https://coveralls.io/repos/github/Cornices/cornice.ext.swagger/badge.svg?branch=master
    :target: https://coveralls.io/github/Cornices/cornice.ext.swagger?branch=master

.. |pypi| image:: https://img.shields.io/pypi/v/cornice_swagger.svg
    :target: https://pypi.python.org/pypi/cornice_swagger

.. |slack| image:: https://img.shields.io/badge/slack-chat-blue.svg
    :target: https://corniceswagger.herokuapp.com/

.. |docs| image:: https://img.shields.io/badge/docs-gh--pages-ff69b4.svg
    :target: https://cornices.github.io/cornice.ext.swagger/


*Cornice extension to generate OpenAPI/Swagger Specification*

Cornice Swagger creates an
`OpenAPI/Swagger 2.0 compliant specification <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`_
from `Cornice <https://github.com/Cornices/cornice>`_ applications
maximizing the extracted documentation data from functional code,
while allowing users to override some parts of the generated document.


* `Documentation <https://cornices.github.io/cornice.ext.swagger/>`_
* `Tutorial <https://cornices.github.io/cornice.ext.swagger/tutorial.html>`_
* `Issue tracker <https://github.com/Cornices/cornice.ext.swagger/issues>`_
* `Live chat <https://corniceswagger.herokuapp.com/>`_



CHANGES
=======

1.0.1 (2021-08-30)
------------------

- Take default value from missing attribute (thanks @sp-schoen)


1.0.0 (2020-03-31)
------------------

**Breaking Changes**

- Drop Python 2 support

**Internal changes**

- bump swagger-ui files to 3.23.11


0.7.0 (2018-07-29)
------------------

- Support swagger ``example`` field on colander ``SchemaNode`` custom kwarg::

    def SomeSchema(colander.MappingSchema):
        name = colander.SchemaNode(colander.String(), example='Mr. IceCream')

  The ``example`` field is returned in the swagger spec accordingly.


0.6.0 (2018-03-28)
------------------

- Add ``cornice_enable_openapi_view()`` ``cornice_enable_openapi_explorer()``
  Pyramid directives to serve the API Explorer and the spec information (#79)


0.5.5 (2018-03-19)
------------------

- Prevent failure with non-colander schemas (#78, thanks @ergo!)


0.5.4 (2018-02-26)
------------------

**Internals**

- Fix return types in docstrings (#77)


0.5.3 (2018-02-14)
------------------

**Pyramid compliance**

- Handle callables for ``cornice.service.Service.content_type`` argument.
  For more details, see: http://cornice.readthedocs.io/en/latest/api.html#cornice.service.Service.


0.5.2 (2017-11-07)
------------------

**Internals**

- Add classifiers to the Python package.


0.5.1 (2017-04-10)
------------------

**Pyramid compliance**

- Support subpaths and regex when parsing paths (#68).

**Api**

- ``_extract_path_from_service``, now returns the path name along with the path
  swagger object (#68).


0.5.0 (2017-02-14)
------------------

**Api**

- Allow implementing a custom generator by subclassing the ``CorniceSwagger`` class (#63).
- Introduced a new method ``CorniceSwagger.generate`` to generate the spec (#63).
- Deprecated ``CorniceSwagger`` call method. You should now use ``generate`` (#63).
- Removed deprecated ``generate_swagger_spec`` call. (#64).
- Allow defining custom type converters on the ``CorniceSwagger`` class. (#65)

**Internals**

- Fixed coveralls repeated messages on PRs. (#62).

0.4.0 (2017-01-25)
------------------

**Api**

- Summaries from docstrings are now not included by default. You can enable them by passing
  ``summary_docstrings = True`` to the generator.
- Trying to document multiple views on same method now raises an exception. You should
  ignore the unwanted ones by content type.
- Raw ``swagger`` items are now recursively merged (instead of replaced) with
  the extracted fields.
- Add support for documenting operation ids via an ``operation_id`` argument on the view
  or by passing a ``default_op_ids`` callable to the generator.
- Add a shortcut to the generator on ``cornice_swagger.CorniceSwagger``.
- Support Cornice schema synonyms (headers and GET are the same as header and querystring).
- Add support for documenting security properties via a ``api_security`` list on the view
  or by passing a ``default_security`` list or callable to the generator.

**OpenAPI compliance**

- Remove invalid ``title`` field from response headers and request parameters.
- Support conversion of parameter validators.

**Internals**

- Fix default tag generator.
- Fix references when using declarative schemas.
- Simplify parameter converter by properly isolating ``body``.


0.3.0 (2017-01-17)
------------------

**Api**

- Use ``cornice_swagger.swagger.CorniceSwagger`` class to generate
  the swagger document rather then ``generate_swagger_spec``.
- Allow overriding extractors in the application.
- Schemas are now broken into JSON pointers only if specified.
- Allow documenting responses via ``response_schemas`` view attribute.
- Allow documenting tags via ``tags`` view attribute or using a
  ``default_tags`` parameter when calling the generator.

**Internals**

- Decouples converters from path generators.
- Make considerable changes in the package organisation.
- Reach 100% coverage on tests.

**Documentation**

- Create a Sphinx documentation hosted on
  https://cornices.github.io/cornice.ext.swagger.


0.2.1 (2016-12-10)
------------------

- Check if schema is not instantiated.
- Add support for query parameter description. [ridha]


0.2 (2016-11-08)
----------------

- Pypi release.
- Point scaffold doc to right url.


0.1 (2016-11-05)
----------------

- First release for new cornice 2.0
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Cornices/cornice.ext.swagger",
    "name": "cornice-swagger",
    "maintainer": "",
    "docs_url": "https://pythonhosted.org/cornice-swagger/",
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "web services",
    "author": "Josip Delic",
    "author_email": "delijati@gmx.net",
    "download_url": "https://files.pythonhosted.org/packages/6f/07/e55351195b4f7700c5c5eb22491c15a4c05b21cc3cd40ea7683a18ef3a9c/cornice_swagger-1.0.1.tar.gz",
    "platform": "",
    "description": "Cornice Swagger\n===============\n\n|pypi| |docs| |slack| |travis| |master-coverage|\n\n\n.. |travis| image::  https://travis-ci.org/Cornices/cornice.ext.swagger.png\n    :target: https://travis-ci.org/Cornices/cornice.ext.swagger\n\n.. |master-coverage| image:: https://coveralls.io/repos/github/Cornices/cornice.ext.swagger/badge.svg?branch=master\n    :target: https://coveralls.io/github/Cornices/cornice.ext.swagger?branch=master\n\n.. |pypi| image:: https://img.shields.io/pypi/v/cornice_swagger.svg\n    :target: https://pypi.python.org/pypi/cornice_swagger\n\n.. |slack| image:: https://img.shields.io/badge/slack-chat-blue.svg\n    :target: https://corniceswagger.herokuapp.com/\n\n.. |docs| image:: https://img.shields.io/badge/docs-gh--pages-ff69b4.svg\n    :target: https://cornices.github.io/cornice.ext.swagger/\n\n\n*Cornice extension to generate OpenAPI/Swagger Specification*\n\nCornice Swagger creates an\n`OpenAPI/Swagger 2.0 compliant specification <https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md>`_\nfrom `Cornice <https://github.com/Cornices/cornice>`_ applications\nmaximizing the extracted documentation data from functional code,\nwhile allowing users to override some parts of the generated document.\n\n\n* `Documentation <https://cornices.github.io/cornice.ext.swagger/>`_\n* `Tutorial <https://cornices.github.io/cornice.ext.swagger/tutorial.html>`_\n* `Issue tracker <https://github.com/Cornices/cornice.ext.swagger/issues>`_\n* `Live chat <https://corniceswagger.herokuapp.com/>`_\n\n\n\nCHANGES\n=======\n\n1.0.1 (2021-08-30)\n------------------\n\n- Take default value from missing attribute (thanks @sp-schoen)\n\n\n1.0.0 (2020-03-31)\n------------------\n\n**Breaking Changes**\n\n- Drop Python 2 support\n\n**Internal changes**\n\n- bump swagger-ui files to 3.23.11\n\n\n0.7.0 (2018-07-29)\n------------------\n\n- Support swagger ``example`` field on colander ``SchemaNode`` custom kwarg::\n\n    def SomeSchema(colander.MappingSchema):\n        name = colander.SchemaNode(colander.String(), example='Mr. IceCream')\n\n  The ``example`` field is returned in the swagger spec accordingly.\n\n\n0.6.0 (2018-03-28)\n------------------\n\n- Add ``cornice_enable_openapi_view()`` ``cornice_enable_openapi_explorer()``\n  Pyramid directives to serve the API Explorer and the spec information (#79)\n\n\n0.5.5 (2018-03-19)\n------------------\n\n- Prevent failure with non-colander schemas (#78, thanks @ergo!)\n\n\n0.5.4 (2018-02-26)\n------------------\n\n**Internals**\n\n- Fix return types in docstrings (#77)\n\n\n0.5.3 (2018-02-14)\n------------------\n\n**Pyramid compliance**\n\n- Handle callables for ``cornice.service.Service.content_type`` argument.\n  For more details, see: http://cornice.readthedocs.io/en/latest/api.html#cornice.service.Service.\n\n\n0.5.2 (2017-11-07)\n------------------\n\n**Internals**\n\n- Add classifiers to the Python package.\n\n\n0.5.1 (2017-04-10)\n------------------\n\n**Pyramid compliance**\n\n- Support subpaths and regex when parsing paths (#68).\n\n**Api**\n\n- ``_extract_path_from_service``, now returns the path name along with the path\n  swagger object (#68).\n\n\n0.5.0 (2017-02-14)\n------------------\n\n**Api**\n\n- Allow implementing a custom generator by subclassing the ``CorniceSwagger`` class (#63).\n- Introduced a new method ``CorniceSwagger.generate`` to generate the spec (#63).\n- Deprecated ``CorniceSwagger`` call method. You should now use ``generate`` (#63).\n- Removed deprecated ``generate_swagger_spec`` call. (#64).\n- Allow defining custom type converters on the ``CorniceSwagger`` class. (#65)\n\n**Internals**\n\n- Fixed coveralls repeated messages on PRs. (#62).\n\n0.4.0 (2017-01-25)\n------------------\n\n**Api**\n\n- Summaries from docstrings are now not included by default. You can enable them by passing\n  ``summary_docstrings = True`` to the generator.\n- Trying to document multiple views on same method now raises an exception. You should\n  ignore the unwanted ones by content type.\n- Raw ``swagger`` items are now recursively merged (instead of replaced) with\n  the extracted fields.\n- Add support for documenting operation ids via an ``operation_id`` argument on the view\n  or by passing a ``default_op_ids`` callable to the generator.\n- Add a shortcut to the generator on ``cornice_swagger.CorniceSwagger``.\n- Support Cornice schema synonyms (headers and GET are the same as header and querystring).\n- Add support for documenting security properties via a ``api_security`` list on the view\n  or by passing a ``default_security`` list or callable to the generator.\n\n**OpenAPI compliance**\n\n- Remove invalid ``title`` field from response headers and request parameters.\n- Support conversion of parameter validators.\n\n**Internals**\n\n- Fix default tag generator.\n- Fix references when using declarative schemas.\n- Simplify parameter converter by properly isolating ``body``.\n\n\n0.3.0 (2017-01-17)\n------------------\n\n**Api**\n\n- Use ``cornice_swagger.swagger.CorniceSwagger`` class to generate\n  the swagger document rather then ``generate_swagger_spec``.\n- Allow overriding extractors in the application.\n- Schemas are now broken into JSON pointers only if specified.\n- Allow documenting responses via ``response_schemas`` view attribute.\n- Allow documenting tags via ``tags`` view attribute or using a\n  ``default_tags`` parameter when calling the generator.\n\n**Internals**\n\n- Decouples converters from path generators.\n- Make considerable changes in the package organisation.\n- Reach 100% coverage on tests.\n\n**Documentation**\n\n- Create a Sphinx documentation hosted on\n  https://cornices.github.io/cornice.ext.swagger.\n\n\n0.2.1 (2016-12-10)\n------------------\n\n- Check if schema is not instantiated.\n- Add support for query parameter description. [ridha]\n\n\n0.2 (2016-11-08)\n----------------\n\n- Pypi release.\n- Point scaffold doc to right url.\n\n\n0.1 (2016-11-05)\n----------------\n\n- First release for new cornice 2.0",
    "bugtrack_url": null,
    "license": "Apache License (2.0)",
    "summary": "Generate swagger from a Cornice application",
    "version": "1.0.1",
    "project_urls": {
        "Homepage": "https://github.com/Cornices/cornice.ext.swagger"
    },
    "split_keywords": [
        "web",
        "services"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "418ff6aaa20e5352ff2fe6a16678280b79688461a05fd88884b1216ab0726769",
                "md5": "ec3eb6ff67d7e354b24956a2e7f8c97a",
                "sha256": "94baebb818eb79a458497b3b924aacf340af85057abfdba7faa81e20c4d59b84"
            },
            "downloads": -1,
            "filename": "cornice_swagger-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ec3eb6ff67d7e354b24956a2e7f8c97a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 32292,
            "upload_time": "2022-06-14T14:08:46",
            "upload_time_iso_8601": "2022-06-14T14:08:46.690095Z",
            "url": "https://files.pythonhosted.org/packages/41/8f/f6aaa20e5352ff2fe6a16678280b79688461a05fd88884b1216ab0726769/cornice_swagger-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6f07e55351195b4f7700c5c5eb22491c15a4c05b21cc3cd40ea7683a18ef3a9c",
                "md5": "32c260c0fe2e1915a3a48e802062b781",
                "sha256": "98a63c139af8297e8494ffa4e9f3fe8226a55b8850abb3b65ca555b25105fc34"
            },
            "downloads": -1,
            "filename": "cornice_swagger-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "32c260c0fe2e1915a3a48e802062b781",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 40099,
            "upload_time": "2021-08-30T11:12:04",
            "upload_time_iso_8601": "2021-08-30T11:12:04.346445Z",
            "url": "https://files.pythonhosted.org/packages/6f/07/e55351195b4f7700c5c5eb22491c15a4c05b21cc3cd40ea7683a18ef3a9c/cornice_swagger-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-08-30 11:12:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Cornices",
    "github_project": "cornice.ext.swagger",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "cornice-swagger"
}
        
Elapsed time: 0.11844s