OpenAPI core module

class kinto.core.openapi.AnyTypeConverter(dispatcher)

Convert type agnostic parameter to swagger.

class kinto.core.openapi.OpenAPI(services, request)

OpenAPI documentation generator.

custom_type_converters = {<class 'kinto.core.schema.Any'>: <class 'kinto.core.openapi.AnyTypeConverter'>}

Kinto additional type converters.

security_definitions = {}

Kinto security definitions. May be used for setting other security methods.

security_roles = {}

Kinto resource security roles. May be used for setting OAuth roles by plugins.

classmethod expose_authentication_method(method_name, definition)

Allow security extensions to expose authentication methods on the OpenAPI documentation. The definition field should correspond to a valid OpenAPI security definition. Refer the OpenAPI 2.0 specification for more information. Below are some examples for BasicAuth and OAuth2:

    "type": "basic",
    "description" "My basicauth method."


    "type": "oauth2",
    "authorizationUrl": "",
    "flow": "implicit",
    "scopes": {"kinto": "Kinto user scope."}
default_tags(service, method)

Povides default tags to views.

default_op_ids(service, method)

Povides default operation ids to methods if not defined on view.

default_security(service, method)

Provides OpenAPI security properties based on kinto policies.