From dae92641208b62950b4b43b9ef320813db958bdf Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Sun, 14 Sep 2025 21:50:12 +0200 Subject: [PATCH] doc: really enforce more the completeness of json schema Completes commit f1f32a39eebe16dbedf9189714772a5915e83f3f End better describe exception_policy --- .github/workflows/builds.yml | 2 +- etc/schema.json | 54 ++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 22 deletions(-) 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" + } } } }