Skip to content

Commit

Permalink
if struct is omitted for JSON, use field name is id
Browse files Browse the repository at this point in the history
  • Loading branch information
DimShadoWWW committed Jan 3, 2025
1 parent 357b6b9 commit 3098336
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions openapi_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@ func (mp *MetadataParsers) ParseStructTags(t reflect.Type, schemaRef *openapi3.S
jsonFieldName := field.Tag.Get("json")
jsonFieldName = strings.Split(jsonFieldName, ",")[0]
if jsonFieldName == "-" {
continue
}
if jsonFieldName == "" {
jsonFieldName = field.Name
}

Expand Down

0 comments on commit 3098336

Please sign in to comment.