-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codefeatureNew functionality or improvementNew functionality or improvement
Milestone
Description
Context
- node version: v9.6.0
- joi version: 13.4.0
- environment (node, browser): node
- used with (hapi, standalone, ...): hapi
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
const some_common_schema = Joi.number()
.integer()
.positive()
.example(15);
const other_schema = some_common_schema.required().example(200);Which result you had ?
other_schema did have example value of 15. Console logging the other_schema shows that the id 200
is pushed to array _examples: [ 15, 200 ],
What did you expect ?
I expected it to replace the old example value with the new one.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
breaking changesChange that can breaking existing codeChange that can breaking existing codefeatureNew functionality or improvementNew functionality or improvement