Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,18 @@ tests:
href: "https://"
location: HelpMenu
text: foo
- name: Should be able to create a ConsoleLink with mailto href
initial: |
apiVersion: console.openshift.io/v1
kind: ConsoleLink
spec:
href: "mailto:platform-team@example.com"
location: HelpMenu
text: Contact Platform Team
expected: |
apiVersion: console.openshift.io/v1
kind: ConsoleLink
spec:
href: "mailto:platform-team@example.com"
location: HelpMenu
text: Contact Platform Team
4 changes: 2 additions & 2 deletions console/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package v1
type Link struct {
// text is the display text for the link
Text string `json:"text"`
// href is the absolute secure URL for the link (must use https)
// +kubebuilder:validation:Pattern=`^https://`
// href is the absolute URL for the link. Must use https:// for web URLs or mailto: for email links.
// +kubebuilder:validation:Pattern=`^(https://|mailto:)`
Href string `json:"href"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ spec:
- section
type: object
href:
description: href is the absolute secure URL for the link (must use
https)
pattern: ^https://
description: 'href is the absolute URL for the link. Must use https://
for web URLs or mailto: for email links.'
pattern: ^(https://|mailto:)
type: string
location:
description: location determines which location in the console the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ spec:
description: link is an object that holds notification link details.
properties:
href:
description: href is the absolute secure URL for the link (must
use https)
pattern: ^https://
description: 'href is the absolute URL for the link. Must use
https:// for web URLs or mailto: for email links.'
pattern: ^(https://|mailto:)
type: string
text:
description: text is the display text for the link
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ spec:
- section
type: object
href:
description: href is the absolute secure URL for the link (must use
https)
pattern: ^https://
description: 'href is the absolute URL for the link. Must use https://
for web URLs or mailto: for email links.'
pattern: ^(https://|mailto:)
type: string
location:
description: location determines which location in the console the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ spec:
description: link is an object that holds notification link details.
properties:
href:
description: href is the absolute secure URL for the link (must
use https)
pattern: ^https://
description: 'href is the absolute URL for the link. Must use
https:// for web URLs or mailto: for email links.'
pattern: ^(https://|mailto:)
type: string
text:
description: text is the display text for the link
Expand Down
2 changes: 1 addition & 1 deletion console/v1/zz_generated.swagger_doc_generated.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions openapi/generated_openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 37 additions & 13 deletions openapi/openapi.json

Large diffs are not rendered by default.