Skip to content

Commit 182167d

Browse files
committed
remove empty members from open api definition
1 parent a67ef11 commit 182167d

File tree

1 file changed

+1
-11
lines changed
  • keps/sig-api-machinery/1027-api-unions

1 file changed

+1
-11
lines changed

keps/sig-api-machinery/1027-api-unions/README.md

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,7 @@ A new extension is created in the openapi to describe the behavior:
425425
`x-kubernetes-unions`.
426426

427427
This is a list of unions that are part of this structure/object. Each item in
428-
the list represents a discriminator for the union, a list of valid discriminator
429-
unions that do not correspond to member fields, and for each member field,
428+
the list represents a discriminator for the union, and for each member field,
430429
the discriminator value of that field and whether or not that field is optional.
431430

432431
Conversion between OpenAPI v2 and OpenAPI v3 will preserve these fields.
@@ -491,11 +490,6 @@ OpenAPIDefinition{
491490
"x-kubernetes-unions": []interface{}{
492491
map[string]interface{}{
493492
"discriminator": "Union1",
494-
"emptyMembers":[]string{
495-
"FieldC",
496-
"FieldD",
497-
"",
498-
},
499493
"fields-to-discriminateBy": map[string]interface{}{
500494
"FieldA": map[string]interface{}{
501495
"discriminatorValue": "FieldA",
@@ -509,10 +503,6 @@ OpenAPIDefinition{
509503
},
510504
map[string]interface{}{
511505
"discriminator": "Union2",
512-
"emptyMembers":[]string{
513-
"GAMMA",
514-
"NULL",
515-
},
516506
"fields-to-discriminateBy": map[string]interface{}{
517507
"Alpha": map[string]interface{}{
518508
"discriminatorValue": "ALPHA",

0 commit comments

Comments
 (0)