Skip to content

Commit

Permalink
fix code checking error and fix #717
Browse files Browse the repository at this point in the history
fix code checking  error  and  fix  #717
  • Loading branch information
sdghchj committed May 29, 2020
1 parent 2b0d62a commit 16c21c4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion operation.go
Expand Up @@ -210,7 +210,7 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
return false
}
orderedNames := make([]string, 0, len(schema.Properties))
for k, _ := range schema.Properties {
for k = range schema.Properties {
orderedNames = append(orderedNames, k)
}
sort.Strings(orderedNames)
Expand Down Expand Up @@ -239,6 +239,11 @@ func (operation *Operation) ParseParamComment(commentLine string, astFile *ast.F
Println(fmt.Sprintf("skip field [%s] in %s is not supported type for %s", name, refType, paramType))
continue
}
param.Nullable = prop.Nullable
param.Format = prop.Format
param.Default = prop.Default
param.Example = prop.Example
param.Extensions = prop.Extensions
param.CommonValidations.Maximum = prop.Maximum
param.CommonValidations.Minimum = prop.Minimum
param.CommonValidations.ExclusiveMaximum = prop.ExclusiveMaximum
Expand Down

0 comments on commit 16c21c4

Please sign in to comment.