From 750a88a23b5434cd25c1d38bb3f032304eb0d0e3 Mon Sep 17 00:00:00 2001 From: David Alberto Adler Date: Sun, 30 Jun 2024 17:25:35 +0100 Subject: [PATCH] Add FallbackCodeSamplesLanguage --- workflow/source.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/workflow/source.go b/workflow/source.go index 252aa23..6bbf134 100644 --- a/workflow/source.go +++ b/workflow/source.go @@ -14,12 +14,22 @@ import ( // Ensure your update schema/workflow.schema.json on changes type Source struct { Inputs []Document `yaml:"inputs"` - Overlays []Document `yaml:"overlays,omitempty"` + Overlays []Overlay `yaml:"overlays,omitempty"` Output *string `yaml:"output,omitempty"` Ruleset *string `yaml:"ruleset,omitempty"` Registry *SourceRegistry `yaml:"registry,omitempty"` } +// Either FallBackCodeSamples or Document +type Overlay struct { + FallbackCodeSamples *FallbackCodeSamples `yaml:"fallbackCodeSamples,omitempty"` + Document *Document `yaml:"document,omitempty"` +} + +type FallbackCodeSamples struct { + FallbackCodeSamplesLanguage string `yaml:"fallbackCodeSamplesLanguage,omitempty"` +} + type Document struct { Location string `yaml:"location"` Auth *Auth `yaml:",inline"`