you can add doc comments, but there isn't currentl...
# spicedb
j
you can add doc comments, but there isn't currently any reflection API to retrieve metadata
e
That is not userful. We will need to create a side database to store description since we would never show the json name in the schema to the user. We already show a user friendly name.
j
I can't see the original message; remind me what you're trying to do?
e
sorry didn't realize. providing a description to the relation or permission for UI.
j
so you want to read the doc comments and use the resulting comment in your UI?
if so, the planned reflection APIs should allow that
e
so the reflection is to read the comments, is there an api to write the comment?
j
you'd write the comment when writing the schema
e
silly question: why isn't there an api to add a single type with strongly typed classes with relations and permissions instead of read/write schema string. The schema string needs to be parsed which isn't standard json to manipulate it. from the client side, it is much more work to use/manipulate schema through api. our types are dynamic and we need to add at runtime. there isn't a standard library to manipulate the schema.
j
@edgardorobles because the expectation is that schema is not dynamically modified
if you need dynamic types or roles, its generally preferable to define those via data
2 Views