Skip to content

Swagger failed to load after using joi lazy(fn) #36

Description

@ganeshkharche12

Using JOI validation with lazy(fn) to check recursive validation. In this case swagger failed to load routes even all routes are working. Below are all the generated logs.

Failed to build API documentation for "/Demo"!
This is likely a bug in your Foxx service.
Check the route methods you are using to document your API. via Error: sorry, do not know how to convert unknown joi type: "lazy"
at convert (/usr/share/arangodb3/js/node/node_modules/joi-to-json-schema/build/index.js:186:11)
at Array.forEach (native)
at Object.array (/usr/share/arangodb3/js/node/node_modules/joi-to-json-schema/build/index.js:87:14)
at convert (/usr/share/arangodb3/js/node/node_modules/joi-to-json-schema/build/index.js:225:32)
at /usr/share/arangodb3/js/node/node_modules/joi-to-json-schema/build/index.js:167:43
at Array.forEach (native)
at Object.object (/usr/share/arangodb3/js/node/node_modules/joi-to-json-schema/build/index.js:165:25)
at joi2schema (/usr/share/arangodb3/js/server/modules/@arangodb/foxx/router/swagger-context.js:568:10)

i already had opened this issue on github ArangoDB issues
arangodb/arangodb#6132

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions