adobe / adobe/xdm

Request to add more properties in Principal, and Principal clean-up

Open
#669 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
266
Forks
380
Avg merge
5d 8h
Merged PRs (30d)
9

Description

## What are the schemas that are affected by the issue
- [ ] https://github.com/adobe/xdm/blob/master/schemas/common/principal.schema.json
- [ ] https://github.com/adobe/xdm/blob/master/extensions/ims/user.schema.json
- [ ] https://github.com/adobe/xdm/blob/master/extensions/ims/organization.schema.json

## What are examples of products that are impacted by the issue
ACP Collaboration services (sharing service, comment service, task service) and products that rely on ACP collaboration services.

## Details -

1. `user` schema composes `principal` but does not extend it. Currently, a user is not a principal.
2. `user` and `organization` schemas both individually redefine similar-sounding properties (some without namespaces) that already exist in `principal` schema. For example, user schema has xdm:identityProvider, id and type. Principal schema has xdm:provider, @id and @type.

I think this is what Leonard suggested as current issues in `principal.schema.json` -

- [ ] @id and @type as used in principal.schema.json is wrong usage of @ in schema. It should have been xdm:id and xdm:type instead. The @id and @type are required properties in the existing principal.schema.json. I can not submit a change to fix this in principal.schema.json as npm run incompatibility-check fails (part of build job in github.com/adobe/xdm). I think the reason for that build step is that schemas can only be extended but not retrospectively changed. In https://github.com/adobe/xdm/blob/master/docs/id.md @id is always supposed to be a URI. In https://github.com/adobe/xdm/blob/master/schemas/common/principal.example.1.json @id is not a URI. It is just a string.
- [ ] `principal` schema is currently non-extensible. So, it is not possible for user or organization schema to extend and override a few properties.

Contributor guide

Open the contributing guide

Research direction

Start with schemas/common/principal.schema.json, extensions/ims/user.schema.json, and extensions/ims/organization.schema.json, then review docs/id.md and principal.example.1.json. Run npm run incompatibility-check to understand the compatibility constraint; done means the principal relationship and property definitions are resolved across the affected schemas without failing that check.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.