f5-appsvcs-extension: AS3 schema does not support per app declarations
Environment
- Application Services Version: >=3.47.x
- BIG-IP Version: not applicable here
Summary
The current json schema is not able to validate per-app declarations. I see from the releases page that per-app was introduced as beta feature in 3.47.0; but maybe the as3 schema has not been updated to accommodate it yet. From some communications I see that per-app will be available as General Availability in 3.50.0, we need a way to verify the json schema for perapp declarations as well 😃
I know 3.50.0 is still not “released” according to releases, so maybe this issue has been prematurely raised.
Steps To Reproduce
Steps to reproduce the behavior: Get the sample per-app declaration from user guide: https://clouddocs.f5.com/products/extensions/f5-appsvcs-extension/latest/userguide/per-app-declarations.html#example-per-application-declaration
Get the latest up to date schema: https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/main/schema/3.50.0/as3-schema-3.50.0-5.json
- Validate locally below declaration
{
"$schema": "https://raw.githubusercontent.com/F5Networks/f5-appsvcs-extension/main/schema/3.50.0/as3-schema-3.50.0-5.json",
"id": "per-app-declaration",
"schemaVersion": "3.50.0",
"controls": {
"class": "Controls",
"logLevel": "debug",
"trace": true
},
"Application1": {
"class": "Application",
"service": {
"class": "Service_HTTP",
"virtualAddresses": [
"192.0.2.1"
],
"pool": "pool"
},
"pool": {
"class": "Pool",
"members": [
{
"servicePort": 80,
"serverAddresses": [
"192.0.2.10",
"192.0.2.20"
]
}
]
}
}
}
Expected Behavior
The sample per-app AS3 declaration should have been validated by the schema
Actual Behavior
The json schema validation fails 😦
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
Hello @sohel-m
I’m sorry to hear that the workaround is still causing trouble with your tooling.
AS3 uses the AJV tool for JSON schema validation, but I can see how other tools might not handle a URN external reference path based on how JSON schema files are loaded into the specific tool. I think you’re on the right track by investigating how to reference an external file using a file URI instead of a URN.
I want to clarify that @mdditt2000 and @sunitharonan will handle triaging this task and discussing with the AS3 team on how this issue will be resolved. But I’ll leave the following comment here for the team to review and consider:
Based on our discussion and the variety of different JSON schema validation tools, I agree that the permanent solution should be an independent, stand-alone per-app schema to help simplify the experience of locally validating. Creating the stand-alone schema file would involve:
Thanks for your reply and the detailed workaround/instructions to get the per-app schema @tpitkinf5 😃
I’m wondering if there is a possibility on your side to somehow implement one of the following two options
(I’m a complete novice in the https://json-schema.org/ topic so I’m unsure about the feasibility of my requests)
Meanwhile I’ll start some testing according the process you explained, thanks again for that
Cheers