Skip to content

Commit

Permalink
fix: Marked optional fields in github and calendar eventsources (#1421)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Soifer <[email protected]>
  • Loading branch information
daniel-codefresh authored Nov 9, 2021
1 parent 45abcb9 commit 878c8d1
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 18 deletions.
6 changes: 6 additions & 0 deletions api/event-source.html

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

9 changes: 9 additions & 0 deletions api/event-source.md

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

8 changes: 1 addition & 7 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@
"description": "CalendarEventSource describes a time based dependency. One of the fields (schedule, interval, or recurrence) must be passed. Schedule takes precedence over interval; interval takes precedence over recurrence",
"properties": {
"exclusionDates": {
"description": "ExclusionDates defines the list of DATE-TIME exceptions for recurring events.",
"items": {
"type": "string"
},
Expand Down Expand Up @@ -803,10 +804,6 @@
"type": "string"
}
},
"required": [
"schedule",
"interval"
],
"type": "object"
},
"io.argoproj.eventsource.v1alpha1.CatchupConfiguration": {
Expand Down Expand Up @@ -1322,9 +1319,6 @@
}
},
"required": [
"id",
"owner",
"repository",
"events"
],
"type": "object"
Expand Down
8 changes: 1 addition & 7 deletions api/openapi-spec/swagger.json

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

6 changes: 6 additions & 0 deletions pkg/apis/eventsource/v1alpha1/generated.proto

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

6 changes: 3 additions & 3 deletions pkg/apis/eventsource/v1alpha1/openapi_generated.go

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

6 changes: 5 additions & 1 deletion pkg/apis/eventsource/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,11 +206,12 @@ type Service struct {
// Schedule takes precedence over interval; interval takes precedence over recurrence
type CalendarEventSource struct {
// Schedule is a cron-like expression. For reference, see: https://en.wikipedia.org/wiki/Cron
// +optional
Schedule string `json:"schedule" protobuf:"bytes,1,opt,name=schedule"`
// Interval is a string that describes an interval duration, e.g. 1s, 30m, 2h...
// +optional
Interval string `json:"interval" protobuf:"bytes,2,opt,name=interval"`
// ExclusionDates defines the list of DATE-TIME exceptions for recurring events.

ExclusionDates []string `json:"exclusionDates,omitempty" protobuf:"bytes,3,rep,name=exclusionDates"`
// Timezone in which to run the schedule
// +optional
Expand Down Expand Up @@ -662,14 +663,17 @@ type OwnedRepositories struct {
type GithubEventSource struct {
// Id is the webhook's id
// Deprecated: This is not used at all, will be removed in v1.6
// +optional
ID int64 `json:"id" protobuf:"varint,1,opt,name=id"`
// Webhook refers to the configuration required to run a http server
Webhook *WebhookContext `json:"webhook,omitempty" protobuf:"bytes,2,opt,name=webhook"`
// DeprecatedOwner refers to GitHub owner name i.e. argoproj
// Deprecated: use Repositories instead. Will be unsupported in v 1.6
// +optional
DeprecatedOwner string `json:"owner" protobuf:"bytes,3,opt,name=owner"`
// DeprecatedRepository refers to GitHub repo name i.e. argo-events
// Deprecated: use Repositories instead. Will be unsupported in v 1.6
// +optional
DeprecatedRepository string `json:"repository" protobuf:"bytes,4,opt,name=repository"`
// Events refer to Github events to which the event source will subscribe
Events []string `json:"events" protobuf:"bytes,5,rep,name=events"`
Expand Down

0 comments on commit 878c8d1

Please sign in to comment.