- Home
- F5 Distributed Cloud Tools for Visual Studio Code
- Features
- JSON and YAML IntelliSense
JSON and YAML IntelliSense
The F5 Distributed Cloud Tools extension includes a schema validation engine that provides intelligent autocompletion, hover documentation, structural error detection, and conflict diagnostics for both JSON and YAML configuration files.
OpenAPI Schema Integration
Section titled “OpenAPI Schema Integration”The extension generates and pre-warms JSON schemas derived directly from F5 Distributed Cloud (XC) OpenAPI specifications. Schemas register under the xcsh-schema:// Uniform Resource Identifier (URI) scheme and associate automatically with:
- Virtual documents opened through the
xcsh://file system provider - Workspace manifest files (
*.http_loadbalancer.json,*.origin_pool.json,*.xcsh.json,.xcsh/*.json) - YAML files matching F5 Distributed Cloud schema headers via the YAML Language Server extension
Schema Enrichment Extensions
Section titled “Schema Enrichment Extensions”F5 Distributed Cloud schemas include custom metadata extensions to guide configuration authoring:
1. Minimum Configuration (x-f5xc-minimum-configuration)
Section titled “1. Minimum Configuration (x-f5xc-minimum-configuration)”Identifies the baseline fields required to instantiate a valid resource. When you create a resource template in Visual Studio Code, the extension scaffolds these required properties automatically:
{ "metadata": { "name": "example-lb", "namespace": "default" }, "spec": { "domains": ["app.example.com"], "https_auto_cert": { "http_redirect": true }, "default_route_pools": [] }}2. Contextual Field Requirements (x-f5xc-required-for)
Section titled “2. Contextual Field Requirements (x-f5xc-required-for)”Indicates when specific fields are required based on the operational context:
create: true: The property must be present when initially creating the resource.update: true: The property must be present during update (PUT) operations.minimum_config: true: The property belongs to the minimal viable template.
3. Mutual Exclusivity and Conflicts (x-f5xc-conflicts-with)
Section titled “3. Mutual Exclusivity and Conflicts (x-f5xc-conflicts-with)”Identifies mutually exclusive fields where setting one property invalidates another. For example, in load balancer configurations, you cannot define both active service policies and explicitly specify no service policies:
active_service_policiesconflicts withno_service_policiesandservice_policies_from_namespace.
4. Recommended oneOf Variants (x-f5xc-recommended-oneof-variant)
Section titled “4. Recommended oneOf Variants (x-f5xc-recommended-oneof-variant)”When a property accepts multiple variants (a oneOf schema union), this extension indicates the recommended default (for example, recommending https_auto_cert over manual https or plain http).
Real-Time Conflict Diagnostics
Section titled “Real-Time Conflict Diagnostics”The extension includes a Conflict Diagnostic Provider that continuously analyzes open manifests for mutually exclusive fields.
When a conflict occurs:
- Visual Studio Code underlines the conflicting properties with diagnostic squiggles.
- The Problems panel (
Ctrl+Shift+M/Cmd+Shift+M) lists the exact conflicting fields and explains the exclusivity rule. - Hovering over the diagnostic displays the conflict explanation.
Quick Fix Code Actions
Section titled “Quick Fix Code Actions”The extension registers a Code Action Provider that offers automated repairs for detected schema conflicts:
- Place your cursor on the highlighted conflicting property.
- Select the Quick Fix lightbulb icon (or press
Ctrl+./Cmd+.). - Select the recommended resolution (for example, Remove conflicting ‘no_service_policies’ property).
- The extension automatically refactors the JSON/YAML structure to resolve the diagnostic.
Autocompletion and Hover Documentation
Section titled “Autocompletion and Hover Documentation”As you author configurations:
- Autocompletion: Press
Ctrl+Spaceto view valid properties, allowable enum values, and nested schema snippets. - Hover Documentation: Hover over any property key to view its description, expected data type, allowed constraints, and documentation links.