mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
fix: jsonschema
hopefully fixes #3238 Signed-off-by: Carlos A Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
40164fac9d
commit
6fdb41f4af
@ -460,14 +460,10 @@ func (f *File) UnmarshalYAML(unmarshal func(interface{}) error) error {
|
||||
}
|
||||
|
||||
func (f File) JSONSchema() *jsonschema.Schema {
|
||||
type t File
|
||||
reflector := jsonschema.Reflector{
|
||||
ExpandedStruct: true,
|
||||
}
|
||||
schema := reflector.Reflect(&t{})
|
||||
// jsonschema would just refer to FileInfo in the definition. It doesn't get included there, as we override the
|
||||
// generated schema with JSONSchema here. So we need to include it directly in the schema of File.
|
||||
schema.Properties.Set("info", reflector.Reflect(&FileInfo{}).Type)
|
||||
schema := reflector.Reflect(&File{})
|
||||
return &jsonschema.Schema{
|
||||
OneOf: []*jsonschema.Schema{
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user