-
-
Notifications
You must be signed in to change notification settings - Fork 8
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I add a custom format for a fastify's ajv instance? #732
Comments
Well. formats are not new types. formats are formats. Maybe you should also open a issue in ajv, that they should not have an error-message
|
there was a banal typo - I just missed writing with a properly designed scheme, this error is reproduced - so the question remains open |
I added a unit test to fastify. It seems that ajv-formats work as expected: |
I don't understand anything - I do everything the same, but I get an error... |
I have found the problem - it affected by another of |
exactly the problem is in a parallel instance - if I initialize import Ajv from 'ajv';
import addFormats from 'ajv-formats';
const ajv = new Ajv();
addFormats(ajv);
const app = Fastify({
ajv: {
plugins: [addFormats]
},
});
... then the error does not occur, but if you do not add formats to this instance and add them to the in which package should I write issue: |
it seems that my question is specific to our project and justify has no problems in ajv-formats - so I close this issue |
馃挰 Question here
I want to add support for extended types that are implemented in the
ajv-formats
packageI am trying to perform
ajv
initialization and describe the formatsthe scheme:
but get an error:
the same result I get using this code
how can I use custom formats in fastify?
Environment
The text was updated successfully, but these errors were encountered: