code: function toOptions (type, options) {
    if (Types.includes(type)) {
      options = Object.assign({ type: type }, options)
    }
    if (options._validated) {
      delete options._validated
      return options
    }
    if (Object.keys(options).length > 0) {
      options = baseParser._parseDefinition(
        options, { strict: true, userInput: false, _key: 'options' }
      )
    }
    return options
  }
docs: Validate options.