Forum Discussion

mkyrc's avatar
mkyrc
Icon for Cirrus rankCirrus
Jun 11, 2026

AS3 per-app JSON schema issue

Hello,

I'd like to validate per-app declaration against vendor specific `per-app-schema` json schema file in vscode editor. Therefore I added there '$schema' object with valid schema file url, but it seems, that `$schema` object is not valid for per-app declaration. 

Here is my simple example (f5as3-ltm_app-based.cfg.yaml.as3.json file):

{
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/refs/heads/main/schema/3.56.0/per-app-schema.json",
    "schemaVersion": "3.54.0",
    "id": "urn:uuid:9ee77479-b1d9-5dfe-b0e6-bd1c65c10b8d",
    "controls": {
        "class": "Controls",
        "logLevel": "debug",
        "trace": true
    },
    "app_test": {
        "class": "Application",
        "mon-tcp_test": {
            "class": "Monitor",
            "monitorType": "tcp",
            "remark": "AS3>app_test"
        }
    }
}

 

When I validate this file against per-app-schema.json it fails with this message:

$ jsonschema -i f5as3-ltm_app-based.cfg.yaml.as3.json per-app-schema.json

https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/refs/heads/main/schema/3.56.0/per-app-schema.json: 'https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/refs/heads/main/schema/3.56.0/per-app-schema.json' is not of type 'object'

$schema: '$schema' does not match '^[A-Za-z][0-9A-Za-z_.-]*$'

 

When '$schema' object is removed, validation using e.g. jsonschema is correct, but vscode can't validate edited file. I know, that I can map file to local schema file, but I'd like to use '$schema' object with url to vendor's schema file.

It works for 'tenant-based' declaration (in vscode, also validation using e.g. jsonchema is correct):

{
    "$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/refs/heads/main/schema/3.56.0/as3-schema.json",
    "class": "AS3",
    "action": "deploy",
    "persist": true,
    "declaration": {
        "class": "ADC",
        "schemaVersion": "3.56.0",
        "id": "urn:uuid:9ee77479-b1d9-5dfe-b0e6-bd1c65c10b8d",
        "updateMode": "selective",
        "tenant_test": {
            "class": "Tenant",
            "defaultRouteDomain": 0,
            "app_test": {
                "class": "Application",
                "mon-tcp_test": {
                    "class": "Monitor",
                    "monitorType": "tcp"
                }
            }
        }
    }
}

 

I checked per-app-schema.json file and it seems, '$schema' object is not valid configuration object - why? :)

martin

No RepliesBe the first to reply