question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow Role to be used for use cases like defining dates

See original GitHub issue

My use case is similar to the ones provided in the Example 2 for hasOccupation and in this use case for worksFor.

As stated in Schema.org hasOccupation definition: The Person’s occupation. For past professions, use Role for expressing dates. In the case of worksFor is not stated explicitly but what I want is to represent additional information to a Person, as the original blog post suggests.

I’m working on a PR to solve this but in the meantime I wanted to see if the idea is right for this project.

Here is an example taken from the Role webpage:

{
    "@context": "https://schema.org",
    "@type": "Person",
    "name": "Delia Derbyshire",
    "sameAs": "http://en.wikipedia.org/wiki/Delia_Derbyshire",
    "alumniOf": {
        "@type": "OrganizationRole",
        "alumniOf": {
            "@type": "CollegeOrUniversity",
            "name": "University of Cambridge",
            "sameAs": "http://en.wikipedia.org/wiki/University_of_Cambridge"
        },
        "startDate": "1959"
    }
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

2reactions
Eyascommented, Aug 17, 2021

fyi just published 0.11.0, still working on GitHub release notes.

1reaction
Eyascommented, Dec 29, 2020

@SamuelEnglard if it’s okay to skip type checking for just the Role sub-object, I’d probably just cast the role:

({
  "@type": "Role",
  // ...
} as {} as Organization)

or similar, to the desired type.

Read more comments on GitHub >

github_iconTop Results From Across the Web

AWS: Allows access based on date and time
This policy restricts access to actions that occur between April 1, 2020 and June 30, 2020 (UTC), inclusive. This policy grants the permissions...
Read more >
When should you use AWS IAM roles vs. users?
AWS administrators can define access through IAM roles, users and groups. Learn how and when to create each type of AWS credential.
Read more >
Creating and managing custom roles | IAM Documentation
This page describes how to create and manage Identity and Access Management (IAM) custom roles. Managing roles includes modifying, disabling, listing, ...
Read more >
Use Cases - what Every Project Manager Should Know
al., 1999, p.41).Martin Fowler defines a use case as “a set of scenarios tied together by a common business goal” (Fowler, M., 2000) ......
Read more >
Role-Based Access Control
You can also use roles to collect permissions defined for various APIs. For example, say you have a marketing module that allows users...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found