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

Add metaclass magic for LD annotations in addition to the decorator #24

Open
apirogov opened this issue Aug 31, 2022 · 1 comment
Open
Labels
enhancement New feature or request internals Technical and subtle issues users are (usually) not aware of semantics Related to semantic-based features, e.g. JSON-LD, OWL, RDF

Comments

@apirogov
Copy link
Collaborator

apirogov commented Aug 31, 2022

The MetadorSchemaMeta class should remap LD_something = "value" (i.e. without a type annotation) into a field @something = Optional[Literal["value"]] = "value" and work correctly with partial schema generation etc.

Also nice would be LD_something: type = ... to be mapped to something = Annotated[..., Field(alias="@something")
and to work correctly with inheritance etc.

@apirogov apirogov added enhancement New feature or request prio:B labels Aug 31, 2022
@apirogov apirogov added idea and removed prio:B labels Sep 16, 2022
@apirogov
Copy link
Collaborator Author

Worth looking into when someone requests to have more JSON-LD "instance fields" in addition to @id.

@apirogov apirogov removed the idea label Sep 20, 2022
@apirogov apirogov added internals Technical and subtle issues users are (usually) not aware of semantics Related to semantic-based features, e.g. JSON-LD, OWL, RDF labels Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request internals Technical and subtle issues users are (usually) not aware of semantics Related to semantic-based features, e.g. JSON-LD, OWL, RDF
Projects
None yet
Development

No branches or pull requests

1 participant