Skip to content

Commit 3ad7bc9

Browse files
authored
Merge pull request #838 from davinkevin/fix-openapi-url
fix(openapi): full regex for url to prevent error
2 parents 3013b5f + 889a505 commit 3ad7bc9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

api/v1beta1/gitrepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const (
3737
// GitRepositorySpec defines the desired state of a Git repository.
3838
type GitRepositorySpec struct {
3939
// The repository URL, can be a HTTP/S or SSH address.
40-
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
40+
// +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
4141
// +required
4242
URL string `json:"url"`
4343

api/v1beta2/gitrepository_types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const (
4848
// Artifact for a Git repository.
4949
type GitRepositorySpec struct {
5050
// URL specifies the Git repository URL, it can be an HTTP/S or SSH address.
51-
// +kubebuilder:validation:Pattern="^(http|https|ssh)://"
51+
// +kubebuilder:validation:Pattern="^(http|https|ssh)://.*$"
5252
// +required
5353
URL string `json:"url"`
5454

config/crd/bases/source.toolkit.fluxcd.io_gitrepositories.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ spec:
169169
type: string
170170
url:
171171
description: The repository URL, can be a HTTP/S or SSH address.
172-
pattern: ^(http|https|ssh)://
172+
pattern: ^(http|https|ssh)://.*$
173173
type: string
174174
verify:
175175
description: Verify OpenPGP signature for the Git commit HEAD points
@@ -513,7 +513,7 @@ spec:
513513
url:
514514
description: URL specifies the Git repository URL, it can be an HTTP/S
515515
or SSH address.
516-
pattern: ^(http|https|ssh)://
516+
pattern: ^(http|https|ssh)://.*$
517517
type: string
518518
verify:
519519
description: Verification specifies the configuration to verify the

0 commit comments

Comments
 (0)