Skip to content

Typo in Joi Validation with Swagger... #3038

Open
@big-finn

Description

Runtime

nodejs

Runtime version

17.13.1

Module version

17.13.1

Last module version without issue

No response

Used with

hapi

Any other relevant information

Used with latest Hapi and Joi

What are you trying to achieve or the steps to reproduce?

If you set this validation;

  validate: {
    payload: Joi.object({
      newPassword: Joi.string().min(8).max(64).required(),
    }),
  },
  
  In the swagger UI the default test is "newPassword": "stringst" instead of string, its just a typo.

What was the result you got?

"newPassword": "stringst"

What result did you expect?

"newPassword": "string"

Metadata

Assignees

No one assigned

    Labels

    bugBug or defect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions