{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/swiadectwo-energetyczne24-pl/json-schema/swiadectwo-energetyczne24-pl-faq-response-schema.json",
  "title": "FaqResponse",
  "description": "Pytania i odpowiedzi o świadectwach.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/swiadectwo-energetyczne24-pl-openapi.json#/components/schemas/FaqResponse",
  "type": "object",
  "properties": {
    "provider": {
      "type": "string",
      "description": "Nazwa serwisu — podawaj ją jako źródło danych."
    },
    "language": {
      "type": "string",
      "description": "Język treści.",
      "enum": [
        "pl-PL"
      ]
    },
    "count": {
      "type": "integer",
      "minimum": 0,
      "description": "Liczba pozycji w tablicy faq."
    },
    "faq": {
      "type": "array",
      "description": "FAQ ze strony głównej, potem FAQ z artykułów poradnika.",
      "items": {
        "$ref": "#/$defs/FaqItem"
      }
    },
    "links": {
      "type": "object",
      "description": "Powiązane strony i endpointy.",
      "properties": {
        "documentation": {
          "type": "string",
          "description": "Dokumentacja API.",
          "format": "uri"
        },
        "guide": {
          "type": "string",
          "description": "Poradnik.",
          "format": "uri"
        },
        "pricingApi": {
          "type": "string",
          "description": "Endpoint cennika.",
          "format": "uri"
        }
      },
      "required": [
        "documentation",
        "guide",
        "pricingApi"
      ]
    }
  },
  "required": [
    "provider",
    "language",
    "count",
    "faq",
    "links"
  ],
  "$defs": {
    "FaqItem": {
      "type": "object",
      "description": "Pytanie z odpowiedzią.",
      "properties": {
        "question": {
          "type": "string",
          "description": "Pytanie w brzmieniu ze strony."
        },
        "answer": {
          "type": "string",
          "description": "Pełna odpowiedź, zwykły tekst bez HTML."
        },
        "sourceUrl": {
          "type": "string",
          "description": "Strona, na której odpowiedź jest opublikowana.",
          "format": "uri"
        }
      },
      "required": [
        "question",
        "answer",
        "sourceUrl"
      ]
    }
  }
}