{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://lepiejwidoczny.pl/standard/v1/schema.json",
    "title": "LW Audit 1.0 – wynik audytu strony WordPress/WooCommerce",
    "type": "object",
    "required": [
        "standard",
        "version",
        "url",
        "scores",
        "checks"
    ],
    "properties": {
        "standard": {
            "const": "LW Audit"
        },
        "version": {
            "type": "string"
        },
        "url": {
            "type": "string",
            "format": "uri"
        },
        "audited_at": {
            "type": "string",
            "format": "date-time"
        },
        "platform": {
            "type": "object"
        },
        "pages": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "type": {
                        "type": "string"
                    },
                    "url": {
                        "type": "string"
                    },
                    "status": {
                        "type": "integer"
                    }
                }
            }
        },
        "scores": {
            "type": "object",
            "properties": {
                "speed": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "google": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "share": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "mobile": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "catalog": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "tech": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "pay": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "agent": {
                    "type": [
                        "integer",
                        "null"
                    ],
                    "minimum": 0,
                    "maximum": 100
                },
                "overall": {
                    "type": [
                        "integer",
                        "null"
                    ]
                }
            }
        },
        "metrics": {
            "type": "object"
        },
        "catalog": {
            "type": [
                "object",
                "null"
            ]
        },
        "checks": {
            "type": "array",
            "items": {
                "type": "object",
                "required": [
                    "id",
                    "category",
                    "status"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "pattern": "^[A-Z0-9]+-[0-9]{3}$"
                    },
                    "category": {
                        "enum": [
                            "speed",
                            "google",
                            "share",
                            "mobile",
                            "catalog",
                            "tech",
                            "pay",
                            "agent"
                        ]
                    },
                    "title": {
                        "type": "string"
                    },
                    "status": {
                        "enum": [
                            "pass",
                            "warn",
                            "fail",
                            "info",
                            "na"
                        ]
                    },
                    "severity": {
                        "type": "integer",
                        "minimum": 1,
                        "maximum": 3
                    },
                    "value": [],
                    "evidence": {
                        "type": "string"
                    },
                    "market": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "fix": {
                        "type": "string"
                    },
                    "diy_minutes": {
                        "type": "integer"
                    },
                    "service": {
                        "type": "string"
                    },
                    "guide": {
                        "type": "string"
                    }
                }
            }
        },
        "plan": {
            "type": "object"
        }
    }
}