-
-
Notifications
You must be signed in to change notification settings - Fork 433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openapi3: add support for extensions on the few types left #763
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