Skip to content

Commit

Permalink
tools/importer-rest-api-specs: handling an options type of "number" (…
Browse files Browse the repository at this point in the history
…which should be "integer")
  • Loading branch information
tombuildsstuff committed Oct 11, 2021
1 parent 7677541 commit 9ce75de
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/importer-rest-api-specs/parser/operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,16 @@ func (p operationsParser) determineObjectDefinitionForOptionRaw(paramType string
Type: models.ObjectDefinitionFloat,
}, nil
}

if format != "" {
// we don't know what this is, better to raise an error and handle it than make
// it an integer if it should be a float or something
return nil, fmt.Errorf("unsupported format type for number %q", format)
}

return &models.ObjectDefinition{
Type: models.ObjectDefinitionInteger,
}, nil
}

case "string":
Expand Down

0 comments on commit 9ce75de

Please sign in to comment.