mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
OpenAPI bug: Array/Map Ptr Elements' handing was incorrect
This commit is contained in:
parent
d20414e2b6
commit
4a7e1df8e0
1 changed files with 2 additions and 2 deletions
|
|
@ -579,7 +579,7 @@ func (g openAPITypeWriter) generateMapProperty(t *types.Type) error {
|
|||
case types.Builtin:
|
||||
return fmt.Errorf("please add type %v to getOpenAPITypeFormat function.", elemType)
|
||||
case types.Struct:
|
||||
g.generateReferenceProperty(t.Elem)
|
||||
g.generateReferenceProperty(elemType)
|
||||
case types.Slice, types.Array:
|
||||
g.generateSliceProperty(elemType)
|
||||
default:
|
||||
|
|
@ -603,7 +603,7 @@ func (g openAPITypeWriter) generateSliceProperty(t *types.Type) error {
|
|||
case types.Builtin:
|
||||
return fmt.Errorf("please add type %v to getOpenAPITypeFormat function.", elemType)
|
||||
case types.Struct:
|
||||
g.generateReferenceProperty(t.Elem)
|
||||
g.generateReferenceProperty(elemType)
|
||||
default:
|
||||
return fmt.Errorf("slice Element kind %v is not supported in %v", elemType.Kind, t)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue