Skip to content

Conversation

Copy link

Copilot AI commented Dec 21, 2025

Implements a VSCode extension that scaffolds YAML configuration files from templates and validates them against custom JSON schemas in real-time.

Implementation

Extension Commands

  • Scaffold YAML File: Creates new YAML files from predefined DevOps configuration template
  • Validate YAML File: Manual validation trigger with AJV-based JSON Schema Draft 07 validation

Auto-validation

  • Triggers on save for files matching DevOps patterns (*devops*, *config*, *-config.yaml)
  • Clears diagnostics per-document to avoid cross-file interference
  • Attempts line-number positioning via YAML path parsing

Schema System

  • Default .devops-schema.json with services, databases, health checks
  • Configurable schema path via devopsPowertools.schemaPath workspace setting
  • Supports application metadata, port ranges, semver validation, enum constraints

VSCode Integration

  • Diagnostics collection initialized in activate(), disposed in deactivate()
  • Errors reported to Problems panel with severity and line positioning
  • Extension activates on YAML language files

Example

name: my-app
version: 1.0.0
environment: production

services:
  - name: api
    port: 8080
    replicas: 3
    healthCheck:
      enabled: true
      path: /health
      interval: 30

database:
  type: postgresql
  host: db.example.com
  port: 5432
  name: prod_db

Schema validates:

  • Semver pattern for version
  • Enum constraints (environment: dev/staging/prod, database type)
  • Port ranges (1-65535)
  • Required fields (name, version, environment)

Security Summary

No vulnerabilities detected (npm audit, CodeQL).

Original prompt

a vscode extension to scaffold a yaml file with my custom schema for my app and validate schema files in the current project


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 5 commits December 21, 2025 02:42
Co-authored-by: brianLoomis <90281862+brianLoomis@users.noreply.github.com>
Co-authored-by: brianLoomis <90281862+brianLoomis@users.noreply.github.com>
…nagement

Co-authored-by: brianLoomis <90281862+brianLoomis@users.noreply.github.com>
Co-authored-by: brianLoomis <90281862+brianLoomis@users.noreply.github.com>
Co-authored-by: brianLoomis <90281862+brianLoomis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add VSCode extension for YAML schema scaffolding and validation Add VSCode extension for YAML schema scaffolding and validation Dec 21, 2025
Copilot AI requested a review from brianLoomis December 21, 2025 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants