Skip to content

Support typescript utility types #41

@igorovic

Description

@igorovic

I seems that typescript utility types are not supported.

import jwt from 'express-jwt';
import jwks from 'jwks-rsa';

export default interface ConfigOptions extends Omit<jwt.Options, 'secret'>, jwks.ClientOptions {
    secret?: Pick<jwt.Options, 'secret'>,
    issuer: any,
    audience: any
}

Utility types

  • Omit
  • Pick

The generated schema looks like this.

export const ConfigOptionsSchema = {
  "$schema": "http://json-schema.org/draft-07/schema#",
  "additionalProperties": false,
  "patternProperties": {
    "^[0-9]+$": {
    }
  },
  "type": "object"
};

Same result with --format full

Am I doing something wrong?

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