From e4e8e1e76ac38161c78de616bed56f327484b3e1 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Sun, 7 Apr 2024 17:36:24 +0200 Subject: [PATCH 1/2] Define every `url` and `viewUrl` field as format `uri` Signed-off-by: David Bernard --- schemas/environmentcreated.json | 3 ++- schemas/environmentmodified.json | 3 ++- schemas/pipelinerunfinished.json | 3 ++- schemas/pipelinerunqueued.json | 3 ++- schemas/pipelinerunstarted.json | 3 ++- schemas/repositorycreated.json | 5 +++-- schemas/repositorydeleted.json | 6 ++++-- schemas/repositorymodified.json | 6 ++++-- schemas/taskrunfinished.json | 3 ++- schemas/taskrunstarted.json | 3 ++- 10 files changed, 25 insertions(+), 13 deletions(-) diff --git a/schemas/environmentcreated.json b/schemas/environmentcreated.json index cba0e1ad..f3ab5215 100644 --- a/schemas/environmentcreated.json +++ b/schemas/environmentcreated.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/environmentmodified.json b/schemas/environmentmodified.json index f5b2b448..df480b7f 100644 --- a/schemas/environmentmodified.json +++ b/schemas/environmentmodified.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/pipelinerunfinished.json b/schemas/pipelinerunfinished.json index 33d30853..109c6cdf 100644 --- a/schemas/pipelinerunfinished.json +++ b/schemas/pipelinerunfinished.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "outcome": { "type": "string" diff --git a/schemas/pipelinerunqueued.json b/schemas/pipelinerunqueued.json index 444a14a9..56e7ba7c 100644 --- a/schemas/pipelinerunqueued.json +++ b/schemas/pipelinerunqueued.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/pipelinerunstarted.json b/schemas/pipelinerunstarted.json index efd3b765..116b9787 100644 --- a/schemas/pipelinerunstarted.json +++ b/schemas/pipelinerunstarted.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorycreated.json b/schemas/repositorycreated.json index a601191e..a309a3af 100644 --- a/schemas/repositorycreated.json +++ b/schemas/repositorycreated.json @@ -81,10 +81,11 @@ }, "url": { "type": "string", - "minLength": 1 + "format": "uri" }, "viewUrl": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorydeleted.json b/schemas/repositorydeleted.json index 02329fed..efb1d13b 100644 --- a/schemas/repositorydeleted.json +++ b/schemas/repositorydeleted.json @@ -79,10 +79,12 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "viewUrl": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/repositorymodified.json b/schemas/repositorymodified.json index c3c51fd6..1a0b88f8 100644 --- a/schemas/repositorymodified.json +++ b/schemas/repositorymodified.json @@ -79,10 +79,12 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "viewUrl": { - "type": "string" + "type": "string", + "format": "uri" } }, "additionalProperties": false, diff --git a/schemas/taskrunfinished.json b/schemas/taskrunfinished.json index 78f241c5..1b98208c 100644 --- a/schemas/taskrunfinished.json +++ b/schemas/taskrunfinished.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "pipelineRun": { "properties": { diff --git a/schemas/taskrunstarted.json b/schemas/taskrunstarted.json index 80c71e70..e8cad20d 100644 --- a/schemas/taskrunstarted.json +++ b/schemas/taskrunstarted.json @@ -76,7 +76,8 @@ "type": "string" }, "url": { - "type": "string" + "type": "string", + "format": "uri" }, "pipelineRun": { "properties": { From cc5754a2319f88bd0035d7ae181dfb3198bf8f64 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Tue, 19 Nov 2024 14:53:26 +0100 Subject: [PATCH 2/2] ! Rename every `url` field into `uri` Signed-off-by: David Bernard --- cloudevents-binding.md | 8 ++++---- conformance/environment_created.json | 2 +- conformance/environment_modified.json | 2 +- conformance/pipelinerun_finished.json | 2 +- conformance/pipelinerun_queued.json | 2 +- conformance/pipelinerun_started.json | 2 +- conformance/repository_created.json | 2 +- conformance/repository_deleted.json | 2 +- conformance/repository_modified.json | 2 +- conformance/taskrun_finished.json | 2 +- conformance/taskrun_started.json | 2 +- links.md | 6 +++--- schemas/environmentcreated.json | 2 +- schemas/environmentmodified.json | 2 +- schemas/pipelinerunfinished.json | 2 +- schemas/pipelinerunqueued.json | 2 +- schemas/pipelinerunstarted.json | 2 +- schemas/repositorycreated.json | 2 +- schemas/repositorydeleted.json | 2 +- schemas/repositorymodified.json | 2 +- schemas/taskrunfinished.json | 2 +- schemas/taskrunstarted.json | 2 +- schemas/testsuiterunqueued.json | 2 +- spec.md | 4 ++-- 24 files changed, 30 insertions(+), 30 deletions(-) diff --git a/cloudevents-binding.md b/cloudevents-binding.md index 886c2e15..a9cfc7ab 100644 --- a/cloudevents-binding.md +++ b/cloudevents-binding.md @@ -8,13 +8,13 @@ description: > CloudEvents Binding for CDEvents --- --> -# CloudEvents Binding for CDEvents +# CloudEvents Binding for CDEvents -## Abstract +## Abstract The CloudEvents Binding for CDEvents defines how CDEvents are mapped to CloudEvents headers and body. -## Table Of Contents +## Table Of Contents - [CloudEvents Context](#cloudevents-context) @@ -113,7 +113,7 @@ Content-Length: nnnn "type": "taskRun", "content": { "task": "my-task", - "url": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123" + "uri": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123" "pipelineRun": { "id": "/somewherelse/pipelinerun-123", "source": "/staging/jenkins/" diff --git a/conformance/environment_created.json b/conformance/environment_created.json index 5d4d9139..b5307707 100644 --- a/conformance/environment_created.json +++ b/conformance/environment_created.json @@ -45,7 +45,7 @@ "type": "environment", "content": { "name": "testEnv", - "url": "https://example.org/testEnv" + "uri": "https://example.org/testEnv" } } } diff --git a/conformance/environment_modified.json b/conformance/environment_modified.json index e0db006a..88438f97 100644 --- a/conformance/environment_modified.json +++ b/conformance/environment_modified.json @@ -45,7 +45,7 @@ "type": "environment", "content": { "name": "testEnv", - "url": "https://example.org/testEnv" + "uri": "https://example.org/testEnv" } } } diff --git a/conformance/pipelinerun_finished.json b/conformance/pipelinerun_finished.json index bc28e884..39a54559 100644 --- a/conformance/pipelinerun_finished.json +++ b/conformance/pipelinerun_finished.json @@ -45,7 +45,7 @@ "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123", + "uri": "https://www.example.com/mySubject123", "outcome": "failure", "errors": "Something went wrong\nWith some more details" } diff --git a/conformance/pipelinerun_queued.json b/conformance/pipelinerun_queued.json index f2a9f35f..dca95e44 100644 --- a/conformance/pipelinerun_queued.json +++ b/conformance/pipelinerun_queued.json @@ -45,7 +45,7 @@ "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123" + "uri": "https://www.example.com/mySubject123" } } } diff --git a/conformance/pipelinerun_started.json b/conformance/pipelinerun_started.json index 0e0e0b37..c5091ec0 100644 --- a/conformance/pipelinerun_started.json +++ b/conformance/pipelinerun_started.json @@ -45,7 +45,7 @@ "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123" + "uri": "https://www.example.com/mySubject123" } } } diff --git a/conformance/repository_created.json b/conformance/repository_created.json index d35240b3..7c5f803a 100644 --- a/conformance/repository_created.json +++ b/conformance/repository_created.json @@ -46,7 +46,7 @@ "content": { "name": "TestRepo", "owner": "TestOrg", - "url": "https://example.org/TestOrg/TestRepo", + "uri": "https://example.org/TestOrg/TestRepo", "viewUrl": "https://example.org/view/TestOrg/TestRepo" } } diff --git a/conformance/repository_deleted.json b/conformance/repository_deleted.json index 66869763..e4ad66e9 100644 --- a/conformance/repository_deleted.json +++ b/conformance/repository_deleted.json @@ -46,7 +46,7 @@ "content": { "name": "TestRepo", "owner": "TestOrg", - "url": "https://example.org/TestOrg/TestRepo", + "uri": "https://example.org/TestOrg/TestRepo", "viewUrl": "https://example.org/view/TestOrg/TestRepo" } } diff --git a/conformance/repository_modified.json b/conformance/repository_modified.json index 2529f4a0..951ceea9 100644 --- a/conformance/repository_modified.json +++ b/conformance/repository_modified.json @@ -46,7 +46,7 @@ "content": { "name": "TestRepo", "owner": "TestOrg", - "url": "https://example.org/TestOrg/TestRepo", + "uri": "https://example.org/TestOrg/TestRepo", "viewUrl": "https://example.org/view/TestOrg/TestRepo" } } diff --git a/conformance/taskrun_finished.json b/conformance/taskrun_finished.json index 5cbeb6e6..56e69a5f 100644 --- a/conformance/taskrun_finished.json +++ b/conformance/taskrun_finished.json @@ -45,7 +45,7 @@ "type": "taskRun", "content": { "taskName": "myTask", - "url": "https://www.example.com/mySubject123", + "uri": "https://www.example.com/mySubject123", "pipelineRun": { "id": "mySubject123" }, diff --git a/conformance/taskrun_started.json b/conformance/taskrun_started.json index cfe67b4e..c7e7d886 100644 --- a/conformance/taskrun_started.json +++ b/conformance/taskrun_started.json @@ -45,7 +45,7 @@ "type": "taskRun", "content": { "taskName": "myTask", - "url": "https://www.example.com/mySubject123", + "uri": "https://www.example.com/mySubject123", "pipelineRun": { "id": "mySubject123" } diff --git a/links.md b/links.md index c7795e02..75f8c282 100644 --- a/links.md +++ b/links.md @@ -186,7 +186,7 @@ systems to act accordingly based off the ending notation. "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123" + "uri": "https://www.example.com/mySubject123" } } } @@ -221,7 +221,7 @@ further, we can allow for a path link between `pipelinerun.queued` to the "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123" + "uri": "https://www.example.com/mySubject123" } } } @@ -433,7 +433,7 @@ sender generates this id. "type": "pipelineRun", "content": { "pipelineName": "myPipeline", - "url": "https://www.example.com/mySubject123" + "uri": "https://www.example.com/mySubject123" } } } diff --git a/schemas/environmentcreated.json b/schemas/environmentcreated.json index f3ab5215..f16633dc 100644 --- a/schemas/environmentcreated.json +++ b/schemas/environmentcreated.json @@ -75,7 +75,7 @@ "name": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" } diff --git a/schemas/environmentmodified.json b/schemas/environmentmodified.json index df480b7f..02e05df7 100644 --- a/schemas/environmentmodified.json +++ b/schemas/environmentmodified.json @@ -75,7 +75,7 @@ "name": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" } diff --git a/schemas/pipelinerunfinished.json b/schemas/pipelinerunfinished.json index 109c6cdf..8910f63f 100644 --- a/schemas/pipelinerunfinished.json +++ b/schemas/pipelinerunfinished.json @@ -75,7 +75,7 @@ "pipelineName": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/pipelinerunqueued.json b/schemas/pipelinerunqueued.json index 56e7ba7c..d865bfe3 100644 --- a/schemas/pipelinerunqueued.json +++ b/schemas/pipelinerunqueued.json @@ -75,7 +75,7 @@ "pipelineName": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" } diff --git a/schemas/pipelinerunstarted.json b/schemas/pipelinerunstarted.json index 116b9787..0dc27125 100644 --- a/schemas/pipelinerunstarted.json +++ b/schemas/pipelinerunstarted.json @@ -75,7 +75,7 @@ "pipelineName": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" } diff --git a/schemas/repositorycreated.json b/schemas/repositorycreated.json index a309a3af..26c2b257 100644 --- a/schemas/repositorycreated.json +++ b/schemas/repositorycreated.json @@ -79,7 +79,7 @@ "owner": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/repositorydeleted.json b/schemas/repositorydeleted.json index efb1d13b..d90deda5 100644 --- a/schemas/repositorydeleted.json +++ b/schemas/repositorydeleted.json @@ -78,7 +78,7 @@ "owner": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/repositorymodified.json b/schemas/repositorymodified.json index 1a0b88f8..e3443549 100644 --- a/schemas/repositorymodified.json +++ b/schemas/repositorymodified.json @@ -78,7 +78,7 @@ "owner": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/taskrunfinished.json b/schemas/taskrunfinished.json index 1b98208c..042c8412 100644 --- a/schemas/taskrunfinished.json +++ b/schemas/taskrunfinished.json @@ -75,7 +75,7 @@ "taskName": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/taskrunstarted.json b/schemas/taskrunstarted.json index e8cad20d..6f7e9241 100644 --- a/schemas/taskrunstarted.json +++ b/schemas/taskrunstarted.json @@ -75,7 +75,7 @@ "taskName": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" }, diff --git a/schemas/testsuiterunqueued.json b/schemas/testsuiterunqueued.json index 9e4fa555..b10d98df 100644 --- a/schemas/testsuiterunqueued.json +++ b/schemas/testsuiterunqueued.json @@ -123,7 +123,7 @@ "name": { "type": "string" }, - "url": { + "uri": { "type": "string", "format": "uri" } diff --git a/spec.md b/spec.md index fd27ec7f..db3716fe 100644 --- a/spec.md +++ b/spec.md @@ -423,7 +423,7 @@ defined in the [vocabulary](#vocabulary): ```json "content" : { "task": "my-task", - "url": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123" + "uri": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123" } ``` @@ -468,7 +468,7 @@ The following example shows `context` and `subject` together, rendered as JSON. "type": "taskRun", "content": { "task": "my-task", - "url": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123", + "uri": "/apis/tekton.dev/v1beta1/namespaces/default/taskruns/my-taskrun-123", "pipelineRun": { "id": "my-distributed-pipelinerun", "source": "/tenant1/tekton/"