YAML declarations in SchemaProps struct · Issue #164 · go-openapi/spec (original) (raw)

@alexartwww

Description

@alexartwww

alexartwww

opened

on Mar 18, 2023

This code won't work because type SchemaProps struct does not have yaml declarations, why?

schema := new(spec.Schema)
errYamlUnmarshal := yaml.Unmarshal(yamlBytes, schema)
if errYamlUnmarshal != nil {
    return errYamlUnmarshal
}

I'm working with example https://pkg.go.dev/github.com/go-openapi/validate#example-AgainstSchema
And cannot load yaml file.

Metadata

Metadata

Assignees

No one assigned

Labels

question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions