Skip to content

Commit

Permalink
Update parser.go
Browse files Browse the repository at this point in the history
  • Loading branch information
sdghchj committed May 8, 2020
1 parent ca3ddd8 commit a7e0180
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions parser.go
Expand Up @@ -880,12 +880,8 @@ func (parser *Parser) parseStructField(pkgName string, field *ast.Field) (map[st

switch schemaType {
case "object":
if len(schema.SchemaProps.Properties) > 0 {
for k, v := range schema.SchemaProps.Properties {
properties[k] = v
}
} else if schema.AdditionalProperties != nil {
properties[typeName] = *schema
for k, v := range schema.SchemaProps.Properties {
properties[k] = v
}
case "array":
properties[typeName] = *schema
Expand Down

0 comments on commit a7e0180

Please sign in to comment.