We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
You can continue the conversation there. Go to discussion →
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
Following the tip in #2993,
I'm blocked when I want to specify schemas with circular dependencies.
Example : I have users, and workspaces. Each user can have several workspace, but one workspace belongs to one user.
user
workspace
So I would like to specify my schemas like this :
// user.schema.ts import { workspaceSchema } from "../workspace/workspace.schema" const userSchema = Type.Object({ // ... workspace: Type.Optional(Type.Ref(workspaceSchema)) }, { $id: 'User', additionalProperties: false }) // workspace.schema.ts import { userSchema } from "../users/user.schema" const workspaceSchema = Type.Object({ // ... user: Type.OptionalType.Ref(userSchema)) }, { $id: 'Workspace', additionalProperties: false })
I find an issue on typebox talking about this sinclairzx81/typebox#106
But I can't figure out to make this work in Feathers...
Do you have any idea ?
Actually, I'm faking the result, so it's a workspace: Type.Optional(Type.Any()).
workspace: Type.Optional(Type.Any())
For two models, that could work, but for nested relations, this seems a nightmare :-)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Following the tip in #2993,
I'm blocked when I want to specify schemas with circular dependencies.
Example :
I have users, and workspaces.
Each
user
can have severalworkspace
, but oneworkspace
belongs to oneuser
.So I would like to specify my schemas like this :
I find an issue on typebox talking about this sinclairzx81/typebox#106
But I can't figure out to make this work in Feathers...
Do you have any idea ?
Actually, I'm faking the result, so it's a
workspace: Type.Optional(Type.Any())
.For two models, that could work, but for nested relations, this seems a nightmare :-)
The text was updated successfully, but these errors were encountered: