-
Notifications
You must be signed in to change notification settings - Fork 177
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
Remove janky schema from http API #2181
Conversation
2cde444
to
8e8cc48
Compare
I semi-rewrote the |
I don't think I'm equipped to review the non-CLI "meat" of this PR, sorry. |
Question about testing - Did this PR change the expected output format of Edit: Yeah I think on further review of the changes to |
I don't think there's really any use case for |
Yeah I don't think we particularly need to preserve the old output, but I do think we want to make sure that I do think we've told some folks with larger DBs to inspect them via |
21b0337
to
1af433b
Compare
1af433b
to
2abfb9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks quite good to me. It's definitely an improvement. I ran it on quickstart-chat
{
"typespace": {
"types": [
{
"Product": {
"elements": [
{
"name": {
"some": "sender"
},
"algebraic_type": {
"Product": {
"elements": [
{
"name": {
"some": "__identity__"
},
"algebraic_type": {
"U256": []
}
}
]
}
}
},
{
"name": {
"some": "sent"
},
"algebraic_type": {
"Product": {
"elements": [
{
"name": {
"some": "__timestamp_micros_since_unix_epoch__"
},
"algebraic_type": {
"I64": []
}
}
]
}
}
},
{
"name": {
"some": "text"
},
"algebraic_type": {
"String": []
}
}
]
}
},
{
"Product": {
"elements": [
{
"name": {
"some": "identity"
},
"algebraic_type": {
"Product": {
"elements": [
{
"name": {
"some": "__identity__"
},
"algebraic_type": {
"U256": []
}
}
]
}
}
},
{
"name": {
"some": "name"
},
"algebraic_type": {
"Sum": {
"variants": [
{
"name": {
"some": "some"
},
"algebraic_type": {
"String": []
}
},
{
"name": {
"some": "none"
},
"algebraic_type": {
"Product": {
"elements": []
}
}
}
]
}
}
},
{
"name": {
"some": "online"
},
"algebraic_type": {
"Bool": []
}
}
]
}
}
]
},
"tables": [
{
"name": "message",
"product_type_ref": 0,
"primary_key": [],
"indexes": [],
"constraints": [],
"sequences": [],
"schedule": {
"none": []
},
"table_type": {
"User": []
},
"table_access": {
"Public": []
}
},
{
"name": "user",
"product_type_ref": 1,
"primary_key": [
0
],
"indexes": [
{
"name": {
"some": "user_identity_idx_btree"
},
"accessor_name": {
"some": "identity"
},
"algorithm": {
"BTree": [
0
]
}
}
],
"constraints": [
{
"name": {
"some": "user_identity_key"
},
"data": {
"Unique": {
"columns": [
0
]
}
}
}
],
"sequences": [],
"schedule": {
"none": []
},
"table_type": {
"User": []
},
"table_access": {
"Public": []
}
}
],
"reducers": [
{
"name": "identity_connected",
"params": {
"elements": []
},
"lifecycle": {
"some": {
"OnConnect": []
}
}
},
{
"name": "identity_disconnected",
"params": {
"elements": []
},
"lifecycle": {
"some": {
"OnDisconnect": []
}
}
},
{
"name": "init",
"params": {
"elements": []
},
"lifecycle": {
"some": {
"Init": []
}
}
},
{
"name": "send_message",
"params": {
"elements": [
{
"name": {
"some": "text"
},
"algebraic_type": {
"String": []
}
}
]
},
"lifecycle": {
"none": []
}
},
{
"name": "set_name",
"params": {
"elements": [
{
"name": {
"some": "name"
},
"algebraic_type": {
"String": []
}
}
]
},
"lifecycle": {
"none": []
}
}
],
"types": [
{
"name": {
"scope": [],
"name": "Message"
},
"ty": 0,
"custom_ordering": true
},
{
"name": {
"scope": [],
"name": "User"
},
"ty": 1,
"custom_ordering": true
}
],
"misc_exports": [],
"row_level_security": []
}
## Description of Changes Switches to Bearer authentication, which is the more proper auth schema to use with tokens. ## API - [ ] This is an API breaking change to the SDK ## Requires SpacetimeDB PRs - clockworklabs/SpacetimeDB#2181 ## Testsuite *If you would like to run the your SDK changes in this PR against a specific SpacetimeDB branch, specify that here. This can be a branch name or a link to a PR.* SpacetimeDB branch name: master --------- Co-authored-by: Zeke Foppa <[email protected]> Co-authored-by: rekhoff <[email protected]> Co-authored-by: James Gilles <[email protected]>
Description of Changes
Get rid of the weird stuff in
describe
and just return a RawModuleDef.Expected complexity level and risk
2 - changes api a decent amount but only to return an already well-established format.
Testing