Skip to content

Commit

Permalink
The output-folder for a profile now no longer reports errors (#14161)
Browse files Browse the repository at this point in the history
* the output-folder for a profile now no longer reports errors

* refine the error message to give more clear guidance of fixing
  • Loading branch information
ArcturusZhang authored Jan 14, 2021
1 parent f9b9d1a commit 7104910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/generator/validate/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func MgmtCheck(ctx *MetadataValidateContext, tag string, metadata model.Metadata
return err
}
if !mgmtOutputRegex.MatchString(rel) {
return fmt.Errorf("the output-folder of a management plane package '%s' must be in this pattern: '^services(/preview)?/[^/]+/mgmt/[^/]+/[^/]+$'", tag)
return fmt.Errorf("the output-folder of a management plane package '%s' is expected to have this pattern: 'services/(preview)?/{RPname}/mgmt/{packageVersion}/{namespace}'", tag)
}
}
return nil
Expand All @@ -104,5 +104,5 @@ var (
previewSwaggerRegex = regexp.MustCompile(`^preview|.+[/\\]preview[/\\]`)
previewOutputRegex = regexp.MustCompile(`^services/preview/`)
mgmtReadmeRegex = regexp.MustCompile(`[/\\]resource-manager[/\\]`)
mgmtOutputRegex = regexp.MustCompile(`^services(/preview)?/[^/]+/mgmt/[^/]+/[^/]+$`)
mgmtOutputRegex = regexp.MustCompile(`^services(/preview)?/[^/]+/mgmt/[^/]+/[^/]+$|^profiles/[^/]+/[^/]+/mgmt/[^/]+$`)
)

0 comments on commit 7104910

Please sign in to comment.