Skip to content

BUG: The validate field is missing in type definition of options #119

@raiyankamal

Description

@raiyankamal

The validate field is accepted in options:
https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.js#L123

But this is not included in the type definition for Options:
https://github.com/APIDevTools/swagger-parser/blob/master/lib/index.d.ts#L215

As a result, typescript cannot transpile when the validate field exists.

  const api = await  SwaggerParser.validate(swaggerApiSource, {
    validate: {
      spec: true
    }
  });
error TS2345: Argument of type '{ validate: { spec: boolean; }; }' is not assignable to parameter of type 'Options'.```

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