Skip to content

Incorrect formatters being used for Ajv in Validation #280

Open
@buildgreatthings

Description

@buildgreatthings

I am getting errors on run from ajv that is being loaded in openapi-backend.

unknown format "date-time" ignored in schema at path "#/properties/timestamp"
unknown format "date-time" ignored in schema at path "#/properties/timestamp" 

The fix is this snippet that should go into the validation file.

const AJV = require('ajv').default;
const addFormats = require('ajv-formats').default;
const ajv = new AJV();
addFormats(ajv);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions