File tree 3 files changed +13
-2
lines changed
3 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -66,4 +66,10 @@ Other supported options are:
66
66
* ` use_ref `
67
67
* when set to ` true ` , the output uses the ` $ref ` field in OpenAPI spec to reference other schemas.
68
68
* ` yaml `
69
- * when set to ` true ` , the output is in yaml file.
69
+ * when set to ` true ` , the output is in yaml file.
70
+ * ` include_description `
71
+ * when set to ` true ` , the openapi schema will include descriptions, generated from the proto message comment.
72
+ * ` enum_as_int_or_string `
73
+ * when set to ` true ` , the openapi schema will include ` x-kubernetes-int-or-string ` on enums.
74
+ * ` additional_empty_schemas `
75
+ * a ` + ` separated list of message names (` core.solo.io.Status ` ), whose generated schema should be an empty object that accepts all values.
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ func generate(request plugin.CodeGeneratorRequest) (*plugin.CodeGeneratorRespons
104
104
default :
105
105
return nil , fmt .Errorf ("unknown value '%s' for enum_as_int_or_string" , v )
106
106
}
107
- } else if k == "empty_schema " {
107
+ } else if k == "additional_empty_schema " {
108
108
messagesWithEmptySchema = strings .Split (v , "+" )
109
109
} else {
110
110
return nil , fmt .Errorf ("unknown argument '%s' specified" , k )
Original file line number Diff line number Diff line change @@ -130,6 +130,11 @@ func newOpenAPIGenerator(
130
130
}
131
131
}
132
132
133
+ // buildCustomSchemasByMessageName name returns a mapping of message name to a pre-defined openapi schema
134
+ // It includes:
135
+ // 1. `specialSoloTypes`, a set of pre-defined schemas
136
+ // 2. `messagesWithEmptySchema`, a list of messages that are injected at runtime that should contain
137
+ // and empty schema which accepts and preserves all fields
133
138
func buildCustomSchemasByMessageName (messagesWithEmptySchema []string ) map [string ]openapi3.Schema {
134
139
schemasByMessageName := make (map [string ]openapi3.Schema )
135
140
You can’t perform that action at this time.
0 commit comments