Skip to content

Conversation

@afrittoli
Copy link
Member

@afrittoli afrittoli commented Mar 10, 2023

Changes

Improve the spec of subject fields for all events:

  • link id and source to their spec definitions
  • add the type, linked to its spec definition
  • include the value of the type for each event

Improve the jsonschema by constraining the subject type field to the only valid value for each event.

Since all events have been patched already in
v0.2-draft, there's not need to +1 the version
number again within the same spec release.

Fixes: #113

Signed-off-by: Andrea Frittoli andrea.frittoli@gmail.com

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

Improve the spec of subject fields for all events:
- link id and source to their spec definitions
- add the type, linked to its spec definition
- include the value of the type for each event

Improve the jsonschema by constraining the subject
type field to the only valid value for each event.

Since all events have been patched already in
v0.2-draft, there's not need to +1 the version
number again within the same spec release.

Fixes: cdevents#113

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli afrittoli force-pushed the issues/113-subject-fields branch from 8eaebc4 to b863d9c Compare March 10, 2023 11:17
|-------|------|-------------|----------|
| id | `String` | Uniquely identifies the subject within the source. | `1234`, `maven123`, `builds/taskrun123` |
| source | `URI-Reference` | [source](../spec.md#source) from the context | `staging/tekton`, `tekton-dev-123`|
| id | `String` | See [id](../spec.md#id-subject)| `1234`, `maven123`, `builds/taskrun123` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spec.md links does not work, There was a change for spec.md to parent directory it seems. I think it should be:

Suggested change
| id | `String` | See [id](../spec.md#id-subject)| `1234`, `maven123`, `builds/taskrun123` |
| id | `String` | See [id](/spec.md#id-subject)| `1234`, `maven123`, `builds/taskrun123` |

And also it needs to change for all spec.md links.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you!
I replaced all ../spec.md# with spec.md# now.

| id | `String` | Uniquely identifies the subject within the source. | `1234`, `maven123`, `builds/taskrun123` |
| source | `URI-Reference` | [source](../spec.md#source) from the context | `staging/tekton`, `tekton-dev-123`|
| id | `String` | See [id](../spec.md#id-subject)| `1234`, `maven123`, `builds/taskrun123` |
| source | `URI-Reference` | See [source](../spec.md#source-subject) | `staging/tekton`, `tekton-dev-123`|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a review per se. I opened a PR #119 almost at the time with you and I am a bit confused about source. Is it from context or from subject?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table describes the fields of the subject, so the source here is that from the subject.
In many cases this will have the same value as the source from the context, which is why it's optional in here.

Signed-off-by: Andrea Frittoli <andrea.frittoli@gmail.com>
@afrittoli
Copy link
Member Author

@randomnoise @e-backmark-ericsson thank you for the reviews! Hopefully I addressed all comments

@afrittoli afrittoli merged commit 2ae0546 into cdevents:main Mar 15, 2023
@afrittoli afrittoli mentioned this pull request Mar 15, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Document the usage of subject object fields more clearly

3 participants