Skip to content

Commit 6530f8b

Browse files
authored
OpenAPI: add support for standard annotations (#15241)
1 parent 559dda9 commit 6530f8b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

mmv1/openapi_generate/parser.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,12 @@ func writeObject(name string, obj *openapi3.SchemaRef, objType openapi3.Types, u
378378
break
379379
}
380380

381+
if field.Name == "annotations" {
382+
// Standard annotations implementation
383+
field.Type = "KeyValueAnnotations"
384+
break
385+
}
386+
381387
if obj.Value.AdditionalProperties.Schema != nil && obj.Value.AdditionalProperties.Schema.Value.Type.Is("string") {
382388
// AdditionalProperties with type string is a string -> string map
383389
field.Type = "KeyValuePairs"

0 commit comments

Comments
 (0)