Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding goswagger annotations to VersionNumber strings #29

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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