From: Philippe Antoine Date: Sun, 14 Sep 2025 19:50:12 +0000 (+0200) Subject: doc: really enforce more the completeness of json schema X-Git-Tag: suricata-8.0.2~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13863%2Fhead;p=thirdparty%2Fsuricata.git doc: really enforce more the completeness of json schema Completes commit f1f32a39eebe16dbedf9189714772a5915e83f3f End better describe exception_policy --- diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 825eaf49d5..10c6207bb1 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -238,7 +238,7 @@ jobs: run: ./scripts/schema-sort.py --check ./etc/schema.json - name: Check EVE schema has all additionalProperties - run: test $(cat etc/schema.json | 'paths( objects | (.type == "object" and (has("additionalProperties") | not) )) | join(".")' | wc -l) = "0" + run: test $(cat etc/schema.json | jq 'paths( objects | (.type == "object" and (has("additionalProperties") | not) )) | join(".")' | wc -l) = "0" almalinux-9: name: AlmaLinux 9 (schema) diff --git a/etc/schema.json b/etc/schema.json index 5c55e73fc0..d3a9d65a7d 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -7176,44 +7176,56 @@ "properties": { "app_layer": { "type": "object", - "error": { - "description": + "additionalProperties": false, + "properties": { + "error": { + "description": "Consolidated stats on how many times app-layer error exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" + "$ref": "#/$defs/exceptionPolicy" + } } }, "defrag": { "type": "object", - "memcap": { - "description": + "additionalProperties": false, + "properties": { + "memcap": { + "description": "How many times defrag memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" + "$ref": "#/$defs/exceptionPolicy" + } } }, "flow": { "type": "object", - "memcap": { - "description": + "additionalProperties": false, + "properties": { + "memcap": { + "description": "How many times flow memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" + "$ref": "#/$defs/exceptionPolicy" + } } }, "tcp": { "type": "object", - "midstream": { - "description": + "additionalProperties": false, + "properties": { + "midstream": { + "description": "How many times midstream exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, - "ssn_memcap": { - "description": - "How many times session memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, - "reassembly": { - "description": + "$ref": "#/$defs/exceptionPolicy" + }, + "reassembly": { + "description": "How many times reassembly memcap exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" + "$ref": "#/$defs/exceptionPolicy" + }, + "ssn_memcap": { + "description": + "How many times session memcap exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + } } } }