Skip to content

CLOUDP-325047: add support for extension in the main element of the OAS #773

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tools/cli/internal/openapi/openapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ type Spec struct {
Paths *openapi3.Paths `json:"paths" yaml:"paths"`
Components *openapi3.Components `json:"components,omitempty" yaml:"components,omitempty"`
ExternalDocs *openapi3.ExternalDocs `json:"externalDocs,omitempty" yaml:"externalDocs,omitempty"`
Extensions map[string]any `json:"-" yaml:"-"`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't - means ignored? do you really mean to ignore this field?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I don't want to have the field name extensions in the serializated output. I am reusing the same definition in openapi3.go. It should work since we use the same definition also for Extensions fields in other structs. Btw, I will open a follow up PR to fix this if I am wrong.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you are right, this does not work. I am adding the missing part here #774

}
type Parser interface {
CreateOpenAPISpecFromPath(string) (*load.SpecInfo, error)
Expand Down
Loading