-
Notifications
You must be signed in to change notification settings - Fork 4
create array for contributors in activity claim and split contributorJSON into two schemas #102
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
68011ae
create contributor array in activity claim and split contributorJSON …
holkexyz 3e14c93
fix: stop gen-schemas-md and prettier fighting each other
aspiers 85a07c4
chore: update AGENTS.md with gen-schema-md
aspiers bec3bc9
ci: update CodeRabbit config since SCHEMAS.md was introduced
aspiers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| --- | ||
| "@hypercerts-org/lexicon": minor | ||
| --- | ||
|
|
||
| Refactor contributions structure and split contributor lexicon | ||
|
|
||
| **Breaking Changes:** | ||
|
|
||
| - **Activity lexicon (`org.hypercerts.claim.activity`):** | ||
| - Renamed `contributions` field to `contributors` | ||
| - Replaced `contributions` array (array of strongRefs) with new `contributors` array containing contributor objects | ||
| - Each contributor object has three fields: | ||
| - `contributorInformation` (required): string (DID/identifier) or strongRef to `org.hypercerts.claim.contributorInformation#main` | ||
| - `weight` (optional): positive number (stored as string) | ||
| - `contributionDetails` (optional): string or strongRef to `org.hypercerts.claim.contributionDetails#main` | ||
| - Renamed internal `contribution` object type to `contributor` | ||
| - Renamed string wrapper defs: `contributorInformationString` → `contributorIdentity`, `contributionDetailsString` → `contributorRole` | ||
| - Updated `contributorRole` string limits: maxLength 10000, maxGraphemes 1000 | ||
|
|
||
| - **Contributor lexicon (`org.hypercerts.claim.contributor`):** | ||
| - Split into two separate lexicon files: | ||
| - `org.hypercerts.claim.contributorInformation`: new lexicon file containing `identifier`, `displayName`, `image` (contributor profile information) | ||
| - `org.hypercerts.claim.contributionDetails`: new lexicon file containing `role`, `contributionDescription`, `startDate`, `endDate` (contribution-specific details) | ||
| - The original `org.hypercerts.claim.contributor` lexicon has been removed | ||
|
|
||
| Existing contributions using the old structure will need to be migrated to the new format. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| npm run gen-schemas-md | ||
| npm run format | ||
| npm run check |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 5 additions & 22 deletions
27
...ons/org/hypercerts/claim/contributor.json → ...hypercerts/claim/contributionDetails.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| { | ||
| "lexicon": 1, | ||
| "id": "org.hypercerts.claim.contributorInformation", | ||
| "defs": { | ||
| "main": { | ||
| "type": "record", | ||
| "description": "Contributor information including identifier, display name, and image.", | ||
| "key": "tid", | ||
| "record": { | ||
| "type": "object", | ||
| "required": ["createdAt"], | ||
| "properties": { | ||
| "identifier": { | ||
| "type": "string", | ||
| "description": "DID or a URI to a social profile of the contributor." | ||
| }, | ||
| "displayName": { | ||
| "type": "string", | ||
| "description": "Display name of the contributor.", | ||
| "maxLength": 100 | ||
| }, | ||
| "image": { | ||
| "type": "union", | ||
| "refs": [ | ||
| "org.hypercerts.defs#uri", | ||
| "org.hypercerts.defs#smallImage" | ||
| ], | ||
| "description": "The contributor visual representation as a URI or image blob." | ||
| }, | ||
| "createdAt": { | ||
| "type": "string", | ||
| "format": "datetime", | ||
| "description": "Client-declared timestamp when this record was originally created." | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
aspiers marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.