Skip to content

Add JSON Schema generation for ECS application config#6744

Open
madmecodes wants to merge 1 commit intopipe-cd:masterfrom
madmecodes:feat/ecs-jsonschema
Open

Add JSON Schema generation for ECS application config#6744
madmecodes wants to merge 1 commit intopipe-cd:masterfrom
madmecodes:feat/ecs-jsonschema

Conversation

@madmecodes
Copy link
Copy Markdown

Summary

  • Adds a tool/jsonschema-gen Go program that generates JSON Schema from PipeCD configuration structs using github.com/invopop/jsonschema
  • Generates schema for ECSApplicationSpec with camelCase field names matching the YAML config format
  • Output goes to docs/static/jsonschema/ecs.json, ready to be served at a public URL for editor integration

Closes #6684

How it works

go run ./tool/jsonschema-gen -out docs/static/jsonschema

Users can then reference the schema in their YAML configs for autocompletion and validation:

# yaml-language-server: $schema=https://pipecd.dev/jsonschema/ecs.json

Test plan

  • Tool compiles and runs successfully
  • Generated schema includes all ECS-specific types (ECSDeploymentInput, ECSTargetGroups, ECSSyncStageOptions, etc.)
  • Field names use camelCase matching the json struct tags
  • Verify schema works with Red Hat YAML Language Server in VS Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Proposal: Provide official JSON Schema for ECS configuration(maybe other providers too ?)

1 participant