added error message

This commit is contained in:
Thomas Rodgers
2020-06-26 12:03:27 -07:00
parent b044a52a84
commit 4cae8cfe9b

View File

@@ -57,6 +57,9 @@ func (c SetterCreator) Create(openAPIPath, resourcesPath string) error {
if err := sd.AddToFile(openAPIPath); err != nil {
return err
}
if sd.Count == 0 {
fmt.Errorf("The setter you created does not match any fields.")
}
// Load the updated definitions
if err := openapi.AddSchemaFromFile(openAPIPath); err != nil {