Skip to content

Conversation

@chrisghill
Copy link
Member

No description provided.

@chrisghill chrisghill changed the title Handle the two types of dependencies (array and map) Handle the two types of dependencies (array and schema) Sep 4, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the JSON Schema handling to support two different types of dependencies: array dependencies (map[string][]string) and schema dependencies (map[string]*Schema). This aligns with JSON Schema specifications that allow dependencies to be either property names or schema objects.

  • Replaces the single Dependencies field with DependenciesRaw for marshaling and a generic Dependencies field for runtime usage
  • Adds marshaling/unmarshaling logic to handle both dependency types by attempting to parse as array dependencies first, then falling back to schema dependencies
  • Updates property expansion logic to only process schema-type dependencies

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
pkg/schema/types.go Replaces Dependencies field with DependenciesRaw and generic Dependencies field
pkg/schema/marshal.go Adds marshaling/unmarshaling logic for both dependency types
pkg/schema/expand.go Updates property expansion to handle only schema-type dependencies
pkg/helm/helmtoschema.go Adds safety check for empty document content

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

chrisghill and others added 3 commits September 4, 2025 17:31
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@chrisghill chrisghill merged commit a420fff into main Sep 4, 2025
2 checks passed
@chrisghill chrisghill deleted the chris/bugfix/variable-dependency-handling branch September 4, 2025 23:35
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.

3 participants