Adding a new metadata aspect is one of the most common ways to extend an existing entity. We'll use the CorpUserEditableInfo as an example here.
Add the aspect model to the corresponding namespace (e.g. com.linkedin.identity
)
Extend the entity's aspect union to include the new aspect (e.g. CorpUserAspect
)
Rebuild the rest.li IDL & snapshot by running the following command from the project root
./gradlew :gms:impl:build -Prest.model.compatibility=ignore
To surface the new aspect at the top-level resource endpoint, extend the resource data model (e.g. CorpUser
) with an optional field (e.g. editableInfo
). You'll also need to extend the toValue
& toSnapshot
methods of the top-level resource (e.g. CorpUsers
) to convert between the snapshot & value models.
(Optional) If there's need to update the aspect via API (instead of/in addition to MCE), add a sub-resource endpoint for the new aspect (e.g. CorpUsersEditableInfoResource
). The sub-resource endpiont also allows you to retrieve previous versions of the aspect as well as additional metadata such as the audit stamp.
After rebuilding & restarting gms, mce-consumer-job & mae-consumer-job, you should be able to start emitting MCE with the new aspect and have it automatically ingested & stored in DB.
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )