Skip to content

Commit

Permalink
Adding goswagger annotations to VersionNumber strings
Browse files Browse the repository at this point in the history
Signed-off-by: AbstractionFactory <[email protected]>
  • Loading branch information
abstractionfactory committed Sep 4, 2024
1 parent 883944a commit c35ba43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions types/module/version_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ const maxVersionLength = 255
// VersionNumber describes the semver version number. Note that in contrast to provider versions module versions
// do not have a compulsory "v" prefix. Call ToVCSVersion() before you call Normalize() in order to get the correct
// VCS version.
//
// swagger:model ModuleVersionNumber
type VersionNumber string

// Normalize adds a "v" prefix if none is present. Note, however, that in contrast to provider versions module versions
Expand Down
2 changes: 2 additions & 0 deletions types/provider/version_number.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ var versionRe = regexp.MustCompile(`^v[0-9]+\.[0-9]+\.[0-9]+(|-[a-zA-Z0-9-.]+)$`
const maxVersionLength = 255

// VersionNumber describes the semver version number.
//
// swagger:model ProviderVersionNumber
type VersionNumber string

func (v VersionNumber) Normalize() VersionNumber {
Expand Down

0 comments on commit c35ba43

Please sign in to comment.