Ejemplo n.º 1
0
def patch_content_json_schema_parameters(content):
    return [{
        "name": "body",
        "in": "body",
        "schema": {
            "allOf": [
                {"$ref": "#/definitions/WritableResource"},
                {"properties": convert_interfaces_to_schema(
                    get_all_behavior_interfaces(content))}
            ]
        }
    }]
Ejemplo n.º 2
0
def get_content_json_schema_responses(content):
    return {
        "200": {
            "description": "Resource data",
            "schema": {
                "allOf": [
                    {"$ref": "#/definitions/ResourceFolder"},
                    {"properties": convert_interfaces_to_schema(
                        get_all_behavior_interfaces(content))}
                ]
            }
        }
    }
Ejemplo n.º 3
0
def patch_content_json_schema_parameters(content):
    return {
        "required": True,
        "content": {
            "application/json": {
                "schema": {
                    "type": "object",
                    "allOf": [
                        {"$ref": "#/components/schemas/WritableResource"},
                        {"properties": convert_interfaces_to_schema(get_all_behavior_interfaces(content))},
                    ],
                }
            }
        },
    }
Ejemplo n.º 4
0
def get_content_json_schema_responses(content):
    return {
        "200": {
            "description": "Resource data",
            "content": {
                "application/json": {
                    "schema": {
                        "allOf": [
                            {"$ref": "#/components/schemas/ResourceFolder"},
                            {
                                "type": "object",
                                "properties": convert_interfaces_to_schema(
                                    get_all_behavior_interfaces(content)
                                ),
                            },
                        ]
                    }
                }
            },
        }
    }