Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
|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/>
_Breaking Changes
Internal changes
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.
cornice_enable_openapi_view()
cornice_enable_openapi_explorer()
Pyramid directives to serve the API Explorer and the spec information (#79)Internals
Pyramid compliance
cornice.service.Service.content_type
argument.
For more details, see: http://cornice.readthedocs.io/en/latest/api.html#cornice.service.Service.Internals
Pyramid compliance
Api
_extract_path_from_service
, now returns the path name along with the path
swagger object (#68).Api
CorniceSwagger
class (#63).CorniceSwagger.generate
to generate the spec (#63).CorniceSwagger
call method. You should now use generate
(#63).generate_swagger_spec
call. (#64).CorniceSwagger
class. (#65)Internals
Api
summary_docstrings = True
to the generator.swagger
items are now recursively merged (instead of replaced) with
the extracted fields.operation_id
argument on the view
or by passing a default_op_ids
callable to the generator.cornice_swagger.CorniceSwagger
.api_security
list on the view
or by passing a default_security
list or callable to the generator.OpenAPI compliance
title
field from response headers and request parameters.Internals
body
.Api
cornice_swagger.swagger.CorniceSwagger
class to generate
the swagger document rather then generate_swagger_spec
.response_schemas
view attribute.tags
view attribute or using a
default_tags
parameter when calling the generator.Internals
Documentation
FAQs
Generate swagger from a Cornice application
We found that cornice-swagger demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.