{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fluvigil-de/json-schema/fluvigil-de-source-notice-schema.json",
  "title": "SourceNotice",
  "description": "Conditions a data provider attaches to its gauges, set wherever a gauge's values are delivered. The fields of `SourceNoticePart` describe the source of the values; `parts` lists every source involved (the value source first, the station source after it where they differ), and `form` is `full-only` as soon as one part is. `sourceLine`, `rawData`, `disclaimer`, `noOfficialWarning` and `termsPath` are the older plain-text fields and stay for existing clients; the three that a provider does not demand are null.\n",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fluvigil-de-openapi.yaml#/components/schemas/SourceNotice",
  "allOf": [
    {
      "$ref": "#/$defs/SourceNoticePart"
    },
    {
      "type": "object",
      "properties": {
        "parts": {
          "type": "array",
          "description": "The notice of every source involved, each with the fields from `id` to `textShort`.",
          "items": {
            "$ref": "#/$defs/SourceNoticePart"
          }
        },
        "sourceLine": {
          "type": "string",
          "description": "Credit line of the provider"
        },
        "rawData": {
          "type": [
            "string",
            "null"
          ],
          "description": "Notice that the values are preliminary or unchecked raw data"
        },
        "disclaimer": {
          "type": [
            "string",
            "null"
          ],
          "description": "Liability disclaimer with the pointer to the terms"
        },
        "noOfficialWarning": {
          "type": [
            "string",
            "null"
          ],
          "description": "Statement that the presentation is no official warning"
        },
        "termsPath": {
          "type": "string",
          "description": "Path of the terms page holding the full liability disclaimer"
        }
      }
    }
  ],
  "$defs": {
    "SourceNoticePart": {
      "type": "object",
      "description": "The conditions of one source involved in the values a gauge shows.",
      "properties": {
        "id": {
          "type": "string",
          "description": "Key of the source record the notice part comes from: a station source (`pegelonline`, `ch`, `lhp`, ...), a state value source (`ni-nlwkn`, `th-hnz`, ...), or `salzburg` / `niederoesterreich` for those two Austrian variants.\n"
        },
        "form": {
          "type": "string",
          "enum": [
            "short-allowed",
            "full-only"
          ],
          "description": "`full-only` when the provider approved paragraphs that must never be shortened"
        },
        "permissionBasis": {
          "type": "string",
          "enum": [
            "licence",
            "statutory-access",
            "written-consent",
            "licence-and-consent"
          ]
        },
        "licence": {
          "type": [
            "object",
            "null"
          ],
          "description": "The licence the permission rests on; null for statutory access and written consent alone.",
          "properties": {
            "name": {
              "type": "string"
            },
            "url": {
              "type": "string"
            }
          }
        },
        "sourceName": {
          "type": "string"
        },
        "sourceUrl": {
          "type": "string"
        },
        "rightsHolder": {
          "type": "string"
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When Fluvigil fetched the values (UTC); null where not known"
        },
        "stampedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "The provider's own time stamp (\"Stand\") where its licence keeps it visible"
        },
        "stationLink": {
          "type": [
            "string",
            "null"
          ],
          "description": "Origin page of this gauge where the provider demands it"
        },
        "text": {
          "type": "string",
          "description": "The full notice as plain text"
        },
        "textShort": {
          "type": [
            "string",
            "null"
          ],
          "description": "The shortened notice; null for `full-only`"
        }
      }
    }
  }
}