We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbd11bf commit f57ebdcCopy full SHA for f57ebdc
.gitignore
@@ -35,3 +35,4 @@ samples/demo/demo
35
36
ext/services
37
.DS_Store
38
+.idea
swagger/swagger.go
@@ -302,7 +302,12 @@ func CreateProperties(obj interface{}) map[string]*Property {
302
fv = reflect.New(ft).Elem()
303
}
304
p.Default = fv.Interface()
305
- ps[field.Name] = p
+ n := field.Tag.Get("json")
306
+ if n == "" {
307
+ ps[field.Name] = p
308
+ } else {
309
+ ps[n] = p
310
+ }
311
312
return ps
313
0 commit comments