示例#1
0
def make_spec(options: ReDocSpec):
    return apispec.APISpec(
        "Checkmk REST-API",
        __version__,
        apispec.utils.OpenAPIVersion("3.0.2"),
        plugins=[
            marshmallow.MarshmallowPlugin(),
            plugins.ValueTypedDictMarshmallowPlugin(),
            apispec_oneofschema.MarshmallowPlugin(),
        ],
        **options,
    )
示例#2
0
    ],
    'x-ignoredHeaderParameters': [
        'User-Agent',
        'X-Test-Header',
    ],
    'security': [{
        'BearerAuth': []
    }]
}

SPEC = apispec.APISpec("Checkmk REST API",
                       "0.3.2",
                       apispec.utils.OpenAPIVersion("3.0.2"),
                       plugins=[
                           plugins.ValueTypedDictMarshmallowPlugin(),
                           apispec_oneofschema.MarshmallowPlugin(),
                       ],
                       **OPTIONS)
SPEC.components.security_scheme(
    'BearerAuth',
    {
        'type':
        'http',
        'scheme':
        'bearer',
        'in':
        'header',
        'description':
        'The format of the header-value is "Bearer $automation_user '
        '$automation_user_password"\n\nExample: `Bearer hansdampf miezekatze123`',
        'bearerFormat':