openapi3: add support for extensions on the few types left#763
openapi3: add support for extensions on the few types left#763fenollp merged 1 commit intogetkin:masterfrom
Conversation
94a3e27 to
b01f005
Compare
7ecc3c1 to
4485967
Compare
4263a8c to
effade4
Compare
d746896 to
58c310d
Compare
0bb0935 to
90365e5
Compare
Signed-off-by: Pierre Fenoll <pierrefenoll@gmail.com>
|
This shipped in Reproduce it by running the following code first with oas := openapi3.NewLoader()
existingDoc, err := oas.LoadFromFile("./spec/reference/example.yaml")
if err != nil {
return fmt.Errorf("failed to load file: %s with err: %s", s.FileName, err.Error())
}
// `existingDoc.Paths` looks good when introspected with debugger.
err = existingDoc.Validate(ctx)
if err != nil {
return fmt.Errorf("failed to validate file: %s with err: %s", s.FileName, err.Error())
}
marshalledJson, err := existingDoc.MarshalJSON() // Looks as expected.
if err != nil {
return err
}
marshalledYaml, err := yaml.Marshal(&existingDoc) // Loss of `T.Paths`
if err != nil {
return err
} |
|
This was a big breaking change. |
I'm using that. The problem is marshalling of yaml. Which I believe there is another bug for |
Signed-off-by: Pierre Fenoll pierrefenoll@gmail.com