-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Easier debugging of detected relationships #3752
Comments
Hm, some thoughts:
|
@laurenceisla Since you've been working on OpenAPI, do you know if there's a way to represent this metadata? (whether openAPI v2 or v3)
But we do that for the the explain plan right? Overall I thought that is much more convenient to do
Agree. |
One way would be to include the embedding in the {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"name"
],
"properties": {
"id": {"..."},
"name": {"..."},
// Show the relationship here, as another property of the response object
"child_entities": {
"type": "object",
"properties": {"..."}
}
}
}
}
} Since Edit: If I'm not mistaken a description can also be added to the |
Right, we do. But the situation is different. The "query to fetch this data" is much more connected to the "data" than the relationship metadata proposed here. Think about it differently: If you add various filters, select, limit etc. to the request's URL - those would not make sense at all for the proposal here. But they do make a lot of sense for the explain output. |
Problem
Let's say I want to debug if there's a one-to-one relationship detected (sometimes this can be hard in the presence of views).
Using the runtime schema cache and
jq
it can be done by searching the table name (country
) and theO2O
tag:This has some issues:
Solution
A custom media type that shows all the relationships for a resource.
Related
The text was updated successfully, but these errors were encountered: