Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alignment of $id and context.type in schema #187

Open
davidB opened this issue Mar 3, 2024 · 0 comments
Open

alignment of $id and context.type in schema #187

davidB opened this issue Mar 3, 2024 · 0 comments
Milestone

Comments

@davidB
Copy link
Contributor

davidB commented Mar 3, 2024

value of $id should be aligned with context.type:

  • context.type follow the format: dev.cdevents.{{subject}}.{{predicate}}.{{subject_predicate_version}}
  • $id should follow the format: https://cdevents.dev/{{spec_version}}/schema/{{subject}}-{{predicate}}-event
  "$id": "https://cdevents.dev/0.4.0-draft/schema/pipeline-run-queued-event",
  "properties": {
    "context": {
      "properties": {
...
        "type": {
          "type": "string",
          "enum": [
            "dev.cdevents.pipelinerun.queued.0.1.1"
          ],
          "default": "dev.cdevents.pipelinerun.queued.0.1.1"

Side questions:

  1. what is the value of event at the end of $id?
  2. why not having the version of {{subject_predicate_version}} as part of $id? (and maybe remove the {{spec_version}}, to have a full alignment between $id and context.type?

Notes

from @afrittoli :

changing the IDs is a relatively small change in the spec, only events with a double word subject will be affected. The logic in the cdevents.dev repo needs to be updated so that both the old URL and the new one are published, since we cannot break the links in the IDs for older versions

@afrittoli afrittoli added this to the v0.5 milestone Mar 4, 2024
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

No branches or pull requests

2 participants