Skip to content

Commit

Permalink
Merge pull request #3 from solo-io/fix-openapi-schema-crd
Browse files Browse the repository at this point in the history
allow any YAML value for google.protobuf.Value
  • Loading branch information
kdorosh authored Feb 16, 2022
2 parents 34b6b5c + a6874b6 commit 40b7776
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions changelog/v0.0.3/fix-googleprotobufValue-crd-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
changelog:
- type: NON_USER_FACING
description: adds `object` type for `google.protobuf.ListValue`.
issueLink: https://github.com/solo-io/gloo/issues/5936
resolvesIssue: false
9 changes: 9 additions & 0 deletions openapiGenerator.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@ var specialSoloTypes = map[string]openapi3.Schema{
},
},
},
"google.protobuf.Value": {
Type: openapi3.TypeObject,
Properties: make(map[string]*openapi3.SchemaRef),
ExtensionProps: openapi3.ExtensionProps{
Extensions: map[string]interface{}{
"x-kubernetes-preserve-unknown-fields": true,
},
},
},
"google.protobuf.BoolValue": *openapi3.NewBoolSchema().WithNullable(),
"google.protobuf.StringValue": *openapi3.NewStringSchema().WithNullable(),
"google.protobuf.DoubleValue": *openapi3.NewFloat64Schema().WithNullable(),
Expand Down

0 comments on commit 40b7776

Please sign in to comment.