We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
With dynamoDb v1,
export const myEntity = new EntityV2({ name: "MyEntity", table, schema: schema({ id: string().key().savedAs("PK"), entityName: string().key().const("MyEntity").savedAs("SK"), payload: export const myEntity = new EntityV2({ name: "MyEntity", table, schema: schema({ id: string().key().savedAs("PK"), entityName: string().key().const("MyEntity").savedAs("SK"), payload: anyOf([ map({ toto: boolean().const(true), }), map({ toto: boolean().enum(false).optional(), tata: number(), }), ]), }), }); const command = new PutItemCommand(myEntity, { id: "123", payload: { tata: 1, }, }); await command.send();
Creates the following item:
{ "id": "123", "entityName": "MyEntity", "payload": { "toto": true } }
The payload I provided has been overridden 😢
Workaround:
anyOf([ map({ toto: boolean().enum(true), }), map({ toto: boolean().enum(false).optional(), tata: number(), }), ]),
without any default value
The text was updated successfully, but these errors were encountered:
@ThomasAribart could you please take a look at this? 🙏
Sorry, something went wrong.
Yes I will !
ThomasAribart
No branches or pull requests
With dynamoDb v1,
Creates the following item:
The payload I provided has been overridden 😢
Workaround:
without any default value
The text was updated successfully, but these errors were encountered: