mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #49055 from mbohlool/bugfix2
Automatic merge from submit-queue (batch tested with PRs 49055, 49128, 49132, 49134, 49110) OpenAPI bug: Array/Map Ptr Elements' handing was incorrect If you have an array of map of pointers, OpenAPI spec generation would fail. fixes: #49074
This commit is contained in:
commit
effcdda0ce
@ -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 New Issue
Block a user