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

feat: Remove Json-Ld requirement for version endpoint and add version schema #67

Merged

Conversation

jimmarino
Copy link
Contributor

What this PR changes/adds

We can't version the version endoint. Therefore, we need to remove the Json-Ld requirement.

Linked Issue(s)

Closes #37

@jimmarino jimmarino added the bug Something isn't working label Nov 26, 2024
Copy link

@mkollenstart mkollenstart left a comment

Choose a reason for hiding this comment

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

In order for me to clearly understand this. Removal of the JSON-LD context for the version metadata is primarily in order to ensure stability of the version metadata, as this spans multiple versions in one go. Therefore it might introduce issues when the context changes over the versions?

If that is the case, should we then include the version of the JSON schema? This might introduce issues when we actually want to change the schema of the version metadata.

@jimmarino
Copy link
Contributor Author

In order for me to clearly understand this. Removal of the JSON-LD context for the version metadata is primarily in order to ensure stability of the version metadata, as this spans multiple versions in one go. Therefore it might introduce issues when the context changes over the versions?

If that is the case, should we then include the version of the JSON schema? This might introduce issues when we actually want to change the schema of the version metadata.

Yes, exactly. Do you have a proposal for including the schema version? I can adapt the PR to include it.

@mkollenstart
Copy link

In order for me to clearly understand this. Removal of the JSON-LD context for the version metadata is primarily in order to ensure stability of the version metadata, as this spans multiple versions in one go. Therefore it might introduce issues when the context changes over the versions?
If that is the case, should we then include the version of the JSON schema? This might introduce issues when we actually want to change the schema of the version metadata.

Yes, exactly. Do you have a proposal for including the schema version? I can adapt the PR to include it.

What we might do is require the $schema field to be set on the version metadata. This way the provider of the metadata can indicate with which schema the document should be validated. To prevent the client to have to guess which schema to use.
Like:

{
  "$schema": "https://w3id.org/dspace/2024/1/common/version-schema.json",
  "protocolVersions": [
    {
      "version": "1.0",
      "path": "/some/path/v1"
    }
  ]
}

We still then have to take care of ensuring the schema is stable, perhaps by using deprecated (https://json-schema.org/draft/2019-09/json-schema-validation#rfc.section.9.3) to ensure the main properties are stable over multiple versions.

@jimmarino
Copy link
Contributor Author

@mkollenstart Do you want to file a separate issue so that we can explore this in more detail? If you are OK with that approach, should we merge this?

@jimmarino
Copy link
Contributor Author

@mkollenstart I'm going to merge this and we can file a separate issue.

@jimmarino jimmarino merged commit dd2a75f into eclipse-dataspace-protocol-base:main Dec 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Well-known endpoint should not be tied to a Json-Ld conext
3 participants