You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
type OpenAPIDefinitionGetter interface {
OpenAPIDefinition() *OpenAPIDefinition
}
type OpenAPIV3DefinitionGetter interface {
OpenAPIV3Definition() *OpenAPIDefinition
}
However, implementing this doesn't actually work, because they're incorrectly specified. The methods actually need to return the structs directly, not a pointer of the struct, for it to work. Since the generator never actually checks for the interface, but purely for the existence of the method, this goes unnoticed.
The interfaces actually should be declared as
type OpenAPIDefinitionGetter interface {
OpenAPIDefinition() OpenAPIDefinition
}
type OpenAPIV3DefinitionGetter interface {
OpenAPIV3Definition() OpenAPIDefinition
}
The text was updated successfully, but these errors were encountered:
kube-openapi has two interfaces
However, implementing this doesn't actually work, because they're incorrectly specified. The methods actually need to return the structs directly, not a pointer of the struct, for it to work. Since the generator never actually checks for the interface, but purely for the existence of the method, this goes unnoticed.
The interfaces actually should be declared as
The text was updated successfully, but these errors were encountered: