Support swagger
examplefield on colanderSchemaNodecustom kwarg:def SomeSchema(colander.MappingSchema): name = colander.SchemaNode(colander.String(), example='Mr. IceCream')The
examplefield is returned in the swagger spec accordingly.
- Add
cornice_enable_openapi_view()cornice_enable_openapi_explorer()Pyramid directives to serve the API Explorer and the spec information (#79)
- Prevent failure with non-colander schemas (#78, thanks @ergo!)
Internals
- Fix return types in docstrings (#77)
Pyramid compliance
- Handle callables for
cornice.service.Service.content_typeargument. For more details, see: http://cornice.readthedocs.io/en/latest/api.html#cornice.service.Service.
Internals
- Add classifiers to the Python package.
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).
Api
- Allow implementing a custom generator by subclassing the
CorniceSwaggerclass (#63). - Introduced a new method
CorniceSwagger.generateto generate the spec (#63). - Deprecated
CorniceSwaggercall method. You should now usegenerate(#63). - Removed deprecated
generate_swagger_speccall. (#64). - Allow defining custom type converters on the
CorniceSwaggerclass. (#65)
Internals
- Fixed coveralls repeated messages on PRs. (#62).
Api
- Summaries from docstrings are now not included by default. You can enable them by passing
summary_docstrings = Trueto the generator. - Trying to document multiple views on same method now raises an exception. You should ignore the unwanted ones by content type.
- Raw
swaggeritems are now recursively merged (instead of replaced) with the extracted fields. - Add support for documenting operation ids via an
operation_idargument on the view or by passing adefault_op_idscallable 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_securitylist on the view or by passing adefault_securitylist or callable to the generator.
OpenAPI compliance
- Remove invalid
titlefield 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.
Api
- Use
cornice_swagger.swagger.CorniceSwaggerclass to generate the swagger document rather thengenerate_swagger_spec. - Allow overriding extractors in the application.
- Schemas are now broken into JSON pointers only if specified.
- Allow documenting responses via
response_schemasview attribute. - Allow documenting tags via
tagsview attribute or using adefault_tagsparameter 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.
- Check if schema is not instantiated.
- Add support for query parameter description. [ridha]
- Pypi release.
- Point scaffold doc to right url.
- First release for new cornice 2.0