[
  {
    "path": ".babelrc",
    "content": "{\n  \"presets\": [\n    \"es2015\",\n    \"stage-0\",\n    \"stage-1\",\n    \"stage-2\",\n    \"stage-3\"\n  ],\n  \"plugins\": [\n    \"transform-runtime\",\n    \"transform-decorators-legacy\"\n  ],\n  \"env\": {\n    \"test\": {\n      \"plugins\": [\n        \"istanbul\"\n      ]\n    }\n  }\n}\n"
  },
  {
    "path": ".codeclimate.yml",
    "content": "engines:\n  eslint:\n    enabled: true\n    config:\n      config: ./linting/eslint_base.yaml\n  fixme:\n    enabled: true\nexclude_paths:\n  - \"scripts/\"\n  - \"testing/\"\n  - \"configs/\"\n  - \"src/**/*.spec.js\"\nratings:\n  paths:\n    - \"src/**/*.js\"\n"
  },
  {
    "path": ".eslintignore",
    "content": "src/libs/"
  },
  {
    "path": ".flowconfig",
    "content": "[ignore]\n**/.*badly-formed.*\n\n[options]\nsuppress_comment= \\\\(.\\\\|\\n\\\\)*\\\\$FlowFixMe\n\n[libs]\ntypes/\n"
  },
  {
    "path": ".gitignore",
    "content": "# Created by .ignore support plugin (hsz.mobi)\n### JetBrains template\n# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio\n\n*.iml\n\n## Directory-based project format:\n.idea/\n# if you remove the above rule, at least ignore the following:\n\n# User-specific stuff:\n# .idea/workspace.xml\n# .idea/tasks.xml\n# .idea/dictionaries\n\n# Sensitive or high-churn files:\n# .idea/dataSources.ids\n# .idea/dataSources.xml\n# .idea/sqlDataSources.xml\n# .idea/dynamic.xml\n# .idea/uiDesigner.xml\n\n# Gradle:\n# .idea/gradle.xml\n# .idea/libraries\n\n# Mongo Explorer plugin:\n# .idea/mongoSettings.xml\n\n## File-based project format:\n*.ipr\n*.iws\n\n## Plugin-specific files:\n\n# IntelliJ\n/out/\n\n# mpeltonen/sbt-idea plugin\n.idea_modules/\n\n# JIRA plugin\natlassian-ide-plugin.xml\n\n# Crashlytics plugin (for Android Studio and IntelliJ)\ncom_crashlytics_export_strings.xml\ncrashlytics.properties\ncrashlytics-build.properties\n\n# Build\ndist/\nreleases/\nresources/\nnode_modules/\nlib/\n.DS_Store\ndeploy-script.sh\ncoverage/\n.nyc_output/\n"
  },
  {
    "path": ".npmignore",
    "content": "node_modules/\nsrc/\nbuild/\nlinting/\ndist/paw/\ndist/web/\ndist/webworker/\n\n.git/\n.babelrc\n.eslintignore\n.gitignore\n.travis.yml\n.npmignore\n.nvmrc\n.travis.yml\n\nMakefile\nwebpack.config.babel.js\nnpm-shrinkwrap.json\n"
  },
  {
    "path": ".nvmrc",
    "content": "v7.4.0\n"
  },
  {
    "path": ".travis.yml",
    "content": "language: node_js\nnode_js: 7.4\ncache:\n  yarn: true\n  directories:\n    - node_modules\nenv:\n  - TEST_TARGET=lint\n  - TEST_TARGET=unit\n  - TEST_TARGET=e2e\n  - TEST_TARGET=cov\nscript:\n  - make test\n"
  },
  {
    "path": "LICENSE",
    "content": "The MIT License (MIT)\n\nCopyright (c) 2015 Paw Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n"
  },
  {
    "path": "Makefile",
    "content": "BASE=$(shell pwd)\nSCRIPTS=$(BASE)/scripts\nextensions_dir=$(HOME)/Library/Containers/com.luckymarmot.Paw/Data/Library/Application\\ Support/com.luckymarmot.Paw/Extensions/\n\nall: configure pack\n\nclean:\n\tsh \"$(SCRIPTS)/clean.sh\" $(BASE)\n\nconfigure:\n\tsh \"$(SCRIPTS)/configure.sh\" $(BASE)\n\nrunners:\n\tsh \"$(SCRIPTS)/runners.sh\" $(BASE) $(TARGET)\n\nimporters:\n\tsh \"$(SCRIPTS)/importers.sh\" $(BASE) $(TARGET)\n\ngenerators:\n\tsh \"$(SCRIPTS)/generators.sh\" $(BASE) $(TARGET)\n\ntransfer: clean importers generators\n\tsh \"$(SCRIPTS)/transfer.sh\" $(BASE) $(extensions_dir) $(TARGET)\n\npack: clean importers generators\n\tsh \"$(SCRIPTS)/pack.sh\" $(BASE) $(TARGET)\n\nlint:\n\tsh \"$(SCRIPTS)/lint.sh\" $(BASE)\n\ntest:\n\tsh \"$(SCRIPTS)/test.sh\" $(BASE) $(TEST_TARGET)\n\nvalidate: lint test\n\nwatch:\n\tsh \"$(SCRIPTS)/watch.sh\" $(BASE) $(COMMAND)\n"
  },
  {
    "path": "README.md",
    "content": "[![Build Status](https://travis-ci.org/luckymarmot/API-Flow.svg?branch=master)](https://travis-ci.org/luckymarmot/API-Flow)\n\n# API-Flow\n\nA flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.\n\n## What formats are supported and what will be in the future\nWe currently support:\n- `Swagger v2.0 (in/out)`\n- `RAML v1.0 (in/out)`\n- `Postman Collection v2.0 (in/out)`\n- `Paw v3.1 (in/out)`\n\nWe intend to support:\n- `Swagger v3.0`\n- `RAML v0.8`\n- `Postman Collection v1.0`\n- `Postman Dump v1.0`\n- `Insomnia v3.0`\n- `Api-Blueprint`\n- and many more.\n\n## Installation\n### from a cloned repository\n\njust run\n\n```sh\ngit clone https://github.com/luckymarmot/API-Flow.git\ncd API-Flow\nmake install\n```\n\nThis will install the node module dependencies\n\n## Building the different libraries\n### node, web, and webworker\n\nrun the following command to build API-Flow for the different environments that you need\n\n```sh\n# use TARGET=\"node\" if you only want the node library\nmake runners TARGET=\"node web webworker\"\n```\n\n### Paw\n\nYou can use the following command to add the different extensions to Paw\n\n```sh\n# use TARGET=\"swagger\" if you only want the swagger bindings\nmake transfer TARGET=\"swagger raml1 postman2\"\n```\n\n## Using the npm module\n### as a standard library\n\n```js\nconst ApiFlow = require('api-flow'); // if from npm\nconst ApiFlow = require('./dist/node/api-flow.js'); // if from `make runners TARGET=\"node\"`\n\nconst options = {\n    source: {\n        format: 'swagger',\n        version: 'v2.0'\n    },\n    target: {\n        format: 'raml',\n        version: 'v1.0'\n    }\n}\n\nconst promise = ApiFlow.transform({\n  options,\n  uri: path.resolve(__dirname, './my_super_swagger.yml')\n})\n\npromise.then((data) => {\n  // do some cool stuff with the data\n})\n```\n\n### Using as a CLI (coming soon)\n```sh\nnode ./bin/api-flow.js some_swagger.json -f swagger -t raml > converted.yml\n```\n\n### User Interface\n\nAPI-Flow is one of the main components of [Console.REST](https://github.com/luckymarmot/console-rest). If you're an API user, you can easily use [https://console.rest/](https://console.rest/) to convert API description files. If you're an API provider, you can add a button to your API docs to let your users open and play with your API in client apps including Paw or Postman.\n\n## Contributing\n\nPRs are welcomed!\nOur sole requirement is that organizations that want to extend API-Flow to support their format write both a parser and a serializer, and not simply a serializer.\n\n## Documentation\nYou can find more information about the internal structure of API-Flow in [src](https://github.com/luckymarmot/API-Flow/tree/develop/src). We've also created a set of templates to help speed up the extension process: [loader](https://github.com/luckymarmot/API-Flow/tree/develop/src/loaders/template/v1.0), [parser](https://github.com/luckymarmot/API-Flow/tree/develop/src/parsers/template/v1.0/), and [environment](https://github.com/luckymarmot/API-Flow/tree/develop/src/environments/template)\n\n## License\n\nThis repository is released under the [MIT License](LICENSE). Feel free to fork, and modify!\nCopyright © 2016 Paw Inc.\n\n## Contributors\n\nSee [Contributors](https://github.com/luckymarmot/API-Flow/graphs/contributors).\n"
  },
  {
    "path": "bin/api-flow.js",
    "content": "#! /usr/bin/env node\n/* eslint-disable */\nvar FlowCLI = require('../dist/node/api-flow.js').default;\n\nvar cli = new FlowCLI(process.argv);\nvar parser = cli._createParser();\ncli.processArguments(parser);\ncli.run().then((data) => {\n    console.log(data)\n});\n"
  },
  {
    "path": "configs/node/api-flow-config.js",
    "content": "import Environment from '../../src/environments/node/Environment'\n\nimport SwaggerLoader from '../../src/loaders/swagger/Loader'\nimport RAMLLoader from '../../src/loaders/raml/Loader'\nimport PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader'\n\nimport SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser'\nimport RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser'\nimport PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser'\n\nimport SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer'\nimport RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer'\nimport PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer'\nimport InternalSerializer from '../../src/serializers/internal/Serializer'\n\nexport const loaders = [\n  SwaggerLoader,\n  RAMLLoader,\n  PostmanV2Loader\n]\n\nexport const parsers = [\n  SwaggerV2Parser,\n  RAMLV1Parser,\n  PostmanV2Parser\n]\n\nexport const serializers = [\n  SwaggerV2Serializer,\n  RAMLV1Serializer,\n  InternalSerializer,\n  PostmanV2Serializer\n]\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/node/api-flow.js",
    "content": "import ApiFlow from '../../src/api-flow'\n\nexport default ApiFlow\n"
  },
  {
    "path": "configs/node/webpack.config.babel.js",
    "content": "const path = require('path')\n\nconst config = {\n  target: 'node',\n  entry: path.resolve(__dirname, './api-flow.js'),\n  output: {\n    path: path.resolve(__dirname, '../../dist/node/'),\n    filename: 'api-flow.js',\n    library: 'ApiFlow',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      { test: /\\.js$/, use: 'babel-loader', include: [ path.resolve(__dirname, '../../src') ] },\n      { test: /\\.json$/, use: 'json-loader', include: [ path.resolve(__dirname, '../../') ] }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/generators/Generator.js",
    "content": "import { registerCodeGenerator } from '../../../src/mocks/PawShims'\n\nimport { target } from 'api-flow-config'\nimport ApiFlow from '../../../src/api-flow'\n\n@registerCodeGenerator\nexport default class SwaggerGenerator {\n  static identifier = target.identifier\n  static title = target.humanTitle\n  static help =\n        'https://github.com/luckymarmot/API-Flow'\n  static languageHighlighter = 'json'\n  static fileExtension = 'json'\n\n  /* eslint-disable no-unused-vars */\n  generate(context, reqs, opts) {\n    /* eslint-enable no-unused-vars */\n    try {\n      const options = { context, reqs, source: { format: 'paw', version: 'v3.0' }, target }\n      const serialized = ApiFlow.serialize(ApiFlow.parse({ options }))\n      return serialized\n    }\n    catch (e) {\n            /* eslint-disable no-console */\n      console.error(\n                this.constructor.title,\n                'generation failed with error:',\n                e,\n                e.stack,\n                JSON.stringify(e, null, '  ')\n            )\n            /* eslint-enable no-console */\n      throw e\n    }\n  }\n}\n"
  },
  {
    "path": "configs/paw/generators/postman2/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport PawLoader from '../../../../src/loaders/paw/Loader'\n\nimport PawParser from '../../../../src/parsers/paw/Parser'\n\nimport PostmanV2Serializer from '../../../../src/serializers/postman/v2.0/Serializer'\n\nexport const loaders = [\n  PawLoader\n]\n\nexport const parsers = [\n  PawParser\n]\n\nexport const serializers = [\n  PostmanV2Serializer\n]\n\nexport const target = {\n  identifier: 'com.luckymarmot.PawExtensions.PostmanCollectionGenerator',\n  title: 'PostmanCollectionGenerator',\n  humanTitle: 'Postman Collection 2.0',\n  format: PostmanV2Serializer.__meta__.format,\n  version: PostmanV2Serializer.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/generators/postman2/webpack.config.babel.js",
    "content": "const { target } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Generator.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', target.identifier),\n    filename: target.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/generators/raml1/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport PawLoader from '../../../../src/loaders/paw/Loader'\n\nimport PawParser from '../../../../src/parsers/paw/Parser'\n\nimport RAMLV1Serializer from '../../../../src/serializers/raml/v1.0/Serializer'\n\nexport const loaders = [\n  PawLoader\n]\n\nexport const parsers = [\n  PawParser\n]\n\nexport const serializers = [\n  RAMLV1Serializer\n]\n\nexport const target = {\n  identifier: 'com.luckymarmot.PawExtensions.RAML1Generator',\n  title: 'RAML1Generator',\n  humanTitle: 'RAML 1.0',\n  format: RAMLV1Serializer.__meta__.format,\n  version: RAMLV1Serializer.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/generators/raml1/webpack.config.babel.js",
    "content": "const { target } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Generator.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', target.identifier),\n    filename: target.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/generators/swagger/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport PawLoader from '../../../../src/loaders/paw/Loader'\n\nimport PawParser from '../../../../src/parsers/paw/Parser'\n\nimport SwaggerV2Serializer from '../../../../src/serializers/swagger/v2.0/Serializer'\n\nexport const loaders = [\n  PawLoader\n]\n\nexport const parsers = [\n  PawParser\n]\n\nexport const serializers = [\n  SwaggerV2Serializer\n]\n\nexport const target = {\n  identifier: 'com.luckymarmot.PawExtensions.SwaggerGenerator',\n  title: 'SwaggerGenerator',\n  humanTitle: 'Swagger 2.0',\n  format: SwaggerV2Serializer.__meta__.format,\n  version: SwaggerV2Serializer.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/generators/swagger/webpack.config.babel.js",
    "content": "const { target } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Generator.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', target.identifier),\n    filename: target.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/importers/Importer.js",
    "content": "import { registerImporter } from '../../../src/mocks/PawShims'\nimport path from 'path'\n\nimport { source } from 'api-flow-config'\nimport ApiFlow from '../../../src/api-flow'\n\nimport { convertEntryListInMap } from '../../../src/utils/fp-utils'\n\nconst methods = {}\n\n@registerImporter // eslint-disable-line\nclass SwaggerImporter {\n  static identifier = source.identifier\n  static title = source.humanTitle\n\n  static fileExtensions = [];\n\n  canImport(context, items) {\n    return methods.canImport(context, items)\n  }\n\n  import(context, items, options) {\n    return methods.import(context, items, options)\n  }\n}\n\nmethods.getUriFromItem = (item) => {\n  if (item.url) {\n    return item.url\n  }\n\n  if (!item.file || !item.file.path || !item.file.name) {\n    return 'file://localhost/'\n  }\n\n  const uri = 'file://' + path.join(item.file.path, item.file.name)\n  return uri\n}\n\nmethods.getCacheFromItems = (items) => {\n  return items.map(item => {\n    const uri = methods.getUriFromItem(item)\n    return { key: uri, value: item.content }\n  }).reduce(convertEntryListInMap, {})\n}\n\nmethods.canImport = (context, items) => {\n  const fixedItems = items.map(item => {\n    item.uri = methods.getUriFromItem(item)\n    return item\n  })\n\n  const primaryUri = ApiFlow.findPrimaryUri({ items: fixedItems })\n  return primaryUri ? 1 : 0\n}\n\nmethods.import = (context, items) => {\n  const options = { context, source, target: { format: 'paw', version: 'v3.0' } }\n  const itemMap = methods.getCacheFromItems(items)\n  ApiFlow.setCache(itemMap)\n\n  const fixedItems = items.map(item => {\n    item.uri = methods.getUriFromItem(item)\n    return item\n  })\n\n  const uri = ApiFlow.findPrimaryUri({ items: fixedItems })\n  return ApiFlow.transform({ options, uri })\n  // const statusMessage = methods.formatStatusMessage(parser, serializer)\n}\n\nexport default SwaggerImporter\n"
  },
  {
    "path": "configs/paw/importers/postman2/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport PostmanCollectionV2Loader from '../../../../src/loaders/postman/v2.0/Loader'\n\nimport PostmanCollectionV2Parser from '../../../../src/parsers/postman/v2.0/Parser'\n\nimport PawSerializer from '../../../../src/serializers/paw/Serializer'\n\nexport const loaders = [\n  PostmanCollectionV2Loader\n]\n\nexport const parsers = [\n  PostmanCollectionV2Parser\n]\n\nexport const serializers = [\n  PawSerializer\n]\n\nexport const source = {\n  identifier: 'com.luckymarmot.PawExtensions.PostmanCollectionV2Importer',\n  title: 'PostmanCollectionV2Importer',\n  humanTitle: 'Postman Collection 2.0 Importer',\n  format: PostmanCollectionV2Parser.__meta__.format,\n  version: PostmanCollectionV2Parser.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/importers/postman2/webpack.config.babel.js",
    "content": "const { source } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Importer.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', source.identifier),\n    filename: source.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/importers/raml1/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport RAMLLoader from '../../../../src/loaders/raml/Loader'\n\nimport RAMLV1Parser from '../../../../src/parsers/raml/v1.0/Parser'\n\nimport PawSerializer from '../../../../src/serializers/paw/Serializer'\n\nexport const loaders = [\n  RAMLLoader\n]\n\nexport const parsers = [\n  RAMLV1Parser\n]\n\nexport const serializers = [\n  PawSerializer\n]\n\nexport const source = {\n  identifier: 'com.luckymarmot.PawExtensions.RAML1Importer',\n  title: 'RAML1Importer',\n  humanTitle: 'RAML 1.0 Importer',\n  format: RAMLV1Parser.__meta__.format,\n  version: RAMLV1Parser.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/importers/raml1/webpack.config.babel.js",
    "content": "const { source } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Importer.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', source.identifier),\n    filename: source.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js'),\n      'raml-1-parser': path.resolve(__dirname, '../../../shared/raml-1-parser.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/paw/importers/swagger/api-flow-config.js",
    "content": "import Environment from '../../../../src/environments/paw/Environment'\n\nimport SwaggerLoader from '../../../../src/loaders/swagger/Loader'\n\nimport SwaggerV2Parser from '../../../../src/parsers/swagger/v2.0/Parser'\n\nimport PawSerializer from '../../../../src/serializers/paw/Serializer'\n\nexport const loaders = [\n  SwaggerLoader\n]\n\nexport const parsers = [\n  SwaggerV2Parser\n]\n\nexport const serializers = [\n  PawSerializer\n]\n\nexport const source = {\n  identifier: 'com.luckymarmot.PawExtensions.SwaggerImporter',\n  title: 'SwaggerImporter',\n  humanTitle: 'Swagger 2.0 Importer',\n  format: SwaggerV2Parser.__meta__.format,\n  version: SwaggerV2Parser.__meta__.version\n}\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/paw/importers/swagger/webpack.config.babel.js",
    "content": "const { source } = require('./api-flow-config.js')\n\nconst path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, '../Importer.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../../dist/paw/', source.identifier),\n    filename: source.title + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../../../src'), path.resolve(__dirname, '../') ]\n      },\n      {\n        test: /\\.json$/,\n        use: 'json-loader',\n        include: [ path.resolve(__dirname, '../../../../') ]\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/shared/raml-1-parser.js",
    "content": "/* eslint-disable */\n!function(e,t){if(\"object\"==typeof exports&&\"object\"==typeof module)module.exports=t();else if(\"function\"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)(\"object\"==typeof exports?exports:e)[r]=n[r]}}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,\"a\",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p=\"\",t(t.s=400)}([function(e,t,n){\"use strict\";function r(){return t.rt.getSchemaUtils()}function i(e){e.isUnion?e.addAdapter(new C(e)):e.range&&e.addAdapter(new E(e))}function a(e){return e.getSource&&\"function\"==typeof e.getSource}function o(e){var t=e;return t.genuineUserDefinedType&&t.isUserDefined&&t.isUserDefined()}function s(e,t,n,r,i){return new b(e,t).withDomain(n,i).withRange(r)}var u=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};t.rt=n(337);var c=t.rt.nominalTypes;t.getSchemaUtils=r,t.TOP_LEVEL_EXTRA=t.rt.TOP_LEVEL_EXTRA,t.DEFINED_IN_TYPES_EXTRA=t.rt.DEFINED_IN_TYPES_EXTRA,t.USER_DEFINED_EXTRA=t.rt.USER_DEFINED_EXTRA,t.SOURCE_EXTRA=t.rt.SOURCE_EXTRA,t.tsInterfaces=t.rt.tsInterfaces,t.injector={inject:function(e){i(e)}},c.registerInjector(t.injector);var l=function(e){function t(){e.apply(this,arguments)}return u(t,e),t}(c.AbstractType);t.AbstractType=l;var p=function(e){function t(){e.apply(this,arguments)}return u(t,e),t}(c.ValueType);t.ValueType=p;var f=function(){function e(){}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.getSource=function(){return null},e.CLASS_IDENTIFIER=\"definitionSystem.SourceProvider\",e}();t.SourceProvider=f,t.isSourceProvider=a;var d=function(e){function t(){e.apply(this,arguments),this.values=[]}return u(t,e),t.isInstance=function(e){if(null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier)for(var n=0,r=e.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==t.CLASS_IDENTIFIER)return!0}return!1},t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER)},t.CLASS_IDENTIFIER=\"definitionSystem.EnumType\",t}(p);t.EnumType=d;var m=function(e){function t(t,n,r,i){e.call(this,t,i,n),this.referenceTo=r}return u(t,e),t.isInstance=function(e){if(null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier)for(var n=0,r=e.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==t.CLASS_IDENTIFIER)return!0}return!1},t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER)},t.prototype.getReferencedType=function(){return this.universe().type(this.referenceTo)},t.prototype.hasStructure=function(){return!0},t.CLASS_IDENTIFIER=\"definitionSystem.ReferenceType\",t}(p);t.ReferenceType=m;var h=function(e){function t(t,n,r,i){void 0===i&&(i=\"\"),e.call(this,t,n,r)}return u(t,e),t.isInstance=function(e){if(null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier)for(var n=0,r=e.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==t.CLASS_IDENTIFIER)return!0}return!1},t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER)},t.prototype.allProperties=function(t){return void 0===t&&(t={}),e.prototype.allProperties.call(this,t)},t.CLASS_IDENTIFIER=\"definitionSystem.NodeClass\",t}(c.StructuredType);t.NodeClass=h;var y=function(e){function t(t,n,r,i,a){e.call(this,t,n,i,a),this.getAdapter(C).setDeclaringNode(r)}return u(t,e),t.isInstance=function(e){if(null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier)for(var n=0,r=e.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==t.CLASS_IDENTIFIER_UserDefinedClass)return!0}return!1},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_UserDefinedClass)},t.prototype.key=function(){return null},t.prototype.isUserDefined=function(){return!0},t.prototype.typeId=function(){var e=this.nameId(),t=this.getAdapter(C).getDeclaringNode();if(t){e+=t.lowLevel().start();var n=t.lowLevel().unit();n&&(e+=n.absolutePath())}return e},t.prototype.hasValueTypeInHierarchy=function(){return!!this._value||(this.isAssignableFrom(\"ObjectTypeDeclaration\"),!1)},t.prototype.isGenuineUserDefinedType=function(){return null!=this.genuineUserDefinedType()},t.prototype.genuineUserDefinedType=function(){return this.getAdapter(C).getDeclaringNode()?this:null},t.CLASS_IDENTIFIER_UserDefinedClass=\"definitionSystem.UserDefinedClass\",t}(h);t.UserDefinedClass=y,t.isUserDefinedClass=o;var _=function(e){function t(){e.apply(this,arguments)}return u(t,e),t.prototype.allProperties=function(e){void 0===e&&(e={});var t=this.superTypes()[0].allProperties();if(0==t.length){var n=this.getAdapter(C).getDeclaringNode(),r=new S(\"value\",n);r.withDomain(this),r.withCanBeValue(),r.withRequired(!1);this.superTypes()[0];t=[],r.withRange(r.node().asElement().definition().universe().type(\"string\")),t.push(r)}return t},t.prototype.isAnnotationType=function(){return!0},t}(y);t.AnnotationType=_;var g=function(e){function t(t,n,r,i){void 0===n&&(n=\"\"),void 0===r&&(r=null),void 0===i&&(i=\"RAML08\"),e.call(this,n),this._parent=r,this._classes=[],this._uversion=\"RAML08\",this.aMap={},this.matchedObjects=t,this._uversion=i}return u(t,e),t.prototype.matched=function(){return this.matchedObjects?this.matchedObjects:this._parent?this._parent.matched():void 0},t.prototype.setTopLevel=function(e){this._topLevel=e},t.prototype.getTopLevel=function(){return this._topLevel},t.prototype.setOriginalTopLevelText=function(e){this._originalTopLevelText=e},t.prototype.getOriginalTopLevelText=function(){return this._originalTopLevelText},t.prototype.setTypedVersion=function(e){this._typedVersion=e},t.prototype.getTypedVersion=function(){return this._typedVersion},t.prototype.version=function(){return this._uversion},t.prototype.setUniverseVersion=function(e){this._uversion=e},t.prototype.types=function(){var e=[].concat(this._classes);return null!=this._parent&&(e=e.concat(this._parent.types())),e},t.prototype.type=function(e){if(this.aMap[e])return this.aMap[e];for(var t,n=0;n<this._classes.length;n++)if(this._classes[n].nameId()==e){t=this._classes[n];break}if(null==t&&this._parent){var t=this._parent.type(e);if(t instanceof l){t._universe=this}}return t},t.prototype.register=function(e){return this._classes.push(e),e instanceof h&&this._classes.forEach(function(t){if(t instanceof h){t.getAdapter(C).getExtendedType()==e&&e.getAdapter(C).getRuntimeExtenders().push(t)}}),this},t.prototype.registerAlias=function(e,t){this.aMap[e]=t},t.prototype.unregister=function(e){this._classes=this._classes.filter(function(t){return t!=e});var t=e.superTypes();return t.forEach(function(t){var n=t;n._superTypes=n._superTypes.filter(function(t){return t!=e})}),t=e.subTypes(),t.forEach(function(t){var n=t;n._subTypes=n._subTypes.filter(function(t){return t!=e})}),this},t.prototype.registerSuperClass=function(e,t){var n=e,r=t;n._superTypes.push(t),r._subTypes.push(e)},t}(c.Described);t.Universe=g,t.prop=s;var v=function(){function e(e,t){this.name=e,this.value=t}return e}();t.ChildValueConstraint=v;var b=function(e){function t(){e.apply(this,arguments),this._isFromParentValue=!1,this._isFromParentKey=!1,this._key=!1,this._declaresFields=!1,this._describes=null,this._canBeDuplicator=!1,this._allowsNull=!1,this._canBeValue=!1,this._isInherited=!1,this._selfNode=!1,this._noDirectParse=!1,this._contextReq=[],this.determinesChildValues=[]}return u(t,e),t.prototype.isPrimitive=function(){return this.range().isValueType()&&!(this.range()instanceof m)},t.prototype.withNoDirectParse=function(){this._noDirectParse=!0},t.prototype.isNoDirectParse=function(){return this._noDirectParse},t.prototype.withSelfNode=function(){this._selfNode=!0},t.prototype.isSelfNode=function(){return this._selfNode},t.prototype.matchKey=function(t){return null!=this._groupName?this.isAnnotation()?\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1):this._groupName==t:e.prototype.matchKey.call(this,t)},t.prototype.valueDocProvider=function(){return this._vprovider},t.prototype.setValueDocProvider=function(e){return this._vprovider=e,this},t.prototype.suggester=function(){return this._suggester},t.prototype.setValueSuggester=function(e){this._suggester=e},t.prototype.enumOptions=function(){return this._enumOptions&&\"string\"==typeof this._enumOptions?[this._enumOptions+\"\"]:this._enumOptions},t.prototype.getOftenKeys=function(){return this._oftenKeys},t.prototype.withOftenKeys=function(e){return this._oftenKeys=e,this},t.prototype.withCanBeValue=function(){return this._canBeValue=!0,this},t.prototype.withInherited=function(e){this._isInherited=e},t.prototype.isInherited=function(){return this._isInherited},t.prototype.isAllowNull=function(){return this._allowsNull},t.prototype.withAllowNull=function(){this._allowsNull=!0},t.prototype.getCanBeDuplicator=function(){return this._canBeDuplicator},t.prototype.canBeValue=function(){return this._canBeValue},t.prototype.setCanBeDuplicator=function(){return this._canBeDuplicator=!0,!0},t.prototype.inheritedContextValue=function(){return this._inheritsValueFromContext},t.prototype.withInheritedContextValue=function(e){return this._inheritsValueFromContext=e,this},t.prototype.withContextRequirement=function(e,t){this._contextReq.push({name:e,value:t})},t.prototype.getContextRequirements=function(){return this._contextReq},t.prototype.withDescribes=function(e){return this._describes=e,this},t.prototype.describesAnnotation=function(){return null!=this._describes},t.prototype.describedAnnotation=function(){return this._describes},t.prototype.isReference=function(){return this.range()instanceof m},t.prototype.referencesTo=function(){return this.range().getReferencedType()},t.prototype.newInstanceName=function(){return this._newInstanceName?this._newInstanceName:this.range().nameId()},t.prototype.withThisPropertyDeclaresFields=function(e){return void 0===e&&(e=!0),this._declaresFields=e,this},t.prototype.isThisPropertyDeclaresTypeFields=function(){return this._declaresFields},t.prototype.withNewInstanceName=function(e){return this._newInstanceName=e,this},t.prototype.addChildValueConstraint=function(e){this.determinesChildValues.push(e)},t.prototype.getChildValueConstraints=function(){return this.determinesChildValues},t.prototype.childRestrictions=function(){return this.determinesChildValues},t.prototype.id=function(){return this._id?this._id:this._groupName?this.domain().getAdapter(C).getDeclaringNode()?null:(this._id=this._groupName+this.domain().nameId(),this._id):null},t.prototype.isAnnotation=function(){return\"annotations\"==this._groupName&&this.domain()&&!this.domain().isUserDefined()},t.prototype.withFromParentValue=function(e){return void 0===e&&(e=!0),this._isFromParentValue=e,this},t.prototype.withFromParentKey=function(e){return void 0===e&&(e=!0),this._isFromParentKey=e,this},t.prototype.isFromParentKey=function(){return this._isFromParentKey},t.prototype.isFromParentValue=function(){return this._isFromParentValue},t.prototype.withGroupName=function(e){return this._groupName=e,this},t.prototype.unmerge=function(){return this._groupName=this.nameId(),this},t.prototype.merge=function(){return this._groupName=null,this},t.prototype.withKey=function(e){return this._key=e,this},t.prototype.isKey=function(){return this._key},t.prototype.isMerged=function(){return null==this._groupName},t.prototype.groupName=function(){return this._groupName},t.prototype.key=function(){return null},t}(c.Property);t.Property=b;var S=function(e){function t(t,n){e.call(this,t),this._node=n}return u(t,e),t.isInstance=function(e){if(null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier)for(var n=e.getClassIdentifier(),r=0;r<n.length;r++)if(n[r]==t.CLASS_IDENTIFIER)return!0;return!1},t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER)},t.prototype.withDisplayName=function(e){this._displayName=e},t.prototype.getDisplayName=function(){return this._displayName},t.prototype.node=function(){return this._node||null==this.sourceProvider||(this._node=this.sourceProvider.getSource()),this._node},t.prototype.setSourceProvider=function(e){this.sourceProvider=e},t.CLASS_IDENTIFIER=\"definitionSystem.UserDefinedProp\",t}(b);t.UserDefinedProp=S;var A=function(){function e(){}return e.prototype.setDocTableName=function(e){this._documentationTableName=e},e.prototype.docTableName=function(){return this._documentationTableName},e.prototype.setHidden=function(e){this._isHidden=e},e.prototype.isHidden=function(){return this._isHidden},e.prototype.setMarkdownDescription=function(e){this._markdownDescription=e},e.prototype.markdownDescription=function(){return this._markdownDescription},e.prototype.setValueDescription=function(e){this._valueDescription=e},e.prototype.valueDescription=function(){return this._valueDescription},e}();t.RAMLPropertyDocumentationService=A;var T=function(e){function t(){e.apply(this,arguments)}return u(t,e),t.prototype.isSystem=function(){return this._isSystemProperty},t.prototype.withSystem=function(e){return this._isSystemProperty=e,this},t.prototype.isEmbedMap=function(){return this._isEmbededMap},t.prototype.withEmbedMap=function(){return this._isEmbededMap=!0,this},t}(A);t.RAMLPropertyParserService=T;var E=function(e){function t(t){if(e.call(this),this._property=t,this._meta={},!t)throw new Error;e.call(this)}return u(t,e),t.prototype.valueDocProvider=function(){return this._property.valueDocProvider()},t.prototype.withPropertyGrammarType=function(e){this._propertyGrammarType=e},t.prototype.getPropertyGrammarType=function(){return this._propertyGrammarType},t.prototype.id=function(){return this._property.nameId()},t.prototype.range=function(){return this._property.range()},t.prototype.domain=function(){return this._property.domain()},t.prototype.isAllowNull=function(){return this._property.isAllowNull()},t.prototype.referencesTo=function(){return this._property.referencesTo()},t.prototype.isReference=function(){return this._property.isReference()},t.prototype.nameId=function(){return this._property.nameId()},t.prototype.priority=function(){return this.isKey()?128:this.isReference()?64:this.isTypeExpr()?32:\"example\"==this.nameId()?0:-1024},t.prototype.isKey=function(){return this._property instanceof b&&this._property.isKey()},t.prototype.isMerged=function(){return this._property instanceof b&&this._property.isMerged()},t.prototype.isTypeExpr=function(){return this.texpr},t.prototype.isExampleProperty=function(){return this.example},t.prototype.setExample=function(e){this.example=e},t.prototype.setTypeExpression=function(e){this.texpr=e},t.prototype.isDescriminating=function(){return this._property.isDescriminator()},t.prototype.putMeta=function(e,t){this._meta[e]=t},t.prototype.meta=function(e){return this._meta[e]},t}(T);t.RAMLPropertyService=E;var C=function(){function e(e){\n//!!!\nthis._allowsOptionalProperties=!1,this._possibleInterfaces=[],\n//!!!\nthis._canInherit=[],this._declaredBy=[],\n//!!!\nthis._aliases=[],\n//!!!???\nthis._defining=[],this._runtimeExtenders=[],\n//!!!???\nthis._declaresType=null,\n//!!!\nthis._isTemplate=!1,\n//!!!\nthis._contextRequirements=[],this._type=e}return e.prototype.withAllowQuestion=function(){this._allowsOptionalProperties=!0},e.prototype.getAllowQuestion=function(){return this._allowsOptionalProperties},e.prototype.withCanInherit=function(e){this._canInherit.push(e)},e.prototype.getReferenceIs=function(){return this._referenceIs},e.prototype.withReferenceIs=function(e){this._referenceIs=e},e.prototype.descriminatorValue=function(){return 0==this.valueRequirements().length?this.nameId():this.valueRequirements()[0].value},e.prototype.getCanInherit=function(){return this._canInherit},e.prototype.withAllowAny=function(){this._allowsAnyChildren=!0},e.prototype.getAllowAny=function(){return this._allowsAnyChildren||this._type.isExternal()},e.prototype.globallyDeclaredBy=function(){return this._declaredBy},e.prototype.setGloballyDeclaredBy=function(e){this._declaredBy.push(e)},e.prototype.setDeclaringNode=function(e){this._node=e},e.prototype.nameId=function(){return this._type.nameId()},e.prototype.universe=function(){return this._type.universe()},e.prototype.isAssignableFrom=function(e){return this._type.isAssignableFrom(e)},e.prototype.setConsumesRefs=function(e){this._consumesRef=e},e.prototype.definingPropertyIsEnough=function(e){this._defining.push(e)},e.prototype.getDefining=function(){return this._defining},e.prototype.getConsumesRefs=function(){return this._consumesRef},e.prototype.addAlias=function(e){this._aliases.push(e)},e.prototype.getAliases=function(){return this._aliases},e.prototype.valueRequirements=function(){return this._type.valueRequirements()},e.prototype.isAnnotation=function(){return this._annotationChecked?this._isAnnotation:(this._annotationChecked=!0,this._isAnnotation=this._type.allSuperTypes().some(function(e){return e.key()&&\"AnnotationRef\"==e.key().name}),this._isAnnotation)},e.prototype.allowValue=function(){return this._allowsValueSet?this._allowsValue:this._type.allProperties().some(function(e){return e.isFromParentValue()||e.canBeValue()})?(this._allowsValue=!0,this._allowsValueSet=!0,!0):(this._allowsValueSet=!0,!1)},e.prototype.key=function(){return this._type.key()},e.prototype.getRepresentationOf=function(){return this._representationOf},e.prototype.getPath=function(){return\"\"},e.prototype.isDeclaration=function(){return!!this._isTemplate||(!!this._convertsToGlobal||(!!this._declaresType||!(!this.key()||\"Library\"!==this.key().name)))},e.prototype.isGlobalDeclaration=function(){return!!this._actuallyExports||(!!this._isTemplate||!!this._declaresType)},e.prototype.isTypeSystemMember=function(){return null!=this._declaresType},e.prototype.getExtendedType=function(){return this.universe().type(this._declaresType)},e.prototype.setInlinedTemplates=function(e){return this._isTemplate=e,this},e.prototype.getRuntimeExtenders=function(){return this._runtimeExtenders},e.prototype.isInlinedTemplates=function(){return this._isTemplate},e.prototype.setExtendedTypeName=function(t){this._declaresType=t;var n=this.universe().type(t);if(n instanceof h){n.getAdapter(e)._runtimeExtenders.push(this._type)}},e.prototype.getKeyProp=function(){for(var e=this._type.allProperties(),t=0;t<e.length;t++)if(e[t].getAdapter(E).isKey())return e[t];return null},e.prototype.withActuallyExports=function(e){this._actuallyExports=e},e.prototype.withConvertsToGlobal=function(e){this._convertsToGlobal=e},e.prototype.getConvertsToGlobal=function(){return this._convertsToGlobal},e.prototype.getActuallyExports=function(){return this._actuallyExports},e.prototype.isUserDefined=function(){return this._type instanceof h?this._type.isUserDefined():this._type instanceof l&&this._type.isUserDefined()},e.prototype.withContextRequirement=function(e,t){this._contextRequirements.push({name:e,value:t})},e.prototype.getContextRequirements=function(){return this._contextRequirements},e.prototype.findMembersDeterminer=function(){for(var e=this._type.allProperties(),t=0;t<e.length;t++)if(e[t].isThisPropertyDeclaresTypeFields())return e[t];return null},e.prototype.getDeclaringNode=function(){if(this._node)return this._node;if(this._type){var e=this._type.getExtra(t.SOURCE_EXTRA);return e?e instanceof f||e.getSource&&\"function\"==typeof e.getSource?e.getSource():e:null}return null},e.prototype.registerSupertypes=function(e){var t=this,n=this._type.universe();e.forEach(function(e){var r=n.type(e);r&&t._type.addSuperType(r)})},e.prototype.registerPossibleInterfaces=function(e){for(var t=this._type.universe(),n=0,r=e;n<r.length;n++){var i=r[n],a=t.type(i);if(!a)return;this._possibleInterfaces.push(a)}},e.prototype.possibleInterfaces=function(){return this._possibleInterfaces},e}();t.RAMLService=C;var N={},w=n(333),k=w.universeDumps,x=n(334),R=n(335);t.universesInfo=R,t.getUniverse=function(){var e=function(e){if(N[e])return N[e];var t=k[e],n=x.toDefSystem(t,\"RAML08\"==e?R.Universe08:R.Universe10);return n&&(n.setUniverseVersion(e),N[e]=n),n};return e.availableUniverses=function(){return Object.keys(k)},e}()},function(e,t,n){var r,i;(function(){function n(e){function t(t,n,r,i,a,o){for(;a>=0&&a<o;a+=e){var s=i?i[a]:a;r=n(r,t[s],s,t)}return r}return function(n,r,i,a){r=T(r,a,4);var o=!R(n)&&A.keys(n),s=(o||n).length,u=e>0?0:s-1;return arguments.length<3&&(i=n[o?o[u]:u],u+=e),t(n,r,i,o,u,s)}}function a(e){return function(t,n,r){n=E(n,r);for(var i=x(t),a=e>0?0:i-1;a>=0&&a<i;a+=e)if(n(t[a],a,t))return a;return-1}}function o(e,t,n){return function(r,i,a){var o=0,s=x(r);if(\"number\"==typeof a)e>0?o=a>=0?a:Math.max(a+s,o):s=a>=0?Math.min(a+1,s):a+s+1;else if(n&&a&&s)return a=n(r,i),r[a]===i?a:-1;if(i!==i)return a=t(m.call(r,o,s),A.isNaN),a>=0?a+o:-1;for(a=e>0?o:s-1;a>=0&&a<s;a+=e)if(r[a]===i)return a;return-1}}function s(e,t){var n=L.length,r=e.constructor,i=A.isFunction(r)&&r.prototype||p,a=\"constructor\";for(A.has(e,a)&&!A.contains(t,a)&&t.push(a);n--;)(a=L[n])in e&&e[a]!==i[a]&&!A.contains(t,a)&&t.push(a)}var u=this,c=u._,l=Array.prototype,p=Object.prototype,f=Function.prototype,d=l.push,m=l.slice,h=p.toString,y=p.hasOwnProperty,_=Array.isArray,g=Object.keys,v=f.bind,b=Object.create,S=function(){},A=function(e){return e instanceof A?e:this instanceof A?void(this._wrapped=e):new A(e)};void 0!==e&&e.exports&&(t=e.exports=A),t._=A,A.VERSION=\"1.8.3\";var T=function(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,a){return e.call(t,n,r,i,a)}}return function(){return e.apply(t,arguments)}},E=function(e,t,n){return null==e?A.identity:A.isFunction(e)?T(e,t,n):A.isObject(e)?A.matcher(e):A.property(e)};A.iteratee=function(e,t){return E(e,t,1/0)};var C=function(e,t){return function(n){var r=arguments.length;if(r<2||null==n)return n;for(var i=1;i<r;i++)for(var a=arguments[i],o=e(a),s=o.length,u=0;u<s;u++){var c=o[u];t&&void 0!==n[c]||(n[c]=a[c])}return n}},N=function(e){if(!A.isObject(e))return{};if(b)return b(e);S.prototype=e;var t=new S;return S.prototype=null,t},w=function(e){return function(t){return null==t?void 0:t[e]}},k=Math.pow(2,53)-1,x=w(\"length\"),R=function(e){var t=x(e);return\"number\"==typeof t&&t>=0&&t<=k};A.each=A.forEach=function(e,t,n){t=T(t,n);var r,i;if(R(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var a=A.keys(e);for(r=0,i=a.length;r<i;r++)t(e[a[r]],a[r],e)}return e},A.map=A.collect=function(e,t,n){t=E(t,n);for(var r=!R(e)&&A.keys(e),i=(r||e).length,a=Array(i),o=0;o<i;o++){var s=r?r[o]:o;a[o]=t(e[s],s,e)}return a},A.reduce=A.foldl=A.inject=n(1),A.reduceRight=A.foldr=n(-1),A.find=A.detect=function(e,t,n){var r;if(void 0!==(r=R(e)?A.findIndex(e,t,n):A.findKey(e,t,n))&&r!==-1)return e[r]},A.filter=A.select=function(e,t,n){var r=[];return t=E(t,n),A.each(e,function(e,n,i){t(e,n,i)&&r.push(e)}),r},A.reject=function(e,t,n){return A.filter(e,A.negate(E(t)),n)},A.every=A.all=function(e,t,n){t=E(t,n);for(var r=!R(e)&&A.keys(e),i=(r||e).length,a=0;a<i;a++){var o=r?r[a]:a;if(!t(e[o],o,e))return!1}return!0},A.some=A.any=function(e,t,n){t=E(t,n);for(var r=!R(e)&&A.keys(e),i=(r||e).length,a=0;a<i;a++){var o=r?r[a]:a;if(t(e[o],o,e))return!0}return!1},A.contains=A.includes=A.include=function(e,t,n,r){return R(e)||(e=A.values(e)),(\"number\"!=typeof n||r)&&(n=0),A.indexOf(e,t,n)>=0},A.invoke=function(e,t){var n=m.call(arguments,2),r=A.isFunction(t);return A.map(e,function(e){var i=r?t:e[t];return null==i?i:i.apply(e,n)})},A.pluck=function(e,t){return A.map(e,A.property(t))},A.where=function(e,t){return A.filter(e,A.matcher(t))},A.findWhere=function(e,t){return A.find(e,A.matcher(t))},A.max=function(e,t,n){var r,i,a=-(1/0),o=-(1/0);if(null==t&&null!=e){e=R(e)?e:A.values(e);for(var s=0,u=e.length;s<u;s++)(r=e[s])>a&&(a=r)}else t=E(t,n),A.each(e,function(e,n,r){((i=t(e,n,r))>o||i===-(1/0)&&a===-(1/0))&&(a=e,o=i)});return a},A.min=function(e,t,n){var r,i,a=1/0,o=1/0;if(null==t&&null!=e){e=R(e)?e:A.values(e);for(var s=0,u=e.length;s<u;s++)(r=e[s])<a&&(a=r)}else t=E(t,n),A.each(e,function(e,n,r){((i=t(e,n,r))<o||i===1/0&&a===1/0)&&(a=e,o=i)});return a},A.shuffle=function(e){for(var t,n=R(e)?e:A.values(e),r=n.length,i=Array(r),a=0;a<r;a++)t=A.random(0,a),t!==a&&(i[a]=i[t]),i[t]=n[a];return i},A.sample=function(e,t,n){return null==t||n?(R(e)||(e=A.values(e)),e[A.random(e.length-1)]):A.shuffle(e).slice(0,Math.max(0,t))},A.sortBy=function(e,t,n){return t=E(t,n),A.pluck(A.map(e,function(e,n,r){return{value:e,index:n,criteria:t(e,n,r)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index}),\"value\")};var I=function(e){return function(t,n,r){var i={};return n=E(n,r),A.each(t,function(r,a){e(i,r,n(r,a,t))}),i}};A.groupBy=I(function(e,t,n){A.has(e,n)?e[n].push(t):e[n]=[t]}),A.indexBy=I(function(e,t,n){e[n]=t}),A.countBy=I(function(e,t,n){A.has(e,n)?e[n]++:e[n]=1}),A.toArray=function(e){return e?A.isArray(e)?m.call(e):R(e)?A.map(e,A.identity):A.values(e):[]},A.size=function(e){return null==e?0:R(e)?e.length:A.keys(e).length},A.partition=function(e,t,n){t=E(t,n);var r=[],i=[];return A.each(e,function(e,n,a){(t(e,n,a)?r:i).push(e)}),[r,i]},A.first=A.head=A.take=function(e,t,n){if(null!=e)return null==t||n?e[0]:A.initial(e,e.length-t)},A.initial=function(e,t,n){return m.call(e,0,Math.max(0,e.length-(null==t||n?1:t)))},A.last=function(e,t,n){if(null!=e)return null==t||n?e[e.length-1]:A.rest(e,Math.max(0,e.length-t))},A.rest=A.tail=A.drop=function(e,t,n){return m.call(e,null==t||n?1:t)},A.compact=function(e){return A.filter(e,A.identity)};var D=function(e,t,n,r){for(var i=[],a=0,o=r||0,s=x(e);o<s;o++){var u=e[o];if(R(u)&&(A.isArray(u)||A.isArguments(u))){t||(u=D(u,t,n));var c=0,l=u.length;for(i.length+=l;c<l;)i[a++]=u[c++]}else n||(i[a++]=u)}return i};A.flatten=function(e,t){return D(e,t,!1)},A.without=function(e){return A.difference(e,m.call(arguments,1))},A.uniq=A.unique=function(e,t,n,r){A.isBoolean(t)||(r=n,n=t,t=!1),null!=n&&(n=E(n,r));for(var i=[],a=[],o=0,s=x(e);o<s;o++){var u=e[o],c=n?n(u,o,e):u;t?(o&&a===c||i.push(u),a=c):n?A.contains(a,c)||(a.push(c),i.push(u)):A.contains(i,u)||i.push(u)}return i},A.union=function(){return A.uniq(D(arguments,!0,!0))},A.intersection=function(e){for(var t=[],n=arguments.length,r=0,i=x(e);r<i;r++){var a=e[r];if(!A.contains(t,a)){for(var o=1;o<n&&A.contains(arguments[o],a);o++);o===n&&t.push(a)}}return t},A.difference=function(e){var t=D(arguments,!0,!0,1);return A.filter(e,function(e){return!A.contains(t,e)})},A.zip=function(){return A.unzip(arguments)},A.unzip=function(e){for(var t=e&&A.max(e,x).length||0,n=Array(t),r=0;r<t;r++)n[r]=A.pluck(e,r);return n},A.object=function(e,t){for(var n={},r=0,i=x(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},A.findIndex=a(1),A.findLastIndex=a(-1),A.sortedIndex=function(e,t,n,r){n=E(n,r,1);for(var i=n(t),a=0,o=x(e);a<o;){var s=Math.floor((a+o)/2);n(e[s])<i?a=s+1:o=s}return a},A.indexOf=o(1,A.findIndex,A.sortedIndex),A.lastIndexOf=o(-1,A.findLastIndex),A.range=function(e,t,n){null==t&&(t=e||0,e=0),n=n||1;for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),a=0;a<r;a++,e+=n)i[a]=e;return i};var M=function(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var a=N(e.prototype),o=e.apply(a,i);return A.isObject(o)?o:a};A.bind=function(e,t){if(v&&e.bind===v)return v.apply(e,m.call(arguments,1));if(!A.isFunction(e))throw new TypeError(\"Bind must be called on a function\");var n=m.call(arguments,2),r=function(){return M(e,r,t,this,n.concat(m.call(arguments)))};return r},A.partial=function(e){var t=m.call(arguments,1),n=function(){for(var r=0,i=t.length,a=Array(i),o=0;o<i;o++)a[o]=t[o]===A?arguments[r++]:t[o];for(;r<arguments.length;)a.push(arguments[r++]);return M(e,n,this,this,a)};return n},A.bindAll=function(e){var t,n,r=arguments.length;if(r<=1)throw new Error(\"bindAll must be passed function names\");for(t=1;t<r;t++)n=arguments[t],e[n]=A.bind(e[n],e);return e},A.memoize=function(e,t){var n=function(r){var i=n.cache,a=\"\"+(t?t.apply(this,arguments):r);return A.has(i,a)||(i[a]=e.apply(this,arguments)),i[a]};return n.cache={},n},A.delay=function(e,t){var n=m.call(arguments,2);return setTimeout(function(){return e.apply(null,n)},t)},A.defer=A.partial(A.delay,A,1),A.throttle=function(e,t,n){var r,i,a,o=null,s=0;n||(n={});var u=function(){s=n.leading===!1?0:A.now(),o=null,a=e.apply(r,i),o||(r=i=null)};return function(){var c=A.now();s||n.leading!==!1||(s=c);var l=t-(c-s);return r=this,i=arguments,l<=0||l>t?(o&&(clearTimeout(o),o=null),s=c,a=e.apply(r,i),o||(r=i=null)):o||n.trailing===!1||(o=setTimeout(u,l)),a}},A.debounce=function(e,t,n){var r,i,a,o,s,u=function(){var c=A.now()-o;c<t&&c>=0?r=setTimeout(u,t-c):(r=null,n||(s=e.apply(a,i),r||(a=i=null)))};return function(){a=this,i=arguments,o=A.now();var c=n&&!r;return r||(r=setTimeout(u,t)),c&&(s=e.apply(a,i),a=i=null),s}},A.wrap=function(e,t){return A.partial(t,e)},A.negate=function(e){return function(){return!e.apply(this,arguments)}},A.compose=function(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}},A.after=function(e,t){return function(){if(--e<1)return t.apply(this,arguments)}},A.before=function(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}},A.once=A.partial(A.before,2);var P=!{toString:null}.propertyIsEnumerable(\"toString\"),L=[\"valueOf\",\"isPrototypeOf\",\"toString\",\"propertyIsEnumerable\",\"hasOwnProperty\",\"toLocaleString\"];A.keys=function(e){if(!A.isObject(e))return[];if(g)return g(e);var t=[];for(var n in e)A.has(e,n)&&t.push(n);return P&&s(e,t),t},A.allKeys=function(e){if(!A.isObject(e))return[];var t=[];for(var n in e)t.push(n);return P&&s(e,t),t},A.values=function(e){for(var t=A.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r},A.mapObject=function(e,t,n){t=E(t,n);for(var r,i=A.keys(e),a=i.length,o={},s=0;s<a;s++)r=i[s],o[r]=t(e[r],r,e);return o},A.pairs=function(e){for(var t=A.keys(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r},A.invert=function(e){for(var t={},n=A.keys(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t},A.functions=A.methods=function(e){var t=[];for(var n in e)A.isFunction(e[n])&&t.push(n);return t.sort()},A.extend=C(A.allKeys),A.extendOwn=A.assign=C(A.keys),A.findKey=function(e,t,n){t=E(t,n);for(var r,i=A.keys(e),a=0,o=i.length;a<o;a++)if(r=i[a],t(e[r],r,e))return r},A.pick=function(e,t,n){var r,i,a={},o=e;if(null==o)return a;A.isFunction(t)?(i=A.allKeys(o),r=T(t,n)):(i=D(arguments,!1,!1,1),r=function(e,t,n){return t in n},o=Object(o));for(var s=0,u=i.length;s<u;s++){var c=i[s],l=o[c];r(l,c,o)&&(a[c]=l)}return a},A.omit=function(e,t,n){if(A.isFunction(t))t=A.negate(t);else{var r=A.map(D(arguments,!1,!1,1),String);t=function(e,t){return!A.contains(r,t)}}return A.pick(e,t,n)},A.defaults=C(A.allKeys,!0),A.create=function(e,t){var n=N(e);return t&&A.extendOwn(n,t),n},A.clone=function(e){return A.isObject(e)?A.isArray(e)?e.slice():A.extend({},e):e},A.tap=function(e,t){return t(e),e},A.isMatch=function(e,t){var n=A.keys(t),r=n.length;if(null==e)return!r;for(var i=Object(e),a=0;a<r;a++){var o=n[a];if(t[o]!==i[o]||!(o in i))return!1}return!0};var O=function(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return e===t;e instanceof A&&(e=e._wrapped),t instanceof A&&(t=t._wrapped);var i=h.call(e);if(i!==h.call(t))return!1;switch(i){case\"[object RegExp]\":case\"[object String]\":return\"\"+e==\"\"+t;case\"[object Number]\":return+e!=+e?+t!=+t:0==+e?1/+e==1/t:+e==+t;case\"[object Date]\":case\"[object Boolean]\":return+e==+t}var a=\"[object Array]\"===i;if(!a){if(\"object\"!=typeof e||\"object\"!=typeof t)return!1;var o=e.constructor,s=t.constructor;if(o!==s&&!(A.isFunction(o)&&o instanceof o&&A.isFunction(s)&&s instanceof s)&&\"constructor\"in e&&\"constructor\"in t)return!1}n=n||[],r=r||[];for(var u=n.length;u--;)if(n[u]===e)return r[u]===t;if(n.push(e),r.push(t),a){if((u=e.length)!==t.length)return!1;for(;u--;)if(!O(e[u],t[u],n,r))return!1}else{var c,l=A.keys(e);if(u=l.length,A.keys(t).length!==u)return!1;for(;u--;)if(c=l[u],!A.has(t,c)||!O(e[c],t[c],n,r))return!1}return n.pop(),r.pop(),!0};A.isEqual=function(e,t){return O(e,t)},A.isEmpty=function(e){return null==e||(R(e)&&(A.isArray(e)||A.isString(e)||A.isArguments(e))?0===e.length:0===A.keys(e).length)},A.isElement=function(e){return!(!e||1!==e.nodeType)},A.isArray=_||function(e){return\"[object Array]\"===h.call(e)},A.isObject=function(e){var t=typeof e;return\"function\"===t||\"object\"===t&&!!e},A.each([\"Arguments\",\"Function\",\"String\",\"Number\",\"Date\",\"RegExp\",\"Error\"],function(e){A[\"is\"+e]=function(t){return h.call(t)===\"[object \"+e+\"]\"}}),A.isArguments(arguments)||(A.isArguments=function(e){return A.has(e,\"callee\")}),\"function\"!=typeof/./&&\"object\"!=typeof Int8Array&&(A.isFunction=function(e){return\"function\"==typeof e||!1}),A.isFinite=function(e){return isFinite(e)&&!isNaN(parseFloat(e))},A.isNaN=function(e){return A.isNumber(e)&&e!==+e},A.isBoolean=function(e){return e===!0||e===!1||\"[object Boolean]\"===h.call(e)},A.isNull=function(e){return null===e},A.isUndefined=function(e){return void 0===e},A.has=function(e,t){return null!=e&&y.call(e,t)},A.noConflict=function(){return u._=c,this},A.identity=function(e){return e},A.constant=function(e){return function(){return e}},A.noop=function(){},A.property=w,A.propertyOf=function(e){return null==e?function(){}:function(t){return e[t]}},A.matcher=A.matches=function(e){return e=A.extendOwn({},e),function(t){return A.isMatch(t,e)}},A.times=function(e,t,n){var r=Array(Math.max(0,e));t=T(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r},A.random=function(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))},A.now=Date.now||function(){return(new Date).getTime()};var U={\"&\":\"&amp;\",\"<\":\"&lt;\",\">\":\"&gt;\",'\"':\"&quot;\",\"'\":\"&#x27;\",\"`\":\"&#x60;\"},F=A.invert(U),B=function(e){var t=function(t){return e[t]},n=\"(?:\"+A.keys(e).join(\"|\")+\")\",r=RegExp(n),i=RegExp(n,\"g\");return function(e){return e=null==e?\"\":\"\"+e,r.test(e)?e.replace(i,t):e}};A.escape=B(U),A.unescape=B(F),A.result=function(e,t,n){var r=null==e?void 0:e[t];return void 0===r&&(r=n),A.isFunction(r)?r.call(e):r};var K=0;A.uniqueId=function(e){var t=++K+\"\";return e?e+t:t},A.templateSettings={evaluate:/<%([\\s\\S]+?)%>/g,interpolate:/<%=([\\s\\S]+?)%>/g,escape:/<%-([\\s\\S]+?)%>/g};var V={\"'\":\"'\",\"\\\\\":\"\\\\\",\"\\r\":\"r\",\"\\n\":\"n\",\"\\u2028\":\"u2028\",\"\\u2029\":\"u2029\"},j=function(e){return\"\\\\\"+V[e]};A.template=function(e,t,n){!t&&n&&(t=n),t=A.defaults({},t,A.templateSettings);var r=RegExp([(t.escape||/(.)^/).source,(t.interpolate||/(.)^/).source,(t.evaluate||/(.)^/).source].join(\"|\")+\"|$\",\"g\"),i=0,a=\"__p+='\";e.replace(r,function(t,n,r,o,s){return a+=e.slice(i,s).replace(/\\\\|'|\\r|\\n|\\u2028|\\u2029/g,j),i=s+t.length,n?a+=\"'+\\n((__t=(\"+n+\"))==null?'':_.escape(__t))+\\n'\":r?a+=\"'+\\n((__t=(\"+r+\"))==null?'':__t)+\\n'\":o&&(a+=\"';\\n\"+o+\"\\n__p+='\"),t}),a+=\"';\\n\",t.variable||(a=\"with(obj||{}){\\n\"+a+\"}\\n\"),a=\"var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\\n\"+a+\"return __p;\\n\";try{var o=new Function(t.variable||\"obj\",\"_\",a)}catch(e){throw e.source=a,e}var s=function(e){return o.call(this,e,A)},u=t.variable||\"obj\";return s.source=\"function(\"+u+\"){\\n\"+a+\"}\",s},A.chain=function(e){var t=A(e);return t._chain=!0,t};var W=function(e,t){return e._chain?A(t).chain():t};A.mixin=function(e){A.each(A.functions(e),function(t){var n=A[t]=e[t];A.prototype[t]=function(){var e=[this._wrapped];return d.apply(e,arguments),W(this,n.apply(A,e))}})},A.mixin(A),A.each([\"pop\",\"push\",\"reverse\",\"shift\",\"sort\",\"splice\",\"unshift\"],function(e){var t=l[e];A.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),\"shift\"!==e&&\"splice\"!==e||0!==n.length||delete n[0],W(this,n)}}),A.each([\"concat\",\"join\",\"slice\"],function(e){var t=l[e];A.prototype[e]=function(){return W(this,t.apply(this._wrapped,arguments))}}),A.prototype.value=function(){return this._wrapped},A.prototype.valueOf=A.prototype.toJSON=A.prototype.value,A.prototype.toString=function(){return\"\"+this._wrapped},r=[],void 0!==(i=function(){return A}.apply(t,r))&&(e.exports=i)}).call(this)},function(e,t,n){var r,i;/**\n * @preserve date-and-time.js (c) KNOWLEDGECODE | MIT\n */\n!function(a){\"use strict\";var o={},s=\"en\",u={en:{MMMM:[\"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\"],MMM:[\"Jan\",\"Feb\",\"Mar\",\"Apr\",\"May\",\"Jun\",\"Jul\",\"Aug\",\"Sep\",\"Oct\",\"Nov\",\"Dec\"],dddd:[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"],ddd:[\"Sun\",\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\"],dd:[\"Su\",\"Mo\",\"Tu\",\"We\",\"Th\",\"Fr\",\"Sa\"],A:[\"a.m.\",\"p.m.\"],formats:{YYYY:function(e){return(\"000\"+e.getFullYear()).slice(-4)},YY:function(e){return(\"0\"+e.getFullYear()).slice(-2)},Y:function(e){return\"\"+e.getFullYear()},MMMM:function(e){return this.MMMM[e.getMonth()]},MMM:function(e){return this.MMM[e.getMonth()]},MM:function(e){return(\"0\"+(e.getMonth()+1)).slice(-2)},M:function(e){return\"\"+(e.getMonth()+1)},DD:function(e){return(\"0\"+e.getDate()).slice(-2)},D:function(e){return\"\"+e.getDate()},HH:function(e){return(\"0\"+e.getHours()).slice(-2)},H:function(e){return\"\"+e.getHours()},A:function(e){return this.A[e.getHours()>11|0]},hh:function(e){return(\"0\"+(e.getHours()%12||12)).slice(-2)},h:function(e){return\"\"+(e.getHours()%12||12)},mm:function(e){return(\"0\"+e.getMinutes()).slice(-2)},m:function(e){return\"\"+e.getMinutes()},ss:function(e){return(\"0\"+e.getSeconds()).slice(-2)},s:function(e){return\"\"+e.getSeconds()},SSS:function(e){return(\"00\"+e.getMilliseconds()).slice(-3)},SS:function(e){return(\"0\"+(e.getMilliseconds()/10|0)).slice(-2)},S:function(e){return\"\"+(e.getMilliseconds()/100|0)},dddd:function(e){return this.dddd[e.getDay()]},ddd:function(e){return this.ddd[e.getDay()]},dd:function(e){return this.dd[e.getDay()]},Z:function(e){var t=e.utc?0:e.getTimezoneOffset()/.6;return(t>0?\"-\":\"+\")+(\"000\"+Math.abs(t-t%100*.4)).slice(-4)},post:function(e){return e}},parsers:{h:function(e,t){return(12===e?0:e)+12*t},pre:function(e){return e}}}},c=function(){return\"object\"==typeof e&&\"object\"==typeof e.exports},l=function(e,t){for(var n=0,r=e.length;n<r&&0!==t(e[n],n);n++);},p=function(e,t){var n,r,i,a=0,o=t.match(/YYYY|YY|MMM?M?|DD|HH|hh|mm|ss|SSS?|./g),c={Y:0,M:1,D:1,A:0,H:0,h:0,m:0,s:0,S:0};return e=u[s].parsers.pre(e),l(o,function(t){n=t.charAt(0),r=t.length,i=e.slice(a),/^(MM|DD|HH|hh|mm|ss|SS?S?)$/.test(t)?c[n]=0|i.slice(0,r):/^(YYYY|YY|M|D|H|h|m|s)$/.test(t)?(i=(i.match(4===r?/^\\d{1,4}/:/^\\d\\d?/)||[\"\"])[0],r=i.length,c[n]=0|i,\"Y\"===n&&c.Y<70&&(c.Y+=2e3)):/^(MMMM?|A)$/.test(t)&&l(u[s][t],function(e,t){if(!i.indexOf(e))return c[n]=\"M\"===n?t+1:t,r=e.length,0}),a+=r}),c},f=function(e,t){return u[s].parsers.h(e,t)};o.format=function(e,t,n){var r=new Date(e.getTime()+(n?6e4*e.getTimezoneOffset():0)),i=u[s],a=i.formats;return r.utc=n,t.replace(/(\\[[^\\[\\]]*]|\\[.*\\][^\\[]*\\]|YYYY|YY|MMM?M?|DD|HH|hh|mm|ss|SSS?|ddd?d?|.)/g,function(e){var t=a[e];return t?a.post(t.call(i,r)):e.replace(/\\[(.*)]/,\"$1\")})},o.parse=function(e,t,n){var r=p(e,t),i=new Date(r.Y,r.M-1,r.D,r.H||f(r.h,r.A),r.m,r.s,r.S);return n?new Date(i.getTime()-6e4*i.getTimezoneOffset()):i},o.isValid=function(e,t){var n=p(e,t),r=n.H||f(n.h,n.A),i=new Date(n.Y,n.M-1,n.D,r,n.m,n.s,n.S);return n.Y===i.getFullYear()&&n.M-1===i.getMonth()&&n.D===i.getDate()&&r===i.getHours()&&n.m===i.getMinutes()&&n.s===i.getSeconds()&&n.S===i.getMilliseconds()},o.addYears=function(e,t){var n=new Date(e.getTime());return n.setFullYear(n.getFullYear()+t),n},o.addMonths=function(e,t){var n=new Date(e.getTime());return n.setMonth(n.getMonth()+t),n},o.addDays=function(e,t){return new Date(e.getTime()+864e5*t)},o.addHours=function(e,t){return new Date(e.getTime()+36e5*t)},o.addMinutes=function(e,t){return new Date(e.getTime()+6e4*t)},o.addSeconds=function(e,t){return new Date(e.getTime()+1e3*t)},o.addMilliseconds=function(e,t){return new Date(e.getTime()+t)},o.subtract=function(e,t){var n=e.getTime()-t.getTime();return{toMilliseconds:function(){return n},toSeconds:function(){return n/1e3|0},toMinutes:function(){return n/6e4|0},toHours:function(){return n/36e5|0},toDays:function(){return n/864e5|0}}},o.isLeapYear=function(e){var t=e.getFullYear();return!((t%4||!(t%100))&&t%400)},o.locale=function(e){return e&&(\"en\"!==e&&c()&&n(178)(\"./\"+e),s=e),s},o.getLocales=function(e){return u[e||s]},o.setLocales=function(e,t){var n=function(e,t){var n,r,i=function(){};i.prototype=t,n=new i;for(r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);return n},r=u[e]||u.en,i=n(t,r);t.formats&&(i.formats=n(t.formats,r.formats)),t.parsers&&(i.parsers=n(t.parsers,r.parsers)),u[e]=i},c()?e.exports=o:(r=[],void 0!==(i=function(){return o}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){\"use strict\";var r=n(0);e.exports=r.universesInfo},function(e,t,n){\"use strict\";function r(e,t){var n=e.name();if(A.LowLevelProxyNode.isInstance(t.lowLevel())){if(A.LowLevelProxyNode.isInstance(e.lowLevel()))return n;var r=t.root().lowLevel().unit(),i=r.project().namespaceResolver(),a=e.lowLevel().unit(),o=i.resolveNamespace(r,a);if(null!=o){var s=o.namespace();if(null!=s)return s+\".\"+n}}if(e.lowLevel().unit()!=t.lowLevel().unit())for(var u=t;;){if(u.lowLevel().includePath()||null==u.parent()){u.unitMap||(u.unitMap={},u.asElement().elements().forEach(function(e){if(e.definition().key()==R.Universe10.UsesDeclaration){var t=e.attr(\"value\");if(t){var n=e.root().lowLevel().unit().resolve(t.value());if(null!=n){var r=e.attr(\"key\");r&&(u.unitMap[n.absolutePath()]=r.value())}}}}));var c=u.unitMap[e.lowLevel().unit().absolutePath()];if(c)return c+\".\"+n}if(!u.parent())break;u=u.parent()}return n}function i(e){var t=e;return t&&t.valueName&&t.toHighLevel&&t.toHighLevel2}function a(e){var t=e;return t&&t.isString&&t.isFromKey&&t.isEmbedded}function o(e){var t=P.newMap([P.newMapping(P.newScalar(\"example\"),e.lowLevel().actual())]),n=P.newMapping(P.newScalar(\"types\"),P.newMap([P.newMapping(P.newScalar(\"__AUX_TYPE__\"),t)])),r=P.newMap([n]),i=new I.ASTNode(r,e.lowLevel().unit(),null,null,null),a=K.parseFromAST(new J(i,e));return K.toNominal(a.types()[0],function(e){return null})}function s(e){return e.match(/^\\s*#%RAML\\s+(\\d\\.\\d)\\s*(\\w*)\\s*$/m)}function u(e){var t=e.lowLevel()&&e.lowLevel().unit()&&e.lowLevel().unit().contents();return null==t?null:$(t,e.lowLevel()).ptype}function c(e){if(null==e)return null;var t=e.contents(),n=e.ast(),r=$(t,n),i=r.ptype,a=r.localUniverse,o=a.type(i);o||(o=a.type(\"Api\"));var s=new X(n,null,o,null);s.setUniverse(a);var u=o&&o.universe();return u&&\"RAML10\"==u.version()?o.isAssignableFrom(T.universesInfo.Universe10.LibraryBase.name)||s.children():s.children(),s}function l(e,t){if(t){return t.root().lowLevel().unit()?new j.PointOfViewValidationAcceptorImpl(e,t.root()):{accept:function(t){e.push(t)},begin:function(){},end:function(){},acceptUnique:function(t){for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i.start==t.start&&i.message==t.message)return}this.accept(t)}}}}function p(e){if(null!=e.parent())return!1;var t=e.lowLevel().unit();if(null==t)return!1;var n=t.contents(),r=s(n);return!(r.length<3)&&\"AnnotationTypeDeclaration\"==r[2]}function f(e,t,n){var r=e.validationIssue;if(!r){var i=e.issueCode||t,a=e.node||n,o=e.message||\"The \"+t+\" plugin reports an error\",s=e.isWarning;r=w.createIssue(i,o,a,s)}return r}function d(e){for(var t=[],n=b.getNodeValidationPlugins(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.process(e);o&&o.forEach(function(n){var r=f(n,a.id(),e);t.push(r)})}return t}function m(e){for(var t=new Q(e),n=[],r=b.getNodeAnnotationValidationPlugins(),i=0,a=r;i<a.length;i++){var o=a[i],s=o.process(t);s&&s.forEach(function(t){var r=f(t,o.id(),e);n.push(r)})}return n}function h(e,t){return y(e.map(function(e){return _(e,t)}))}function y(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i<r.length;i++)t.push(n[r[i]]);return t}function _(e,t){var n=e.node&&e.node.lowLevel()&&e.node.lowLevel().unit().lineMapper()||t.lowLevel().unit().lineMapper(),r=null;try{r=n.position(e.start)}catch(e){console.warn(e)}var i=null;try{i=n.position(e.end)}catch(e){console.warn(e)}var a;a=e.path?e.path:e.node?e.node.lowLevel().unit().path():C.declRoot(t).lowLevel().unit().path();var o={code:e.code,message:e.message,path:a,range:{start:r,end:i},isWarning:e.isWarning};return e.extras&&e.extras.length>0&&(o.trace=e.extras.map(function(e){return _(e,t)})),o}var g=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},v=n(0),b=n(24),S=n(1),A=n(17),T=v,E=n(46),C=n(21),N=n(314),w=n(35),k=n(25),x=n(316),R=n(3),I=n(9),D=n(64),M=T,P=n(14),L=n(89),O=n(140),U=n(139),F=n(5),B=n(28),K=v.rt,V=n(63),j=n(146);t.qName=r;var W=function(){function e(e,t){this._node=e,this._parent=t,this._implicit=!1,this.values={},e&&e.setHighLevelParseResult(this)}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&S.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.getKind=function(){return b.NodeKind.BASIC},e.prototype.asAttr=function(){return null},e.prototype.asElement=function(){return null},e.prototype.hashkey=function(){return this._hashkey||(this._hashkey=this.parent()?this.parent().hashkey()+\"/\"+this.name():this.name()),this._hashkey},e.prototype.root=function(){return this.parent()?this.parent().root():this},e.prototype.version=function(){return\"\"},e.prototype.getLowLevelStart=function(){return this.lowLevel().kind()===I.Kind.SCALAR?this.lowLevel().start():this.lowLevel().keyStart()},e.prototype.getLowLevelEnd=function(){return this.lowLevel().kind()===I.Kind.SCALAR?this.lowLevel().end():this.lowLevel().keyEnd()},e.prototype.isSameNode=function(e){return!(!e||e.lowLevel().actual()!=this.lowLevel().actual())},e.prototype.checkContextValue=function(e,t,n){var r=this.computedValue(e);return!(!r||r.indexOf(t)==-1)||(t==r||\"false\"==t)},e.prototype.printDetails=function(e){return(e?e:\"\")+\"Unkown\\n\"},e.prototype.testSerialize=function(e){return(e?e:\"\")+\"Unkown\\n\"},e.prototype.errors=function(){var e=[],t=l(e,this);return this.validate(t),e},e.prototype.markCh=function(){for(var e=this.lowLevel();A.LowLevelProxyNode.isInstance(e);)e=e.originalNode();if(e=e._node?e._node:e,e.markCh)return!0;e.markCh=1},e.prototype.unmarkCh=function(){for(var e=this.lowLevel();A.LowLevelProxyNode.isInstance(e);)e=e.originalNode();e=e._node?e._node:e,delete e.markCh},e.prototype.validate=function(e){w.validate(this,e);for(var t=0,n=d(this);t<n.length;t++){var r=n[t];e.accept(r)}for(var i=0,a=m(this);i<a.length;i++){var r=a[i];e.accept(r)}},e.prototype.allowRecursive=function(){return!1},e.prototype.setComputed=function(e,t){this.values[e]=t},e.prototype.computedValue=function(e){var t=this.values[e];return!t&&this.parent()?this.parent().computedValue(e):t},e.prototype.lowLevel=function(){return this._node},e.prototype.name=function(){var e=this.lowLevel().key();return e?e:\"\"},e.prototype.optional=function(){var e=this.lowLevel(),t=e.optional();if(null!=e.key())return t;var n=this.property();if(!n||!n.isMultiValue())return t;for(var r=e.parent();r&&null==r.highLevelNode();){if(r.kind()==P.Kind.MAPPING)return r.optional();r=r.parent()}return t},e.prototype.parent=function(){return this._parent},e.prototype.setParent=function(e){this._parent=e},e.prototype.isElement=function(){return!1},e.prototype.directChildren=function(){return this.children()},e.prototype.children=function(){return[]},e.prototype.isAttached=function(){return null!=this.parent()},e.prototype.isImplicit=function(){return this._implicit},e.prototype.isAttr=function(){return!1},e.prototype.isUnknown=function(){return!0},e.prototype.id=function(){var e=this;if(this.cachedId)return this.cachedId;if(this._parent){var t=this.parent().id();t+=\".\"+this.name();var n=this.parent().directChildren().filter(function(t){return t.name()==e.name()});if(n.length>1){t+=\"[\"+n.indexOf(this)+\"]\"}return this.cachedId=t,t}return this.cachedId=\"\",this.cachedId},e.prototype.localId=function(){return this.name()},e.prototype.resetIDs=function(){this.cachedId=null,this.cachedFullId=null},e.prototype.fullLocalId=function(){var e=this;if(this.cachedFullId)return this.cachedFullId;if(this._parent){var t=\".\";t+=null!=this.property()&&F.isAnnotationsProperty(this.property())?this.lowLevel().key():this.name();var n=this.parent().directChildren().filter(function(t){return t.name()==e.name()});if(n.length>1){t+=\"[\"+n.indexOf(this)+\"]\"}return this.cachedFullId=t,t}return this.cachedFullId=this.localId(),this.cachedFullId},e.prototype.property=function(){return null},e.prototype.reuseMode=function(){return this._reuseMode},e.prototype.setReuseMode=function(e){this._reuseMode=e},e.prototype.isReused=function(){return this._isReused},e.prototype.setReused=function(e){this._isReused=e,this.children().forEach(function(t){return t.setReused(e)})},e.prototype.setJSON=function(e){this._jsonCache=e},e.prototype.getJSON=function(){return this._jsonCache},e.CLASS_IDENTIFIER=\"highLevelImpl.BasicASTNode\",e}();t.BasicASTNode=W;var q=function(){function e(e,t,n,r){void 0===r&&(r=null),this.node=e,this._parent=t,this.kv=r,this._pr=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&S.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.valueName=function(){var e=null;return this.kv&&(e=this.kv),e=this.node.key(),this._pr&&this._pr.isAnnotation()&&e&&\"(\"==e.charAt(0)&&(e=e.substring(1,e.length-1)),e},e.prototype.children=function(){return this.node.children().map(function(t){return new e(t,null,null)})},e.prototype.lowLevel=function(){return this.node},e.prototype.toHighLevel=function(e){if(!e&&this._parent&&(e=this._parent),this._hl)return this._hl;var t=this.valueName(),n=C.referenceTargets(this._pr,e).filter(function(n){return r(n,e)==t});if(n&&n[0]){var i=n[0].localType(),a=new X(this.node,e,i,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),this._hl=a,a}return null},e.prototype.toHighLevel2=function(e){!e&&this._parent&&(e=this._parent);var t=this.valueName(),n=C.referenceTargets(this._pr,e).filter(function(n){return r(n,e)==t});if(n&&n[0]){var i=n[0].localType(),a=new X(this.node,e,i,this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}if(this._pr.range()){var a=new X(this.node.parent(),e,this._pr.range(),this._pr);return this._pr&&this._pr.childRestrictions().forEach(function(e){a.setComputed(e.name,e.value)}),a}return null},e.prototype.resetHighLevelNode=function(){this._hl=null},e.CLASS_IDENTIFIER=\"highLevelImpl.StructuredValue\",e}();t.StructuredValue=q,t.isStructuredValue=i;var z=function(e){function t(t,n,r,i,a){void 0===a&&(a=!1),e.call(this,t,n),this._def=r,this._prop=i,this.fromKey=a}return g(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&S.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_ASTPropImpl)},t.prototype.definition=function(){return this._def},t.prototype.asAttr=function(){return this},t.prototype.errors=function(){var e=[],t=l(e,this);return this.parent().validate(t),e},t.prototype.isString=function(){return!(!this._def||this._def.key()!==R.Universe08.StringType&&this._def.key()!=R.Universe10.StringType)},t.prototype.isAnnotatedScalar=function(){return!this.property().isAnnotation()&&!this.property().isKey()&&this.lowLevel().isAnnotatedScalar()},t.prototype.annotations=function(){var e=this.lowLevel().children(),n=[],r=this.definition().universe().type(R.Universe10.Annotable.name);if(!r)return n;for(var i=r.property(\"annotations\"),a=0;a<e.length;a++){var o=e[a],s=o.key();if(null!=s&&\"(\"==s[0]&&\")\"==s[s.length-1]){var u=new t(o,this.parent(),i.range(),i);n.push(u)}}return n},t.prototype.getKind=function(){return b.NodeKind.ATTRIBUTE},t.prototype.owningWrapper=function(){return{node:this.parent().wrapperNode(),property:this.name()}},t.prototype.patchType=function(e){this._def=e},t.prototype.findReferenceDeclaration=function(){var e=this,t=C.referenceTargets(this.property(),this.parent()),n=this.value();if(q.isInstance(n))var i=n,a=i.valueName();else var a=\"\"+n;return S.find(t,function(t){return r(t,e.parent())==a})},t.prototype.findReferencedValue=function(){var e=this.findReferenceDeclaration();if(e){var t=e.attr(\"value\");if(e.definition().key()===R.Universe08.GlobalSchema){if(t){var n=t.value();if(n){return w.isValid(this._def,this.parent(),n,t.property(),t)}}return null}}return e},t.prototype.isElement=function(){return!1},t.prototype.property=function(){return this._prop},t.prototype.convertMultivalueToString=function(e){for(var t=0,n=2;\" \"==e[n];)t++,n++;var r=D.splitOnLines(e);return r=r.map(function(e){return e.substring(t,e.length)}),r.join(\"\")},t.prototype.overrideValue=function(e){this._value=e},t.prototype.value=function(){return this._value?this._value:(this._value=this.calcValue(),this._value)},t.prototype.calcValue=function(){if(this._computed)return this.computedValue(this.property().nameId());if(this.fromKey){var e=this.parent(),t=e.definition();if(\"RAML08\"==t.universe().version())return this._node.key();if(F.isNameProperty(this.property())&&t.isAssignableFrom(R.Universe10.TypeDeclaration.name)){var n=e.attr(\"required\");if(n&&null!=n.value())return this._node.optional()?this._node.key()+\"?\":this._node.key()}return this._node.key()}if(this.property().isAnnotation()&&this._node.key()&&\"annotations\"!=this._node.key())return new q(this._node,this.parent(),this._prop);var r=null!=this.property()&&!(null==this.parent()||null==this.parent().definition()||F.isTypeProperty(this.property())&&F.isTypeDeclarationSibling(this.parent().definition()))&&F.isStringTypeType(this.property().range()),i=this._node.value(r);if(this.property().isSelfNode()&&(i&&!I.ASTNode.isInstance(i)||(i=this._node,0==i.children().length&&(i=null))),I.ASTNode.isInstance(i)||A.LowLevelProxyNode.isInstance(i)){var a=!1;if(this.property().range().hasStructure()||this._node.isAnnotatedScalar()&&this._node.children().forEach(function(e){\"value\"===e.key()&&(i=e.value(r),a=!0)}),!a)return this._sval?this._sval:(this._sval=new q(i,this.parent(),this._prop),this._sval)}if(\"string\"==typeof i&&D.isMultiLineValue(i)){return this.convertMultivalueToString(i)}return null==i&&this._node.children().length>0&&this.property()&&(F.isTypeProperty(this.property())||F.isItemsProperty(this.property()))&&this.parent()&&F.isTypeDeclarationSibling(this.parent().definition())?new q(this._node,this.parent(),this._prop):i},t.prototype.name=function(){return this._prop.nameId()},t.prototype.printDetails=function(e){var t=this.definition().nameId(),n=this.property().range().nameId(),r=(e?e:\"\")+(this.name()+\" : \")+t+\"[\"+n+\"]  =  \"+this.value()+(this.property().isKey()&&this.optional()?\"?\":\"\")+\"\\n\";if(q.isInstance(this.value())){var i=this.value().toHighLevel();i&&i.printDetails&&(r+=i.printDetails(e+\"\\t\"))}return r},t.prototype.testSerialize=function(e){var t=this.definition().nameId(),n=(e?e:\"\")+(this.name()+\" : \")+t+\"  =  \"+this.value()+\"\\n\";if(q.isInstance(this.value())){var r=this.value().toHighLevel();if(r&&r.testSerialize)n+=r.testSerialize((e?e:\"\")+\"  \");else{var i=this.value().lowLevel(),a=i.dumpToObject(),o=JSON.stringify(a),s=\"\";o.split(\"\\n\").forEach(function(t){return s+=(e?e:\"\")+\"  \"+t+\"\\n\"}),n+=s+\"\\n\"}}return n},t.prototype.isAttr=function(){return!0},t.prototype.isUnknown=function(){return!1},t.prototype.setValue=function(e){N.setValue(this,e),this._value=null},t.prototype.setKey=function(e){N.setKey(this,e),this._value=null},t.prototype.children=function(){return[]},t.prototype.addStringValue=function(e){N.addStringValue(this,e),this._value=null},t.prototype.addStructuredValue=function(e){N.addStructuredValue(this,e),this._value=null},t.prototype.addValue=function(e){if(!this.property().isMultiValue())throw new Error(\"setValue(string) only apply to multi-values properties\");\"string\"==typeof e?this.addStringValue(e):this.addStructuredValue(e),this._value=null},t.prototype.isEmbedded=function(){var e=this.lowLevel().asMapping().key.value;return this.property().canBeValue()&&e!=this.property().nameId()},t.prototype.remove=function(){N.removeAttr(this)},t.prototype.setValues=function(e){N.setValues(this,e),this._value=null},t.prototype.isEmpty=function(){if(!this.property().isMultiValue())throw new Error(\"isEmpty() only apply to multi-values attributes\");var e=this.parent(),t=(e.lowLevel(),e.attributes(this.name()));if(0==t.length)return!0;if(1==t.length){var n=t[0].lowLevel();return!(!n.isMapping()||null!=n.value())}return!1},t.prototype.isFromKey=function(){return this.fromKey},t.CLASS_IDENTIFIER_ASTPropImpl=\"highLevelImpl.ASTPropImpl\",t}(W);t.ASTPropImpl=z,t.isASTPropImpl=a;var H=new E.BasicNodeBuilder;!function(e){e[e.MERGE=0]=\"MERGE\",e[e.AGGREGATE=1]=\"AGGREGATE\"}(t.OverlayMergeMode||(t.OverlayMergeMode={}));var Y=t.OverlayMergeMode,J=function(e){function t(n,r){if(e.call(this),this._node=n,this._highLevelRoot=r,r.root().getMaster()&&this._node===r.lowLevel()){var i=r.getMasterCounterPart();i&&(this._toMerge=new t(i.lowLevel(),i))}}return g(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&S.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem)},t.prototype.contentProvider=function(){var e=this._node&&this._node.includeBaseUnit()&&(this._node.includePath&&this._node.includePath()?this._node.includeBaseUnit().resolve(this._node.includePath()):this._node.includeBaseUnit());return new V.ContentProvider(e)},t.prototype.key=function(){var e=this._node.key();return this._node.optional()&&(e+=\"?\"),e},t.prototype.value=function(){var e=this._node.valueKind();if(e===P.Kind.SEQ)return this.children().map(function(e){return e.value()});if(e===P.Kind.MAP||e===P.Kind.ANCHOR_REF){var n=this._node.dumpToObject(!1);return n[this.key()]}if(this._node.kind()==P.Kind.MAP){var n=this._node.dumpToObject(!1);return n}if(e===P.Kind.INCLUDE_REF){var r=null,i=this._node.includePath();try{r=this._node.unit().resolve(i)}catch(e){}if(null!=r&&r.isRAMLUnit()){var a=r.ast(),o=new t(a,r.highLevel().asElement());return a.kind()==P.Kind.SEQ?o.children().map(function(e){return e.value()}):o.value()}}return this._node.value()},t.prototype.children=function(){var e=this;if(this._children)return this._children;\"uses\"!=this.key()||this._node.parent().parent()?this._children=this._node.children().map(function(n){return new t(n,e._highLevelRoot)}):this._children=this._node.children().map(function(t){return new G(t,e._highLevelRoot)}),this.childByKey={};for(var n=0;n<this._children.length;n++){var r=this._children[n];this.childByKey[r.key()]=r}if(this._toMerge)for(var i=this._toMerge.children(),n=0;n<i.length;n++){var r=i[n],a=this.childByKey[r.key()];a?a._toMerge=r:(this._children.push(r),this.childByKey[r.key()]=r)}return this._children},t.prototype.childWithKey=function(e){return this._children||this.children(),this.childByKey[e]},t.prototype.kind=function(){var e=this._node.valueKind();return e==P.Kind.MAPPING||null===e?K.NodeKind.MAP:e==P.Kind.MAP?K.NodeKind.MAP:this._node.kind()==P.Kind.MAP?K.NodeKind.MAP:e==P.Kind.SEQ?K.NodeKind.ARRAY:e==P.Kind.INCLUDE_REF&&this._node.children().length>0?K.NodeKind.MAP:K.NodeKind.SCALAR},t.prototype.getSource=function(){if(!this._node)return null;var e=this._node.highLevelNode();if(!e){var t=this._node.start(),n=C.deepFindNode(this._highLevelRoot,t,t,!0,!1);return n&&(this._node.setHighLevelParseResult(n),X.isInstance(n)&&this._node.setHighLevelNode(n)),n}return e},t.prototype.node=function(){return this._node},t.CLASS_IDENTIFIER_LowLevelWrapperForTypeSystem=\"highLevelImpl.LowLevelWrapperForTypeSystem\",t}(v.SourceProvider);t.LowLevelWrapperForTypeSystem=J;var G=function(e){function t(){e.apply(this,arguments)}return g(t,e),t.prototype.children=function(){var e=this._node.unit().resolve(this.value());return e&&e.isRAMLUnit()&&e.contents().trim().length>0?new J(e.ast(),this._highLevelRoot).children():[]},t.prototype.anchor=function(){return this._node.actual()},t.prototype.childWithKey=function(e){for(var t=this.children(),n=0;n<t.length;n++)if(t[n].key()==e)return t[n];return null},t}(J);t.UsesNodeWrapperFoTypeSystem=G,t.auxiliaryTypeForExample=o;var X=function(e){function t(t,n,r,i){e.call(this,t,n),this._def=r,this._prop=i,this._expanded=!1,this._allowQuestion=!1,this._subTypesCache=null,this._auxChecked=!1,this.overlayMergeMode=Y.MERGE,t&&t.setHighLevelNode(this),A.LowLevelProxyNode.isInstance(t)&&(this._expanded=!0)}return g(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&S.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ASTNodeImpl)},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_ASTNodeImpl)},t.prototype.createIssue=function(e){return w.toIssue(e,this)},t.prototype.validate=function(t){var n=this.definition().key();if((n==R.Universe10.Api||n==R.Universe08.Api||n==R.Universe10.Extension)&&!this.isExpanded()){var r=k.expandTraitsAndResourceTypes(this.wrapperNode()),i=r.highLevel();return i.resetChildren(),i.children(),i._expanded=!0,i.clearTypesCache(),void i.validate(t)}n!=R.Universe10.Overlay&&n!=R.Universe10.Extension||this.clearTypesCache(),e.prototype.validate.call(this,t)},t.prototype.clearTypesCache=function(){if(this._types=null,this.lowLevel()){this.lowLevel().actual().types=null}},t.prototype.types=function(){var e=this;if(!this._types){if(this.parent()&&this.definition().key()!==R.Universe10.Library)return this.parent().types();var t=this.lowLevel().actual();if(t.types)return t.types;this._types=K.parseFromAST(new J(this.lowLevel(),this)),this._types.types().forEach(function(t){x.convertType(e,t).putExtra(v.USER_DEFINED_EXTRA,!0)}),t.types=this._types}return this._types},t.prototype.setTypes=function(e){this._types=e},t.prototype.parsedType=function(){if(!this._ptype){if(this.property()&&this.property().nameId()==R.Universe10.MethodBase.properties.body.name){var e=this.isParametrizedType();this._ptype=K.parseTypeFromAST(this.name(),new J(this.lowLevel(),this),this.types(),!0,!1,!1,e)}else{var t=this.property()&&this.property().nameId()==R.Universe10.LibraryBase.properties.annotationTypes.name,n=!this.property()||this.property().nameId()==R.Universe10.LibraryBase.properties.types.name||this.property().nameId()==R.Universe10.LibraryBase.properties.schemas.name;if(!t&&null==this.parent()){var r=this.universe();r&&r.getOriginalTopLevelText()&&\"AnnotationTypeDeclaration\"==r.getOriginalTopLevelText()&&(t=!0)}this._ptype=K.parseTypeFromAST(this.name(),new J(this.lowLevel(),this),this.types(),!1,t,n)}this.property()&&F.isTypesProperty(this.property())&&this.parent()&&F.isApiType(this.parent().definition())&&this._ptype.putExtra&&this._ptype.putExtra(v.DEFINED_IN_TYPES_EXTRA,!0);this._ptype.putExtra(v.USER_DEFINED_EXTRA,!0),this._ptype.putExtra(v.SOURCE_EXTRA,this)}return this._ptype},t.prototype.isParametrizedType=function(){var e=!1,t=this.attr(R.Universe10.TypeDeclaration.properties.type.name);if(t){var n=t.value();if(\"string\"==typeof n&&n.indexOf(\"<<\")>=0)for(var r=this.parent();null!=r;){if(F.isResourceTypeType(r.definition())||F.isTraitType(r.definition())){e=!0;break}r=r.parent()}}return e},t.prototype.localType=function(){return x.typeFromNode(this)},t.prototype.patchProp=function(e){this._prop=e},t.prototype.getKind=function(){return b.NodeKind.NODE},t.prototype.wrapperNode=function(){if(!this._wrapperNode){if(F.isExampleSpecType(this.definition())){var e=o(this);return L.examplesFromNominal(e,this,!0,!1)[0]}var t=this.definition()&&this.definition().universe();t&&\"RAML10\"==t.version()?this.definition()&&this.definition().isAssignableFrom(T.universesInfo.Universe10.LibraryBase.name)||this.children():this.children(),this._wrapperNode=this.buildWrapperNode()}return this._wrapperNode},t.prototype.asElement=function(){return this},t.prototype.buildWrapperNode=function(){var e=this.definition().universe().version();return\"RAML10\"==e?O.buildWrapperNode(this):\"RAML08\"==e?U.buildWrapperNode(this):null},t.prototype.propertiesAllowedToUse=function(){var e=this;return this.definition().allProperties().filter(function(t){return e.isAllowedToUse(t)})},t.prototype.isAllowedToUse=function(e){var t=this,n=!0;return!e.getAdapter(M.RAMLPropertyService).isSystem()&&(e.getContextRequirements().forEach(function(e){if(e.name.indexOf(\"(\")!=-1)return!0;var r=t.computedValue(e.name);r?n=n&&r==e.value:e.value&&(n=!1)}),n)},t.prototype.allowRecursive=function(){return!!this.definition().getAdapter(M.RAMLService).isUserDefined()},t.prototype.setWrapperNode=function(e){this._wrapperNode=e},t.prototype.setAssociatedType=function(e){this._associatedDef=e},t.prototype.associatedType=function(){return this._associatedDef},t.prototype.knownIds=function(){return this.isAuxilary(),this._knownIds?this._knownIds:{}},t.prototype.findById=function(e){var t=this,n=this.root();if(n!=this)return n.findById(e);if(!this._knownIds){this._knownIds={};var r=C.allChildren(this);r.forEach(function(e){return t._knownIds[e.id()]=e})}if(this.isAuxilary()){if(!this._slaveIds){this._slaveIds={};var r=C.allChildren(this);r.forEach(function(e){return t._slaveIds[e.id()]=e})}var i=this._slaveIds[e];if(i)return i}return this._knownIds[e]},t.prototype.isAuxilary=function(){if(this._isAux)return!0;if(this._auxChecked)return!1;this._auxChecked=!0;var e=this.getMaster();return!!e&&(this._isAux=!0,this.initilizeKnownIDs(e),!0)},t.prototype.initilizeKnownIDs=function(e){var t=this;this._knownIds={},C.allChildren(e).forEach(function(e){return t._knownIds[e.id()]=e}),this._knownIds[\"\"]=e},t.prototype.getMaster=function(){if(this.masterApi)return this.masterApi;var e=this.calculateMasterByRef();return e&&e.setSlave(this),e},t.prototype.overrideMaster=function(e){this.masterApi=e,this.resetAuxilaryState(),e&&e.setSlave(this)},t.prototype.setSlave=function(e){this.slave=e},t.prototype.setMergeMode=function(e){this.overlayMergeMode=e,this.resetAuxilaryState()},t.prototype.getMergeMode=function(){return this.overlayMergeMode},t.prototype.calculateMasterByRef=function(){var e=this.lowLevel().unit();if(!e)return null;var t=e.getMasterReferenceNode();if(!t||!t.value())return null;var n=this.lowLevel();if(n.master)return n.master;var r=t.value(),i=this.lowLevel().unit().project().resolve(this.lowLevel().unit().path(),r);if(!i)return null;var a=i.expandedHighLevel();return a.setMergeMode(this.overlayMergeMode),n.master=a,a},t.prototype.resetAuxilaryState=function(){this._isAux=!1,this._auxChecked=!1,this._knownIds=null,this.clearChildrenCache()},t.prototype.printDetails=function(e){var t=\"\";return e||(e=\"\"),t+=e+this.definition().nameId()+\"[\"+(this.property()?this.property().range().nameId():\"\")+\"] <--- \"+(this.property()?this.property().nameId():\"\")+\"\\n\",this.children().forEach(function(n){t+=n.printDetails(e+\"\\t\")}),t},t.prototype.testSerialize=function(e){var t=\"\";return e||(e=\"\"),t+=e+this.definition().nameId()+\" <-- \"+(this.property()?this.property().nameId():\"\")+\"\\n\",this.children().forEach(function(n){n.testSerialize&&(t+=n.testSerialize(e+\"  \"))}),t},t.prototype.getExtractedChildren=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){var t=e._knownIds[this.id()];if(t){return t.children()}}return[]}return[]},t.prototype.getMasterCounterPart=function(){var e=this.root();if(e.isAuxilary()){if(e._knownIds){return e._knownIds[this.id()]}return null}return null},t.prototype.getExtractedLowLevelChildren=function(e){var t=this.root();if(t.isAuxilary()){if(t._knownLowLevelIds){var n=t._knownLowLevelIds[this.id()];if(n)return n.children()}return[]}return[]},t.prototype.allowsQuestion=function(){return this._allowQuestion||this.definition().getAdapter(M.RAMLService).getAllowQuestion()},t.prototype.findReferences=function(){var e=this,t=[];C.refFinder(this.root(),this,t),t.length>1&&(t=t.filter(function(t){return t!=e&&t.parent()!=e}));var n=[];return t.forEach(function(e){S.find(n,function(t){return t==e})||n.push(e)}),n},t.prototype.setNamePatch=function(e){this._patchedName=e},t.prototype.isNamePatch=function(){return this._patchedName},t.prototype.name=function(){if(this._patchedName)return this._patchedName;var t=S.find(this.directChildren(),function(e){return e.property()&&e.property().getAdapter(M.RAMLPropertyService).isKey()});if(t&&z.isInstance(t)){var n=null,r=this.definition(),i=r.universe().version();if(r&&\"RAML10\"==i&&t.isFromKey()){var a=this._node.key();n=this._node.optional()?a+\"?\":a}else n=t.value();return n}return e.prototype.name.call(this)},t.prototype.findElementAtOffset=function(e){return this._findNode(this,e,e)},t.prototype.isElement=function(){return!0},t.prototype.universe=function(){return this._universe?this._universe:this.definition().universe()},t.prototype.setUniverse=function(e){this._universe=e},t.prototype._findNode=function(e,t,n){var r=this;if(null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){var i=e;return e.elements().forEach(function(a){if(a.lowLevel().unit()==e.lowLevel().unit()){var o=r._findNode(a,t,n);o&&(i=o)}}),i}return null},t.prototype.isStub=function(){return!this.lowLevel().unit()||this.lowLevel().unit().isStubUnit()},t.prototype.add=function(e){N.addToNode(this,e)},t.prototype.remove=function(e){N.removeNodeFrom(this,e)},t.prototype.dump=function(e){return this._node.dump()},t.prototype.patchType=function(e){this._def=e;this._associatedDef;this._associatedDef=null,this._children=null,this._mergedChildren=null},t.prototype.children=function(){var e=this.lowLevel();return e&&e.isValueInclude&&e.isValueInclude()&&B.isWaitingFor(e.includePath())?(this._children=null,[]):this._children?this._mergedChildren?this._mergedChildren:(this._mergedChildren=this.mergeChildren(this._children,this.getExtractedChildren()),this._mergedChildren):this._node?(this._children=H.process(this,this._node.children()),this._children=this._children.filter(function(e){return null!=e}),this.mergeChildren(this._children,this.getExtractedChildren())):[]},t.prototype.mergeChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==Y.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==Y.MERGE){var i=[];return e.forEach(function(e){var r=S.find(t,function(t){return t.fullLocalId()==e.fullLocalId()});r?n.mergeChild(i,e,r):i.push(e)}),t.forEach(function(t){S.find(e,function(e){return t.fullLocalId()==e.fullLocalId()})||i.push(t)}),i}return null},t.prototype.mergeLowLevelChildren=function(e,t){var n=this,r=this.root();if(r.overlayMergeMode==Y.AGGREGATE)return e.concat(t);if(r.overlayMergeMode==Y.MERGE){var i=[];return e.forEach(function(e){var r=S.find(t,function(t){return t.key()==e.key()});r?n.mergeLowLevelChild(i,e,r):i.push(e)}),t.forEach(function(t){S.find(e,function(e){return t.key()==e.key()})||i.push(t)}),i}return null},t.prototype.mergeLowLevelChild=function(e,t,n){if(t.kind()!=n.kind())return e.push(t),void e.push(n);e.push(t)},t.prototype.mergeChild=function(e,t,n){return t.getKind()!=n.getKind()?(e.push(t),void e.push(n)):t.getKind()==b.NodeKind.NODE?void e.push(t):t.getKind()==b.NodeKind.ATTRIBUTE?void e.push(t):t.getKind()==b.NodeKind.BASIC?(e.push(t),void e.push(n)):void 0},t.prototype.directChildren=function(){return this._children?this._children:this._node?(this._children=H.process(this,this._node.children()),this._mergedChildren=null,this._children):[]},t.prototype.resetChildren=function(){this._children=null,this._mergedChildren=null},t.prototype.isEmptyRamlFile=function(){return this.lowLevel().root().isScalar()},t.prototype.initRamlFile=function(){N.initEmptyRAMLFile(this)},t.prototype.createAttr=function(e,t){N.createAttr(this,e,t)},t.prototype.isAttr=function(){return!1},t.prototype.isUnknown=function(){return!1},t.prototype.value=function(){return this._node.value()},t.prototype.valuesOf=function(e){var t=this._def.property(e);return null!=t?this.elements().filter(function(e){return e.property()==t}):[]},t.prototype.attr=function(e){return S.find(this.attrs(),function(t){return t.name()==e})},t.prototype.attrOrCreate=function(e){return this.attr(e)||this.createAttr(e,\"\"),this.attr(e)},t.prototype.attrValue=function(e){var t=this.attr(e);return t?t.value():null},t.prototype.attributes=function(e){return S.filter(this.attrs(),function(t){return t.name()==e})},t.prototype.attrs=function(){var e=this.children().filter(function(e){return e.isAttr()});if(this._patchedName){var t=S.find(this.definition().allProperties(),function(e){return e.getAdapter(M.RAMLPropertyService).isKey()});if(t){var n=new z(this.lowLevel(),this,t.range(),t,!0);return n._value=this._patchedName,[n].concat(e)}}return e},t.prototype.elements=function(){return this.children().filter(function(e){return!e.isAttr()&&!e.isUnknown()})},t.prototype.element=function(e){var t=this.elementsOfKind(e);return t.length>0?t[0]:null},t.prototype.elementsOfKind=function(e){return this.elements().filter(function(t){return t.property().nameId()==e})},t.prototype.definition=function(){return this._def},t.prototype.property=function(){return this._prop},t.prototype.isExpanded=function(){return this._expanded},t.prototype.copy=function(){return new t(this.lowLevel().copy(),this.parent(),this.definition(),this.property())},t.prototype.clearChildrenCache=function(){this._children=null,this._mergedChildren=null},t.prototype.optionalProperties=function(){var e=this.definition();if(null==e)return[];var t=[],n={};return this.lowLevel().children().forEach(function(e){e.optional()&&(n[e.key()]=!0)}),e.allProperties().forEach(function(e){var r=e;n[r.nameId()]&&t.push(r.nameId())}),t},t.prototype.setReuseMode=function(e){this._reuseMode=e,this._children&&this.lowLevel().valueKind()!=P.Kind.SEQ&&this._children.forEach(function(t){return t.setReuseMode(e)})},t.prototype.reusedNode=function(){return this._reusedNode},t.prototype.setReusedNode=function(e){this._reusedNode=e},t.prototype.resetRuntimeTypes=function(){delete this._associatedDef,this.elements().forEach(function(e){return e.resetRuntimeTypes()})},t.CLASS_IDENTIFIER_ASTNodeImpl=\"highLevelImpl.ASTNodeImpl\",t}(W);t.ASTNodeImpl=X,t.universeProvider=n(88);var $=function(e,n){var r=s(e),i=r&&r[1]||\"\",a=r&&r.length>2&&r[2]||\"Api\",o=r&&r.length>2&&r[2],u=\"1.0\"==i?new T.Universe(null,\"RAML10\",t.universeProvider(\"RAML10\"),\"RAML10\"):new T.Universe(null,\"RAML08\",t.universeProvider(\"RAML08\"));return\"API\"==a?a=\"Api\":\"NamedExample\"==a?a=\"ExampleSpec\":\"DataType\"==a?a=\"TypeDeclaration\":\"SecurityScheme\"==a?a=\"AbstractSecurityScheme\":\"AnnotationTypeDeclaration\"==a&&(a=\"TypeDeclaration\"),u.setOriginalTopLevelText(o),u.setTopLevel(a),u.setTypedVersion(i),{ptype:a,localUniverse:u}};t.ramlFirstLine=s,t.getFragmentDefenitionName=u,t.fromUnit=c,t.createBasicValidationAcceptor=l,t.isAnnotationTypeFragment=p;var Q=function(){function e(e){this._node=e}return e.prototype.kind=function(){return\"AnnotatedNode\"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){var n=t.name(),r=n.lastIndexOf(\".\");r>=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){if(!this._annotations){var e=[];this._node.isElement()?e=this._node.asElement().attributes(T.universesInfo.Universe10.Annotable.properties.annotations.name):this._node.isAttr()&&(e=this._node.asAttr().annotations()),this._annotations=e.map(function(e){return new Z(e)})}return this._annotations},e.prototype.value=function(){if(this._node.isElement())return this._node.asElement().wrapperNode().toJSON();if(this._node.isAttr()){var e=this._node.asAttr().value();return q.isInstance(e)?e.lowLevel().dump():e}return this._node.lowLevel().dump()},e.prototype.name=function(){return this._node.name()},e.prototype.entry=function(){return this._node},e}();t.AnnotatedNode=Q;var Z=function(){function e(e){this.attr=e}return e.prototype.name=function(){return this.attr.value().valueName()},e.prototype.value=function(){var e=this.attr.value();if(q.isInstance(e)){var t=e.lowLevel().dumpToObject();return t[Object.keys(t)[0]]}return e},e.prototype.definition=function(){var e=this.attr.parent(),t=this.name(),n=C.referenceTargets(this.attr.property(),e).filter(function(n){return r(n,e)==t});return 0==n.length?null:n[0].parsedType()},e}();t.AnnotationInstance=Z,t.applyNodeValidationPlugins=d,t.applyNodeAnnotationValidationPlugins=m,t.toParserErrors=h},function(e,t,n){\"use strict\";function r(e){return!!e&&(e.nameId()===qe.Universe10.Api.properties.documentation.name||e.nameId()===qe.Universe08.Api.properties.documentation.name)}function i(e){return e===qe.Universe10.Trait.properties.usage.name||e===qe.Universe08.Trait.properties.usage.name||e===qe.Universe10.ResourceType.properties.usage.name||e===qe.Universe08.ResourceType.properties.usage.name||e===qe.Universe10.Library.properties.usage.name||e===qe.Universe10.Overlay.properties.usage.name||e===qe.Universe10.Extension.properties.usage.name}function a(e){return!!e&&i(e.nameId())}function o(e){return!!e&&(e.nameId()==qe.Universe10.Overlay.properties.extends.name||e.nameId()==qe.Universe10.Extension.properties.extends.name)}function s(e){return e===qe.Universe10.TypeDeclaration.properties.description.name||\"description\"===e}function u(e){return!!e&&s(e.nameId())}function c(e){return e===qe.Universe10.TypeDeclaration.properties.required.name||e===qe.Universe08.Parameter.properties.required.name||\"required\"===e}function l(e){return e===qe.Universe10.TypeDeclaration.properties.displayName.name||\"displayName\"===e}function p(e){return!!e&&l(e.nameId())}function f(e){return!!e&&c(e.nameId())}function d(e){return e===qe.Universe10.Api.properties.title.name||e===qe.Universe08.Api.properties.title.name||e===qe.Universe10.DocumentationItem.properties.title.name||e===qe.Universe08.DocumentationItem.properties.title.name||e===qe.Universe10.Overlay.properties.title.name||e===qe.Universe10.Extension.properties.title.name}function m(e){return!!e&&d(e.nameId())}function h(e){return!!e&&y(e.nameId())}function y(e){return e===qe.Universe08.MethodBase.properties.headers.name||e===qe.Universe08.Response.properties.headers.name||e===qe.Universe08.SecuritySchemePart.properties.headers.name||e===qe.Universe10.MethodBase.properties.headers.name||e===qe.Universe10.Response.properties.headers.name}function _(e){return!!e&&g(e.nameId())}function g(e){return e===qe.Universe08.BodyLike.properties.formParameters.name}function v(e){return!!e&&b(e.nameId())}function b(e){return e===qe.Universe08.MethodBase.properties.queryParameters.name||e===qe.Universe08.SecuritySchemePart.properties.queryParameters.name||e===qe.Universe10.MethodBase.properties.queryParameters.name}function S(e){return!!e&&(e.nameId()===qe.Universe10.Api.properties.annotations.name||e.nameId()===qe.Universe10.TypeDeclaration.properties.annotations.name||e.nameId()===qe.Universe10.Response.properties.annotations.name)}function A(e){return!!e&&e.nameId()===qe.Universe10.AnnotationRef.properties.annotation.name}function T(e){return!!e&&(e.nameId()===qe.Universe10.MethodBase.properties.is.name||e.nameId()===qe.Universe08.Method.properties.is.name||e.nameId()===qe.Universe10.ResourceBase.properties.is.name||e.nameId()===qe.Universe08.ResourceType.properties.is.name||e.nameId()===qe.Universe08.Resource.properties.is.name)}function E(e){return!!e&&(e.nameId()===qe.Universe10.Api.properties.securedBy.name||e.nameId()===qe.Universe08.Api.properties.securedBy.name||e.nameId()===qe.Universe10.MethodBase.properties.securedBy.name||e.nameId()===qe.Universe08.MethodBase.properties.securedBy.name||e.nameId()===qe.Universe08.ResourceType.properties.securedBy.name||e.nameId()===qe.Universe08.Resource.properties.securedBy.name||e.nameId()===qe.Universe10.ResourceBase.properties.securedBy.name)}function C(e){return!!e&&(e.nameId()===qe.Universe10.LibraryBase.properties.securitySchemes.name||e.nameId()===qe.Universe08.Api.properties.securitySchemes.name)}function N(e){return!!e&&(e.nameId()===qe.Universe10.SecuritySchemeRef.properties.securityScheme.name||e.nameId()===qe.Universe08.SecuritySchemeRef.properties.securityScheme.name)}function w(e){return!!e&&(e.nameId()===qe.Universe10.AbstractSecurityScheme.properties.type.name||e.nameId()===qe.Universe08.AbstractSecurityScheme.properties.type.name||e.nameId()===qe.Universe08.ResourceType.properties.type.name||e.nameId()===qe.Universe08.Resource.properties.type.name||e.nameId()===qe.Universe08.Parameter.properties.type.name||e.nameId()===qe.Universe10.ResourceBase.properties.type.name||e.nameId()===qe.Universe10.TypeDeclaration.properties.type.name)}function k(e){return!!e&&e.nameId()===qe.Universe10.ArrayTypeDeclaration.properties.items.name}function x(e){return!!e&&e.nameId()===qe.Universe10.ArrayTypeDeclaration.properties.structuredItems.name}function R(e){return!!e&&e.nameId()===qe.Universe10.ObjectTypeDeclaration.properties.properties.name}function I(e){return!!e&&(e.nameId()===qe.Universe10.MethodBase.properties.responses.name||e.nameId()===qe.Universe08.MethodBase.properties.responses.name)}function D(e){return!!e&&(e.nameId()===qe.Universe10.Api.properties.protocols.name||e.nameId()===qe.Universe08.Api.properties.protocols.name||e.nameId()===qe.Universe10.MethodBase.properties.protocols.name)}function M(e){return!!e&&(e.nameId()===qe.Universe10.TypeDeclaration.properties.name.name||e.nameId()===qe.Universe10.TypeDeclaration.properties.name.name||e.nameId()===qe.Universe08.AbstractSecurityScheme.properties.name.name||e.nameId()===qe.Universe10.AbstractSecurityScheme.properties.name.name||e.nameId()===qe.Universe08.Trait.properties.name.name||e.nameId()===qe.Universe10.Trait.properties.name.name||\"name\"===e.nameId())}function P(e){return!!e&&(e.nameId()===qe.Universe10.MethodBase.properties.body.name||e.nameId()===qe.Universe08.MethodBase.properties.body.name||e.nameId()===qe.Universe10.Response.properties.body.name||e.nameId()===qe.Universe08.Response.properties.body.name)}function L(e){return!!e&&(e.nameId()===qe.Universe10.TypeDeclaration.properties.default.name||e.nameId()===qe.Universe08.Parameter.properties.default.name)}function O(e){return!!e&&(e.nameId()===qe.Universe08.BodyLike.properties.schema.name||e.nameId()===qe.Universe08.XMLBody.properties.schema.name||e.nameId()===qe.Universe08.JSONBody.properties.schema.name||e.nameId()===qe.Universe10.TypeDeclaration.properties.schema.name)}function U(e){return!!e&&(e.nameId()===qe.Universe08.Api.properties.traits.name||e.nameId()===qe.Universe10.LibraryBase.properties.traits.name)}function F(e){return!!e&&(e.nameId()===qe.Universe08.TraitRef.properties.trait.name||e.nameId()===qe.Universe10.TraitRef.properties.trait.name)}function B(e){return!!e&&(e.nameId()===qe.Universe08.Api.properties.resourceTypes.name||e.nameId()===qe.Universe10.LibraryBase.properties.resourceTypes.name)}function K(e){return!!e&&(e.nameId()===qe.Universe08.ResourceTypeRef.properties.resourceType.name||e.nameId()===qe.Universe10.ResourceTypeRef.properties.resourceType.name)}function V(e){return!!e&&e.nameId()===qe.Universe10.TypeDeclaration.properties.facets.name}function j(e){return!!e&&(e.nameId()===qe.Universe08.Api.properties.schemas.name||e.nameId()===qe.Universe10.LibraryBase.properties.schemas.name)}function W(e){return!!e&&(e.nameId()===qe.Universe10.Api.properties.resources.name||e.nameId()===qe.Universe08.Api.properties.resources.name||e.nameId()===qe.Universe10.Resource.properties.resources.name||e.nameId()===qe.Universe08.Resource.properties.resources.name)}function q(e){return!!e&&(e.nameId()===qe.Universe10.ResourceBase.properties.methods.name||e.nameId()===qe.Universe08.Resource.properties.methods.name||e.nameId()===qe.Universe08.ResourceType.properties.methods.name)}function z(e){return e&&e.nameId()===qe.Universe10.LibraryBase.properties.types.name}function H(e){return!!e&&(e.nameId()===qe.Universe10.TypeDeclaration.properties.example.name||\"example\"===e.nameId())}function Y(e){return!!e&&(e.nameId()===qe.Universe10.StringTypeDeclaration.properties.enum.name||e.nameId()===qe.Universe10.NumberTypeDeclaration.properties.enum.name||e.nameId()===qe.Universe08.StringTypeDeclaration.properties.enum.name)}function J(e){return!!e&&(e.nameId()===qe.Universe10.TypeDeclaration.properties.example.name||e.nameId()===qe.Universe10.TypeDeclaration.properties.examples.name)}function G(e){return!!e&&e.nameId()===qe.Universe08.GlobalSchema.properties.value.name}function X(e){return!!e&&(e.nameId()===qe.Universe08.Api.properties.uriParameters.name||e.nameId()===qe.Universe08.ResourceType.properties.uriParameters.name||e.nameId()===qe.Universe08.Resource.properties.uriParameters.name||e.nameId()===qe.Universe10.ResourceBase.properties.uriParameters.name)}function $(e){return!!e&&(e.nameId()===qe.Universe08.Resource.properties.baseUriParameters.name||e.nameId()===qe.Universe08.Api.properties.baseUriParameters.name||e.nameId()===qe.Universe10.Api.properties.baseUriParameters.name)}function Q(e){return!!e&&(e.nameId()===qe.Universe08.Api.properties.RAMLVersion.name||e.nameId()===qe.Universe10.Api.properties.RAMLVersion.name)}function Z(e){return!!e&&e.nameId()===qe.Universe10.FragmentDeclaration.properties.uses.name}function ee(e){return!!e&&e.nameId()===qe.Universe10.LibraryBase.properties.annotationTypes.name}function te(e){return e.key()==qe.Universe10.Method||e.key()==qe.Universe08.Method}function ne(e){return e.key()==qe.Universe10.Api||e.key()==qe.Universe08.Api}function re(e){return e.key()==qe.Universe10.BooleanType||e.key()==qe.Universe08.BooleanType}function ie(e){return e.key()==qe.Universe10.MarkdownString||e.key()==qe.Universe08.MarkdownString}function ae(e){return e.key()==qe.Universe10.Resource||e.key()==qe.Universe08.Resource}function oe(e){return e.key()==qe.Universe10.Trait||e.key()==qe.Universe08.Trait}function se(e){return e.key()==qe.Universe10.TraitRef||e.key()==qe.Universe08.TraitRef}function ue(e){return e.key()==qe.Universe10.ResourceTypeRef||e.key()==qe.Universe08.ResourceTypeRef}function ce(e){return e.key()==qe.Universe08.GlobalSchema}function le(e){return e.key()==qe.Universe10.AbstractSecurityScheme||e.key()==qe.Universe08.AbstractSecurityScheme}function pe(e){return e.isAssignableFrom(qe.Universe10.AbstractSecurityScheme.name)}function fe(e){return e.key()==qe.Universe10.SecuritySchemeRef||e.key()==qe.Universe08.SecuritySchemeRef}function de(e){return e.key()==qe.Universe10.TypeDeclaration}function me(e){return e.key()==qe.Universe10.Response||e.key()==qe.Universe08.Response}function he(e){return e.key()==qe.Universe08.BodyLike}function ye(e){return e.key()==qe.Universe10.Overlay}function _e(e){return!1}function ge(e){return e.key()==qe.Universe10.ResourceType||e.key()==qe.Universe08.ResourceType}function ve(e){return e.key()==qe.Universe10.SchemaString||e.key()==qe.Universe08.SchemaString}function be(e){return e.key()==qe.Universe10.MethodBase||e.key()==qe.Universe08.MethodBase}function Se(e){return e.key()==qe.Universe10.Library}function Ae(e){return e.key()==qe.Universe10.StringType||e.key()==qe.Universe08.StringType}function Te(e){return e.key()==qe.Universe10.ExampleSpec}function Ee(e){return e.key()==qe.Universe10.Extension}function Ce(e){return e.isAssignableFrom(qe.Universe10.TypeDeclaration.name)}function Ne(e){return e.key()==qe.Universe10.DocumentationItem||e.key()==qe.Universe08.DocumentationItem}function we(e){return e.isAssignableFrom(qe.Universe10.AnnotationRef.name)}function ke(e){return e.isAssignableFrom(qe.Universe10.Api.name)||e.isAssignableFrom(qe.Universe08.Api.name)}function xe(e){return e.isAssignableFrom(qe.Universe10.LibraryBase.name)}function Re(e){return e.isAssignableFrom(qe.Universe10.ResourceBase.name)||e.isAssignableFrom(qe.Universe08.Resource.name)}function Ie(e){return e.isAssignableFrom(qe.Universe10.ObjectTypeDeclaration.name)}function De(e){return e.isAssignableFrom(qe.Universe10.TypeDeclaration.name)}function Me(e){return e.isAssignableFrom(qe.Universe10.StringTypeDeclaration.name)}function Pe(e){return e.isAssignableFrom(qe.Universe10.TypeDeclaration.name)}function Le(e){return e.isAssignableFrom(qe.Universe10.MethodBase.name)||e.isAssignableFrom(qe.Universe08.MethodBase.name)}function Oe(e){return e.key()==qe.Universe10.SecuritySchemePart||e.key()==qe.Universe08.SecuritySchemePart}function Ue(e){return e.nameId()===qe.Universe08.Api.properties.mediaType.name||e.nameId()===qe.Universe10.Api.properties.mediaType.name}function Fe(e){return\"RAML08\"==e.universe().version()}function Be(e){return\"RAML10\"==e.universe().version()}function Ke(e){return Fe(e.definition())}function Ve(e){return Fe(e.definition())}function je(e){return Be(e.definition())}function We(e){return Be(e.definition())}var qe=n(3);t.isDocumentationProperty=r,t.isUsagePropertyName=i,t.isUsageProperty=a,t.isMasterRefProperty=o,t.isDescriptionPropertyName=s,t.isDescriptionProperty=u,t.isRequiredPropertyName=c,t.isDisplayNamePropertyName=l,t.isDisplayNameProperty=p,t.isRequiredProperty=f,t.isTitlePropertyName=d,t.isTitleProperty=m,t.isHeadersProperty=h,t.isHeadersPropertyName=y,t.isFormParametersProperty=_,t.isFormParametersPropertyName=g,t.isQueryParametersProperty=v,t.isQueryParametersPropertyName=b,t.isAnnotationsProperty=S,t.isAnnotationProperty=A,t.isIsProperty=T,t.isSecuredByProperty=E,t.isSecuritySchemesProperty=C,t.isSecuritySchemeProperty=N,t.isTypeProperty=w,t.isItemsProperty=k,t.isStructuredItemsProperty=x,t.isPropertiesProperty=R,t.isResponsesProperty=I,t.isProtocolsProperty=D,t.isNameProperty=M,t.isBodyProperty=P,t.isDefaultValue=L,t.isSchemaProperty=O,t.isTraitsProperty=U,t.isTraitProperty=F,t.isResourceTypesProperty=B,t.isResourceTypeProperty=K,t.isFacetsProperty=V,t.isSchemasProperty=j,t.isResourcesProperty=W,t.isMethodsProperty=q,t.isTypesProperty=z,t.isExampleProperty=H,t.isEnumProperty=Y,t.isExamplesProperty=J,t.isValueProperty=G,t.isUriParametersProperty=X,t.isBaseUriParametersProperty=$,t.isRAMLVersionProperty=Q,t.isUsesProperty=Z,t.isAnnotationTypesProperty=ee,t.isMethodType=te,t.isApiType=ne,t.isBooleanTypeType=re,t.isMarkdownStringType=ie,t.isResourceType=ae,t.isTraitType=oe,t.isTraitRefType=se,t.isResourceTypeRefType=ue,t.isGlobalSchemaType=ce,t.isSecuritySchemaType=le,t.isSecuritySchemaTypeDescendant=pe,t.isSecuritySchemeRefType=fe,t.isTypeDeclarationType=de,t.isResponseType=me,t.isBodyLikeType=he,t.isOverlayType=ye,t.isAnnotationTypeType=_e,t.isResourceTypeType=ge,t.isSchemaStringType=ve,t.isMethodBaseType=be,t.isLibraryType=Se,t.isStringTypeType=Ae,t.isExampleSpecType=Te,t.isExtensionType=Ee,t.isTypeDeclarationTypeOrDescendant=Ce,t.isDocumentationType=Ne,t.isAnnotationRefTypeOrDescendant=we,t.isApiSibling=ke,t.isLibraryBaseSibling=xe,t.isResourceBaseSibling=Re,t.isObjectTypeDeclarationSibling=Ie,t.isTypeDeclarationDescendant=De,t.isStringTypeDeclarationDescendant=Me,t.isTypeDeclarationSibling=Pe,t.isMethodBaseSibling=Le,t.isSecuritySchemePartType=Oe,t.isMediaTypeProperty=Ue,t.isRAML08Type=Fe,t.isRAML10Type=Be,t.isRAML08Node=Ke,t.isRAML08Attribute=Ve,t.isRAML10Node=je,t.isRAML10Attribute=We},function(e,t,n){\"use strict\";function r(){return new T(T.OK,\"\",\"\",null)}function i(e,t,n,r,i){void 0===n&&(n={}),void 0===r&&(r=T.ERROR),void 0===i&&(i=!1);var a=E(e,n);return new T(r,e.code,a,t,i)}function a(){return te}function o(e,t){return new Z(e,t)}function s(e,t){return new ee(e,t)}function u(e,n){var r=new $(e);return n.forEach(function(e){return r.addSuper(e)}),r.isSubTypeOf(t.NIL)&&(r.nullable=!0),r}function c(e){return u(e,[t.OBJECT])}function l(e,t,n){if(t.isScalar()&&n.isScalar()){if(t.allSubTypes().indexOf(n)!=-1)return t;if(n.allSubTypes().indexOf(t)!=-1)return n}var r=t.oneMeta(x.Discriminator),i=n.oneMeta(x.Discriminator);if(r&&i&&r.property===i.property){var a=t.descValue(),o=n.descValue();if(a!==o){var s=e[r.property];if(s===a)return t;if(s===o)return n}}return null}function p(e){return parseFloat(e)==parseInt(e)&&!isNaN(e)}function f(e){for(var t=[];null!=e;){if(null!=e.name()){t.push(e.name());break}if(!(e instanceof $))break;var n=e.contextMeta();if(null==n)break;t.push(n.path()),e=n._owner}return t.reverse()}function d(e,n,a){var o=n.metaOfType(x.Discriminator);if(0==o.length)return null;var s=o[0].value(),u=b.find([n].concat(n.allSuperTypes()),function(e){return e.getExtra(t.GLOBAL)});if(!u)return null;var c=u.name(),l=n.metaOfType(x.DiscriminatorValue);if(0!=l.length&&(c=l[0].value()),c){if(e.hasOwnProperty(s)){var p=e[s];if(p!=c){var f=i(T.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:u.name(),value:p,propName:s},T.WARNING);return m(f,{name:s,child:a}),f}return r()}var d=i(T.CODE_MISSING_DISCRIMINATOR,this,{rootType:u.name(),propName:s});return m(d,a),d}}function m(e,t){if(e.getValidationPath()){for(var n=h(t),r=n;r.child;)r=r.child;r.child=e.getValidationPath(),e.setValidationPath(n)}else e.setValidationPath(t);e.getSubStatuses().forEach(function(e){m(e,t)})}function h(e){if(e){for(var t=e,n=null,r=null;t;)if(n){var i={name:t.name};r.child=i,t=t.child,r=i}else n={name:t.name},r=n,t=t.child,r=n;return n}return null}function y(e){for(var t=A.getAnnotationValidationPlugins(),n=[],r=0,i=t;r<i.length;r++){var a=i[r],o=a.process(e);o&&o.forEach(function(t){n.push(g(t,a.id(),e.entry()))})}return n}function _(e,t){for(var n=A.getTypeValidationPlugins(),r=[],i=0,a=n;i<a.length;i++){var o=a[i],s=o.process(e,t);s&&s.forEach(function(t){r.push(g(t,o.id(),e))})}return r}function g(e,t,n){var r=e.isWarning?T.WARNING:T.ERROR,i=e.issueCode||t,a=e.message||\"The \"+t+\" plugin reports an error\",o=new T(r,i,a,n);return o.setValidationPath(e.path),o}var v=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},b=n(1),S=n(92),A=n(48);t.messageRegistry=n(344);var T=function(){function e(e,t,n,r,i){void 0===i&&(i=!1),this.takeNodeFromSource=i,this.subStatus=[],this.severity=e,this.code=t,this.message=n,this.source=r}return e.prototype.getValidationPath=function(){return this.vp},e.prototype.getValidationPathAsString=function(){if(!this.vp)return\"\";for(var e=\"\",t=this.vp;t;)e+=t.name,t.child&&(e+=\"/\"),t=t.child;return e},e.prototype.setValidationPath=function(e){this.vp=e},e.prototype.addSubStatus=function(t,n){if(void 0===n&&(n=null),t){n&&m(t,{name:n}),this.subStatus.push(t);var r=e.OK;t.isOk()||(t.isError()?r=e.ERROR:t.isWarning()?r=e.WARNING:t.isInfo()&&(r=e.INFO)),this.severity<r&&(this.severity=r,this.message=t.getMessage())}},e.prototype.getErrors=function(){if(this.isError()||this.isWarning()){if(this.subStatus.length>0){var e=[];return this.subStatus.forEach(function(t){return e=e.concat(t.getErrors())}),e}return[this]}return[]},e.prototype.getSubStatuses=function(){return this.subStatus},e.prototype.getSeverity=function(){return this.severity},e.prototype.getMessage=function(){return this.message},e.prototype.setMessage=function(e){this.message=e},e.prototype.getSource=function(){return this.source},e.prototype.getCode=function(){return this.code},e.prototype.setCode=function(e){this.code=e},e.prototype.isWarning=function(){return this.severity==e.WARNING},e.prototype.isError=function(){return this.severity==e.ERROR},e.prototype.isOk=function(){return this.severity===e.OK},e.prototype.isInfo=function(){return this.severity===e.INFO},e.prototype.setSource=function(e){this.source=e},e.prototype.toString=function(){return this.isOk()?\"OK\":this.message},e.prototype.getExtra=function(e){return this.takeNodeFromSource&&e==A.SOURCE_EXTRA&&this.source instanceof C?this.source.node():null},e.prototype.putExtra=function(e,t){},e.CODE_CONFLICTING_TYPE_KIND=4,e.CODE_INCORRECT_DISCRIMINATOR=t.messageRegistry.INCORRECT_DISCRIMINATOR,e.CODE_MISSING_DISCRIMINATOR=t.messageRegistry.MISSING_DISCRIMINATOR,e.ERROR=3,e.INFO=1,e.OK=0,e.WARNING=2,e}();t.Status=T,t.ok=r,t.SCHEMA_AND_TYPE=A.SCHEMA_AND_TYPE_EXTRA,t.GLOBAL=A.GLOBAL_EXTRA,t.TOPLEVEL=A.TOP_LEVEL_EXTRA,t.SOURCE_EXTRA=A.SOURCE_EXTRA;var E=function(e,t){for(var n=\"\",r=e.message,i=0,a=r.indexOf(\"{{\");a>=0;a=r.indexOf(\"{{\",i)){if(n+=r.substring(i,a),(i=r.indexOf(\"}}\",a))<0){i=a;break}a+=\"{{\".length;var o=r.substring(a,i);i+=\"}}\".length;var s=t[o];if(void 0===s)throw new Error(\"Message parameter '\"+o+\"' has no value specified.\");n+=s}return n+=r.substring(i,r.length)};t.error=i;var C=function(){function e(e){this._inheritable=e,this._annotations=[]}return e.prototype.node=function(){return this._node},e.prototype.setNode=function(e){this._node=e},e.prototype.owner=function(){return this._owner},e.prototype.isInheritable=function(){return this._inheritable},e.prototype.validateSelf=function(e){for(var t=r(),n=0,i=this._annotations;n<i.length;n++){var a=i[n],o=a.validateSelf(e);o.isOk()||t.addSubStatus(o)}for(var s=new ye(this,e),u=y(s),c=0,l=u;c<l.length;c++){var p=l[c];t.addSubStatus(p)}return m(t,{name:this.facetName()}),t},e.prototype.requiredTypes=function(){return[]},e.prototype.annotations=function(){return this._annotations},e.prototype.addAnnotation=function(e){this._annotations.push(e)},e}();t.TypeInformation=C;var N=null,w=function(e){function t(t){void 0===t&&(t=!0),e.call(this,t)}return v(t,e),t.prototype.intersect=function(e,n){var r=e.id()+\"\"+n.id();if(t.intersections.hasOwnProperty(r))return t.intersections[r];var i=s(r,[e,n]);return t.intersections[r]=i,i},t.prototype.release=function(e){delete t.intersections[e.name()]},t.prototype.nothing=function(e,t){return void 0===t&&(t=\"Conflicting restrictions\"),new ie(N,t,e)},t.prototype.composeWith=function(e){return null},t.prototype.preoptimize=function(){null===N&&(N=new re(null,null,\"top\")),N=N.push(this);try{return this.innerOptimize()}finally{N=N.pop()}},t.prototype.innerOptimize=function(){return this},t.prototype.tryCompose=function(e){null===N&&(N=new re(null,null,\"top\")),N=N.push(this);try{return this.composeWith(e)}finally{N=N.pop()}},t.prototype.kind=function(){return A.MetaInformationKind.Constraint},t.prototype.conflictMessage=function(e,t){return null},t.intersections={},t}(C);t.Constraint=w;var k=n(8),x=n(7),R=n(65),I=n(8),D=n(7),M=n(7),P=n(8),L=n(8),O=n(148),U=n(7),F=n(8);t.autoCloseFlag=!1;var B=function(){function e(e){void 0===e&&(e=null),this._parent=e,this._types={},this.typeList=[]}return e.prototype.put=function(e,t){this._types[e]=t},e.prototype.addType=function(e){e.isAnonymous()||(this._types[e.name()]=e,this.typeList.push(e))},e.prototype.get=function(e){return this._types.hasOwnProperty(e)?this._types[e]:null!=this._parent?this._parent.get(e):null},e.prototype.types=function(){return this.typeList},e.prototype.typeMap=function(){return this._types},e.prototype.parent=function(){return this._parent},e}();t.TypeRegistry=B;var K=function(){function e(){}return e.prototype.getInfos=function(e){if(e.getExtra(\"PInfos\"))return e.getExtra(\"PInfos\");var t={};return e.meta().forEach(function(e){if(e instanceof k.HasProperty){var n=e.value();t[n]={name:n,type:null}}}),e.meta().forEach(function(e){if(e instanceof k.PropertyIs){var n=e.propertyName();t[n]&&(t[n].type=e.value())}}),e.putExtra(\"PInfos\",t),t},e.prototype.validate=function(e,t){var n=this,r=this.getInfos(e),i=!1;return Object.keys(r).forEach(function(e){i=i||n.validateInfo(r[e],t)}),i},e.prototype.validateInfo=function(e,t){var n=this;if(t.some(function(t){return t==e}))return!0;if(e.type instanceof Z){var r=e.type,i=!0;return r.options().forEach(function(r){n.validate(r,[e].concat(t))||(i=!1)}),i}return e.type.isArray()?void 0:this.validate(e.type,[e].concat(t))},e.prototype.validateType=function(e){var t=this,n=this.getInfos(e),r=[];return Object.keys(n).forEach(function(e){t.validateInfo(n[e],[])&&r.push(e)}),r},e}(),V=function(e){function n(n,r,i){e.call(this,T.ERROR,t.messageRegistry.RESTRICTIONS_CONFLICT.code,null,i),this._conflicting=n,this._stack=r,this.source=i,this.computeMessage()}return v(n,e),n.prototype.computeMessage=function(){var e=null;if(null!=this._stack&&this._stack.getRestriction()instanceof k.MinMaxRestriction){var t=this._stack.getRestriction();e=this._conflicting.conflictMessage(t.facetPath(),t.value())}null==e&&(e=this._conflicting+\" and \"+(null!=this._stack?this._stack.getRestriction().toString():\"\"));var n=\"\";if(this.source instanceof W){for(var r=[],i=this._stack;i;){var a=i.getRestriction();if(a instanceof P.PropertyIs){var o={name:a.propId()};r.length>0&&(o.child=r[r.length-1]),r.push(o)}i=i.pop()}m(this,r.pop());var s=k.anotherRestrictionComponent();n=s?\" between types '\"+f(this.source)+\"' and '\"+f(s)+\"'\":\" in type '\"+f(this.source)+\"'\"}this.message=\"Restrictions conflict\"+n+\": \"+e},n.prototype.getConflictDescription=function(){var e=\"\";return e+=\"Restrictions coflict:\\n\",e+=this._stack.getRestriction()+\" conflicts with \"+this._conflicting+\"\\n\",e+=\"at\\n\",e+=this._stack.pop()},n.prototype.getConflicting=function(){return this._conflicting},n.prototype.getStack=function(){return this._stack},n.prototype.toRestriction=function(){return new ie(this._stack,this.message,this._conflicting)},n}(T);t.RestrictionsConflict=V;var j=0;t.VALIDATED_TYPE=null;var W=function(){function e(e){this._name=e,this.metaInfo=[],this._subTypes=[],this.innerid=j++,this.extras={},this._locked=!1}return e.prototype.getExtra=function(e){return this.extras[e]},e.prototype.putExtra=function(e,t){this.extras[e]=t},e.prototype.id=function(){return this.innerid},e.prototype.knownProperties=function(){return this.metaOfType(F.MatchesProperty)},e.prototype.lock=function(){this._locked=!0},e.prototype.isLocked=function(){return this._locked},e.prototype.allFacets=function(){return this.meta()},e.prototype.declaredFacets=function(){return this.declaredMeta()},e.prototype.isSubTypeOf=function(e){return e===t.ANY||this===e||this.superTypes().some(function(t){return t.isSubTypeOf(e)})},e.prototype.isSuperTypeOf=function(e){return this===e||this.allSubTypes().indexOf(e)!=-1},e.prototype.addMeta=function(e){this.metaInfo.push(e),e._owner=this},e.prototype.name=function(){return this._name},e.prototype.label=function(){return this._name},e.prototype.subTypes=function(){return this._subTypes},e.prototype.superTypes=function(){return[]},e.prototype.addSupertypeAnnotation=function(e,t){if(e&&0!=e.length){this.supertypeAnnotations||(this.supertypeAnnotations=[]);var n=this.supertypeAnnotations[t];n||(n={},this.supertypeAnnotations[t]=n);for(var r=0,i=e;r<i.length;r++){var a=i[r];n[a.facetName()]=a}}},e.prototype.validateType=function(e){var n=this;void 0===e&&(e=a());var r=new T(T.OK,\"\",\"\",this);if(this.validateHierarchy(r),this.getExtra(A.PARSE_ERROR)&&r.addSubStatus(this.getExtra(A.PARSE_ERROR)),r.isOk()){if(r.addSubStatus(this.checkConfluent()),this.isExternal()&&\"external\"==this.kind()){var o=this;if(o.isJSON())try{var s=S.getJSONSchema(o.schema(),o.getContentProvider&&o.getContentProvider());s&&s.validateSelf()}catch(e){if(\"Maximum call stack size exceeded\"==e.message)return i(t.messageRegistry.CIRCULAR_REFS_IN_JSON_SCHEMA,this);if(e instanceof he){var u=e;r.addSubStatus(i(u.messageEntry,this,u.parameters,u.isWarning?T.WARNING:T.ERROR))}else r.addSubStatus(i(t.messageRegistry.JSON_SCHEMA_VALIDATION_EXCEPTION,this,{msg:e.message}))}}r.isOk()&&this.superTypes().forEach(function(t){if(t.isAnonymous()){var n=t.validateType(e);n.isOk()||(m(n,{name:\"type\"}),r.addSubStatus(n))}})}if(this.getExtra(t.SCHEMA_AND_TYPE)&&r.addSubStatus(i(t.messageRegistry.SCHEMA_AND_TYPE,this)),r.isOk()&&this.validateMeta(e).getErrors().forEach(function(e){return r.addSubStatus(e)}),this.isObject()){var c={};this.restrictions().forEach(function(e){e.owner()!=n&&e instanceof k.HasProperty&&(c[e.value()]=!0)}),this.declaredMeta().forEach(function(e){e instanceof k.HasProperty&&delete c[e.value()]}),this.declaredMeta().forEach(function(e){if(e instanceof k.PropertyIs){var a=e;c.hasOwnProperty(a.propertyName())&&r.addSubStatus(i(t.messageRegistry.REQUIRED_OVERRIDE_OPTIONAL,n,{propertyName:a.propertyName()}))}});var l=(new K).validateType(this);l.length>0&&l.forEach(function(e){var a=i(t.messageRegistry.CYCLIC_DEPENDENCY,n,{typeName:e});m(a,{name:e}),r.addSubStatus(a)})}if(this.supertypeAnnotations)for(var p=0;p<this.supertypeAnnotations.length;p++)for(var f=this.supertypeAnnotations[p],d=0,h=Object.keys(f);d<h.length;d++){var g=h[d],v=f[g],b=v.validateSelf(e);b.isOk()||(m(b,{name:\"type\",child:{name:p}}),r.addSubStatus(b))}for(var E=_(this,e),C=0,N=E;C<N.length;C++){var w=N[C];r.addSubStatus(w)}for(var x=new ge(this,e),R=y(x),I=0,D=R;I<D.length;I++){var w=D[I];r.addSubStatus(w)}return r},e.prototype.validateHierarchy=function(e){var n=this;if(this.isAnonymous()||this.getExtra(A.TOP_LEVEL_EXTRA)&&a().get(this.name())&&e.addSubStatus(i(t.messageRegistry.REDEFINIG_BUILDTIN,this,{typeName:this.name()})),this.isSubTypeOf(t.RECURRENT)&&e.addSubStatus(i(t.messageRegistry.RECURRENT_DEFINITION,this),\"type\"),this.isSubTypeOf(t.UNKNOWN)&&e.addSubStatus(i(t.messageRegistry.INHERITING_UNKNOWN_TYPE,this),\"type\"),this.isUnion()){var r=this.typeFamily();r.some(function(e){return e.isSubTypeOf(t.RECURRENT)})&&e.addSubStatus(i(t.messageRegistry.RECURRENT_UNION_OPTION,this),\"type\"),r.some(function(e){return e.isSubTypeOf(t.UNKNOWN)})&&e.addSubStatus(i(t.messageRegistry.UNKNOWN_UNION_OPTION,this),\"type\")}if(this.isArray()){var o=this.familyWithArray(),s=this.getExtra(A.HAS_ITEMS)?\"items\":\"type\";if(o.indexOf(this)!=-1||o.some(function(e){return e===t.RECURRENT}))e.addSubStatus(i(t.messageRegistry.RECURRENT_ARRAY_DEFINITION,this),s);else if(o.some(function(e){return e===t.UNKNOWN})){var u=this.oneMeta(L.ComponentShouldBeOfType).value().name();e.addSubStatus(i(t.messageRegistry.UNKNOWN_ARRAY_COMPONENT,this,{componentTypeName:u}),s)}}var c=this.superTypes(),l=!1,p=!1;if(c.length>1&&c.forEach(function(e){e.isExternal()?l=!0:p=!0}),l&&p&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,this)),this instanceof Z){this.options().forEach(function(r){r.isExternal()&&e.addSubStatus(i(t.messageRegistry.EXTERNALS_MIX,n))})}if(this.isExternal()&&this.getExtra(A.HAS_FACETS)){var f=i(t.messageRegistry.EXTERNAL_FACET,this,{name:this.getExtra(A.HAS_FACETS)});m(f,{name:this.getExtra(A.HAS_FACETS)}),e.addSubStatus(f)}},e.prototype.familyWithArray=function(){var e=this.allSuperTypes(),t=this.oneMeta(L.ComponentShouldBeOfType);if(t){var n=t.value();e=e.concat(n.familyWithArray())}return e},e.prototype.validateMeta=function(e){var t=new T(T.OK,\"\",\"\",this);return this.declaredMeta().forEach(function(n){n.validateSelf(e).getErrors().forEach(function(e){return t.addSubStatus(e)})}),this.validateFacets(t),t},e.prototype.validateFacets=function(e){var n=this,r={},a={},o={};this.meta().forEach(function(e){if(e instanceof D.FacetDeclaration){var t=e;r[t.actualName()]=t,t.isOptional()||t.owner()!==n&&(o[t.actualName()]=t),t.owner()!=n&&(a[t.actualName()]=t)}}),this.declaredMeta().forEach(function(r){if(r instanceof D.FacetDeclaration){var o=r;if(o.owner()==n){var s=o.actualName();a.hasOwnProperty(s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_FACET,n,{name:s}));var u=R.getInstance().facetPrototypeWithName(s);(u&&u.isApplicable(n)||\"type\"==s||\"properties\"==o.facetName()||\"schema\"==s||\"facets\"==s||\"uses\"==s)&&e.addSubStatus(i(t.messageRegistry.OVERRIDE_BUILTIN_FACET,n,{name:s})),\"(\"==s.charAt(0)&&e.addSubStatus(i(t.messageRegistry.FACET_START_BRACKET,n,{name:s}))}}});var s={};this.meta().forEach(function(e){e instanceof P.PropertyIs&&(s[e.propId()]=!0)});for(var u=0,c=this.meta();u<c.length;u++){var l=c[u];if(l instanceof M.CustomFacet){var p=l,f=p.facetName();if(r.hasOwnProperty(f)){var d=r[f],m=d.value();if(d.owner()==this&&p.owner()==this){var h=i(t.messageRegistry.FACET_CAN_NOT_BE_FIXED_BY_THE_DECLARING_TYPE,p);h.setValidationPath({name:f}),e.addSubStatus(h)}else e.addSubStatus(m.validateDirect(p.value(),!1,!1)),delete o[f]}else this.isExternal()?e.addSubStatus(i(t.messageRegistry.FACET_PROHIBITED_FOR_EXTERNALS,p,{facetName:f},T.ERROR,!0)):e.addSubStatus(i(t.messageRegistry.UNKNOWN_FACET,p,{facetName:f},T.ERROR,!0))}}Object.getOwnPropertyNames(o).length>0&&e.addSubStatus(i(t.messageRegistry.MISSING_REQUIRED_FACETS,this,{facetsList:Object.keys(o).map(function(e){return\"'\"+e+\"'\"}).join(\",\")}))},e.prototype.allSuperTypes=function(){var e=[];return this.fillSuperTypes(e),e},e.prototype.fillSuperTypes=function(e){this.superTypes().forEach(function(t){b.contains(e,t)||(e.push(t),t.fillSuperTypes(e))})},e.prototype.allSubTypes=function(){var e=[];return this.fillSubTypes(e),e},e.prototype.fillSubTypes=function(e){this.subTypes().forEach(function(t){b.contains(e,t)||(e.push(t),t.fillSubTypes(e))})},e.prototype.inherit=function(e){var t=new $(e);return t.addSuper(this),t},e.prototype.isAnonymous=function(){return!this._name||0===this._name.length},e.prototype.isEmpty=function(){return!(this.metaInfo.length>2)&&0==this.metaInfo.filter(function(e){return!(e instanceof U.NotScalar)&&(!(e instanceof x.DiscriminatorValue)||e.isStrict())}).length},e.prototype.isArray=function(){return this===t.ARRAY||this.allSuperTypes().indexOf(t.ARRAY)!=-1},e.prototype.propertySet=function(){var e=[];return this.meta().forEach(function(t){if(t instanceof P.PropertyIs){var n=t;e.push(n.propertyName())}}),b.uniq(e)},e.prototype.checkConfluent=function(){if(this.computeConfluent)return r();this.computeConfluent=!0;var e=k.anotherRestrictionComponentsCount();try{var t=k.optimize(this.restrictions()),n=b.find(t,function(e){return e instanceof ne});if(n){var i=null,a=null;if(n instanceof ie){var o=n;i=o.getStack(),a=o.another()}return new V(a,i,this)}return r()}finally{this.computeConfluent=!1,k.releaseAnotherRestrictionComponent(e)}},e.prototype.isObject=function(){return this==t.OBJECT||this.allSuperTypes().indexOf(t.OBJECT)!=-1},e.prototype.isExternal=function(){return this==t.EXTERNAL||this.allSuperTypes().indexOf(t.EXTERNAL)!=-1},e.prototype.isBoolean=function(){return this==t.BOOLEAN||this.allSuperTypes().indexOf(t.BOOLEAN)!=-1},e.prototype.isString=function(){return this==t.STRING||this.allSuperTypes().indexOf(t.STRING)!=-1},e.prototype.isNumber=function(){return this==t.NUMBER||this.allSuperTypes().indexOf(t.NUMBER)!=-1},e.prototype.isFile=function(){return this==t.FILE||this.allSuperTypes().indexOf(t.FILE)!=-1},e.prototype.isScalar=function(){return this==t.SCALAR||this.allSuperTypes().indexOf(t.SCALAR)!=-1},e.prototype.isDateTime=function(){return this==t.DATETIME||this.allSuperTypes().indexOf(t.DATETIME)!=-1},e.prototype.isDateOnly=function(){return this==t.DATE_ONLY||this.allSuperTypes().indexOf(t.DATE_ONLY)!=-1},e.prototype.isTimeOnly=function(){return this==t.TIME_ONLY||this.allSuperTypes().indexOf(t.TIME_ONLY)!=-1},e.prototype.isInteger=function(){return this==t.INTEGER||this.allSuperTypes().indexOf(t.INTEGER)!=-1},e.prototype.isDateTimeOnly=function(){return this==t.DATETIME_ONLY||this.allSuperTypes().indexOf(t.DATETIME_ONLY)!=-1},e.prototype.isUnknown=function(){return this==t.UNKNOWN||this.allSuperTypes().indexOf(t.UNKNOWN)!=-1},e.prototype.isRecurrent=function(){return this==t.RECURRENT||this.allSuperTypes().indexOf(t.RECURRENT)!=-1},e.prototype.isBuiltin=function(){return this.metaInfo.indexOf(G)!=-1},e.prototype.exampleObject=function(){return O.example(this)},e.prototype.isPolymorphic=function(){return this.meta().some(function(e){return e instanceof z})},e.prototype.restrictions=function(e){if(void 0===e&&(e=!1),this.isUnion()){var t=[];return this.superTypes().forEach(function(e){t=t.concat(e.restrictions())}),t=t.concat(this.meta().filter(function(e){return e instanceof w}))}var n=[],r=null;return this.meta().forEach(function(t){if(t instanceof w){if(t instanceof ae&&e){if(r)return;r=t}n.push(t)}}),n},e.prototype.customFacets=function(){return this.declaredMeta().filter(function(e){return e instanceof x.CustomFacet})},e.prototype.allCustomFacets=function(){return this.meta().filter(function(e){return e instanceof x.CustomFacet})},e.prototype.isUnion=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof Z}),e)},e.prototype.isIntersection=function(){var e=!1;return!this.isBuiltin()&&(this.allSuperTypes().forEach(function(t){return e=e||t instanceof ee}),e)},e.prototype.meta=function(){return[].concat(this.metaInfo)},e.prototype.validateDirect=function(e,n,r,a){var o=this;void 0===n&&(n=!1),void 0===r&&(r=!0),void 0===a&&(a=null);var s=t.VALIDATED_TYPE;try{var u=t.autoCloseFlag;n&&(t.autoCloseFlag=!0),t.VALIDATED_TYPE=this;var c=new T(T.OK,\"\",\"\",this);if(!(r||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.OBJECT_EXPECTED,this);if(this.restrictions(!0).forEach(function(t){return c.addSubStatus(t.check(e,a))}),(n||t.autoCloseFlag)&&this.isObject()&&!this.oneMeta(I.KnownPropertyRestriction)){var l=new I.KnownPropertyRestriction(!1);l.patchOwner(this),l.check(e).getErrors().forEach(function(e){var t=new T(T.WARNING,e.getCode(),e.getMessage(),o);m(t,e.getValidationPath()),c.addSubStatus(t)})}}finally{t.autoCloseFlag=u,t.VALIDATED_TYPE=s}return c},e.prototype.validate=function(e,n,a){void 0===n&&(n=!1),void 0===a&&(a=!0);var o=t.autoCloseFlag;if(!(a||null!==e&&void 0!==e||this.nullable))return i(t.messageRegistry.NULL_NOT_ALLOWED,this);n&&(t.autoCloseFlag=!0);try{for(var s,u=[],c=this.subTypes().concat(this),l=0,p=c;l<p.length;l++){var f=p[l],m=d(e,f),h=f.validateDirect(e,n||o);if(m){if(m.isOk())return h;u.push(m)}else if(h.isOk())return h;s=h}if(0==u.length)return s;var y=r();return u.forEach(function(e){return y.addSubStatus(e)}),u.pop()}finally{t.autoCloseFlag=o}},e.prototype.declareMapProperty=function(e,t){return null!=t&&this.addMeta(new k.MapPropertyIs(e,t)),t},e.prototype.closeUnknownProperties=function(){this.addMeta(new I.KnownPropertyRestriction(!1))},e.prototype.canDoAc=function(){for(var e=b.uniq(this.typeFamily()),t=new T(T.OK,\"\",\"\",this),n=0;n<e.length;n++)for(var r=0;r<e.length;r++)if(n!=r){var i=e[n],a=e[r],o=this.emptyIntersectionOrDiscriminator(i,a);t.addSubStatus(o)}return t},e.prototype.emptyIntersectionOrDiscriminator=function(e,t){return t===e?r():t.isScalar()&&e.isScalar()?r():s(\"\",[e,t]).checkConfluent().isOk()?this.checkDiscriminator(e,t):r()},e.prototype.checkDiscriminator=function(e,n){var a=i(t.messageRegistry.DISCRIMINATOR_NEEDED,this,{name1:e.name(),name2:n.name()}),o=e.oneMeta(x.Discriminator),s=n.oneMeta(x.Discriminator);if(null!=o&&null!=s&&o.value()===s.value()){var u=e.name(),c=n.name(),l=e.oneMeta(x.DiscriminatorValue);null!=l&&(u=l.value());var p=n.oneMeta(x.DiscriminatorValue);if(null!=p&&(c=p.value()),u!==c)return r();a=i(t.messageRegistry.SAME_DISCRIMINATOR_VALUE,this,{name1:e.name(),name2:n.name()})}return a},e.prototype.ac=function(e){if(!this.isPolymorphic()&&!this.isUnion())return this;if(this.isBuiltin())return this;var n=b.uniq(this.typeFamily());if(0==n.length)return t.NOTHING;if(this.isScalar())return this.isNumber()?\"number\"==typeof e?this:t.NOTHING:this.isString()?\"string\"==typeof e?this:t.NOTHING:this.isBoolean()?\"boolean\"==typeof e?this:t.NOTHING:this;if(1===n.length)return n[0];var r=[];n.forEach(function(t){t.validateDirect(e,!0).isOk()&&r.push(t)});var i=this.discriminate(e,r);return i?i:t.NOTHING},e.prototype.declareProperty=function(e,t,n){return n||this.addMeta(new k.HasProperty(e)),null!=t&&this.addMeta(new k.PropertyIs(e,t)),this},e.prototype.discriminate=function(e,t){for(var n=[].concat(t),r=[].concat(t);n.length>1;){e:for(var i=0;i<r.length;i++)for(var a=0;a<r.length;a++){var o=r[i],s=r[a];if(o!=s){var u=l(e,o,s);if(u===o){r=r.filter(function(e){return e!=s}),!0;break e}if(u===s){r=r.filter(function(e){return e!=o}),!0;break e}r=r.filter(function(e){return e!=o&&e!=s}),!0;break e}}n=r}return 1==n.length?n[0]:null},e.prototype.oneMeta=function(e){return b.find(this.meta(),function(t){return t instanceof e})},e.prototype.metaOfType=function(e){return this.meta().filter(function(t){return t instanceof e})},e.prototype.declaredMeta=function(){return this.metaInfo},e.prototype.descValue=function(){var e=this.oneMeta(x.DiscriminatorValue);return e?e.value():this.name()},e.prototype.isAbstractOrInternal=function(){return this.metaInfo.some(function(e){return e instanceof H||e instanceof Y})},e.prototype.typeFamily=function(){if(this.isUnion()){var e=[];return this.allSuperTypes().forEach(function(t){if(t instanceof Z)for(var n=t.allOptions(),r=0;r<n.length;r++)e=e.concat(n[r].typeFamily())}),b.unique(e)}var t=[];return this.isAbstractOrInternal()||t.push(this),this.allSubTypes().forEach(function(e){e.isAbstractOrInternal()||t.push(e)}),b.unique(t)},e.prototype.hasPropertiesFacet=function(){return this.metaInfo.some(function(e){return e instanceof x.HasPropertiesFacet})},e}();t.AbstractType=W;var q=function(e){function n(){e.apply(this,arguments)}return v(n,e),n.prototype.requiredType=function(){return t.ANY},n.prototype.kind=function(){return A.MetaInformationKind.Modifier},n}(C);t.Modifier=q;var z=function(e){function t(){e.call(this,!0)}return v(t,e),t.prototype.facetName=function(){return\"polymorphic\"},t.prototype.value=function(){return!0},t}(q);t.Polymorphic=z;var H=function(e){function t(){e.call(this,!1)}return v(t,e),t.prototype.value=function(){return!0},t.prototype.facetName=function(){return\"abstract\"},t}(q);t.Abstract=H;var Y=function(e){function t(){e.call(this,!1)}return v(t,e),t.prototype.facetName=function(){return\"abstract\"},t.prototype.value=function(){return!0},t}(q);t.Internal=Y;var J=function(e){function t(){e.call(this,!1)}return v(t,e),t.prototype.facetName=function(){return\"builtIn\"},t.prototype.value=function(){return!0},t}(q),G=new J,X=function(e){function t(){e.apply(this,arguments)}return v(t,e),t.prototype.kind=function(){return\"root\"},t}(W);t.RootType=X;var $=function(e){function t(){e.apply(this,arguments),this._superTypes=[]}return v(t,e),t.prototype.superTypes=function(){return this._superTypes},t.prototype.knownProperties=function(){var e=this.metaOfType(F.MatchesProperty);return this.superTypes().forEach(function(t){e=e.concat(t.knownProperties())}),e},t.prototype.kind=function(){return\"inherited\"},t.prototype.meta=function(){var t=this,n=e.prototype.meta.call(this);return this.superTypes().forEach(function(e){e.meta().forEach(function(e){if(e instanceof I.KnownPropertyRestriction){var r=new I.KnownPropertyRestriction(!1);return r.patchOwner(t),void n.push(r)}e.isInheritable()&&n.push(e)})}),n},t.prototype.addSuper=function(e){this._superTypes.push(e),e.isLocked()||e._subTypes.push(this),e.nullable&&(this.nullable=!0)},t.prototype.label=function(){var t=this.metaOfType(L.ComponentShouldBeOfType);return t.length>0?t[0].value().label()+\"[]\":e.prototype.label.call(this)},t.prototype.contextMeta=function(){return this._contextMeta},t.prototype.setContextMeta=function(e){this._contextMeta=e},t.prototype.patch=function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t])},t}(W);t.InheritedType=$;var Q=function(e){function t(t,n){e.call(this,t),this._options=n}return v(t,e),t.prototype.allOptions=function(){var e=this,t=[];return this._options.forEach(function(n){n.kind()==e.kind()?t=t.concat(n.allOptions()):t.push(n)}),b.unique(t)},t.prototype.options=function(){return this._options},t}(W);t.DerivedType=Q;var Z=function(e){function n(t,n){var r=this;e.call(this,t,n),this.options().forEach(function(e){e.nullable&&(r.nullable=!0)})}return v(n,e),n.prototype.kind=function(){return\"union\"},n.prototype.isSubTypeOf=function(e){var t=!0;return this.allOptions().forEach(function(n){n.isSubTypeOf(e)||(t=!1)}),t},n.prototype.validate=function(e){return this.validateDirect(e)},n.prototype.typeFamily=function(){var e=[];return this.allOptions().forEach(function(t){e=e.concat(t.typeFamily())}),e},n.prototype.knownProperties=function(){var e=this.metaOfType(F.MatchesProperty);return this.options().forEach(function(t){e=e.concat(t.knownProperties())}),e},n.prototype.validateDirect=function(e,t){void 0===t&&(t=!1);var n=new T(T.OK,\"\",\"\",this);return this.restrictions().forEach(function(t){return n.addSubStatus(t.check(e,null))}),n},n.prototype.isUnion=function(){return!0},n.prototype.restrictions=function(){return[new le(this.allOptions().map(function(e){return new pe(e.restrictions())}),t.messageRegistry.UNION_TYPE_FAILURE,t.messageRegistry.UNION_TYPE_FAILURE_DETAILS)]},n.prototype.label=function(){return this.options().map(function(e){return e.label()}).join(\"|\")},n}(Q);t.UnionType=Z;var ee=function(e){function t(){e.apply(this,arguments)}return v(t,e),t.prototype.kind=function(){return\"intersection\"},t.prototype.restrictions=function(){var e=[];return this.allOptions().forEach(function(t){return e=e.concat(t.restrictions())}),[new pe(e)]},t.prototype.label=function(){return this.options().map(function(e){return e.label()}).join(\"&\")},t.prototype.isIntersection=function(){return!0},t}(Q);t.IntersectionType=ee;var te=new B;t.builtInRegistry=a,t.union=o,t.intersect=s,t.derive=u,t.deriveObjectType=c;var ne=function(e){function n(){e.apply(this,arguments)}return v(n,e),n.prototype.check=function(e){return null===e||void 0===e?r():i(t.messageRegistry.NOTHING,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return\"nothing\"},n.prototype.value=function(){return\"!!!\"},n}(w);t.NothingRestriction=ne;var re=function(){function e(e,t,n){this._previous=e,this._restriction=t,this.id=n}return e.prototype.getRestriction=function(){return this._restriction},e.prototype.pop=function(){return this._previous},e.prototype.push=function(t){return new e(this,t,t.toString())},e}();t.RestrictionStackEntry=re;var ie=function(e){function t(t,n,r){e.call(this),this._entry=t,this._message=n,this._another=r}return v(t,e),t.prototype.getMessage=function(){return this._message},t.prototype.getStack=function(){return this._entry},t.prototype.another=function(){return this._another},t}(ne);t.NothingRestrictionWithLocation=ie;var ae=function(e){function t(){e.apply(this,arguments)}return v(t,e),t}(w);t.GenericTypeOf=ae;var oe=function(e){function n(t){e.call(this),this.val=t}return v(n,e),n.prototype.check=function(e){var n=typeof e;return null===e||void 0===e?r():(Array.isArray(e)&&(n=\"array\"),n===this.val?r():i(t.messageRegistry.TYPE_EXPECTED,this,{typeName:this.val}))},n.prototype.value=function(){return this.val},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return\"typeOf\"},n.prototype.composeWith=function(e){if(e instanceof n){return e.val==this.val?this:this.nothing(e)}return null},n.prototype.toString=function(){return\"should be of type \"+this.val},n}(ae);t.TypeOfRestriction=oe;var se=function(e){function n(){e.call(this)}return v(n,e),n.prototype.check=function(e){return\"number\"==typeof e&&p(e)?r():i(t.messageRegistry.INTEGER_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return\"should be integer\"},n}(ae);t.IntegerRestriction=se;var ue=function(e){function n(){e.call(this)}return v(n,e),n.prototype.check=function(e){return null===e||void 0==e||\"null\"===e?r():i(t.messageRegistry.NULL_EXPECTED,this)},n.prototype.requiredType=function(){return t.ANY},n.prototype.value=function(){return!0},n.prototype.facetName=function(){return\"should be null\"},n}(ae);t.NullRestriction=ue;var ce=function(e){function n(){e.call(this)}return v(n,e),n.prototype.check=function(e){return e?\"number\"==typeof e||\"boolean\"==typeof e||\"string\"==typeof e?r():i(t.messageRegistry.SCALAR_EXPECTED,this):r()},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return\"should be scalar\"},n.prototype.value=function(){return!0},n}(ae);t.ScalarRestriction=ce;var le=function(e){function n(t,n,r){e.call(this),this.val=t,this._extraMessage=n,this._extraOptionMessage=r}return v(n,e),n.prototype.check=function(e,t){for(var n=this,a=new T(T.OK,\"\",\"\",this),o=[],s=0;s<this.val.length;s++){var u=this.val[s].check(e,t);if(u.isOk())return r();o.push(u)}if(o.length>0){for(var c=0,l=o;c<l.length;c++){var p=l[c],f=null,d=p.getSource();if(d instanceof C){var m=d.owner();m&&(f=m.label())}p.getErrors().forEach(function(e){var t=e.getMessage(),r=e.getCode();if(f&&(t=f+\": \"+t),n._extraOptionMessage){var o=i(n._extraOptionMessage,n,{msg:t});t=o.getMessage(),r=o.getCode()}e.setMessage(t),e.setCode(r),a.addSubStatus(e)})}if(this._extraMessage){var h=0;o.forEach(function(e){return h=Math.max(h,e.getSeverity())}),a.addSubStatus(new T(h,this._extraMessage.code,this._extraMessage.message,this))}}return a},n.prototype.value=function(){return this.val.map(function(e){return e.value()})},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return\"or\"},n}(w);t.OrRestriction=le;var pe=function(e){function n(t){e.call(this),this.val=t}return v(n,e),n.prototype.value=function(){return this.val.map(function(e){return e.value()})},n.prototype.options=function(){return this.val},n.prototype.check=function(e,t){for(var n=0;n<this.val.length;n++){var i=this.val[n].check(e,t);if(!i.isOk())return i}return r()},n.prototype.requiredType=function(){return t.ANY},n.prototype.facetName=function(){return\"and\"},n}(w);t.AndRestriction=pe,t.ANY=new X(\"any\"),t.SCALAR=t.ANY.inherit(\"scalar\"),t.OBJECT=t.ANY.inherit(\"object\"),t.ARRAY=t.ANY.inherit(\"array\"),t.EXTERNAL=t.ANY.inherit(\"external\"),t.NUMBER=t.SCALAR.inherit(\"number\"),t.INTEGER=t.NUMBER.inherit(\"integer\"),t.BOOLEAN=t.SCALAR.inherit(\"boolean\"),t.STRING=t.SCALAR.inherit(\"string\"),t.NIL=t.SCALAR.inherit(\"nil\"),t.DATE_ONLY=t.SCALAR.inherit(\"date-only\"),t.TIME_ONLY=t.SCALAR.inherit(\"time-only\"),t.DATETIME_ONLY=t.SCALAR.inherit(\"datetime-only\"),t.DATETIME=t.SCALAR.inherit(\"datetime\"),t.FILE=t.SCALAR.inherit(\"file\"),t.NOTHING=new X(\"nothing\"),t.UNION=t.ANY.inherit(\"union\"),t.UNKNOWN=t.NOTHING.inherit(\"unknown\"),t.REFERENCE=t.NOTHING.inherit(\"reference\"),t.RECURRENT=t.NOTHING.inherit(\"recurrent\"),t.ANY.addMeta(G),t.NIL.addMeta(G),t.UNION.addMeta(G),t.SCALAR.addMeta(G),t.OBJECT.addMeta(G),t.ARRAY.addMeta(G),t.NUMBER.addMeta(G),t.INTEGER.addMeta(G),t.BOOLEAN.addMeta(G),t.STRING.addMeta(G),t.EXTERNAL.addMeta(G),t.UNKNOWN.addMeta(G),t.RECURRENT.addMeta(G),t.DATE_ONLY.addMeta(G),t.TIME_ONLY.addMeta(G),t.DATETIME_ONLY.addMeta(G),t.DATETIME.addMeta(G),t.FILE.addMeta(G),t.UNKNOWN.addMeta(G),t.UNKNOWN.lock(),t.RECURRENT.addMeta(G),t.RECURRENT.lock(),t.EXTERNAL.lock(),t.UNION.lock(),t.REFERENCE.lock(),te.addType(t.ANY),te.addType(t.SCALAR),te.addType(t.OBJECT),te.addType(t.ARRAY),te.addType(t.NUMBER),te.addType(t.INTEGER),te.addType(t.BOOLEAN),te.addType(t.NIL),te.addType(t.STRING),te.addType(t.DATE_ONLY),te.addType(t.TIME_ONLY),te.addType(t.DATETIME_ONLY),te.addType(t.DATETIME),te.addType(t.FILE),t.NOTHING.addMeta(new ne),t.NUMBER.addMeta(new oe(\"number\")),t.NUMBER.addMeta(new D.FacetDeclaration(\"format\",t.STRING,!0,!0)),t.BOOLEAN.addMeta(new oe(\"boolean\")),t.OBJECT.addMeta(new oe(\"object\")),t.ARRAY.addMeta(new oe(\"array\")),t.STRING.addMeta(new oe(\"string\")),t.INTEGER.addMeta(new se),t.NIL.addMeta(new ue);var fe=n(336);t.DATE_ONLY.addMeta(new fe.DateOnlyR),t.TIME_ONLY.addMeta(new fe.TimeOnlyR),t.DATETIME_ONLY.addMeta(new fe.DateTimeOnlyR),t.DATETIME.addMeta(new fe.DateTimeR),t.FILE.addMeta(new oe(\"string\"));var de=t.ARRAY.inherit(\"\");de.addMeta(new L.ComponentShouldBeOfType(t.STRING)),t.FILE.addMeta(new D.FacetDeclaration(\"fileTypes\",de,!0,!0)),t.FILE.addMeta(new D.FacetDeclaration(\"minLength\",t.INTEGER,!0,!0)),t.FILE.addMeta(new D.FacetDeclaration(\"maxLength\",t.INTEGER,!0,!0)),t.DATETIME.addMeta(new D.FacetDeclaration(\"format\",t.STRING,!0,!0)),t.NIL.nullable=!0,t.SCALAR.addMeta(new ce),te.types().forEach(function(e){return e.lock()});var me=function(e){function n(n,r,i,a,o){void 0===o&&(o=null),e.call(this,n),this._content=r,this.json=i,this.provider=a,this.addMeta(new k.MatchToSchema(r,o?o:a)),this.addSuper(t.EXTERNAL)}return v(n,e),n.prototype.getContentProvider=function(){return this.provider},n.prototype.setContentProvider=function(e){this.provider=e},n.prototype.kind=function(){return\"external\"},n.prototype.isJSON=function(){return this.json},n.prototype.schema=function(){return this._content},n}($);t.ExternalType=me,t.typePath=f;var he=function(e){function t(t,n){void 0===n&&(n={}),e.call(this),this.messageEntry=t,this.parameters=n,this.isWarning=!1,this.message=E(t,n)}return v(t,e),t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER_ValidationError)},t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&b.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ValidationError)},t.CLASS_IDENTIFIER_ValidationError=\"linter.ValidationError\",t}(Error);t.ValidationError=he,t.setValidationPath=m,t.patchPath=h;var ye=function(){function e(e,t){this._facet=e,this.reg=t}return e.prototype.kind=function(){return\"AnnotatedFacet\"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){return e._annotationsMap[t.name()]=t})),this._annotationsMap},e.prototype.annotations=function(){var e=this;return this._annotations||(this._annotations=this._facet.annotations().map(function(t){return new ve(t,e.reg)})),this._annotations},e.prototype.value=function(){return this._facet.value()},e.prototype.name=function(){return this._facet.facetName()},e.prototype.entry=function(){return this._facet},e}();t.AnnotatedFacet=ye;var _e=n(91),ge=function(){function e(e,t){this._type=e,this.reg=t}return e.prototype.kind=function(){return\"AnnotatedType\"},e.prototype.annotationsMap=function(){var e=this;return this._annotationsMap||(this._annotationsMap={},this.annotations().forEach(function(t){var n=t.name(),r=n.lastIndexOf(\".\");r>=0&&(n=n.substring(r+1)),e._annotationsMap[n]=t})),this._annotationsMap},e.prototype.annotations=function(){var e=this;return this._annotations||(this._annotations=this._type.meta().filter(function(e){return e.kind()==A.MetaInformationKind.Annotation}).map(function(t){return new ve(t,e.reg)})),this._annotations},e.prototype.value=function(){return _e.storeAsJSON(this._type)},e.prototype.name=function(){return this._type.name()},e.prototype.entry=function(){return this._type},e}();t.AnnotatedType=ge;var ve=function(){function e(e,t){this.actual=e}return e.prototype.name=function(){return this.actual.facetName()},e.prototype.value=function(){return this.actual.value()},e.prototype.definition=function(){return te.get(this.actual.facetName())},e.prototype.annotation=function(){return this.actual},e}();t.AnnotationInstance=ve,t.applyAnnotationValidationPlugins=y,t.applyTypeValidationPlugins=_},function(e,t,n){\"use strict\";function r(e,t){return f.serializeToXML(e,t)}function i(e,t){if(\"string\"==typeof e&&(t.isObject()||t.isArray()||t.isExternal()||t.isUnion())){var n=e,r=n.trim().charAt(0);if(\"{\"==r||\"[\"==r||\"null\"==n.trim())try{return JSON.parse(n)}catch(e){if(t.isObject()||t.isArray()){var i=s.error(u.CAN_NOT_PARSE_JSON,this,{msg:e.message});return i}}if(\"<\"==r)try{var a=f.readObject(n,t),o=f.getXmlErrors(a);if(o){var c=s.error(u.INVALID_XML,null);return o.forEach(function(e){return c.addSubStatus(e)}),c}return a}catch(e){}}return t.getExtra(d.REPEAT)&&(e=[e]),e}function a(e,t,n){t?s.setValidationPath(e,{name:\"examples\",child:{name:n}}):s.setValidationPath(e,{name:\"examples\",child:{name:n,child:{name:\"value\"}}})}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(6),u=s.messageRegistry,c=n(6),l=n(8),p=n(1),f=n(343),d=n(48),m=function(e){function t(t,n,r){void 0===r&&(r=!1),e.call(this,r),this._name=t,this._value=n}return o(t,e),t.prototype.value=function(){return this._value},t.prototype.requiredType=function(){return s.ANY},t.prototype.facetName=function(){return this._name},t.prototype.kind=function(){return null},t}(s.TypeInformation);t.MetaInfo=m;var h=function(e){function t(t){e.call(this,\"description\",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.Description},t}(m);t.Description=h;var y=function(e){function t(){e.call(this,\"notScalar\",!0)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.NotScalar},t}(m);t.NotScalar=y;var _=function(e){function t(t){e.call(this,\"displayName\",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.DisplayName},t}(m);t.DisplayName=_;var g=function(e){function t(t){e.call(this,\"usage\",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.Usage},t}(m);t.Usage=g;var v=function(e){function t(t,n){e.call(this,t,n)}return o(t,e),t.prototype.validateSelf=function(t,n){void 0===n&&(n=!1);var r=t.get(this.facetName());if(!r)return s.error(u.UNKNOWN_ANNOTATION,this,{facetName:this.facetName()});var i=s.ok(),a=this.value();a||r.isString()&&(a=\"\");var o=r.metaOfType(N),c=n?\"Example\":\"TypeDeclaration\";if(o.length>0){var l=[];if(0==o.filter(function(e){var t=e.value();return Array.isArray(t)?(l=l.concat(t),t.indexOf(c)>=0):(l.push(t),t==c)}).length){var p=l.map(function(e){return\"'\"+e+\"'\"}).join(\", \"),f=s.error(u.INVALID_ANNOTATION_LOCATION,this,{aName:e.prototype.facetName.call(this),aValues:p});i.addSubStatus(f)}}var d=r.validateDirect(a,!0,!1);if(!d.isOk()){var m=s.error(u.INVALID_ANNOTATION_VALUE,this,{msg:d.getMessage()});m.addSubStatus(d),i.addSubStatus(m)}return s.setValidationPath(i,{name:\"(\"+this.facetName()+\")\"}),i},t.prototype.kind=function(){return d.MetaInformationKind.Annotation},t.prototype.ownerFacet=function(){return this._ownerFacet},t.prototype.setOwnerFacet=function(e){this._ownerFacet=e},t}(m);t.Annotation=v;var b=function(e){function t(t,n,r,i){void 0===i&&(i=!1),e.call(this,t,n,!0),this.name=t,this._type=n,this.optional=r,this.builtIn=i}return o(t,e),t.prototype.actualName=function(){return\"?\"==this.name.charAt(this.name.length-1)?this.name.substr(0,this.name.length-1):this.name},t.prototype.isOptional=function(){return this.optional},t.prototype.type=function(){return this._type},t.prototype.kind=function(){return d.MetaInformationKind.FacetDeclaration},t.prototype.isBuiltIn=function(){return this.builtIn},t}(m);t.FacetDeclaration=b;var S=function(e){function t(t,n){e.call(this,t,n,!0)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.CustomFacet},t}(m);t.CustomFacet=S;var A=[{propName:\"strict\",propType:\"boolean\",messageEntry:u.STRICT_BOOLEAN},{propName:\"displayName\",propType:\"string\",messageEntry:u.DISPLAY_NAME_STRING},{propName:\"description\",propType:\"string\",messageEntry:u.DESCRIPTION_STRING}],T=function(e){function t(t){e.call(this,\"example\",t)}return o(t,e),t.prototype.validateSelf=function(e){var t=s.ok();t.addSubStatus(this.validateValue(e));var n=this.validateAnnotations(e);return s.setValidationPath(n,{name:this.facetName()}),t.addSubStatus(n),t},t.prototype.validateValue=function(e){var t=this.value(),n=!1,r=s.ok();if(\"object\"==typeof t&&t&&t.value){for(var a=0,o=A;a<o.length;a++){var c=o[a],l=c.propName,p=c.propType,f=t[l];if(f&&typeof f!=p&&(\"object\"==typeof f&&Object.keys(f).forEach(function(t){if(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1)){var n=new v(t.substring(1,t.length-1),f[t]),i=n.validateSelf(e,!0);s.setValidationPath(i,{name:\"example\",child:{name:l,child:{name:t}}}),r.addSubStatus(i)}}),!f.value&&typeof f.value!=p)){var d=s.error(c.messageEntry,this),m=f.value?{name:\"value\"}:null;s.setValidationPath(d,{name:\"example\",child:{name:l,child:m}}),r.addSubStatus(d)}}if(t.strict===!1||\"object\"==typeof t.strict&&t.strict.value===!1)return r;t=t.value,n=!0}var h=i(t,this.owner());if(h instanceof s.Status&&!h.isOk())return s.setValidationPath(h,{name:\"example\"}),r.addSubStatus(h),r;var y=this.owner().validateDirect(h,!0,!1);if(!y.isOk()){this.value();var _=s.error(u.INVALID_EXMAPLE,this,{msg:y.getMessage()});y.getErrors().forEach(function(e){_.addSubStatus(e),n?s.setValidationPath(e,{name:\"example\",child:{name:\"value\"}}):s.setValidationPath(e,{name:\"example\"})}),r.addSubStatus(_)}return r},t.prototype.validateAnnotations=function(e){var t=s.ok(),n=this.value();if(\"object\"==typeof n&&n&&n.value)for(var r=Object.keys(n).filter(function(e){return e.length>2&&\"(\"==e.charAt(0)&&\")\"==e.charAt(e.length-1)}),i=0,a=r;i<a.length;i++){var o=a[i],u=n[o],c=o.substring(1,o.length-1),l=new v(c,u);t.addSubStatus(l.validateSelf(e,!0))}return t},t.prototype.example=function(){var e=this.value();return\"object\"==typeof e&&e&&e.value&&(e=e.value),i(e,this.owner())},t.prototype.asXMLString=function(){var e=this.value();return\"string\"==typeof e&&0===e.trim().indexOf(\"<\")?e:r(i(e,this.owner()),this.owner())},t.prototype.kind=function(){return d.MetaInformationKind.Example},t}(m);t.Example=T;var E=function(e){function t(t){e.call(this,\"required\",t)}return o(t,e),t.prototype.validateSelf=function(t){var n=e.prototype.validateSelf.call(this,t);return\"boolean\"!=typeof this.value()&&(n=s.error(u.REQUIRED_BOOLEAN,this),s.setValidationPath(n,{name:this.facetName()})),n},t.prototype.kind=function(){return d.MetaInformationKind.Required},t}(m);t.Required=E;var C=function(e){function t(){e.call(this,\"hasPropertiesFacet\",null)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.HasPropertiesFacet},t}(m);t.HasPropertiesFacet=C;var N=function(e){function t(t){e.call(this,\"allowedTargets\",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.AllowedTargets},t}(m);t.AllowedTargets=N;var w=function(e){function t(t){e.call(this,\"examples\",t)}return o(t,e),t.prototype.examples=function(){var e=this,t=this.value(),n=[];return Object.keys(t).forEach(function(r){if(\"object\"==typeof t[r]&&t[r]){var a=t[r].value;a||(a=t[r]);var o=i(a,e.owner());n.push(o)}}),n},t.prototype.asXMLStrings=function(){var e=this,t=this.value(),n={};return Object.keys(t).forEach(function(a){var o=t[a];if(\"string\"==typeof o&&0===o.trim().indexOf(\"<\"))return void(n[a]=o);var s=i(o,e.owner());n[a]=r(s,e.owner())}),n},t.prototype.validateSelf=function(e){var t=this;if(\"object\"==typeof this.value()){var n=new c.Status(c.Status.OK,\"\",\"\",this),r=this.value();return r&&Object.keys(r).forEach(function(o){var u=r[o];if(u){\"object\"==typeof u&&u.value&&Object.keys(u).forEach(function(t){if(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1)){var i=new v(t.substring(1,t.length-1),r[o][t]),a=i.validateSelf(e,!0);s.setValidationPath(a,{name:\"examples\",child:{name:o,child:{name:t}}}),n.addSubStatus(a)}});var c=u.value,l=!c;if(l)c=u;else{for(var p=0,f=A;p<f.length;p++){var d=f[p];t.checkScalarProperty(u,o,d,e,n)}if(u.strict===!1||\"object\"==typeof u.strict&&u.strict.value===!1)return}var m=i(c,t.owner());if(m instanceof s.Status)return a(m,l,o),void n.addSubStatus(m);t.owner().validate(m,!0,!1).getErrors().forEach(function(e){n.addSubStatus(e),a(e,l,o)})}}),n}return s.error(u.EXMAPLES_MAP,this)},t.prototype.checkScalarProperty=function(e,t,n,r,i){var a=n.propName,o=n.propType,u=e[a];if(u&&typeof u!=o){var c=null;if(\"object\"==typeof u&&(c={name:\"value\"},Object.keys(u).forEach(function(n){if(\"(\"==n.charAt(0)&&\")\"==n.charAt(n.length-1)){var o=new v(n.substring(1,n.length-1),e[a][n]),u=o.validateSelf(r,!0);s.setValidationPath(u,{name:\"examples\",child:{name:t,child:{name:a,child:{name:n}}}}),i.addSubStatus(u)}})),!u.value&&typeof u.value!=o){var l=s.error(n.messageEntry,this);s.setValidationPath(l,{name:\"examples\",child:{name:t,child:{name:a,child:c}}}),i.addSubStatus(l)}}},t.prototype.kind=function(){return d.MetaInformationKind.Examples},t}(m);t.Examples=w;var k=function(e){function t(t){e.call(this,\"xml\",t)}return o(t,e),t.prototype.kind=function(){return d.MetaInformationKind.XMLInfo},t}(m);t.XMLInfo=k;var x=function(e){function t(t){e.call(this,\"default\",t)}return o(t,e),t.prototype.validateSelf=function(t){var n=this,r=e.prototype.validateSelf.call(this,t),i=this.owner().validateDirect(this.value(),!0);if(!i.isOk()){var a=s.error(u.INVALID_DEFAULT_VALUE,this,{msg:i.getMessage()});i.getErrors().forEach(function(e){a.addSubStatus(e),s.setValidationPath(e,{name:n.facetName()})}),r.addSubStatus(a)}return r},t.prototype.kind=function(){return d.MetaInformationKind.Default},t}(m);t.Default=x;var R=function(e){function t(t){e.call(this,!0),this.property=t}return o(t,e),t.prototype.requiredType=function(){return s.OBJECT},t.prototype.value=function(){return this.property},t.prototype.facetName=function(){return\"discriminator\"},t.prototype.validateSelf=function(t){var n=this,r=e.prototype.validateSelf.call(this,t);if(this.owner().isUnion())r=s.error(u.DISCRIMINATOR_FOR_UNION,this);else if(this.owner().isSubTypeOf(s.OBJECT))if(this.owner().getExtra(s.GLOBAL)===!1)r=s.error(u.DISCRIMINATOR_FOR_INLINE,this);else{var i=p.find(this.owner().meta(),function(e){return e instanceof l.PropertyIs&&e.propertyName()==n.value()});i?i.value().isScalar()||(r=s.error(u.SCALAR_FOR_DISCRIMINATOR,this)):r=s.error(u.UNKNOWN_FOR_DISCRIMINATOR,this,{value:this.value()},s.Status.WARNING)}else r=s.error(u.DISCRIMINATOR_FOR_OBJECT,this);return r.getValidationPath()||s.setValidationPath(r,{name:this.facetName()}),r},t.prototype.kind=function(){return d.MetaInformationKind.Discriminator},t}(s.TypeInformation);t.Discriminator=R;var I=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,!1),this._value=t,this.strict=n}return o(t,e),t.prototype.check=function(e,n){var r=this.owner(),i=this.value(),a=r.metaOfType(R);if(0==a.length)return s.ok();var o=a[0].value();if(i){if(e.hasOwnProperty(o)){for(var u=this.owner().allSubTypes().concat(this.owner()),l={},p=0,f=u;p<f.length;p++){var d=f[p],m=d.metaOfType(t);m&&m.length>0&&m.forEach(function(e){return l[e.value()]=!0})}var h=e[o];if(!l[h]){var y=s.error(c.Status.CODE_INCORRECT_DISCRIMINATOR,this,{rootType:r.name(),value:h,propName:o},c.Status.WARNING);return s.setValidationPath(y,{name:o,child:n}),y}return s.ok()}var _=s.error(c.Status.CODE_MISSING_DISCRIMINATOR,this,{rootType:r.name(),propName:o});return s.setValidationPath(_,n),_}return s.ok()},t.prototype.facetName=function(){return\"discriminatorValue\"},t.prototype.validateSelf=function(t){var n=e.prototype.validateSelf.call(this,t);if(this.strict){var r=this.owner().oneMeta(R);if(this.owner().isSubTypeOf(s.OBJECT))if(this.owner().getExtra(s.GLOBAL)===!1)n.addSubStatus(s.error(u.DISCRIMINATOR_FOR_INLINE,this));else if(r){var i=p.find(this.owner().meta(),function(e){return e instanceof l.PropertyIs&&e.propertyName()==r.value()});if(i){var a=i.value().validate(this.value());a.isOk()||n.addSubStatus(s.error(u.INVALID_DISCRIMINATOR_VALUE,this,{msg:a.getMessage()}))}}else n.addSubStatus(s.error(u.DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR,this));else n.addSubStatus(s.error(u.DISCRIMINATOR_FOR_OBJECT,this))}return n.getValidationPath()||s.setValidationPath(n,{name:this.facetName()}),n},t.prototype.requiredType=function(){return s.OBJECT},t.prototype.value=function(){return this._value},t.prototype.kind=function(){return d.MetaInformationKind.DiscriminatorValue},t.prototype.isStrict=function(){return this.strict},t}(s.Constraint);t.DiscriminatorValue=I},function(e,t,n){\"use strict\";function r(){return A.length>0?A[A.length-1]:null}function i(e){for(var t;e;)t=e.owner(),e=t instanceof p.InheritedType?t.contextMeta():null;A.push(t)}function a(e){for(void 0===e&&(e=0);A.length>e;)A.pop()}function o(){return A.length}function s(e){return parseFloat(e)==parseInt(e)&&!isNaN(e)}function u(e){e=e.map(function(e){return e.preoptimize()});var t=[];e.forEach(function(e){if(e instanceof h.AndRestriction){e.options().forEach(function(e){t.push(e)})}else t.push(e)});for(var n=!0;n;){n=!1;for(var r=0;r<t.length;r++){for(var i=0;i<t.length;i++){var a=t[r],o=t[i];if(a!==o){var s=a.tryCompose(o);if(s){var u=t.filter(function(e){return e!==a&&e!==o});u.push(s),n=!0,t=u;break}}}if(n)break}}return t}function c(e){if(!e.isSubTypeOf(p.UNKNOWN))return null;if(null!=e.name())return e;for(var t=0,n=e.superTypes();t<n.length;t++){var r=n[t],i=c(r);if(null!=i)return i}return e}var l=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},p=n(6),f=p.messageRegistry,d=n(92),m=n(1),h=n(6),y=n(6),_=function(e){function t(t){e.call(this),this._type=t}return l(t,e),t.prototype.matches=function(e){return!1},t.prototype.check=function(e,t){throw new Error(\"Should be never called\")},t.prototype.patchPath=function(e){if(e){for(var t=e,n=null,r=null;t;)if(n){var i={name:t.name};r.child=i,t=t.child,r=i}else n={name:t.name},r=n;return n.child={name:this.propId()},n}return{name:this.propId()}},t.prototype.validateProp=function(e,t,n,r){var i=e[t],a=n.validate(i,!1,!1);if(!a.isOk()){if(n.isUnknown()||n.isRecurrent()){var o=p.error(f.VALIDATING_AGAINS_UNKNOWN,this,{typeName:n.name()});return p.setValidationPath(o,this.patchPath(r)),o}var o=new y.Status(y.Status.OK,\"\",\"\",this);return a.getErrors().forEach(function(e){return o.addSubStatus(e)}),p.setValidationPath(o,this.patchPath(r)),o}return p.ok()},t.prototype.validateSelf=function(e){if(this._type.isExternal()){var t=p.error(f.EXTERNAL_IN_PROPERTY_DEFINITION,this);return p.setValidationPath(t,{name:this.propId()}),t}if(this._type.isSubTypeOf(p.UNKNOWN)||this._type.isSubTypeOf(p.RECURRENT)){var n=c(this._type),t=p.error(f.UNKNOWN_IN_PROPERTY_DEFINITION,this,{propName:this.propId(),typeName:n.name()});return p.setValidationPath(t,{name:this.propId(),child:{name:\"type\"}}),t}if(this._type.isAnonymous()){var r=this._type.validateType(e);if(!r.isOk()){var t=p.error(f.ERROR_IN_RANGE,this,{propName:this.propId(),msg:r.getMessage()});return r.getErrors().forEach(function(e){t.addSubStatus(e)}),p.setValidationPath(t,{name:this.propId()}),t}return r}if(this._type.isUnion()){var i=m.find(this._type.typeFamily(),function(e){return e.isSubTypeOf(p.UNKNOWN)});if(i){var t=p.error(f.UNKNOWN_IN_PROPERTY_DEFINITION,this,{propName:this.propId(),typeName:i.name()});return p.setValidationPath(t,{name:this.propId()}),t}}return p.ok()},t}(p.Constraint);t.MatchesProperty=_;var g=function(e){function t(t,n){e.call(this),this._value=t,this.provider=n}return l(t,e),t.prototype.value=function(){return this._value},t.prototype.check=function(e){var t=null,n=this.value();if(\"{\"==n.charAt(0))try{t=d.getJSONSchema(n,this.provider)}catch(e){return p.error(f.INCORRECT_SCHEMA,this,{msg:e.message})}if(\"<\"==n.charAt(0))try{t=d.getXMLSchema(n,this.provider)}catch(e){return p.ok()}if(t)try{t.validateObject(e)}catch(e){return\"!_PERF_!\"==e.message?p.error(f.UNABLE_TO_VALIDATE_XML,this,{},p.Status.WARNING):\"Maximum call stack size exceeded\"==e.message?p.error(f.CIRCULAR_REFS_IN_JSON_SCHEMA,this):p.error(f.EXAMPLE_SCHEMA_FAILURE,this,{msg:e.message})}return p.ok()},t.prototype.facetName=function(){return\"schema\"},t.prototype.requiredType=function(){return p.EXTERNAL},t}(p.Constraint);t.MatchToSchema=g;var v=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"closed\"},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.value=function(){return this._value},t.prototype.patchOwner=function(e){this._owner=e},t.prototype.check=function(e){var t=this;if(this._value===!1&&e&&\"object\"==typeof e&&!Array.isArray(e)){var n={};Object.getOwnPropertyNames(e).forEach(function(e){return n[e]=!0});var r=this.owner().knownProperties();Object.getOwnPropertyNames(e).forEach(function(e){r.forEach(function(t){t.matches(e)&&delete n[e]})});var i=Object.keys(n);if((this.owner().hasPropertiesFacet()||r.length>0)&&i.length>0){var a=new p.Status(p.Status.OK,\"\",\"\",this);return i.forEach(function(e){var n=p.error(f.UNKNOWN_PROPERTY,t,{propName:e});p.setValidationPath(n,{name:e}),a.addSubStatus(n)}),a}}return p.ok()},t.prototype.composeWith=function(e){if(!this._value)return null;if(e instanceof t){var n=e;if(m.isEqual(this.owner().propertySet(),n.owner().propertySet()))return n}if(e instanceof b){var r=e,i=r.value();if(this.owner().propertySet().indexOf(i)==-1)return this.nothing(r)}},t}(p.Constraint);t.KnownPropertyRestriction=v;var b=function(e){function t(t){e.call(this),this.name=t}return l(t,e),t.prototype.check=function(e){return e&&\"object\"==typeof e&&!Array.isArray(e)?e.hasOwnProperty(this.name)?p.ok():p.error(f.REQUIRED_PROPERTY_MISSING,this,{propName:this.name}):p.ok()},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.facetName=function(){return\"hasProperty\"},t.prototype.value=function(){return this.name},t.prototype.composeWith=function(e){if(e instanceof t){if(e.name===this.name)return this}return null},t}(p.Constraint);t.HasProperty=b;var S=function(e){function t(t,n,r){void 0===r&&(r=!1),e.call(this,n),this.name=t,this.type=n,this.optional=r}return l(t,e),t.prototype.matches=function(e){return e===this.name},t.prototype.path=function(){return this.name},t.prototype.check=function(e,t){if(e&&\"object\"==typeof e&&e.hasOwnProperty(this.name)){var n=this.validateProp(e,this.name,this.type,t);return!n.isOk()&&this.optional&&null==e[this.name]?p.ok():n}return p.ok()},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.propId=function(){return this.name},t.prototype.propertyName=function(){return this.name},t.prototype.facetName=function(){return\"propertyIs\"},t.prototype.value=function(){return this.type},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.name===this.name){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;i(e);var r=this.intersect(this.type,n.type);try{var a=r.checkConfluent();if(!a.isOk()){return a.toRestriction()}return new t(this.name,r)}finally{this.release(r)}}}return null},t}(_);t.PropertyIs=S;var A=[];t.anotherRestrictionComponent=r,t.releaseAnotherRestrictionComponent=a,t.anotherRestrictionComponentsCount=o;var T=function(e){function t(t,n){e.call(this,n),this.regexp=t,this.type=n}return l(t,e),t.prototype.path=function(){return\"/\"+this.regexp+\"/\"},t.prototype.matches=function(e){return!!e.match(this.regexp)},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.propId=function(){return\"[\"+this.regexp+\"]\"},t.prototype.facetName=function(){return\"mapPropertyIs\"},t.prototype.value=function(){return this.type},t.prototype.regexpValue=function(){return this.regexp},t.prototype.validateSelf=function(t){var n=this.checkValue();return n?p.error(f.INVALID_REGEXP,this,{msg:n}):e.prototype.validateSelf.call(this,t)},t.prototype.checkValue=function(){try{new RegExp(this.regexp)}catch(e){return e.message}return null},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.regexp===this.regexp){if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){return i.toRestriction()}return new t(this.regexp,r)}finally{this.release(r)}}}return null},t.prototype.check=function(e,t){if(e&&\"object\"==typeof e){var n={};null!=this._owner&&this._owner.meta().filter(function(e){return e instanceof S}).forEach(function(e){n[e.propertyName()]=!0});for(var r=new p.Status(p.Status.OK,\"\",\"\",this),i=0,a=Object.getOwnPropertyNames(e);i<a.length;i++){var o=a[i];if(!n[o]&&o.match(this.regexp)){var s=this.validateProp(e,o,this.type,t);s.isOk()||r.addSubStatus(s)}}return r}return p.ok()},t}(_);t.MapPropertyIs=T;var E=function(e){function t(t){e.call(this,t),this.type=t}return l(t,e),t.prototype.path=function(){return this.facetName()},t.prototype.matches=function(e){return!0},t.prototype.requiredType=function(){return p.OBJECT},t.prototype.propId=function(){return\"[]\"},t.prototype.facetName=function(){return\"additionalProperties\"},t.prototype.value=function(){return this.type},t.prototype.match=function(e){for(var t=this.owner().metaOfType(S),n=this.owner().metaOfType(T),r=0;r<t.length;r++)if(t[r].matches(e))return!0;for(var r=0;r<n.length;r++)if(n[r].matches(e))return!0;return!1},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){return i.toRestriction()}return new t(r)}finally{this.release(r)}}return null},t.prototype.check=function(e,t){var n=this,r=this.type,i=new p.Status(p.Status.OK,\"\",\"\",this);return e&&\"object\"==typeof e&&Object.getOwnPropertyNames(e).forEach(function(a){if(!n.match(a)){var o=n.validateProp(e,a,r,t);o.isOk()||i.addSubStatus(o)}}),i},t}(_);t.AdditionalPropertyIs=E;var C=function(e){function t(){e.apply(this,arguments)}return l(t,e),t.prototype.requiredTypes=function(){return[]},t.prototype.checkOwner=function(e){var t=!1;if(e.isUnion())for(var n=e.typeFamily(),r=0,i=n;r<i.length;r++){var a=i[r];if(this.owner().isSubTypeOf(a)){t=!0;break}}else t=this.owner().isSubTypeOf(e);return t},t.prototype.validateSelf=function(t){var n=this,r=e.prototype.validateSelf.call(this,t),i=!1;if(this.checkOwner(this.requiredType()))if(this.requiredTypes()&&this.requiredTypes().length>0){var a=(this.owner(),m.find(this.requiredTypes(),function(e){return n.checkOwner(e)}));a&&(i=!0)}else i=!0;var o;if(i)o=this.checkValue();else{var s=this.requiredType().name();this.requiredTypes()&&this.requiredTypes().length>0&&(s=\"[\"+this.requiredTypes().map(function(e){return e.name()}).join()+\"]\");var o=p.error(f.FACET_USAGE_RESTRICTION,this,{facetName:this.facetName(),typeNames:s})}if(o&&!o.isOk())return p.setValidationPath(o,{name:this.facetName()}),o;var u=[r,o].filter(function(e){return e&&!e.isOk()});if(0==u.length)return p.ok();if(1==u.length)return u[0];for(var c=p.ok(),l=0,d=u;l<d.length;l++){var h=d[l];c.addSubStatus(h)}return c},t}(p.Constraint);t.FacetRestriction=C;var N=function(e){function t(t,n,r,i,a,o){e.call(this),this._facetName=t,this._value=n,this._max=r,this._opposite=i,this._requiredType=a,this._isInt=o}return l(t,e),t.prototype.facetName=function(){return this._facetName},t.prototype.isIntConstraint=function(){return this._isInt},t.prototype.isMax=function(){return this._max},t.prototype.value=function(){return this._value},t.prototype.check=function(e){var t=this.extractValue(e);if(\"number\"==typeof t)if(this.isMax()){if(this.value()<t)return this.createError()}else if(this.value()>t)return this.createError();return p.ok()},t.prototype.createError=function(){return new y.Status(y.Status.ERROR,f.MINMAX_RESTRICTION_VIOLATION.code,this.toString(),this)},t.prototype.minValue=function(){return this._isInt?0:Number.NEGATIVE_INFINITY},t.prototype.requiredType=function(){return this._requiredType},t.prototype.checkValue=function(){return\"number\"!=typeof this._value?p.error(f.FACET_REQUIRE_NUMBER,this,{facetName:this.facetName()},p.Status.ERROR,!0):this.isIntConstraint()&&!s(this.value())?p.error(f.FACET_REQUIRE_INTEGER,this,{facetName:this.facetName()},p.Status.ERROR,!0):this.value()<this.minValue()?p.error(f.MIN_VALUE,this,{facetName:this.facetName(),minValue:this.minValue()},p.Status.ERROR,!0):void 0},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(n.facetName()==this.facetName()&&n.isMax()==this.isMax())return this.isMax()?this.value()<n.value()?n:this:this.value()>n.value()?n:this;if(n.facetName()===this._opposite)if(this.isMax()){if(n.value()>this.value())return this.nothing(e)}else if(n.value()<this.value())return this.nothing(e)}return null},t.prototype.facetPath=function(){var e=[this.facetName()],t=this._owner;if(null!=t&&t instanceof p.InheritedType){var n=t;e=p.typePath(n).concat(e)}return e.join(\".\")},t.prototype.toString=function(){return\"'\"+this.facetPath()+\"=\"+this.value()+\"' i.e. \"+this.textMessagePart()+\" \"+this.value()},t.prototype.conflictMessage=function(e,t){var n=this.isMax()?[\"less\",\"higher\"]:[\"higher\",\"less\"];return\"['\"+this.facetPath()+\"=\"+this.value()+\"' is \"+n[0]+\" than '\"+e+\"=\"+t+\"'. The \"+this._opposite+\" cannot be \"+n[1]+\" than the \"+this.facetName()+\".]\"},t}(C);t.MinMaxRestriction=N;var w=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.value=function(){return this._value},t.prototype.check=function(e){if(\"number\"==typeof e){if(!s(e/this.value()))return p.error(f.EVEN_RATIO,this,{val1:e,val2:this.value()})}return p.ok()},t.prototype.composeWith=function(e){return null},t.prototype.facetName=function(){return\"multipleOf\"},t.prototype.checkValue=function(){return\"number\"!=typeof this._value?p.error(f.FACET_REQUIRE_NUMBER,this,{facetName:this.facetName()},p.Status.ERROR,!0):this._value<=0?p.error(f.VALUE_SHOULD_BE_POSITIVE,this,{facetName:this.facetName()},p.Status.ERROR,!0):null},t.prototype.requiredType=function(){return p.NUMBER},t}(C);t.MultipleOf=w;var k=function(e){function t(t){e.call(this,\"maximum\",t,!0,\"minimum\",p.NUMBER,!1)}return l(t,e),t.prototype.extractValue=function(e){return e},t.prototype.textMessagePart=function(){return\"value should not be more than\"},t}(N);t.Maximum=k;var x=function(e){function t(t){e.call(this,\"minimum\",t,!1,\"maximum\",p.NUMBER,!1)}return l(t,e),t.prototype.extractValue=function(e){return e},t.prototype.textMessagePart=function(){return\"value should not be less than\"},t}(N);t.Minimum=x;var R=function(e){function t(t){e.call(this,\"maxItems\",t,!0,\"minItems\",p.ARRAY,!0)}return l(t,e),t.prototype.extractValue=function(e){if(Array.isArray(e))return e.length},t.prototype.textMessagePart=function(){return\"array items count should not be more than\"},t}(N);t.MaxItems=R;var I=function(e){function t(t){e.call(this,\"minItems\",t,!1,\"maxItems\",p.ARRAY,!0)}return l(t,e),t.prototype.extractValue=function(e){if(Array.isArray(e))return e.length},t.prototype.textMessagePart=function(){return\"array items count should not be less than\"},t}(N);t.MinItems=I;var D=function(e){function t(t){e.call(this,\"maxLength\",t,!0,\"minLength\",new p.UnionType(\"string and file\",[p.STRING,p.FILE]),!0)}return l(t,e),t.prototype.extractValue=function(e){return\"string\"==typeof e?e.length:0},t.prototype.textMessagePart=function(){return\"string length should not be more than\"},t}(N);t.MaxLength=D;var M=function(e){function t(t){e.call(this,\"minLength\",t,!1,\"maxLength\",new p.UnionType(\"string and file\",[p.STRING,p.FILE]),!0)}return l(t,e),t.prototype.extractValue=function(e){return\"string\"==typeof e?e.length:0},t.prototype.textMessagePart=function(){return\"string length should not be less than\"},t}(N);t.MinLength=M;var P=function(e){function t(t){e.call(this,\"maxProperties\",t,!0,\"minProperties\",p.OBJECT,!0)}return l(t,e),t.prototype.extractValue=function(e){return Object.keys(e).length},t.prototype.textMessagePart=function(){return\"object properties count should not be more than\"},t}(N);t.MaxProperties=P;var L=function(e){function t(t){e.call(this,\"minProperties\",t,!1,\"maxProperties\",p.OBJECT,!0)}return l(t,e),t.prototype.extractValue=function(e){return Object.keys(e).length},t.prototype.textMessagePart=function(){return\"object properties count should not be less than\"},t}(N);t.MinProperties=L;var O=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"uniqueItems\"},t.prototype.requiredType=function(){return p.ARRAY},t.prototype.check=function(e){if(!this._value)return p.ok();if(Array.isArray(e)){var t=e;if(m.unique(t).length!=t.length)return p.error(f.MUST_BE_UNIQUE,this)}return p.ok()},t.prototype.composeWith=function(e){if(e instanceof t){if(e._value==this._value)return this}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){return\"boolean\"!=typeof this._value?p.error(f.UNIQUE_ITEMS_BOOLEAN,this):null},t.prototype.toString=function(){return\"items should be unique\"},t}(C);t.UniqueItems=O;var U=function(e){function t(t){e.call(this),this.type=t}return l(t,e),t.prototype.facetName=function(){return\"items\"},t.prototype.requiredType=function(){return p.ARRAY},t.prototype.toString=function(){return\"items should be of type \"+this.type},t.prototype.check=function(e){var t=new p.Status(p.Status.OK,\"\",\"\",this);if(Array.isArray(e))for(var n=e,r=0;r<n.length;r++){var i=this.type.validate(n[r],!1,!1);if(!i.isOk()){var a=this.type;if(a.isUnknown()||a.isRecurrent()){var o=p.error(f.ARRAY_AGAINST_UNKNOWN,this,{typeName:a.name()});return o}}p.setValidationPath(i,{name:\"\"+r}),t.addSubStatus(i)}return t},t.prototype.validateSelf=function(t){var n=e.prototype.validateSelf.call(this,t);if(this.type.isAnonymous()){return this.type.validateType(t).isOk()||n.addSubStatus(p.error(f.INVALID_COMPONENT_TYPE,this,{msg:n.getMessage()})),n}if(this.type.isExternal())n.addSubStatus(p.error(f.EXTERNAL_AS_COMPONENT,this));else if(this.type.isSubTypeOf(p.UNKNOWN)||this.type.isSubTypeOf(p.RECURRENT))n.addSubStatus(p.error(f.UNKNOWN_AS_COMPONENT,this,{typeName:this.type.name()}));else if(this.type.isUnion()){var r=m.find(this.type.typeFamily(),function(e){return e.isSubTypeOf(p.UNKNOWN)});r&&n.addSubStatus(p.error(f.UNKNOWN_AS_COMPONENT,this,{typeName:r.name()}))}return n},t.prototype.composeWith=function(e){if(e instanceof t){var n=e;if(this.type.typeFamily().indexOf(n.type)!=-1)return n;if(n.type.typeFamily().indexOf(this.type)!=-1)return this;var r=this.intersect(this.type,n.type);try{var i=r.checkConfluent();if(!i.isOk()){return i.toRestriction()}return new t(r)}finally{this.release(r)}}return null},t.prototype.checkValue=function(){return null},t.prototype.value=function(){return this.type},t}(C);t.ComponentShouldBeOfType=U;var F=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"pattern\"},t.prototype.requiredType=function(){return p.STRING},t.prototype.check=function(e){if(\"string\"==typeof e){var t=e;try{var n=t.match(this._value),r=!1;if(n)for(var i=0,a=n;i<a.length;i++){var o=a[i];if(o.length==t.length){r=!0;break}}if(!r)return p.error(f.PATTERN_VIOLATION,this,{value:this.value()})}catch(e){}}return p.ok()},t.prototype.composeWith=function(e){if(e instanceof t){return e._value===this._value?this:this.nothing(e,\"pattern restrictions can not be composed at one type\")}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){try{new RegExp(this._value)}catch(e){return p.error(f.INVALID_REGEXP,this,{msg:e.message},p.Status.ERROR,!0)}return null},t.prototype.toString=function(){return\"should pass reg exp:\"+this.value},t}(C);t.Pattern=F;var B=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"fileTypes\"},t.prototype.requiredType=function(){return p.FILE},t.prototype.check=function(e){if(!Array.isArray(e))return p.error(f.FILE_TYPES_SHOULD_BE_AN_ARRAY,this);for(var t=0,n=e;t<n.length;t++){if(\"string\"!=typeof n[t])return p.error(f.FILE_TYPES_SHOULD_BE_AN_ARRAY,this)}return p.ok()},t.prototype.composeWith=function(e){if(e instanceof t){var n=e,r=m.intersection(this._value,n._value);return r.length>0?new t(r):this.nothing(e,\"no common file types\")}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){return p.ok()},t.prototype.toString=function(){return\"supported file types: \"+this._value.join(\", \")},t}(C);t.FileTypes=B;var K=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"format\"},t.prototype.requiredType=function(){return p.SCALAR},t.prototype.requiredTypes=function(){return[p.NUMBER,p.INTEGER,p.DATETIME]},t.prototype.check=function(e){return p.ok()},t.prototype.composeWith=function(e){if(e instanceof t){return e._value===this._value?this:this.nothing(e,\"Format restrictions can not be composed at one type\")}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){var e=this;try{var t=[];if(this.owner().isSubTypeOf(p.INTEGER))t=[\"int32\",\"int64\",\"int\",\"int16\",\"int8\"];else if(this.owner().isSubTypeOf(p.NUMBER))t=[\"int32\",\"int64\",\"int\",\"long\",\"float\",\"double\",\"int16\",\"int8\"];else{if(!this.owner().isSubTypeOf(p.DATETIME))return null;t=[\"rfc3339\",\"rfc2616\"]}if(!m.find(t,function(t){return t==e.value()}))return p.error(f.ALLOWED_FORMAT_VALUES,this,{allowedValues:t.map(function(e){return\"'\"+e+\"'\"}).join(\", \")},p.Status.ERROR,!0)}catch(e){return new y.Status(y.Status.ERROR,\"\",e.message,this)}return null},t.prototype.toString=function(){return\"should have format:\"+this.value},t}(C);t.Format=K;var V=function(e){function t(t){e.call(this),this._value=t}return l(t,e),t.prototype.facetName=function(){return\"enum\"},t.prototype.requiredType=function(){return p.ANY},t.prototype.check=function(e){if(!this.checkStatus){var t=this.value();if(Array.isArray(t)||(t=[t]),!t.some(function(t){return t==e})){var n=Array.isArray(this._value)?this._value.map(function(e){return\"'\"+e+\"'\"}).join(\", \"):\"'\"+this._value+\"'\";return p.error(f.ENUM_RESTRICTION,this,{values:n})}}return p.ok()},t.prototype.composeWith=function(e){if(e instanceof t){var n=e,r=m.intersection(this._value,n._value);return 0==r.length?this.nothing(e):new t(r)}return null},t.prototype.value=function(){return this._value},t.prototype.checkValue=function(){var e=this;if(!this.owner().isSubTypeOf(this.requiredType()))return p.error(f.ENUM_OWNER_TYPES,this,{typeNames:this.requiredType().name()},p.Status.ERROR,!0);if(this.requiredTypes()&&this.requiredTypes().length>0){var t=this.owner();if(!m.find(this.requiredTypes(),function(e){return t.isSubTypeOf(e)})){var n=\"[\"+this.requiredTypes().map(function(e){return\"'\"+e.name()+\"'\"}).join(\", \")+\"]\";return p.error(f.ENUM_OWNER_TYPES,this,{typeNames:n},p.Status.ERROR,!0)}}if(!Array.isArray(this._value))return p.error(f.ENUM_ARRAY,this,{},p.Status.ERROR,!0);var r=p.ok();this.checkStatus=!0;try{this._value.forEach(function(t,n){var i=e.owner().validate(t);i.isOk()||(p.setValidationPath(i,{name:n}),r.addSubStatus(i))})}finally{this.checkStatus=!1}return r},t.prototype.toString=function(){return\"value should be one of: \"+(Array.isArray(this._value)?this._value.map(function(e){return\"'\"+e+\"'\"}).join(\", \"):\"'\"+this._value+\"'\")},t}(C);t.Enum=V,t.optimize=u},function(e,t,n){\"use strict\";function r(){return new W}function i(e){if(null==e)return null;switch(e.kind){case N.Kind.SCALAR:return{errors:[],startPosition:e.startPosition,endPosition:e.endPosition,value:e.value,kind:N.Kind.SCALAR,parent:e.parent};case N.Kind.MAPPING:var t=e;return{errors:[],key:i(t.key),value:i(t.value),startPosition:t.startPosition,endPosition:t.endPosition,kind:N.Kind.MAPPING,parent:t.parent};case N.Kind.MAP:var n=e;return{errors:[],startPosition:e.startPosition,endPosition:e.endPosition,mappings:n.mappings.map(function(e){return i(e)}),kind:N.Kind.MAP,parent:n.parent}}return e}function a(e){return e.match(/^.*((\\r\\n|\\n|\\r)|$)/gm)}function o(e,t){for(var n=a(e),r=[],i=0;i<n.length;i++)0==i?r.push(n[0]):r.push(n[i].substring(t.length));return r.join(\"\")}function s(e){for(var t=\"\",n=0;n<e.length;n++){var r=e[n];if(\"\\r\"!=r&&\"\\n\"!=r){if(\" \"!=r&&\"\\t\"!=r)break;t+=r}}return t}function u(e,t){return e.substr(t.offset,t.replacementLength).indexOf(\"\\n\")!=-1||t.text.indexOf(\"\\n\")!=-1||void 0}function c(e){if(\"null\"==e)e=null;else if(\"~\"==e)e=null;else if(\"true\"==e)e=!0;else if(\"false\"==e)e=!1;else{var t=parseFloat(e);isNaN(t)||(\"\"+e).match(\"^[-+]?[0-9]*\\\\.?[0-9]+$\")&&(e=t)}return e}function l(e,t,n){return new X(N.newMapping(N.newScalar(e),N.newMap()),n,t,null,null)}function p(e){return new X(N.newMap(e),null,null,null,null)}function f(e){return new X(N.newScalar(e),null,null,null,null)}function d(e,t,n){return new X(e,n,t,null,null)}function m(e){return new X(N.newMapping(N.newScalar(e),N.newItems()),null,null,null,null)}function h(e){return new X(N.newMapping(N.newScalar(e),N.newMap()),null,null,null,null)}function y(e,t){return new X(N.newMapping(N.newScalar(e),N.newScalar(t)),null,null,null,null)}function _(e){if(!X.isInstance(e))return null;var t=e,n=new X(t.yamlNode(),t.unit(),null,null,null,!0);return n._errors=t._errors,n}function g(e){if(!X.isInstance(e))return null;var t=e,n=new X(t.yamlNode(),t.unit(),null,null,null,!1);return n._errors=t._errors,n}function v(e){var t=e.highLevelNode();if(t)return t.definition();var n=e.parent();if(!n)return null;var r=e.key();if(!r)return null;var i=n.nodeDefinition();if(!i)return null;if(!i.property)return null;var a=i.property(r);return a?a.range():null}function b(e,t,n,r){if(e.isOverlayOrExtension()){var i=e.getMasterReferenceNode();if(i){var a=i.value();if(a){var o=T.dirname(e.absolutePath()),s=A.toAbsolutePath(o,a);if(!t[s]){if(n[s])return void i.errors().push(new F(n[a]));var u=r[s];u||(u=[],r[s]=u),u.push(i)}}}}}function S(e,t){var n={},r={},i=[],a=function(t){for(var o=[],s={};t<i.length;){var u=i[t],c=u.absolutePath();b(u,n,r,s);u.getIncludeNodes().forEach(function(t){var i=t.includePath();if(i){if(M.getIncludeReference(i))return void o.push(e.resolveAsync(u.absolutePath(),i));if(i){var a=A.buildPath(i,c,e.getRootPath());if(!n[a]){if(r[a]&&t.errors)return void t.errors().push(new F(r[i]));var l=s[a];l||(l=[],s[a]=l),l.push(t)}}}}),t++}var l=Object.keys(s);if(0==o.length&&0==l.length)return Promise.resolve();var p=o;return l.forEach(function(t){p.push(e.unitAsync(t,!0).then(function(e){n[e.absolutePath()]||(n[e.absolutePath()]=!0,i.push(e))},function(n){var i=e.pathToUnit[t];s[t].forEach(function(e){i||e.errors&&e.errors().push(new F(n))}),r[t]=n,e.failedUnits[t]=n,i&&(n.inner=!0)}))}),Promise.all(p).then(function(e){return a(t)})};return e.unitAsync(t,T.isAbsolute(t)).then(function(e){return i.push(e),n[e.absolutePath()]=!0,a(0)}).then(function(e){return i.length>0?i[0]:null})}var A=n(20),T=n(11),E=n(162),C=n(47),N=n(14),w=n(1),k=n(64),x=n(4),R=n(141),I=n(28),D=n(15),M=n(142),P=n(327),L=n(3),O=n(25),U=n(60),F=N.YAMLException;t.Kind={SCALAR:N.Kind.SCALAR};var B=function(){function e(e){this.text=\"\",this.indent=e}return e.prototype.isLastNL=function(){return this.text.length>0&&\"\\n\"==this.text[this.text.length-1]},e.prototype.addWithIndent=function(e,t){this.isLastNL()&&(this.text+=k.indent(e),this.text+=this.indent),this.text+=t},e.prototype.addChar=function(e){this.isLastNL()&&(this.text+=this.indent),this.text+=e},e.prototype.append=function(e){for(var t=0;t<e.length;t++)this.addChar(e[t])},e}();t.MarkupIndentingBuffer=B;var K=function(){function e(e,t,n,r,i){this._path=e,this._content=t,this._tl=n,this._project=r,this._apath=i,this._includedByPaths=[],this._path=null!=this._path?this._path.replace(/\\\\/g,\"/\"):null}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&w.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.highLevel=function(){return this._hl?this._hl:(this._hl=x.fromUnit(this),this._hl)},e.prototype.isStubUnit=function(){return this.stu},e.prototype.resolveAsync=function(e){return this._project.resolveAsync(this._path,e)},e.prototype.getIncludeNodes=function(){var e=this.ast(),t=[];return null==e?[]:(e.gatherIncludes(t),e.children().forEach(function(e){\"uses\"==e.key()&&e.children().forEach(function(e){t.push({includePath:function(){var t=e.value();return\"string\"!=typeof t?null:t}})})}),t)},e.prototype.cloneToProject=function(t){return new e(this._path,this._content,this._tl,t,this._apath)},e.prototype.clone=function(){return new e(this._path,this._content,this._tl,this.project(),this._apath)},e.prototype.stub=function(){var t=new e(this._path,this._content,this._tl,this.project(),this._apath);return t.stu=!0,t},e.prototype.isDirty=function(){return!1},e.prototype.expandedHighLevel=function(){if(this.expanded)return this.expanded;var e=this.highLevel().asElement(),t=O.expandTraitsAndResourceTypes(e.wrapperNode()),n=t.highLevel();return n._expanded=!0,this.expanded=n,n},e.prototype.absolutePath=function(){return this._apath},e.prototype.isRAMLUnit=function(){var e=this.absolutePath();if(A.isWebPath(e))try{e=E.parse(e).pathname}catch(t){e=this._path}var t=T.extname(e);return\".raml\"==t||\".yaml\"==t||\".yml\"==t},e.prototype.contents=function(){return this._content},e.prototype.resolve=function(e){return\"string\"!=typeof e&&(e=\"\"+e),this._project.resolve(this._path,e)},e.prototype.path=function(){return this._path},e.prototype.lexerErrors=function(){return null==this.errors&&this.ast(),this.errors},e.prototype.ast=function(){var e=this;if(this._node)return this._node;try{var t=N.load(this._content,{ignoreDuplicateKeys:!0});return this.errors=t.errors,this.errors.forEach(function(t){t.mark&&(t.mark.filePath=e.absolutePath())}),this._node=new X(t,this,null,null,null),this._node._errors=this.errors,this._node}catch(e){return this.errors=[],this.errors.push(new F(e.message)),this._node=null,this._node}},e.prototype.isTopLevel=function(){return this._tl},e.prototype.updateContent=function(e){this._content=e,this.errors=null,this._node=null,this._lineMapper=null},e.prototype.updateContentSafe=function(e){this._content=e,this._lineMapper=null,this._hl=null},e.prototype.project=function(){return this._project},e.prototype.lineMapper=function(){return null==this._lineMapper&&(this._lineMapper=new A.LineMapperImpl(this.contents(),this.absolutePath())),this._lineMapper},e.prototype.isOverlayOrExtension=function(){for(var e=this.contents(),t=\"\",n=null,r=0,i=0,a=0;a<e.length;a++){var o=e.charAt(a);if(\"\\r\"==o||\"\\n\"==o){t?n=e.substring(i,a).trim():t=e.substring(0,a).trim();break}\" \"==o&&(r++,t||2!=r||(t=e.substring(0,a),i=a))}return\"Extension\"==n||\"Overlay\"==n},e.prototype.getMasterReferenceNode=function(){return w.find(this.ast().children(),function(e){return e.key()==L.Universe10.Overlay.properties.extends.name})},e.prototype.addIncludedBy=function(e){this.includedByContains(e)||this._includedByPaths.push(e)},e.prototype.includedByContains=function(e){return null!=w.find(this._includedByPaths,function(t){return t==e})},e.prototype.getIncludedByPaths=function(){return this._includedByPaths},e.CLASS_IDENTIFIER=\"jsyaml2lowLevel.CompilationUnit\",e}();t.CompilationUnit=K;var V=n(147).XMLHttpRequest,j=n(147).XMLHttpRequest,W=function(){function e(){}return e.prototype.open=function(e,t,n){this.xhr=n?new j:new V,this.async=n,this.xhr.open(e,t,n)},e.prototype.setRequestHeader=function(e,t){this.xhr.setRequestHeader(e,t)},e.prototype.getResponseHeader=function(e){return this.xhr.getResponseHeader(e)},e.prototype.getAllResponseHeaders=function(){return this.xhr.getAllResponseHeaders()},e.prototype.send=function(e){var t=this;this.xhr.onload=function(){return t.onResponse(!1)},this.xhr.onerror=function(){return t.onResponse(!0)},this.xhr.send(e)},e.prototype.onResponse=function(e){if(this.statusText=this.xhr.statusText,this.responseText=this.xhr.responseText,this.responseType=this.xhr.responseType,this.status=this.xhr.status,e&&this.onerror)return void this.onerror();this.onload&&this.onload()},e}();t.XMLHttpRequestWrapper=W,t.buildXHR=r;var q=function(){function e(){}return e.prototype.execute=function(e,t){void 0===t&&(t=!0);var n=r(),i=e.url;t&&(i=this.appendParams(e,e.url)),n.open(e.method,i,!1),this.doRequest(e,n);var a=n.status;if(a>300&&a<400){var o=n.getResponseHeader(\"location\");if(o)return e.url=o,this.execute(e,!1)}return{status:a,statusText:n.statusText,headers:n.getAllResponseHeaders().split(\"\\n\").map(function(e){var t=e.indexOf(\":\");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}}},e.prototype.appendParams=function(e,t){var n=e.queryString&&e.queryString.length>0;if(n){t+=\"?\";var r=[];n&&(r=r.concat(e.queryString.map(function(e){return encodeURIComponent(e.name)+\"=\"+encodeURIComponent(e.value)}))),t+=r.join(\"&\")}return t},e.prototype.log=function(e,t){},e.prototype.executeAsync=function(e,t){void 0===t&&(t=!0);var n=r(),i=e.url;t&&(i=this.appendParams(e,e.url));var a=this;return new Promise(function(t,r){n.open(e.method,i,!0),n.onload=function(){t({status:n.status,statusText:n.statusText,headers:n.getAllResponseHeaders().split(\"\\n\").map(function(e){var t=e.indexOf(\":\");return{name:e.substring(0,t).trim(),value:e.substring(t+1).trim()}}),content:{text:n.responseText,mimeType:n.responseType}})},n.onerror=function(){r(new F(\"Network Error\"))},a.doRequest(e,n)})},e.prototype.doRequest=function(e,t){if(e.headers&&e.headers.forEach(function(e){return t.setRequestHeader(e.name,e.value)}),e.postData)if(e.postData.params){var n=e.postData.params.map(function(e){return encodeURIComponent(e.name)+\"=\"+encodeURIComponent(e.value)}).join(\"&\");t.send(n)}else t.send(e.postData.text);else t.send()},e}();t.SimpleExecutor=q;var z=function(){function e(){this.executor=new q}return e.prototype.getResource=function(e){if(\"undefined\"!=typeof atom&&null!=atom){var t=I.get(e);if(t)return t;I.addNotify(e);try{var n={content:\"\"};return this.getResourceAsync(e).then(function(t){try{t.errorMessage?I.set(e,{content:null,errorMessage:null}):(t.errorMessage=null,I.set(e,t))}finally{n.callback&&n.callback(I.get(e)),I.removeNotity(e)}},function(t){I.set(e,{content:null,errorMessage:null}),n.callback&&n.callback(I.get(e)),I.removeNotity(e)}),n}catch(e){console.log(\"Error\"),console.log(e)}}var r=this.executor.execute({method:\"get\",url:e});if(!r)throw new F(\"Unable to execute GET \"+e);return this.toResponse(r,e)},e.prototype.getResourceAsync=function(e){var t=this;return this.executor.executeAsync({method:\"get\",url:e}).then(function(n){return n?t.toResponse(n,e):Promise.reject(new F(\"Unable to execute GET \"+e))},function(t){return Promise.reject(new F(\"Unable to execute GET \"+e))})},e.prototype.toResponse=function(e,t){var n=null;e.status>=400&&(n=\"GET \"+t+\"\\nreturned error: \"+e.status,e.statusText&&(n+=\" \"+e.statusText));var r=null;return e.content&&e.content.text&&(r=e.content.text),{content:r,errorMessage:n}},e}();t.HTTPResolverImpl=z;var H=function(){function e(){}return e.prototype.content=function(e){if(\"string\"!=typeof e&&(e=\"\"+e),!C.existsSync(e))return null;try{return C.readFileSync(e).toString()}catch(e){return null}},e.prototype.list=function(e){return C.readdirSync(e)},e.prototype.contentAsync=function(e){return new Promise(function(t,n){C.readFile(e,function(e,r){if(null!=e)return n(e);t(r.toString())})})},e.prototype.listAsync=function(e){return new Promise(function(t,n){C.readdir(e,function(e,r){if(null!=e)return t(e);n(r)})})},e}();t.FSResolverImpl=H;var Y=function(e,t,n){if(t&&(t.startPosition>=e&&(t.startPosition+=n),t.endPosition>e&&(t.endPosition+=n),t.kind==N.Kind.MAPPING)){var r=t;Y(e,r.key,n),Y(e,r.value,n)}},J=function(e,t){for(var n=\"\",r=e.start()-1;r>0;){var i=t[r];if(\" \"!=i&&\"-\"!=i)break;n=\" \"+n,r--}return n},G=function(){function e(e,t,n){this.rootPath=e,this.resolver=t,this._httpResolver=n,this.listeners=[],this.tlisteners=[],this.pathToUnit={},this.failedUnits={},this._fsEnabled=!0,this._namespaceResolver=new U.NamespaceResolver,null==this.resolver?this.resolver=new H:this._fsEnabled=!1,null==this._httpResolver&&(this._httpResolver=new z)}return e.prototype.getRootPath=function(){return this.rootPath},e.prototype.setFSResolver=function(e){this.resolver=e},e.prototype.setHTTPResolver=function(e){this._httpResolver=e},e.prototype.fsEnabled=function(){return this._fsEnabled},e.prototype.cloneWithResolver=function(t,n){void 0===n&&(n=null);var r=new e(this.rootPath,t,n?n:this._httpResolver);for(var i in this.pathToUnit)r.pathToUnit[i]=this.pathToUnit[i].cloneToProject(r);return r},e.prototype.setCachedUnitContent=function(e,t,n){void 0===n&&(n=!0);var r=e,i=A.toAbsolutePath(this.rootPath,e),a=new K(r,t,n,this,i);return this.pathToUnit[i]=a,a},e.prototype.resolveAsync=function(e,t){var n=this;if(!t)return Promise.reject(new F(\"Unit path is null\"));var r=M.getIncludeReference(t),i=t;r&&(t=r.getIncludePath());var a=A.buildPath(t,e,this.rootPath);if(r){var o=A.toAbsolutePath(T.dirname(A.toAbsolutePath(this.rootPath,e)),r.encodedName());this.pathToUnit[a]?Promise.resolve(void 0).then(function(e){return n.pathToUnit[o]=new K(r.encodedName(),M.resolveContents(i,n.pathToUnit[a].contents()),!1,n,o),n.pathToUnit[o]}):this.unitAsync(a,!0).then(function(e){return n.pathToUnit[a]=e,n.pathToUnit[o]=new K(r.encodedName(),M.resolveContents(i,n.pathToUnit[a].contents()),!1,n,o),n.pathToUnit[o]})}return this.unitAsync(a,!0)},e.prototype.resolve=function(e,t){if(!t)return null;t=t.replace(/\\\\/g,\"/\");var n=M.getIncludeReference(t),r=t;n&&(t=n.getIncludePath());var i=A.buildPath(t,e,this.rootPath);if(n){this.pathToUnit[i]||(this.pathToUnit[i]=this.unit(i,!0));var a=this.pathToUnit[i],o=A.toAbsolutePath(T.dirname(A.toAbsolutePath(this.rootPath,e)),n.encodedName());return this.pathToUnit[o]?this.pathToUnit[o]:(this.pathToUnit[o]=new K(n.encodedName(),M.resolveContents(r,a&&a.contents()),!1,this,o),this.pathToUnit[o])}return this.unit(i,!0)},e.prototype.units=function(){var e=this;if(!this.resolver.list)throw new F(\"Provided FSResolver is unable to list files. Please, use ExtendedFSResolver.\");return this.resolver.list(this.rootPath).filter(function(e){return\".raml\"==T.extname(e)}).map(function(t){return e.unit(t)}).filter(function(e){return e.isTopLevel()})},e.prototype.unitsAsync=function(){var e=this;return this.resolver.listAsync?this.resolver.listAsync(this.rootPath).then(function(t){var n=t.filter(function(e){return\".raml\"==T.extname(e)}).map(function(t){return e.unitAsync(t).then(function(e){return e.isTopLevel()?e:null},function(e){return null})});return Promise.all(n).then(function(e){return e.filter(function(e){return null!=e})})}):Promise.reject(new F(\"Provided FSResolver is unable to list files. Please, use ExtendedFSResolver.\"))},e.prototype.lexerErrors=function(){var e=[];return this.units().forEach(function(t){e=e.concat(t.lexerErrors())}),e},e.prototype.deleteUnit=function(e,t){void 0===t&&(t=!1);var n=null;n=A.isWebPath(e)?e:t?e:A.toAbsolutePath(this.rootPath,e),delete this.pathToUnit[n]},e.prototype.unit=function(e,t){if(void 0===t&&(t=!1),t||A.isWebPath(e)){if(null!=this.failedUnits[e]&&!this.failedUnits[e].inner)return null}else{var n=A.toAbsolutePath(this.rootPath,e);if(this.failedUnits[n]&&!this.failedUnits[e].inner)return null}var r,i=null,a=e;if(A.isWebPath(e)){if(this.pathToUnit[a])return this.pathToUnit[a];if(this._httpResolver){if((r=this._httpResolver.getResource(e))&&r.errorMessage)throw new F(r.errorMessage);i=r?r.content:null}else r=(new z).getResource(a),i=r?r.content:null}else{\"/\"!=e.charAt(0)||t||(e=e.substr(1));var a=A.toAbsolutePath(this.rootPath,e);if(this.pathToUnit[a])return this.pathToUnit[a];if(A.isWebPath(a))if(this._httpResolver){var o=this._httpResolver.getResource(a);if(o&&o.errorMessage)throw new F(o.errorMessage);i=o?o.content:null}else{var s=(new z).getResource(a);i=s?s.content:null}else i=this.resolver.content(a)}if(null==i)return null;var u=D.stringStartsWith(i,\"#%RAML\"),c=A.isWebPath(this.rootPath)==A.isWebPath(a)?T.relative(this.rootPath,a):a,l=new K(c,i,u,this,a);return this.pathToUnit[a]=l,r&&(r.callback=function(e){l.updateContent(e&&e.content)}),l},e.prototype.unitAsync=function(e,t){var n=this;void 0===t&&(t=!1);var r=null,i=e;if(A.isWebPath(e)){if(this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new F(e.errorMessage)):e.content})}else r=(new z).getResourceAsync(i)}else{if(\"/\"!=e.charAt(0)||t||(e=e.substr(1)),i=t?e:A.toAbsolutePath(this.rootPath,e),this.pathToUnit[i])return Promise.resolve(this.pathToUnit[i]);if(A.isWebPath(i))if(this._httpResolver){var a=this._httpResolver.getResourceAsync(i);r=a.then(function(e){return e.errorMessage?Promise.reject(new F(e.errorMessage)):e.content})}else r=(new z).getResourceAsync(i);else r=this.resolver.contentAsync(i)}if(null==r)return Promise.resolve(null);var o=A.isWebPath(this.rootPath)==A.isWebPath(i)?T.relative(this.rootPath,i):i;return r.then(function(e){if(null==e)return Promise.reject(new F(\"Can note resolve \"+i));var t=D.stringStartsWith(e,\"#%RAML\"),r=new K(o,e,t,n,i);return n.pathToUnit[i]=r,r},function(e){return\"object\"==typeof e&&e instanceof F?Promise.reject(e):Promise.reject(new F(e.toString()))}).then(function(e){return e.isRAMLUnit()?e:P.isScheme(e.contents())?P.startDownloadingReferencesAsync(e.contents(),e):e})},e.prototype.visualizeNewlines=function(e){for(var t=\"\",n=0;n<e.length;n++){var r=e[n];\"\\r\"==r&&(r=\"\\\\r\"),\"\\n\"==r&&(r=\"\\\\n\"),t+=r}return t},e.prototype.indent=function(e){var t=e.unit().contents();if(e==e.root())return\"\";var n=J(e,t),r=a(e.dump());if(r.length>1&&r[1].trim().length>0){return n+s(r[1])}return n+\"  \"},e.prototype.startIndent=function(e){e.unit().contents();if(e==e.root())return\"\";var t=a(e.dump());if(t.length>0){console.log(\"FIRST: \"+t[0]);return s(t[0])+\"  \"}return\"\"},e.prototype.canWriteInOneLine=function(e){return!1},e.prototype.isOneLine=function(e){return e.text().indexOf(\"\\n\")<0},e.prototype.recalcPositionsUp=function(e){for(var t=e;t;)t.recalcEndPositionFromChilds(),t=t.parent()},e.prototype.add2=function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.unit(),o=(e.root(),null);if(r&&(X.isInstance(r)&&(o=r),Q.isInstance(r)&&(o=r.point)),e.isValueInclude()){var s=e.children();if(0==s.length)throw new F(\"not implemented: insert into empty include ref\");var u=s[0].parent();return void this.add2(u,t,n,o,i)}var c=(new k.TextRange(a.contents(),t.start(),t.end()),new k.TextRange(a.contents(),e.start(),e.end()),e.unit().contents());e.valueKind()==N.Kind.SEQ&&(e=d(e.valueAsSeq(),e,e.unit()));var i=this.isJson(e),l=i?\"\":this.indent(e.isSeq()?e.parent():e),p=l,f=l.length,m=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value);(n=n)&&(i||m&&(p+=\"  \",f+=2));var h=new B(p);t.markupNode(h,t._actualNode(),0,i);var y=h.text;if(n){var _=k.trimEnd(y),g=y.length-_.length;if(g>0){var v=y.length;y=y.substring(0,v-g),t.shiftNodes(v-g,-g)}}n&&!i?(t.highLevelNode(),e.isMapping(),y=e.isSeq()||e.isMapping()&&(e.isValueSeq()||e.isValueScalar()||!e.asMapping().value)?l+\"- \"+y:l+y):y=l+y;var b=e.end();if(o)o!=e?b=o.end():i&&n||(b=e.keyEnd()+1,b=new k.TextRange(c,b,b).extendAnyUntilNewLines().endpos());else if(i&&n){var S=e.asSeq();S&&(b=S.items.length>0?S.items[S.items.length-1].endPosition:S.endPosition-1)}else if(r&&Q.isInstance(r)){var A=r;A.type==$.START&&(b=e.keyEnd()+1,b=new k.TextRange(c,b,b).extendAnyUntilNewLines().endpos())}if(b=new k.TextRange(c,0,b).extendToNewlines().reduceSpaces().endpos(),i&&e.isSeq()){var S=e.asSeq();S.items.length>0&&(y=\", \"+y,f+=2)}else b>0&&\"\\n\"!=c[b-1]&&(y=\"\\n\"+y,f++);var T=0;n&&!i&&(y+=\"\\n\",T++);var E=c.substring(0,b)+y+c.substring(b,c.length),C=a;if(C.updateContentSafe(E),this.executeReplace(new k.TextRange(c,b,b),y,C),e.root().shiftNodes(b,f+(t.end()-t.start())+T),o){for(var s=e.children(),w=-1,x=0;x<s.length;x++){var R=s[x];if(R.start()==o.start()&&R.end()==o.end()){w=x;break}}w>=0?e.addChild(t,w+1):e.addChild(t)}else e.addChild(t);t.shiftNodes(0,b+f),this.recalcPositionsUp(e),t.setUnit(e.unit()),t.visit(function(t){return t.setUnit(e.unit()),!0})},e.prototype.isJsonMap=function(e){if(!e.isMap())return!1;var t=e.text().trim();return t.length>=2&&\"{\"==t[0]&&\"}\"==t[t.length-1]},e.prototype.isJsonSeq=function(e){if(!e.isSeq())return!1;var t=e.text().trim();return t.length>=2&&\"[\"==t[0]&&\"]\"==t[t.length-1]},e.prototype.isJson=function(e){return this.isJsonMap(e)||this.isJsonSeq(e)},e.prototype.remove=function(e,t,n){var r=n.parent();if(n._oldText=n.dump(),this.isOneLine(n)&&n.isMapping()&&n.parent().isMap()){var i=n.parent();if(1==i.asMap().mappings.length&&null!=i.parent())return void this.remove(e,i.parent(),i)}if(this.isOneLine(n)&&n.isScalar()&&n.parent().isSeq()){var a=n.parent();if(1==a.asSeq().items.length)return void this.remove(e,a.parent(),a)}if(t.isMapping()&&n.isSeq()){var o=t.parent();return void this.remove(e,o,t)}var s=new k.TextRange(e.contents(),n.start(),n.end()),u=(new k.TextRange(e.contents(),t.start(),t.end()),new k.TextRange(e.contents(),r.start(),r.end()),s.startpos());if(t.isSeq()){var c=n.isSeq()?n:n.parentOfKind(N.Kind.SEQ);s=c&&this.isJson(c)?s.extendSpaces().extendCharIfAny(\",\").extendSpaces():s.extendToStartOfLine().extendAnyUntilNewLines().extendToNewlines()}t.isMap()&&(s=s.trimEnd().extendAnyUntilNewLines().extendToNewlines(),s=s.extendToStartOfLine().extendUntilNewlinesBack()),t.kind()==N.Kind.MAPPING&&(this.isJson(n)&&this.isOneLine(n)||(s=s.extendSpacesUntilNewLines(),s=s.extendToNewlines(),s=s.extendToStartOfLine().extendUntilNewlinesBack())),n.isSeq()&&(s=s.reduceSpaces());var l=e;l.updateContentSafe(s.remove()),this.executeReplace(s,\"\",l),n.parent().removeChild(n);var p=-s.len();t.root().shiftNodes(u,p),this.recalcPositionsUp(t)},e.prototype.changeKey=function(e,t,n){var r=new k.TextRange(t.unit().contents(),t.keyStart(),t.keyEnd());if(t.kind()==N.Kind.MAPPING){var i=t._actualNode().key;i.value=n,i.endPosition=i.startPosition+n.length}var a=e;this.executeReplace(r,n,a);var o=n.length-r.len();t.root().shiftNodes(r.startpos(),o,t),this.recalcPositionsUp(t)},e.prototype.executeReplace=function(e,t,n){var r=new A.TextChangeCommand(e.startpos(),e.endpos()-e.startpos(),t,n);n.project();try{this.tlisteners.forEach(function(e){return e(r)})}catch(e){return!1}var i=e.replace(t);return n.updateContentSafe(i),!0},e.prototype.changeValue=function(e,t,n){var r,i=new k.TextRange(t.unit().contents(),t.start(),t.end()),a=0,o=null,s=null;if(t.kind()==N.Kind.SCALAR){if(\"string\"!=typeof n)throw new F(\"not implemented\");t.asScalar().value=n,r=n}else if(t.kind()==N.Kind.MAPPING){if(s=t.asMapping(),t.isValueInclude()){var u=t.valueAsInclude(),c=u.value,l=c,f=t.unit().resolve(l);if(null==f)return void console.log(\"attr.setValue: couldn't resolve: \"+l);if(f.isRAMLUnit())return;return void(M.getIncludeReference(c)||f.updateContent(n))}if(i=s.value?i.withStart(t.valueStart()).withEnd(t.valueEnd()):i.withStart(t.keyEnd()+1).withEnd(t.keyEnd()+1),i=i.reduceNewlinesEnd(),null==n)r=\"\",s.value=null;else if(\"string\"==typeof n||null==n){var d=n,m=this.indent(t);if(d&&k.isMultiLine(d)&&(d=\"\"+k.makeMutiLine(d,m.length/2)),r=d,s.value){if(s.value.kind==N.Kind.SEQ){console.log(\"seq value\");s.value.items[0];throw\"assign value!!!\"}if(s.value.kind==N.Kind.SCALAR){var h=s.value,y=h.value||\"\";h.value=d,s.value.endPosition=s.value.startPosition+d.length,s.endPosition=s.value.endPosition,a+=d.length-y.length}}else if(console.log(\"no value\"),s.value=N.newScalar(d),s.value.startPosition=t.keyEnd()+1,s.value.endPosition=s.value.startPosition+d.length,s.endPosition=s.value.endPosition,e.contents().length>t.keyEnd()+1){var _=t.keyEnd()+1;\":\"==e.contents()[_-1]&&(r=\" \"+r,s.value.startPosition++,s.value.endPosition++,s.endPosition++,a++)}}else{var g=n;if(g.isMapping())n=p([g.asMapping()]),g=n;else if(!g.isMap())throw new F(\"only MAP/MAPPING nodes allowed as values\");var v=new B(\"\");g.markupNode(v,g._actualNode(),0,!0),r=\"\"+v.text,g.shiftNodes(0,i.startpos()+a),o=g}}else console.log(\"Unsupported change value case: \"+t.kindName());var b=e;this.executeReplace(i,r,b);var S=r.length-i.len();t.root().shiftNodes(i.endpos()+0,S,t),o&&(s.value=o._actualNode()),this.recalcPositionsUp(t)},e.prototype.initWithRoot=function(e,t){var n=e.end();t.markup(!1),t._actualNode().startPosition=n,t._actualNode().endPosition=n,t.setUnit(e.unit())},e.prototype.execute=function(e){var t=this;e.commands.forEach(function(e){switch(e.kind){case A.CommandKind.CHANGE_VALUE:var n=e.target,r=n.value();r||(r=\"\");var i=e.value;if(console.log(\"set value: \"+typeof r+\" ==> \"+typeof i),\"string\"!=typeof r&&\"number\"!=typeof r&&\"boolean\"!=typeof r||\"string\"!=typeof i)if(\"string\"!=typeof r&&\"number\"!=typeof r&&\"boolean\"!=typeof r||\"string\"==typeof i)if(\"string\"!=typeof r&&\"string\"==typeof i){var a=e.value;if(r.kind()!=N.Kind.MAPPING)throw new F(\"unsupported case: attribute value conversion: \"+typeof r+\" ==> \"+typeof i+\" not supported\");k.isMultiLine(a)?(n.children().forEach(function(e){t.remove(n.unit(),n,e)}),t.changeValue(n.unit(),n,a)):t.changeKey(n.unit(),r,a)}else{if(\"string\"==typeof r||\"string\"==typeof i)throw new F(\"shouldn't be this case: attribute value conversion \"+typeof r+\" ==> \"+typeof i+\" not supported\");var o=i;if(o.isMapping()&&(i=p([o.asMapping()])),r==i)break;var s=i;s.asMap();n.children().forEach(function(e){t.remove(n.unit(),n,e)}),s.children().forEach(function(e){}),t.changeValue(n.unit(),n,i)}else t.changeValue(n.unit(),n,i);else r!=i&&t.changeValue(n.unit(),n,i);return;case A.CommandKind.CHANGE_KEY:var n=e.target;return void t.changeKey(n.unit(),n,e.value);case A.CommandKind.ADD_CHILD:var n=e.target,u=e.value;return void t.add2(n,u,e.toSeq,e.insertionPoint);case A.CommandKind.REMOVE_CHILD:var c=e.target,s=e.value;return void t.remove(c.unit(),c,s);case A.CommandKind.INIT_RAML_FILE:var l=e.target,f=e.value;return void t.initWithRoot(l,f);default:return void console.log(\"UNSUPPORTED COMMAND: \"+A.CommandKind[e.kind])}})},e.prototype.replaceYamlNode=function(e,t,n,r,i){var a=N.load(t,{ignoreDuplicateKeys:!0});this.updatePositions(e.start(),a),e.root().shiftNodes(n,r);var o=e.parent(),s=e._actualNode(),u=s.parent;if(a.parent=u,o&&o.kind()==N.Kind.MAP){var c=o._actualNode();c.mappings=c.mappings.map(function(e){return e!=s?e:a})}e.updateFrom(a),this.recalcPositionsUp(e)},e.prototype.executeTextChange2=function(e){var t=e.unit,n=t.contents(),r=e.target;if(r){var i=n.substring(r.start(),r.end());n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);var a=i.substr(0,e.offset-r.start())+e.text+i.substr(e.offset-r.start()+e.replacementLength);if(t.updateContentSafe(n),e.offset>r.start())try{var o=e.text.length-e.replacementLength,s=e.offset;r.unit().project().replaceYamlNode(r,a,s,o,e.unit)}catch(e){console.log(\"New node contents (causes error below): \\n\"+a),console.log(\"Reparse error: \"+e.stack)}}else n=n.substr(0,e.offset)+e.text+n.substr(e.offset+e.replacementLength);t.updateContent(n),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})},e.prototype.executeTextChange=function(e){(new Date).getTime();try{var t=e.unit.contents(),n=e.target;null==n&&(n=this.findNode(e.unit.ast(),e.offset,e.offset+e.replacementLength));var r=e.unit;if(n){var a=t.substring(n.start(),n.end()),o=t;t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);var s=a.substr(0,e.offset-n.start())+e.text+a.substr(e.offset-n.start()+e.replacementLength);r.updateContentSafe(t);u(o,e);if(e.offset>n.start())try{var c=N.load(s,{ignoreDuplicateKeys:!0});this.updatePositions(n.start(),c);var l=e.text.length-e.replacementLength;if(e.unit.ast().shiftNodes(e.offset,l),null!=c&&c.kind==N.Kind.MAP){var p=c.mappings[0],f=n._actualNode(),d=f.parent,m=new A.ASTDelta,h=e.unit;if(m.commands=[new A.ASTChangeCommand(A.CommandKind.CHANGE_VALUE,new X(i(f),h,null,null,null),new X(p,h,null,null,null),0)],d&&d.kind==N.Kind.MAP){var y=d;y.mappings=y.mappings.map(function(e){return e!=f?e:p})}return p.parent=d,this.recalcPositionsUp(n),n.updateFrom(p),this.listeners.forEach(function(e){e(m)}),void this.tlisteners.forEach(function(t){t(e)})}}catch(e){console.log(\"New node contents (causes error below): \\n\"+s),console.log(\"Reparse error: \"+e.stack)}}else t=t.substr(0,e.offset)+e.text+t.substr(e.offset+e.replacementLength);(new Date).getTime();\n//!find node in scope\nr.updateContent(t),this.listeners.forEach(function(e){e(null)}),this.tlisteners.forEach(function(t){t(e)})}finally{(new Date).getTime()}},e.prototype.updatePositions=function(e,t){var n=this;if(null!=t)switch(t.startPosition==-1?t.startPosition=e:t.startPosition=e+t.startPosition,t.endPosition=e+t.endPosition,t.kind){case N.Kind.MAP:t.mappings.forEach(function(t){return n.updatePositions(e,t)});break;case N.Kind.MAPPING:var r=t;this.updatePositions(e,r.key),this.updatePositions(e,r.value);break;case N.Kind.SCALAR:break;case N.Kind.SEQ:t.items.forEach(function(t){return n.updatePositions(e,t)})}},e.prototype.findNode=function(e,t,n){var r=this;if(null==e)return null;var i=e;if(e.start()<=t&&e.end()>=n){var a=e;return i.directChildren().forEach(function(e){var i=r.findNode(e,t,n);i&&(a=i)}),a}return null},e.prototype.addTextChangeListener=function(e){this.tlisteners.push(e)},e.prototype.removeTextChangeListener=function(e){this.tlisteners=this.tlisteners.filter(function(t){return t!=e})},e.prototype.addListener=function(e){this.listeners.push(e)},e.prototype.removeListener=function(e){this.listeners=this.listeners.filter(function(t){return t!=e})},e.prototype.namespaceResolver=function(){return this._namespaceResolver},e}();t.Project=G;var X=function(){function e(e,t,n,r,i,a,o){void 0===a&&(a=!1),void 0===o&&(o=!1),this._node=e,this._unit=t,this._parent=n,this._anchor=r,this._include=i,this.cacheChildren=a,this._includesContents=o,this._errors=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&w.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.actual=function(){return this._node},e.prototype.yamlNode=function(){return this._node},e.prototype.includesContents=function(){return this._includesContents},e.prototype.setIncludesContents=function(e){this._includesContents=e},e.prototype.gatherIncludes=function(t,n,r,i){var a=this;if(void 0===t&&(t=[]),void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=!0),null!=this._node){var o=this._node.kind;if(o!=N.Kind.SCALAR)if(o==N.Kind.MAP){var s=this._node;1!=s.mappings.length||i?s.mappings.map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)}):new e(s.mappings[0].value,this._unit,this,n,r,this.cacheChildren).gatherIncludes(t)}else if(o==N.Kind.MAPPING){var u=this._node;null==u.value||new e(u.value,this._unit,this,r?r:this._anchor,n?n:this._include,this.cacheChildren).gatherIncludes(t)}else if(o==N.Kind.SEQ){var c=this._node;c.items.filter(function(e){return null!=e}).map(function(t){return new e(t,a._unit,a,r?r:a._anchor,n?n:a._include,a.cacheChildren)}).forEach(function(e){return e.gatherIncludes(t)})}else o==N.Kind.INCLUDE_REF&&this._unit&&t.push(this);else if(P.isScheme(this._node.value)){var l=P.getReferences(this._node.value,this.unit());l.forEach(function(n){var r=N.newScalar(n);r.kind=N.Kind.INCLUDE_REF;var i=new e(r,a.unit(),null,null,null);t.push(i)})}}},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.start=function(){return this._node.startPosition},e.prototype.errors=function(){return this._errors},e.prototype.addIncludeError=function(e){if(!w.find(this._errors,function(t){return t.message==e.message})){var t=this._node;t.includeErrors||(t.includeErrors=[]),w.find(t.includeErrors,function(t){return t.message==e.message})||(this._errors.push(e),t.includeErrors.push(e))}},e.prototype.parent=function(){return this._parent},e.prototype.recalcEndPositionFromChilds=function(){var e=(this.children(),this.children()[0]),t=this.children()[this.children().length-1];if(this.isMapping()){var n=this.asMapping();if(n.value)if(n.value.kind==N.Kind.MAP){var r=n.value;r.startPosition<0&&e&&(r.startPosition=e.start()),t&&(this._node.endPosition=t._node.endPosition),this._node.endPosition=Math.max(this._node.endPosition,n.value.endPosition)}else if(n.value.kind==N.Kind.SEQ){var i=n.value;if(i.startPosition<0&&i.items.length>0){var a=i.items[0].startPosition,o=new k.TextRange(this.unit().contents(),a,a);o=o.extendSpacesBack().extendCharIfAnyBack(\"-\"),i.startPosition=o.startpos()}if(i.items.length>0){var s=i.items[i.items.length-1];this._node.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition),i.endPosition=Math.max(this._node.endPosition,i.endPosition,s.endPosition)}}else n.value.kind==N.Kind.SCALAR||t&&(this._node.endPosition=t._node.endPosition)}else t&&(this._node.endPosition=t._node.endPosition)},e.prototype.isValueLocal=function(){if(this._node.kind==N.Kind.MAPPING){var e=this._node.value.kind;return e!=N.Kind.INCLUDE_REF&&e!=N.Kind.ANCHOR_REF}return!0},e.prototype.keyStart=function(){return this._node.kind==N.Kind.MAPPING?this._node.key.startPosition:-1},e.prototype.keyEnd=function(){return this._node.kind==N.Kind.MAPPING?this._node.key.endPosition:-1},e.prototype.valueStart=function(){if(this._node.kind==N.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.startPosition:e.endPosition}return this._node.kind==N.Kind.SCALAR?this.start():-1},e.prototype.valueEnd=function(){if(this._node.kind==N.Kind.MAPPING){var e=this.asMapping();return e.value?e.value.endPosition:e.endPosition}return this._node.kind==N.Kind.SCALAR?this.end():-1},e.prototype.end=function(){return this._node.endPosition},e.prototype.dump=function(){if(this._oldText)return this._oldText;if(this._unit&&this._node.startPosition>0&&this._node.endPosition>0){var e=this._unit.contents().substring(this._node.startPosition,this._node.endPosition);return e=o(e,J(this,this._unit.contents()))}return N.dump(this.dumpToObject(),{})},e.prototype.dumpToObject=function(e){return void 0===e&&(e=!1),this.dumpNode(this._node,e)},e.prototype.dumpNode=function(e,t){var n=this;if(void 0===t&&(t=!1),!e)return null;if(e.kind==N.Kind.INCLUDE_REF){if(this._unit){var r=e,i=r.value,a=null;try{a=this._unit.resolve(i)}catch(e){}if(null==a)return null;if(a.isRAMLUnit()&&this.canInclude(a)){var o=this.unit(),s=a;s.addIncludedBy(o.absolutePath()),o.getIncludedByPaths().forEach(function(e){s.addIncludedBy(e)});var u=a.ast();if(u)return u.dumpToObject(t)}else if(this.canInclude(a))return a.contents()}return null}if(e.kind==N.Kind.SEQ){var l=e,p=[];return l.items.forEach(function(e){return p.push(n.dumpNode(e,t))}),p}if(e.kind==N.Kind.ANCHOR_REF){var f=e;return this.dumpNode(f.value,t)}if(e.kind==N.Kind.MAPPING){var d=e,m={},h=d.value,y=this.dumpNode(h,t);return m[\"\"+this.dumpNode(d.key,t)]=y,m}if(e.kind==N.Kind.SCALAR){var r=e,_=r.value;return r.plainScalar&&(_=c(_)),_}if(e.kind==N.Kind.MAP){var g=e,v={};return g.mappings&&g.mappings.forEach(function(e){var r=n.dumpNode(e.value,t);null==r&&(r=t?\"!$$$novalue\":r),v[n.dumpNode(e.key,t)+\"\"]=r}),v}},e.prototype.keyKind=function(){return this._node.key?this._node.key.kind:null},e.prototype._actualNode=function(){return this._node},e.prototype.execute=function(e){this.unit()?this.unit().project().execute(e):e.commands.forEach(function(e){switch(e.kind){case A.CommandKind.CHANGE_VALUE:var t=e.target,n=e.value,r=t._actualNode();t.start();return void(r.kind==N.Kind.MAPPING&&(r.value=N.newScalar(\"\"+n)));case A.CommandKind.CHANGE_KEY:var t=e.target,n=e.value,r=t._actualNode();if(r.kind==N.Kind.MAPPING){r.key.value=n}return}})},e.prototype.updateFrom=function(e){this._node=e},e.prototype.isAnnotatedScalar=function(){if(!this.unit())return!1;var e;if(this.kind()==N.Kind.MAPPING&&this.valueKind()==N.Kind.MAP?e=this._node.value.mappings:null==this.key()&&this.kind()==N.Kind.MAP&&(e=this._node.mappings),e){var t=e.length>0;return e.forEach(function(e){\"value\"!==e.key.value&&(e.key.value&&\"(\"==e.key.value.charAt(0)&&\")\"==e.key.value.charAt(e.key.value.length-1)||(t=!1))}),t}return!1},e.prototype.value=function(t){if(!this._node)return\"\";if(this._node.kind==N.Kind.SCALAR){if(\"~\"===this._node.value&&null===this._node.valueObject)return t?\"null\":null;if(!t&&\"\"+this._node.valueObject===this._node.value)return this._node.valueObject;var n=this._node.value;return t||this._node.plainScalar&&(n=c(n)),n}if(this._node.kind==N.Kind.ANCHOR_REF){return new e(this._node.value,this._unit,this,null,null).value(t)}if(this._node.kind==N.Kind.MAPPING){var r=this._node;if(null==r.value)return null;if(this.isAnnotatedScalar())for(var i=new e(r.value,this._unit,this,null,null),a=i.children(),o=0;o<a.length;o++)if(\"value\"===a[o].key())return a[o].valueKind()==N.Kind.SEQ?a[o].children().map(function(e){return e.value()}):a[o].value();return new e(r.value,this._unit,this,null,null).value(t)}if(this._node.kind==N.Kind.INCLUDE_REF){var s=this._node.value,u=s,l=null;try{l=this._unit.resolve(u)}catch(e){return\"can not resolve \"+u+\" due to: \"+e.message}if(null==l)return\"can not resolve \"+u;if(l.isRAMLUnit()){var p=l.ast();return p?p.value():\"can not resolve \"+u+\" due to: file is empty\"}var f=l.contents();return k.isMultiLineValue(f)&&(f=k.fromMutiLine(f)),f}if(this._node.kind==N.Kind.MAP){var d=this._node;if(1==d.mappings.length)return new e(d.mappings[0],this._unit,this,null,null);if(this.isAnnotatedScalar())for(var a=this.children(),o=0;o<a.length;o++)if(\"value\"===a[o].key())return a[o].valueKind()==N.Kind.SEQ?a[o].children().map(function(e){return e.value()}):a[o].value()}if(this._node.kind==N.Kind.SEQ){var m=this._node;if(1==m.items.length)return new e(m.items[0],this._unit,this,null,null).value(t)}return null},e.prototype.printDetails=function(e){var t=\"\";e||(e=\"\");var n=this.kindName();return this.kind()==N.Kind.SCALAR?t+=e+\"[\"+n+\"] \"+this.value()+\"\\n\":this.kind()==N.Kind.MAPPING&&this._node.value&&this._node.value.kind==N.Kind.SCALAR?t+=e+\"[\"+n+\"] \"+this.key()+\" = \"+this.value()+\"\\n\":this.kind()==N.Kind.MAPPING?(t+=e+\"[\"+n+\"] \"+this.key()+\" = :\\n\",this.children().forEach(function(n){t+=n.printDetails(e+\"\\t\")})):(t+=e+\"[\"+n+\"] :\\n\",this.children().forEach(function(n){t+=n.printDetails(e+\"\\t\")})),t},e.prototype.visit=function(e){this.children().forEach(function(t){e(t)&&t.visit(e)})},e.prototype.rawKey=function(){if(!this._node)return\"\";if(this._node.kind==N.Kind.MAPPING){var e=this._node;if(e.key.kind==N.Kind.SEQ){var t=e.key,n=\"[\";return t.items.forEach(function(e){return n+=e.value}),n+\"]\"}return e.key.value}if(this._node.kind==N.Kind.INCLUDE_REF){var r=this.children();if(1==r.length)return r[0].key()}return null},e.prototype.key=function(e){void 0===e&&(e=!1);var t=this.rawKey();return e?t:(null!=t&&D.stringEndsWith(t,\"?\")&&(t=t.substring(0,t.length-1)),t)},e.prototype.optional=function(){var e=this.rawKey();return null!=e&&D.stringEndsWith(e,\"?\")},e.prototype.addChild=function(e,t){void 0===t&&(t=-1);var n=e;if(n._parent=this,this._oldText=null,this.isMap()){var r=this.asMap();null!=r.mappings&&void 0!=r.mappings||(r.mappings=[]),t>=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else if(this.isMapping()){var i=this.asMapping(),a=i.value;if(!i.value&&n.isMap())return void(i.value=n._actualNode());if(i.value&&i.value.kind==N.Kind.SCALAR&&(i.value=null,a=null),a||(a=n.isScalar()||n.highLevelNode()&&n.highLevelNode().property().getAdapter(R.RAMLPropertyParserService).isEmbedMap()?N.newSeq():N.newMap(),i.value=a),a.kind==N.Kind.MAP){var r=a;null!=r.mappings&&void 0!=r.mappings||(r.mappings=[]),n.isScalar(),t>=0?r.mappings.splice(t,0,n.asMapping()):r.mappings.push(n.asMapping())}else{if(a.kind!=N.Kind.SEQ)throw new F(\"Insert into mapping with \"+N.Kind[i.value.kind]+\" value not supported\");var o=a;t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}}else{if(!this.isSeq())throw new F(\"Insert into \"+this.kindName()+\" not supported\");var o=this.asSeq();t>=0?o.items.splice(t,0,n._actualNode()):o.items.push(n._actualNode())}},e.prototype.removeChild=function(e){this._oldText=null;var t,n,r=e;if(this.kind()==N.Kind.SEQ){var i=this.asSeq();t=r._node,n=i.items.indexOf(t),n>-1&&i.items.splice(n,1)}else if(this.kind()==N.Kind.MAP){var a=this.asMap();t=r.asMapping(),n=a.mappings.indexOf(t),n>-1&&a.mappings.splice(n,1)}else{if(this.kind()!=N.Kind.MAPPING)throw new F(\"Delete from \"+N.Kind[this.kind()]+\" unsupported\");var o=this.asMapping();if(r._actualNode()==o.value)o.value=null;else{var a=o.value;t=r.asMapping(),a&&a.mappings&&(n=a.mappings.indexOf(t))>-1&&a.mappings.splice(n,1)}}},e.prototype.hasInnerIncludeError=function(){return this.innerIncludeErrors},e.prototype.includeErrors=function(){if(this._node.kind==N.Kind.MAPPING){var t=this._node;if(null==t.value)return[];var n=new e(t.value,this._unit,this,this._anchor,this._include),r=n.includeErrors();return this.innerIncludeErrors=n.hasInnerIncludeError(),r}var i=[];if(this._node.kind==N.Kind.INCLUDE_REF){var t=this._node;if(null==t.value)return[];var a=this.includePath(),o=null;try{o=this._unit.resolve(a)}catch(e){this.innerIncludeErrors=e.inner;var s=\"Can not resolve \"+a+\" due to: \"+e.message;return i.push(s),i}var u=this._node.includeErrors;if(u&&u.length>0)return this.innerIncludeErrors=!0,i=u.map(function(e){return\"object\"==typeof e&&e instanceof F?e.message:e.toString()});if(null==o)return i.push(\"Can not resolve \"+a),i;if(o.isRAMLUnit()){if(o.ast())return[];i.push(a+\" can not be parsed\")}}return i},e.prototype.joinMappingsWithFullIncludeAnchor=function(t,n,r){var i=this,a=w.find(t,function(e){return e.key&&e.value&&e.key.kind==N.Kind.SCALAR&&\"<<\"==e.key.value&&e.value.kind==N.Kind.ANCHOR_REF});if(!a)return t.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)});var o=w.filter(t,function(e){return!(e.key.kind==N.Kind.SCALAR&&\"<<\"==e.key.value&&e.value.kind==N.Kind.ANCHOR_REF)}),s=new e(a.value,this._unit,this,n,r,this.cacheChildren).children(null,null,!0);return o.map(function(t){return new e(t,i._unit,i,r?r:i._anchor,n?n:i._include,i.cacheChildren)}).concat(s)},e.prototype.children=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),null==this._node)return[];if(this.cacheChildren&&this._children)return this._children;var a,o=this._node.kind;if(o==N.Kind.SCALAR)a=[];else if(o==N.Kind.MAP){var s=this._node;a=1!=s.mappings.length||r?this.joinMappingsWithFullIncludeAnchor(s.mappings,t,n):new e(s.mappings[0].value,this._unit,this,t,n,this.cacheChildren).children(null,null,!0)}else if(o==N.Kind.MAPPING){var u=this._node;if(null==u.value)a=[];else{var c=new e(u.value,this._unit,this,n?n:this._anchor,t?t:this._include,this.cacheChildren);a=c.children(),c.includesContents()&&this.setIncludesContents(!0)}}else if(o==N.Kind.SEQ){var l=this._node;a=l.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include,i.cacheChildren)})}else if(o==N.Kind.INCLUDE_REF){if(this._unit){var p=this.includePath(),f=null;try{f=this._unit.resolve(p)}catch(e){}if(null==f)a=[];else if(f.isRAMLUnit())if(this.canInclude(f)){var d=this.unit(),m=f;m.addIncludedBy(d.absolutePath()),d.getIncludedByPaths().forEach(function(e){m.addIncludedBy(e)});var h=f.ast();h&&(this.cacheChildren&&(h=_(h)),a=f.ast().children(this,null),this.setIncludesContents(!0))}else this.addIncludeError&&this.addIncludeError(new F(\"Recursive definition\"))}a||(a=[])}else{if(o!=N.Kind.ANCHOR_REF)throw new F(\"Should never happen; kind : \"+N.Kind[this._node.kind]);var y=this._node;a=new e(y.value,this._unit,this,null,null,this.cacheChildren).children()}return this.cacheChildren&&(this._children=a),a},e.prototype.canInclude=function(e){for(var t=this.includedFrom();null!=t;){if(t.unit().absolutePath()==e.absolutePath())return!1;t=t.includedFrom()}return!this.unit().includedByContains(e.absolutePath())},e.prototype.directChildren=function(t,n,r){var i=this;if(void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=!0),this._node){switch(this._node.kind){case N.Kind.SCALAR:return[];case N.Kind.MAP:var a=this._node;return 1!=a.mappings.length||r?a.mappings.map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)}):new e(a.mappings[0].value,this._unit,this,t,n).directChildren(null,null,!0);case N.Kind.MAPPING:var o=this._node;return null==o.value?[]:new e(o.value,this._unit,this,n?n:this._anchor,t?t:this._include).directChildren();case N.Kind.SEQ:return this._node.items.filter(function(e){return null!=e}).map(function(r){return new e(r,i._unit,i,n?n:i._anchor,t?t:i._include)});case N.Kind.INCLUDE_REF:return[];case N.Kind.ANCHOR_REF:return[]}throw new F(\"Should never happen; kind : \"+N.Kind[this._node.kind])}return[]},e.prototype.anchorId=function(){return this._node.anchorId},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this.valueKind()==N.Kind.INCLUDE_REF?this.unit().resolve(this._node.value.value):this.kind()==N.Kind.INCLUDE_REF?this.unit().resolve(this._node.value):this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.setUnit=function(e){this._unit=e},e.prototype.includePath=function(){var e=this.getIncludeString();return e?e:null},e.prototype.includeReference=function(){var e=this.getIncludeString();return e?M.getIncludeReference(e):null},e.prototype.getIncludeString=function(){if(this._node.kind==N.Kind.INCLUDE_REF){return this._node.value}if(this._node.kind==N.Kind.MAPPING){var t=this._node;return null==t.value?null:new e(t.value,this._unit,this,null,null).getIncludeString()}return null},e.prototype.anchoredFrom=function(){return this._anchor},e.prototype.includedFrom=function(){return this._include},e.prototype.kind=function(){return this._actualNode().kind},e.prototype.valueKind=function(){if(this._node.kind!=N.Kind.MAPPING)return null;var e=this._node;return e.value?e.value.kind:null},e.prototype.anchorValueKind=function(){if(this.valueKind()==N.Kind.ANCHOR_REF){return this._node.value.value.kind}return null},e.prototype.valueKindName=function(){var e=this.valueKind();return void 0!=e?N.Kind[e]:null},e.prototype.kindName=function(){return N.Kind[this.kind()]},e.prototype.indent=function(e,t){void 0===t&&(t=\"\");for(var n=\"\",r=0;r<e;r++)n+=\"  \";return n+t},e.prototype.replaceNewlines=function(e,t){void 0===t&&(t=null);for(var n=\"\",r=0;r<e.length;r++){var i=e[r];\"\\r\"==i&&(i=null==t?\"\\\\r\":t),\"\\n\"==i&&(i=null==t?\"\\\\n\":t),n+=i}return n},e.prototype.shortText=function(e,t){void 0===t&&(t=50);var n=this.end()-this.start(),r=n,i=this.unit();!e&&i&&(e=i.contents());var a;if(e){var o=e;a=o?o.substring(this.start(),this.end()):\"[no-text]\"}else a=\"[no-unit]\";return a=\"[\"+this.start()+\"..\"+this.end()+\"] \"+n+\" // \"+a+\" //\",r<n&&(a+=\"...\"),a=this.replaceNewlines(a)},e.prototype.nodeShortText=function(e,t,n){void 0===n&&(n=50);var r=e.endPosition-e.startPosition,i=r,a=this.unit();!t&&a&&(t=a.contents());var o;if(t){var s=t;o=s?s.substring(e.startPosition,e.endPosition):\"[no-text]\"}else o=\"[no-unit]\";return o=\"[\"+e.startPosition+\"..\"+e.endPosition+\"] \"+r+\" // \"+o+\" //\",i<r&&(o+=\"...\"),o=this.replaceNewlines(o)},e.prototype.show=function(e,t,n){void 0===e&&(e=null),void 0===t&&(t=0),void 0===n&&(n=null),e&&0==t&&console.log(e);var r=this.children(),i=this.kindName(),a=this._actualNode().value;this.kind()==N.Kind.MAPPING&&(i+=\"[\"+this._actualNode().key.value+\"]\"),i+=a?\"/\"+N.Kind[a.kind]:\"\",0==r.length?(console.log(this.indent(t)+i+\" // \"+this.shortText(n)),this.isMapping()&&this.asMapping().value&&console.log(this.indent(t+1)+\"// \"+this.valueKindName()+\": \"+this.nodeShortText(this.asMapping().value,n))):(console.log(this.indent(t)+i+\" { // \"+this.shortText(n)),this.isMapping()&&this.asMapping().value&&console.log(this.indent(t+1)+\"// \"+this.valueKindName()+\": \"+this.nodeShortText(this.asMapping().value,n)),r.forEach(function(e){e.show(null,t+1,n)}),console.log(this.indent(t)+\"}\"))},e.prototype.showParents=function(e,t){void 0===t&&(t=0),e&&0==t&&console.log(e);var n=0;if(this.parent()){n=this.parent().showParents(null,t+1)}var r=this.kindName(),i=this._actualNode().value;return r+=i?\"/\"+N.Kind[i.kind]:\"/null\",console.log(this.indent(n)+r+\" // \"+this.shortText(null)),n+1},e.prototype.inlined=function(e){return e==N.Kind.SCALAR||e==N.Kind.INCLUDE_REF},e.prototype.markupNode=function(e,t,n,r){void 0===r&&(r=!1);var i=e.text.length;switch(t.kind){case N.Kind.MAP:r&&e.append(\"{\");for(var o=t.mappings,s=0;s<o.length;s++)r&&s>0&&e.append(\", \"),this.markupNode(e,o[s],n,r);r&&e.append(\"}\");break;case N.Kind.SEQ:for(var u=t.items,s=0;s<u.length;s++)e.append(this.indent(n,\"- \")),this.markupNode(e,u[s],n+1,r);break;case N.Kind.MAPPING:var c=t,l=c.value;if(r){if(!l){e.append(\"\\n\");break}if(e.append(c.key.value),e.append(\": \"),l.kind==N.Kind.SCALAR){var p=l;e.append(p.value)}else{if(l.kind!=N.Kind.MAP)throw new F(\"markup not implemented: \"+N.Kind[l.kind]);this.markupNode(e,c.value,n+1,r)}break}if(e.addWithIndent(n,c.key.value+\":\"),!l){e.append(\"\\n\");break}if(l.kind==N.Kind.SCALAR)var p=l;c.value?(e.append(this.inlined(c.value.kind)?\" \":\"\\n\"),this.markupNode(e,c.value,n+1,r)):e.append(\"\\n\");break;case N.Kind.SCALAR:var p=t;if(k.isMultiLine(p.value)){e.append(\"|\\n\");for(var f=a(p.value),s=0;s<f.length;s++)e.append(this.indent(n,f[s]));e.append(\"\\n\")}else e.append(p.value+\"\\n\");break;case N.Kind.INCLUDE_REF:var d=t;e.append(\"!include \"+d.value+\"\\n\");break;default:throw new F(\"Unknown node kind: \"+N.Kind[t.kind])}for(;i<e.text.length&&\" \"==e.text[i];)i++;t.startPosition=i,t.endPosition=e.text.length},e.prototype.markup=function(e){void 0===e&&(e=!1);var t=new B(\"\");return this.markupNode(t,this._actualNode(),0,e),t.text},e.prototype.root=function(){for(var e=this;e.parent();){e=e.parent()}return e},e.prototype.parentOfKind=function(e){for(var t=this.parent();t;){if(t.kind()==e)return t;t=t.parent()}return null},e.prototype.find=function(e){var t=null;return this.directChildren().forEach(function(n){n.key()&&n.key()==e&&(t||(t=n))}),t},e.prototype.shiftNodes=function(e,t,n){if(this.directChildren().forEach(function(r){if(n&&n.start()==r.start()&&n.end()==r.end());else{r.shiftNodes(e,t,n)}}),n&&n.start()==this.start()&&n.end()==this.end());else{var r=this._actualNode();r&&Y(e,r,t)}return null},e.prototype.isMap=function(){return this.kind()==N.Kind.MAP},e.prototype.isMapping=function(){return this.kind()==N.Kind.MAPPING},e.prototype.isSeq=function(){return this.kind()==N.Kind.SEQ},e.prototype.isScalar=function(){return this.kind()==N.Kind.SCALAR},e.prototype.asMap=function(){if(!this.isMap())throw new F(\"map expected instead of \"+this.kindName());return this._actualNode()},e.prototype.asMapping=function(){if(!this.isMapping())throw new F(\"maping expected instead of \"+this.kindName());return this._actualNode()},e.prototype.asSeq=function(){if(!this.isSeq())throw new F(\"seq expected instead of \"+this.kindName());return this._actualNode()},e.prototype.asScalar=function(){if(!this.isScalar())throw new F(\"scalar expected instead of \"+this.kindName());return this._actualNode()},e.prototype.isValueSeq=function(){return this.valueKind()==N.Kind.SEQ},e.prototype.isValueMap=function(){return this.valueKind()==N.Kind.MAP},e.prototype.isValueInclude=function(){return this.valueKind()==N.Kind.INCLUDE_REF},e.prototype.isValueScalar=function(){return this.valueKind()==N.Kind.SCALAR},e.prototype.valueAsSeq=function(){if(!this.isMapping())throw new F(\"mapping expected instead of \"+this.kindName());if(this.valueKind()!=N.Kind.SEQ)throw new F(\"mappng/seq expected instead of mapping/\"+this.kindName());return this.asMapping().value},e.prototype.valueAsMap=function(){if(!this.isMapping())throw new F(\"mapping expected instead of \"+this.kindName());if(this.valueKind()!=N.Kind.MAP)throw new F(\"mappng/map expected instead of mapping/\"+this.kindName());return this.asMapping().value},e.prototype.valueAsScalar=function(){if(!this.isMapping())throw new F(\"mapping expected instead of \"+this.kindName());if(this.valueKind()!=N.Kind.SCALAR)throw new F(\"mappng/scalar expected instead of mapping/\"+this.kindName());return this.asMapping().value},e.prototype.valueAsInclude=function(){if(!this.isMapping())throw new F(\"mapping expected instead of \"+this.kindName());if(this.valueKind()!=N.Kind.INCLUDE_REF)throw new F(\"mappng/include expected instead of mapping/\"+this.kindName());return this.asMapping().value},e.prototype.text=function(e){if(void 0===e&&(e=null),!e){if(!this.unit())return\"[no-text]\";e=this.unit().contents()}return e.substring(this.start(),this.end())},e.prototype.copy=function(){return new e(i(this._actualNode()),this._unit,this._parent,this._anchor,this._include,this._includesContents)},e.prototype.nodeDefinition=function(){return v(this)},e.CLASS_IDENTIFIER=\"jsyaml2lowLevel.ASTNode\",e}();t.ASTNode=X,function(e){e[e.NONE=0]=\"NONE\",e[e.START=1]=\"START\",e[e.END=2]=\"END\",e[e.POINT=3]=\"POINT\"}(t.InsertionPointType||(t.InsertionPointType={}));var $=t.InsertionPointType,Q=function(){function e(e,t){void 0===t&&(t=null),this.type=e,this.point=t}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&w.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.after=function(t){return new e($.POINT,t)},e.atStart=function(){return new e($.START)},e.atEnd=function(){return new e($.END)},e.node=function(){return new e($.NONE)},e.prototype.show=function(e){e?(console.log(e),console.log(\"  insertion point type: \"+$[this.type])):console.log(\"insertion point type: \"+$[this.type]),this.type==$.POINT&&this.point&&this.point.show()},e.CLASS_IDENTIFIER=\"jsyaml2lowLevel.InsertionPoint\",e}();t.InsertionPoint=Q,t.createNode=l,t.createMap=p,t.createScalar=f,t.createSeq=d,t.createSeqNode=m,t.createMapNode=h,t.createMapping=y,t.toChildCachingNode=_,t.toIncludingNode=g,t.getDefinitionForLowLevelNode=v,t.fetchIncludesAndMasterAsync=S},function(e,t,n){\"use strict\";function r(e){var t={};return null!==e&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}function i(e,t){if(t=t||{},Object.keys(t).forEach(function(t){if(-1===o.indexOf(t))throw new a('Unknown option \"'+t+'\" is met in definition of \"'+e+'\" YAML type.')}),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=r(t.styleAliases||null),-1===s.indexOf(this.kind))throw new a('Unknown kind \"'+this.kind+'\" is specified for \"'+e+'\" YAML type.')}var a=n(68),o=[\"kind\",\"resolve\",\"construct\",\"instanceOf\",\"predicate\",\"represent\",\"defaultStyle\",\"styleAliases\"],s=[\"scalar\",\"sequence\",\"mapping\"];e.exports=i},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];\".\"===i?e.splice(r,1):\"..\"===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift(\"..\");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}var i=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/,a=function(e){return i.exec(e).slice(1)};t.resolve=function(){for(var t=\"\",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:e.cwd();if(\"string\"!=typeof o)throw new TypeError(\"Arguments to path.resolve must be strings\");o&&(t=o+\"/\"+t,i=\"/\"===o.charAt(0))}return t=n(r(t.split(\"/\"),function(e){return!!e}),!i).join(\"/\"),(i?\"/\":\"\")+t||\".\"},t.normalize=function(e){var i=t.isAbsolute(e),a=\"/\"===o(e,-1);return e=n(r(e.split(\"/\"),function(e){return!!e}),!i).join(\"/\"),e||i||(e=\".\"),e&&a&&(e+=\"/\"),(i?\"/\":\"\")+e},t.isAbsolute=function(e){return\"/\"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,function(e,t){if(\"string\"!=typeof e)throw new TypeError(\"Arguments to path.join must be strings\");return e}).join(\"/\"))},t.relative=function(e,n){function r(e){for(var t=0;t<e.length&&\"\"===e[t];t++);for(var n=e.length-1;n>=0&&\"\"===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split(\"/\")),a=r(n.split(\"/\")),o=Math.min(i.length,a.length),s=o,u=0;u<o;u++)if(i[u]!==a[u]){s=u;break}for(var c=[],u=s;u<i.length;u++)c.push(\"..\");return c=c.concat(a.slice(s)),c.join(\"/\")},t.sep=\"/\",t.delimiter=\":\",t.dirname=function(e){var t=a(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):\".\"},t.basename=function(e,t){var n=a(e)[2];return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){return a(e)[3]};var o=\"b\"===\"ab\".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(t,n(23))},function(e,t,n){function r(e,t){var n=a(e);return null==t?n:i(n,t)}var i=n(207),a=n(208);e.exports=r},function(e,t){var n;n=function(){return this}();try{n=n||Function(\"return this\")()||(0,eval)(\"this\")}catch(e){\"object\"==typeof window&&(n=window)}e.exports=n},function(e,t,n){\"use strict\";function r(e,t){var n=t?t.endPosition:e.endPosition+1;return{key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:f.MAPPING,parent:null,errors:[]}}function i(e,t,n,r){return{errors:[],referencesAnchor:e,value:r,startPosition:t,endPosition:n,kind:f.ANCHOR_REF,parent:null}}function a(e){return void 0===e&&(e=\"\"),{errors:[],startPosition:-1,endPosition:-1,value:e,kind:f.SCALAR,parent:null,doubleQuoted:!1}}function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:f.SEQ,parent:null}}function s(){return o()}function u(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e?e:[],kind:f.MAP,parent:null}}var c=n(379),l=n(378),p=function(){function e(e,t){void 0===t&&(t=null),this.name=\"YAMLException\",this.reason=e,this.mark=t,this.message=this.toString(!1)}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.toString=function(e){void 0===e&&(e=!1);var t;return t=\"JS-YAML: \"+(this.reason||\"(unknown reason)\"),!e&&this.mark&&(t+=\" \"+this.mark.toString()),t},e.CLASS_IDENTIFIER=\"yaml-ast-parser.YAMLException\",e}();t.YAMLException=p,function(e){e[e.SCALAR=0]=\"SCALAR\",e[e.MAPPING=1]=\"MAPPING\",e[e.MAP=2]=\"MAP\",e[e.SEQ=3]=\"SEQ\",e[e.ANCHOR_REF=4]=\"ANCHOR_REF\",e[e.INCLUDE_REF=5]=\"INCLUDE_REF\"}(t.Kind||(t.Kind={}));var f=t.Kind;t.newMapping=r,t.newAnchorRef=i,t.newScalar=a,t.newItems=o,t.newSeq=s,t.newMap=u,t.load=c.load,t.loadAll=c.loadAll,t.safeLoad=c.safeLoad,t.dump=l.dump,t.safeDump=l.safeDump},function(e,t,n){\"use strict\";function r(e){var t={};return e.forEach(function(e){return Object.keys(e).forEach(function(n){return t[n]=e[n]})}),t}function i(e,t){return new E(T.find(e||[],t))}function a(e){return Object.keys(e).map(function(t){return[t,e[t]]})}function o(e){var t={};return e.forEach(function(e){return t[e[0]]=e[1]}),t}function s(e,t){return t(e),e}function u(e,t){\"object\"==typeof e&&Object.keys(e).forEach(function(n){return t(n,e[n])})}function c(e,n,r){void 0===r&&(r=!1);var i={};return e.forEach(function(e){var a=t.shallowCopy(e);r&&delete a[n],i[e[n]]=a}),i}function l(e,t){var n=e.length-t.length;return n>=0&&e.lastIndexOf(t)===n}function p(e,t,n){return void 0===n&&(n=0),e.length-t.length>=n&&e.substring(n,n+t.length)===t}function f(e){return\"_\"==e[e.length-1]}function d(e,t,n){var r,i=!1;e[t]=function(){return i||(i=!0,r=n.apply(e)),r}}function m(e,n){void 0===n&&(n=f);for(var r in e)n(r)&&t.ifInstanceOf(e[r],Function,function(t){return 0===t.length?d(e,r,t):null})}function h(e,t){void 0!==e&&t(e)}function y(e){return\"string\"==typeof e&&\"\"!=e&&l(e,\".raml\")}function _(e){for(var t,n=[],r=new RegExp(\"require\\\\('([^']+)'\\\\)\",\"gi\");t=r.exec(e);)n.push(t[1]);for(var i=new RegExp('require\\\\(\"([^\"]+)\"\\\\)',\"gi\");t=i.exec(e);)n.push(t[1]);return n=T.unique(n).filter(function(e){return\"\"!=e}),n.sort(),n}function g(e){return void 0!==e&&null!=e}function v(e){return 0==e.length?e:e.charAt(0).toUpperCase()+e.substr(1)}function b(e,t,n){void 0===n&&(n=!1);var r=Object.keys(t);if(n){var i={};r.forEach(function(e){return i[e]=!0}),Object.keys(e).forEach(function(e){return i[e]=!0}),r=Object.keys(i)}r.forEach(function(n){var r=e[n];r instanceof Object?(t[n]||(t[n]={}),b(r,t[n],!0)):void 0!=r&&(t[n]=e[n])})}function S(e,t){return Object.keys(t).forEach(function(n){return e=A(e,n,t[n])}),e}function A(e,t,n){for(var r=\"\",i=0,a=e.indexOf(t);a<e.length&&a>=0;a=e.indexOf(t,i))r+=e.substring(i,a),r+=n,i=a+t.length;return r+=e.substring(i,e.length)}var T=n(1),E=n(84);t.defined=function(e){return null!==e&&void 0!==e},t.flattenArrayOfObjects=r,t.find=i,t.isInstance=function(e,t){return e instanceof t?[e]:[]},t.ifInstanceOf=function(e,t,n){return e instanceof t?n(e):null},t.toTuples=a,t.fromTuples=o,t.collectInstancesOf=function(e,n){return s([],function(r){return e.forEach(function(e){return t.ifInstanceOf(e,n,function(e){return r.push(e)})})})},t.collectInstancesOfInMap=function(e,t){return Object.keys(e).map(function(t){return[t,e[t]]}).filter(function(e){return e[1]instanceof t}).map(function(e){return e})},t.asArray=function(e){return t.defined(e)?e instanceof Array?e:[e]:[]},t.shallowCopy=function(e){return s({},function(t){return Object.keys(e).forEach(function(n){return t[n]=e[n]})})},t.flatMap=function(e,n){return t.flatten(e.map(n))},t.flatten=function(e){return Array.prototype.concat.apply([],e)},t.takeWhile=function(e,t){return s([],function(n){for(var r=0;r<e.length&&t(e[r]);r++)n.push(e[r])})},t.tap=s,t.kv=u,t.indexed=c,t.stringEndsWith=l,t.stringStartsWith=p,t.lazypropkeyfilter=f,t.lazyprops=m,t.iff=h,t.isRAMLUrl=y,t.getAllRequiredExternalModulesFromCode=_,t.serial=function(){var e=0;return function(){return e++}}(),t.isEssential=g,t.firstToUpper=v,t.updateObject=b,t.replaceMap=S,t.replace=A},function(e,t,n){\"use strict\";(function(e){function r(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(r()<t)throw new RangeError(\"Invalid typed array length\");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,n){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,n);if(\"number\"==typeof e){if(\"string\"==typeof t)throw new Error(\"If encoding is specified then the first argument must be a string\");return c(this,e)}return o(this,e,t,n)}function o(e,t,n,r){if(\"number\"==typeof t)throw new TypeError('\"value\" argument must not be a number');return\"undefined\"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?f(e,t,n,r):\"string\"==typeof t?l(e,t,n):d(e,t)}function s(e){if(\"number\"!=typeof e)throw new TypeError('\"size\" argument must be a number');if(e<0)throw new RangeError('\"size\" argument must not be negative')}function u(e,t,n,r){return s(t),t<=0?i(e,t):void 0!==n?\"string\"==typeof r?i(e,t).fill(n,r):i(e,t).fill(n):i(e,t)}function c(e,t){if(s(t),e=i(e,t<0?0:0|m(t)),!a.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function l(e,t,n){if(\"string\"==typeof n&&\"\"!==n||(n=\"utf8\"),!a.isEncoding(n))throw new TypeError('\"encoding\" must be a valid string encoding');var r=0|y(t,n);e=i(e,r);var o=e.write(t,n);return o!==r&&(e=e.slice(0,o)),e}function p(e,t){var n=t.length<0?0:0|m(t.length);e=i(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function f(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError(\"'offset' is out of bounds\");if(t.byteLength<n+(r||0))throw new RangeError(\"'length' is out of bounds\");return t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=p(e,t),e}function d(e,t){if(a.isBuffer(t)){var n=0|m(t.length);return e=i(e,n),0===e.length?e:(t.copy(e,0,0,n),e)}if(t){if(\"undefined\"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||\"length\"in t)return\"number\"!=typeof t.length||G(t.length)?i(e,0):p(e,t);if(\"Buffer\"===t.type&&Q(t.data))return p(e,t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")}function m(e){if(e>=r())throw new RangeError(\"Attempt to allocate Buffer larger than maximum size: 0x\"+r().toString(16)+\" bytes\");return 0|e}function h(e){return+e!=e&&(e=0),a.alloc(+e)}function y(e,t){if(a.isBuffer(e))return e.length;if(\"undefined\"!=typeof ArrayBuffer&&\"function\"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;\"string\"!=typeof e&&(e=\"\"+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case\"ascii\":case\"latin1\":case\"binary\":return n;case\"utf8\":case\"utf-8\":case void 0:return q(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return 2*n;case\"hex\":return n>>>1;case\"base64\":return Y(e).length;default:if(r)return q(e).length;t=(\"\"+t).toLowerCase(),r=!0}}function _(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return\"\";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return\"\";if(n>>>=0,t>>>=0,n<=t)return\"\";for(e||(e=\"utf8\");;)switch(e){case\"hex\":return D(this,t,n);case\"utf8\":case\"utf-8\":return k(this,t,n);case\"ascii\":return R(this,t,n);case\"latin1\":case\"binary\":return I(this,t,n);case\"base64\":return w(this,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return M(this,t,n);default:if(r)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function v(e,t,n,r,i){if(0===e.length)return-1;if(\"string\"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if(\"string\"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:b(e,t,n,r,i);if(\"number\"==typeof t)return t&=255,a.TYPED_ARRAY_SUPPORT&&\"function\"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):b(e,[t],n,r,i);throw new TypeError(\"val must be string, number or Buffer\")}function b(e,t,n,r,i){function a(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}var o=1,s=e.length,u=t.length;if(void 0!==r&&(\"ucs2\"===(r=String(r).toLowerCase())||\"ucs-2\"===r||\"utf16le\"===r||\"utf-16le\"===r)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,n/=2}var c;if(i){var l=-1;for(c=n;c<s;c++)if(a(e,c)===a(t,l===-1?0:c-l)){if(l===-1&&(l=c),c-l+1===u)return l*o}else l!==-1&&(c-=c-l),l=-1}else for(n+u>s&&(n=s-u),c=n;c>=0;c--){for(var p=!0,f=0;f<u;f++)if(a(e,c+f)!==a(t,f)){p=!1;break}if(p)return c}return-1}function S(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var a=t.length;if(a%2!=0)throw new TypeError(\"Invalid hex string\");r>a/2&&(r=a/2);for(var o=0;o<r;++o){var s=parseInt(t.substr(2*o,2),16);if(isNaN(s))return o;e[n+o]=s}return o}function A(e,t,n,r){return J(q(t,e.length-n),e,n,r)}function T(e,t,n,r){return J(z(t),e,n,r)}function E(e,t,n,r){return T(e,t,n,r)}function C(e,t,n,r){return J(Y(t),e,n,r)}function N(e,t,n,r){return J(H(t,e.length-n),e,n,r)}function w(e,t,n){return 0===t&&n===e.length?X.fromByteArray(e):X.fromByteArray(e.slice(t,n))}function k(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var a=e[i],o=null,s=a>239?4:a>223?3:a>191?2:1;if(i+s<=n){var u,c,l,p;switch(s){case 1:a<128&&(o=a);break;case 2:u=e[i+1],128==(192&u)&&(p=(31&a)<<6|63&u)>127&&(o=p);break;case 3:u=e[i+1],c=e[i+2],128==(192&u)&&128==(192&c)&&(p=(15&a)<<12|(63&u)<<6|63&c)>2047&&(p<55296||p>57343)&&(o=p);break;case 4:u=e[i+1],c=e[i+2],l=e[i+3],128==(192&u)&&128==(192&c)&&128==(192&l)&&(p=(15&a)<<18|(63&u)<<12|(63&c)<<6|63&l)>65535&&p<1114112&&(o=p)}}null===o?(o=65533,s=1):o>65535&&(o-=65536,r.push(o>>>10&1023|55296),o=56320|1023&o),r.push(o),i+=s}return x(r)}function x(e){var t=e.length;if(t<=Z)return String.fromCharCode.apply(String,e);for(var n=\"\",r=0;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=Z));return n}function R(e,t,n){var r=\"\";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function I(e,t,n){var r=\"\";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function D(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i=\"\",a=t;a<n;++a)i+=W(e[a]);return i}function M(e,t,n){for(var r=e.slice(t,n),i=\"\",a=0;a<r.length;a+=2)i+=String.fromCharCode(r[a]+256*r[a+1]);return i}function P(e,t,n){if(e%1!=0||e<0)throw new RangeError(\"offset is not uint\");if(e+t>n)throw new RangeError(\"Trying to access beyond buffer length\")}function L(e,t,n,r,i,o){if(!a.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('\"value\" argument is out of bounds');if(n+r>e.length)throw new RangeError(\"Index out of range\")}function O(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-n,2);i<a;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function U(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-n,4);i<a;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function F(e,t,n,r,i,a){if(n+r>e.length)throw new RangeError(\"Index out of range\");if(n<0)throw new RangeError(\"Index out of range\")}function B(e,t,n,r,i){return i||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),$.write(e,t,n,r,23,4),n+4}function K(e,t,n,r,i){return i||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),$.write(e,t,n,r,52,8),n+8}function V(e){if(e=j(e).replace(ee,\"\"),e.length<2)return\"\";for(;e.length%4!=0;)e+=\"=\";return e}function j(e){return e.trim?e.trim():e.replace(/^\\s+|\\s+$/g,\"\")}function W(e){return e<16?\"0\"+e.toString(16):e.toString(16)}function q(e,t){t=t||1/0;for(var n,r=e.length,i=null,a=[],o=0;o<r;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===r){(t-=3)>-1&&a.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&a.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;a.push(n)}else if(n<2048){if((t-=2)<0)break;a.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;a.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error(\"Invalid code point\");if((t-=4)<0)break;a.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return a}function z(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}function H(e,t){for(var n,r,i,a=[],o=0;o<e.length&&!((t-=2)<0);++o)n=e.charCodeAt(o),r=n>>8,i=n%256,a.push(i),a.push(r);return a}function Y(e){return X.toByteArray(V(e))}function J(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function G(e){return e!==e}/*!\n * The buffer module from node.js, for the browser.\n *\n * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>\n * @license  MIT\n */\nvar X=n(174),$=n(180),Q=n(117);t.Buffer=a,t.SlowBuffer=h,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&\"function\"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,n){return o(null,e,t,n)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,\"undefined\"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,n){return u(null,e,t,n)},a.allocUnsafe=function(e){return c(null,e)},a.allocUnsafeSlow=function(e){return c(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError(\"Arguments must be Buffers\");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return!0;default:return!1}},a.concat=function(e,t){if(!Q(e))throw new TypeError('\"list\" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=a.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var o=e[n];if(!a.isBuffer(o))throw new TypeError('\"list\" argument must be an Array of Buffers');o.copy(r,i),i+=o.length}return r},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError(\"Buffer size must be a multiple of 16-bits\");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError(\"Buffer size must be a multiple of 32-bits\");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError(\"Buffer size must be a multiple of 64-bits\");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?\"\":0===arguments.length?k(this,0,e):_.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e=\"\",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString(\"hex\",0,n).match(/.{2}/g).join(\" \"),this.length>n&&(e+=\" ... \")),\"<Buffer \"+e+\">\"},a.prototype.compare=function(e,t,n,r,i){if(!a.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError(\"out of range index\");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,i>>>=0,this===e)return 0;for(var o=i-r,s=n-t,u=Math.min(o,s),c=this.slice(r,i),l=e.slice(t,n),p=0;p<u;++p)if(c[p]!==l[p]){o=c[p],s=l[p];break}return o<s?-1:s<o?1:0},a.prototype.includes=function(e,t,n){return this.indexOf(e,t,n)!==-1},a.prototype.indexOf=function(e,t,n){return v(this,e,t,n,!0)},a.prototype.lastIndexOf=function(e,t,n){return v(this,e,t,n,!1)},a.prototype.write=function(e,t,n,r){if(void 0===t)r=\"utf8\",n=this.length,t=0;else if(void 0===n&&\"string\"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\");t|=0,isFinite(n)?(n|=0,void 0===r&&(r=\"utf8\")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError(\"Attempt to write outside buffer bounds\");r||(r=\"utf8\");for(var a=!1;;)switch(r){case\"hex\":return S(this,e,t,n);case\"utf8\":case\"utf-8\":return A(this,e,t,n);case\"ascii\":return T(this,e,t,n);case\"latin1\":case\"binary\":return E(this,e,t,n);case\"base64\":return C(this,e,t,n);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return N(this,e,t,n);default:if(a)throw new TypeError(\"Unknown encoding: \"+r);r=(\"\"+r).toLowerCase(),a=!0}},a.prototype.toJSON=function(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};var Z=4096;a.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);var r;if(a.TYPED_ARRAY_SUPPORT)r=this.subarray(e,t),r.__proto__=a.prototype;else{var i=t-e;r=new a(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},a.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return r},a.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},a.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,a=0;++a<t&&(i*=256);)r+=this[e+a]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,a=this[e+--r];r>0&&(i*=256);)a+=this[e+--r]*i;return i*=128,a>=i&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},a.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),$.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),$.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),$.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),$.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){L(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=1,a=0;for(this[t]=255&e;++a<n&&(i*=256);)this[t+a]=e/i&255;return t+n},a.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){L(this,e,t,n,Math.pow(2,8*n)-1,0)}var i=n-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+n},a.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):U(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a<n&&(o*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);L(this,e,t,n,i-1,-i)}var a=n-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+n},a.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):O(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):O(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):U(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||L(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):U(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},a.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},a.prototype.writeDoubleLE=function(e,t,n){return K(this,e,t,!0,n)},a.prototype.writeDoubleBE=function(e,t,n){return K(this,e,t,!1,n)},a.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError(\"targetStart out of bounds\");if(n<0||n>=this.length)throw new RangeError(\"sourceStart out of bounds\");if(r<0)throw new RangeError(\"sourceEnd out of bounds\");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!a.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},a.prototype.fill=function(e,t,n,r){if(\"string\"==typeof e){if(\"string\"==typeof t?(r=t,t=0,n=this.length):\"string\"==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&\"string\"!=typeof r)throw new TypeError(\"encoding must be a string\");if(\"string\"==typeof r&&!a.isEncoding(r))throw new TypeError(\"Unknown encoding: \"+r)}else\"number\"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError(\"Out of range index\");if(n<=t)return this;t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var o;if(\"number\"==typeof e)for(o=t;o<n;++o)this[o]=e;else{var s=a.isBuffer(e)?e:q(new a(e,r).toString()),u=s.length;for(o=0;o<n-t;++o)this[o+t]=s[o%u]}return this};var ee=/[^+\\/0-9A-Za-z-_]/g}).call(t,n(13))},function(e,t,n){\"use strict\";function r(e){var t=e;return t.valueName&&t.toHighLevel&&t.toHighLevel2}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(14),o=n(62),s=n(118),u=n(9),c=n(15),l=n(3),p=n(0),f=n(5),d=n(1),m=function(){function e(e,t,n){this._parent=e,this._transformer=t,this.ramlVersion=n}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&d.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.hasInnerIncludeError=function(){return this._originalNode.hasInnerIncludeError()},e.prototype.keyKind=function(){return this._originalNode.keyKind()},e.prototype.primaryNode=function(){return null},e.prototype.isAnnotatedScalar=function(){return this._originalNode.isAnnotatedScalar()},e.prototype.actual=function(){return this._originalNode?this._originalNode.actual():this},e.prototype.transformer=function(){return this._transformer},e.prototype.setTransformer=function(e){this._transformer=e},e.prototype.originalNode=function(){return this._originalNode},e.prototype.start=function(){return this._originalNode.start()},e.prototype.end=function(){return this._originalNode.end()},e.prototype.value=function(e){throw new Error(\"The method must be overridden\")},e.prototype.includeErrors=function(){return this._originalNode.includeErrors()},e.prototype.includePath=function(){return this._originalNode.includePath()},e.prototype.includeReference=function(){return this._originalNode.includeReference()},e.prototype.setKeyOverride=function(e){this._keyOverride=e},e.prototype.setValueOverride=function(e){this._valueOverride=e},e.prototype.key=function(e){return void 0===e&&(e=!1),this._keyOverride?this._keyOverride:this._originalNode.key(e)},e.prototype.optional=function(){return this.originalNode().optional()},e.prototype.children=function(){throw new Error(\"The method must be overridden\")},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._originalNode.unit()},e.prototype.containingUnit=function(){return this._originalNode.containingUnit()},e.prototype.includeBaseUnit=function(){return this._originalNode.unit()},e.prototype.anchorId=function(){return this._originalNode.anchorId()},e.prototype.errors=function(){return this._originalNode.errors()},e.prototype.anchoredFrom=function(){return this._originalNode.anchoredFrom()},e.prototype.includedFrom=function(){return this._originalNode.includedFrom()},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return null},e.prototype.dumpToObject=function(e){var t=o.serialize2(this,e);if(this.kind()==a.Kind.MAPPING){var n={};return n[this.key(!0)]=t,n}return t},e.prototype.keyStart=function(){return this._originalNode.keyStart()},e.prototype.keyEnd=function(){return this._originalNode.keyEnd()},e.prototype.valueStart=function(){return this._originalNode.valueStart()},e.prototype.valueEnd=function(){return this._originalNode.valueEnd()},e.prototype.isValueLocal=function(){return this._originalNode.isValueLocal()},e.prototype.kind=function(){return this._originalNode.kind()},e.prototype.valueKind=function(){return this._originalNode.valueKind()},e.prototype.anchorValueKind=function(){return this._originalNode.anchorValueKind()},e.prototype.show=function(e){this._originalNode.show(e)},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode?this._highLevelNode:this._originalNode.highLevelNode()},e.prototype.text=function(e){throw new Error(\"not implemented\")},e.prototype.copy=function(){throw new Error(\"not implemented\")},e.prototype.markup=function(e){throw new Error(\"not implemented\")},e.prototype.nodeDefinition=function(){return u.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return this._originalNode.includesContents()},e.prototype.root=function(){for(var e=this;e.parent();){e=e.parent()}return e},e.prototype.find=function(e){var t=null;return this.children().forEach(function(n){n.key()&&n.key()==e&&(t||(t=n))}),t},e.prototype.isMap=function(){return this.kind()==a.Kind.MAP},e.prototype.isMapping=function(){return this.kind()==a.Kind.MAPPING},e.prototype.isSeq=function(){return this.kind()==a.Kind.SEQ},e.prototype.isScalar=function(){return this.kind()==a.Kind.SCALAR},e.prototype.isValueSeq=function(){return this.valueKind()==a.Kind.SEQ},e.prototype.isValueMap=function(){return this.valueKind()==a.Kind.MAP},e.prototype.isValueInclude=function(){return this.valueKind()==a.Kind.INCLUDE_REF},e.prototype.isValueScalar=function(){return this.valueKind()==a.Kind.SCALAR},e.CLASS_IDENTIFIER=\"LowLevelASTProxy.LowLevelProxyNode\",e}();t.LowLevelProxyNode=m;var h=function(e){function t(t,n,r,i,a){void 0===a&&(a=!0),e.call(this,n,r,i),this.isPrimary=a,this._adoptedNodes=[],this._preserveAnnotations=!1,this.nonMergableChildren={};var o=this.parent()?this.parent().originalNode():null;y.isInstance(t)?this._originalNode=t:this._originalNode=new y(t,o,r,this.ramlVersion),this._adoptedNodes.push(this._originalNode)}return i(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&d.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_LowLevelCompositeNode)},t.prototype.adoptedNodes=function(){return this._adoptedNodes},t.prototype.primaryNode=function(){return this.isPrimary?this._originalNode:null},t.prototype.parent=function(){return this._parent},t.prototype.adopt=function(e,t){t||(t=this._transformer);var n=this.parent()?this.parent().originalNode():null,r=new y(e,n,t,this.ramlVersion);this._adoptedNodes.push(r),this._children&&this._children.forEach(function(e){return e._parent=null}),this._children=null,this.highLevelNode()&&this.highLevelNode().resetChildren()},t.prototype.value=function(e){if(this._valueOverride)return this._valueOverride;var t,n=this._adoptedNodes.filter(function(e){return null!=e.value()});if(t=n.length>0?n[0].value(e):this._originalNode.value(e),y.isInstance(t)){var r=t.key();if(r)for(var i=this;1==i.children().length&&(i.kind()==a.Kind.MAPPING||i.kind()==a.Kind.MAP||i.kind()==a.Kind.SEQ);)if(i=i.children()[0],i.originalNode().key()==r){t=i;break}this._valueOverride=t}return t},t.prototype.children=function(){var e=this;if(this._children)return this._children;for(var n=[],r=!1,i=!1,o=0,s=this._adoptedNodes;o<s.length;o++){var u=s[o],c=u.children();c&&c.length>0&&(i=!0,c[0].key()&&this.originalNode().valueKind()!=a.Kind.SEQ&&(r=!0))}if(r)n=this.collectChildrenWithKeys();else if(i){n=this.collectChildrenWithKeys();var l={};this._adoptedNodes.forEach(function(r){return r.children().filter(function(e){return!e.key()}).forEach(function(i){var a=r==e.primaryNode(),o=e.buildKey(i);if(a||!l[o]){l[o]=!0;var s=r.transformer()?r.transformer():e.transformer(),u=y.isInstance(i)?i.originalNode():i;n.push(new t(u,e,s,e.ramlVersion,a))}})})}else n=[];return this._children=n,this._preserveAnnotations&&this._children.forEach(function(e){return e.preserveAnnotations()}),n},t.prototype.buildKey=function(e){var t=o.serialize(e),n=this.nodeDefinition();if(n&&(n.key()==l.Universe08.TraitRef||n.key()==l.Universe08.ResourceTypeRef||n.key()==l.Universe10.TraitRef||n.key()==l.Universe10.ResourceTypeRef)&&t&&\"object\"==typeof t){var r=Object.keys(t);r.length>0&&(t=r[0])}return null==t?\"\":s(t)},t.prototype.collectChildrenWithKeys=function(){for(var e=this,n=[],r={},i=0,a=this._adoptedNodes;i<a.length;i++)for(var o=a[i],s=o==this.primaryNode(),u=0,f=o.children();u<f.length;u++){var d=f[u],m=d.originalNode().key();if(!this.nonMergableChildren[m]||o==this._originalNode){if(m&&o.transformer()){var h=null!=m&&this._preserveAnnotations&&c.stringStartsWith(m,\"(\")&&c.stringEndsWith(m,\")\");h||(m=o.transformer().transform(m).value)}if(!this.skipKey(m,s)&&m){var y=r.hasOwnProperty(m)&&r[m];y||(y=[],r[m]=y),y.push({node:d.originalNode(),transformer:o.transformer(),isPrimary:s})}}}var _=this.unit().highLevel().root().definition().universe().version(),g=this.key()&&\"/\"==this.key()[0],v=p.getUniverse(\"RAML10\").type(l.Universe10.Method.name),b=v.property(l.Universe10.Method.properties.method.name).enumOptions();return Object.keys(r).forEach(function(i){var a=r[i],o=!0,s=!1,u=b.indexOf(i)>=0;if(a.forEach(function(e){var t=e.node.optional()&&(\"RAML10\"!=_||g&&u);o=o&&t,s=s||e.isPrimary}),s){var c=[];a.filter(function(e){return e.isPrimary}).forEach(function(n){var r=n.transformer?n.transformer:e.transformer();c.push(new t(n.node,e,r,e.ramlVersion,!0))});var l=c[0];a.filter(function(e){return!e.isPrimary}).forEach(function(e){l.adopt(e.node,e.transformer)}),c.forEach(function(e){return n.push(e)})}else if(!o){for(var p=a[0].transformer?a[0].transformer:e.transformer(),l=new t(a[0].node,e,p,e.ramlVersion,!1),f=1;f<a.length;f++)l.adopt(a[f].node,a[f].transformer);n.push(l)}}),n},t.prototype.isResource=function(){return this.highLevelNode()&&f.isResourceType(this.highLevelNode().definition())},t.prototype.skipKey=function(e,t){if(t)return!1;if(\"RAML08\"!=this.ramlVersion)return!1;l.Universe08.Method,l.Universe08.Resource;return!1},t.prototype.valueKind=function(){if(this._originalNode.kind()!=a.Kind.MAPPING)return null;for(var e=0;e<this._adoptedNodes.length;e++){var t=this._adoptedNodes[e],n=t.originalNode().actual();if(n&&null!=n.value)return t.valueKind()}return null},t.prototype.includePath=function(){for(var e=0;e<this._adoptedNodes.length;e++){var t=this._adoptedNodes[e],n=t.includePath();if(null!=n)return n}return null},t.prototype.includeBaseUnit=function(){for(var t=0;t<this._adoptedNodes.length;t++){var n=this._adoptedNodes[t];if(null!=n.includePath())return n.unit()}return e.prototype.includeBaseUnit.call(this)},t.prototype.includeReference=function(){for(var e=0;e<this._adoptedNodes.length;e++){var t=this._adoptedNodes[e];if(null!=t.value())return t.includeReference()}return null},t.prototype.optional=function(){return d.all(this._adoptedNodes,function(e){return e.optional()})},t.prototype.replaceChild=function(e,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=null),this._children||(this._children=[]);var a;if(a=t.isInstance(n)?n:new t(n,this,null,this.ramlVersion),null==e)return this._children.push(a),a;var o=this._children.indexOf(e);return o>=0?this._children[o]=a:this._children.push(a),a},t.prototype.removeChild=function(e){if(this._children&&null!=e){var t=this._children.indexOf(e);if(t>=0){for(var n=t;n<this._children.length-1;n++)this._children[n]=this._children[n+1];this._children.pop()}}},t.prototype.setChildren=function(e){var n=this;if(null==e)return void(this._children=null);this._children=e.map(function(e){return t.isInstance(e)?e:new t(e,n,null,n.ramlVersion)}),this._preserveAnnotations&&this._children.forEach(function(e){return e.preserveAnnotations()})},t.prototype.preserveAnnotations=function(){this._preserveAnnotations=!0,this._children&&this._children.forEach(function(e){return e.preserveAnnotations()})},t.prototype.filterChildren=function(){this.children();var e={},t=[];this._children.forEach(function(n){if(null!=n.key())return void t.push(n);var r=JSON.stringify(o.serialize(n));e[r]||(e[r]=!0,t.push(n))}),this._children=t},t.prototype.containingUnit=function(){for(var e={},t=0,n=this.adoptedNodes();t<n.length;t++){e[n[t].containingUnit().absolutePath()]=!0}return Object.keys(e).length<=1?this._originalNode.containingUnit():null},t.prototype.takeOnlyOriginalChildrenWithKey=function(e){this.nonMergableChildren[e]=!0},t.CLASS_IDENTIFIER_LowLevelCompositeNode=\"LowLevelASTProxy.LowLevelCompositeNode\",t}(m);t.LowLevelCompositeNode=h;var y=function(e){function t(t,n,r,i){e.call(this,n,r,i),this._originalNode=t}return i(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&d.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_LowLevelValueTransformingNode)},t.prototype.getClassIdentifier=function(){return e.prototype.getClassIdentifier.call(this).concat(t.CLASS_IDENTIFIER_LowLevelValueTransformingNode)},t.prototype.value=function(e){var n=this.originalNode().value(e),r=this.transformer();if(r){n=r.transform(n,e).value}return null==n||\"object\"!=typeof n||Array.isArray(n)?(null!=n&&e&&(n=\"\"+n),n):new t(n,this._parent,this._transformer,this.ramlVersion)},t.prototype.children=function(){var e=this,n=null,r=this.originalNode();if(null!=this._transformer){var i=this._transformer.children(r);null!=i&&(n=i)}return null==n&&(n=r.children()),n.map(function(n){return new t(n,e,e._transformer,e.ramlVersion)})},t.prototype.valueKind=function(){var t=this._transformer&&this._transformer.valueKind(this.originalNode());return null!=t?t:e.prototype.valueKind.call(this)},t.prototype.includePath=function(){var t=this._transformer&&this._transformer.includePath(this.originalNode());return null!=t?t:e.prototype.includePath.call(this)},t.prototype.parent=function(){return this._parent},t.prototype.key=function(t){void 0===t&&(t=!1);var n=e.prototype.key.call(this,t);if(null!=this.transformer()){var r=this.transformer().transform(n).value;return\"object\"==typeof r?null:r}return n},t.CLASS_IDENTIFIER_LowLevelValueTransformingNode=\"LowLevelASTProxy.LowLevelValueTransformingNode\",t}(m);t.LowLevelValueTransformingNode=y,t.isLowLevelProxyNode=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t){function n(e){var t=typeof e;return null!=e&&(\"object\"==t||\"function\"==t)}e.exports=n},function(e,t,n){\"use strict\";function r(e,t){return new b(_.CHANGE_VALUE,e,t,-1)}function i(e,t){return new b(_.CHANGE_VALUE,e,t.lowLevel(),-1)}function a(e,t){return new b(_.CHANGE_KEY,e,t,-1)}function o(e,t){return new b(_.REMOVE_CHILD,e,t,-1)}function s(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var i=new b(_.ADD_CHILD,e,t,-1);return i.insertionPoint=n,i.toSeq=r,i}function u(e,t){return new b(_.INIT_RAML_FILE,e,t,-1)}function c(e,t,n){if(d.isAbsolute(e)){\".xsd\"!=d.extname(t)&&(e=e.substr(1),t=l(n,d.basename(t)))}return p(e)||d.isAbsolute(e)?e:p(t)||d.isAbsolute(t)?l(d.dirname(t),e):l(d.dirname(l(n,t)),e)}function l(e,t){if(p(t))return t;var n;if(p(e)){var r=h.stringEndsWith(e,\"/\")?e:e+\"/\";n=m.resolve(r,t).replace(/\\\\/g,\"/\")}else n=d.resolve(e,t).replace(/\\\\/g,\"/\");return n}function p(e){return null!=e&&(h.stringStartsWith(e,\"http://\")||h.stringStartsWith(e,\"https://\"))}function f(e){return e.start&&e.end&&e.unit&&e.key&&e.value&&e.children&&e.includePath}var d=n(11),m=n(162),h=n(15),y=function(){function e(){}return e}();t.ASTDelta=y,function(e){e[e.ADD_CHILD=0]=\"ADD_CHILD\",e[e.REMOVE_CHILD=1]=\"REMOVE_CHILD\",e[e.MOVE_CHILD=2]=\"MOVE_CHILD\",e[e.CHANGE_KEY=3]=\"CHANGE_KEY\",e[e.CHANGE_VALUE=4]=\"CHANGE_VALUE\",e[e.INIT_RAML_FILE=5]=\"INIT_RAML_FILE\"}(t.CommandKind||(t.CommandKind={}));var _=t.CommandKind,g=function(){function e(e,t,n,r,i){void 0===i&&(i=null),this.offset=e,this.replacementLength=t,this.text=n,this.unit=r,this.target=i}return e}();t.TextChangeCommand=g;var v=function(){function e(){this.commands=[]}return e}();t.CompositeCommand=v,function(e){e[e.NONE=0]=\"NONE\",e[e.START=1]=\"START\",e[e.END=2]=\"END\",e[e.POINT=3]=\"POINT\"}(t.InsertionPointType||(t.InsertionPointType={}));var b=(t.InsertionPointType,function(){function e(e,t,n,r){this.toSeq=!1,this.kind=e,this.target=t,this.value=n,this.position=r}return e}());t.ASTChangeCommand=b,t.setAttr=r,t.setAttrStructured=i,t.setKey=a,t.removeNode=o,t.insertNode=s,t.initRamlFile=u;var S=function(){function e(e,t){this.content=e,this.absPath=t}return e.prototype.position=function(e){var t=e;this.initMapping();for(var n=0;n<this.mapping.length;n++){var r=this.mapping[n];if(t<r)return{line:n,column:t,position:e};t-=r}if(0==t)return{line:this.mapping.length-1,column:this.mapping[this.mapping.length-1],position:this.content.length};if(1==t)return{line:this.mapping.length-1,column:this.mapping[this.mapping.length-1]-1,position:e-1};throw new Error(\"Character position exceeds text length: \"+e+\" > + \"+this.content.length+\".\\nUnit path: \"+this.absPath)},e.prototype.initMapping=function(){if(null==this.mapping){if(null==this.content)throw new Error(\"Line Mapper has been given null content\"+(null!=this.absPath?\". Path: \"+this.absPath:\" and null path.\"));this.mapping=[];for(var e=0,t=this.content.length,n=0;n<t;n++)\"\\r\"==this.content.charAt(n)?n<t-1&&\"\\n\"==this.content.charAt(n+1)?(this.mapping.push(n-e+2),e=n+2,n++):(this.mapping.push(n-e+1),e=n+1):\"\\n\"==this.content.charAt(n)&&(this.mapping.push(n-e+1),e=n+1);this.mapping.push(t-e)}},e}();t.LineMapperImpl=S,t.buildPath=c,t.toAbsolutePath=l,t.isWebPath=p,t.isLowLevelNode=f},function(e,t,n){\"use strict\";function r(e,t,n){return E.findDeclaration(e,t,n)}function i(e,t){return E.findUsages(e,t)}function a(e){return E.globalDeclarations(e)}function o(e,t,n){E.refFinder(e,t,n)}function s(e,t){return E.findDeclarationByNode(e,t)}function u(e,t){return E.determineCompletionKind(e,t)}function c(e,t){return E.enumValues(e,t)}function l(e,t){return C.qName(e,t)}function p(e,t){return E.subTypesWithLocals(e,t)}function f(e,t){return E.nodesDeclaringType(e,t)}function d(e){return E.isExampleNodeContent(e)}function m(e){return E.findExampleContentType(e)}function h(e,t){return E.parseDocumentationContent(e,t)}function y(e,t){return E.parseStructuredExample(e,t)}function _(e){return E.isExampleNode(e)}function g(e,t){return E.referenceTargets(e,t)}function v(e){return N.getNominalTypeSource(e)}function b(e,t){return E.findAllSubTypes(e,t)}function S(e){return E.declRoot(e)}function A(e,t,n,r,i){return void 0===r&&(r=!0),void 0===i&&(i=!0),E.deepFindNode(e,t,n,r,i)}function T(e){return E.allChildren(e)}var E=n(321),C=n(4),N=n(144);t.findDeclaration=r,t.findUsages=i,t.globalDeclarations=a,t.refFinder=o,t.findDeclarationByNode=s,function(e){e[e.VALUE_COMPLETION=0]=\"VALUE_COMPLETION\",e[e.KEY_COMPLETION=1]=\"KEY_COMPLETION\",e[e.PATH_COMPLETION=2]=\"PATH_COMPLETION\",e[e.DIRECTIVE_COMPLETION=3]=\"DIRECTIVE_COMPLETION\",e[e.VERSION_COMPLETION=4]=\"VERSION_COMPLETION\",e[e.ANNOTATION_COMPLETION=5]=\"ANNOTATION_COMPLETION\",e[e.SEQUENCE_KEY_COPLETION=6]=\"SEQUENCE_KEY_COPLETION\",e[e.INCOMMENT=7]=\"INCOMMENT\"}(t.LocationKind||(t.LocationKind={}));t.LocationKind;t.determineCompletionKind=u,t.enumValues=c,t.qName=l,t.subTypesWithLocals=p,t.nodesDeclaringType=f,t.isExampleNodeContent=d,t.findExampleContentType=m,t.parseDocumentationContent=h,t.parseStructuredExample=y,t.isExampleNode=_,t.referenceTargets=g,t.getNominalTypeSource=v,t.findAllSubTypes=b,t.declRoot=S,t.deepFindNode=A,t.allChildren=T},function(e,t,n){var r=n(129),i=\"object\"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function(\"return this\")();e.exports=a},function(e,t){function n(){throw new Error(\"setTimeout has not been defined\")}function r(){throw new Error(\"clearTimeout has not been defined\")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(e){if(p===clearTimeout)return clearTimeout(e);if((p===r||!p)&&clearTimeout)return p=clearTimeout,clearTimeout(e);try{return p(e)}catch(t){try{return p.call(null,e)}catch(t){return p.call(this,e)}}}function o(){h&&d&&(h=!1,d.length?m=d.concat(m):y=-1,m.length&&s())}function s(){if(!h){var e=i(o);h=!0;for(var t=m.length;t;){for(d=m,m=[];++y<t;)d&&d[y].run();y=-1,t=m.length}d=null,h=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,p,f=e.exports={};!function(){try{l=\"function\"==typeof setTimeout?setTimeout:n}catch(e){l=n}try{p=\"function\"==typeof clearTimeout?clearTimeout:r}catch(e){p=r}}();var d,m=[],h=!1,y=-1;f.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new u(e,t)),1!==m.length||h||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},f.title=\"browser\",f.browser=!0,f.env={},f.argv=[],f.version=\"\",f.versions={},f.on=c,f.addListener=c,f.once=c,f.off=c,f.removeListener=c,f.removeAllListeners=c,f.emit=c,f.binding=function(e){throw new Error(\"process.binding is not supported\")},f.cwd=function(){return\"/\"},f.chdir=function(e){throw new Error(\"process.chdir is not supported\")},f.umask=function(){return 0}},function(e,t,n){\"use strict\";(function(e){function n(e){return e.asElement&&e.getKind&&e.asAttr&&e.lowLevel}function r(){var t=e.ramlValidation;if(t){var n=t.nodeValidators;if(Array.isArray(n))return n}return[]}function i(){var t=e.ramlValidation;if(t){var n=t.astAnnotationValidators;if(Array.isArray(n))return n}return[]}!function(e){e[e.BASIC=0]=\"BASIC\",e[e.NODE=1]=\"NODE\",e[e.ATTRIBUTE=2]=\"ATTRIBUTE\"}(t.NodeKind||(t.NodeKind={}));t.NodeKind;!function(e){e[e.RAML10=0]=\"RAML10\",e[e.RAML08=1]=\"RAML08\"}(t.RAMLVersion||(t.RAMLVersion={}));t.RAMLVersion;t.isParseResult=n,function(e){e[e.UNRESOLVED_REFERENCE=0]=\"UNRESOLVED_REFERENCE\",e[e.YAML_ERROR=1]=\"YAML_ERROR\",e[e.UNKNOWN_NODE=2]=\"UNKNOWN_NODE\",e[e.MISSING_REQUIRED_PROPERTY=3]=\"MISSING_REQUIRED_PROPERTY\",e[e.PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE=4]=\"PROPERTY_EXPECT_TO_HAVE_SINGLE_VALUE\",e[e.KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT=5]=\"KEY_SHOULD_BE_UNIQUE_INTHISCONTEXT\",e[e.UNABLE_TO_RESOLVE_INCLUDE_FILE=6]=\"UNABLE_TO_RESOLVE_INCLUDE_FILE\",e[e.INVALID_VALUE_SCHEMA=7]=\"INVALID_VALUE_SCHEMA\",e[e.MISSED_CONTEXT_REQUIREMENT=8]=\"MISSED_CONTEXT_REQUIREMENT\",e[e.NODE_HAS_VALUE=9]=\"NODE_HAS_VALUE\",e[e.ONLY_OVERRIDE_ALLOWED=10]=\"ONLY_OVERRIDE_ALLOWED\",e[e.ILLEGAL_PROPERTY_VALUE=11]=\"ILLEGAL_PROPERTY_VALUE\",e[e.ILLEGAL_PROPERTY=12]=\"ILLEGAL_PROPERTY\",e[e.INVALID_PROPERTY=13]=\"INVALID_PROPERTY\"}(t.IssueCode||(t.IssueCode={}));t.IssueCode;t.getNodeValidationPlugins=r,t.getNodeAnnotationValidationPlugins=i}).call(t,n(13))},function(e,t,n){\"use strict\";function r(e){return e instanceof _.ApiImpl||e instanceof g.ApiImpl?(new w).expandTraitsAndResourceTypes(e):null}function i(e){return(new k).expandLibraries(e)}function a(e,t,n){var r=d.fromUnit(e);if(!r)throw new Error(\"couldn't load api from \"+e.absolutePath());if(!t||0==t.length)return r;for(var i=[],a=0;a<t.length;a++){var s=t[a],u=d.fromUnit(s);if(!u)throw new Error(\"couldn't load api from \"+s.absolutePath());i.push(u)}return o(r,i,n)}function o(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=!1);for(var a=e,o=0,s=t;o<s.length;o++){var u=s[o];i&&y.LowLevelProxyNode.isInstance(a.lowLevel())&&(a=(new w).expandHighLevelNode(a,r,e.wrapperNode()).highLevel()),u.overrideMaster(a),u.setMergeMode(n),a=u}return a}function s(e){for(var t=[],n=0,r=e;n<r.length;n++){u(t,r[n],!0)}return t}function u(e,t,n){void 0===n&&(n=!1);var r=n?e:e.concat([]),i=t.lowLevel().unit();if(null==i)return r;if(0==r.length)r.push(i);else{var a=r[r.length-1].absolutePath();i.absolutePath()!=a&&r.push(i)}return r}function c(e){for(var t=[];e;)t.push(e),e=e.parent();return s(t)}function l(){return R.map(function(e){return e.name})}function p(e){for(var t=[],n=e.split(\"|\").slice(1),r=0,i=n;r<i.length;r++)for(var a=i[r],o=0;o<R.length;o++)if(a.match(R[o].regexp)){t.push(R[o].transformer);break}return t}var f=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},d=n(4),m=n(14),h=n(15),y=n(17),_=n(34),g=n(86),v=n(82),b=n(3),S=n(1),A=n(61),T=n(60),E=n(0),C=n(5),N=n(70);t.expandTraitsAndResourceTypes=r,t.expandLibraries=i,t.mergeAPIs=a;var w=function(){function e(){this.hasGlobalTraits=!1,this.hasGlobalResourceTypes=!1,this.namespaceResolver=new T.NamespaceResolver}return e.prototype.expandTraitsAndResourceTypes=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1),this.init(e);var r=e.highLevel().lowLevel();if(!r)return e;if(r.actual().libExpanded)return e;var i=r.unit(),a=i.project().namespaceResolver().hasFragments(i);if(!this.namespaceResolver.hasTemplates(r.unit())&&!a&&!n)return e;var o=this.createHighLevelNode(e.highLevel(),!1,t);return e.definition().key()==b.Universe10.Overlay?o.wrapperNode():this.expandHighLevelNode(o,t,e)},e.prototype.init=function(e){var t=e.highLevel();this.ramlVersion=t.definition().universe().version()},e.prototype.expandHighLevelNode=function(e,t,n){var r=this;this.init(n);var i=e.wrapperNode();return i.setAttributeDefaults(n.getDefaultsCalculator().isEnabled()),i.highLevel().setMergeMode(n.highLevel().getMergeMode()),i.resources().forEach(function(e){return r.processResource(e)}),\"RAML10\"==this.ramlVersion&&(t=t||new A.ReferencePatcher,t.process(e),e.lowLevel().actual().referencePatcher=t),i},e.prototype.getTemplate=function(e,t,n,r){var i=t.lowLevel().unit().path(),a=n[i];a||(a={},n[i]=a);var o=a[e];return void 0!==o?o:(o=null,o=S.find(r,function(n){return d.qName(n.highLevel(),t)==e}),o||(o=null),a[e]=o,o)},e.prototype.createHighLevelNode=function(e,t,n,r){void 0===t&&(t=!0),void 0===n&&(n=null),void 0===r&&(r=!1);for(var i=e,a=[],s=i;s;){var u,c=s.lowLevel();i.definition().key()!=b.Universe10.Overlay||r?(y.LowLevelCompositeNode.isInstance(c)&&(c=c.originalNode().originalNode()),u=new y.LowLevelCompositeNode(c,null,null,this.ramlVersion)):u=c;var l=s.definition(),p=new d.ASTNodeImpl(u,null,l,null);if(p.setUniverse(s.universe()),a.push(p),!t)break;s=s.getMaster()}var f=a.pop();return a=a.reverse(),o(f,a,i.getMergeMode(),n,r)},e.prototype.processResource=function(e,t){var n=this;void 0===t&&(t=[]);var r=t.concat(e.highLevel()),i=this.collectResourceData(e,e,void 0,void 0,r),a=e.highLevel().lowLevel();a.preserveAnnotations(),a.takeOnlyOriginalChildrenWithKey(E.universesInfo.Universe10.ResourceBase.properties.type.name),a.takeOnlyOriginalChildrenWithKey(E.universesInfo.Universe10.FragmentDeclaration.properties.uses.name),i.filter(function(e){return null!=e.resourceType}).forEach(function(t){var n=t.resourceType.node.highLevel().lowLevel(),r=t.resourceType.transformer;r.owner=e,a.adopt(n,r)}),e.methods().forEach(function(e){var t=e.highLevel().lowLevel();t.takeOnlyOriginalChildrenWithKey(E.universesInfo.Universe10.FragmentDeclaration.properties.uses.name);var n=e.method(),r=[];i.forEach(function(i){var a=i.methodTraits[n];a&&(r=r.concat(a),a.forEach(function(n){var r=n.node.highLevel().lowLevel(),i=n.transformer;i.owner=e,t.adopt(r,i)}));var o=i.traits;o&&(r=r.concat(o),o.forEach(function(n){var r=n.node.highLevel().lowLevel(),i=n.transformer;i.owner=e,t.adopt(r,i)}))})}),e.resources().forEach(function(e){return n.processResource(e,r)})},e.prototype.collectResourceData=function(e,t,n,r,i,a){var o=this;void 0===n&&(n=[]),void 0===i&&(i=[]),void 0===a&&(a={}),i=i.concat([t.highLevel()]);var u=this.extractTraits(t,r,i),c={};t.methods().forEach(function(e){var t=o.extractTraits(e,r,i);t&&t.length>0&&(c[e.method()]=t)});var l,p=t.type();if(null!=p){var f=s(i);l=this.readGenerictData(e,p,t.highLevel(),\"resource type\",r,f)}var m={resourceType:l,traits:u,methodTraits:c};if(n.push(m),l){var h=l.node,y=d.qName(h.highLevel(),e.highLevel());a[y]?m.resourceType=null:(a[y]=!0,this.collectResourceData(e,h,n,l.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){var i=this;void 0===r&&(r={}),n=n.concat([e.highLevel()]);for(var a=[],o=-1;o<a.length;o++){var c=o<0?null:a[o],l=c?c.node:e,p=c?c.unitsChain:s(n),f=c?c.transformer:t;l.is&&l.is().forEach(function(t){var n=u(p,t.highLevel()),o=i.readGenerictData(e,t,l.highLevel(),\"trait\",f,n);if(o){r[o.name]=!0,a.push(o)}})}return a},e.prototype.readGenerictData=function(e,t,n,r,i,a){void 0===a&&(a=[]);var o=t.value(),s=v.plural(N.camelCase(r));if(\"string\"==typeof o){i&&(o=i.transform(o).value);var u=A.getDeclaration(o,s,this.namespaceResolver,a);if(u){var c=u.wrapperNode();return{name:o,transformer:null,parentTransformer:i,node:c,ref:t,unitsChain:a}}}else if(d.StructuredValue.isInstance(o)){var l=o,p=l.valueName();i&&(p=i.transform(p).value);var f={},h={},u=A.getDeclaration(p,s,this.namespaceResolver,a);if(u){var c=u.wrapperNode();\"RAML08\"==this.ramlVersion?l.children().forEach(function(e){return f[e.valueName()]=e.lowLevel().value()}):l.children().forEach(function(e){var t=e.lowLevel();t.valueKind()==m.Kind.SCALAR?f[e.valueName()]=t.value():t.valueKind()==m.Kind.INCLUDE_REF&&0==t.children().length?f[e.valueName()]=t.value():h[e.valueName()]=t});var y=new M(e,null,a);Object.keys(f).forEach(function(e){var t=y.transform(f[e]);t&&\"object\"!=typeof t&&(f[e]=t)});var _=new D(r,p,a,f,h,i),g=new M(null,_,a);return{name:p,transformer:g,parentTransformer:i,node:c,ref:t,unitsChain:a}}}return null},e}();t.TraitsAndResourceTypesExpander=w;var k=function(){function e(){}return e.prototype.expandLibraries=function(e){var t=e;if(null==t)return null;y.LowLevelCompositeNode.isInstance(t.highLevel().lowLevel())&&(t=t.highLevel().lowLevel().unit().highLevel().asElement().wrapperNode());var n=new w,r=new A.ReferencePatcher,i=n.createHighLevelNode(t.highLevel(),!0,r,!0),a=n.expandHighLevelNode(i,r,t);return this.processNode(r,a.highLevel()),a},e.prototype.processNode=function(e,t){if(null!=t){var n=t.getMaster();this.processNode(e,n),C.isOverlayType(t.definition())&&e.process(t),e.expandLibraries(t)}},e}();t.LibraryExpander=k,t.toUnits=c;var x=function(){function e(t,n){this.name=t,this.regexp=new RegExp(e.leftTransformRegexp.source+t+e.rightTransformRegexp.source),this.transformer=n}return e.leftTransformRegexp=/\\s*!\\s*/,e.rightTransformRegexp=/\\s*$/,e}(),R=[new x(\"singularize\",function(e){return v.singular(e)}),new x(\"pluralize\",function(e){return v.plural(e)}),new x(\"uppercase\",function(e){return e?e.toUpperCase():e}),new x(\"lowercase\",function(e){return e?e.toLowerCase():e}),new x(\"lowercamelcase\",function(e){return e?N.camelCase(e):e}),new x(\"uppercamelcase\",function(e){if(!e)return e;var t=N.camelCase(e);return t[0].toUpperCase()+t.substring(1,t.length)}),new x(\"lowerunderscorecase\",function(e){return e?N.snake(e).toLowerCase():e}),new x(\"upperunderscorecase\",function(e){return e?N.snake(e).toUpperCase():e}),new x(\"lowerhyphencase\",function(e){return e?N.param(e).toLowerCase():e}),new x(\"upperhyphencase\",function(e){return e?N.param(e).toUpperCase():e})];t.getTransformNames=l,t.getTransformersForOccurence=p;var I=function(){function e(){this.buf=null}return e.prototype.append=function(e){\"\"!==e&&(null!=this.buf?null!=e&&(\"string\"!=typeof this.buf&&(this.buf=\"\"+this.buf),this.buf+=e):\"\"!==e&&(this.buf=e))},e.prototype.value=function(){return null!=this.buf?this.buf:\"\"},e}(),D=function(){function e(e,t,n,r,i,a){this.templateKind=e,this.templateName=t,this.unitsChain=n,this.params=r,this.structuredParams=i,this.vDelegate=a}return e.prototype.transform=function(e,t,n,r){var i={},a=[];if(\"string\"==typeof e){if(this.structuredParams&&h.stringStartsWith(e,\"<<\")&&h.stringEndsWith(e,\">>\")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,c=new I,l=0,f=u.indexOf(\"<<\");f>=0;f=u.indexOf(\"<<\",l)){c.append(u.substring(l,f));var d=f;if(f+=\"<<\".length,(l=this.paramUpperBound(u,f))==-1)break;var m=u.substring(f,l);l+=\">>\".length;var y,o,_=u.substring(d,l),g=p(m);if(g.length>0){var v=m.indexOf(\"|\");if(o=m.substring(0,v).trim(),y=this.params[o],y&&\"string\"==typeof y&&y.indexOf(\"<<\")>=0&&this.vDelegate&&(y=this.vDelegate.transform(y,t,n,r).value),y)for(var b=0,S=g;b<S.length;b++){var A=S[b];y=A(y)}}else o=m.trim(),(y=this.params[o])&&\"string\"==typeof y&&y.indexOf(\"<<\")>=0&&this.vDelegate&&(y=this.vDelegate.transform(y,t,n,r).value);null!==y&&void 0!==y||(i[o]=!0,y=_),c.append(y)}return c.append(u.substring(l,u.length)),{value:c.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r<e.length;r++)if(h.stringStartsWith(e,\"<<\",r))n++,r++;else if(h.stringStartsWith(e,\">>\",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e){var t=this.paramName(e);return t&&this.structuredParams[t]},e.prototype.paramName=function(e){var t=null;if(e.valueKind()==m.Kind.SCALAR){var n=(\"\"+e.value()).trim();h.stringStartsWith(n,\"<<\")&&h.stringEndsWith(n,\">>\")&&(t=n.substring(2,n.length-2))}return t},e}();t.ValueTransformer=D;var M=function(e){function t(t,n,r){e.call(this,null!=n?n.templateKind:\"\",null!=n?n.templateName:\"\",r),this.owner=t,this.delegate=n}return f(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;P.forEach(function(e){return o=o||t.toString().indexOf(\"<<\"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n=\"\",r=this.owner.highLevel().lowLevel(),i=r,a=null;i;){var o=i.key();if(null!=o)if(h.stringStartsWith(o,\"/\")){if(!t)for(var s=o.split(\"/\"),u=s.length-1;u>=0;u--){var c=s[u];if(c.indexOf(\"{\")==-1){t=s[u];break}c.length>0&&(a=c)}n=o+n}else e=o;i=i.parent()}t||a&&(t=\"\"),this.params={resourcePath:n,resourcePathName:t},e&&(this.params.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t}(D);t.DefaultTransformer=M;var P=[\"resourcePath\",\"resourcePathName\",\"methodName\"]},function(e,t){\"function\"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){function r(e,t){var n=a(e,t);return i(n)?n:void 0}var i=n(218),a=n(241);e.exports=r},function(e,t,n){\"use strict\";function r(){return Object.keys(d).length>0}function i(e){f.push(e)}function a(e){d[e]=!0}function o(e){delete d[e],f.forEach(function(t){return t(e)})}function s(e){return!!d[e]}function u(e,t){p.set(e,t)}function c(e){return p.get(e)}n(116);n(176),n(356);var l=n(291),p=l(50);t.hasAsyncRequests=r,t.addLoadCallback=i;var f=[],d={};t.addNotify=a,t.removeNotity=o,t.isWaitingFor=s,t.set=u,t.get=c},function(e,t,n){\"use strict\";function r(e){var t=e.value();if(\"string\"==typeof t||null==t){var n=f.createNode(t,null,e.lowLevel().unit());n._actualNode().startPosition=e.lowLevel().valueStart(),n._actualNode().endPosition=e.lowLevel().valueEnd();return new p.StructuredValue(n,e.parent(),e.property())}return t}function i(e){var t=e._meta;t.resetPrimitiveValuesMeta();var n=e.highLevel();return n.definition().allProperties().forEach(function(r){var i=r.nameId(),a=n.attributes(i),o=!1,s=!1;if(a.forEach(function(e){o=o||null!=e.value(),s=s||e.optional()}),!o){var u=e.getDefaultsCalculator();if(null!=u.attributeDefaultIfEnabled(n,r)){var c=u.insertionKind(n,r);c==d.InsertionKind.CALCULATED?t.registerCalculatedValue(i):c==d.InsertionKind.BY_DEFAULT&&t.registerInsertedAsDefaultValue(i)}}}),t}function a(e,t){return t?e.map(function(e){return t(e)}):e.map(function(e){return e.value()})}function o(e){var t=[],n=e.errors();return null!=n&&(t=t.concat(n)),s(t.map(function(t){return u(e,t)}))}function s(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i<r.length;i++)t.push(n[r[i]]);return t}function u(e,t){var n=t.node&&t.node.lowLevel()&&t.node.lowLevel().unit().lineMapper()||e.lowLevel().unit().lineMapper(),r=null;try{r=n.position(t.start)}catch(e){console.warn(e)}var i=null;try{i=n.position(t.end)}catch(e){console.warn(e)}var a;a=t.path?t.path:t.node?t.node.lowLevel().unit().path():m.declRoot(e).lowLevel().unit().path();var o={code:t.code,message:t.message,path:a,range:{start:r,end:i},isWarning:t.isWarning};return t.extras&&t.extras.length>0&&(o.trace=t.extras.map(function(t){return u(e,t)})),o}function c(e){if(e.isScalar())return!0;for(var t=e.allSuperTypes().filter(function(e){return e.isUnion()||e.isIntersection()}),n=0,r=t;n<r.length;n++){for(var i=r[n],a=!0,o=0,s=i.allOptions();o<s.length;o++){var u=s[o];if(!(a=a||c(u)))break}if(a)return!0}return!1}var l=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},p=n(4),f=n(9),d=(n(0),n(143)),m=n(21),h=n(5),y=n(323),_=n(14),g=function(){function e(e,t){void 0===t&&(t=!0),this._node=e,this._meta=new E(!1,!1,h.isMethodType(this.highLevel().definition())&&this.optional()),t&&e.setWrapperNode(this)}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.wrapperClassName=function(){return\"BasicNodeImpl\"},e.prototype.kind=function(){return\"BasicNode\"},e.prototype.allKinds=function(){return[\"BasicNode\"]},e.prototype.allWrapperClassNames=function(){return[\"BasicNodeImpl\"]},e.prototype.parent=function(){var e=this._node.parent();return e?e.wrapperNode():null},e.prototype.highLevel=function(){return this._node},e.prototype.patchNode=function(e){this._node=e},e.prototype.attributes=function(e,t){var n=this._node.attributes(e);if(!n||0==n.length){var r=this.getDefaultsCalculator().attributeDefaultIfEnabled(this._node,this._node.definition().property(e));return null==r?[]:Array.isArray(r)?r:[r]}return a(n,t)},e.prototype.attribute=function(e,t){var n=this._node.attr(e);if(t&&t!=this.toString&&t!=this.toBoolean&&t!=this.toNumber&&t!=this.toAny)return null==n?null:t(n);var r=n?n.value():null;return null==r&&(r=this.getDefaultsCalculator().attributeDefaultIfEnabled(this._node,this._node.definition().property(e))),null==r?null:t?t(r):r},e.prototype.elements=function(e){var t=this._node.elementsOfKind(e);return t?t.map(function(e){return e.wrapperNode()}):null},e.prototype.element=function(e){var t=this._node.element(e);return t?t.wrapperNode():null},e.prototype.add=function(e){this.highLevel().add(e.highLevel())},e.prototype.addToProp=function(e,t){var n=e.highLevel(),r=this.highLevel().definition().property(t);n._prop=r,this.highLevel().add(n)},e.prototype.remove=function(e){this.highLevel().remove(e.highLevel())},e.prototype.dump=function(){return this.highLevel().dump(\"yaml\")},e.prototype.toString=function(e){var t;return t=e.lowLevel&&e.property?e.value():e,null!=t?t.toString():t},e.prototype.toAny=function(e){return e},e.prototype.toBoolean=function(e){var t;return t=e.lowLevel&&e.property?e.value():e,null!=t?\"true\"==t.toString():t},e.prototype.toNumber=function(e){var t;if(!(t=e.lowLevel&&e.property?e.value():e))return t;try{return parseFloat(t.toString())}catch(e){}return Number.MAX_VALUE},e.prototype.errors=function(){return o(this._node)},e.prototype.filterErrors=function(e){var t=[],n={};e.map(function(e){n[JSON.stringify(e)]=e});for(var r=Object.keys(n),i=0;i<r.length;i++)t.push(n[r[i]]);return t},e.prototype.definition=function(){return this.highLevel().definition()},e.prototype.runtimeDefinition=function(){return h.isTypeDeclarationSibling(this.highLevel().definition())?this.highLevel().localType():null},e.prototype.toJSON=function(e){var t=v;v=this.attributeDefaults();try{return new y.TCKDumper(e).dump(this)}finally{v=t}},e.prototype.optional=function(){var e=this.highLevel();return null!=e&&e.optional()},e.prototype.optionalProperties=function(){return this.highLevel()?this.highLevel().optionalProperties():[]},e.prototype.getDefaultsCalculator=function(){return this.defaultsCalculator?this.defaultsCalculator:(this.parent()&&(this.defaultsCalculator=this.parent().getDefaultsCalculator()),this.defaultsCalculator||(this.defaultsCalculator=new d.AttributeDefaultsCalculator(v)),this.defaultsCalculator)},e.prototype.setAttributeDefaults=function(e){this.defaultsCalculator=new d.AttributeDefaultsCalculator(e)},e.prototype.attributeDefaults=function(){return this.getDefaultsCalculator()&&this.getDefaultsCalculator().isEnabled()},e.prototype.meta=function(){return i(this)},e.prototype.RAMLVersion=function(){return this.highLevel().definition().universe().version()},e.CLASS_IDENTIFIER=\"parserCore.BasicNodeImpl\",e}();t.BasicNodeImpl=g;var v=!0,b=function(){function e(e){this._meta=new T,this.attr=e}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.highLevel=function(){return this.attr},e.prototype.wrapperClassName=function(){return\"AttributeNodeImpl\"},e.prototype.kind=function(){return\"AttributeNode\"},e.prototype.allKinds=function(){return[\"AttributeNode\"]},e.prototype.allWrapperClassNames=function(){return[\"AttributeNodeImpl\"]},e.prototype.optional=function(){var e=this.highLevel();return null!=e&&e.optional()},e.prototype.meta=function(){return this._meta},e.prototype.RAMLVersion=function(){return this.highLevel().definition().universe().version()},e.prototype.parent=function(){var e=this.attr.parent();return e?e.wrapperNode():null},e.prototype.toJSON=function(e){return new y.TCKDumper(e).dump(this)},e.CLASS_IDENTIFIER=\"parserCore.AttributeNodeImpl\",e}();t.AttributeNodeImpl=b,t.toStructuredValue=r;var S=function(){function e(e,t){this.type=t,Array.isArray(e)?this.children=e:this.node=e}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.properties=function(){return this.isArray()?[]:this.getChildren().map(function(e){return new A(e)})},e.prototype.getChildren=function(){return this.node&&this.node.children()||this.children},e.prototype.value=function(){return this.node&&this.node.value()},e.prototype.isScalar=function(){return!!this.node&&(0==this.node.children().length&&(!this.type||c(this.type)))},e.prototype.toJSON=function(){return(new y.TCKDumper).serializeTypeInstance(this)},e.prototype.isArray=function(){return!!this.node&&(this.type?this.type.isArray():this.node&&this.node.valueKind()==_.Kind.SEQ)},e.prototype.items=function(){return this.isArray()?this.node.children().map(function(t){return new e(t)}):null},e.CLASS_IDENTIFIER=\"parserCore.TypeInstanceImpl\",e}();t.TypeInstanceImpl=S;var A=function(){function e(e){this.node=e}return e.isInstance=function(t){if(null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier)for(var n=0,r=t.getClassIdentifier();n<r.length;n++){var i=r[n];if(i==e.CLASS_IDENTIFIER)return!0}return!1},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.name=function(){return this.node.optional()?this.node.key()+\"?\":this.node.key()},e.prototype.value=function(){if(this.isArray()){var e=this.node.children();return e.length>0?new S(e[0]):null}return new S(this.node)},e.prototype.values=function(){return this.isArray()?this.node.children().map(function(e){return new S(e)}):[new S(this.node)]},e.prototype.isArray=function(){var e=this.node.children();if(e.length>0&&null==e[0].key())return!0;var t=this.node.highLevelNode();if(t){var n=t.property();if(n){var r=n.range();if(r)return r.isArray()}}return this.node.valueKind()==_.Kind.SEQ},e.CLASS_IDENTIFIER=\"parserCore.TypeInstancePropertyImpl\",e}();t.TypeInstancePropertyImpl=A;var T=function(){function e(e,t,n){void 0===e&&(e=!1),void 0===t&&(t=!1),void 0===n&&(n=!1),this._insertedAsDefault=e,this._calculated=t,this._optional=n}return e.prototype.calculated=function(){return this._calculated},e.prototype.insertedAsDefault=function(){return this._insertedAsDefault},e.prototype.setCalculated=function(){this._calculated=!0},e.prototype.setInsertedAsDefault=function(){this._insertedAsDefault=!0},e.prototype.setOptional=function(){this._optional=!0},e.prototype.optional=function(){return this._optional},e.prototype.isDefault=function(){return!(this._insertedAsDefault||this._calculated||this._optional)},e.prototype.toJSON=function(){var e={};return this._calculated&&(e.calculated=!0),this._insertedAsDefault&&(e.insertedAsDefault=!0),this._optional&&(e.optional=!0),e},e}();t.ValueMetadataImpl=T;var E=function(e){function t(){e.apply(this,arguments),this.valuesMeta={}}return l(t,e),t.prototype.primitiveValuesMeta=function(){return this.valuesMeta},t.prototype.registerInsertedAsDefaultValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new T(!0):t.setInsertedAsDefault()},t.prototype.registerCalculatedValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new T(!1,!0):t.setCalculated()},t.prototype.registerOptionalValue=function(e){var t=this.valuesMeta[e];null==t?this.valuesMeta[e]=new T(!1,!1,!0):t.setOptional()},t.prototype.resetPrimitiveValuesMeta=function(){this.valuesMeta={}},t.prototype.isDefault=function(){return!!e.prototype.isDefault.call(this)&&0==Object.keys(this.valuesMeta).length},t.prototype.toJSON=function(){var t=this,n=e.prototype.toJSON.call(this),r={},i=Object.keys(this.valuesMeta);return i.length>0&&(i.forEach(function(e){var n=t.valuesMeta[e].toJSON();Object.keys(n).length>0&&(r[e]=n)}),n.primitiveValuesMeta=r),n},t}(T);t.NodeMetadataImpl=E,t.fillElementMeta=i,t.attributesToValues=a,t.errors=o,t.filterErrors=s,t.basicError=u},function(e,t,n){\"use strict\";function r(e){if(!(this instanceof r))return new r(e);c.call(this,e),l.call(this,e),e&&e.readable===!1&&(this.readable=!1),e&&e.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,e&&e.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once(\"end\",i)}function i(){this.allowHalfOpen||this._writableState.ended||s(a,this)}function a(e){e.end()}var o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=r;var s=n(83),u=n(39);u.inherits=n(26);var c=n(154),l=n(94);u.inherits(r,c);for(var p=o(l.prototype),f=0;f<p.length;f++){var d=p[f];r.prototype[d]||(r.prototype[d]=l.prototype[d])}},function(e,t,n){var r=n(45),i=n(352),a=n(351),o=n(353);e.exports=function(e,t,n){function s(e,t,r){return 0===t||t===r.length-e.length?\"\":n}return null==e?\"\":(n=n||\" \",e=String(e).replace(a,\"$1 $2\").replace(o,\"$1 $2\").replace(i,s),r(e,t))}},function(e,t){var n={tr:{regexp:/[\\u0069]/g,map:{i:\"İ\"}},az:{regexp:/[\\u0069]/g,map:{i:\"İ\"}},lt:{regexp:/[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,map:{\"i̇\":\"I\",\"j̇\":\"J\",\"į̇\":\"Į\",\"i̇̀\":\"Ì\",\"i̇́\":\"Í\",\"i̇̃\":\"Ĩ\"}}};e.exports=function(e,t){var r=n[t];return e=null==e?\"\":String(e),r&&(e=e.replace(r.regexp,function(e){return r.map[e]})),e.toUpperCase()}},function(e,t,n){\"use strict\";function r(){}function i(e){try{return e.then}catch(e){return _=e,g}}function a(e,t){try{return e(t)}catch(e){return _=e,g}}function o(e,t,n){try{e(t,n)}catch(e){return _=e,g}}function s(e){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._45=0,this._81=0,this._65=null,this._54=null,e!==r&&h(e,this)}function u(e,t,n){return new e.constructor(function(i,a){var o=new s(r);o.then(i,a),c(e,new m(t,n,o))})}function c(e,t){for(;3===e._81;)e=e._65;if(s._10&&s._10(e),0===e._81)return 0===e._45?(e._45=1,void(e._54=t)):1===e._45?(e._45=2,void(e._54=[e._54,t])):void e._54.push(t);l(e,t)}function l(e,t){y(function(){var n=1===e._81?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._81?p(t.promise,e._65):f(t.promise,e._65));var r=a(n,e._65);r===g?f(t.promise,_):p(t.promise,r)})}function p(e,t){if(t===e)return f(e,new TypeError(\"A promise cannot be resolved with itself.\"));if(t&&(\"object\"==typeof t||\"function\"==typeof t)){var n=i(t);if(n===g)return f(e,_);if(n===e.then&&t instanceof s)return e._81=3,e._65=t,void d(e);if(\"function\"==typeof n)return void h(n.bind(t),e)}e._81=1,e._65=t,d(e)}function f(e,t){e._81=2,e._65=t,s._97&&s._97(e,t),d(e)}function d(e){if(1===e._45&&(c(e,e._54),e._54=null),2===e._45){for(var t=0;t<e._54.length;t++)c(e,e._54[t]);e._54=null}}function m(e,t,n){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof t?t:null,this.promise=n}function h(e,t){var n=!1,r=o(e,function(e){n||(n=!0,p(t,e))},function(e){n||(n=!0,f(t,e))});n||r!==g||(n=!0,f(t,_))}var y=n(101),_=null,g={};e.exports=s,s._10=null,s._97=null,s._61=r,s.prototype.then=function(e,t){if(this.constructor!==s)return u(this,e,t);var n=new s(r);return c(this,new m(e,t,n)),n}},function(e,t,n){\"use strict\";function r(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Api\");return X.createStubNode(n,null,e)}function i(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"LibraryBase\");return X.createStubNode(n,null,e)}function a(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"FragmentDeclaration\");return X.createStubNode(n,null,e)}function o(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Trait\");return X.createStubNode(n,null,e)}function s(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"MethodBase\");return X.createStubNode(n,null,e)}function u(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Operation\");return X.createStubNode(n,null,e)}function c(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"TypeDeclaration\");return X.createStubNode(n,null,e)}function l(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"UsesDeclaration\");return X.createStubNode(n,null,e)}function p(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"XMLFacetInfo\");return X.createStubNode(n,null,e)}function f(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"ArrayTypeDeclaration\");return X.createStubNode(n,null,e)}function d(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"UnionTypeDeclaration\");return X.createStubNode(n,null,e)}function m(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"ObjectTypeDeclaration\");return X.createStubNode(n,null,e)}function h(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"StringTypeDeclaration\");return X.createStubNode(n,null,e)}function y(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"BooleanTypeDeclaration\");return X.createStubNode(n,null,e)}function _(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"NumberTypeDeclaration\");return X.createStubNode(n,null,e)}function g(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"IntegerTypeDeclaration\");return X.createStubNode(n,null,e)}function v(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"DateOnlyTypeDeclaration\");return X.createStubNode(n,null,e)}function b(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"TimeOnlyTypeDeclaration\");return X.createStubNode(n,null,e)}function S(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"DateTimeOnlyTypeDeclaration\");return X.createStubNode(n,null,e)}function A(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"DateTimeTypeDeclaration\");return X.createStubNode(n,null,e)}function T(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"FileTypeDeclaration\");return X.createStubNode(n,null,e)}function E(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Response\");return X.createStubNode(n,null,e)}function C(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"SecuritySchemePart\");return X.createStubNode(n,null,e)}function N(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"AbstractSecurityScheme\");return X.createStubNode(n,null,e)}function w(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"SecuritySchemeSettings\");return X.createStubNode(n,null,e)}function k(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"OAuth1SecuritySchemeSettings\");return X.createStubNode(n,null,e)}function x(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"OAuth2SecuritySchemeSettings\");return X.createStubNode(n,null,e)}function R(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"OAuth2SecurityScheme\");return X.createStubNode(n,null,e)}function I(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"OAuth1SecurityScheme\");return X.createStubNode(n,null,e)}function D(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"PassThroughSecurityScheme\");return X.createStubNode(n,null,e)}function M(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"BasicSecurityScheme\");return X.createStubNode(n,null,e)}function P(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"DigestSecurityScheme\");return X.createStubNode(n,null,e)}function L(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"CustomSecurityScheme\");return X.createStubNode(n,null,e)}function O(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Method\");return X.createStubNode(n,null,e)}function U(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"ResourceType\");return X.createStubNode(n,null,e)}function F(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"ResourceBase\");return X.createStubNode(n,null,e)}function B(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Resource\");return X.createStubNode(n,null,e)}function K(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"DocumentationItem\");return X.createStubNode(n,null,e)}function V(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Library\");return X.createStubNode(n,null,e)}function j(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Overlay\");return X.createStubNode(n,null,e)}function W(e){var t=$.getUniverse(\"RAML10\"),n=t.type(\"Extension\");return X.createStubNode(n,null,e)}function q(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function z(e,t,n){return Z.loadApi(e,t,n).getOrElse(null)}function H(e,t,n){return Z.loadApiAsync(e,t,n)}function Y(e,t,n){return Z.loadRAMLAsync(e,t,n)}function J(e){return Z.getLanguageElementByRuntimeType(e)}var G=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},X=n(36),$=n(0),Q=n(29),Z=n(85),ee=n(89),te=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.wrapperClassName=function(){return\"AnnotableImpl\"},t.prototype.kind=function(){return\"Annotable\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Annotable\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.AnnotableImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.AnnotableImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(Q.BasicNodeImpl);t.AnnotableImpl=te;var ne=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"ValueTypeImpl\"},t.prototype.kind=function(){return\"ValueType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ValueType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"undefined.ValueTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"undefined.ValueTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"undefined\"},t.prototype.value=function(){return this.attr.value()},t}(Q.AttributeNodeImpl);t.ValueTypeImpl=ne;var re=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"StringTypeImpl\"},t.prototype.kind=function(){return\"StringType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StringType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.StringTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.StringTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.value=function(){return this.attr.value()},t}(ne);t.StringTypeImpl=re;var ie=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"UriTemplateImpl\"},t.prototype.kind=function(){return\"UriTemplate\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"UriTemplate\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.UriTemplateImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.UriTemplateImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.UriTemplateImpl=ie;var ae=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"RelativeUriStringImpl\"},t.prototype.kind=function(){return\"RelativeUriString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"RelativeUriString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.RelativeUriStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.RelativeUriStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ie);t.RelativeUriStringImpl=ae;var oe=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"FullUriTemplateStringImpl\"},t.prototype.kind=function(){return\"FullUriTemplateString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FullUriTemplateString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.FullUriTemplateStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.FullUriTemplateStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ie);t.FullUriTemplateStringImpl=oe;var se=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"StatusCodeStringImpl\"},t.prototype.kind=function(){return\"StatusCodeString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StatusCodeString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.StatusCodeStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.StatusCodeStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.StatusCodeStringImpl=se;var ue=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"FixedUriStringImpl\"},t.prototype.kind=function(){return\"FixedUriString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FixedUriString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.FixedUriStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.FixedUriStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.FixedUriStringImpl=ue;var ce=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"ContentTypeImpl\"},t.prototype.kind=function(){return\"ContentType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ContentType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ContentTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ContentTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.ContentTypeImpl=ce;var le=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"MarkdownStringImpl\"},t.prototype.kind=function(){return\"MarkdownString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MarkdownString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.MarkdownStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.MarkdownStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.MarkdownStringImpl=le;var pe=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"SchemaStringImpl\"},t.prototype.kind=function(){return\"SchemaString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SchemaString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.SchemaStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.SchemaStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.SchemaStringImpl=pe;var fe=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"MimeTypeImpl\"},t.prototype.kind=function(){return\"MimeType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MimeType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.MimeTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.MimeTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(re);t.MimeTypeImpl=fe;var de=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"AnyTypeImpl\"},t.prototype.kind=function(){return\"AnyType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AnyType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.AnyTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.AnyTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.AnyTypeImpl=de;var me=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"NumberTypeImpl\"},t.prototype.kind=function(){return\"NumberType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"NumberType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.NumberTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.NumberTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.value=function(){return this.attr.value()},t}(ne);t.NumberTypeImpl=me;var he=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"IntegerTypeImpl\"},t.prototype.kind=function(){return\"IntegerType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"IntegerType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.IntegerTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.IntegerTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.IntegerTypeImpl=he;var ye=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"NullTypeImpl\"},t.prototype.kind=function(){return\"NullType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"NullType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.NullTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.NullTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.NullTypeImpl=ye;var _e=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"TimeOnlyTypeImpl\"},t.prototype.kind=function(){return\"TimeOnlyType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"TimeOnlyType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.TimeOnlyTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.TimeOnlyTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.TimeOnlyTypeImpl=_e;var ge=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"DateOnlyTypeImpl\"},t.prototype.kind=function(){return\"DateOnlyType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateOnlyType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateOnlyTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateOnlyTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.DateOnlyTypeImpl=ge;var ve=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"DateTimeOnlyTypeImpl\"},t.prototype.kind=function(){return\"DateTimeOnlyType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateTimeOnlyType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateTimeOnlyTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateTimeOnlyTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.DateTimeOnlyTypeImpl=ve;var be=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"DateTimeTypeImpl\"},t.prototype.kind=function(){return\"DateTimeType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateTimeType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateTimeTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateTimeTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.DateTimeTypeImpl=be;var Se=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"FileTypeImpl\"},t.prototype.kind=function(){return\"FileType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FileType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.FileTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.FileTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.FileTypeImpl=Se;var Ae=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"BooleanTypeImpl\"},t.prototype.kind=function(){return\"BooleanType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BooleanType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.BooleanTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.BooleanTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.value=function(){return this.attr.value()},t}(ne);t.BooleanTypeImpl=Ae;var Te=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"AnnotationTargetImpl\"},t.prototype.kind=function(){return\"AnnotationTarget\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AnnotationTarget\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.AnnotationTargetImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.AnnotationTargetImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(ne);t.AnnotationTargetImpl=Te;var Ee=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"ReferenceImpl\"},t.prototype.kind=function(){return\"Reference\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Reference\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ReferenceImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ReferenceImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.value=function(){return Q.toStructuredValue(this.attr)},t.prototype.structuredValue=function(){return ee.structuredValue(this)},t.prototype.name=function(){return ee.referenceName(this)},t}(Q.AttributeNodeImpl);t.ReferenceImpl=Ee;var Ce=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"TraitRefImpl\"},t.prototype.kind=function(){return\"TraitRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"TraitRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.TraitRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.TraitRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.trait=function(){return ee.referencedTrait(this)},t}(Ee);t.TraitRefImpl=Ce;var Ne=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?u(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.queryParameters=function(){return e.prototype.elements.call(this,\"queryParameters\")},t.prototype.headers=function(){return e.prototype.elements.call(this,\"headers\")},t.prototype.queryString=function(){return e.prototype.element.call(this,\"queryString\")},t.prototype.responses=function(){return e.prototype.elements.call(this,\"responses\")},t.prototype.wrapperClassName=function(){return\"OperationImpl\"},t.prototype.kind=function(){return\"Operation\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Operation\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OperationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OperationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(te);t.OperationImpl=Ne;var we=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?c(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.facets=function(){return e.prototype.elements.call(this,\"facets\")},t.prototype.schema_original=function(){return e.prototype.attributes.call(this,\"schema\",this.toString)},t.prototype.setSchema=function(e){return this.highLevel().attrOrCreate(\"schema\").setValue(\"\"+e),this},t.prototype.type_original=function(){return e.prototype.attributes.call(this,\"type\",this.toString)},t.prototype.setType=function(e){return this.highLevel().attrOrCreate(\"type\").setValue(\"\"+e),this},t.prototype.location=function(){return e.prototype.attribute.call(this,\"location\",function(e){return new ke(e)})},t.prototype.locationKind=function(){return e.prototype.attribute.call(this,\"locationKind\",function(e){return new xe(e)})},t.prototype.default=function(){return e.prototype.attribute.call(this,\"default\",this.toAny)},t.prototype.setDefault=function(e){return this.highLevel().attrOrCreate(\"default\").setValue(\"\"+e),this},t.prototype.example_original=function(){return e.prototype.element.call(this,\"example\")},t.prototype.examples_original=function(){return e.prototype.elements.call(this,\"examples\")},t.prototype.required=function(){return e.prototype.attribute.call(this,\"required\",this.toBoolean)},t.prototype.setRequired=function(e){return this.highLevel().attrOrCreate(\"required\").setValue(\"\"+e),this},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.xml=function(){return e.prototype.element.call(this,\"xml\")},t.prototype.allowedTargets=function(){return e.prototype.attributes.call(this,\"allowedTargets\",function(e){return new Te(e)})},t.prototype.isAnnotation=function(){return e.prototype.attribute.call(this,\"isAnnotation\",this.toBoolean)},t.prototype.setIsAnnotation=function(e){return this.highLevel().attrOrCreate(\"isAnnotation\").setValue(\"\"+e),this},t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t.prototype.wrapperClassName=function(){return\"TypeDeclarationImpl\"},t.prototype.kind=function(){return\"TypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"TypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.TypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.TypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.runtimeType=function(){return ee.runtimeType(this)},t.prototype.validateInstance=function(e){return ee.validateInstance(this,e)},t.prototype.validateInstanceWithDetailedStatuses=function(e){return ee.validateInstanceWithDetailedStatuses(this,e)},t.prototype.example=function(){return ee.getTypeExample(this)},t.prototype.examples=function(){return ee.getTypeExamples(this)},t.prototype.fixedFacets=function(){return ee.typeFixedFacets(this)},t.prototype.type=function(){return ee.typeValue(this)},t.prototype.schema=function(){return ee.schemaValue(this)},t.prototype.structuredType=function(){return ee.typeStructuredValue(this)},t.prototype.parametrizedProperties=function(){return ee.getTemplateParametrizedProperties(this)},t.prototype.scalarsAnnotations=function(){return new Le(this.highLevel())},t}(te);t.TypeDeclarationImpl=we;var ke=function(){function e(e){this.attr=e}return e.prototype.wrapperClassName=function(){return\"ModelLocationImpl\"},e.prototype.kind=function(){return\"ModelLocation\"},e.prototype.allKinds=function(){return[\"ModelLocation\"]},e.prototype.allWrapperClassNames=function(){return[\"RAML10.ModelLocationImpl\"]},e.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ModelLocationImpl\"==r)return!0}return!1},e.prototype.RAMLVersion=function(){return\"RAML10\"},e}();t.ModelLocationImpl=ke;var xe=function(){function e(e){this.attr=e}return e.prototype.wrapperClassName=function(){return\"LocationKindImpl\"},e.prototype.kind=function(){return\"LocationKind\"},e.prototype.allKinds=function(){return[\"LocationKind\"]},e.prototype.allWrapperClassNames=function(){return[\"RAML10.LocationKindImpl\"]},e.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.LocationKindImpl\"==r)return!0}return!1},e.prototype.RAMLVersion=function(){return\"RAML10\"},e}();t.LocationKindImpl=xe;var Re=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?l(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.key=function(){return e.prototype.attribute.call(this,\"key\",this.toString)},t.prototype.setKey=function(e){return this.highLevel().attrOrCreate(\"key\").setValue(\"\"+e),this},t.prototype.value=function(){return e.prototype.attribute.call(this,\"value\",this.toString)},t.prototype.setValue=function(e){return this.highLevel().attrOrCreate(\"value\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"UsesDeclarationImpl\"},t.prototype.kind=function(){return\"UsesDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"UsesDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.UsesDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.UsesDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.ast=function(){return ee.referencedNode(this)},t.prototype.scalarsAnnotations=function(){return new Ie(this.highLevel())},t}(te);t.UsesDeclarationImpl=Re;var Ie=function(){function e(e){this.node=e}return e.prototype.value=function(){var e=this.node.attr(\"value\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.UsesDeclarationScalarsAnnotationsImpl=Ie;var De=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?p(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.attribute=function(){return e.prototype.attribute.call(this,\"attribute\",this.toBoolean)},t.prototype.setAttribute=function(e){return this.highLevel().attrOrCreate(\"attribute\").setValue(\"\"+e),this},t.prototype.wrapped=function(){return e.prototype.attribute.call(this,\"wrapped\",this.toBoolean)},t.prototype.setWrapped=function(e){return this.highLevel().attrOrCreate(\"wrapped\").setValue(\"\"+e),this},t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.namespace=function(){return e.prototype.attribute.call(this,\"namespace\",this.toString)},t.prototype.setNamespace=function(e){return this.highLevel().attrOrCreate(\"namespace\").setValue(\"\"+e),this},t.prototype.prefix=function(){return e.prototype.attribute.call(this,\"prefix\",this.toString)},t.prototype.setPrefix=function(e){return this.highLevel().attrOrCreate(\"prefix\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"XMLFacetInfoImpl\"},t.prototype.kind=function(){return\"XMLFacetInfo\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"XMLFacetInfo\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.XMLFacetInfoImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.XMLFacetInfoImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Me(this.highLevel())},t}(te);t.XMLFacetInfoImpl=De;var Me=function(){function e(e){this.node=e}return e.prototype.attribute=function(){var e=this.node.attr(\"attribute\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.wrapped=function(){var e=this.node.attr(\"wrapped\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.name=function(){var e=this.node.attr(\"name\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.namespace=function(){var e=this.node.attr(\"namespace\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.prefix=function(){var e=this.node.attr(\"prefix\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.XMLFacetInfoScalarsAnnotationsImpl=Me;var Pe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?f(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.uniqueItems=function(){return e.prototype.attribute.call(this,\"uniqueItems\",this.toBoolean)},t.prototype.setUniqueItems=function(e){return this.highLevel().attrOrCreate(\"uniqueItems\").setValue(\"\"+e),this},t.prototype.items_original=function(){return e.prototype.attributes.call(this,\"items\",this.toString)},t.prototype.setItems=function(e){return this.highLevel().attrOrCreate(\"items\").setValue(\"\"+e),this},t.prototype.minItems=function(){return e.prototype.attribute.call(this,\"minItems\",this.toNumber)},t.prototype.setMinItems=function(e){return this.highLevel().attrOrCreate(\"minItems\").setValue(\"\"+e),this},t.prototype.maxItems=function(){return e.prototype.attribute.call(this,\"maxItems\",this.toNumber)},t.prototype.setMaxItems=function(e){return this.highLevel().attrOrCreate(\"maxItems\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"ArrayTypeDeclarationImpl\"},t.prototype.kind=function(){return\"ArrayTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ArrayTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ArrayTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ArrayTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.structuredItems=function(){return ee.itemsStructuredValue(this)},t.prototype.items=function(){return ee.getItems(this)},t.prototype.findComponentTypeDeclaration=function(){return ee.findComponentTypeDeclaration(this)},t.prototype.scalarsAnnotations=function(){return new Oe(this.highLevel())},t}(we);t.ArrayTypeDeclarationImpl=Pe;var Le=function(){function e(e){this.node=e}return e.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.schema=function(){return this.node.attributes(\"schema\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.type=function(){return this.node.attributes(\"type\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.location=function(){var e=this.node.attr(\"location\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.locationKind=function(){var e=this.node.attr(\"locationKind\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.default=function(){var e=this.node.attr(\"default\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.required=function(){var e=this.node.attr(\"required\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.allowedTargets=function(){return this.node.attributes(\"allowedTargets\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.isAnnotation=function(){var e=this.node.attr(\"isAnnotation\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.TypeDeclarationScalarsAnnotationsImpl=Le;var Oe=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.uniqueItems=function(){var e=this.node.attr(\"uniqueItems\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.items=function(){return this.node.attributes(\"items\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},t.prototype.minItems=function(){var e=this.node.attr(\"minItems\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.maxItems=function(){var e=this.node.attr(\"maxItems\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Le);t.ArrayTypeDeclarationScalarsAnnotationsImpl=Oe;var Ue=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?d(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"UnionTypeDeclarationImpl\"},t.prototype.kind=function(){return\"UnionTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"UnionTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.UnionTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.UnionTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(we);t.UnionTypeDeclarationImpl=Ue;var Fe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?m(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.properties=function(){return e.prototype.elements.call(this,\"properties\")},t.prototype.minProperties=function(){return e.prototype.attribute.call(this,\"minProperties\",this.toNumber)},t.prototype.setMinProperties=function(e){return this.highLevel().attrOrCreate(\"minProperties\").setValue(\"\"+e),this},t.prototype.maxProperties=function(){return e.prototype.attribute.call(this,\"maxProperties\",this.toNumber)},t.prototype.setMaxProperties=function(e){return this.highLevel().attrOrCreate(\"maxProperties\").setValue(\"\"+e),this},t.prototype.additionalProperties=function(){return e.prototype.attribute.call(this,\"additionalProperties\",this.toBoolean)},t.prototype.setAdditionalProperties=function(e){return this.highLevel().attrOrCreate(\"additionalProperties\").setValue(\"\"+e),this},t.prototype.discriminator=function(){return e.prototype.attribute.call(this,\"discriminator\",this.toString)},t.prototype.setDiscriminator=function(e){return this.highLevel().attrOrCreate(\"discriminator\").setValue(\"\"+e),this},t.prototype.discriminatorValue=function(){return e.prototype.attribute.call(this,\"discriminatorValue\",this.toString)},t.prototype.setDiscriminatorValue=function(e){return this.highLevel().attrOrCreate(\"discriminatorValue\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"ObjectTypeDeclarationImpl\"},t.prototype.kind=function(){return\"ObjectTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ObjectTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ObjectTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ObjectTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Be(this.highLevel())},t}(we);t.ObjectTypeDeclarationImpl=Fe;var Be=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.minProperties=function(){var e=this.node.attr(\"minProperties\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.maxProperties=function(){var e=this.node.attr(\"maxProperties\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.additionalProperties=function(){var e=this.node.attr(\"additionalProperties\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.discriminator=function(){var e=this.node.attr(\"discriminator\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.discriminatorValue=function(){var e=this.node.attr(\"discriminatorValue\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Le);t.ObjectTypeDeclarationScalarsAnnotationsImpl=Be;var Ke=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?h(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.pattern=function(){return e.prototype.attribute.call(this,\"pattern\",this.toString)},t.prototype.setPattern=function(e){return this.highLevel().attrOrCreate(\"pattern\").setValue(\"\"+e),this},t.prototype.minLength=function(){return e.prototype.attribute.call(this,\"minLength\",this.toNumber)},t.prototype.setMinLength=function(e){return this.highLevel().attrOrCreate(\"minLength\").setValue(\"\"+e),this},t.prototype.maxLength=function(){return e.prototype.attribute.call(this,\"maxLength\",this.toNumber)},t.prototype.setMaxLength=function(e){return this.highLevel().attrOrCreate(\"maxLength\").setValue(\"\"+e),this},t.prototype.enum=function(){return e.prototype.attributes.call(this,\"enum\",this.toString)},t.prototype.setEnum=function(e){return this.highLevel().attrOrCreate(\"enum\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"StringTypeDeclarationImpl\"},t.prototype.kind=function(){return\"StringTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StringTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.StringTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.StringTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Ve(this.highLevel())},t}(we);t.StringTypeDeclarationImpl=Ke;var Ve=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.pattern=function(){var e=this.node.attr(\"pattern\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.minLength=function(){var e=this.node.attr(\"minLength\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.maxLength=function(){var e=this.node.attr(\"maxLength\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.enum=function(){return this.node.attributes(\"enum\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},t}(Le);t.StringTypeDeclarationScalarsAnnotationsImpl=Ve;var je=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?y(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"BooleanTypeDeclarationImpl\"},t.prototype.kind=function(){return\"BooleanTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BooleanTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.BooleanTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.BooleanTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(we);t.BooleanTypeDeclarationImpl=je;var We=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?_(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.minimum=function(){return e.prototype.attribute.call(this,\"minimum\",this.toNumber)},t.prototype.setMinimum=function(e){return this.highLevel().attrOrCreate(\"minimum\").setValue(\"\"+e),this},t.prototype.maximum=function(){return e.prototype.attribute.call(this,\"maximum\",this.toNumber)},t.prototype.setMaximum=function(e){return this.highLevel().attrOrCreate(\"maximum\").setValue(\"\"+e),this},t.prototype.enum=function(){return e.prototype.attributes.call(this,\"enum\",this.toString)},t.prototype.setEnum=function(e){return this.highLevel().attrOrCreate(\"enum\").setValue(\"\"+e),this},t.prototype.format=function(){return e.prototype.attribute.call(this,\"format\",this.toString)},t.prototype.setFormat=function(e){return this.highLevel().attrOrCreate(\"format\").setValue(\"\"+e),this},t.prototype.multipleOf=function(){return e.prototype.attribute.call(this,\"multipleOf\",this.toNumber)},t.prototype.setMultipleOf=function(e){return this.highLevel().attrOrCreate(\"multipleOf\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"NumberTypeDeclarationImpl\"},t.prototype.kind=function(){return\"NumberTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"NumberTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.NumberTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.NumberTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new ze(this.highLevel())},t}(we);t.NumberTypeDeclarationImpl=We;var qe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?g(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.format=function(){return e.prototype.attribute.call(this,\"format\",this.toString)},t.prototype.setFormat=function(e){return this.highLevel().attrOrCreate(\"format\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"IntegerTypeDeclarationImpl\"},t.prototype.kind=function(){return\"IntegerTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"IntegerTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.IntegerTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.IntegerTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new He(this.highLevel())},t}(We);t.IntegerTypeDeclarationImpl=qe;var ze=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.minimum=function(){var e=this.node.attr(\"minimum\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.maximum=function(){var e=this.node.attr(\"maximum\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.enum=function(){return this.node.attributes(\"enum\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},t.prototype.format=function(){var e=this.node.attr(\"format\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.multipleOf=function(){var e=this.node.attr(\"multipleOf\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Le);t.NumberTypeDeclarationScalarsAnnotationsImpl=ze;var He=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.format=function(){var e=this.node.attr(\"format\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(ze);t.IntegerTypeDeclarationScalarsAnnotationsImpl=He;var Ye=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?v(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"DateOnlyTypeDeclarationImpl\"},t.prototype.kind=function(){return\"DateOnlyTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateOnlyTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateOnlyTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateOnlyTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(we);t.DateOnlyTypeDeclarationImpl=Ye;var Je=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?b(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"TimeOnlyTypeDeclarationImpl\"},t.prototype.kind=function(){return\"TimeOnlyTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"TimeOnlyTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.TimeOnlyTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.TimeOnlyTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(we);t.TimeOnlyTypeDeclarationImpl=Je;var Ge=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?S(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"DateTimeOnlyTypeDeclarationImpl\"},t.prototype.kind=function(){return\"DateTimeOnlyTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateTimeOnlyTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateTimeOnlyTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateTimeOnlyTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(we);t.DateTimeOnlyTypeDeclarationImpl=Ge;var Xe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?A(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.format=function(){return e.prototype.attribute.call(this,\"format\",this.toString)},t.prototype.setFormat=function(e){return this.highLevel().attrOrCreate(\"format\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"DateTimeTypeDeclarationImpl\"},t.prototype.kind=function(){return\"DateTimeTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateTimeTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DateTimeTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DateTimeTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new $e(this.highLevel())},t}(we);t.DateTimeTypeDeclarationImpl=Xe;var $e=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.format=function(){var e=this.node.attr(\"format\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Le);t.DateTimeTypeDeclarationScalarsAnnotationsImpl=$e;var Qe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?T(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.fileTypes=function(){return e.prototype.attributes.call(this,\"fileTypes\",function(e){return new ce(e)})},t.prototype.minLength=function(){return e.prototype.attribute.call(this,\"minLength\",this.toNumber)},t.prototype.setMinLength=function(e){return this.highLevel().attrOrCreate(\"minLength\").setValue(\"\"+e),this},t.prototype.maxLength=function(){return e.prototype.attribute.call(this,\"maxLength\",this.toNumber)},t.prototype.setMaxLength=function(e){return this.highLevel().attrOrCreate(\"maxLength\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"FileTypeDeclarationImpl\"},t.prototype.kind=function(){return\"FileTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FileTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.FileTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.FileTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Ze(this.highLevel())},t}(we);t.FileTypeDeclarationImpl=Qe;var Ze=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.fileTypes=function(){return this.node.attributes(\"fileTypes\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},t.prototype.minLength=function(){var e=this.node.attr(\"minLength\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.maxLength=function(){var e=this.node.attr(\"maxLength\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Le);t.FileTypeDeclarationScalarsAnnotationsImpl=Ze;var et=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?E(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.code=function(){return e.prototype.attribute.call(this,\"code\",function(e){return new se(e)})},t.prototype.headers=function(){return e.prototype.elements.call(this,\"headers\")},t.prototype.body=function(){return e.prototype.elements.call(this,\"body\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.wrapperClassName=function(){return\"ResponseImpl\"},t.prototype.kind=function(){return\"Response\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Response\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ResponseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ResponseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.isOkRange=function(){return ee.isOkRange(this)},t.prototype.scalarsAnnotations=function(){return new tt(this.highLevel())},t}(te);t.ResponseImpl=et;var tt=function(){function e(e){this.node=e}return e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.ResponseScalarsAnnotationsImpl=tt;var nt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?C(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.wrapperClassName=function(){return\"SecuritySchemePartImpl\"},t.prototype.kind=function(){return\"SecuritySchemePart\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemePart\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.SecuritySchemePartImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.SecuritySchemePartImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(Ne);t.SecuritySchemePartImpl=nt;var rt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?s(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.body=function(){return e.prototype.elements.call(this,\"body\")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,\"protocols\",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate(\"protocols\").setValue(\"\"+e),this},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new Ce(e)})},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new it(e)})},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"MethodBaseImpl\"},t.prototype.kind=function(){return\"MethodBase\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MethodBase\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.MethodBaseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.MethodBaseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new vt(this.highLevel())},t}(Ne);t.MethodBaseImpl=rt;var it=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"SecuritySchemeRefImpl\"},t.prototype.kind=function(){return\"SecuritySchemeRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemeRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.SecuritySchemeRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.SecuritySchemeRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.securitySchemeName=function(){return ee.securitySchemeName(this)},t.prototype.securityScheme=function(){return ee.securityScheme(this)},t}(Ee);t.SecuritySchemeRefImpl=it;var at=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?N(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",this.toString)},t.prototype.setType=function(e){return this.highLevel().attrOrCreate(\"type\").setValue(\"\"+e),this},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.describedBy=function(){return e.prototype.element.call(this,\"describedBy\")},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"AbstractSecuritySchemeImpl\"},t.prototype.kind=function(){return\"AbstractSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AbstractSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.AbstractSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.AbstractSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new _t(this.highLevel())},t}(te);t.AbstractSecuritySchemeImpl=at;var ot=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?w(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(te);t.SecuritySchemeSettingsImpl=ot;var st=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?k(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.requestTokenUri=function(){return e.prototype.attribute.call(this,\"requestTokenUri\",function(e){return new ue(e)})},t.prototype.authorizationUri=function(){return e.prototype.attribute.call(this,\"authorizationUri\",function(e){return new ue(e)})},t.prototype.tokenCredentialsUri=function(){return e.prototype.attribute.call(this,\"tokenCredentialsUri\",function(e){return new ue(e)})},t.prototype.signatures=function(){return e.prototype.attributes.call(this,\"signatures\",this.toString)},t.prototype.setSignatures=function(e){return this.highLevel().attrOrCreate(\"signatures\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"OAuth1SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"OAuth1SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth1SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OAuth1SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OAuth1SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new ut(this.highLevel())},t}(ot);t.OAuth1SecuritySchemeSettingsImpl=st;var ut=function(){function e(e){this.node=e}return e.prototype.requestTokenUri=function(){var e=this.node.attr(\"requestTokenUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.authorizationUri=function(){var e=this.node.attr(\"authorizationUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.tokenCredentialsUri=function(){var e=this.node.attr(\"tokenCredentialsUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.signatures=function(){return this.node.attributes(\"signatures\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e}();t.OAuth1SecuritySchemeSettingsScalarsAnnotationsImpl=ut;var ct=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?x(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.accessTokenUri=function(){return e.prototype.attribute.call(this,\"accessTokenUri\",function(e){return new ue(e)})},t.prototype.authorizationUri=function(){return e.prototype.attribute.call(this,\"authorizationUri\",function(e){return new ue(e)})},t.prototype.authorizationGrants=function(){return e.prototype.attributes.call(this,\"authorizationGrants\",this.toString)},t.prototype.setAuthorizationGrants=function(e){return this.highLevel().attrOrCreate(\"authorizationGrants\").setValue(\"\"+e),this},t.prototype.scopes=function(){return e.prototype.attributes.call(this,\"scopes\",this.toString)},t.prototype.setScopes=function(e){return this.highLevel().attrOrCreate(\"scopes\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"OAuth2SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"OAuth2SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth2SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OAuth2SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OAuth2SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new lt(this.highLevel())},t}(ot);t.OAuth2SecuritySchemeSettingsImpl=ct;var lt=function(){function e(e){this.node=e}return e.prototype.accessTokenUri=function(){var e=this.node.attr(\"accessTokenUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.authorizationUri=function(){var e=this.node.attr(\"authorizationUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.authorizationGrants=function(){return this.node.attributes(\"authorizationGrants\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.scopes=function(){return this.node.attributes(\"scopes\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e}();t.OAuth2SecuritySchemeSettingsScalarsAnnotationsImpl=lt;var pt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?R(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"OAuth2SecuritySchemeImpl\"},t.prototype.kind=function(){return\"OAuth2SecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth2SecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OAuth2SecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OAuth2SecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.OAuth2SecuritySchemeImpl=pt;var ft=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?I(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"OAuth1SecuritySchemeImpl\"},t.prototype.kind=function(){return\"OAuth1SecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth1SecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OAuth1SecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OAuth1SecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.OAuth1SecuritySchemeImpl=ft;var dt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?D(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"PassThroughSecuritySchemeImpl\"},t.prototype.kind=function(){return\"PassThroughSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"PassThroughSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.PassThroughSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.PassThroughSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.PassThroughSecuritySchemeImpl=dt;var mt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?M(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"BasicSecuritySchemeImpl\"},t.prototype.kind=function(){return\"BasicSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BasicSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.BasicSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.BasicSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.BasicSecuritySchemeImpl=mt;var ht=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?P(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"DigestSecuritySchemeImpl\"},t.prototype.kind=function(){return\"DigestSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DigestSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DigestSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DigestSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.DigestSecuritySchemeImpl=ht;var yt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?L(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.wrapperClassName=function(){return\"CustomSecuritySchemeImpl\"},t.prototype.kind=function(){return\"CustomSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"CustomSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.CustomSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.CustomSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(at);t.CustomSecuritySchemeImpl=yt;var _t=function(){function e(e){this.node=e}return e.prototype.type=function(){var e=this.node.attr(\"type\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.AbstractSecuritySchemeScalarsAnnotationsImpl=_t;var gt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?O(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.method=function(){return e.prototype.attribute.call(this,\"method\",this.toString)},t.prototype.setMethod=function(e){return this.highLevel().attrOrCreate(\"method\").setValue(\"\"+e),this},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"MethodImpl\"},t.prototype.kind=function(){return\"Method\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Method\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.MethodImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.MethodImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.parentResource=function(){return ee.parentResource(this)},t.prototype.ownerApi=function(){return ee.ownerApi(this)},t.prototype.methodId=function(){return ee.methodId(this)},t.prototype.allSecuredBy=function(){return ee.allSecuredBy(this)},t.prototype.parametrizedProperties=function(){return ee.getTemplateParametrizedProperties(this)},t.prototype.scalarsAnnotations=function(){return new bt(this.highLevel())},t}(rt);t.MethodImpl=gt;var vt=function(){function e(e){this.node=e}return e.prototype.protocols=function(){return this.node.attributes(\"protocols\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.is=function(){return this.node.attributes(\"is\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.securedBy=function(){return this.node.attributes(\"securedBy\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.MethodBaseScalarsAnnotationsImpl=vt;var bt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(vt);t.MethodScalarsAnnotationsImpl=bt;var St=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?o(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t.prototype.wrapperClassName=function(){return\"TraitImpl\"},t.prototype.kind=function(){return\"Trait\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Trait\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.TraitImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.TraitImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.parametrizedProperties=function(){return ee.getTemplateParametrizedProperties(this)},t.prototype.scalarsAnnotations=function(){return new At(this.highLevel())},t}(rt);t.TraitImpl=St;var At=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.usage=function(){var e=this.node.attr(\"usage\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(vt);t.TraitScalarsAnnotationsImpl=At;var Tt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"ResourceTypeRefImpl\"},t.prototype.kind=function(){return\"ResourceTypeRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ResourceTypeRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ResourceTypeRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ResourceTypeRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.resourceType=function(){return ee.referencedResourceType(this)},t}(Ee);t.ResourceTypeRefImpl=Tt;var Et=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?F(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.methods=function(){return e.prototype.elements.call(this,\"methods\")},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new Ce(e)})},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",function(e){return new Tt(e)})},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new it(e)})},t.prototype.uriParameters_original=function(){return e.prototype.elements.call(this,\"uriParameters\")},t.prototype.wrapperClassName=function(){return\"ResourceBaseImpl\"},t.prototype.kind=function(){return\"ResourceBase\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ResourceBase\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ResourceBaseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ResourceBaseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.uriParameters=function(){return ee.uriParametersPrimary(this)},t.prototype.allUriParameters=function(){return ee.uriParameters(this)},t.prototype.allSecuredBy=function(){return ee.allSecuredBy(this)},t.prototype.scalarsAnnotations=function(){return new Nt(this.highLevel())},t}(te);t.ResourceBaseImpl=Et;var Ct=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?B(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.relativeUri=function(){return e.prototype.attribute.call(this,\"relativeUri\",function(e){return new ae(e)})},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.resources=function(){return e.prototype.elements.call(this,\"resources\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.wrapperClassName=function(){return\"ResourceImpl\"},t.prototype.kind=function(){return\"Resource\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Resource\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ResourceImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ResourceImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.completeRelativeUri=function(){return ee.completeRelativeUri(this)},t.prototype.absoluteUri=function(){return ee.absoluteUri(this)},t.prototype.parentResource=function(){return ee.parent(this)},t.prototype.childResource=function(e){return ee.childResource(this,e)},t.prototype.childMethod=function(e){return ee.childMethod(this,e)},t.prototype.ownerApi=function(){return ee.ownerApi(this)},t.prototype.absoluteUriParameters=function(){return ee.absoluteUriParameters(this)},t.prototype.scalarsAnnotations=function(){return new wt(this.highLevel())},t}(Et);t.ResourceImpl=Ct;var Nt=function(){function e(e){this.node=e}return e.prototype.is=function(){return this.node.attributes(\"is\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.type=function(){var e=this.node.attr(\"type\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.securedBy=function(){return this.node.attributes(\"securedBy\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e}();t.ResourceBaseScalarsAnnotationsImpl=Nt;var wt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Nt);t.ResourceScalarsAnnotationsImpl=wt;var kt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?U(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t.prototype.wrapperClassName=function(){return\"ResourceTypeImpl\"},t.prototype.kind=function(){return\"ResourceType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ResourceType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ResourceTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ResourceTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.parametrizedProperties=function(){return ee.getTemplateParametrizedProperties(this)},t.prototype.scalarsAnnotations=function(){return new xt(this.highLevel())},t}(Et);t.ResourceTypeImpl=kt;var xt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.displayName=function(){var e=this.node.attr(\"displayName\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.usage=function(){var e=this.node.attr(\"usage\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Nt);t.ResourceTypeScalarsAnnotationsImpl=xt;var Rt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.wrapperClassName=function(){return\"AnnotationRefImpl\"},t.prototype.kind=function(){return\"AnnotationRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AnnotationRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.AnnotationRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.AnnotationRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.annotation=function(){return ee.referencedAnnotation(this)},t}(Ee);t.AnnotationRefImpl=Rt;var It=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?K(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.content=function(){return e.prototype.attribute.call(this,\"content\",function(e){return new le(e)})},t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t.prototype.wrapperClassName=function(){return\"DocumentationItemImpl\"},t.prototype.kind=function(){return\"DocumentationItem\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DocumentationItem\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.DocumentationItemImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.DocumentationItemImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Dt(this.highLevel())},t}(te);t.DocumentationItemImpl=It;var Dt=function(){function e(e){this.node=e}return e.prototype.title=function(){var e=this.node.attr(\"title\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.content=function(){var e=this.node.attr(\"content\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.DocumentationItemScalarsAnnotationsImpl=Dt;var Mt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?a(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t.prototype.wrapperClassName=function(){return\"FragmentDeclarationImpl\"},t.prototype.kind=function(){return\"FragmentDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FragmentDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.FragmentDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.FragmentDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t}(te);t.FragmentDeclarationImpl=Mt;var Pt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?i(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.schemas=function(){return e.prototype.elements.call(this,\"schemas\")},t.prototype.types=function(){return e.prototype.elements.call(this,\"types\")},t.prototype.traits_original=function(){return e.prototype.elements.call(this,\"traits\")},t.prototype.resourceTypes_original=function(){return e.prototype.elements.call(this,\"resourceTypes\")},t.prototype.annotationTypes=function(){return e.prototype.elements.call(this,\"annotationTypes\")},t.prototype.securitySchemes=function(){return e.prototype.elements.call(this,\"securitySchemes\")},t.prototype.wrapperClassName=function(){return\"LibraryBaseImpl\"},t.prototype.kind=function(){return\"LibraryBase\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"LibraryBase\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.LibraryBaseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.LibraryBaseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.traits=function(){return ee.traitsPrimary(this)},t.prototype.allTraits=function(){return ee.allTraits(this)},t.prototype.resourceTypes=function(){return ee.resourceTypesPrimary(this)},t.prototype.allResourceTypes=function(){return ee.allResourceTypes(this)},t}(Mt);t.LibraryBaseImpl=Pt;var Lt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?V(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"LibraryImpl\"},t.prototype.kind=function(){return\"Library\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Library\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.LibraryImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.LibraryImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Ot(this.highLevel())},t}(Pt);t.LibraryImpl=Lt;var Ot=function(){function e(e){this.node=e}return e.prototype.usage=function(){var e=this.node.attr(\"usage\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e}();t.LibraryScalarsAnnotationsImpl=Ot;var Ut=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?r(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new le(e)})},t.prototype.version=function(){return e.prototype.attribute.call(this,\"version\",this.toString)},t.prototype.setVersion=function(e){return this.highLevel().attrOrCreate(\"version\").setValue(\"\"+e),this},t.prototype.baseUri=function(){return e.prototype.attribute.call(this,\"baseUri\",function(e){return new oe(e)})},t.prototype.baseUriParameters_original=function(){return e.prototype.elements.call(this,\"baseUriParameters\")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,\"protocols\",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate(\"protocols\").setValue(\"\"+e),this},t.prototype.mediaType=function(){return e.prototype.attributes.call(this,\"mediaType\",function(e){return new fe(e)})},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new it(e)})},t.prototype.resources=function(){return e.prototype.elements.call(this,\"resources\")},t.prototype.documentation=function(){return e.prototype.elements.call(this,\"documentation\")},t.prototype.annotations=function(){return e.prototype.attributes.call(this,\"annotations\",function(e){return new Rt(e)})},t.prototype.wrapperClassName=function(){return\"ApiImpl\"},t.prototype.kind=function(){return\"Api\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Api\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ApiImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ApiImpl\"==r)return!0}return!1},t.prototype.RAMLVersion_original=function(){return\"RAML10\"},t.prototype.expand=function(e){return void 0===e&&(e=!1),ee.expandSpec(this,e)},t.prototype.childResource=function(e){return ee.childResource(this,e)},t.prototype.allResources=function(){return ee.allResources(this)},t.prototype.baseUriParameters=function(){return ee.baseUriParametersPrimary(this)},t.prototype.allBaseUriParameters=function(){return ee.baseUriParameters(this)},t.prototype.allProtocols=function(){return ee.allProtocols(this)},t.prototype.RAMLVersion=function(){return ee.RAMLVersion(this)},t.prototype.scalarsAnnotations=function(){return new Bt(this.highLevel())},t}(Pt);t.ApiImpl=Ut;var Ft=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?j(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.extends=function(){return e.prototype.attribute.call(this,\"extends\",this.toString)},t.prototype.setExtends=function(e){return this.highLevel().attrOrCreate(\"extends\").setValue(\"\"+e),this},t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"OverlayImpl\"},t.prototype.kind=function(){return\"Overlay\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Overlay\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.OverlayImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.OverlayImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new Kt(this.highLevel())},t}(Ut);t.OverlayImpl=Ft;var Bt=function(){function e(e){this.node=e}return e.prototype.title=function(){var e=this.node.attr(\"title\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.description=function(){var e=this.node.attr(\"description\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.version=function(){var e=this.node.attr(\"version\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.baseUri=function(){var e=this.node.attr(\"baseUri\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},e.prototype.protocols=function(){return this.node.attributes(\"protocols\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.mediaType=function(){return this.node.attributes(\"mediaType\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e.prototype.securedBy=function(){return this.node.attributes(\"securedBy\").map(function(e){var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})})},e}();t.ApiScalarsAnnotationsImpl=Bt;var Kt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.usage=function(){var e=this.node.attr(\"usage\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.extends=function(){var e=this.node.attr(\"extends\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.title=function(){var e=this.node.attr(\"title\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Bt);t.OverlayScalarsAnnotationsImpl=Kt;var Vt=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?W(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return G(t,e),t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.extends=function(){return e.prototype.attribute.call(this,\"extends\",this.toString)},t.prototype.setExtends=function(e){return this.highLevel().attrOrCreate(\"extends\").setValue(\"\"+e),this},t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"ExtensionImpl\"},t.prototype.kind=function(){return\"Extension\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Extension\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML10.ExtensionImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML10.ExtensionImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML10\"},t.prototype.scalarsAnnotations=function(){return new jt(this.highLevel())},t}(Ut);t.ExtensionImpl=Vt;var jt=function(e){function t(){e.apply(this,arguments)}return G(t,e),t.prototype.usage=function(){var e=this.node.attr(\"usage\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.extends=function(){var e=this.node.attr(\"extends\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t.prototype.title=function(){var e=this.node.attr(\"title\");if(null==e)return[];var t=e.annotations();return Q.attributesToValues(t,function(e){return new Rt(e)})},t}(Bt);t.ExtensionScalarsAnnotationsImpl=jt,t.loadApiSync=q,t.loadRAMLSync=z,t.loadApi=H,t.loadRAML=Y,t.getLanguageElementByRuntimeType=J},function(e,t,n){\"use strict\";(function(e){function r(e,t,n){return new Le.Function(e).call(t,n)}function i(e,t){var n=e.property();return n&&n.getContextRequirements().forEach(function(r){e.checkContextValue(r.name,r.value,r.value)||t.accept($(De.CONTEXT_REQUIREMENT,{name:r.name,value:r.value,propName:n.nameId()},e))}),n}function a(e,t){var n;try{n=e.lowLevel().unit().project().fsEnabled()}catch(e){n=!0}if(n&&void 0!==he&&he){for(var r=[\"exists\",\"readFile\",\"writeFile\",\"readdir\",\"existsSync\",\"readFileSync\",\"writeFileSync\",\"readdirSync\"],i=(Object.keys(he),0);i<r.length;i++)if(!he[r[i]])return;var a=e.lowLevel().unit().absolutePath(),o=me.dirname(a);Oe(me.resolve(o,\"raml-lint.js\"),t,e);var s=me.resolve(o,\".raml\");if(he.existsSync(s)){if(he.statSync(s).isDirectory()){he.readdirSync(s).forEach(function(n){n.indexOf(\"-lint.js\")!=-1&&Oe(me.resolve(s,n),t,e)})}}}}function o(e){return e.nameId()==ye.Universe10.TypeDeclaration.properties.type.name||e.nameId()==ye.Universe10.TypeDeclaration.properties.schema.name}function s(e){return!!c(e)&&e.nameId()==ye.Universe10.TypeDeclaration.properties.default.name}function u(e){return!!c(e)&&e.nameId()==ye.Universe10.TypeDeclaration.properties.example.name}function c(e){return!!e.domain()&&!e.domain().getAdapter(ve.RAMLService).isUserDefined()}function l(e){return!!c(e)&&e.nameId()==ye.Universe08.MethodBase.properties.securedBy.name}function p(e){for(var t=e;;){if(t.definition().getAdapter(ve.RAMLService).isInlinedTemplates())return t.definition().nameId();var n=t.parent();if(!n)break;t=n}return null}function f(e){var n=e.parent(),r=null,i=n.definition();if(n&&fe.UserDefinedClass.isInstance(i)){var a=n.property();if(_e.isIsProperty(a)||_e.isTypeProperty(a)){var o=e.name();r=null!=t.RESERVED_TEMPLATE_PARAMETERS[o]?$(De.INVALID_PARAMETER_NAME,{paramName:o},e):$(De.UNUSED_PARAMETER,{paramName:o},e)}}if(!r){var s=e.name(),u=ge(\"RAML08\"),c=i.universe().version()==u.version();if(c){var l=ye.Universe08.Parameter.name;ye.Universe10.TypeDeclaration.name;if(c&&i.isAssignableFrom(l)){for(var p=u.type(l).allSubTypes().filter(function(e){return null!=ye.Universe08[e.nameId()].properties[s]}),f={},d=0;d<p.length;d++){var m=p[d];if(!f[m.nameId()]){var h=m.valueRequirements();if(h&&0!=h.length){var y=h.filter(function(e){return\"type\"==e.name}).map(function(e){return e.value});if(0!=y.length){var _=y[0];f[m.nameId()]=_,m.allSubTypes().forEach(function(e){return p.push(e)})}}}}var g=Object.keys(f).map(function(e){return f[e]}).sort();if(g.length>0){var v=g.map(function(e,t){var n=\"'\"+e+\"'\";return t==g.length-1?n:t==g.length-2?n+\" or \":n+\", \"}).join(\"\");r=$(De.INVALID_PROPERTY_OWNER_TYPE,{propName:s,namesStr:v},e)}}}}return r}function d(e,t){if(e.isElement()){if(e.invalidSequence){var n=e.property().nameId();n=Re.sentenceCase(Ie.singular(n)),t.acceptUnique(Z(De.SEQUENCE_NOT_ALLOWED_10,{propName:n},e.lowLevel().parent().parent(),e))}var r=e.asElement();if(r.definition().isAssignableFrom(ye.Universe10.LibraryBase.name)){var i,a=!1,o=!1;r.lowLevel().children().forEach(function(e){\"schemas\"==e.key()&&(a=!0,i=e),\"types\"==e.key()&&(o=!0)}),a&&o&&t.accept(ht(i,r,ue.IssueCode.ILLEGAL_PROPERTY_VALUE,!1,\"types and schemas are mutually exclusive\",!1))}r.definition().requiredProperties()&&r.definition().requiredProperties().length;m(e,t),(new tt).validate(r,t),(new dt).validate(r,t)}else m(e,t);(new pt).validate(e,t)}function m(e,t,n){void 0===n&&(n=!1);var r=e.parent(),i=e.lowLevel().value();if(e.lowLevel()){if(e.lowLevel().keyKind()==pe.Kind.MAP&&t.accept($(De.NODE_KEY_IS_A_MAP,{},e)),e.lowLevel().keyKind()==pe.Kind.SEQ&&null==i){var a=!1;e.isElement()&&e.asElement().definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name)&&(a=!0),a||t.accept($(De.NODE_KEY_IS_A_SEQUENCE,{},e))}null==r&&e.lowLevel().errors().forEach(function(n){var r=n.mark?n.mark.position:0,i={code:\"YAML_ERROR\",message:n.message,node:null,start:r,end:r+1,isWarning:!1,path:e.lowLevel().unit()==e.root().lowLevel().unit()?null:e.lowLevel().unit().path(),unit:e.lowLevel().unit()};t.accept(i)})}if(e.isUnknown()){if(e.name().indexOf(\"<<\")!=-1&&null!=p(r))return(new Ve).validateName(e,t),!1;if(e.needSequence&&t.accept($(De.SEQUENCE_REQUIRED,{name:e.name()},e)),e.needMap)return e.knownProperty?t.accept($(De.PROPERTY_MUST_BE_A_MAP_10,{propName:e.knownProperty.nameId()},e)):t.accept($(De.MAP_REQUIRED,{},e)),!1;if(e.unresolvedRef&&t.accept($(De.UNRESOLVED_REFERENCE,{ref:i},e)),e.knownProperty){if(0==e.lowLevel().includeErrors().length){if(p(r)&&Ee.startsWith(i,\"<<\")&&Ee.endsWith(i,\">>\"))return!1;if(\"body\"==e.name()&&e.computedValue(\"mediaType\"))return!1;\"~\"!=e.lowLevel().value()&&t.accept($(De.SCALAR_PROHIBITED,{propName:e.name()},e))}}else{var o=f(e);o||(o=$(De.UNKNOWN_NODE,{name:e.name()},e)),t.accept(o)}}if(e.markCh()&&!e.allowRecursive())return!!e.property()&&(t.accept($(De.RECURSIVE_DEFINITION,{name:e.name()},e)),!1);if(e.definition&&e.definition().isAssignableFrom(ye.Universe10.Operation.name)){var s=y(e.wrapperNode()),u=s.queryStringComesFrom,c=s.queryParamsComesFrom;u&&c&&(t.accept(h(u,e,!1)),t.accept(h(c,e,!0)))}return e.definition&&e.definition()&&(e.definition().key()===ye.Universe10.Overlay||e.definition().key()===ye.Universe10.Extension)&&A(e,t,n),!0}function h(e,t,n){var r=e,i=e,a=n?ye.Universe10.Operation.properties.queryString.name:ye.Universe10.Operation.properties.queryParameters.name;return r.unit?Z(De.PROPERTY_ALREADY_SPECIFIED,{propName:a},r,t):$(De.PROPERTY_ALREADY_SPECIFIED,{propName:a},i)}function y(e){return{queryParamsComesFrom:_(e,!0),queryStringComesFrom:_(e,!1)}}function _(e,t){if(!e)return null;var n=v(e,t);if(n)return n;var r=e.is&&e.is()||[],i=le.find(r,function(e){return _(e.trait(),t)});if(i)return i.highLevel();var a=e.parentResource&&e.parentResource(),o=a&&g(a,t);return o?o:(a=e.parent&&e.parent(),a&&a.highLevel().definition().isAssignableFrom(ye.Universe10.ResourceBase.name)?g(a,t):null)}function g(e,t){var n=e.is(),r=le.find(n,function(e){return _(e.trait(),t)});if(r)return r.highLevel();var i=e.type(),a=i&&i.resourceType();return a&&g(a,t)?i.highLevel():void 0}function v(e,t){return t?b(e):S(e)}function b(e){var t=e.highLevel();return t.lowLevel&&le.find(t.lowLevel().children(),function(e){return e.key&&e.key()===ye.Universe10.Operation.properties.queryParameters.name})}function S(e){return e.highLevel().element(ye.Universe10.Operation.properties.queryString.name)}function A(e,t,n){if(void 0===n&&(n=!1),!e.parent()){var r=e.asElement();if(r&&r.isAuxilary()){var i=r.getMaster();i&&d(i,t)}}}function T(e,t,n){if(void 0===n&&(n=!1),m(e,t,n))try{(e.definition&&e.definition()&&(e.definition().key()===ye.Universe10.Overlay||e.definition().key()===ye.Universe10.Extension)?e.children():e.directChildren()).filter(function(e){return!n||e.property&&e.property()&&e.property().isRequired()}).forEach(function(n){if(n&&n.errorMessage){var r=n.errorMessage;return void t.accept($(r.entry,r.parameters,n.name()?n:e))}n.validate(t)})}finally{e.unmarkCh()}}function E(e){var t=e.value();if(\"string\"==typeof t&&t.indexOf(\"<<\")!=-1)return!0;for(var n=e.children(),r=0;r<n.length;r++)if(E(n[r]))return!0;return!1}function C(e,t){if(!e.parent())try{w(e,t)}finally{N(e,t)}if(e.isAttr())(new We).validate(e,t);else if(e.isElement()){if(e.invalidSequence){var n=e.property().nameId(),r=Re.sentenceCase(Ie.singular(n));t.acceptUnique(Z(De.SEQUENCE_NOT_ALLOWED_10,{propName:r},e.lowLevel().parent().parent(),e,!1))}var i=e.asElement();if(_e.isExampleSpecType(i.definition())){var a=i.children();if(0==a.length)return void T(e,t,!0);var o=a.filter(function(e){var t=e.lowLevel().key();return!t||(\"(\"!=t.charAt(0)||\")\"!=t.charAt(t.length-1))&&null==i.definition().property(t)});if(o.length>0)return void T(e,t,!0)}if(i.definition().isAnnotationType()||i.property()&&\"annotations\"==i.property().nameId())return void(new Ze).validate(i,t);if(i.definition().isAssignableFrom(ye.Universe10.UsesDeclaration.name)){var s=i.attr(ye.Universe10.UsesDeclaration.properties.value.name);if(s&&s.value()){var u=i.lowLevel().unit().resolve(s.value());if(u&&null!==u.contents()){if(!Ne.isWaitingFor(s.value())){var c=[];if(0===u.contents().trim().length)return void t.accept($(De.EMPTY_FILE,{path:s.value()},i,!1));if(u.highLevel().validate(de.createBasicValidationAcceptor(c,u.highLevel())),c.length>0){var l=Fe(s,i);c.forEach(function(e){e.unit=null==e.unit?u:e.unit,e.path||(e.path=u.absolutePath())});for(var f=0,d=c;f<d.length;f++){for(var m=d[f],h=m;h.extras&&h.extras.length>0;)h=h.extras[0];h!=l&&(h.extras||(h.extras=[]),h.extras.push(l)),t.accept(m)}}}}else t.accept($(De.INVALID_LIBRARY_PATH,{path:s.value()},i,!1))}}if(i.definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name)){if(p(i)&&E(i.lowLevel()))return;return i.attrs().forEach(function(n){var r=n.property().range().key();if(r==ye.Universe08.RelativeUriString||r==ye.Universe10.RelativeUriString)return void(new He).validate(n,t);if(r==ye.Universe08.FullUriTemplateString||r==ye.Universe10.FullUriTemplateString)return void(new He).validate(n,t);if(n.property().getAdapter(ve.RAMLPropertyService).isKey()){var a=e.property()&&e.property().nameId();if(a==ye.Universe08.Resource.properties.uriParameters.name||a==ye.Universe08.Resource.properties.baseUriParameters.name)return;if(i.property()&&i.property().nameId()==ye.Universe10.MethodBase.properties.body.name)return void(new Ye).validate(n,t)}}),(new ot).validate(i,t),(new st).validate(i,t),(new it).validate(i,t),void(new et).validate(i,t)}if(i.definition().isAssignableFrom(ye.Universe10.LibraryBase.name)){var y,_=!1,g=!1;i.lowLevel().children().forEach(function(e){\"schemas\"==e.key()&&(_=!0,y=e),\"types\"==e.key()&&(g=!0)}),_&&g&&t.accept(Z(De.TYPES_AND_SCHEMAS_ARE_EXCLUSIVE,{},y,i))}var v=i.definition().requiredProperties()&&i.definition().requiredProperties().length>0,b=i.definition().getAdapter(ve.RAMLService).getAllowAny();b?v&&T(e,t,!0):T(e,t),(new ft).validate(i,t),(new tt).validate(i,t),(new dt).validate(i,t)}else T(e,t);(new pt).validate(e,t)}function N(e,t){if(e.lowLevel()){delete e.lowLevel().actual()._inc,e.children().forEach(function(e){return N(e,t)})}}function w(e,t){var n=e.lowLevel();if(n){var r=n.actual();if(!r._inc){if(e.isElement()){var i=e.name();\"string\"==typeof i&&null!=i&&i.indexOf(\" \")!=-1&&t.accept($(De.SPACES_IN_KEY,{value:i},e,!0))}if(r._inc=!0,n){n.includeErrors().forEach(function(n){var r=!1;e.lowLevel().hasInnerIncludeError()&&(r=!0);var i=$(De.INCLUDE_ERROR,{msg:n},e,r);t.accept(i)});var a=n.includePath();if(null!=a&&!me.isAbsolute(a)&&!ce.isWebPath(a)){var o=n.unit().absolutePath();if(x(me.dirname(o),a)>0){var s=$(De.PATH_EXCEEDS_ROOT,{},e,!0);t.accept(s)}}}e.children().forEach(function(e){return w(e,t)}),0==e.children().length&&null!=n&&n.children().forEach(function(n){return k(n,t,e)})}}}function k(e,t,n){e.includeErrors().forEach(function(r){var i=!1;e.hasInnerIncludeError()&&(i=!0);var a=Z(De.INCLUDE_ERROR,{msg:r},e,n,i);t.accept(a)});var r=e.includePath();if(null!=r&&!me.isAbsolute(r)&&!ce.isWebPath(r)){var i=e.unit().absolutePath();if(x(me.dirname(i),r)>0){var a=Z(De.PATH_EXCEEDS_ROOT,{},e,n,!0);t.accept(a)}}e.children().forEach(function(e){return k(e,t,n)})}function x(e,t){for(var n=Be(e),r=Be(t),i=n.length,a=0,o=0,s=r;o<s.length;o++){\"..\"==s[o]?--i<0&&(a=Math.min(i,a)):i++}return-1*a}function R(e,t,n,r,i){return e.hasArrayInHierarchy()?I(e,t,n,r,i):!e.hasValueTypeInHierarchy()||D(e,t,n,r,i)}function I(e,t,n,r,i){return!e.arrayInHierarchy().componentType()||R(e.arrayInHierarchy().componentType(),t,n,r)}function D(e,t,n,r,i){try{if(e.key()==ye.Universe10.AnnotationRef){var a=Ae.referenceTargets(r,t),o=le.find(a,function(e){return de.qName(e,t)==n});if(null!=o){var s=o.attributes(\"allowedTargets\");if(s){var u=s.map(function(e){return e.value()});if(u.length>0){var c=!1,l=t.definition().allSuperTypes();l=l.concat([t.definition()]);var p=l.map(function(e){return e.nameId()});if(u.forEach(function(e){\"API\"==e&&(e=\"Api\"),\"NamedExample\"==e&&(e=\"ExampleSpec\"),\"SecurityScheme\"==e&&(e=\"AbstractSecurityScheme\"),\"SecuritySchemeSettings\"==e&&(e=\"SecuritySchemeSettings\"),le.find(p,function(t){return t==e})?c=!0:(\"Parameter\"==e&&t.computedValue(\"location\")&&(c=!0),\"Field\"==e&&t.computedValue(\"field\")&&(c=!0))}),!c){var f=u.map(function(e){return\"'\"+e+\"'\"}).join(\", \");return new qe(De.INVALID_ANNOTATION_LOCATION,{aName:n,aValues:f})}}}}return _}if(e.key()==ye.Universe08.SchemaString||e.key()==ye.Universe10.SchemaString){var d=!1;if(fe.UserDefinedProp.isInstance(r)){var m=r,h=m.node();if(h){var y=h.property();y&&(d=_e.isTypeProperty(y)||_e.isSchemaProperty(y))}}if(d)return!1;var _=we.createSchema(n,z(t.lowLevel(),i&&i.lowLevel()));if(!_)return _;if(_ instanceof Error)_.canBeRef=!0;else{var g=!1;try{JSON.parse(n),g=!0}catch(e){}if(g)try{_.validateSelf()}catch(e){return e.isWarning=!0,e}}return _}if(e.key()==ye.Universe08.StatusCodeString||e.key()==ye.Universe10.StatusCodeString){var v=te(n);if(null!=v)return v}if(e.key()==ye.Universe08.BooleanType||e.isAssignableFrom(ye.Universe10.BooleanType.name)){if(\"true\"!==n&&\"false\"!==n&&n!==!0&&n!==!1)return new qe(De.BOOLEAN_EXPECTED);if(i){var b=i.lowLevel().value(!0);if(\"true\"!==b&&\"false\"!==b)return new qe(De.BOOLEAN_EXPECTED)}}if(e.key()==ye.Universe08.NumberType||e.isAssignableFrom(ye.Universe10.NumberType.name)){var S=parseFloat(n);if(isNaN(S))return new qe(De.NUMBER_EXPECTED,{propName:r.nameId()})}if((e.key()==ye.Universe08.StringType||e.isAssignableFrom(ye.Universe10.StringType.name))&&null===n&&t&&r){var A=t.attr(r.nameId());if(A){var T=A.lowLevel().children();if(T&&T.length>0)return new qe(De.STRING_EXPECTED_3,{propName:r.nameId()})}}return!0}catch(e){return e.canBeRef=!0,e}}function M(e){if(!e)return!1;var t=e.toLowerCase(),n=e.toUpperCase();return e!==t&&e!==n}function P(e){if(!e)return null;if(e.isElement()){var n=e,r=n.definition();if(r&&t.typeToName.hasOwnProperty(r.nameId()))return t.typeToName[r.nameId()];if(r.isAssignableFrom(ye.Universe10.TypeDeclaration.name)||r.isAssignableFrom(ye.Universe08.Parameter.name)){if(n.property()&&t.parameterPropertyToName.hasOwnProperty(n.property().nameId()))return t.parameterPropertyToName[n.property().nameId()];if(n.property()&&n.parent()&&n.property().nameId()==ye.Universe10.LibraryBase.properties.types.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(ye.Universe10.LibraryBase.name))return\"type\";if(n.property()&&n.parent()&&n.property().nameId()==ye.Universe10.LibraryBase.properties.securitySchemes.name&&n.parent().definition()&&n.parent().definition().isAssignableFrom(ye.Universe10.LibraryBase.name))return\"security scheme\"}}return null}function L(e,t,n){var r=Ae.declRoot(n);r._cach||(r._cach={});var i=e.id();if(e.domain()&&(i+=e.domain().nameId()),i){var a=r._cach[i];if(a)return null!=a[t]}var o=Ae.enumValues(e,n),s={};return o.forEach(function(e){return s[e]=1}),e.id()&&(r._cach[i]=s),null!=s[t]}function O(e,n,r,i){if(F(e,n,i),B(e,n,i),r&&(\"null\"!=r||!e.isAllowNull())){var a=e.getAdapter(ve.RAMLPropertyService),o=L(e,r,n.parent());if(o||n.lowLevel().unit().absolutePath()===n.parent().lowLevel().unit().absolutePath()||(o=L(e,r,de.fromUnit(n.lowLevel().unit()))),!o){if(\"string\"==typeof r&&0==r.indexOf(\"x-\")&&e.nameId()==ye.Universe10.TypeDeclaration.properties.type.name)return!0;var s=a.isReference&&a.isReference()&&a.referencesTo&&a.referencesTo()&&a.referencesTo().nameId&&a.referencesTo().nameId(),u=t.typeToName[s]||V(n),c={referencedToName:u,ref:r},l=u?De.UNRECOGNIZED_ELEMENT:De.UNRESOLVED_REFERENCE,p=K(l,e,n);return i.accept($(p,c,n,e.range().key()===ye.Universe08.SchemaString)),!0}return!(!U(n)||!_e.isTraitRefType(n.definition()))&&(i.accept($(De.DUPLICATE_TRAIT_REFERENCE,{refValue:r},n)),!0)}}function U(e){var t,n=e.property().domain().universe().version();if(!(t=\"RAML10\"==n?oe(ae.serialize(e.lowLevel())):e.value()&&e.value().valueName&&e.value().valueName()))return!1;var r=e.parent&&e.parent();if(!r)return!1;var i=e.name&&e.name();if(!i)return!1;var a=r.attributes&&r.attributes(i);if(!a)return!1;if(0===a.length)return!1;var o=0;return a.forEach(function(e){var r;\"RAML10\"==n?t=oe(ae.serialize(e.lowLevel())):r=e.value&&e.value()&&e.value().valueName&&e.value().valueName(),r===t&&o++}),o>1}function F(e,t,n){if(_e.isIsProperty(e)){var r=t.lowLevel();if(null!=r){var i=null,a=r.parent(),o=null!=a?a.parent():null;if(r.kind()==pe.Kind.MAPPING&&r.key()&&\"is\"==r.key()?i=r:null!=a&&a.kind()==pe.Kind.MAPPING&&a.key()&&\"is\"==a.key()?i=a:null!=o&&o.kind()==pe.Kind.MAPPING&&o.key()&&\"is\"==o.key()&&(i=o),null!=i){null==i.value()||i.children()&&0!=i.children().length||n.accept($(De.IS_IS_ARRAY,{},t));var s=!1;i.children().forEach(function(e){e.kind()!=pe.Kind.SCALAR&&e.kind()!=pe.Kind.MAP&&(s=!0)}),s&&n.accept($(De.IS_IS_ARRAY,{},t))}}}}function B(e,t,n){if(_e.isTypeProperty(e)&&_e.isResourceTypeRefType(t.definition())){var r=t.lowLevel();null==t.value()&&r&&r.children()&&0==r.children().length?r.kind()==pe.Kind.MAPPING&&null!=r.valueKind()&&n.accept($(De.RESOURCE_TYPE_NAME,{},t)):null==t.value()&&r&&r.children()&&r.children().length>1&&n.accept($(De.MULTIPLE_RESOURCE_TYPES,{},t))}}function K(e,t,n){return\"type\"==t.nameId()&&\"RAML08\"==t.domain().universe().version()&&t.domain().isAssignableFrom(ye.Universe08.Parameter.name)?De.TYPES_VARIETY_RESTRICTION:null!=n.parent()&&_e.isSecuritySchemaType(n.parent().definition())?De.UNRECOGNIZED_SECURITY_SCHEME:e}function V(e){var t=e&&e.lowLevel()&&e.lowLevel().key();if(t===ye.Universe10.AbstractSecurityScheme.properties.type.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===ye.Universe10.AbstractSecurityScheme.name)return\"security scheme type\"}else if(t===ye.Universe08.BodyLike.properties.schema.name){var n=e.parent()&&e.parent().definition()&&e.parent().definition().nameId();if(n===ye.Universe08.BodyLike.name)return\"schema\"}}function j(e,t){return q(e,t.getValidationPath())}function W(e){var t=e.getExtra(Te.SOURCE_EXTRA);return de.LowLevelWrapperForTypeSystem.isInstance(t)?t.node():null}function q(e,t){if(!t)return e;var n=e.children().filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name});if(e.isElement()&&_e.isTypeDeclarationDescendant(e.asElement().definition())){var r=e.lowLevel();n=le.uniq(e.directChildren().concat(e.children())).filter(function(e){return(!e.isAttr()||!e.asAttr().isFromKey())&&e.name()===t.name}).sort(function(e,t){for(var n=e.lowLevel().parent();n&&n.kind()!=pe.Kind.MAPPING;)n=n.parent();for(var i=t.lowLevel().parent();i&&i.kind()!=pe.Kind.MAPPING;)i=i.parent();return n==r?-1:i==r?1:0})}var i=t.child&&\"number\"==typeof t.child.name?t.child.name:-1;if(i>=0&&n.length>i)return q(n[i],t.child.child);if(n.length>0)return q(n[0],t.child);if(!e.lowLevel())return e;for(var a=e.lowLevel().children(),o=0;o<a.length;o++)if(a[o].key()===t.name){var s=new de.BasicASTNode(a[o],e);return q(s,t.child)}if(!isNaN(t.name)&&a[t.name]){var u=a[t.name],s=new de.BasicASTNode(u,e);return q(s,t.child)}return e}function z(e,t){var n=e&&e.includeBaseUnit()&&(e.includePath&&e.includePath()?e.includeBaseUnit().resolve(e.includePath()):e.includeBaseUnit());if(t){var r=t&&t.includeBaseUnit()&&(t.includePath&&t.includePath()?t.includeBaseUnit().resolve(t.includePath()):t.includeBaseUnit());r!=n&&(n=r)}return new Ce.ContentProvider(n)}function H(e){return e.indexOf(\"json\")!=-1}function Y(e){return e.indexOf(\"xml\")!=-1}function J(e){var t=G(e);if(\"body\"==t){var n=e.root().attr(\"mediaType\");return n?n.value():null}return t}function G(e){if(e.parent()){if(e.parent().definition().key()==ye.Universe08.BodyLike)return e.parent().name();if(e.parent().parent()){var t=e.parent().parent().definition().key();if(t==ye.Universe08.Response||t==ye.Universe10.Response)return e.parent().property().nameId()==ye.Universe08.Response.properties.headers.name?null:e.parent().name();if(t==ye.Universe08.Method||t==ye.Universe10.Method)return e.parent().property().nameId()==ye.Universe10.MethodBase.properties.queryParameters.name||e.parent().property().nameId()==ye.Universe10.MethodBase.properties.headers.name?null:e.parent().name()}}return null}function X(e,t){return Q(e.getCode(),e.getMessage(),j(t,e),e.isWarning())}function $(e,t,n,r){void 0===r&&(r=!1);var i=ne(e,t);return Q(e.code,i,n,r)}function Q(e,t,n,r){void 0===r&&(r=!1);var i=null,a=null;if(se.LowLevelProxyNode.isInstance(n.lowLevel()))for(var o=n.lowLevel();!o.primaryNode();)i||(i=mt(n,e,r,t,!0,a)),n=n.parent(),o=n.lowLevel();var s=n;if(n&&(a=n.property(),n.lowLevel().unit()!=n.root().lowLevel().unit())){i=mt(n,e,r,t,!0,a);for(n.lowLevel().unit();n.lowLevel().unit()!=n.root().lowLevel().unit();)a=n.property(),n=n.parent()}if(i){var u=n.lowLevel().unit().project().namespaceResolver();if(u){var c=u.resolveNamespace(n.root().lowLevel().unit(),s.lowLevel().unit());if(c){var l=c.usesNodes.map(function(e){return Z(De.ISSUES_IN_THE_LIBRARY,{value:e.value()},e,e.unit().highLevel(),!0)});l.push(i),l=l.reverse();for(var p=0;p<l.length-1;p++)l[p].extras.push(l[p+1]);return i}}n.property()&&n.property().nameId()==ye.Universe10.FragmentDeclaration.properties.uses.name&&null!=n.parent()&&(a=n.property(),n=n.parent())}var f=mt(n,e,r,t,!1,a);if(i){if(i.extras.push(f),n.lowLevel().valueKind()==pe.Kind.INCLUDE_REF){var d=De.ERROR_IN_INCLUDED_FILE;f.code=d.code,f.message=ne(d,{msg:f.message})}f=i}return f}function Z(e,t,n,r,i,a){void 0===i&&(i=!1),void 0===a&&(a=!1);var o=ne(e,t);return ee(e.code,o,n,r,i,a)}function ee(e,t,n,r,i,a){void 0===i&&(i=!1),void 0===a&&(a=!1);var o=null;if(n){var s=r.root().lowLevel().unit();if(r.lowLevel().unit()!=s){o=ht(n,r,e,i,t,!0);var u=r.lowLevel().unit();for(u&&(t=t+\" \"+u.path());r.lowLevel().unit()!=s;)r=r.parent()}}o&&(r.property()&&r.property().nameId()==ye.Universe10.FragmentDeclaration.properties.uses.name&&null!=r.parent()&&(r=r.parent()),n=r.lowLevel());var c=ht(n,r,e,i,t,a);return o&&(o.extras.push(c),n.valueKind()==pe.Kind.INCLUDE_REF&&(c.message=\"Error in the included file: \"+c.message),c=o),c}function te(e){if(3!=e.length)return new qe(De.STATUS_MUST_BE_3NUMBER);for(var t=0;t<e.length;t++){var n=e[t];if(!le.find([\"0\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\",\"7\",\"8\",\"9\"],function(e){return e==n}))return new qe(De.STATUS_MUST_BE_3NUMBER)}return null}function ne(e,t){for(var n=\"\",r=e.message,i=0,a=r.indexOf(\"{{\");a>=0;a=r.indexOf(\"{{\",i)){if(n+=r.substring(i,a),(i=r.indexOf(\"}}\",a))<0){i=a;break}a+=\"{{\".length;var o=r.substring(a,i);i+=\"}}\".length;var s=t[o];if(void 0===s)throw new Error(\"Message parameter '\"+o+\"' has no value specified.\");n+=s}return n+=r.substring(i,r.length)}var re=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},ie=n(9),ae=n(62),oe=n(118),se=n(17),ue=n(24),ce=n(20),le=n(1),pe=n(14),fe=n(0),de=n(4),me=n(11),he=n(47),ye=n(3),_e=n(5),ge=n(88),ve=fe,be=n(315),Se=n(25),Ae=n(21),Te=fe.rt,Ee=n(64),Ce=n(63),Ne=n(28),we=fe.getSchemaUtils(),ke=n(135),xe=n(145),Re=n(70),Ie=n(82),De=n(90),Me=function(){function e(){this.validateNotStrictExamples=!0}return e}(),Pe=new Me,Le=n(289);t.RESERVED_TEMPLATE_PARAMETERS={resourcePathName:'Part of the resource path following the rightmost \"/\"',methodName:\"Method name\",resourcePath:\"Path of the resource\"};var Oe=function(e,t,n){if(he.existsSync(e))try{var i=he.readFileSync(e).toString(),a=new Ue(t);r(i,a,null),a.visit(n)}catch(e){console.log(\"Error in custom linter\"),console.log(e)}},Ue=function(){function e(e){this.acceptor=e,this.nodes={}}return e.prototype.error=function(e,t){this.acceptor.accept($(De.INVALID_VALUE_SCHEMA,{iValue:t},e.highLevel()))},e.prototype.errorOnProperty=function(e,t,n){var r=e.highLevel().attr(t);this.acceptor.accept($(De.INVALID_VALUE_SCHEMA,{iValue:n},r))},e.prototype.warningOnProperty=function(e,t,n){var r=e.highLevel().attr(t);this.acceptor.accept($(De.INVALID_VALUE_SCHEMA,{iValue:n},r,!0))},e.prototype.warning=function(e,t){this.acceptor.accept($(De.INVALID_VALUE_SCHEMA,{iValue:t},e.highLevel(),!0))},e.prototype.registerRule=function(e,t){var n=this.nodes[e];n||(n=[],this.nodes[e]=n),n.push(t)},e.prototype.visit=function(e){var t=this,n=e.definition();this.process(n,e),n.allSuperTypes().forEach(function(n){return t.process(n,e)}),e.elements().forEach(function(e){return t.visit(e)})},e.prototype.process=function(e,t){var n=this;if(fe.NodeClass.isInstance(e)&&!e.getAdapter(ve.RAMLService).getDeclaringNode()){var r=this.nodes[e.nameId()];r&&r.forEach(function(e){return e(t.wrapperNode(),n)})}},e}();!function(){function e(){}e.prototype.toString=function(){return this.prev?this.value+\".\"+this.prev.toString():this.value},e.prototype.last=function(){return this.prev?this.prev.last():this},e}();t.validateBasicFlat=m;!function(){function e(){}e}();t.validateBasic=T;var Fe=function(e,t){var n=t.lowLevel().start(),r=[];if(n<0){for(var i=t.attr(\"key\").value().split(\".\"),a=[],o=t.parent(),s=0,u=i;s<u.length;s++){var c=u[s],l=le.find(o.elementsOfKind(\"uses\"),function(e){return e.attr(\"key\")&&e.attr(\"key\").value()==c});a.push(l),o=l.lowLevel().unit().resolve(l.attr(\"value\").value()).highLevel().asElement()}var p=a.map(function(e){return $(De.ISSUES_IN_THE_LIBRARY,{value:e.attr(\"value\").value()},e,!0)});p=p.reverse();for(var f=0;f<p.length-1;f++)p[f].extras.push(p[f+1]);return p[0]}return r.push(t),$(De.ISSUES_IN_THE_LIBRARY,{value:e.value()},t,!0)};t.validate=C;var Be=function(t){t=t.replace(/\\\\/g,\"/\").trim(),t.length>1&&\":\"==t.charAt(1)&&/^win/.test(e.platform)&&(t=t.substring(2));var n=t.split(\"/\");return 0==n[0].length&&(n=n.slice(1)),n.length>0&&0==n[n.length-1].length&&(n=n.slice(0,n.length-1)),n},Ke=function(e,t,n){try{new RegExp(e)}catch(r){t.accept($(De.ILLEGAL_PATTERN,{value:e},n))}},Ve=function(){function e(){}return e.prototype.validateName=function(e,t){var n=e.name();if(n){var r=e.lowLevel().keyStart();this.check(n,r,e,t)}},e.prototype.validateValue=function(e,t){var n=e.value();if(\"string\"==typeof n){var r=e.lowLevel().valueStart();this.check(n,r,e,t)}},e.prototype.hasTraitOrResourceTypeParent=function(e){for(var t=e.parent();null!=t;){if(!t.definition())return!1;if(_e.isTraitType(t.definition())||_e.isResourceTypeType(t.definition()))return!0;t=t.parent()}return!1},e.prototype.check=function(e,t,n,r){if(!this.hasTraitOrResourceTypeParent(n))return[];for(var i=[],a=0,o=e.indexOf(\"<<\");o>=0;o=e.indexOf(\"<<\",a)){o+=\"<<\".length,a=e.indexOf(\">>\",o);var s=e.substring(o,a),u=s.indexOf(\"|\");if(0==(u>=0?s.substring(0,u):s).trim().length){var c=$(De.TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS,{},n);c.start=t+o,c.end=t+a,r.accept(c)}if(u!=-1){u++;for(var l=s.split(\"|\").slice(1).map(function(e){return e.trim()}),p=Se.getTransformNames(),f=0,d=l;f<d.length;f++){var m=d[f];if(!le.find(p,function(e){return m===e||m===\"!\"+e})){var c=$(De.UNKNOWN_FUNCTION,{transformerName:m},n,!1);c.start=t+u,c.end=t+a,r.accept(c)}}}a+=\">>\".length}return i},e}(),je=function(){function e(){}return e.prototype.validate=function(t,n){var r=t.parent();if(r&&(r.definition().isAssignableFrom(ye.Universe08.Method.name)||r.definition().isAssignableFrom(ye.Universe10.Method.name))){le.find(r.lowLevel()&&r.lowLevel().children()||[],function(e){var t=e.key();return t&&(ye.Universe08.MethodBase.properties.body.name===t||ye.Universe10.MethodBase.properties.body.name===t)})&&le.find(e.methodsWithoutRequestBody,function(e){return r.name()===e})&&n.accept($(De.REQUEST_BODY_DISABLED,{methodName:r.name()},r))}},e.methodsWithoutRequestBody=[\"trace\"],e}(),We=function(){function e(){}return e.prototype.validate=function(e,t){var n=i(e,t),r=e.value(),a=e.parent().definition().universe().version(),c=null!=p(e.parent());if(!e.property().range().hasStructure()){if(de.StructuredValue.isInstance(r)&&!e.property().isSelfNode()){if(o(e.property())&&e.property().domain().key()==ye.Universe08.BodyLike){return void new de.ASTNodeImpl(e.lowLevel(),e.parent(),e.parent().definition().universe().type(ye.Universe08.BodyLike.name),e.property()).validate(t)}if(\"RAML10\"==a&&c)return;t.accept($(De.SCALAR_EXPECTED,{},e))}else{var f=e.lowLevel().valueKind();if(e.lowLevel().valueKind()!=pe.Kind.INCLUDE_REF&&!e.property().getAdapter(ve.RAMLPropertyService).isKey()&&!e.property().isMultiValue()){var d=e.property().range().key();d!=ye.Universe08.StringType&&d!=ye.Universe08.MarkdownString&&d!=ye.Universe08.MimeType||f!=pe.Kind.SEQ&&f!=pe.Kind.MAPPING&&f!=pe.Kind.MAP&&(!e.property().isRequired()&&\"mediaType\"!=e.property().nameId()||null!=f&&void 0!==f)||e.property().domain().getAdapter(ve.RAMLService).isInlinedTemplates()||t.accept($(De.STRING_EXPECTED,{propName:e.name()},e))}}if(e.isAnnotatedScalar()){var m=new Ze;e.annotations().forEach(function(e){var n=e.value(),r=n.toHighLevel();r?m.validate(r,t):t.accept($(De.UNKNOWN_ANNOTATION,{aName:n.valueName()},e))})}}var h;if(\"string\"==typeof r?h=r:de.StructuredValue.isInstance(r)&&(h=r.valueName()),!(h&&h.indexOf(\"<<\")!=-1&&h.indexOf(\">>\")>h.indexOf(\"<<\")&&((new Ve).validateValue(e,t),c))){if((new je).validate(e,t),e.property().range().key()==ye.Universe08.MimeType||e.property().range().key()==ye.Universe10.MimeType||e.property().nameId()==ye.Universe10.TypeDeclaration.properties.name.name&&e.parent().property().nameId()==ye.Universe10.MethodBase.properties.body.name)return void(new Ye).validate(e,t);if(u(e.property())||s(e.property())){if(\"RAML08\"==a){e.lowLevel().value();if(e.lowLevel().children().length>0){var y=u(e.property())?\"'example'\":\"'defaultValue'\";t.accept($(De.STRING_EXPECTED_2,{propName:y},e,!1))}}(new ct).validate(e,t)}if(l(e.property())){if(\"RAML08\"==a){var _=e.lowLevel().parent(),g=pe.Kind.SEQ;se.LowLevelProxyNode.isInstance(e.lowLevel())?_.valueKind()!=g&&t.accept($(De.SECUREDBY_LIST_08,{},e,!1)):_.kind()!=g&&t.accept($(De.SECUREDBY_LIST_08,{},e,!1))}if((new ct).validate(e,t),\"RAML10\"==a&&de.StructuredValue.isInstance(r)){var v=r,b=v.children().filter(function(e){return\"scopes\"==e.valueName()});if(b.length>0){var S=e.findReferencedValue();if(S){var A=[];b.forEach(function(e){var t=e.children();if(t.length>0)t.forEach(function(e){var t=e.lowLevel().value();null==t||c&&t.indexOf(\"<<\")>=0||A.push(e)});else{var n=e.lowLevel().value();null==n||c&&n.indexOf(\"<<\")>=0||A.push(e)}});var T={},E=S.element(fe.universesInfo.Universe10.AbstractSecurityScheme.properties.settings.name);if(E){E.attributes(fe.universesInfo.Universe10.OAuth2SecuritySchemeSettings.properties.scopes.name).forEach(function(e){return T[e.value()]=!0})}for(var C=0,N=A;C<N.length;C++){var w=N[C],k=w.lowLevel().value();T.hasOwnProperty(k)||t.accept(Z(De.INVALID_SECURITY_SCHEME_SCOPE,{invalidScope:k,securityScheme:S.name(),allowedScopes:Object.keys(T).map(function(e){return\"'\"+e+\"'\"}).join(\", \")},w.lowLevel(),e,!1))}}}}}if(e.property().nameId()==ye.Universe10.TypeDeclaration.properties.name.name){var x=e.parent().property()&&e.parent().property().nameId();if(x==ye.Universe08.Resource.properties.uriParameters.name||x==ye.Universe08.Resource.properties.baseUriParameters.name)return}var R=e.property().range().key();if(R==ye.Universe08.RelativeUriString||R==ye.Universe10.RelativeUriString)return void(new He).validate(e,t);if(R==ye.Universe08.FullUriTemplateString||R==ye.Universe10.FullUriTemplateString)return void(new He).validate(e,t);if(\"pattern\"==e.name()&&ye.Universe10.StringType==e.definition().key()&&e.parent().definition().isAssignableFrom(\"StringTypeDeclaration\")&&Ke(e.value(),t,e),\"name\"==e.name()&&ye.Universe10.StringType==e.definition().key()&&\"string\"==typeof e.value()&&0==e.value().indexOf(\"[\")&&e.value().lastIndexOf(\"]\")==e.value().length-1&&de.ASTNodeImpl.isInstance(e.parent())&&ye.Universe10.ObjectTypeDeclaration.properties.properties.name==e.parent().property().nameId()&&de.ASTNodeImpl.isInstance(e.parent().parent())&&ye.Universe10.ObjectTypeDeclaration==e.parent().parent().definition().key()){Ke(e.value().substr(1,e.value().length-2),t,e)}n.isReference()||n.isDescriminator()?(new Ge).validate(e,t):(new ze).validate(e,t)}},e}();t.isValid=R;var qe=function(e){function t(t,n){void 0===n&&(n={}),e.call(this),this.messageEntry=t,this.parameters=n}return re(t,e),t.isInstance=function(e){return null!=e&&e.getClassIdentifier&&\"function\"==typeof e.getClassIdentifier&&le.contains(e.getClassIdentifier(),t.CLASS_IDENTIFIER_ValidationError)},t.prototype.getClassIdentifier=function(){return[].concat(t.CLASS_IDENTIFIER_ValidationError)},t.CLASS_IDENTIFIER_ValidationError=\"linter.ValidationError\",t}(Error),ze=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.value(),r=e.property(),i=r.range(),a=i.getAdapter(ve.RAMLService).getDeclaringNode();if(a&&i.isUserDefined()){var o=a.parsedType(),s=e.parent().lowLevel().dumpToObject(),u=s[e.parent().name()],c=r.canBeValue(),l=c||null===u||void 0===u?u:u[r.nameId()],p=o.validate(l,!0);p.isOk()||p.getErrors().forEach(function(n){return t.accept(Q(n.getCode(),n.getMessage(),e,!1))})}var f=t;if(e.lowLevel().keyKind()!=pe.Kind.SEQ)var d=R(r.range(),e.parent(),n,r,e);else d=!0;if(d instanceof Error&&!d.canBeRef){if(qe.isInstance(d)){var m=d;f.accept($(m.messageEntry,m.parameters,e,d.isWarning))}else f.accept($(De.SCHEMA_EXCEPTION,{msg:d.message},e,d.isWarning));return void(d=null)}if(!d||d instanceof Error)if(\"value\"!=r.nameId()){if(!O(r,e,n,f)){if((r.nameId()==ye.Universe10.TypeDeclaration.properties.schema.name||ye.Universe10.TypeDeclaration.properties.type.name)&&n&&n.trim()&&(r.domain().key()==ye.Universe08.BodyLike||r.domain().key()==ye.Universe10.TypeDeclaration)){var h=n.trim().charAt(0);if(\"{\"!=h&&\"<\"!=h)return}var y=e.findReferencedValue();if(y instanceof Error)if(qe.isInstance(y)){var m=y;f.accept($(m.messageEntry,m.parameters,e,m.isWarning))}else f.accept($(De.SCHEMA_EXCEPTION,{msg:y.message},e));if(!y){if(n&&r.nameId()==ye.Universe10.TypeDeclaration.properties.schema.name){var _=n.trim();if(\"{\"!=_.charAt(0)&&\"<\"!=_.charAt(0)&&(n.indexOf(\"|\")!=-1||n.indexOf(\"[]\")!=-1||n.indexOf(\"(\")!=-1))return}if(d instanceof Error&&n){if(qe.isInstance(d)){var m=d;f.accept($(m.messageEntry,m.parameters,e,m.isWarning))}else f.accept($(De.SCHEMA_EXCEPTION,{msg:d.message},e));return void(d=null)}if(e.property().isRequired()&&null==e.value())f.accept($(De.EMPTY_VALUE_NOT_ALLOWED,{},e));else{var g=e.lowLevel().valueKind();g!=pe.Kind.MAP&&g!=pe.Kind.SEQ&&g!=pe.Kind.MAPPING||f.accept($(De.EMPTY_VALUE_NOT_ALLOWED,{},e))}}}}else if(d instanceof Error){var v=d.message;f.accept($(De.SCHEMA_ERROR,{msg:v},e,r.range().key()==ye.Universe08.SchemaString))}else{var n=e.value();f.accept($(De.INVALID_VALUE_SCHEMA,{iValue:n},e,r.range().key()==ye.Universe08.SchemaString))}var b=r.enumOptions();if(b){var S=e.parent()&&e.parent().definition(),A=S&&S.isAssignableFrom(ye.Universe10.Api.name),T=S&&S.isAssignableFrom(ye.Universe08.Api.name),E=r.nameId()===ye.Universe08.Api.properties.protocols.name,C=r.nameId()===ye.Universe10.Api.properties.protocols.name;if(\"string\"!=typeof n)return;!T&&!A||!E&&!C||M(n)||(n=n.toUpperCase()),\"string\"==typeof b?b!=n&&(n&&0==n.indexOf(\"x-\")&&r.nameId()==ye.Universe08.AbstractSecurityScheme.properties.type.name||f.accept($(De.INVALID_VALUE,{iValue:n,aValues:\"'\"+b+\"'\"},e))):b.length>0&&(le.find(b,function(e){return e==n})||n&&0==n.indexOf(\"x-\")&&r.nameId()==ye.Universe08.AbstractSecurityScheme.properties.type.name||f.accept($(De.INVALID_VALUE,{iValue:n,aValues:b.map(function(e){return\"'\"+e+\"'\"}).join(\", \")},e)))}},e}(),He=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=(new Je).parseUrl(e.value()||\"\");if(n.some(function(e){return\"version\"==e})&&\"baseUri\"==e.property().nameId()){e.root().attr(\"version\")||t.accept($(De.MISSING_VERSION,{},e,!1))}n.some(function(e){return 0==e.length})&&t.accept($(De.URI_PARAMETER_NAME_MISSING,{},e,!1))}catch(n){t.accept($(De.URI_EXCEPTION,{msg:n.message},e,!1))}},e}(),Ye=function(){function e(){}return e.prototype.validate=function(e,t){try{var n=e.value();if(!n)return;if(\"*/*\"==n)return;if(n.indexOf(\"/*\")==n.length-2&&(n=n.substring(0,n.length-2)+\"/xxx\"),e.parent()&&e.parent().parent()&&e.parent().parent().definition().isAssignableFrom(ye.Universe10.Trait.name)&&n.indexOf(\"<<\")>=0)return;if(\"body\"==n&&e.parent().parent()){var r=e.parent().parent().definition().key();(r===ye.Universe08.Response||r===ye.Universe10.Response||e.parent().parent().definition().isAssignableFrom(ye.Universe10.MethodBase.name))&&(n=e.parent().computedValue(\"mediaType\"))}var i=ke.parse(n);i.type.match(/[\\w\\d][\\w\\d!#\\$&\\-\\^_+\\.]*/)||t.accept($(De.INVALID_MEDIATYPE,{mediaType:i.type},e))}catch(n){t.accept($(De.MEDIATYPE_EXCEPTION,{msg:n.message},e))}(e.value()&&\"multipart/form-data\"==e.value()||\"application/x-www-form-urlencoded\"==e.value())&&e.parent()&&e.parent().parent()&&e.parent().parent().property()&&e.parent().parent().property().nameId()==ye.Universe10.MethodBase.properties.responses.name&&t.accept($(De.FORM_IN_RESPONSE,{},e,!0))},e}(),Je=function(){function e(){}return e.prototype.checkBaseUri=function(e,t,n,r){var i=t.root().attr(\"baseUri\");if(i){var a=i.value();try{var o=this.parseUrl(a);le.find(o,function(e){return e==n})||r.accept($(De.UNUSED_URL_PARAMETER,{paramName:\"\"},e))}catch(e){}}else r.accept($(De.UNUSED_URL_PARAMETER,{paramName:\"\"},e))},e.prototype.parseUrl=function(e){for(var t=[],n=\"\",r=!1,i=0,a=0;a<e.length;a++){var o=e[a];\"{\"!=o?\"}\"!=o?r&&(n+=o):(i--,r=!1,t.push(n),n=\"\"):(i++,r=!0)}if(i>0)throw new Error(\"Invalid resource name: unmatched '{'\");if(i<0)throw new Error(\"Invalid resource name: unmatched '}'\");return t},e.prototype.validate=function(e,t){var n=e.value();if(e.parent().property().nameId()==ye.Universe10.Api.properties.baseUri.name){var r=e.parent().parent();return void this.checkBaseUri(e,r,n,t)}var r=e.parent().parent(),i=r.name();if(r.definition().key()===ye.Universe10.Api||r.definition().key()===ye.Universe08.Api)return void this.checkBaseUri(e,r,n,t);if(r.definition().key()!=ye.Universe10.ResourceType&&r.definition().key()!=ye.Universe08.ResourceType)try{var a=this.parseUrl(i);if(!le.find(a,function(e){return e==n})){var o=e.root().attr(ye.Universe10.Api.properties.baseUri.name);if(o&&e.name()===ye.Universe08.Api.properties.baseUriParameters.name){var s=o.value();if(s&&(a=this.parseUrl(s))&&a.length>0&&le.find(a,function(e){return e==n}))return}t.accept($(De.UNUSED_URL_PARAMETER,{paramName:\"'\"+n+\"'\"},e))}}catch(e){}},e}();t.UrlParameterNameValidator=Je,t.typeToName={},t.typeToName[ye.Universe08.Trait.name]=\"trait\",t.typeToName[ye.Universe08.ResourceType.name]=\"resource type\",t.typeToName[ye.Universe10.Trait.name]=\"trait\",t.typeToName[ye.Universe10.ResourceType.name]=\"resource type\",t.typeToName[ye.Universe10.AbstractSecurityScheme.name]=\"security scheme\",t.typeToName[ye.Universe10.Method.name]=\"method\",t.typeToName[ye.Universe08.Method.name]=\"method\",t.typeToName[ye.Universe10.Resource.name]=\"resource\",t.typeToName[ye.Universe08.Resource.name]=\"resource\",t.typeToName[ye.Universe10.Api.name]=\"api\",t.typeToName[ye.Universe08.Api.name]=\"api\",t.typeToName[ye.Universe10.Response.name]=\"response\",t.typeToName[ye.Universe08.Response.name]=\"response\",t.typeToName[ye.Universe08.BodyLike.name]=\"body\",t.parameterPropertyToName={},t.parameterPropertyToName[ye.Universe08.MethodBase.properties.headers.name]=\"header\",t.parameterPropertyToName[ye.Universe08.MethodBase.properties.queryParameters.name]=\"query parameter\",t.parameterPropertyToName[ye.Universe08.Api.properties.uriParameters.name]=\"uri parameter\",t.parameterPropertyToName[ye.Universe08.Api.properties.baseUriParameters.name]=\"base uri parameter\",t.parameterPropertyToName[ye.Universe08.BodyLike.properties.formParameters.name]=\"form parameter\",t.parameterPropertyToName[ye.Universe10.MethodBase.properties.headers.name]=\"header\",t.parameterPropertyToName[ye.Universe10.MethodBase.properties.queryParameters.name]=\"query parameter\",t.parameterPropertyToName[ye.Universe10.ResourceBase.properties.uriParameters.name]=\"uri parameter\",t.parameterPropertyToName[ye.Universe10.Api.properties.baseUriParameters.name]=\"base uri parameter\",t.parameterPropertyToName[ye.Universe10.MethodBase.properties.body.name]=\"body\",t.getHumanReadableNodeName=P;var Ge=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.value(),r=n,i=e.property();if(\"string\"==typeof n){if(O(i,e,n,t),fe.ReferenceType.isInstance(i.range())){var a=(i.range(),ie.createNode(\"\"+n,e.lowLevel().parent(),e.lowLevel().unit()));a._actualNode().startPosition=e.lowLevel().valueStart(),a._actualNode().endPosition=e.lowLevel().valueEnd();var o=new de.StructuredValue(a,e.parent(),e.property()),s=o.toHighLevel();s&&s.validate(t)}}else if(null!=n){var u=n;if(u){r=u.valueName();var c=u.valueName();if(!O(i,e,c,t)){var l=u.toHighLevel();l&&l.validate(t)}}else r=null}else e.definition().isAssignableFrom(ye.Universe10.Reference.name)&&O(i,e,null,t);if(r){var p=R(i.range(),e.parent(),r,i);if(p instanceof Error){if(qe.isInstance(p)){var f=p;t.accept($(f.messageEntry,f.parameters,e,p.isWarning))}else t.accept($(De.SCHEMA_EXCEPTION,{msg:p.message},e,p.isWarning));p=null}}},e}(),Xe=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.universe(),r=n.getTypedVersion();if(r){if(\"0.8\"!==r&&\"1.0\"!==r){var i=$(De.UNKNOWN_RAML_VERSION,{},e);t.accept(i)}var a=n.getOriginalTopLevelText();if(a){var o={typeName:a};if(a!=e.definition().nameId()){if(\"Api\"==e.definition().nameId()){var i=$(De.UNKNOWN_TOPL_LEVEL_TYPE,o,e);t.accept(i)}}else if(\"Api\"==n.getOriginalTopLevelText()){var i=$(De.REDUNDANT_FRAGMENT_NAME,o,e);t.accept(i)}}}},e}(),$e=function(){function e(){}return e.prototype.validate=function(e,t){var n=this;e.definition().getAdapter(ve.RAMLService).getContextRequirements().forEach(function(n){if(!e.checkContextValue(n.name,n.value,n.value)){var r={v1:n.name,v2:n.value,v3:e.definition().nameId()},i=De.CONTEXT_REQUIREMENT_VIOLATION;\"location\"==n.name&&\"ParameterLocation.FORM\"==n.value&&(i=De.WEB_FORMS),t.accept($(i,r,e))}});var r,i=e.definition().getAdapter(ve.RAMLService).isInlinedTemplates();if(i){for(var a={},o=0,s=e.lowLevel().children();o<s.length;o++){var u=s[o];a[u.key()]=u.value(!0)}for(var c=e.definition().isAssignableFrom(ye.Universe10.Trait.name)?\"trait\":\"resource type\",l=Se.toUnits(e),p=new Se.ValueTransformer(c,e.definition().nameId(),l,a),f=e.parent(),d=f?f.definition():e.definition();null!=f&&!_e.isResourceType(d)&&!_e.isMethodType(d);)f=f.parent();r=new Se.DefaultTransformer(f,p,l)}e.definition().requiredProperties().forEach(function(a){if(i){var o=a.getAdapter(ve.RAMLPropertyService).meta(\"templatePaths\");if(o){for(var s=e.parent(),u=!1,c=0,l=o;c<l.length;c++){var p=l[c];if(p=p.map(function(e){return r.transform(e).value}),n.checkPathSufficiency(s.lowLevel(),p,s)){u=!0;break}}if(!u)return}}var f=a.range();if(f.hasArrayInHierarchy()&&(f=f.arrayInHierarchy().componentType()),f.hasValueTypeInHierarchy()){var d=e.attr(a.nameId()),m=!1;if(null!=d&&(d.lowLevel().kind()==pe.Kind.SCALAR||d.lowLevel().valueKind()==pe.Kind.SCALAR||d.lowLevel().kind()==pe.Kind.INCLUDE_REF||d.lowLevel().valueKind()==pe.Kind.INCLUDE_REF||null===d.lowLevel().valueKind()&&!i?m=!0:0!=d.lowLevel().children().length&&(m=!0)),!m){var h={propName:a.nameId()},y=De.MISSING_REQUIRED_PROPERTY;i&&(y=De.VALUE_NOT_PROVIDED);var _=$(y,h,e);t.accept(_)}}else{var g=e.elementsOfKind(a.nameId());if(!g||0==g.length){var _=$(De.MISSING_REQUIRED_PROPERTY,{propName:a.nameId()},e);t.accept(_)}}})},e.prototype.checkPathSufficiency=function(e,t,n){if(null==n||null==n.definition())return!1;var r=n.definition();if(_e.isResourceTypeType(r)||_e.isTraitType(r))return!0;if(0==t.length)return!1;if(null==e)return!1;var i=t[0];if(null==i)return!1;if(\"/\"==i)return this.checkPathSufficiency(e,t.slice(1),n);if(0==i.length)return!0;var a=e.children().filter(function(e){return e.key()==i});0==a.length&&t.indexOf(\"/\");var o=a[0];if(se.LowLevelCompositeNode.isInstance(o)&&(o=o.primaryNode()),null==o)return t.indexOf(\"/\")<0;if(\"type\"==o.key())return!0;if(1==t.length)return null==o||null==o.value();var s=t.slice(1);return this.checkPathSufficiency(o,s,n)},e}(),Qe=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.lowLevel().unit();e.lowLevel().visit(function(r){if(r.unit()!=n)return!1;if(r.value()&&r._node&&r._node.value&&r._node.value.doubleQuoted){var i=(r.value()+\"\").indexOf(\":\"),a=(r.value()+\"\").indexOf(\"\\n\");if(i!=-1&&a!=-1&&(!r.includePath()||0==r.includePath().length)){var o=$(De.SUSPICIOUS_DOUBLEQUOTE,{value:r.value()},e,!0);o.start=r._node.value.startPosition,o.end=r._node.value.endPosition,o.start==o.end&&o.end++,t.accept(o)}}return!0})},e}(),Ze=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition(),r=n.getAdapter(ve.RAMLService).getDeclaringNode();if(r){var i=r.parsedType(),a=e.lowLevel().dumpToObject(!0);a&&(a=a[Object.keys(a)[0]]);var o=i.validate(a,!1,!1);o.isOk()||o.getErrors().forEach(function(n){return t.accept(Q(n.getCode(),n.getMessage(),j(e,n),!1))})}},e}(),et=function(){function e(){this.annotables={API:!0,DocumentationItem:!0,Resource:!0,Method:!0,Response:!0,RequestBody:!0,ResponseBody:!0,TypeDeclaration:!0,Example:!0,ResourceType:!0,Trait:!0,SecurityScheme:!0,SecuritySchemeSettings:!0,AnnotationType:!0,Library:!0,Overlay:!0,Extension:!0}}return e.prototype.validate=function(e,t){var n=(e.definition(),e.parsedType()),r=n.validateType(e.types().getAnnotationTypeRegistry());if(!r.isOk())for(var i=0,a=r.getErrors();i<a.length;i++){var o,s=a[i],u=W(s);o=u?ee(s.getCode(),s.getMessage(),u,j(e,s),s.isWarning(),!0):Q(s.getCode(),s.getMessage(),j(e,s),s.isWarning()),t.accept(o)}var c=e.lowLevel()&&le.find(e.lowLevel().children(),function(e){return\"examples\"==e.key()});if(c&&c.valueKind&&c.valueKind()===pe.Kind.SEQ&&(o=Z(De.MAP_EXPECTED,{},c,e,!1),t.accept(o)),e.property()&&_e.isAnnotationTypesProperty(e.property())||de.isAnnotationTypeFragment(e))for(var l=e.attributes(ye.Universe10.TypeDeclaration.properties.allowedTargets.name),p=0,f=l;p<f.length;p++){var d=f[p];this.checkAnnotationTarget(d,t)}},e.prototype.checkAnnotationTarget=function(e,t){var n=e.value();if(null!=n){\"string\"!=typeof n&&t.accept($(De.ANNOTATION_TARGET_MUST_BE_A_STRING,{},e,!1));var r=n;n.replace(/\\w|\\s/g,\"\").length>0?t.accept($(De.ALLOWED_TARGETS_MUST_BE_ARRAY,{},e,!1)):this.annotables[r]||t.accept($(De.UNSUPPORTED_ANNOTATION_TARGET,{aTarget:r},e,!1))}},e}(),tt=function(){function e(){}return e.prototype.validate=function(e,t){if(!e.definition().isAnnotationType()){if(e.lowLevel().keyKind()==pe.Kind.SEQ){e.definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name)||t.accept($(De.NODE_KEY_IS_A_SEQUENCE,{},e))}var n=e.name();if(null==n&&null==(n=e.lowLevel().key())&&(n=\"\"),e.definition().key()==ye.Universe08.GlobalSchema&&e.lowLevel().valueKind()!=pe.Kind.SCALAR){var r=!1;if(e.lowLevel().valueKind()==pe.Kind.ANCHOR_REF||e.lowLevel().valueKind()==pe.Kind.INCLUDE_REF){\"string\"==typeof e.lowLevel().value()&&(r=!0)}r||t.accept($(De.SCHEMA_NAME_MUST_BE_STRING,{name:n},e))}e.parent()||((new Xe).validate(e,t),e.definition().key()!=ye.Universe08.Api&&e.definition().key()!=ye.Universe10.Api||(new be).validateApi(e.wrapperNode(),t),(new Qe).validate(e,t),a(e,t)),(new at).validate(e,t);var o=e.definition();if(o.key()==ye.Universe08.BodyLike&&e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return\"formParameters\"===e}))if(e.parent()&&e.parent().definition().key()==ye.Universe08.Response){var s=$(De.FORM_PARAMS_IN_RESPONSE,{},e);t.accept(s)}else if(e.lowLevel().children().map(function(e){return e.key()}).some(function(e){return\"schema\"===e||\"example\"===e})){var s=$(De.FORM_PARAMS_WITH_EXAMPLE,{},e);t.accept(s)}if(o.key()==ye.Universe10.OAuth2SecuritySchemeSettings){var u=!1;if(e.attributes(\"authorizationGrants\").forEach(function(e){var n=e.value();if(\"authorization_code\"===n||\"implicit\"===n)u=!0;else if(\"password\"!==n&&\"client_credentials\"!==n&&n&&\"string\"==typeof n&&n.indexOf(\"://\")==-1&&n.indexOf(\":\")==-1){var r=$(De.AUTHORIZATION_GRANTS_ENUM,{},e);t.accept(r)}}),u&&!e.attr(\"authorizationUri\")){var s=$(De.AUTHORIZATION_URI_REQUIRED,{},e);t.accept(s)}}if(e.definition().isAssignableFrom(ye.Universe08.Parameter.name)||e.definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name)){var c=e.attributes(\"enum\").map(function(e){return e.value()});if(c.length!=le.uniq(c).length){var s=$(De.REPEATING_COMPONENTS_IN_ENUM,{},e);t.accept(s)}if(e.definition().isAssignableFrom(ye.Universe08.NumberTypeDeclaration.name)||e.definition().isAssignableFrom(ye.Universe10.NumberTypeDeclaration.name)){var l=e.definition().isAssignableFrom(ye.Universe08.IntegerTypeDeclaration.name)||e.definition().isAssignableFrom(ye.Universe10.IntegerTypeDeclaration.name);e.attributes(\"enum\").forEach(function(e){var n=l?parseInt(e.value()):parseFloat(e.value());if(!(l?!isNaN(n)&&e.value().indexOf(\".\")===-1:!isNaN(n))){var r=$(l?De.INTEGER_EXPECTED:De.NUMBER_EXPECTED_2,{},e);t.accept(r)}})}}_e.isResourceTypeType(e.definition())&&null==e.value()&&\"null\"===e.lowLevel().value(!0)&&t.accept($(De.RESOURCE_TYPE_NULL,{},e)),i(e,t);var p=e.value();if((\"string\"==typeof p||\"number\"==typeof p||\"boolean\"==typeof p)&&!e.definition().getAdapter(ve.RAMLService).allowValue()&&e.parent()&&\"~\"!=p){var s=$(De.SCALAR_PROHIBITED_2,{name:n},e);t.accept(s)}(new $e).validate(e,t),(new ut).validate(e,t),(new it).validate(e,t)}},e}(),nt=function(){function e(){}return e.prototype.validate=function(e,t){\"version\"==e.attrValue(ye.Universe10.TypeDeclaration.properties.name.name)&&t.accept($(De.VERSION_NOT_ALLOWED,{},e))},e}(),rt=function(){function e(e,t,n,r){void 0===r&&(r=!1),this.definitions=e,this.propertyName=t,this.assignableFrom=r,this.validator=n}return e.prototype.validate=function(e,t){var n=e.definition();if(null!=n){if(this.assignableFrom?this.definitions.some(function(e){return n.isAssignableFrom(e.name)}):this.definitions.some(function(e){return e===n})){if(null!=this.propertyName){if(null==e.property())return;if(e.property().nameId()!=this.propertyName)return}this.validator.validate(e,t)}}},e}(),it=function(){function e(){}return e.createRegistry=function(){var t=[];return e.registerValidator(t,[ye.Universe10.TypeDeclaration,ye.Universe08.Parameter],ye.Universe10.Api.properties.baseUriParameters.name,new nt,!0),t},e.registerValidator=function(e,t,n,r,i){void 0===i&&(i=!1);var a=new rt(t,n,r,i);e.push(a)},e.prototype.validate=function(t,n){e.entries.forEach(function(e){return e.validate(t,n)})},e.entries=e.createRegistry(),e}(),at=function(){function e(){}return e.prototype.allowsAnyChildren=function(e,t){var n=e.property(),r=e.definition();return!(!_e.isAnnotationTypeType(r)&&!_e.isTypeDeclarationTypeOrDescendant(r)||!_e.isAnnotationTypesProperty(n))||(!(e.parent()!=t||!_e.isTypesProperty(n)||!_e.isTypeDeclarationTypeOrDescendant(r))||(!(!_e.isSchemasProperty(n)||!_e.isTypeDeclarationTypeOrDescendant(r))||(!(e.parent()!=t||!_e.isDocumentationProperty(n)||!_e.isDocumentationType(r))||(!!_e.isAnnotationsProperty(n)||(!!_e.isUsesProperty(n)||!!_e.isExamplesProperty(n))))))},e.prototype.nodeAllowedDueToParent=function(e,t){for(var n=e;n!=t&&null!=n;){if(this.allowsAnyChildren(n,t))return!0;n=n.parent()}return!1},e.prototype.validate=function(e,t){var n=e.root();if(!n.isExpanded()||n.lowLevel().unit().absolutePath()==e.lowLevel().unit().absolutePath()){e.property(),e.definition();if(_e.isOverlayType(n.definition())){if(e==n)return void this.validateProperties(e,t);if(!this.nodeAllowedDueToParent(e,n)){var r=n.knownIds();if(r){if(r.hasOwnProperty(e.id()))return void this.validateProperties(e,t);t.accept($(De.INVALID_OVERLAY_NODE,{nodeId:e.id()},e))}}}}},e.prototype.validateProperties=function(e,t){var n=e.root(),r=n.lowLevel().unit().absolutePath(),i=n.isExpanded();e.attrs().forEach(function(n){i&&r!=n.lowLevel().unit().absolutePath()||n.property().getAdapter(ve.RAMLPropertyService).isKey()||n.parent()==e&&(n.isElement()||_e.isTitlePropertyName(n.name())||_e.isDescriptionPropertyName(n.name())||_e.isDisplayNamePropertyName(n.name())||_e.isUsagePropertyName(n.name())||_e.isExampleProperty(n.property())||_e.isMasterRefProperty(n.property())||_e.isAnnotationsProperty(n.property())||_e.isUsesProperty(n.property())||t.accept($(De.INVALID_OVERRIDE_IN_OVERLAY,{propName:n.name()},n)))})},e}(),ot=function(){function e(){}return e.prototype.validate=function(e,t){var n=this;(new at).validate(e,t),e.directChildren().forEach(function(e){e.isElement()&&n.validate(e.asElement(),t)})},e}(),st=function(){function e(){}return e.prototype.val=function(e,t,n){var r=this;if(e.kind()==pe.Kind.MAP||e.kind()==pe.Kind.MAPPING){var i={};e.children().forEach(function(e){var r=e.key();if(r){if(i.hasOwnProperty(r)){var a=$(De.KEYS_SHOULD_BE_UNIQUE,{},n,!1);e.unit()==n.lowLevel().unit()&&(a.start=e.keyStart(),a.end=e.keyEnd()),t.accept(a)}i[r]=1}})}e.children().forEach(function(e){r.val(e,t,n)})},e.prototype.validate=function(e,t){this.val(e.lowLevel(),t,e)},e}(),ut=function(){function e(){}return e.prototype.validate=function(e,t){this.validateChildElements(e,t);var n=e.lowLevel().children(),r=le.groupBy(n.filter(function(e){return null!=e.key()}),function(e){return e.key()});this.validateChildAttributes(e,r,t),this.validateUnrecognizedLowLevelChildren(e,r,t)},e.prototype.validateChildElements=function(e,t){var n={};e.directChildren().filter(function(e){return e.isElement()}).forEach(function(e){var t=e;if(!t._computed&&t.name()){var r=t.name()+t.property().nameId();n.hasOwnProperty(r)?t.isNamePatch()||n[r].push(t):n[r]=[t]}}),Object.keys(n).forEach(function(e){var r=n[e];!r||r.length<2||r.forEach(function(e){var n=P(e),r={name:e.name()},i=De.ALREADY_EXISTS_IN_CONTEXT;n&&(r.capitalized=Re.upperCaseFirst(n),i=De.ALREADY_EXISTS);var a=$(i,r,e);t.accept(a)})})},e.prototype.validateChildAttributes=function(e,t,n){var r=this.getHighLevelAttributes(e),i=le.groupBy(r,function(e){return e.name()}),a=this.allowsAnyAndHasRequireds(e);Object.keys(i).forEach(function(r){if(!(i[r].length<2)){var o=i[r][0].isUnknown(),s=!o&&i[r][0].property().isMultiValue();s&&(e.definition().isAssignableFrom(ye.Universe08.SecuritySchemeSettings.name)||e.definition().isAssignableFrom(ye.Universe10.SecuritySchemeSettings.name))&&(s=t[r]&&1===t[r].length),(o&&a||!s||s&&null!=t[r]&&t[r].length>1)&&i[r].forEach(function(e){var t={propName:e.property()?e.property().nameId():e.name()},r=De.PROPERTY_USED,i=P(e.parent());i&&(t.parent=Re.upperCaseFirst(i),r=De.PARENT_PROPERTY_USED);var a=$(r,t,e);n.accept(a)})}})},e.prototype.validateUnrecognizedLowLevelChildren=function(e,t,n){var r=e.directChildren(),i=le.groupBy(r,function(e){return e.name()});Object.keys(t).forEach(function(r){if(r&&t[r].length>1&&!i[r]){if(e.definition().isAssignableFrom(ye.Universe10.ObjectTypeDeclaration.name))return;var a={propName:r},o=De.PROPERTY_USED,s=P(e);s&&(a.parent=Re.upperCaseFirst(s),o=De.PARENT_PROPERTY_USED),t[r].forEach(function(t){var r=Z(o,a,t,e);r.start=t.keyStart(),r.end=t.keyEnd(),n.accept(r)})}})},e.prototype.filterMultiValueAnnotations=function(e,t,n){this.getHighLevelAttributes(e);Object.keys(t).forEach(function(e){\"(\"!==e.charAt(0)||t[e].length})},e.prototype.getHighLevelAttributes=function(e){var t=this.allowsAnyAndHasRequireds(e);return e.directChildren().filter(function(e){return e.isAttr()||t})},e.prototype.allowsAnyAndHasRequireds=function(e){var t=e.definition().requiredProperties(),n=t&&t.length>0,r=e.definition().getAdapter(ve.RAMLService);return r&&r.getAllowAny()&&n},e}(),ct=function(){function e(){}return e.prototype.validate=function(e,t){var n=this.isStrict(e);if(n||Pe.validateNotStrictExamples){var r=this.parseObject(e,t,n);if(r){var i=this.aquireSchema(e);i&&i.validate(r,t,n)}}},e.prototype.isExampleNode=function(e){return this.isSingleExampleNode(e)||this.isExampleNodeInMultipleDecl(e)},e.prototype.isSingleExampleNode=function(e){return e.name()==ye.Universe10.TypeDeclaration.properties.example.name},e.prototype.isExampleNodeInMultipleDecl=function(e){var t=e.parent();return!!t&&_e.isExampleSpecType(t.definition())},e.prototype.findParentSchemaOrTypeAttribute=function(e){var t=e.parent().attr(ye.Universe10.TypeDeclaration.properties.schema.name);return t?t:(t=e.parent().attr(ye.Universe10.TypeDeclaration.properties.type.name))?t:e.parent()?(t=e.parent().parent().attr(ye.Universe10.TypeDeclaration.properties.schema.name))?t:(t=e.parent().parent().attr(ye.Universe10.TypeDeclaration.properties.type.name),t?t:null):null},e.prototype.aquireSchema=function(e){var t=e.parent().definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name);if(this.isExampleNode(e)){var n=e;if(this.isExampleNodeInMultipleDecl(e)&&(n=e.parent()),n.parent()&&(n.parent().definition().isAssignableFrom(ye.Universe10.TypeDeclaration.name)&&null===n.parent().parent()?t=!1:n.parent().property().nameId()==ye.Universe10.LibraryBase.properties.types.name&&(t=!1),n.parent().parent())){var r=n.parent().parent().definition().key();r!=ye.Universe08.Method&&r!=ye.Universe10.Method||n.parent().property().nameId()==ye.Universe10.MethodBase.properties.queryParameters.name||(t=!0),r!=ye.Universe08.Response&&r!=ye.Universe10.Response||(t=!0)}}if(e.parent().definition().key()==ye.Universe08.BodyLike||t){var i=this.findParentSchemaOrTypeAttribute(e);if(i){var a=i.value();if(de.StructuredValue.isInstance(a))return null;var o=(\"\"+a).trim(),s=null;if(\"{\"==o.charAt(0))try{s=we.getJSONSchema(o,z(i.lowLevel()))}catch(e){return null}if(\"<\"==o.charAt(0))try{s=we.getXMLSchema(o)}catch(e){return null}if(s)return{validate:function(t,n,r){try{if(t.__$validated)return;if(s instanceof Error)return void n.accept($(De.INVALID_VALUE_SCHEMA,{iValue:s.message},e,!r));s.validateObject(t)}catch(t){var a=\"Cannot assign to read only property '__$validated' of \";if(t.message&&0==t.message.indexOf(a)){var o=t.message.substr(a.length,t.message.length-a.length);return void n.accept($(De.INVALID_JSON_SCHEMA,{propName:o},i,!r))}if(\"Object.keys called on non-object\"==t.message)return;return void n.accept($(De.EXAMPLE_SCHEMA_FAILURE,{msg:t.message},e,!r))}}};if(o.length>0){var u=e.parent(),c=u&&u.parent(),l=u&&u.definition()&&u.definition().isAssignableFrom(ye.Universe10.ObjectTypeDeclaration.name)&&u;if(l=l||c&&c.definition()&&c.definition().isAssignableFrom(ye.Universe10.ObjectTypeDeclaration.name)&&c)return this.typeValidator(l,e)}}}return this.getSchemaFromModel(e)},e.prototype.getSchemaFromModel=function(e){var t=e.parent();return this.typeValidator(t,e)},e.prototype.typeValidator=function(e,t){return{validate:function(n,r,i){var a=e.parsedType();if(a&&!a.isUnknown()){\"number\"==typeof n&&a.isString()&&(n=\"\"+n),\"boolean\"==typeof n&&a.isString()&&(n=\"\"+n),a.getExtra(\"repeat\")&&(n=[n]);var o=a.validate(n,!1);o.isOk()||o.getErrors().forEach(function(e){return r.accept(Q(e.getCode(),e.getMessage(),t,!i))})}}}},e.prototype.toObject=function(e,t,n){var r=t.lowLevel().dumpToObject(!0);return this.testDublication(e,t.lowLevel(),n),r.example?r.example:r.content?r.content:void 0},e.prototype.testDublication=function(e,t,n){var r=this,i={};t.children().forEach(function(t){t.key()&&(i[t.key()]&&n.accept($(De.KEYS_SHOULD_BE_UNIQUE,{},new de.BasicASTNode(t,e.parent()))),i[t.key()]=t),r.testDublication(e,t,n)})},e.prototype.parseObject=function(e,t,n){var r=null,i=e.value(),a=J(e);if(de.StructuredValue.isInstance(i))r=this.toObject(e,i,t);else if(a){if(H(a))try{r=JSON.parse(i)}catch(r){return void t.accept($(De.CAN_NOT_PARSE_JSON,{msg:r.message},e,!n))}if(Y(a))try{r=xe.parseXML(i)}catch(r){return void t.accept($(De.CAN_NOT_PARSE_XML,{msg:r.message},e,!n))}}else try{if(!(i&&i.length>0)||\"[\"!=i.trim().charAt(0)&&\"{\"!=i.trim().charAt(0)&&\"<\"!=i.trim().charAt(0)){if(\"true\"==i)return!0;if(\"false\"==i)return!1;var o=parseFloat(i);return isNaN(o)?i:o}r=JSON.parse(i)}catch(a){if(0!=i.trim().indexOf(\"<\"))return i;try{r=xe.parseXML(i)}catch(r){return void t.accept($(De.CAN_NOT_PARSE_XML,{msg:r.message},e,!n))}}return r},e.prototype.isStrict=function(e){if(_e.isDefaultValue(e.property()))return!0;if(_e.isExampleProperty(e.property())&&\"RAML08\"==e.parent().definition().universe().version())return!1;var t=!1,n=e.parent().attr(\"strict\");return n&&\"true\"==n.value()&&(t=!0),t},e}();t.ExampleAndDefaultValueValidator=ct;var lt=function(e,t,n){var r=Re.sentence(e);return t||(r=Re.ucFirst(r)),n&&(r=Ie.plural(r)),r},pt=function(){function e(){}return e.prototype.validate=function(e,t){if(e.isAttr()){if(!e.optional())return;var n=e,r=n.property();if(r.isMultiValue()||r.range().isArray())return;if(!r.isFromParentKey()){var i=p(n.parent());if(i&&r.isValueProperty()){var a=lt(i,!0,!0),o=$(De.OPTIONAL_SCLARAR_PROPERTIES_10,{templateNamePlural:a,propName:n.name()},n,!1);t.accept(o)}}}else if(e.isElement()){var s=e,r=s.property(),u=s.allowsQuestion();if(!u){var c=r?lt(r.nameId(),!0,!0):\"API root\";s.optionalProperties().forEach(function(n){s.children().forEach(function(n){var r={propName:c,oPropName:n.lowLevel().key()},i=$(De.OPTIONAL_PROPERTIES_10,r,e,!1);t.accept(i)})})}var l=e.asElement().definition();if(e.optional()&&\"RAML10\"==l.universe().version()){var r=e.property(),f=_e.isQueryParametersProperty(r)||_e.isUriParametersProperty(r)||_e.isHeadersProperty(r);if(!(_e.isMethodType(l)||_e.isTypeDeclarationType(l)&&f)){var o=$(De.ONLY_METHODS_CAN_BE_OPTIONAL,{},e,!1);t.accept(o)}}}},e}(),ft=function(){function e(){}return e.prototype.validate=function(e,t){var n=e.definition(),r=ye.Universe10.Api.properties.baseUri.name,i=ye.Universe10.Api.properties.baseUriParameters.name,a=ye.Universe10.Resource.properties.relativeUri.name,o=ye.Universe10.ResourceBase.properties.uriParameters.name;if(_e.isApiSibling(n))this.inspectParameters(e,t,r,i);else if(_e.isResourceType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s),this.inspectParameters(e,t,a,o)}else if(_e.isResourceTypeType(n)){var s=e.root();this.inspectParameters(e,t,r,i,s)}},e.prototype.inspectParameters=function(e,t,n,r,i){i=i||e;var a=\"\",o=i.attr(n);o&&((a=o.value())&&\"string\"==typeof a||(a=\"\")),e.elementsOfKind(r).forEach(function(n){var i=n.attr(ye.Universe10.TypeDeclaration.properties.name.name);if(i){var o=i.value();if(null!=o&&a.indexOf(\"{\"+o+\"}\")<0){if(_e.isResourceTypeType(e.definition())&&o.indexOf(\"<<\")>=0)return;var s=Re.upperCaseFirst(Ie.singular(Re.sentence(r))),u=$(De.PROPERTY_UNUSED,{propName:s},n,!0);t.accept(u)}}})},e}(),dt=function(){function e(){this.nameProperty=ye.Universe10.ResourceType.properties.name.name}return e.prototype.validate=function(e,t){var n=e.definition();if(_e.isLibraryBaseSibling(n)||_e.isApiType(n)){var r=(ye.Universe10.LibraryBase.properties.resourceTypes.name,ye.Universe10.ResourceBase.properties.type.name),i=(ye.Universe10.LibraryBase.properties.traits.name,ye.Universe10.MethodBase.properties.is.name),a=Ae.globalDeclarations(e).filter(function(e){return _e.isResourceTypeType(e.definition())}),o=Ae.globalDeclarations(e).filter(function(e){return _e.isTraitType(e.definition())});this.checkCycles(a,r,t),this.checkCycles(o,i,t)}},e.prototype.checkCycles=function(e,t,n){var r=this,i={};e.forEach(function(e){i[r.templateName(e)]=e});var a={};e.forEach(function(e){a[r.templateName(e)]||r.findCyclesInDefinition(e,t,i).forEach(function(t){t.forEach(function(e){return a[e]=!0}),t=t.reverse();var r=lt(e.definition().nameId()),i=t.join(\" -> \"),o={typeName:r,cycle:i},s=$(De.CYCLE_IN_DEFINITION,o,e,!1);n.accept(s)})})},e.prototype.templateName=function(e){var t=e.attr(this.nameProperty);return t?t.value():null},e.prototype.findCyclesInDefinition=function(e,t,n,r){void 0===r&&(r={});var i=this.templateName(e);if(r[i])return[[i]];var a={};Object.keys(r).forEach(function(e){return a[e]=r[e]}),a[i]=!0;for(var o=[],s=e.attributes(t),u=0;u<s.length;u++){var c=s[u],l=c.value();if(l){var p=\"string\"==typeof l?l:l.valueName(),f=n[p];if(null!=f){this.findCyclesInDefinition(f,t,n,a).forEach(function(e){return o.push(e)})}}}return o.forEach(function(e){return e.push(i)}),o},e}();t.isJson=H,t.isXML=Y,t.getMediaType=J;var mt=function(e,t,n,r,i,a,o){var s=o?o:e.lowLevel(),u=s.unit()&&s.unit().contents(),c=u&&u.length,l=s.start(),p=s.end();if(c&&c<p&&(p=c-1),s.key()&&s.keyStart()){var f=s.keyStart();f>0&&(l=f);var d=s.keyEnd();d>0&&(p=d)}if(p<l&&(p=l+1,e.isElement())){var m=e.definition();_e.isApiType(m)&&(l=0==c?0:c-1,p=l)}if(a&&!a.getAdapter(ve.RAMLPropertyService).isMerged()&&null==e.parent()){var h=le.find(s.children(),function(e){return e.key()==a.nameId()});if(h){var f=h.keyStart(),d=h.keyEnd();f>0&&d>f&&(l=f,p=d)}}return{code:t,isWarning:n,message:r,node:e,start:l,end:p,path:i?s.unit()?s.unit().path():\"\":null,extras:[],unit:e?s.unit():null}},ht=function(e,t,n,r,i,a){var o=e.unit()&&e.unit().contents(),s=o&&o.length,u=e.start(),c=e.end();if(s&&c>=s&&(c=s-1),e.key()&&e.keyStart()){var l=e.keyStart();l>0&&(u=l);var p=e.keyEnd();p>0&&(c=p)}return{code:n,isWarning:r,message:i,node:t,start:u,end:c,path:a?e.unit()?e.unit().path():\"\":null,extras:[],unit:e?e.unit():null}};t.toIssue=X,t.createIssue1=$,t.createIssue=Q,t.createLLIssue=ee,t.validateResponseString=te}).call(t,n(23))},function(e,t,n){\"use strict\";function r(e,t,n){var r=e.definition().property(t);return r?d(r.range(),r,n):null}function i(e,t,n,r){var i=y.newMap(n.map(function(e){return y.newMapping(y.newScalar(e.key),y.newScalar(e.value))})),a=new m.ASTNode(i,r?r.lowLevel().unit():null,r?r.lowLevel():null,null,null);return new h.StructuredValue(a,r,r?r.definition().property(e):null,t)}function a(e,t,n){var r=e.definition().property(t);if(!r)return null;var i=r.range(),a=e.lowLevel().unit().stub(),o=d(i,r,n,a);return o.isInEdit=!0,o.lowLevel()._unit=a,o._parent=e.copy(),o._parent.lowLevel()._unit=a,o}function o(e,t){return a(e,\"resources\",t)}function s(e,t){return a(e,\"methods\",t)}function u(e,t){return a(e,\"responses\",t)}function c(e,t){return a(e,\"body\",t)}function l(e,t){return a(e,\"uriParameters\",t)}function p(e,t){return a(e,\"queryParameters\",t)}function f(e,t){var n=m.createMapping(e.nameId(),t);return new h.ASTPropImpl(n,null,e.range(),e)}function d(e,t,n,r){void 0===n&&(n=null);var i=m.createNode(n?n:\"key\",null,r),a=new h.ASTNodeImpl(i,null,e,t);return i.unit()||(i._unit=r),a.children(),a}var m=n(9),h=n(4),y=n(14);t.createStub0=r,t.genStructuredValue=i,t.createStub=a,t.createResourceStub=o,t.createMethodStub=s,t.createResponseStub=u,t.createBodyStub=c,t.createUriParameterStub=l,t.createQueryParameterStub=p,t.createAttr=f,t.createStubNode=d},function(e,t,n){(function(){var t,r,i,a,o,s,u,c,l,p,f={}.hasOwnProperty;p=n(19),l=n(58),c=n(283),o=null,t=null,r=null,i=null,a=null,s=null,u=null,e.exports=function(){function e(e){this.parent=e,this.options=this.parent.options,this.stringify=this.parent.stringify,null===o&&(o=n(167),t=n(163),r=n(164),i=n(165),a=n(166),s=n(373),u=n(375))}return e.prototype.element=function(e,t,n){var r,i,a,o,s,u,d,m,h,y;if(u=null,null==t&&(t={}),t=t.valueOf(),p(t)||(h=[t,n],n=h[0],t=h[1]),null!=e&&(e=e.valueOf()),Array.isArray(e))for(a=0,d=e.length;a<d;a++)i=e[a],u=this.element(i);else if(l(e))u=this.element(e.apply());else if(p(e)){for(s in e)if(f.call(e,s))if(y=e[s],l(y)&&(y=y.apply()),p(y)&&c(y)&&(y=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&0===s.indexOf(this.stringify.convertAttKey))u=this.attribute(s.substr(this.stringify.convertAttKey.length),y);else if(!this.options.ignoreDecorators&&this.stringify.convertPIKey&&0===s.indexOf(this.stringify.convertPIKey))u=this.instruction(s.substr(this.stringify.convertPIKey.length),y);else if(!this.options.separateArrayItems&&Array.isArray(y))for(o=0,m=y.length;o<m;o++)i=y[o],r={},r[s]=i,u=this.element(r);else p(y)?(u=this.element(s),u.element(y)):u=this.element(s,y)}else u=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&0===e.indexOf(this.stringify.convertTextKey)?this.text(n):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&0===e.indexOf(this.stringify.convertCDataKey)?this.cdata(n):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&0===e.indexOf(this.stringify.convertCommentKey)?this.comment(n):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&0===e.indexOf(this.stringify.convertRawKey)?this.raw(n):this.node(e,t,n);if(null==u)throw new Error(\"Could not create any elements with: \"+e);return u},e.prototype.insertBefore=function(e,t,n){var r,i,a;if(this.isRoot)throw new Error(\"Cannot insert elements at root level\");return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r},e.prototype.insertAfter=function(e,t,n){var r,i,a;if(this.isRoot)throw new Error(\"Cannot insert elements at root level\");return i=this.parent.children.indexOf(this),a=this.parent.children.splice(i+1),r=this.parent.element(e,t,n),Array.prototype.push.apply(this.parent.children,a),r},e.prototype.remove=function(){var e;if(this.isRoot)throw new Error(\"Cannot remove the root element\");return e=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[e,e-e+1].concat([])),this.parent},e.prototype.node=function(e,t,n){var r,i;return null!=e&&(e=e.valueOf()),null==t&&(t={}),t=t.valueOf(),p(t)||(i=[t,n],n=i[0],t=i[1]),r=new o(this,e,t),null!=n&&r.text(n),this.children.push(r),r},e.prototype.text=function(e){var t;return t=new u(this,e),this.children.push(t),this},e.prototype.cdata=function(e){var n;return n=new t(this,e),this.children.push(n),this},e.prototype.comment=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.raw=function(e){var t;return t=new s(this,e),this.children.push(t),this},e.prototype.declaration=function(e,t,n){var r,a;return r=this.document(),a=new i(r,e,t,n),r.xmldec=a,r.root()},e.prototype.doctype=function(e,t){var n,r;return n=this.document(),r=new a(n,e,t),n.doctype=r,r},e.prototype.up=function(){if(this.isRoot)throw new Error(\"The root node has no parent. Use doc() if you need to get the document object.\");return this.parent},e.prototype.root=function(){var e;if(this.isRoot)return this;for(e=this.parent;!e.isRoot;)e=e.parent;return e},e.prototype.document=function(){return this.root().documentObject},e.prototype.end=function(e){return this.document().toString(e)},e.prototype.prev=function(){var e;if(this.isRoot)throw new Error(\"Root node has no siblings\");if((e=this.parent.children.indexOf(this))<1)throw new Error(\"Already at the first node\");return this.parent.children[e-1]},e.prototype.next=function(){var e;if(this.isRoot)throw new Error(\"Root node has no siblings\");if((e=this.parent.children.indexOf(this))===-1||e===this.parent.children.length-1)throw new Error(\"Already at the last node\");return this.parent.children[e+1]},e.prototype.importXMLBuilder=function(e){var t;return t=e.root().clone(),t.parent=this,t.isRoot=!1,this.children.push(t),this},e.prototype.ele=function(e,t,n){return this.element(e,t,n)},e.prototype.nod=function(e,t,n){return this.node(e,t,n)},e.prototype.txt=function(e){return this.text(e)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.doc=function(){return this.document()},e.prototype.dec=function(e,t,n){return this.declaration(e,t,n)},e.prototype.dtd=function(e,t){return this.doctype(e,t)},e.prototype.e=function(e,t,n){return this.element(e,t,n)},e.prototype.n=function(e,t,n){return this.node(e,t,n)},e.prototype.t=function(e){return this.text(e)},e.prototype.d=function(e){return this.cdata(e)},e.prototype.c=function(e){return this.comment(e)},e.prototype.r=function(e){return this.raw(e)},e.prototype.u=function(){return this.up()},e}()}).call(this)},function(e,t,n){\"use strict\";function r(e){return void 0===e||null===e}function i(e){return\"object\"==typeof e&&null!==e}function a(e){return Array.isArray(e)?e:r(e)?[]:[e]}function o(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}function s(e,t){var n,r=\"\";for(n=0;n<t;n+=1)r+=e;return r}function u(e){return 0===e&&Number.NEGATIVE_INFINITY===1/e}t.isNothing=r,t.isObject=i,t.toArray=a,t.extend=o,t.repeat=s,t.isNegativeZero=u},function(e,t,n){(function(e){function n(e){return Array.isArray?Array.isArray(e):\"[object Array]\"===y(e)}function r(e){return\"boolean\"==typeof e}function i(e){return null===e}function a(e){return null==e}function o(e){return\"number\"==typeof e}function s(e){return\"string\"==typeof e}function u(e){return\"symbol\"==typeof e}function c(e){return void 0===e}function l(e){return\"[object RegExp]\"===y(e)}function p(e){return\"object\"==typeof e&&null!==e}function f(e){return\"[object Date]\"===y(e)}function d(e){return\"[object Error]\"===y(e)||e instanceof Error}function m(e){return\"function\"==typeof e}function h(e){return null===e||\"boolean\"==typeof e||\"number\"==typeof e||\"string\"==typeof e||\"symbol\"==typeof e||void 0===e}function y(e){return Object.prototype.toString.call(e)}t.isArray=n,t.isBoolean=r,t.isNull=i,t.isNullOrUndefined=a,t.isNumber=o,t.isString=s,t.isSymbol=u,t.isUndefined=c,t.isRegExp=l,t.isObject=p,t.isDate=f,t.isError=d,t.isFunction=m,t.isPrimitive=h,t.isBuffer=e.isBuffer}).call(t,n(16).Buffer)},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return\"function\"==typeof e}function i(e){return\"number\"==typeof e}function a(e){return\"object\"==typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError(\"n must be a positive number\");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),\"error\"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified \"error\" event. ('+t+\")\");throw l.context=t,l}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError(\"listener must be a function\");return this._events||(this._events={}),this._events.newListener&&this.emit(\"newListener\",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error(\"(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.\",this._events[e].length),\"function\"==typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError(\"listener must be a function\");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError(\"listener must be a function\");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit(\"removeListener\",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit(\"removeListener\",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)\"removeListener\"!==t&&this.removeAllListeners(t);return this.removeAllListeners(\"removeListener\"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?a(e):o(e)}var i=n(52),a=n(239),o=n(264),s=\"[object Null]\",u=\"[object Undefined]\",c=i?i.toStringTag:void 0;e.exports=r},function(e,t,n){function r(e){return null!=e&&a(e.length)&&!i(e)}var i=n(58),a=n(79);e.exports=r},function(e,t){function n(e){return null!=e&&\"object\"==typeof e}e.exports=n},function(e,t,n){function r(e){return o(e)?i(e):a(e)}var i=n(203),a=n(124),o=n(42);e.exports=r},function(e,t){var n={tr:{regexp:/\\u0130|\\u0049|\\u0049\\u0307/g,map:{\"İ\":\"i\",I:\"ı\",\"İ\":\"i\"}},az:{regexp:/[\\u0130]/g,map:{\"İ\":\"i\",I:\"ı\",\"İ\":\"i\"}},lt:{regexp:/[\\u0049\\u004A\\u012E\\u00CC\\u00CD\\u0128]/g,map:{I:\"i̇\",J:\"j̇\",\"Į\":\"į̇\",\"Ì\":\"i̇̀\",\"Í\":\"i̇́\",\"Ĩ\":\"i̇̃\"}}};e.exports=function(e,t){var r=n[t];return e=null==e?\"\":String(e),r&&(e=e.replace(r.regexp,function(e){return r.map[e]})),e.toLowerCase()}},function(e,t,n){\"use strict\";function r(e,t){if(void 0===t&&(t=0),t>20)return[];try{var n=[],i=e.leftType();i&&n.push(i);var a=e.rightType();if(a)if(a.hasUnionInHierarchy()){var o=r(a.unionInHierarchy(),t+1);n=n.concat(o)}else n.push(a);return n}finally{}}function i(e){var t=e.definition();if(!t||!E.isTypeDeclarationDescendant(t))return!1;var n=e.lowLevel();if(n.valueKind()!==_.Kind.SEQ)return!1;var r=n.children();if(null==r)return!1;for(var i=0,a=r;i<a.length;i++){if(a[i].kind()!==_.Kind.SCALAR)return!1}return!0}function a(e,t){if(!t)return e.definition().universe().type(T.Universe10.StringTypeDeclaration.name);var n=e.parsedType();return n.isString()?e.definition().universe().type(T.Universe10.StringTypeDeclaration.name):n.isNumber()?n.isInteger()?e.definition().universe().type(T.Universe10.IntegerTypeDeclaration.name):e.definition().universe().type(T.Universe10.NumberTypeDeclaration.name):n.isBoolean()?e.definition().universe().type(T.Universe10.BooleanTypeDeclaration.name):n.isObject()?e.definition().universe().type(T.Universe10.ObjectTypeDeclaration.name):n.isArray()?e.definition().universe().type(T.Universe10.ArrayTypeDeclaration.name):n.isFile()?e.definition().universe().type(T.Universe10.FileTypeDeclaration.name):n.isDateTime()?e.definition().universe().type(T.Universe10.DateTimeTypeDeclaration.name):n.isDateTimeOnly()?e.definition().universe().type(T.Universe10.DateTimeOnlyTypeDeclaration.name):n.isDateOnly()?e.definition().universe().type(T.Universe10.DateOnlyTypeDeclaration.name):n.isTimeOnly()?e.definition().universe().type(T.Universe10.TimeOnlyTypeDeclaration.name):n.isUnion()?e.definition().universe().type(T.Universe10.UnionTypeDeclaration.name):e.definition().universe().type(T.Universe10.TypeDeclaration.name)}function o(e){return function(t){var n=e.type(t);if(!n){new h.UserDefinedClass(\"\",e,null,\"\",\"\")}return n}}function s(e,t){var n=e.asElement();if(null==n)return null;var r=n.elementsOfKind(T.Universe10.TypeDeclaration.properties.facets.name);return null==r||0==r.length?null:g.find(r,function(e){return t==e.attrValue(T.Universe10.TypeDeclaration.properties.name.name)})}function u(e){var t=e.owner();if(null==t)return null;var n=e.facetName();if(!n)return null;var r=t.getExtra(N.SOURCE_EXTRA);return null==r?null:v.isSourceProvider(r)||y.isParseResult(r)?{getSource:function(){if(v.isSourceProvider(r)){var e=r.getSource();if(e&&y.isParseResult(e))return s(e,n)}else if(y.isParseResult(r))return s(r,n);return null},getClassIdentifier:function(){return[h.SourceProvider.CLASS_IDENTIFIER]}}:null}function c(e,t,n){if(null==e)return null;var r=new h.NodeClass(t.name(),t.definition().universe(),\"\",\"\"),i=t.parsedType();return r.addAdapter(i),i.allFacets().forEach(function(e){if(e.kind()==h.tsInterfaces.MetaInformationKind.FacetDeclaration){var i=u(e),a=null;null!=i?(a=new h.UserDefinedProp(e.facetName(),null),a.setSourceProvider(i)):a=new h.Property(e.facetName(),\"\");var s=null;s=n?n.definition().universe():t.definition().universe(),a.withRange(s.type(\"StringType\")),a.withDomain(r),a.withGroupName(e.facetName()),a.withRequired(!1),e.value(),N.setPropertyConstructor(function(e){var t=new h.Property(e,\"\");return t.unmerge(),t}),a.withRange(N.toNominal(e.value(),o(t.definition().universe())))}}),r._superTypes.push(e),r}function l(e,t,n){var r=n.attr(\"type\");if(r){var i=a(n,r.value()),o=c(i,n,t);return o&&0==o.superTypes().length&&o._superTypes.push(n.definition().universe().type(T.Universe10.TypeDeclaration.name)),o}var s=T.Universe10.ObjectTypeDeclaration.properties.properties.name;if(e){if(\"body\"==e.nameId()||g.find(n.lowLevel().children(),function(e){return e.key()===s}))return n.definition().universe().type(T.Universe10.ObjectTypeDeclaration.name)}else if(!t&&n.lowLevel()&&g.find(n.lowLevel().children(),function(e){return e.key()===s}))return n.definition().universe().type(T.Universe10.ObjectTypeDeclaration.name);return n.definition().universe().type(T.Universe10.StringTypeDeclaration.name)}function p(e){try{var t=e.definition().nameId();if(!(t===T.Universe10.Api.name||t===T.Universe08.Api.name)&&!e.property()&&!e.parent()&&e.definition().nameId()===b.getFragmentDefenitionName(e)){if(e.property()&&e.property().nameId()===T.Universe10.LibraryBase.properties.annotationTypes.name)return f(null,null,e);var n=null;return e.definition().allSubTypes().forEach(function(t){!n&&m(t,e,null)&&(n=t)}),n}}catch(e){}return f(e.property(),e.parent(),e)}function f(e,t,n){var r=n.lowLevel();e&&e.nameId()==T.Universe10.FragmentDeclaration.properties.uses.name&&(e.range().nameId(),T.Universe10.Library.name);var i=e?e.range().nameId():n.definition().nameId();if(r._node&&r._node.descriminate)return null;r._node&&(r._node.descriminate=1);try{if(i==T.Universe10.TypeDeclaration.name){var a=l(e,t,n);if(e||!e&&!t&&n.lowLevel()){if(e&&null!=a&&(e.nameId()==T.Universe10.MethodBase.properties.body.name||e.nameId()==T.Universe10.ArrayTypeDeclaration.properties.items.name||e.nameId()==T.Universe10.Response.properties.headers.name||e.nameId()==T.Universe10.MethodBase.properties.queryParameters.name)){var o=new h.UserDefinedClass(n.lowLevel().key(),a.universe(),n,n.lowLevel().unit()?n.lowLevel().unit().path():\"\",\"\");return o._superTypes.push(a),o}if(null!=a&&E.isAnnotationTypeType(n.definition())){var s=d(a),o=new h.UserDefinedClass(n.lowLevel().key(),a.universe(),n,n.lowLevel().unit()?n.lowLevel().unit().path():\"\",\"\");return o._superTypes.push(s),o._superTypes.push(a),o}}if(a)return a}var u=null;if(e&&t){var c=A.findAllSubTypes(e,t);return c.length>0&&c.forEach(function(e){u||m(e,n,u)&&(u=e)}),u}}finally{r._node&&delete r._node.descriminate}}function d(e){for(var t,n=[e].concat(e.allSuperTypes()),r=0;r<n.length;r++){var i=n[r];if(!i.isUserDefined()){if(i.isUnion()){var a=i,o=a.leftType(),s=(a.leftType(),d(o)),u=d(o);if(s.isAssignableFrom(u.nameId())&&(null==t||s.isAssignableFrom(t.nameId()))){t=s;continue}if(u.isAssignableFrom(s.nameId())&&(null==t||u.isAssignableFrom(t.nameId()))){t=u;continue}t=e.universe().type(T.Universe10.UnionTypeDeclaration.name);break}if(i.isArray()){t=e.universe().type(T.Universe10.ArrayTypeDeclaration.name);break}for(var c=i.subTypes(),l=0;l<c.length;l++){var p=c[l];p.isAssignableFrom(T.Universe10.TypeDeclaration.name)&&(null==t?t=p:p.isAssignableFrom(t.nameId())&&(t=p))}}}return null!=t?t:e.universe().type(T.Universe10.TypeDeclaration.name)}function m(e,t,n){if(t.isAttr()||t.isUnknown())return!1;var r=t;if(g.find(e.superTypes(),function(t){var n=g.find(t.allProperties(),function(e){return e.isDescriminator()});if(n){var i=r.attr(n.nameId());if(i&&i.value()==e.nameId())return!0}return!1}))return!0;if(0==e.valueRequirements().length)return!1;var i=!0;return e.valueRequirements().forEach(function(t){var a=r.attr(t.name);if(a)if(a.value()==t.value);else if(e.getAdapter(C.RAMLService).getConsumesRefs()){var o=a.value(),s=[];e.superTypes().forEach(function(e){return e.allSubTypes().forEach(function(e){s.push(e)})});var u=[];g.unique(s).forEach(function(e){u.push(e.nameId()),e.valueRequirements().forEach(function(e){u.push(e.value)}),e.getAdapter(C.RAMLService).getAliases().forEach(function(e){return u.push(e)})}),g.find(u,function(e){return e==o})&&(i=!1)}else i=!1;else{var c=e.getAdapter(C.RAMLService).getDefining(),l=!1;if(c.forEach(function(e){r.lowLevel().children().forEach(function(t){t.key()==e&&(l=!0)})}),l)return void(i=!0);if(n)i=!1;else{var p=e.property(t.name);p&&p.defaultValue()==t.value||(i=!1)}}}),i}var h=n(0),y=n(24),_=n(14),g=n(1),v=h,b=n(4),S=n(17),A=n(21),T=n(3),E=n(5),C=h,N=h.rt,w=n(90),k=n(135),x=function(){function e(e){this._props=e,this.parentValue=g.find(e,function(e){return e.isFromParentValue()}),this.parentKey=g.find(e,function(e){return e.isFromParentKey()}),this.canBeValue=g.find(e,function(e){return e.canBeValue()})}return e.prototype.add=function(e){this._props.push(e)},e.prototype.match=function(e){var t=this,n=null,r=\"\";return this._props.forEach(function(i){i.getAdapter(C.RAMLPropertyService).isSystem()||i!=t.parentValue&&i!=t.parentKey&&i.matchKey(e)&&(null!=i.keyPrefix()?i.keyPrefix().length>=r.length&&(r=i.keyPrefix(),n=i):(n=i,r=i.nameId()))}),n},e}(),R=0,I=function(){function e(){this.shouldDescriminate=!1}return e.prototype.process=function(e,t){var n=this,a=e.lowLevel();e._mergedChildren=null;var o=a._node?a._node:a;try{if(o.currentChildren)return o.currentChildren;if(!e.definition())return;if(null==e.parent()&&!this.shouldDescriminate){this.shouldDescriminate=!0;try{var s=this.process(e,t),u=e;u._children=s;var c=p(e);c&&u.patchType(c);var s=this.process(e,t);u._children=s}finally{this.shouldDescriminate=!1}}if(e.definition().hasUnionInHierarchy()&&e.parent()&&e.property().nameId()==T.Universe10.LibraryBase.properties.annotations.name){var l=r(e.definition().unionInHierarchy()),f=null,d=null,m=null,h=1e3,y=e;if(l.forEach(function(r){if(!f&&!r.hasUnionInHierarchy()){y.patchType(r);if(0==R){R++;try{for(var i=n.process(e,t),a=0,o=0;o<i.length;o++)i[o].isUnknown()&&a++;0==a&&(f=i),h>a&&(h=a,d=i,m=r)}finally{R--}}}}),f)return y.patchType(m),f;d&&y.patchType(m)}var g=new x(e.definition().allProperties());if(null==e.parent()||e.lowLevel().includePath()){var v=e.definition().universe();\"RAML10\"==v.version()&&(e.definition().property(\"uses\")||v.type(\"FragmentDeclaration\").allProperties().forEach(function(e){return g.add(e)}))}var S=e,A=S._allowQuestion||e.definition().getAdapter(C.RAMLService).getAllowQuestion(),N=[];if(g.parentKey){if(e.lowLevel().key()){var k=new b.ASTPropImpl(e.lowLevel(),e,g.parentKey.range(),g.parentKey,!0);N.push(k);if(e.property()&&E.isBodyProperty(e.property())&&e.lowLevel().key()==e.property().nameId()){!D(S)&&S._computedKey&&k.overrideValue(S._computedKey)}}if(e.lowLevel().valueKind()===_.Kind.SEQ&&!i(e)){var I=new b.BasicASTNode(e.lowLevel(),S);return I.errorMessage={entry:w.DEFINITION_SHOULD_BE_A_MAP,parameters:{typeName:e.definition().nameId()}},N.push(I),N}}if(null!=e.lowLevel().value(!0))if(g.parentValue)N.push(new b.ASTPropImpl(e.lowLevel(),e,g.parentValue.range(),g.parentValue));else if(g.canBeValue){var M=e.lowLevel().value();null==M&&(M=e.lowLevel().value(!0)),\"string\"==typeof M&&M.trim().length>0&&N.push(new b.ASTPropImpl(e.lowLevel(),e,g.canBeValue.range(),g.canBeValue))}if(S._children=N,S.definition().getAdapter(C.RAMLService).isUserDefined())N=this.processChildren(t,S,N,A,g);else if(S.definition().key()==T.Universe08.Api||S.definition().key()==T.Universe10.Api){var P=t.filter(function(e){return\"uses\"==e.key()});N=this.processChildren(P,S,N,A,g);var L=t.filter(function(e){return\"types\"==e.key()});N=this.processChildren(L,S,N,A,g);var O=t.filter(function(e){return\"types\"!=e.key()&&\"uses\"!=e.key()});N=this.processChildren(O,S,N,A,g)}else N=this.processChildren(t,S,N,A,g);return S._children=N,N}finally{}},e.prototype.isTypeDeclarationShortcut=function(e,t){var n=E.isTypeProperty(t);return!!(e.definition()&&E.isTypeDeclarationTypeOrDescendant(e.definition())&&n&&e.lowLevel()&&e.lowLevel().valueKind()===_.Kind.SEQ)},e.prototype.processChildren=function(e,t,n,r,i){var a=this,o=T.Universe10.TypeDeclaration.name,s=T.Universe10.TypeDeclaration.properties.type.name,u=T.Universe10.ArrayTypeDeclaration.properties.items.name;if(t.definition()&&t.definition().isAssignableFrom(o)&&t.lowLevel()&&i.canBeValue&&(i.canBeValue.nameId()===s||i.canBeValue.nameId()===u)&&t.lowLevel()._node&&t.lowLevel()._node.value&&t.lowLevel()._node.value.kind===_.Kind.SEQ)return e.forEach(function(e){var r=new b.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue);n.push(r)}),n;var c=t.root().lowLevel().unit();e.forEach(function(e){if(i.canBeValue&&a.isTypeDeclarationShortcut(t,i.canBeValue))return void n.push(new b.ASTPropImpl(e,t,i.canBeValue.range(),i.canBeValue));var o=e.key(),s=null!=o?i.match(o):null;if(null!=s){var u=s.range();if(s.isAnnotation()&&\"annotations\"!=o){var l=new b.ASTPropImpl(e,t,u,s);return void n.push(l)}var p=s.isMultiValue();u.isArray()?(p=!0,u=u.array().componentType(),!0):u.hasArrayInHierarchy()&&(p=!0,!0);var d,m=!1;if(t.reuseMode()&&e.valueKind()!=_.Kind.SEQ){var y=t.reusedNode();if(y){var v=[e],A=t.lowLevel();!s.isMerged()&&p&&(d=[],v=e.children(),A=e);for(var N=0,x=v;N<x.length;N++){var R=x[N],I=R.containingUnit();if(I&&I.absolutePath()!=c.absolutePath()){var M=g.find(y.children(),function(e){return e.lowLevel().key()==R.key()});if(M&&M.lowLevel().unit().absolutePath()==I.absolutePath()){m=!0,n.push(M),M.setReused(!0),M.setParent(t),M.isElement()&&M.resetRuntimeTypes(),t.isExpanded()&&(A.replaceChild(R,M.lowLevel()),M.lowLevel().setTransformer(A.transformer()));continue}}d&&d.push(R)}}}if(!d){if(m)return;d=e.children()}if(u.hasValueTypeInHierarchy()){var P=d,L=e.valueKind()==_.Kind.SEQ;if((L&&P.length>0||P.length>1)&&p)if(P.length>1&&E.isTypeDeclarationSibling(t.definition())&&(E.isTypeProperty(s)||E.isItemsProperty(s))&&e.valueKind()!=_.Kind.SEQ){var l=new b.ASTPropImpl(e,t,u,s);n.push(l),t.setComputed(s.nameId(),l)}else{var O=[];P.forEach(function(e){var r=new b.ASTPropImpl(e,t,u,s);n.push(r),O.push(e.value())}),s.isInherited()&&t.setComputed(s.nameId(),O)}else{s.isInherited()&&t.setComputed(s.nameId(),e.value());var U=new b.ASTPropImpl(e,t,u,s);if(L||e.valueKind()==_.Kind.MAP){var F=s.range().nameId();s.getAdapter(C.RAMLPropertyService).isExampleProperty()||(\"StringType\"==F&&(F=\"string\"),\"NumberType\"==F&&(F=\"number\"),\"BooleanType\"==F&&(F=\"boolean\"),\"string\"!=F&&\"number\"!=F&&\"boolean\"!=F||e.isAnnotatedScalar()||(U.errorMessage={entry:w.INVALID_PROPERTY_RANGE,parameters:{propName:s.groupName(),range:F}},0==d.length&&\"enum\"==s.groupName()&&(U.errorMessage={entry:w.ENUM_IS_EMPTY,parameters:{}},e.valueKind()==_.Kind.MAP&&(U.errorMessage={entry:w.ENUM_MUST_BE_AN_ARRAY,parameters:{}}))))}n.push(U)}return}var B=[];if(t._children=n,null!=e.value()&&(\"string\"==typeof e.value()||\"boolean\"==typeof e.value()||\"number\"==typeof e.value())&&(\"\"+e.value()).trim().length>0){if(!s.range().allProperties().some(function(e){var t=e;return!!t&&(t.canBeValue()&&t.isFromParentValue())})){var K=new b.BasicASTNode(e,t);K.getLowLevelEnd=function(){return-1},K.getLowLevelStart=function(){return-1},K.knownProperty=s,n.push(K)}}if(s.isMerged()){var V=new b.ASTNodeImpl(e,t,u,s);V._allowQuestion=r,B.push(V)}else if(p)if(s.getAdapter(C.RAMLPropertyService).isEmbedMap()){var j=d,W=[],q=!1;if(j.forEach(function(e){e.kind()==_.Kind.INCLUDE_REF&&\"RAML08\"==t.universe().version()?e.children().forEach(function(e){var n=new b.ASTNodeImpl(e,t,u,s);n._allowQuestion=r,B.push(n),q=!0}):W.push(e)}),j=W,0==j.length){if(s.range().key()==T.Universe08.ResourceType&&!q){var z=new b.BasicASTNode(e,t);z.errorMessage={entry:w.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(z)}if(e.valueKind()==_.Kind.SCALAR&&s.range().key()==T.Universe08.AbstractSecurityScheme){var z=new b.BasicASTNode(e.parent(),t);z.errorMessage={entry:w.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(z)}}if(j.forEach(function(e){var i=e.children();if(e.key()||1!=i.length)if(\"RAML10\"==t.universe().version()){var a=new b.ASTNodeImpl(e,t,u,s);a._allowQuestion=r,B.push(a)}else{var o=new b.BasicASTNode(e,t);n.push(o),e.key()&&(o.needSequence=!0)}else if(\"RAML10\"!=t.universe().version()||t.parent()){var a=new b.ASTNodeImpl(i[0],t,u,s);a._allowQuestion=r,B.push(a)}}),\"RAML10\"==t.universe().version()&&e.valueKind()==_.Kind.SEQ){var K=new b.BasicASTNode(e,t);n.push(K),K.needMap=!0,K.knownProperty=s}}else{var H={},Y=[];if(h.NodeClass.isInstance(u)){var J=u;J.getAdapter(C.RAMLService).getCanInherit().length>0&&J.getAdapter(C.RAMLService).getCanInherit().forEach(function(n){for(var i=t.computedValue(n),a=Array.isArray(i)?i:[i],o=0;o<a.length;o++){var c=a[o];if(c&&s.nameId()==T.Universe10.Response.properties.body.name){for(var l=g.find(d,function(e){return e.key()==c}),p=e;p.originalNode;)p=p.originalNode();if(!g.find(p.children(),function(e){try{return k.parse(e.key()),!0}catch(e){return!1}})){var m=t.parent().definition().key(),h=new b.ASTNodeImpl(e,t,u,s);h._computedKey=c,m!=T.Universe10.MethodBase&&m!=T.Universe08.MethodBase||h.setComputed(\"form\",\"true\");var y=D(t),_=f(s,t,h);_&&(y||_.setName(c),h.patchType(_));var v=h.children();h._children=v.filter(function(e){return!e.isUnknown()}),h._allowQuestion=r,l||Y.push(h),h.children().forEach(function(e){var t=e.property();if(t&&t.getAdapter(C.RAMLPropertyService).isKey()){var n=e;return void(n._computed=!0)}if(e.isElement()&&(e.property().getAdapter(C.RAMLPropertyService).isMerged()||(H[e.property().nameId()]=!0)),e.property().isAnnotation()){var n=e,r=n.value(),i=\"\";i=b.StructuredValue.isInstance(r)?r.valueName():\"\"+r,H[\"(\"+i+\")\"]=!0}else H[e.name()]=!0});h.definition().allProperties().forEach(function(e){e.getAdapter(C.RAMLPropertyService).isKey()||e.getAdapter(C.RAMLPropertyService).isSystem()||h.lowLevel().children().some(function(t){return t.key()==e.nameId()})&&(H[e.nameId()]=!0)}),h._computed=!0}}}})}var G=[];if(0==d.length&&e.valueKind()==_.Kind.SEQ&&s.range().key()==T.Universe08.Parameter){var z=new b.BasicASTNode(e,t);z.errorMessage={entry:w.PROPERTY_MUST_BE_A_MAP,parameters:{propName:s.nameId()}},n.push(z)}if(\"documentation\"===s.nameId()&&e.valueKind()!==_.Kind.SEQ){if(!t.definition().getAdapter(C.RAMLService).isUserDefined()){var z=new b.BasicASTNode(e,t);z.errorMessage={entry:w.PROPERTY_MUST_BE_A_SEQUENCE,parameters:{propName:s.nameId()}},n.push(z)}}else d.forEach(function(e){if(!H[e.key()])if(e.valueKind()==_.Kind.SEQ){var i=\"RAML10\"==t.definition().universe().version();if(e.children().forEach(function(n){var a=new b.ASTNodeImpl(n,t,u,s);a._allowQuestion=r,a.setNamePatch(e.key()),i&&(a.invalidSequence=!0),G.push(a)}),0==e.children().length){var a=new b.BasicASTNode(e,t);s.range().key()==T.Universe08.Parameter?a.errorMessage={entry:w.NAMED_PARAMETER_NEEDS_TYPE,parameters:{}}:a.errorMessage={entry:w.NODE_SHOULD_HAVE_VALUE,parameters:{}},n.push(a)}}else{var o=new b.ASTNodeImpl(e,t,u,s),c=s.domain().key();\"body\"!=s.nameId()||c!=T.Universe08.MethodBase&&c!=T.Universe10.MethodBase||o.setComputed(\"form\",\"true\"),o._allowQuestion=r,G.push(o)}});G.length>0?G.forEach(function(e){return B.push(e)}):Y.forEach(function(e){return B.push(e)})}else B.push(new b.ASTNodeImpl(e,t,u,s));t._children=t._children.concat(B),n=n.concat(B),B.forEach(function(e){var n=f(s,t,e);n&&n!=e.definition()&&e.patchType(n),e._associatedDef=null,s.childRestrictions().forEach(function(t){e.setComputed(t.name,t.value)});e.definition()})}else S.LowLevelCompositeNode.isInstance(e)&&null==e.primaryNode()||n.push(new b.BasicASTNode(e,t))});var l=t.reusedNode();if(l&&t.lowLevel().valueKind()!=_.Kind.SEQ){var p={};l.elements().forEach(function(e){return p[e.property().nameId()+\"_\"+e.lowLevel().key()]=e}),l.attrs().forEach(function(e){return p[e.property().nameId()+\"_\"+e.lowLevel().key()]=e}),n.filter(function(e){return e.isElement()||e.isAttr()}).forEach(function(e){var n=p[e.property().nameId()+\"_\"+e.lowLevel().key()];n&&n!=e&&e.isElement()&&e.lowLevel().parent().valueKind()!=_.Kind.SEQ&&(e.setReusedNode(n),e.setReuseMode(t.reuseMode()))})}return n},e}();t.BasicNodeBuilder=I,t.doDescrimination=p;var D=function(e){for(var t=!1,n=e;n;){var r=n.definition();if(E.isTraitType(r)||E.isResourceTypeType(r)){t=!0;break}n=n.parent()}return t}},function(e,t){function n(e){return null}function r(e,t){}function i(e){return!1}function a(e){}function o(e){}function s(e){return{isDirectory:function(){return!1},isSymbolicLink:function(){return!1},isFile:function(){return!1}}}function u(e){return this.statSync(e)}function c(e,t){return[]}function l(e){}t.readFileSync=n,t.writeFileSync=r,t.existsSync=i,t.mkdirSync=a,t.readdirSync=o,t.statSync=s,t.lstatSync=u,t.list=c,t.onChange=l},function(e,t,n){\"use strict\";(function(e){function n(){var t=e.ramlValidation;if(t){var n=t.typeValidators;if(Array.isArray(n))return n}return[]}function r(){var t=e.ramlValidation;if(t){var n=t.typesystemAnnotationValidators;if(Array.isArray(n))return n}return[]}t.REPEAT=\"repeat\",t.PARSE_ERROR=\"parseError\",t.TOP_LEVEL_EXTRA=\"topLevel\",t.DEFINED_IN_TYPES_EXTRA=\"definedInTypes\",t.USER_DEFINED_EXTRA=\"USER_DEFINED\",t.SOURCE_EXTRA=\"SOURCE\",t.SCHEMA_AND_TYPE_EXTRA=\"SCHEMA\",t.GLOBAL_EXTRA=\"GLOBAL\",t.HAS_FACETS=\"HAS_FACETS\",t.HAS_ITEMS=\"HAS_ITEMS\",function(e){e[e.Description=0]=\"Description\",e[e.NotScalar=1]=\"NotScalar\",e[e.DisplayName=2]=\"DisplayName\",e[e.Usage=3]=\"Usage\",e[e.Annotation=4]=\"Annotation\",e[e.FacetDeclaration=5]=\"FacetDeclaration\",e[e.CustomFacet=6]=\"CustomFacet\",e[e.Example=7]=\"Example\",e[e.Required=8]=\"Required\",e[e.HasPropertiesFacet=9]=\"HasPropertiesFacet\",e[e.AllowedTargets=10]=\"AllowedTargets\",e[e.Examples=11]=\"Examples\",e[e.XMLInfo=12]=\"XMLInfo\",e[e.Default=13]=\"Default\",e[e.Constraint=14]=\"Constraint\",e[e.Modifier=15]=\"Modifier\",e[e.Discriminator=16]=\"Discriminator\",e[e.DiscriminatorValue=17]=\"DiscriminatorValue\"}(t.MetaInformationKind||(t.MetaInformationKind={}));t.MetaInformationKind;t.getTypeValidationPlugins=n,t.getAnnotationValidationPlugins=r}).call(t,n(13))},function(e,t,n){\"use strict\";function r(e,t,n){var i=[];return e.include.forEach(function(e){n=r(e,t,n)}),e[t].forEach(function(e){n.forEach(function(t,n){t.tag===e.tag&&i.push(n)}),n.push(e)}),n.filter(function(e,t){return-1===i.indexOf(t)})}function i(){function e(e){r[e.tag]=e}var t,n,r={};for(t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(e);return r}var a=n(38),o=n(68),s=n(10),u=function(){function e(e){this.include=e.include||[],this.implicit=e.implicit||[],this.explicit=e.explicit||[],this.implicit.forEach(function(e){if(e.loadKind&&\"scalar\"!==e.loadKind)throw new o(\"There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.\")}),this.compiledImplicit=r(this,\"implicit\",[]),this.compiledExplicit=r(this,\"explicit\",[]),this.compiledTypeMap=i(this.compiledImplicit,this.compiledExplicit)}return e.DEFAULT=null,e.create=function(){var t,n;switch(arguments.length){case 1:t=e.DEFAULT,n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw new o(\"Wrong number of arguments for Schema.create function\")}if(t=a.toArray(t),n=a.toArray(n),!t.every(function(t){return t instanceof e}))throw new o(\"Specified list of super schemas (or a single Schema object) contains a non-Schema object.\");if(!n.every(function(e){return e instanceof s}))throw new o(\"Specified list of YAML types (or a single Type object) contains a non-Type object.\");return new e({include:t,explicit:n})},e}();e.exports=u},function(e,t,n){!function(){function t(e,t){Array.isArray(e)||(e=[e]);for(var n=!!t,r=[],i=0;i<e.length;i++){var a=e[i];\"object\"==typeof a?(r.push(a),n=!0):r.push({type:a})}return n&&r}function n(e){if(e.type)if(\"string\"!=typeof e.type){var r=t(e.type);r&&(e.anyOf=r,delete e.type)}else\"any\"==e.type&&delete e.type;if(e.extends){var i=e.extends;Array.isArray(i)||(i=[i]),e.allOf=i,delete e.extends}if(e.disallow&&(\"string\"==typeof e.disallow?e.not={type:e.disallow}:e.not={anyOf:t(e.disallow,!0)},delete e.disallow),e.properties){var a=Array.isArray(e.required)?e.required:[];for(var o in e.properties){var s=e.properties[o];s&&\"boolean\"==typeof s.required&&(s.required&&a.push(o),delete s.required)}a.length&&(e.required=a)}if(e.dependencies)for(var o in e.dependencies)\"string\"==typeof e.dependencies[o]&&(e.dependencies[o]=[e.dependencies[o]]);\"boolean\"==typeof e.required&&delete e.required,void 0!==e.divisibleBy&&(e.multipleOf=e.divisibleBy,delete e.divisibleBy);for(var o in e)if(\"properties\"===o||\"patternProperties\"===o||\"dependencies\"===o)for(var u in e[o])e[o][u]=n(e[o][u]);else if(\"enum\"!==o)if(Array.isArray(e[o]))for(var c=0;c<e[o].length;c++)e[o][c]=n(e[o][c]);else\"object\"==typeof e[o]&&(e[o]=n(e[o]));return e}var r={v4:n};e.exports=r,r}()},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(250),a=n(251),o=n(252),s=n(253),u=n(254);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){var r=n(22),i=r.Symbol;e.exports=i},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}var i=n(57);e.exports=r},function(e,t,n){function r(e,t){var n=e.__data__;return i(t)?n[\"string\"==typeof t?\"string\":\"hash\"]:n.map}var i=n(248);e.exports=r},function(e,t,n){var r=n(27),i=r(Object,\"create\");e.exports=i},function(e,t,n){function r(e){if(\"string\"==typeof e||i(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-a?\"-0\":t}var i=n(80),a=1/0;e.exports=r},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function r(e){if(!a(e))return!1;var t=i(e);return t==s||t==u||t==o||t==c}var i=n(41),a=n(19),o=\"[object AsyncFunction]\",s=\"[object Function]\",u=\"[object GeneratorFunction]\",c=\"[object Proxy]\";e.exports=r},function(e,t,n){\"use strict\";function r(e){if(!A.BasicNodeImpl.isInstance(e))return null;var t=e,n=i(t.highLevel());if(!n)return null;var r=n.wrapperNode();return r.setAttributeDefaults(t.getDefaultsCalculator().isEnabled()),r}function i(e){if(null==e)return null;var t=e.definition();return t&&N.isApiSibling(t)?(new k).expandTraitsAndResourceTypes(e):null}function a(e){if(!e)return null;var t=o(e.highLevel());if(!t)return null;var n=t.wrapperNode();return n.setAttributeDefaults(e.getDefaultsCalculator().isEnabled()),n}function o(e){return(new x).expandLibraries(e)}function s(e,t,n){var r=h.fromUnit(e);if(!r)throw new Error(\"couldn't load api from \"+e.absolutePath());if(!t||0==t.length)return r.asElement();for(var i=[],a=0;a<t.length;a++){var o=t[a],s=h.fromUnit(o);if(!s)throw new Error(\"couldn't load api from \"+o.absolutePath());i.push(s)}return u(r.asElement(),i,n)}function u(e,t,n,r,i){void 0===r&&(r=null),void 0===i&&(i=!1);for(var a,o=e,s=0,u=t;s<u.length;s++){var c=u[s];i&&g.LowLevelProxyNode.isInstance(o.lowLevel())&&(a||(a=new k),a.expandHighLevelNode(o,r,e,i)),c.overrideMaster(o),c.setMergeMode(n),o=c}return o}function c(e){for(var t=[],n=0,r=e;n<r.length;n++){l(t,r[n],!0)}return t}function l(e,t,n){void 0===n&&(n=!1);var r=n?e:e.concat([]),i=t.lowLevel().unit();if(null==i)return r;if(0==r.length)r.push(i);else{var a=r[r.length-1].absolutePath();i.absolutePath()!=a&&r.push(i)}return r}function p(e){for(var t=[];e;)t.push(e),e=e.parent();return c(t)}function f(){return I.map(function(e){return e.name})}function d(e){for(var t=[],n=e.split(\"|\").slice(1),r=0,i=n;r<i.length;r++)for(var a=i[r],o=0;o<I.length;o++)if(a.match(I[o].regexp)){t.push(I[o].transformer);break}return t}var m=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},h=n(4),y=n(14),_=n(15),g=n(17),v=n(82),b=n(3),S=n(1),A=n(29),T=n(61),E=n(60),C=n(0),N=n(5),w=n(70);t.expandTraitsAndResourceTypes=r,t.expandTraitsAndResourceTypesHL=i,t.expandLibraries=a,t.expandLibrariesHL=o,t.mergeAPIs=s;var k=function(){function e(){this.namespaceResolver=new E.NamespaceResolver}return e.prototype.expandTraitsAndResourceTypes=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=!1),this.init(e);var r=e.lowLevel();if(!r)return e;if(r.actual().libExpanded)return e;var i=e.lowLevel().unit(),a=this.createHighLevelNode(e,!1,t);if(e.definition().key()==b.Universe10.Overlay)return a;var o=i.project().namespaceResolver().hasFragments(i),s=this.expandHighLevelNode(a,t,e,o);return s?s:e},e.prototype.init=function(e){this.ramlVersion=e.definition().universe().version()},e.prototype.expandHighLevelNode=function(e,t,n,r){var i=this;void 0===r&&(r=!1),this.init(e),e.setMergeMode(n.getMergeMode());var a=e.elementsOfKind(\"resources\"),o=!1;if(a.forEach(function(e){return o=i.processResource(e)||o}),!o&&!r)return null;if(h.ASTNodeImpl.isInstance(e)){var s=e;null!=s.reusedNode()&&s.setReuseMode(!0)}return\"RAML10\"==this.ramlVersion&&(t=t||new T.ReferencePatcher,t.process(e),e.lowLevel().actual().referencePatcher=t),e},e.prototype.getTemplate=function(e,t,n,r){var i=t.lowLevel().unit().path(),a=n[i];a||(a={},n[i]=a);var o=a[e];return void 0!==o?o:(o=null,o=S.find(r,function(n){return h.qName(n.highLevel(),t)==e}),o||(o=null),a[e]=o,o)},e.prototype.createHighLevelNode=function(e,t,n,r){void 0===t&&(t=!0),void 0===n&&(n=null),void 0===r&&(r=!1);for(var i=e,a=[],o=i;o;){var s,c=o.lowLevel();i.definition().key()!=b.Universe10.Overlay||r?(g.LowLevelCompositeNode.isInstance(c)&&(c=c.originalNode().originalNode()),s=new g.LowLevelCompositeNode(c,null,null,this.ramlVersion)):s=c;var l=o.definition(),p=new h.ASTNodeImpl(s,null,l,null);if(p.setUniverse(o.universe()),a.push(p),!t)break;o=o.getMaster()}var f=a.pop();a=a.reverse();var d=i.getMergeMode(),m=u(f,a,d,n,r);return m.setReusedNode(i.reusedNode()),m},e.prototype.processResource=function(e,t){var n=this;void 0===t&&(t=[]);var r=!1,i=t.concat(e),a=this.collectResourceData(e,e,void 0,void 0,i),o=e.lowLevel();return g.LowLevelProxyNode.isInstance(o)?(o.preserveAnnotations(),o.takeOnlyOriginalChildrenWithKey(C.universesInfo.Universe10.ResourceBase.properties.type.name),a.filter(function(e){return null!=e.resourceType}).forEach(function(t){var n=t.resourceType.node.lowLevel(),i=t.resourceType.transformer;i.owner=e,o.adopt(n,i),r=!0}),e.elementsOfKind(\"methods\").forEach(function(e){var t=e.lowLevel(),n=e.attr(\"method\").value(),i=[];a.forEach(function(a){var o=a.methodTraits[n];o&&(i=i.concat(o),o.forEach(function(n){var i=n.node.lowLevel(),a=n.transformer;a.owner=e,t.adopt(i,a),r=!0}));var s=a.traits;s&&(i=i.concat(s),s.forEach(function(n){var i=n.node.lowLevel(),a=n.transformer;a.owner=e,t.adopt(i,a),r=!0}))})}),e.elementsOfKind(\"resources\").forEach(function(e){return r=n.processResource(e,i)||r}),r):r},e.prototype.collectResourceData=function(e,t,n,r,i,a){var o=this;void 0===n&&(n=[]),void 0===i&&(i=[]),void 0===a&&(a={}),i=i.concat([t]);var s=this.extractTraits(t,r,i),u={};t.elementsOfKind(\"methods\").forEach(function(e){var t=o.extractTraits(e,r,i);t&&t.length>0&&(u[e.attr(\"method\").value()]=t)});var l,p=t.attr(\"type\");if(null!=p){var f=c(i);l=this.readGenerictData(e,p,t,\"resource type\",r,f)}var d={resourceType:l,traits:s,methodTraits:u};if(n.push(d),l){var m=l.node,y=h.qName(m,e);a[y]?d.resourceType=null:(a[y]=!0,this.collectResourceData(e,m,n,l.transformer,i,a))}return n},e.prototype.extractTraits=function(e,t,n,r){var i=this;void 0===r&&(r={}),n=n.concat([e]);for(var a=[],o=-1;o<a.length;o++){var s=o<0?null:a[o],u=s?s.node:e,p=s?s.unitsChain:c(n),f=s?s.transformer:t;u.attributes(\"is\").forEach(function(t){var n=l(p,t),o=i.readGenerictData(e,t,u,\"trait\",f,n);if(o){r[o.name]=!0,a.push(o)}})}return a},e.prototype.readGenerictData=function(e,t,n,r,i,a){void 0===a&&(a=[]);var o,s,u=t.value(),c=v.plural(w.camelCase(r));if(\"string\"==typeof u)s=u;else{if(!h.StructuredValue.isInstance(u))return null;o=u,s=o.valueName()}i&&(s=i.transform(s).value);var l={},p={},f=T.getDeclaration(s,c,this.namespaceResolver,a);if(f){var d=new P(e,null,a);o&&(\"RAML08\"==this.ramlVersion?o.children().forEach(function(e){return l[e.valueName()]=e.lowLevel().value()}):o.children().forEach(function(e){var t=e.lowLevel();t.valueKind()==y.Kind.SCALAR?l[e.valueName()]=t.value():t.valueKind()==y.Kind.INCLUDE_REF&&0==t.children().length?l[e.valueName()]=t.value():p[e.valueName()]=t}),Object.keys(l).forEach(function(e){var t=d.transform(l[e]);t&&\"object\"!=typeof t&&(l[e]=t)}));return{name:s,transformer:new P(null,new M(r,s,a,l,p,i),a),parentTransformer:i,node:f,ref:t,unitsChain:a}}return null},e}();t.TraitsAndResourceTypesExpander=k;var x=function(){function e(){}return e.prototype.expandLibraries=function(e){var t=e;if(null==t)return null;g.LowLevelCompositeNode.isInstance(t.lowLevel())&&(t=t.lowLevel().unit().highLevel().asElement());var n=new k,r=new T.ReferencePatcher,i=n.createHighLevelNode(t,!0,r,!0),a=n.expandHighLevelNode(i,r,t,!0);return this.processNode(r,a),a},e.prototype.processNode=function(e,t){if(null!=t){var n=t.getMaster();this.processNode(e,n),N.isOverlayType(t.definition())&&e.process(t),e.expandLibraries(t)}},e}();t.LibraryExpander=x,t.toUnits=p;var R=function(){function e(t,n){this.name=t,this.regexp=new RegExp(e.leftTransformRegexp.source+t+e.rightTransformRegexp.source),this.transformer=n}return e.leftTransformRegexp=/\\s*!\\s*/,e.rightTransformRegexp=/\\s*$/,e}(),I=[new R(\"singularize\",function(e){return v.singular(e)}),new R(\"pluralize\",function(e){return v.plural(e)}),new R(\"uppercase\",function(e){return e?e.toUpperCase():e}),new R(\"lowercase\",function(e){return e?e.toLowerCase():e}),new R(\"lowercamelcase\",function(e){return e?w.camelCase(e):e}),new R(\"uppercamelcase\",function(e){if(!e)return e;var t=w.camelCase(e);return t[0].toUpperCase()+t.substring(1,t.length)}),new R(\"lowerunderscorecase\",function(e){return e?w.snake(e).toLowerCase():e}),new R(\"upperunderscorecase\",function(e){return e?w.snake(e).toUpperCase():e}),new R(\"lowerhyphencase\",function(e){return e?w.param(e).toLowerCase():e}),new R(\"upperhyphencase\",function(e){return e?w.param(e).toUpperCase():e})];t.getTransformNames=f,t.getTransformersForOccurence=d;var D=function(){function e(){this.buf=null}return e.prototype.append=function(e){\"\"!==e&&(null!=this.buf?null!=e&&(\"string\"!=typeof this.buf&&(this.buf=\"\"+this.buf),this.buf+=e):\"\"!==e&&(this.buf=e))},e.prototype.value=function(){return null!=this.buf?this.buf:\"\"},e}(),M=function(){function e(e,t,n,r,i,a){this.templateKind=e,this.templateName=t,this.unitsChain=n,this.params=r,this.structuredParams=i,this.vDelegate=a}return e.prototype.transform=function(e,t,n,r){var i={},a=[];if(\"string\"==typeof e){if(this.structuredParams&&_.stringStartsWith(e,\"<<\")&&_.stringEndsWith(e,\">>\")){var o=e.substring(2,e.length-2),s=this.structuredParams[o];if(null!=s)return{value:s,errors:a}}for(var u=e,c=new D,l=0,p=u.indexOf(\"<<\");p>=0;p=u.indexOf(\"<<\",l)){c.append(u.substring(l,p));var f=p;if(p+=\"<<\".length,(l=this.paramUpperBound(u,p))==-1)break;var m=u.substring(p,l);l+=\">>\".length;var h,o,y=u.substring(f,l),g=d(m);if(g.length>0){var v=m.indexOf(\"|\");if(o=m.substring(0,v).trim(),h=this.params[o],h&&\"string\"==typeof h&&h.indexOf(\"<<\")>=0&&this.vDelegate&&(h=this.vDelegate.transform(h,t,n,r).value),h)for(var b=0,S=g;b<S.length;b++){var A=S[b];h=A(h)}}else o=m.trim(),(h=this.params[o])&&\"string\"==typeof h&&h.indexOf(\"<<\")>=0&&this.vDelegate&&(h=this.vDelegate.transform(h,t,n,r).value);null!==h&&void 0!==h||(i[o]=!0,h=y),c.append(h)}return c.append(u.substring(l,u.length)),{value:c.value(),errors:a}}return{value:e,errors:a}},e.prototype.paramUpperBound=function(e,t){for(var n=0,r=t;r<e.length;r++)if(_.stringStartsWith(e,\"<<\",r))n++,r++;else if(_.stringStartsWith(e,\">>\",r)){if(0==n)return r;n--,r++}return e.length},e.prototype.children=function(e){var t=this.substitutionNode(e);return t?t.children():null},e.prototype.valueKind=function(e){var t=this.substitutionNode(e);return t?t.valueKind():null},e.prototype.includePath=function(e){var t=this.substitutionNode(e);return t?t.includePath():null},e.prototype.substitutionNode=function(e){var t=this.paramName(e);return t&&this.structuredParams[t]},e.prototype.paramName=function(e){var t=null;if(e.valueKind()==y.Kind.SCALAR){var n=(\"\"+e.value()).trim();_.stringStartsWith(n,\"<<\")&&_.stringEndsWith(n,\">>\")&&(t=n.substring(2,n.length-2))}return t},e}();t.ValueTransformer=M;var P=function(e){function t(t,n,r){e.call(this,null!=n?n.templateKind:\"\",null!=n?n.templateName:\"\",r),this.owner=t,this.delegate=n}return m(t,e),t.prototype.transform=function(t,n,r,i){if(null==t||null!=r&&!r())return{value:t,errors:[]};var a={value:t,errors:[]},o=!1;L.forEach(function(e){return o=o||t.toString().indexOf(\"<<\"+e)>=0}),o&&(this.initParams(),a=e.prototype.transform.call(this,t,n,r,i));var s=null!=this.delegate?this.delegate.transform(a.value,n,r,i):a.value;return null!=r&&r()&&null!=i&&(s.value=i(s.value,this)),s},t.prototype.initParams=function(){for(var e,t,n=\"\",r=this.owner.lowLevel(),i=r,a=null;i;){var o=i.key();if(null!=o)if(_.stringStartsWith(o,\"/\")){if(!t)for(var s=o.split(\"/\"),u=s.length-1;u>=0;u--){var c=s[u];if(c.indexOf(\"{\")==-1){t=s[u];break}c.length>0&&(a=c)}n=o+n}else e=o;i=i.parent()}t||a&&(t=\"\"),this.params={resourcePath:n,resourcePathName:t},e&&(this.params.methodName=e)},t.prototype.children=function(e){return null!=this.delegate?this.delegate.children(e):null},t.prototype.valueKind=function(e){return null!=this.delegate?this.delegate.valueKind(e):null},t.prototype.includePath=function(e){return null!=this.delegate?this.delegate.includePath(e):null},t}(M);t.DefaultTransformer=P;var L=[\"resourcePath\",\"resourcePathName\",\"methodName\"]},function(e,t,n){\"use strict\";function r(e){var t=e.ast(),n=p.find(t.children(),function(e){return e.key()==o.Universe10.Extension.properties.extends.name});return n&&n.value()}var i=n(20),a=n(11),o=n(3),s=n(14),u=n(28),c=n(4),l=n(0),p=n(1),f=function(){function e(){this.expandedAbsToNsMap={},this._expandedNSMap={},this.byPathMap={},this.byNsMap={},this._hasFragments={},this._unitModels={}}return e.prototype.hasTemplates=function(e){var t=this.unitModel(e);if(!t.traits.isEmpty()||!t.resourceTypes.isEmpty())return!0;var n=this.expandedPathMap(e);if(n)for(var i=0,a=Object.keys(n);i<a.length;i++){var o=a[i],s=n[o].unit,u=this.unitModel(s);if(!u.traits.isEmpty()||!u.resourceTypes.isEmpty())return!0}for(var c=r(e);c;)if(e=e.resolve(c)){if(t=this.unitModel(e),!t.traits.isEmpty()||!t.resourceTypes.isEmpty())return!0;c=r(e)}else c=null;return!1},e.prototype.resolveNamespace=function(e,t){if(null==t)return null;var n=t.absolutePath(),r=this.expandedPathMap(e);return r?r[n]:null},e.prototype.expandedNSMap=function(e){var t=e.absolutePath(),n=this._expandedNSMap[t];if(void 0===n){var r=this.expandedPathMap(e);if(r){n={};for(var i=0,a=Object.keys(r);i<a.length;i++){var o=a[i],s=r[o];n[s.namespace()]=s}}else n=null;this._expandedNSMap[t]=n}return n},e.prototype.expandedPathMap=function(e){var t=e.absolutePath(),n=this.expandedAbsToNsMap[t];return void 0===n&&(n=this.calculateExpandedNamespaces(e),0==Object.keys(n).length&&(n=null),this.expandedAbsToNsMap[t]=n),n},e.prototype.calculateExpandedNamespaces=function(e){for(var t=this,n=a.dirname(e.absolutePath()),o={},p=[];e;){p.push(new d([],e,\"\"));var f=e;e=null;var m=f.ast();if(m&&m.kind()!=s.Kind.SCALAR){var h=c.ramlFirstLine(f.contents());if(h&&3==h.length&&(h[2]==l.universesInfo.Universe10.Overlay.name||h[2]==l.universesInfo.Universe10.Extension.name)){var y=r(f);y&&(e=f.resolve(y))&&u.isWaitingFor(e.absolutePath())&&(e=null)}}}for(var _=0;_<p.length;_++){var g={},v={},b=p[_],S=b.unit,m=S.ast();if(m&&m.kind()!=s.Kind.SCALAR){var A=b.steps()+1,T=function(e){if(e){var r=e.children();if(null==e.parent()){var s=e.unit(),u=s.absolutePath();if(g[u])return;g[u]=!0,u!=S.absolutePath()&&(t._hasFragments[S.absolutePath()]=!0);var c=t.pathMap(s);if(c)for(var l=0,f=Object.keys(c);l<f.length;l++){var m=f[l],h=c[m],y=b.namespaceSegments.concat(h.namespaceSegments),_=b.usesNodes.concat(h.usesNodes),E=o[m];if(E){if(E.steps()<A)continue;if(E.steps()==A&&t.lexLessEq(E.namespaceSegments,y))continue}var C,N=h.includePath,w=h.absolutePath();C=a.isAbsolute(b.includePath)||i.isWebPath(b.includePath)?w:a.isAbsolute(N)||i.isWebPath(N)?w:i.isWebPath(n)!=i.isWebPath(w)?w:n.length>0&&w.length>0&&n.charAt(0).toLowerCase()!=w.charAt(0).toLowerCase()?w:a.relative(n,w),C=C.replace(/\\\\/g,\"/\");var k=new d(_,h.unit,C);v[k.absolutePath()]||(o[m]=k,p.push(k),v[k.absolutePath()]=!0)}}r.forEach(function(e){e.includedFrom()&&(e=e.parent()),T(e)}),null==e.parent()&&(g[e.unit().absolutePath()]=!1)}};T(S.ast())}}for(var E={},C=0,N=Object.keys(o);C<N.length;C++){for(var w=N[C],b=o[w],k=b.namespace(),_=0;E[k];)k=b.namespace()+_++;k!=b.namespace()&&(b.namespaceSegments=k.split(\".\")),E[k]=!0}return o},e.prototype.pathMap=function(e){var t=e.absolutePath(),n=this.byPathMap[t];return void 0===n&&(n=this.calculateNamespaces(e),0==Object.keys(n).length&&(n=null),this.byPathMap[t]=n),n},e.prototype.nsMap=function(e){var t=e.absolutePath(),n=this.byNsMap[t];if(void 0===n){var r=this.pathMap(e);if(null==r)n=null;else{n={};for(var i=0,a=Object.keys(r);i<a.length;i++){var o=a[i],s=r[o];n[s.namespace()]=s}}this.byNsMap[t]=n}return n},e.prototype.calculateNamespaces=function(e){var t=a.dirname(e.absolutePath()),n={},r=e.ast(),u=r.children().filter(function(e){return e.key()==o.Universe10.FragmentDeclaration.properties.uses.name});if(r.actual()&&r.actual().usesNode&&(u=[r.actual().usesNode]),0==u.length)return n;for(var f=[],m=0,h=u;m<h.length;m++){var y=h[m];f=f.concat(y.children())}if(0==f.length)return n;for(var _=0,g=f;_<g.length;_++){var y=g[_],v=y.value(),b=e.resolve(v);if(null!=b){var S,u=[y],A=b.absolutePath();S=a.isAbsolute(v)||i.isWebPath(v)?b.absolutePath():a.relative(t,b.absolutePath()),S=S.replace(/\\\\/g,\"/\");var T=new d(u,b,S);n[A]=T}}var E=e.ast();if(E&&E.kind()!=s.Kind.SCALAR){var C=c.ramlFirstLine(e.contents());if(3==C.length&&(C[2]==l.universesInfo.Universe10.Overlay.name||C[2]==l.universesInfo.Universe10.Extension.name)){var N=p.find(E.children(),function(e){return e.key()==o.Universe10.Extension.properties.extends.name});if(N){var w,k=N.value(!0);try{w=e.resolve(k)}catch(e){}if(w){var x=this.pathMap(w);if(x)for(var R=0,I=Object.keys(x);R<I.length;R++){var D=I[R];n[D]=x[D]}}}}}return n},e.prototype.lexLessEq=function(e,t){if(e.length>t.length)return!1;if(e.length<t.length)return!0;for(var n=0;n<e.length;n++){var r=e[n],i=t[n];if(r<i)return!0;if(r>i)return!1}return!0},e.prototype.hasFragments=function(e){return this.calculateExpandedNamespaces(e),!!this._hasFragments[e.absolutePath()]},e.prototype.unitModel=function(e){var t=e.absolutePath(),n=this._unitModels[t];return n||(n=new h(e),this._unitModels[t]=n),n},e}();t.NamespaceResolver=f;var d=function(){function e(e,t,n){this.usesNodes=e,this.unit=t,this.includePath=n,this.namespaceSegments=this.usesNodes.map(function(e){return e.key()})}return e.prototype.steps=function(){return this.namespaceSegments.length},e.prototype.namespace=function(){return this.namespaceSegments.join(\".\")},e.prototype.absolutePath=function(){return this.unit.absolutePath()},e}();t.UsesInfo=d;var m=function(){function e(e){this.name=e,this.array=[],this.map={}}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&p.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.prototype.addElement=function(e){this.array.push(e),this.map[e.key()]=e},e.prototype.hasElement=function(e){return null!=this.map[e]},e.prototype.getElement=function(e){return this.map[e]},e.prototype.isEmpty=function(){return 0==this.array.length},e.CLASS_IDENTIFIER=\"namespaceResolver.ElementsCollection\",e}();t.ElementsCollection=m;var h=function(){function e(e){this.unit=e,this.initCollections()}return e.prototype.initCollections=function(){this.types=new m(l.universesInfo.Universe10.LibraryBase.properties.types.name),this.annotationTypes=new m(l.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name),this.securitySchemes=new m(l.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name),this.traits=new m(l.universesInfo.Universe10.LibraryBase.properties.traits.name),this.resourceTypes=new m(l.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name);var e=this.unit.ast();if(e&&this.isLibraryBaseDescendant(this.unit))for(var t=\"0.8\"==c.ramlFirstLine(this.unit.contents())[1],n=0,r=e.children();n<r.length;n++){var i=r[n],a=i.key();a==l.universesInfo.Universe10.LibraryBase.properties.types.name?this.contributeCollection(this.types,i.children()):a==l.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name?this.contributeCollection(this.annotationTypes,i.children()):a==l.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name?this.contributeCollection(this.securitySchemes,i.children(),t):a==l.universesInfo.Universe10.LibraryBase.properties.traits.name?this.contributeCollection(this.traits,i.children(),t):a==l.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name&&this.contributeCollection(this.resourceTypes,i.children(),t)}},e.prototype.contributeCollection=function(e,t,n){void 0===n&&(n=!1);var r;n?(r=[],t.forEach(function(e){var t=e.children();t.length>0&&r.push(t[0])})):r=t,r.forEach(function(t){return e.addElement(t)})},e.prototype.isLibraryBaseDescendant=function(e){var t=this,n=c.ramlFirstLine(e.contents());if(!n)return!1;if(n.length<3||!n[2])return!0;var r=n[2];if(!this.libTypeDescendants){this.libTypeDescendants={};var i=l.getUniverse(\"RAML10\"),a=i.type(l.universesInfo.Universe10.LibraryBase.name);[a].concat(a.allSubTypes()).forEach(function(e){return t.libTypeDescendants[e.nameId()]=!0})}return this.libTypeDescendants[r]},e}();t.UnitModel=h},function(e,t,n){\"use strict\";function r(e){if(null==e||\"string\"!=typeof e)return{status:w.NOT_REQUIRED};for(var t=\"\",n={},r=0,i=e.indexOf(\"<<\");i>=0;i=e.indexOf(\"<<\",r)){if(t+=e.substring(r,i),(r=e.indexOf(\">>\",i))<0)return{status:w.ERROR};r+=\">>\".length;var a=e.substring(i,r),o=k+i+k;n[o]=a,t+=o}return 0==t.length?{status:w.NOT_REQUIRED}:(t+=e.substring(r,e.length),{resultingString:t,substitutions:n,status:w.OK})}function i(e,t){if(null==e)return{status:w.NOT_REQUIRED};for(var n=\"\",r=0,i=e.indexOf(k);i>=0;i=e.indexOf(k,r)){if(r=e.indexOf(k,i+1),(r+=k.length)<0)return{status:w.ERROR};var a=e.substring(i,r),o=t[a];if(null==o)return{status:w.ERROR};n+=o}return 0==n.length?{status:w.NOT_REQUIRED}:(n+=e.substring(r,e.length),{resultingString:n,substitutions:t,status:w.OK})}function a(e){for(var t=!1,n=0;n<e.length;n++){var r=e.charAt(n);if(\"|\"==r||\"(\"==r||\"[\"==r){t=!0;break}}return t}function o(e,t,n){var r=e.lowLevel(),i=e.definition().universe().version(),a=u(r),o=v.Universe10.MethodBase.properties.is.name,c=b.find(r.children(),function(e){return e.key()==o});if(null==c){var l=new h.ASTNode(m.newMapping(m.newScalar(o),m.newItems()),a.unit(),a,null,null);c=r.replaceChild(null,l)}var p=b.find(a.children(),function(e){return e.key()==o}),f=null!=p&&p.unit().absolutePath()==n?p.children():[],y=f.concat(t.map(function(e){var t=s(e.node,c);if(null!=t){return new g.LowLevelCompositeNode(t,c,e.transformer,i)}return null})).filter(function(e){return null!=e});c.setChildren(y),c.filterChildren(),y=c.children();var _=e.directChildren(),A=e.definition().property(\"is\"),T=A.range();_&&(_=_.filter(function(e){var t=e.property();return null==t||!S.isIsProperty(t)}),e._children=_.concat(y.map(function(t){return new d.ASTPropImpl(t,e,T,A)})));var E=e.children();return E&&(E=E.filter(function(e){var t=e.property();return null==t||!S.isIsProperty(t)}),e._mergedChildren=E.concat(y.map(function(t){return new d.ASTPropImpl(t,e,T,A)}))),c}function s(e,t){t=u(t),e=u(e);var n=e.actual();return null==n?null:(e.key()==v.Universe10.MethodBase.properties.is.name&&(n=e.yamlNode().value),null==n?null:(n.kind==m.Kind.SEQ&&(n=n.items[0]),null==n?null:new h.ASTNode(n,e.unit(),t,null,null)))}function u(e){for(var t=0;t<2&&g.LowLevelProxyNode.isInstance(e);t++)e=e.originalNode();return e}function c(e){return!!e&&(null!=e.namespace&&\"function\"==typeof e.namespace&&null!=e.name&&\"function\"==typeof e.name&&null!=e.collectionName&&\"function\"==typeof e.collectionName&&null!=e.referencedUnit&&\"function\"==typeof e.referencedUnit&&null!=e.mode&&\"function\"==typeof e.mode)}function l(e,t,n,r){if(!e)return null;var i=\"\",a=e,o=e.lastIndexOf(\".\");o>=0&&(i=e.substring(0,o),a=e.substring(o+1));for(var s,u=!1,c=r.length;c>0;c--){var l=r[c-1],p=l.highLevel();if(p.isElement()&&S.isLibraryType(p.asElement().definition())){if(u)break;u=!0}var f=l;if(i){f=null;var d=n.nsMap(l);if(d){var m=d[i];m&&(f=m.unit)}}if(f){var h=f.highLevel();if(h&&h.isElement()&&(s=b.find(h.asElement().elementsOfKind(t),function(e){return e.name()==a})))break}}return s}function p(e){var t=e.indexOf(\"<<\");return!(t<0)&&(0!=t||e.indexOf(\">>\",t)+\">>\".length!=e.length)}var f=n(20),d=n(4),m=n(14),h=n(9),y=n(62),_=n(15),g=n(17),v=n(3),b=n(1),S=n(5),A=n(60),T=n(0),E=T.rt.typeExpressions;!function(e){e[e.DEFAULT=0]=\"DEFAULT\",e[e.PATH=1]=\"PATH\"}(t.PatchMode||(t.PatchMode={}));var C=t.PatchMode,N=function(){function e(e){void 0===e&&(e=C.DEFAULT),this.mode=e,this._outerDependencies={},this._libModels={}}return e.prototype.process=function(e,t,n,r){var i=this;if(void 0===t&&(t=e),void 0===n&&(n=!1),void 0===r&&(r=!1),!e.lowLevel().libProcessed){var a=e.lowLevel().unit().project().namespaceResolver();this.patchReferences(e,t,a),r&&this.patchNodeName(e,t.lowLevel().unit(),a),n?this.removeUses(e):this.patchUses(e,a),e.elements().forEach(function(e){return i.removeUses(e)}),this.resetTypes(e),e.lowLevel().libProcessed=!0}},e.prototype.patchReferences=function(e,t,n,r){if(void 0===t&&(t=e),void 0===n&&(n=new A.NamespaceResolver),void 0===r&&(r=[t.lowLevel().unit()]),!e.isReused()){var i;if(null!=e.definition().property(v.Universe10.TypeDeclaration.properties.annotations.name)){var a=e.lowLevel();if(!g.LowLevelCompositeNode.isInstance(a))return;var s=v.Universe10.MethodBase.properties.is.name,u=e.attributes(s);0!=u.length&&(i=o(e,u.map(function(e){return e.lowLevel()}).map(function(e){return g.LowLevelProxyNode.isInstance(e)?{node:e,transformer:e.transformer()}:{node:e,transformer:null}}),r[0].absolutePath()))}for(var c=e.attrs(),l=0,p=c;l<p.length;l++){var f=p[l],d=this.appendUnitIfNeeded(f,r);this.patchReferenceAttr(f,t,n,r),this.popUnitIfNeeded(r,d)}if(S.isTypeDeclarationDescendant(e.definition())){var d=this.appendUnitIfNeeded(e,r);this.patchType(e,t,n,r),this.popUnitIfNeeded(r,d)}for(var m=e.elements(),h=0,y=m;h<y.length;h++){var _=y[h],d=this.appendUnitIfNeeded(_,r);this.patchReferences(_,t,n,r),this.popUnitIfNeeded(r,d)}if(i){i.filterChildren();var b=e.directChildren();b&&(e._children=this.filterTraitReferences(b));var T=e.children();T&&(e._mergedChildren=this.filterTraitReferences(T))}}},e.prototype.filterTraitReferences=function(e){for(var t=[],n={},r=0,i=e;r<i.length;r++){var a=i[r],o=a.property();if(o&&S.isIsProperty(o)){var s=JSON.stringify(y.serialize(a.lowLevel()));n[s]||(n[s]=!0,t.push(a))}else t.push(a)}return t},e.prototype.patchReferenceAttr=function(e,t,n,r,i){void 0===i&&(i=!1);var a=e.property(),o=a.range();if(i||o.isAssignableFrom(v.Universe10.Reference.name)){var s=e.value();if(null!=s){var c=e.lowLevel();if(g.LowLevelProxyNode.isInstance(c)){var l=c.transformer(),p=S.isAnnotationsProperty(a);if(\"string\"==typeof s){var f=s;if(null!=l){var d=u(c);f=d.value()}p&&(f=f.substring(1,f.length-1));var m=this.resolveReferenceValue(f,t.lowLevel().unit(),r,n,l,o);if(null!=m){var h=p?\"(\"+m.value()+\")\":m.value();e.lowLevel().setValueOverride(h),e.overrideValue(h),this.registerPatchedReference(m)}}else{var y=s,_=y.toHighLevel();if(_)for(var b=0,A=_.attrs();b<A.length;b++){var e=A[b];S.isSchemaStringType(e.definition())&&this.patchReferenceAttr(e,t,n,r,!0)}var T=y.lowLevel().key(),f=T;if(null!=l){var d=u(y.lowLevel());f=d.key()}if(null!=T){p&&(f=f.substring(1,f.length-1));var m=this.resolveReferenceValue(f,t.lowLevel().unit(),r,n,l,o);if(null!=m){var h=p?\"(\"+m.value()+\")\":m.value();y.lowLevel().setKeyOverride(h),this.registerPatchedReference(m)}}}}}}},e.prototype.patchType=function(e,t,n,o){var s=this,c=e.definition(),l=e.localType();if(l.isAnnotationType()){var f=l.superTypes();f.length>0&&(l=f[0])}var m=D(l);if(!m&&l.isArray()&&(m=D(l.componentType())),!m){var h=t.lowLevel().unit(),y=(h.absolutePath(),e.attributes(v.Universe10.TypeDeclaration.properties.type.name));0==y.length&&(y=e.attributes(v.Universe10.TypeDeclaration.properties.schema.name));var _=e.attributes(v.Universe10.ArrayTypeDeclaration.properties.items.name);y=y.concat(_);for(var S=0,A=y;S<A.length;S++){var T=A[S],C=T.lowLevel();if(g.LowLevelProxyNode.isInstance(C)){var N=T.lowLevel().unit(),k=(N.absolutePath(),T.value());if(null!=k)if(\"string\"==typeof k){var x=a(k),R=C.transformer(),I=k,M={status:w.NOT_REQUIRED},P=R?R.unitsChain:null;if(null!=R||k.indexOf(\"<<\")>=0){var L=u(C),O=L.value();if(M=r(O),M.status==w.OK)I=x?M.resultingString:O;else{if(M.status==w.ERROR)return;R=null}}var U;if(P){U=[];for(var F=0,B=P;F<B.length;F++){var K=B[F];U.push(this.appendUnitIfNeeded(K,o))}}var V,j=this.appendUnitIfNeeded(T,o),W=void 0;try{V=x&&E.parse(I)}catch(e){V=null}if(x&&null!==V){var q=!1,z=E.parse(I),H=!1;E.visit(z,function(e){if(\"name\"==e.type){var t,r=e,a=r.value,u={status:w.NOT_REQUIRED};if(M.status==w.OK)if(null==(t=M.substitutions[a])){if(u=i(a,M.substitutions),u.status==w.OK)a=u.resultingString;else if(u.status==w.ERROR)return void(q=!0)}else a=t;if(null==R&&(null!=t||u.status==w.OK))return void(r.value=a);var l=!0;a.indexOf(\"<<\")>=0&&p(a)&&(l=!1);var f=s.resolveReferenceValue(a,h,o,n,R,c,l);null!=f&&(r.value=f.value(),H=!0,s.registerPatchedReference(f))}}),W=H&&!q?E.serializeToString(z):k}else if(M.status!=w.OK||null!=R){I.indexOf(\"<<\")>=0&&p(I)&&(I=k,R=null);var Y=this.resolveReferenceValue(I,h,o,n,R,c);null!=Y&&(this.registerPatchedReference(Y),W=Y.value())}if(null!=W&&(T.lowLevel().setValueOverride(W),T.overrideValue(null)),this.popUnitIfNeeded(o,j),U)for(var J=0,G=U.reverse();J<G.length;J++){var X=G[J];this.popUnitIfNeeded(o,X)}}else{var $=T.lowLevel();if($.key()!=T.property().nameId()&&($=b.find(e.lowLevel().children(),function(e){return e.key()==T.property().nameId()})),$){var Q=e.definition().universe().type(v.Universe10.TypeDeclaration.name),Z=new d.ASTNodeImpl($,null,Q,null),ee=this.appendUnitIfNeeded(Z,o);this.patchReferences(Z,t,n,o),this.popUnitIfNeeded(o,ee)}}}}}},e.prototype.resolveReferenceValue=function(e,t,n,r,i,a,o){var s=this;void 0===o&&(o=!0);var u,l=S.isAnnotationRefTypeOrDescendant(a);if(i&&e&&e.indexOf(\"<<\")>=0){var p=!0,f=t.highLevel().types();u=i.transform(e,!0,function(){return p},function(e,n){var i=s.resolveReferenceValueBasic(e,t,r,n.unitsChain,a);return null==i&&(i=new x(null,e,s.collectionName(a),t,C.DEFAULT)),p=l?(f.getAnnotationType(i.value()),!1):(f.getType(i.value()),!1),i}).value}return void 0!==u&&c(u)||(u=this.resolveReferenceValueBasic(e,t,r,n,a)),u},e.prototype.patchNodeName=function(e,t,n){var r=e.lowLevel(),i=r.key(),a=e.definition();if(S.isTypeDeclarationSibling(a)){var o=e.localType();o.isAnnotationType()&&(a=o)}var s=this.resolveReferenceValueBasic(i,t,n,[r.unit()],a);null!=s&&(r.setKeyOverride(s.value()),e.resetIDs())},e.prototype.resolveReferenceValueBasic=function(e,t,n,r,i){if(null==e||\"string\"!=typeof e)return null;var a,o,s=S.isTypeDeclarationDescendant(i),u=s&&_.stringEndsWith(e,\"?\"),c=u?e.substring(0,e.length-1):e,l=c.lastIndexOf(\".\");if(l>=0){var p=c.substring(0,l);o=c.substring(l+1);for(var d=r.length;d>0;d--){var m=r[d-1],h=n.nsMap(m);if(null!=h){var y=h[p];if(null!=y&&null!=(a=y.unit))break}}}else{if(s&&null!=T.rt.builtInTypes().get(c))return null;o=c,a=r[r.length-1]}var g=this.collectionName(i);if(null==a||a.absolutePath()==t.absolutePath())return null;var v=n.resolveNamespace(t,a);if(null==v)return null;var b=v.namespace();if(null==b)return null;if(this.mode==C.PATH){var A=a.absolutePath().replace(/\\\\/g,\"/\");f.isWebPath(A)||(A=\"file://\"+A),b=A+\"#/\"+g}return u&&(o+=\"?\"),new x(b,o,g,a,this.mode)},e.prototype.patchUses=function(e,t){var n=e.lowLevel();if(e.children(),g.LowLevelCompositeNode.isInstance(n)){var r=n.unit(),i=t.expandedPathMap(r);if(null!=i){var a=t.pathMap(r);a||(a={});for(var o=n,s=n.children(),c=v.Universe10.FragmentDeclaration.properties.uses.name,l=s.filter(function(e){return e.key()==c}),p=u(n),f=p;g.LowLevelProxyNode.isInstance(f);)f=f.originalNode();var m,y=Object.keys(a).map(function(e){return i[e]}),_=Object.keys(i).map(function(e){return i[e]}).filter(function(e){return!a[e.absolutePath()]}),b=r.absolutePath(),A={};if(l.length>0)m=l[0],m.children().forEach(function(e){return A[e.key()]=!0});else{var T=h.createMapNode(\"uses\");T._parent=f,T.setUnit(f.unit()),m=o.replaceChild(null,T)}for(var E=e.definition().property(c),C=E.range(),N=e._children.filter(function(e){if(e.lowLevel().unit().absolutePath()==b)return!0;var t=e.property();return!t||!S.isUsesProperty(t)}),w=e._mergedChildren.filter(function(e){if(e.lowLevel().unit().absolutePath()==b)return!0;var t=e.property();return!t||!S.isUsesProperty(t)}),k=0,x=y.concat(_);k<x.length;k++){var R=x[k];R.absolutePath();if(!A[R.namespace()]){var I=R.includePath,D=h.createMapping(R.namespace(),I);D.setUnit(f.unit());var M=new d.ASTNodeImpl(D,e,C,E);N.push(M),w.push(M),m.replaceChild(null,D)}}e._children=N,e._mergedChildren=w}}},e.prototype.removeUses=function(e){var t=e.lowLevel();if(g.LowLevelCompositeNode.isInstance(t)){var n=t,r=t.children(),i=r.filter(function(e){return e.key()==v.Universe10.FragmentDeclaration.properties.uses.name});i.length>0&&n.removeChild(i[0]),e._children=e.directChildren().filter(function(e){var t=e.property();return null==t||!S.isUsesProperty(t)}),e._mergedChildren=e.children().filter(function(e){var t=e.property();return null==t||!S.isUsesProperty(t)})}},e.prototype.resetTypes=function(e){for(var t=0,n=e.elements();t<n.length;t++){var r=n[t];this.resetTypes(r)}for(var i=0,a=e.attrs();i<a.length;i++){var o=a[i],s=o.value();d.StructuredValue.isInstance(s)&&s.resetHighLevelNode()}delete e.lowLevel().actual().types,delete e._ptype,delete e._types,e.setAssociatedType(null)},e.prototype.appendUnitIfNeeded=function(e,t){if(h.CompilationUnit.isInstance(e)){var n=e;return n.absolutePath()!=t[t.length-1].absolutePath()&&(t.push(n),!0)}var r=u(e.lowLevel()),i=r.unit();if(r.valueKind()==m.Kind.INCLUDE_REF){var a=r.includePath(),o=i.resolve(a);return!!o&&(t.push(o),!0)}return i.absolutePath()!=t[t.length-1].absolutePath()&&(t.push(i),!0)},e.prototype.popUnitIfNeeded=function(e,t){t&&e.pop()},e.prototype.registerPatchedReference=function(e){var t=e.collectionName();if(t){var n=e.referencedUnit().absolutePath(),r=this._outerDependencies[n];null==r&&(r={},this._outerDependencies[n]=r);var i=r[t];null==i&&(i={},r[t]=i),i[e.name()]=e}},e.prototype.collectionName=function(e){var t;return S.isResourceTypeRefType(e)||S.isResourceTypeType(e)?t=T.universesInfo.Universe10.LibraryBase.properties.resourceTypes.name:S.isTraitRefType(e)||S.isTraitType(e)?t=T.universesInfo.Universe10.LibraryBase.properties.traits.name:S.isSecuritySchemeRefType(e)||S.isSecuritySchemaTypeDescendant(e)?t=T.universesInfo.Universe10.LibraryBase.properties.securitySchemes.name:S.isAnnotationRefTypeOrDescendant(e)||e.isAnnotationType()?t=T.universesInfo.Universe10.LibraryBase.properties.annotationTypes.name:(S.isTypeDeclarationDescendant(e)||S.isSchemaStringType(e))&&(t=T.universesInfo.Universe10.LibraryBase.properties.types.name),t},e.prototype.expandLibraries=function(e){if(!e.lowLevel().actual().libExpanded){var t=e.lowLevel(),n=t.unit(),r=(n.absolutePath(),n.project()),i=[],a=t.unit().project().namespaceResolver(),o=a.expandedPathMap(n);if(null!=o){for(var s=Object.keys(o).sort(),u=0,c=s;u<c.length;u++){var l=c[u],p=this._libModels[l];if(null==p){var f=r.unit(l,!0),d=a.resolveNamespace(n,f);f&&null!=d&&null!=d.namespace()&&(p=this.extractLibModel(f))}p&&i.push(p)}for(var m=!1,h=0,y=i;h<y.length;h++)for(var p=y[h],_=0,g=Object.keys(p);_<g.length;_++){var v=g[_],b=p[v];R.isInstance(b)&&(m=this.contributeCollection(e,b)||m)}if(m){var S=!1;do{S=this.patchDependencies(e)}while(S);this.removeUnusedDependencies(e)}}this.removeUses(e),e.lowLevel().actual().libExpanded=!0,this.resetTypes(e)}},e.prototype.patchDependencies=function(e){for(var t=!1,n=e.lowLevel().unit().absolutePath(),r=0,i=e.children();r<i.length;r++){var a=i[r];if(a.isElement()&&!a.lowLevel().libProcessed){var o=a.asElement();this.removeUses(o);var s=a.lowLevel().unit().absolutePath();if(s!=n||null!=a.lowLevel().includePath()){var u=this._outerDependencies[s];if(null!=u){var c=o.property().nameId(),l=u[c];if(null!=l){null!=l[o.name()]&&(this.process(o,e,!0,!0),t=!0)}}}}}return t},e.prototype.removeUnusedDependencies=function(e){for(var t=e.lowLevel(),n=t.unit().absolutePath(),r=e._children,i=[],a=0,o=r;a<o.length;a++){var s=o[a],u=s.lowLevel();if(s.isElement()&&u.libProcessed)i.push(s);else{u.unit().absolutePath()!=n?u.parent().removeChild(u):i.push(s)}}e._children=i,e._mergedChildren=null},e.prototype.contributeCollection=function(e,t){var n=e.lowLevel();if(0==t.array.length)return!1;var r=t.name,i=e.definition().property(r),a=i.range(),o=b.find(n.children(),function(e){return e.key()==r});if(null==o){var s=h.createMapNode(r);o=n.replaceChild(null,s)}for(var c=!1,l=e._children,p=e._mergedChildren,f=0,m=t.array;f<m.length;f++){var y=m[f];if(!o.children().some(function(e){var t=u(e);return t.unit().absolutePath()==y.lowLevel().unit().absolutePath()&&(y.lowLevel().key()==t.key()&&y.lowLevel().unit().absolutePath()==t.unit().absolutePath())})){var _=o.replaceChild(null,y.lowLevel()),g=y.isElement()&&y.asElement().definition()||a,v=new d.ASTNodeImpl(_,e,g,i);l.push(v),p&&p.push(v),c=!0}}return c},e.prototype.extractLibModel=function(e){var t=this._libModels[e.absolutePath()];if(null!=t)return t;t=new I(e),this._libModels[e.absolutePath()]=t;var n=e.highLevel();if(n&&n.isElement())for(var r=0,i=[\"resourceTypes\",\"traits\",\"types\",\"annotationTypes\",\"securitySchemes\"];r<i.length;r++){for(var a=i[r],o=new R(a),s=0,u=n.asElement().elementsOfKind(a);s<u.length;s++){var c=u[s];o.array.push(c)}t[a]=o}return t},e}();t.ReferencePatcher=N,function(e){e[e.OK=0]=\"OK\",e[e.NOT_REQUIRED=1]=\"NOT_REQUIRED\",e[e.ERROR=2]=\"ERROR\"}(t.ParametersEscapingStatus||(t.ParametersEscapingStatus={}));var w=t.ParametersEscapingStatus,k=\"__P_A_R_A_M_E_T_E_R__\";t.escapeTemplateParameters=r,t.unescapeTemplateParameters=i,t.checkExpression=a,t.patchMethodIs=o,t.prepareTraitRefNode=s;var x=function(){function e(e,t,n,r,i){this._namespace=e,this._name=t,this._collectionName=n,this._referencedUnit=r,this._mode=i,this.gotQuestion=!1;var a=this._name.length;\"?\"==this._name.charAt(a-1)&&(this.gotQuestion=!0,this._name=this._name.substring(0,a-1))}return e.prototype.namespace=function(){return this._namespace},e.prototype.name=function(){return this._name},e.prototype.collectionName=function(){return this._collectionName},e.prototype.referencedUnit=function(){return this._referencedUnit},e.prototype.mode=function(){return this._mode},e.prototype.value=function(){if(null==this._namespace)return this._name;var e=this._mode==C.PATH?\"/\":\".\";return this._namespace+e+this._name+(this.gotQuestion?\"?\":\"\")},e}();t.PatchedReference=x,t.instanceOfPatchedReference=c;var R=function(){function e(e){this.name=e,this.array=[]}return e.isInstance=function(t){return null!=t&&t.getClassIdentifier&&\"function\"==typeof t.getClassIdentifier&&b.contains(t.getClassIdentifier(),e.CLASS_IDENTIFIER)},e.prototype.getClassIdentifier=function(){return[].concat(e.CLASS_IDENTIFIER)},e.CLASS_IDENTIFIER=\"referencePatcher.ElementsCollection\",e}(),I=function(){function e(e){this.unit=e}return e}();t.getDeclaration=l,t.isCompoundValue=p;var D=function(e){var t=!e||e.isExternal();if(!t)for(var n=0,r=e.superTypes();n<r.length;n++){var i=r[n];if(t=i.isExternal())break}return t}},function(e,t,n){\"use strict\";function r(e,t){if(void 0===t&&(t=!1),!e)return null;var n=e.kind();if(n==u.Kind.ANCHOR_REF&&(n=e.anchorValueKind()),n==u.Kind.INCLUDE_REF){if(null!=e.unit()){var i=e.includePath(),a=null;try{a=e.unit().resolve(i)}catch(e){}if(null==a)return null;if(a.isRAMLUnit()&&this.canInclude(a)){var o=a.ast();if(o)return r(o,t)}}return null}if(n==u.Kind.SEQ){for(var s=[],c=0,l=e.children();c<l.length;c++){var p=l[c];s.push(r(p,t))}return s}if(n==u.Kind.ANCHOR_REF)return r(e.anchoredFrom(),t);if(n==u.Kind.MAPPING){var f={},d=\"\"+e.key(!0),m=e.valueKind();if(m==u.Kind.INCLUDE_REF){var h=e.children();0==h.length?f[d]=e.value():m=null==h[0].key()?u.Kind.SEQ:u.Kind.MAP}if(m==u.Kind.ANCHOR_REF&&(m=e.anchorValueKind()),m==u.Kind.SCALAR)f[d]=e.value();else if(m==u.Kind.SEQ){var s=[];f[d]=s;for(var y=0,_=e.children();y<_.length;y++){var p=_[y];s.push(r(p,t))}}else if(m==u.Kind.MAP){var g={};f[d]=g;for(var v=0,b=e.children();v<b.length;v++){var p=b[v],S=\"\"+p.key(!0),A=r(p,t);void 0===A&&(A=t?\"!$$$novalue\":null),g[S]=A}}return f[d]}if(n==u.Kind.SCALAR){return e.value(!1)}if(n==u.Kind.MAP){for(var g={},T=0,E=e.children();T<E.length;T++){var p=E[T],S=\"\"+p.key(!0),A=r(p,!0);g[S]=void 0===A?null:A}return g}}function i(e,t){if(void 0===t&&(t={}),t=t||{},0==e.children().length)return e.value();if(e.children()[0].key()){var n={};if(e.children().forEach(function(e){n[o(e.key(t.rawKey),t)]=i(e,t)}),t&&t.writeErrors){var r=a(e);null!=r&&r.length>0&&(n.__$errors__=r)}return n}var s=[];return e.children().forEach(function(e){s.push(i(e,t))}),s}function a(e){var t=[].concat(e.errors());return e.children().forEach(function(e){var n=e.children();if(0==n.length)return void e.errors().forEach(function(e){return t.push(e)});n[0].key()||n.forEach(function(e){0==e.children().length&&e.errors().forEach(function(e){return t.push(e)})})}),t}function o(e,t){return t&&e&&t.escapeNumericKeys&&0==e.replace(/\\d/g,\"\").trim().length?\"__$EscapedKey$__\"+e:e}function s(e,t){return e?(t=t||{},t.escapeNumericKeys&&p.stringStartsWith(e,\"__$EscapedKey$__\")&&0==e.substring(\"__$EscapedKey$__\".length).replace(/\\d/g,\"\").trim().length?e.substring(\"__$EscapedKey$__\".length):e):e}var u=n(14),c=n(20),l=n(4),p=n(15),f=n(9),d=u.YAMLException,m=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this._absolutePath=e,this._path=t,this._content=n,this._project=r,this._isTopoLevel=i,this.serializeOptions=a,this._node=new h(this,JSON.parse(this._content),null,a)}return e.prototype.highLevel=function(){return l.fromUnit(this)},e.prototype.absolutePath=function(){return this._absolutePath},e.prototype.clone=function(){return null},e.prototype.contents=function(){return this._content},e.prototype.lexerErrors=function(){return[]},e.prototype.path=function(){return this._content},e.prototype.isTopLevel=function(){return this._isTopoLevel},e.prototype.ast=function(){return this._node},e.prototype.expandedHighLevel=function(){return this.highLevel()},e.prototype.isDirty=function(){return!0},e.prototype.getIncludeNodes=function(){return[]},e.prototype.resolveAsync=function(e){return null},e.prototype.isRAMLUnit=function(){return!0},e.prototype.project=function(){return this._project},e.prototype.updateContent=function(e){},e.prototype.ramlVersion=function(){throw new d(\"not implemented\")},e.prototype.lineMapper=function(){return new c.LineMapperImpl(this.contents(),this.absolutePath())},e.prototype.resolve=function(e){return null},e.prototype.isOverlayOrExtension=function(){return!1},e.prototype.getMasterReferenceNode=function(){return null},e}();t.CompilationUnit=m;var h=function(){function e(e,t,n,r,i){var a=this;void 0===r&&(r={}),this._unit=e,this._object=t,this._parent=n,this.options=r,this._key=i,this._isOptional=!1,this._object instanceof Object&&Object.keys(this._object).forEach(function(e){var t=s(e,a.options);if(t!=e){var n=a._object[e];delete a._object[e],a._object[t]=n}}),this._key&&p.stringEndsWith(this._key,\"?\")&&(this._isOptional=!0,this._key=this._key.substring(0,this._key.length-1))}return e.prototype.keyKind=function(){return null},e.prototype.isAnnotatedScalar=function(){return!1},e.prototype.hasInnerIncludeError=function(){return!1},e.prototype.start=function(){return-1},e.prototype.end=function(){return-1},e.prototype.value=function(){return this._object},e.prototype.actual=function(){return this._object},e.prototype.includeErrors=function(){return[]},e.prototype.includePath=function(){return null},e.prototype.includeReference=function(){return null},e.prototype.key=function(){return this._key},e.prototype.optional=function(){return this._isOptional},e.prototype.children=function(){var t=this;return this._object?Array.isArray(this._object)?this._object.map(function(n){return new e(t._unit,n,t,t.options)}):this._object instanceof Object?Object.keys(this._object).map(function(n){return new e(t._unit,t._object[n],t,t.options,n)}):[]:[]},e.prototype.parent=function(){return this._parent},e.prototype.unit=function(){return this._unit},e.prototype.containingUnit=function(){return this._unit},e.prototype.includeBaseUnit=function(){return this._unit},e.prototype.anchorId=function(){return null},e.prototype.errors=function(){return[]},e.prototype.anchoredFrom=function(){return this},e.prototype.includedFrom=function(){return this},e.prototype.visit=function(e){e(this)&&this.children().forEach(function(t){return t.visit(e)})},e.prototype.dumpToObject=function(){return this._object},e.prototype.addChild=function(e){},e.prototype.execute=function(e){},e.prototype.dump=function(){return JSON.stringify(this._object)},e.prototype.keyStart=function(){return-1},e.prototype.keyEnd=function(){return-1},e.prototype.valueStart=function(){return-1},e.prototype.valueEnd=function(){return-1},e.prototype.isValueLocal=function(){return!0},e.prototype.kind=function(){return Array.isArray(this._object)?u.Kind.SEQ:this._object instanceof Object?u.Kind.MAP:u.Kind.SCALAR},e.prototype.valueKind=function(){if(!this._object)return null;var e=typeof this._object;return Array.isArray(this._object)?u.Kind.SEQ:\"object\"==e?u.Kind.MAP:\"string\"==e||\"number\"==e||\"boolean\"==e?u.Kind.SCALAR:null},e.prototype.anchorValueKind=function(){return null},e.prototype.show=function(e){},e.prototype.setHighLevelParseResult=function(e){this._highLevelParseResult=e},e.prototype.highLevelParseResult=function(){return this._highLevelParseResult},e.prototype.setHighLevelNode=function(e){this._highLevelNode=e},e.prototype.highLevelNode=function(){return this._highLevelNode},e.prototype.text=function(e){throw new d(\"not implemented\")},e.prototype.copy=function(){throw new d(\"not implemented\")},e.prototype.markup=function(e){throw new d(\"not implemented\")},e.prototype.nodeDefinition=function(){return f.getDefinitionForLowLevelNode(this)},e.prototype.includesContents=function(){return!1},e}();t.AstNode=h,t.serialize2=r,t.serialize=i},function(e,t,n){\"use strict\";function r(e){return a.isWebPath(e)}var i=n(11),a=n(20),o=n(28),s=function(){function e(e){this.unit=e}return e.prototype.contextPath=function(){return this.unit?this.unit.absolutePath()||\"\":\"\"},e.prototype.normalizePath=function(e){if(!e)return e;var t;if(r(e)){var n=0===e.toLowerCase().indexOf(\"https\")?\"https://\":\"http://\";t=n+i.normalize(e.substring(n.length)).replace(/\\\\/g,\"/\")}else t=i.normalize(e).replace(/\\\\/g,\"/\");return t},e.prototype.content=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolve(n);return r?r.contents()||\"\":\"\"},e.prototype.contentAsync=function(e){var t=this.normalizePath(e),n=this.toRelativeIfNeeded(t),r=this.unit.resolveAsync(n);return r?r.then(function(e){return e&&e.contents()||\"\"}):Promise.resolve(\"\")},e.prototype.toRelativeIfNeeded=function(e){var t=e;return i.isAbsolute(e)&&!r(e)&&(t=i.relative(i.dirname(this.unit.absolutePath()),e)),t},e.prototype.hasAsyncRequests=function(){return o.hasAsyncRequests()},e.prototype.resolvePath=function(e,t){return a.buildPath(t,e,this.unit.project().getRootPath())},e.prototype.isAbsolutePath=function(e){return!!e&&(!!r(e)||i.isAbsolute(e))},e.prototype.promiseResolve=function(e){return Promise.resolve(e)},e}();t.ContentProvider=s},function(e,t,n){\"use strict\";function r(e){return e&&e.indexOf(\"\\n\")>=0}function i(e){return r(e)&&e.length>2&&\"|\"==e[0]&&(\"\\n\"==e[1]||\"\\r\"==e[1]||\"\\n\"==e[2])}function a(e,t){var n=\"\";if(r(e)){n+=\"|\\n\";for(var i=d(e),a=0;a<i.length;a++)n+=u(t,i[a])}else n+=e;return n}function o(e){if(!i(e))return e;for(var t=null,n=d(e),r=1;r<n.length;r++){var a=n[r],o=a.substring(2);t?t+=o:t=o}return t}function s(e){if(!e)return e;for(var t=0;t<e.length;){var n=e[t];if(\"\\r\"!=n&&\"\\n\"!=n&&\" \"!=n&&\"\\t\"!=n)break;t++}return e.substring(t,e.length)}function u(e,t){void 0===t&&(t=\"\");for(var n=\"\",r=0;r<e;r++)n+=\"  \";return n+t}function c(e,t){void 0===t&&(t=\"\"),console.log(u(e,t))}function l(e,t){void 0===t&&(t=null);for(var n=\"\",r=0;r<e.length;r++){var i=e[r];\"\\r\"==i&&(i=null==t?\"\\\\r\":t),\"\\n\"==i&&(i=null==t?\"\\\\n\":t),n+=i}return n}function p(e){for(var t=e.length;t>0;){var n=e[t-1];if(\" \"!=n&&\"\\t\"!=n&&\"\\r\"!=n&&\"\\n\"!=n)break;t--}return e.substring(0,t)}function f(e){return s(p(e))}function d(e){return e.match(/^.*((\\r\\n|\\n|\\r)|$)/gm)}function m(e,t){if(!e||!t||e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[n]!=t[n])return!1;return!0}function h(e,t){if(!e||!t||e.length<t.length)return!1;for(var n=0;n<t.length;n++)if(e[e.length-1-n]!=t[t.length-1-n])return!1;return!0}function y(e){return e.charAt(0).toUpperCase()+e.slice(1)}t.isMultiLine=r,t.isMultiLineValue=i,t.makeMutiLine=a,t.fromMutiLine=o,t.trimStart=s,t.indent=u,t.print=c,t.replaceNewlines=l,t.trimEnd=p,t.trim=f,t.splitOnLines=d,t.startsWith=m,t.endsWith=h,t.capitalize=y;var _=function(){function e(e,t,n){this.contents=e,this.start=t,this.end=n}return e.prototype.text=function(){return this.contents.substring(this.start,this.end)},e.prototype.startpos=function(){return this.start},e.prototype.endpos=function(){return this.end},e.prototype.len=function(){return this.end-this.start},e.prototype.unitText=function(){return this.contents},e.prototype.withStart=function(t){return new e(this.contents,t,this.end)},e.prototype.withEnd=function(t){return new e(this.contents,this.start,t)},e.prototype.sub=function(e,t){return this.contents.substring(e,t)},e.prototype.trimStart=function(){for(var t=this.start;t<this.contents.length-1;){var n=this.contents[t];if(\" \"!=n&&\"\\t\"!=n)break;t++}return new e(this.contents,t,this.end)},e.prototype.trimEnd=function(){for(var t=this.end;t>0;){var n=this.contents[t-1];if(\" \"!=n&&\"\\t\"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.extendToStartOfLine=function(){for(var t=this.start;t>0;){var n=this.contents[t-1];if(\"\\r\"==n||\"\\n\"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.extendAnyUntilNewLines=function(){var t=this.end;if(t>0){if(\"\\n\"==this.contents[t-1])return this}for(;t<this.contents.length-1;){var n=this.contents[t];if(\"\\r\"==n||\"\\n\"==n)break;t++}return new e(this.contents,this.start,t)},e.prototype.extendSpacesUntilNewLines=function(){var t=this.end;if(t>0){if(\"\\n\"==this.contents[t-1])return this}for(;t<this.contents.length-1;){var n=this.contents[t];if(\" \"!=n||\"\\r\"==n||\"\\n\"==n)break;t++}return new e(this.contents,this.start,t)},e.prototype.extendSpaces=function(){for(var t=this.end;t<this.contents.length-1;){if(\" \"!=this.contents[t])break;t++}return new e(this.contents,this.start,t)},e.prototype.extendSpacesBack=function(){for(var t=this.start;t>0;){if(\" \"!=this.contents[t-1])break;t--}return new e(this.contents,t,this.end)},e.prototype.extendCharIfAny=function(t){var n=this.end;return n<this.contents.length-1&&this.contents[n]==t&&n++,new e(this.contents,this.start,n)},e.prototype.extendCharIfAnyBack=function(t){var n=this.start;return n>0&&this.contents[n-1]==t&&n--,new e(this.contents,n,this.end)},e.prototype.extendToNewlines=function(){var t=this.end;if(t>0){if(\"\\n\"==this.contents[t-1])return this}for(;t<this.contents.length-1;){var n=this.contents[t];if(\"\\r\"!=n&&\"\\n\"!=n)break;t++}return new e(this.contents,this.start,t)},e.prototype.extendUntilNewlinesBack=function(){for(var t=this.start;t>0;){var n=this.contents[t-1];if(\"\\r\"==n||\"\\n\"==n)break;t--}return new e(this.contents,t,this.end)},e.prototype.reduceNewlinesEnd=function(){for(var t=this.end;t>this.start;){var n=this.contents[t-1];if(\"\\r\"!=n&&\"\\n\"!=n)break;t--}return new e(this.contents,this.start,t)},e.prototype.reduceSpaces=function(){for(var t=this.end;t>this.start;){if(\" \"!=this.contents[t-1])break;t--}return new e(this.contents,this.start,t)},e.prototype.replace=function(e){return this.sub(0,this.start)+e+this.sub(this.end,this.unitText().length)},e.prototype.remove=function(){return this.sub(0,this.start)+this.sub(this.end,this.unitText().length)},e}();t.TextRange=_},function(e,t,n){\"use strict\";function r(){return h?h:h=new m}var i=n(6),a=n(7),o=n(6),s=n(8),u=n(7),c=n(7),l=n(7),p=n(7),f=n(8),d=function(){function e(e,t){this._construct=e,this._constructWithValue=t}return e.prototype.isSimple=function(){return null!=this._constructWithValue},e.prototype.newInstance=function(){return this._construct()},e.prototype.createWithValue=function(e){return this._constructWithValue(e)},e.prototype.isApplicable=function(e){var t=this.newInstance(),n=t.requiredType(),r=t.requiredTypes();return r&&r.length>0?r.some(function(t){return e.isSubTypeOf(t)}):e.isSubTypeOf(n)},e.prototype.isInheritable=function(){return this.newInstance().isInheritable()},e.prototype.isConstraint=function(){return this.newInstance()instanceof i.Constraint},e.prototype.isMeta=function(){return!this.isConstraint()},e.prototype.name=function(){return this.newInstance().facetName()},e}();t.FacetPrototype=d;var m=function(){function e(){var e=this;this.constraints=[new d(function(){return new s.MinProperties(1)},function(e){return new s.MinProperties(e)}),new d(function(){return new s.MaxProperties(1)},function(e){return new s.MaxProperties(e)}),new d(function(){return new s.MinItems(1)},function(e){return new s.MinItems(e)}),new d(function(){return new s.MaxItems(1)},function(e){return new s.MaxItems(e)}),new d(function(){return new s.MinLength(1)},function(e){return new s.MinLength(e)}),new d(function(){return new s.MaxLength(1)},function(e){return new s.MaxLength(e)}),new d(function(){return new s.Minimum(1)},function(e){return new s.Minimum(e)}),new d(function(){return new f.MultipleOf(1)},function(e){return new f.MultipleOf(e)}),new d(function(){return new s.Maximum(1)},function(e){return new s.Maximum(e)}),new d(function(){return new s.Enum([\"\"])},function(e){return new s.Enum(e)}),new d(function(){return new s.Pattern(\".\")},function(e){return new s.Pattern(e)}),new d(function(){return new s.Format(\"\")},function(e){return new s.Format(e)}),new d(function(){return new s.PropertyIs(\"x\",i.ANY)},null),new d(function(){return new s.AdditionalPropertyIs(i.ANY)},null),new d(function(){return new s.MapPropertyIs(\".\",i.ANY)},null),new d(function(){return new s.HasProperty(\"x\")},null),new d(function(){return new s.UniqueItems(!0)},function(e){return new s.UniqueItems(e)}),new d(function(){return new s.ComponentShouldBeOfType(i.ANY)},null),new d(function(){return new s.KnownPropertyRestriction(!1)},function(e){return new s.KnownPropertyRestriction(e)}),new d(function(){return new s.FileTypes([\"\"])},function(e){return new s.FileTypes(e)})],this.meta=[new d(function(){return new a.Discriminator(\"kind\")},function(e){return new a.Discriminator(e)}),new d(function(){return new a.DiscriminatorValue(\"x\")},function(e){return new a.DiscriminatorValue(e)}),new d(function(){return new u.Default(\"\")},function(e){return new u.Default(e)}),new d(function(){return new p.Usage(\"\")},function(e){return new p.Usage(e)}),new d(function(){return new u.Example(\"\")},function(e){return new u.Example(e)}),new d(function(){return new l.Required(!0)},function(e){return new l.Required(e)}),new d(function(){return new a.Examples({})},function(e){return new a.Examples(e)}),new d(function(){return new u.Description(\"\")},function(e){return new u.Description(e)}),new d(function(){return new u.DisplayName(\"\")},function(e){return new u.DisplayName(e)}),new d(function(){return new o.Abstract},function(e){return new o.Abstract}),new d(function(){return new o.Polymorphic},function(e){return new o.Polymorphic}),new d(function(){return new c.XMLInfo({})},function(e){return new c.XMLInfo(e)})],this.known={},this.allPrototypes().forEach(function(t){return e.known[t.name()]=t})}return e.prototype.allPrototypes=function(){return this.meta.concat(this.constraints)},e.prototype.buildFacet=function(e,t){return this.known.hasOwnProperty(e)&&this.known[e].isSimple()?this.known[e].createWithValue(t):null},e.prototype.facetPrototypeWithName=function(e){return this.known.hasOwnProperty(e)?this.known[e]:null},e.prototype.applyableTo=function(e){return this.allPrototypes().filter(function(t){return t.isApplicable(e)})},e.prototype.allMeta=function(){return this.allPrototypes().filter(function(e){return e.isMeta()})},e}();t.Registry=m;var h;t.getInstance=r},function(e,t,n){function r(){i.call(this)}e.exports=r;var i=n(40).EventEmitter;n(26)(r,i),r.Readable=n(155),r.Writable=n(349),r.Duplex=n(345),r.Transform=n(348),r.PassThrough=n(347),r.Stream=r,r.prototype.pipe=function(e,t){function n(t){e.writable&&!1===e.write(t)&&c.pause&&c.pause()}function r(){c.readable&&c.resume&&c.resume()}function a(){l||(l=!0,e.end())}function o(){l||(l=!0,\"function\"==typeof e.destroy&&e.destroy())}function s(e){if(u(),0===i.listenerCount(this,\"error\"))throw e}function u(){c.removeListener(\"data\",n),e.removeListener(\"drain\",r),c.removeListener(\"end\",a),c.removeListener(\"close\",o),c.removeListener(\"error\",s),e.removeListener(\"error\",s),c.removeListener(\"end\",u),c.removeListener(\"close\",u),e.removeListener(\"close\",u)}var c=this;c.on(\"data\",n),e.on(\"drain\",r),e._isStdio||t&&t.end===!1||(c.on(\"end\",a),c.on(\"close\",o));var l=!1;return c.on(\"error\",s),e.on(\"error\",s),c.on(\"end\",u),c.on(\"close\",u),e.on(\"close\",u),e.emit(\"pipe\",c),e}},function(e,t,n){\"use strict\";function r(e,t){return{name:e,methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:t,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}}function i(e,t,n){return a.parseStruct(e,t,n)}t.helpers=n(158);var a=n(160),o=function(){function e(){}return e}();t.EnumDeclaration=o,function(e){e[e.BASIC=0]=\"BASIC\",e[e.ARRAY=1]=\"ARRAY\",e[e.UNION=2]=\"UNION\"}(t.TypeKind||(t.TypeKind={}));t.TypeKind;t.classDecl=r,t.parseStruct=i},function(e,t,n){\"use strict\";var r=function(){function e(e,t){void 0===t&&(t=null),this.name=\"YAMLException\",this.reason=e,this.mark=t,this.message=this.toString(!1)}return e.prototype.toString=function(e){void 0===e&&(e=!1);var t;return t=\"JS-YAML: \"+(this.reason||\"(unknown reason)\"),!e&&this.mark&&(t+=\" \"+this.mark.toString()),t},e}();e.exports=r},function(e,t,n){\"use strict\";(function(e){var r=n(16),i=r.Buffer,a=r.SlowBuffer,o=r.kMaxLength||2147483647;t.alloc=function(e,t,n){if(\"function\"==typeof i.alloc)return i.alloc(e,t,n);if(\"number\"==typeof n)throw new TypeError(\"encoding must not be number\");if(\"number\"!=typeof e)throw new TypeError(\"size must be a number\");if(e>o)throw new RangeError(\"size is too large\");var r=n,a=t;void 0===a&&(r=void 0,a=0);var s=new i(e);if(\"string\"==typeof a)for(var u=new i(a,r),c=u.length,l=-1;++l<e;)s[l]=u[l%c];else s.fill(a);return s},t.allocUnsafe=function(e){if(\"function\"==typeof i.allocUnsafe)return i.allocUnsafe(e);if(\"number\"!=typeof e)throw new TypeError(\"size must be a number\");if(e>o)throw new RangeError(\"size is too large\");return new i(e)},t.from=function(t,n,r){if(\"function\"==typeof i.from&&(!e.Uint8Array||Uint8Array.from!==i.from))return i.from(t,n,r);if(\"number\"==typeof t)throw new TypeError('\"value\" argument must not be a number');if(\"string\"==typeof t)return new i(t,n);if(\"undefined\"!=typeof ArrayBuffer&&t instanceof ArrayBuffer){var a=n;if(1===arguments.length)return new i(t);void 0===a&&(a=0);var o=r;if(void 0===o&&(o=t.byteLength-a),a>=t.byteLength)throw new RangeError(\"'offset' is out of bounds\");if(o>t.byteLength-a)throw new RangeError(\"'length' is out of bounds\");return new i(t.slice(a,a+o))}if(i.isBuffer(t)){var s=new i(t.length);return t.copy(s,0,0,t.length),s}if(t){if(Array.isArray(t)||\"undefined\"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||\"length\"in t)return new i(t);if(\"Buffer\"===t.type&&Array.isArray(t.data))return new i(t.data)}throw new TypeError(\"First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.\")},t.allocUnsafeSlow=function(e){if(\"function\"==typeof i.allocUnsafeSlow)return i.allocUnsafeSlow(e);if(\"number\"!=typeof e)throw new TypeError(\"size must be a number\");if(e>=o)throw new RangeError(\"size is too large\");return new a(e)}}).call(t,n(13))},function(e,t,n){t.dot=t.dotCase=n(179),t.swap=t.swapCase=n(355),t.path=t.pathCase=n(294),t.upper=t.upperCase=n(32),t.lower=t.lowerCase=n(45),t.camel=t.camelCase=n(102),t.snake=t.snakeCase=n(156),t.title=t.titleCase=n(358),t.param=t.paramCase=n(292),t.pascal=t.pascalCase=n(293),t.constant=t.constantCase=n(177),t.sentence=t.sentenceCase=n(31),t.isUpper=t.isUpperCase=n(184),t.isLower=t.isLowerCase=n(183),t.ucFirst=t.upperCaseFirst=n(161),t.lcFirst=t.lowerCaseFirst=n(290)},function(e,t,n){var r=n(27),i=n(22),a=r(i,\"Map\");e.exports=a},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(255),a=n(256),o=n(257),s=n(258),u=n(259);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t){function n(e,t){return!!(t=null==t?r:t)&&(\"number\"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}var r=9007199254740991,i=/^(?:0|[1-9]\\d*)$/;e.exports=n},function(e,t,n){function r(e,t){if(i(e))return!1;var n=typeof e;return!(\"number\"!=n&&\"symbol\"!=n&&\"boolean\"!=n&&null!=e&&!a(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i=n(18),a=n(80),o=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,s=/^\\w*$/;e.exports=r},function(e,t){function n(e){var t=e&&e.constructor;return e===(\"function\"==typeof t&&t.prototype||r)}var r=Object.prototype;e.exports=n},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){var r=n(215),i=n(43),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,\"callee\")&&!s.call(e,\"callee\")};e.exports=u},function(e,t,n){(function(e){var r=n(22),i=n(287),a=\"object\"==typeof t&&t&&!t.nodeType&&t,o=a&&\"object\"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||i;e.exports=l}).call(t,n(98)(e))},function(e,t){function n(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t,n){function r(e){return\"symbol\"==typeof e||a(e)&&i(e)==o}var i=n(41),a=n(43),o=\"[object Symbol]\";e.exports=r},function(e,t,n){var r=n(219),i=n(229),a=n(263),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},function(e,t,n){!function(t,n){e.exports=n()}(0,function(){function e(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}function t(e){return\"string\"==typeof e?new RegExp(\"^\"+e+\"$\",\"i\"):e}function n(t,n){return t===t.toUpperCase()?n.toUpperCase():t[0]===t[0].toUpperCase()?e(n):n.toLowerCase()}function r(e,t){return e.replace(/\\$(\\d{1,2})/g,function(e,n){return t[n]||\"\"})}function i(e,t,i){if(!e.length||c.hasOwnProperty(e))return t;for(var a=i.length;a--;){var o=i[a];if(o[0].test(t))return t.replace(o[0],function(e,t,i){var a=r(o[1],arguments);return\"\"===e?n(i[t-1],a):n(e,a)})}return t}function a(e,t,r){return function(a){var o=a.toLowerCase();return t.hasOwnProperty(o)?n(a,o):e.hasOwnProperty(o)?n(a,e[o]):i(o,a,r)}}function o(e,t,n){var r=1===t?o.singular(e):o.plural(e);return(n?t+\" \":\"\")+r}var s=[],u=[],c={},l={},p={};return o.plural=a(p,l,s),o.singular=a(l,p,u),o.addPluralRule=function(e,n){s.push([t(e),n])},o.addSingularRule=function(e,n){u.push([t(e),n])},o.addUncountableRule=function(e){if(\"string\"==typeof e)return void(c[e.toLowerCase()]=!0);o.addPluralRule(e,\"$0\"),o.addSingularRule(e,\"$0\")},o.addIrregularRule=function(e,t){t=t.toLowerCase(),e=e.toLowerCase(),p[e]=t,l[t]=e},[[\"I\",\"we\"],[\"me\",\"us\"],[\"he\",\"they\"],[\"she\",\"they\"],[\"them\",\"them\"],[\"myself\",\"ourselves\"],[\"yourself\",\"yourselves\"],[\"itself\",\"themselves\"],[\"herself\",\"themselves\"],[\"himself\",\"themselves\"],[\"themself\",\"themselves\"],[\"is\",\"are\"],[\"this\",\"these\"],[\"that\",\"those\"],[\"echo\",\"echoes\"],[\"dingo\",\"dingoes\"],[\"volcano\",\"volcanoes\"],[\"tornado\",\"tornadoes\"],[\"torpedo\",\"torpedoes\"],[\"genus\",\"genera\"],[\"viscus\",\"viscera\"],[\"stigma\",\"stigmata\"],[\"stoma\",\"stomata\"],[\"dogma\",\"dogmata\"],[\"lemma\",\"lemmata\"],[\"schema\",\"schemata\"],[\"anathema\",\"anathemata\"],[\"ox\",\"oxen\"],[\"axe\",\"axes\"],[\"die\",\"dice\"],[\"yes\",\"yeses\"],[\"foot\",\"feet\"],[\"eave\",\"eaves\"],[\"goose\",\"geese\"],[\"tooth\",\"teeth\"],[\"quiz\",\"quizzes\"],[\"human\",\"humans\"],[\"proof\",\"proofs\"],[\"carve\",\"carves\"],[\"valve\",\"valves\"],[\"thief\",\"thieves\"],[\"genie\",\"genies\"],[\"groove\",\"grooves\"],[\"pickaxe\",\"pickaxes\"],[\"whiskey\",\"whiskies\"]].forEach(function(e){return o.addIrregularRule(e[0],e[1])}),[[/s?$/i,\"s\"],[/([^aeiou]ese)$/i,\"$1\"],[/(ax|test)is$/i,\"$1es\"],[/(alias|[^aou]us|tlas|gas|ris)$/i,\"$1es\"],[/(e[mn]u)s?$/i,\"$1s\"],[/([^l]ias|[aeiou]las|[emjzr]as|[iu]am)$/i,\"$1\"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,\"$1i\"],[/(alumn|alg|vertebr)(?:a|ae)$/i,\"$1ae\"],[/(seraph|cherub)(?:im)?$/i,\"$1im\"],[/(her|at|gr)o$/i,\"$1oes\"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,\"$1a\"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,\"$1a\"],[/sis$/i,\"ses\"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,\"$1$2ves\"],[/([^aeiouy]|qu)y$/i,\"$1ies\"],[/([^ch][ieo][ln])ey$/i,\"$1ies\"],[/(x|ch|ss|sh|zz)$/i,\"$1es\"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,\"$1ices\"],[/(m|l)(?:ice|ouse)$/i,\"$1ice\"],[/(pe)(?:rson|ople)$/i,\"$1ople\"],[/(child)(?:ren)?$/i,\"$1ren\"],[/eaux$/i,\"$0\"],[/m[ae]n$/i,\"men\"],[\"thou\",\"you\"]].forEach(function(e){return o.addPluralRule(e[0],e[1])}),[[/s$/i,\"\"],[/(ss)$/i,\"$1\"],[/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)(?:sis|ses)$/i,\"$1sis\"],[/(^analy)(?:sis|ses)$/i,\"$1sis\"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\\w]|^)li)ves$/i,\"$1fe\"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,\"$1f\"],[/([^aeiouy]|qu)ies$/i,\"$1y\"],[/(^[pl]|zomb|^(?:neck)?t|[aeo][lt]|cut)ies$/i,\"$1ie\"],[/(\\b(?:mon|smil))ies$/i,\"$1ey\"],[/(m|l)ice$/i,\"$1ouse\"],[/(seraph|cherub)im$/i,\"$1\"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|tlas|gas|(?:her|at|gr)o|ris)(?:es)?$/i,\"$1\"],[/(e[mn]u)s?$/i,\"$1\"],[/(movie|twelve)s$/i,\"$1\"],[/(cris|test|diagnos)(?:is|es)$/i,\"$1is\"],[/(alumn|syllab|octop|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,\"$1us\"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,\"$1um\"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,\"$1on\"],[/(alumn|alg|vertebr)ae$/i,\"$1a\"],[/(cod|mur|sil|vert|ind)ices$/i,\"$1ex\"],[/(matr|append)ices$/i,\"$1ix\"],[/(pe)(rson|ople)$/i,\"$1rson\"],[/(child)ren$/i,\"$1\"],[/(eau)x?$/i,\"$1\"],[/men$/i,\"man\"]].forEach(function(e){return o.addSingularRule(e[0],e[1])}),[\"advice\",\"agenda\",\"bison\",\"bream\",\"buffalo\",\"carp\",\"chassis\",\"cod\",\"cooperation\",\"corps\",\"digestion\",\"debris\",\"diabetes\",\"energy\",\"equipment\",\"elk\",\"excretion\",\"expertise\",\"flounder\",\"gallows\",\"garbage\",\"graffiti\",\"headquarters\",\"health\",\"herpes\",\"highjinks\",\"homework\",\"information\",\"jeans\",\"justice\",\"kudos\",\"labour\",\"machinery\",\"mackerel\",\"media\",\"mews\",\"moose\",\"news\",\"pike\",\"plankton\",\"pliers\",\"pollution\",\"premises\",\"rain\",\"rice\",\"salmon\",\"scissors\",\"series\",\"sewage\",\"shambles\",\"shrimp\",\"species\",\"staff\",\"swine\",\"trout\",\"tuna\",\"whiting\",\"wildebeest\",\"wildlife\",\"you\",/pox$/i,/ois$/i,/deer$/i,/fish$/i,/sheep$/i,/measles$/i,/[^aeiou]ese$/i].forEach(o.addUncountableRule),o})},function(e,t,n){\"use strict\";(function(t){function n(e,n,r,i){if(\"function\"!=typeof e)throw new TypeError('\"callback\" argument must be a function');var a,o,s=arguments.length;switch(s){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick(function(){e.call(null,n)});case 3:return t.nextTick(function(){e.call(null,n,r)});case 4:return t.nextTick(function(){e.call(null,n,r,i)});default:for(a=new Array(s-1),o=0;o<a.length;)a[o++]=arguments[o];return t.nextTick(function(){e.apply(null,a)})}}!t.version||0===t.version.indexOf(\"v0.\")||0===t.version.indexOf(\"v1.\")&&0!==t.version.indexOf(\"v1.8.\")?e.exports=n:e.exports=t.nextTick}).call(t,n(23))},function(e,t,n){\"use strict\";var r,i=n(182),a=function(e){return null!=e},o=function(){function e(t){var n=this;this._value=t,this._isDefined=!1,this._isEmpty=!0,this._arr=void 0,this.getOrThrow=function(){return i(n._isDefined,\"Opt is empty. Use `Opt#getOrElse` or check `Opt#isDefined`.\"),n._value},this.value=function(){return n._value},this.isDefined=function(){return n._isDefined},this.isEmpty=function(){return n._isEmpty},this.toArray=function(){return n._arr||(n._arr=n._isDefined?[n._value]:[])},this.getOrElse=function(e){return n._isDefined?n._value:e},this.getOrElseF=function(e){return n._isDefined?n._value:e()},this.map=function(t){return n._isEmpty?e.empty():new e(t(n._value))},this.flatMap=function(t){return n.map(t).getOrElse(e.empty())},this.equals=function(t){return i(t instanceof e,\"Expected other to be an `Opt`, but got `%s`\",typeof t),n._isDefined===t.isDefined()&&n._value===t.value()},a(this._value)&&(this._isDefined=!0,this._isEmpty=!1)}return e.prototype.forEach=function(e){this.isDefined()&&e(this._value)},e.empty=function(){return r||(r=new e)},e}();e.exports=o},function(e,t,n){\"use strict\";function r(e,t){return t=t||{},p(e).then(function(e){var n;return n=!t.hasOwnProperty(\"expandLibraries\")||t.expandLibraries?w.expandLibrariesHL(e):w.expandTraitsAndResourceTypesHL(e),R.dump(n,{rootNodeDetails:!0,attributeDefaults:!0,serializeMetadata:!0})})}function i(e,t){t=t||{};var n,r=u(e);return n=!t.hasOwnProperty(\"expandLibraries\")||t.expandLibraries?w.expandLibrariesHL(r)||r:w.expandTraitsAndResourceTypesHL(r)||r,R.dump(n,{rootNodeDetails:!0,attributeDefaults:!0,serializeMetadata:!0})}function a(e,t,n){var r=u(e,t,n);if(!r)return A.empty();var i=r.wrapperNode();return v(i,Array.isArray(t)?n:t),new A(i)}function o(e,t,n){var r=u(e,t,n);if(!r)return A.empty();var i=r.wrapperNode();return v(i,Array.isArray(t)?n:t),new A(i)}function s(e,t,n){var r=u(e,t,n);return r?new A(r):A.empty()}function u(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=m(e,a),s=e.indexOf(\"://\"),u=s!=-1&&s<6?e:S.basename(e),c=o.unit(u);n&&!i&&(i=null);var l;if(c)if(i&&i.length>0){var p=[];i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(\"Extensions and overlays list should contain legal file paths\")}),i.forEach(function(e){p.push(o.unit(e,S.isAbsolute(e)))}),p.forEach(function(e){return h(e,a)}),l=h(N.mergeAPIs(c,p,E.OverlayMergeMode.MERGE),a)}else l=h(c,a),l.setMergeMode(E.OverlayMergeMode.MERGE);if(!c)throw new Error(\"Can not resolve :\"+e);if(a.rejectOnErrors&&l&&l.errors().filter(function(e){return!e.isWarning}).length)throw y(l);return l}function c(e,t,n){return l(e,t,n).then(function(e){return e})}function l(e,t,n){return p(e,t,n).then(function(e){if(!e)return null;for(var r=Array.isArray(t),i=r?n:t,a=e;null!=a;){v(a.wrapperNode(),i);var o=a.getMaster();a=o?o.asElement():null}return e.wrapperNode()})}function p(e,t,n){var r=Array.isArray(t),i=r?t:null,a=r?n:t;a=a||{};var o=m(e,a),s=e.indexOf(\"://\"),u=s!=-1&&s<6?e:S.basename(e);return n&&!i&&(i=null),i&&0!=i.length?(i.forEach(function(e){if(!e||0==e.trim().length)throw new Error(\"Extensions and overlays list should contain legal file paths\")}),d(o,u,a).then(function(e){var t=[];return i.forEach(function(e){t.push(d(o,e,a))}),Promise.all(t).then(function(t){var n=[];return t.forEach(function(e){return n.push(e.lowLevel().unit())}),N.mergeAPIs(e.lowLevel().unit(),n,E.OverlayMergeMode.MERGE)}).then(function(e){return h(e,a)})})):d(o,u,a).then(function(e){return e.setMergeMode(E.OverlayMergeMode.MERGE),e})}function f(e){if(null==e)return null;var t=e.getAdapter(x.RAMLService).getDeclaringNode();return null==t?null:t.wrapperNode()}function d(e,t,n){return C.fetchIncludesAndMasterAsync(e,t).then(function(e){try{var t=h(e,n);return n.rejectOnErrors&&t&&t.errors().filter(function(e){return!e.isWarning}).length?Promise.reject(y(t)):t}catch(e){return Promise.reject(e)}})}function m(e,t){t=t||{};var n,r=t.fsResolver,i=t.httpResolver,a=t.reusedNode;if(a)n=a.lowLevel().unit().project(),n.deleteUnit(S.basename(e)),r&&n.setFSResolver(r),i&&n.setHTTPResolver(i);else{var o=S.dirname(e);n=new T.Project(o,r,i)}return n}function h(e,t,n){if(void 0===n&&(n=!1),t=t||{},!e)return null;var r=null,i=null;e.isRAMLUnit?r=e:(i=e,r=i.lowLevel().unit());var a=r.contents(),o=E.ramlFirstLine(a);if(!o)throw new Error(\"Invalid first line. A RAML document is expected to start with '#%RAML <version> <?fragment type>'.\");var s,u=o[1];o[2];if(\"0.8\"==u?s=\"RAML08\":\"1.0\"==u&&(s=\"RAML10\"),!s)throw new Error(\"Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'\");if(\"RAML08\"==s&&n)throw new Error(\"Extensions and overlays are not supported in RAML 0.8.\");var c=M(s);c.type(void 0);return i||(i=E.fromUnit(r),t.reusedNode&&t.reusedNode.lowLevel().unit().absolutePath()==r.absolutePath()&&g(i,t.reusedNode)&&i.setReusedNode(t.reusedNode)),i}function y(e){var t=new Error(\"Api contains errors.\");return t.parserErrors=E.toParserErrors(e.errors(),e),t}function _(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var r=M(\"RAML10\"),i=r.type(k.Universe10.Api.name),a=new T.Project(e),o=[];return a.units().forEach(function(e){var r=e.ast();t&&(r=C.toChildCachingNode(r));var a=new b.ApiImpl(new E.ASTNodeImpl(r,null,i,null));n&&(a=N.expandTraitsAndResourceTypes(a)),o.push(a)}),o}function g(e,t){if(!t)return!1;for(var n=e.lowLevel().unit().contents(),r=t.lowLevel().unit().contents(),i=Math.min(n.length,r.length),a=-1,o=0;o<i;o++)if(n.charAt(o)!=r.charAt(o)){a=o;break}for(;a>0&&\"\"==n.charAt(a).replace(/\\s/,\"\");)a--;a<0&&n.length!=r.length&&(a=i);var s=D.deepFindNode(t,a,a+1);if(!s)return!0;if(s.lowLevel().unit().absolutePath()!=e.lowLevel().unit().absolutePath())return!0;var u=s.isElement()?s.asElement():s.parent();if(!u)return!0;var c=u.property();if(!c)return!0;if(I.isAnnotationsProperty(c)&&(u=u.parent()),!u)return!0;for(var l=u;l;){var p=l.definition();if(I.isResourceTypeType(p)||I.isTraitType(p))return!1;var f=l.property();if(!f)return!0;if(I.isTypeDeclarationDescendant(p)&&(I.isTypesProperty(f)||I.isAnnotationTypesProperty(f)))return!1;var d=f.range();if(I.isResourceTypeRefType(d)||I.isTraitRefType(d))return!1;l=l.parent()}return!0}function v(e,t){t=t||{},null!=t.attributeDefaults&&e?e.setAttributeDefaults(t.attributeDefaults):e&&e.setAttributeDefaults(!0)}var b=n(34),S=n(11),A=n(84),T=n(9),E=n(4),C=n(9),N=n(25),w=n(59),k=n(3),x=n(141),R=n(328),I=n(5),D=n(21),M=n(88);t.load=r,t.loadSync=i,t.loadApi=a,t.loadRAML=o,t.loadRAMLHL=s,t.loadApiAsync=c,t.loadRAMLAsync=l,t.loadRAMLAsyncHL=p,t.getLanguageElementByRuntimeType=f,t.toError=y,t.loadApis1=_},function(e,t,n){\"use strict\";function r(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"Method\");return x.createStubNode(n,null,e)}function i(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"StringTypeDeclaration\");return x.createStubNode(n,null,e)}function a(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"BooleanTypeDeclaration\");return x.createStubNode(n,null,e)}function o(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"NumberTypeDeclaration\");return x.createStubNode(n,null,e)}function s(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"IntegerTypeDeclaration\");return x.createStubNode(n,null,e)}function u(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"DateTypeDeclaration\");return x.createStubNode(n,null,e)}function c(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"FileTypeDeclaration\");return x.createStubNode(n,null,e)}function l(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"XMLBody\");return x.createStubNode(n,null,e)}function p(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"JSONBody\");return x.createStubNode(n,null,e)}function f(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"SecuritySchemePart\");return x.createStubNode(n,null,e)}function d(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"Trait\");return x.createStubNode(n,null,e)}function m(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"OAuth1SecuritySchemeSettings\");return x.createStubNode(n,null,e)}function h(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"OAuth2SecuritySchemeSettings\");return x.createStubNode(n,null,e)}function y(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"OAuth2SecurityScheme\");return x.createStubNode(n,null,e)}function _(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"OAuth1SecurityScheme\");return x.createStubNode(n,null,e)}function g(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"BasicSecurityScheme\");return x.createStubNode(n,null,e)}function v(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"DigestSecurityScheme\");return x.createStubNode(n,null,e)}function b(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"CustomSecurityScheme\");return x.createStubNode(n,null,e)}function S(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"GlobalSchema\");return x.createStubNode(n,null,e)}function A(e){var t=R.getUniverse(\"RAML08\"),n=t.type(\"DocumentationItem\");return x.createStubNode(n,null,e)}function T(e,t,n){return D.loadApi(e,t,n).getOrElse(null)}function E(e,t,n){return D.loadApi(e,t,n).getOrElse(null)}function C(e,t,n){return D.loadApiAsync(e,t,n)}function N(e,t,n){return D.loadRAMLAsync(e,t,n)}function w(e){return D.getLanguageElementByRuntimeType(e)}var k=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},x=n(36),R=n(0),I=n(29),D=n(85),M=n(319),P=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.version=function(){return e.prototype.attribute.call(this,\"version\",this.toString)},t.prototype.setVersion=function(e){return this.highLevel().attrOrCreate(\"version\").setValue(\"\"+e),this},t.prototype.baseUri=function(){return e.prototype.attribute.call(this,\"baseUri\",function(e){return new ke(e)})},t.prototype.baseUriParameters_original=function(){return e.prototype.elements.call(this,\"baseUriParameters\")},t.prototype.uriParameters=function(){return e.prototype.elements.call(this,\"uriParameters\")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,\"protocols\",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate(\"protocols\").setValue(\"\"+e),this},t.prototype.mediaType=function(){return e.prototype.attribute.call(this,\"mediaType\",function(e){return new Ce(e)})},t.prototype.schemas=function(){return e.prototype.elements.call(this,\"schemas\")},t.prototype.traits_original=function(){return e.prototype.elements.call(this,\"traits\")},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new le(e)})},t.prototype.securitySchemes=function(){return e.prototype.elements.call(this,\"securitySchemes\")},t.prototype.resourceTypes_original=function(){return e.prototype.elements.call(this,\"resourceTypes\")},t.prototype.resources=function(){return e.prototype.elements.call(this,\"resources\")},t.prototype.documentation=function(){return e.prototype.elements.call(this,\"documentation\")},t.prototype.wrapperClassName=function(){return\"ApiImpl\"},t.prototype.kind=function(){return\"Api\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Api\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ApiImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ApiImpl\"==r)return!0}return!1},t.prototype.RAMLVersion_original=function(){return\"RAML08\"},t.prototype.expand=function(){return M.expandTraitsAndResourceTypes(this)},t.prototype.traits=function(){return M.traitsPrimary(this)},t.prototype.allTraits=function(){return M.allTraits(this)},t.prototype.resourceTypes=function(){return M.resourceTypesPrimary(this)},t.prototype.allResourceTypes=function(){return M.allResourceTypes(this)},t.prototype.childResource=function(e){return M.childResource(this,e)},t.prototype.allResources=function(){return M.allResources(this)},t.prototype.baseUriParameters=function(){return M.baseUriParametersPrimary(this)},t.prototype.allBaseUriParameters=function(){return M.baseUriParameters(this)},t.prototype.allProtocols=function(){return M.allProtocols(this)},t.prototype.RAMLVersion=function(){return M.RAMLVersion(this)},t}(I.BasicNodeImpl);t.ApiImpl=P;var L=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"ValueTypeImpl\"},t.prototype.kind=function(){return\"ValueType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ValueType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"undefined.ValueTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"undefined.ValueTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"undefined\"},t.prototype.value=function(){return this.attr.value()},t}(I.AttributeNodeImpl);t.ValueTypeImpl=L;var O=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"AnyTypeImpl\"},t.prototype.kind=function(){return\"AnyType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AnyType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.AnyTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.AnyTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(L);t.AnyTypeImpl=O;var U=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"NumberTypeImpl\"},t.prototype.kind=function(){return\"NumberType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"NumberType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.NumberTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.NumberTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.value=function(){return this.attr.value()},t}(L);t.NumberTypeImpl=U;var F=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"BooleanTypeImpl\"},t.prototype.kind=function(){return\"BooleanType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BooleanType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.BooleanTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.BooleanTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.value=function(){return this.attr.value()},t}(L);t.BooleanTypeImpl=F;var B=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"ReferenceImpl\"},t.prototype.kind=function(){return\"Reference\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Reference\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ReferenceImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ReferenceImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.value=function(){return I.toStructuredValue(this.attr)},t.prototype.structuredValue=function(){return M.structuredValue(this)},t.prototype.name=function(){return M.referenceName(this)},t}(I.AttributeNodeImpl);t.ReferenceImpl=B;var K=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"ResourceTypeRefImpl\"},t.prototype.kind=function(){return\"ResourceTypeRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ResourceTypeRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ResourceTypeRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ResourceTypeRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.resourceType=function(){return M.referencedResourceType(this)},t}(B);t.ResourceTypeRefImpl=K;var V=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.methods=function(){return e.prototype.elements.call(this,\"methods\")},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new de(e)})},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",function(e){return new K(e)})},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new le(e)})},t.prototype.uriParameters=function(){return e.prototype.elements.call(this,\"uriParameters\")},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.baseUriParameters=function(){return e.prototype.elements.call(this,\"baseUriParameters\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"ResourceTypeImpl\"},t.prototype.kind=function(){return\"ResourceType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ResourceType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ResourceTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ResourceTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.parametrizedProperties=function(){return M.getTemplateParametrizedProperties(this)},t}(I.BasicNodeImpl);t.ResourceTypeImpl=V;var j=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.responses=function(){return e.prototype.elements.call(this,\"responses\")},t.prototype.body=function(){return e.prototype.elements.call(this,\"body\")},t.prototype.protocols=function(){return e.prototype.attributes.call(this,\"protocols\",this.toString)},t.prototype.setProtocols=function(e){return this.highLevel().attrOrCreate(\"protocols\").setValue(\"\"+e),this},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new le(e)})},t.prototype.baseUriParameters=function(){return e.prototype.elements.call(this,\"baseUriParameters\")},t.prototype.queryParameters=function(){return e.prototype.elements.call(this,\"queryParameters\")},t.prototype.headers=function(){return e.prototype.elements.call(this,\"headers\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"MethodBaseImpl\"},t.prototype.kind=function(){return\"MethodBase\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MethodBase\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.MethodBaseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.MethodBaseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(I.BasicNodeImpl);t.MethodBaseImpl=j;var W=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.code=function(){return e.prototype.attribute.call(this,\"code\",function(e){return new z(e)})},t.prototype.headers=function(){return e.prototype.elements.call(this,\"headers\")},t.prototype.body=function(){return e.prototype.elements.call(this,\"body\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"ResponseImpl\"},t.prototype.kind=function(){return\"Response\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Response\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ResponseImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ResponseImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.isOkRange=function(){return M.isOkRange(this)},t}(I.BasicNodeImpl);t.ResponseImpl=W;var q=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"StringTypeImpl\"},t.prototype.kind=function(){return\"StringType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StringType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.StringTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.StringTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.value=function(){return this.attr.value()},t}(L);t.StringTypeImpl=q;var z=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"StatusCodeStringImpl\"},t.prototype.kind=function(){return\"StatusCodeString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StatusCodeString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.StatusCodeStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.StatusCodeStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.StatusCodeStringImpl=z;var H=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",this.toString)},t.prototype.setType=function(e){return this.highLevel().attrOrCreate(\"type\").setValue(\"\"+e),this},t.prototype.location=function(){return e.prototype.attribute.call(this,\"location\",function(e){return new Y(e)})},t.prototype.required=function(){return e.prototype.attribute.call(this,\"required\",this.toBoolean)},t.prototype.setRequired=function(e){return this.highLevel().attrOrCreate(\"required\").setValue(\"\"+e),this},t.prototype.default=function(){return e.prototype.attribute.call(this,\"default\",this.toAny)},t.prototype.setDefault=function(e){return this.highLevel().attrOrCreate(\"default\").setValue(\"\"+e),this},t.prototype.example=function(){return e.prototype.attribute.call(this,\"example\",this.toString)},t.prototype.setExample=function(e){return this.highLevel().attrOrCreate(\"example\").setValue(\"\"+e),this},t.prototype.repeat=function(){return e.prototype.attribute.call(this,\"repeat\",this.toBoolean)},t.prototype.setRepeat=function(e){return this.highLevel().attrOrCreate(\"repeat\").setValue(\"\"+e),this},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"ParameterImpl\"},t.prototype.kind=function(){return\"Parameter\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Parameter\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ParameterImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ParameterImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(I.BasicNodeImpl);t.ParameterImpl=H;var Y=function(){function e(e){this.attr=e}return e.prototype.wrapperClassName=function(){return\"ParameterLocationImpl\"},e.prototype.kind=function(){return\"ParameterLocation\"},e.prototype.allKinds=function(){return[\"ParameterLocation\"]},e.prototype.allWrapperClassNames=function(){return[\"RAML08.ParameterLocationImpl\"]},e.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ParameterLocationImpl\"==r)return!0}return!1},e.prototype.RAMLVersion=function(){return\"RAML08\"},e}();t.ParameterLocationImpl=Y;var J=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"MarkdownStringImpl\"},t.prototype.kind=function(){return\"MarkdownString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MarkdownString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.MarkdownStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.MarkdownStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.MarkdownStringImpl=J;var G=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?i(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.pattern=function(){return e.prototype.attribute.call(this,\"pattern\",this.toString)},t.prototype.setPattern=function(e){return this.highLevel().attrOrCreate(\"pattern\").setValue(\"\"+e),this},t.prototype.enum=function(){return e.prototype.attributes.call(this,\"enum\",this.toString)},t.prototype.setEnum=function(e){return this.highLevel().attrOrCreate(\"enum\").setValue(\"\"+e),this},t.prototype.minLength=function(){return e.prototype.attribute.call(this,\"minLength\",this.toNumber)},t.prototype.setMinLength=function(e){return this.highLevel().attrOrCreate(\"minLength\").setValue(\"\"+e),this},t.prototype.maxLength=function(){return e.prototype.attribute.call(this,\"maxLength\",this.toNumber)},t.prototype.setMaxLength=function(e){return this.highLevel().attrOrCreate(\"maxLength\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"StringTypeDeclarationImpl\"},t.prototype.kind=function(){return\"StringTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"StringTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.StringTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.StringTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(H);t.StringTypeDeclarationImpl=G;var X=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?a(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"BooleanTypeDeclarationImpl\"},t.prototype.kind=function(){return\"BooleanTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BooleanTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.BooleanTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.BooleanTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(H);t.BooleanTypeDeclarationImpl=X;var $=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?o(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.minimum=function(){return e.prototype.attribute.call(this,\"minimum\",this.toNumber)},t.prototype.setMinimum=function(e){return this.highLevel().attrOrCreate(\"minimum\").setValue(\"\"+e),this},t.prototype.maximum=function(){return e.prototype.attribute.call(this,\"maximum\",this.toNumber)},t.prototype.setMaximum=function(e){return this.highLevel().attrOrCreate(\"maximum\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"NumberTypeDeclarationImpl\"},t.prototype.kind=function(){return\"NumberTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"NumberTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.NumberTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.NumberTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(H);t.NumberTypeDeclarationImpl=$;var Q=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?s(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"IntegerTypeDeclarationImpl\"},t.prototype.kind=function(){return\"IntegerTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"IntegerTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.IntegerTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.IntegerTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}($);t.IntegerTypeDeclarationImpl=Q;var Z=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?u(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"DateTypeDeclarationImpl\"},t.prototype.kind=function(){return\"DateTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DateTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.DateTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.DateTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(H);t.DateTypeDeclarationImpl=Z;var ee=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?c(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"FileTypeDeclarationImpl\"},t.prototype.kind=function(){return\"FileTypeDeclaration\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FileTypeDeclaration\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.FileTypeDeclarationImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.FileTypeDeclarationImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(H);t.FileTypeDeclarationImpl=ee;var te=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.schema=function(){return e.prototype.attribute.call(this,\"schema\",function(e){return new ne(e)})},t.prototype.example=function(){return e.prototype.attribute.call(this,\"example\",function(e){return new ae(e)})},t.prototype.formParameters=function(){return e.prototype.elements.call(this,\"formParameters\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"BodyLikeImpl\"},t.prototype.kind=function(){return\"BodyLike\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BodyLike\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.BodyLikeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.BodyLikeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.schemaContent=function(){return M.schemaContent(this)},t}(I.BasicNodeImpl);t.BodyLikeImpl=te;var ne=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"SchemaStringImpl\"},t.prototype.kind=function(){return\"SchemaString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SchemaString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.SchemaStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.SchemaStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.SchemaStringImpl=ne;var re=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"JSonSchemaStringImpl\"},t.prototype.kind=function(){return\"JSonSchemaString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"JSonSchemaString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.JSonSchemaStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.JSonSchemaStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(ne);t.JSonSchemaStringImpl=re;var ie=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"XMLSchemaStringImpl\"},t.prototype.kind=function(){return\"XMLSchemaString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"XMLSchemaString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.XMLSchemaStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.XMLSchemaStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(ne);t.XMLSchemaStringImpl=ie;var ae=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"ExampleStringImpl\"},t.prototype.kind=function(){return\"ExampleString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"ExampleString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ExampleStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ExampleStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.ExampleStringImpl=ae;var oe=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"JSONExampleImpl\"},t.prototype.kind=function(){return\"JSONExample\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"JSONExample\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.JSONExampleImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.JSONExampleImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(ae);t.JSONExampleImpl=oe;var se=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"XMLExampleImpl\"},t.prototype.kind=function(){return\"XMLExample\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"XMLExample\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.XMLExampleImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.XMLExampleImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(ae);t.XMLExampleImpl=se;var ue=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?l(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.schema=function(){return e.prototype.attribute.call(this,\"schema\",function(e){return new ie(e)})},t.prototype.wrapperClassName=function(){return\"XMLBodyImpl\"},t.prototype.kind=function(){return\"XMLBody\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"XMLBody\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.XMLBodyImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.XMLBodyImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(te);t.XMLBodyImpl=ue;var ce=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?p(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.schema=function(){return e.prototype.attribute.call(this,\"schema\",function(e){return new re(e)})},t.prototype.wrapperClassName=function(){return\"JSONBodyImpl\"},t.prototype.kind=function(){return\"JSONBody\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"JSONBody\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.JSONBodyImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.JSONBodyImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(te);t.JSONBodyImpl=ce;var le=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"SecuritySchemeRefImpl\"},t.prototype.kind=function(){return\"SecuritySchemeRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemeRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.SecuritySchemeRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.SecuritySchemeRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.securitySchemeName=function(){return M.securitySchemeName(this)},t.prototype.securityScheme=function(){return M.securityScheme(this)},t}(B);t.SecuritySchemeRefImpl=le;var pe=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",this.toString)},t.prototype.setType=function(e){return this.highLevel().attrOrCreate(\"type\").setValue(\"\"+e),this},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.describedBy=function(){return e.prototype.element.call(this,\"describedBy\")},t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"AbstractSecuritySchemeImpl\"},t.prototype.kind=function(){return\"AbstractSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"AbstractSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.AbstractSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.AbstractSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(I.BasicNodeImpl);t.AbstractSecuritySchemeImpl=pe;var fe=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?f(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new de(e)})},t.prototype.headers=function(){return e.prototype.elements.call(this,\"headers\")},t.prototype.queryParameters=function(){return e.prototype.elements.call(this,\"queryParameters\")},t.prototype.responses=function(){return e.prototype.elements.call(this,\"responses\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"SecuritySchemePartImpl\"},t.prototype.kind=function(){return\"SecuritySchemePart\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemePart\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.SecuritySchemePartImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.SecuritySchemePartImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(j);t.SecuritySchemePartImpl=fe;var de=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"TraitRefImpl\"},t.prototype.kind=function(){return\"TraitRef\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"TraitRef\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.TraitRefImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.TraitRefImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.trait=function(){return M.referencedTrait(this)},t}(B);t.TraitRefImpl=de;var me=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?d(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.name=function(){return e.prototype.attribute.call(this,\"name\",this.toString)},t.prototype.setName=function(e){return this.highLevel().attrOrCreate(\"name\").setValue(\"\"+e),this},t.prototype.usage=function(){return e.prototype.attribute.call(this,\"usage\",this.toString)},t.prototype.setUsage=function(e){return this.highLevel().attrOrCreate(\"usage\").setValue(\"\"+e),this},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"TraitImpl\"},t.prototype.kind=function(){return\"Trait\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Trait\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.TraitImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.TraitImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.parametrizedProperties=function(){return M.getTemplateParametrizedProperties(this)},t}(j);t.TraitImpl=me;var he=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(I.BasicNodeImpl);t.SecuritySchemeSettingsImpl=he;var ye=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?m(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.requestTokenUri=function(){return e.prototype.attribute.call(this,\"requestTokenUri\",function(e){return new _e(e)})},t.prototype.authorizationUri=function(){return e.prototype.attribute.call(this,\"authorizationUri\",function(e){return new _e(e)})},t.prototype.tokenCredentialsUri=function(){return e.prototype.attribute.call(this,\"tokenCredentialsUri\",function(e){return new _e(e)})},t.prototype.wrapperClassName=function(){return\"OAuth1SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"OAuth1SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth1SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.OAuth1SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.OAuth1SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(he);t.OAuth1SecuritySchemeSettingsImpl=ye;var _e=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"FixedUriImpl\"},t.prototype.kind=function(){return\"FixedUri\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FixedUri\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.FixedUriImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.FixedUriImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.FixedUriImpl=_e;var ge=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?h(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.accessTokenUri=function(){return e.prototype.attribute.call(this,\"accessTokenUri\",function(e){return new _e(e)})},t.prototype.authorizationUri=function(){return e.prototype.attribute.call(this,\"authorizationUri\",function(e){return new _e(e)})},t.prototype.authorizationGrants=function(){return e.prototype.attributes.call(this,\"authorizationGrants\",this.toString)},t.prototype.setAuthorizationGrants=function(e){return this.highLevel().attrOrCreate(\"authorizationGrants\").setValue(\"\"+e),this},t.prototype.scopes=function(){return e.prototype.attributes.call(this,\"scopes\",this.toString)},t.prototype.setScopes=function(e){return this.highLevel().attrOrCreate(\"scopes\").setValue(\"\"+e),this},t.prototype.wrapperClassName=function(){return\"OAuth2SecuritySchemeSettingsImpl\"},t.prototype.kind=function(){return\"OAuth2SecuritySchemeSettings\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth2SecuritySchemeSettings\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.OAuth2SecuritySchemeSettingsImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.OAuth2SecuritySchemeSettingsImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(he);t.OAuth2SecuritySchemeSettingsImpl=ge;var ve=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?y(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"OAuth2SecuritySchemeImpl\"},t.prototype.kind=function(){return\"OAuth2SecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth2SecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.OAuth2SecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.OAuth2SecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(pe);t.OAuth2SecuritySchemeImpl=ve;var be=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?_(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.settings=function(){return e.prototype.element.call(this,\"settings\")},t.prototype.wrapperClassName=function(){return\"OAuth1SecuritySchemeImpl\"},t.prototype.kind=function(){return\"OAuth1SecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"OAuth1SecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.OAuth1SecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.OAuth1SecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(pe);t.OAuth1SecuritySchemeImpl=be;var Se=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?g(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"BasicSecuritySchemeImpl\"},t.prototype.kind=function(){return\"BasicSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"BasicSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.BasicSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.BasicSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(pe);t.BasicSecuritySchemeImpl=Se;var Ae=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?v(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"DigestSecuritySchemeImpl\"},t.prototype.kind=function(){return\"DigestSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DigestSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.DigestSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.DigestSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(pe);t.DigestSecuritySchemeImpl=Ae;var Te=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?b(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.wrapperClassName=function(){return\"CustomSecuritySchemeImpl\"},t.prototype.kind=function(){return\"CustomSecurityScheme\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"CustomSecurityScheme\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.CustomSecuritySchemeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.CustomSecuritySchemeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(pe);t.CustomSecuritySchemeImpl=Te;var Ee=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?r(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.method=function(){return e.prototype.attribute.call(this,\"method\",this.toString)},t.prototype.setMethod=function(e){return this.highLevel().attrOrCreate(\"method\").setValue(\"\"+e),this},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new de(e)})},t.prototype.wrapperClassName=function(){return\"MethodImpl\"},t.prototype.kind=function(){return\"Method\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Method\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.MethodImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.MethodImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.parentResource=function(){return M.parentResource(this)},t.prototype.ownerApi=function(){return M.ownerApi(this)},t.prototype.methodId=function(){return M.methodId(this)},t.prototype.allSecuredBy=function(){return M.allSecuredBy(this)},t}(j);t.MethodImpl=Ee;var Ce=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"MimeTypeImpl\"},t.prototype.kind=function(){return\"MimeType\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"MimeType\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.MimeTypeImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.MimeTypeImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.MimeTypeImpl=Ce;var Ne=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"UriTemplateImpl\"},t.prototype.kind=function(){return\"UriTemplate\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"UriTemplate\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.UriTemplateImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.UriTemplateImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(q);t.UriTemplateImpl=Ne;var we=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"RelativeUriStringImpl\"},t.prototype.kind=function(){return\"RelativeUriString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"RelativeUriString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.RelativeUriStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.RelativeUriStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(Ne);t.RelativeUriStringImpl=we;var ke=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"FullUriTemplateStringImpl\"},t.prototype.kind=function(){return\"FullUriTemplateString\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"FullUriTemplateString\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.FullUriTemplateStringImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.FullUriTemplateStringImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(Ne);t.FullUriTemplateStringImpl=ke;var xe=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.wrapperClassName=function(){return\"RAMLSimpleElementImpl\"},t.prototype.kind=function(){return\"RAMLSimpleElement\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"RAMLSimpleElement\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.RAMLSimpleElementImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.RAMLSimpleElementImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(I.BasicNodeImpl);t.RAMLSimpleElementImpl=xe;var Re=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?A(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.title=function(){return e.prototype.attribute.call(this,\"title\",this.toString)},t.prototype.setTitle=function(e){return this.highLevel().attrOrCreate(\"title\").setValue(\"\"+e),this},t.prototype.content=function(){return e.prototype.attribute.call(this,\"content\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"DocumentationItemImpl\"},t.prototype.kind=function(){return\"DocumentationItem\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"DocumentationItem\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.DocumentationItemImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.DocumentationItemImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(xe);t.DocumentationItemImpl=Re;var Ie=function(e){function t(t,n){void 0===n&&(n=!0),e.call(this,\"string\"==typeof t?S(t):t,n),this.nodeOrKey=t,this.setAsTopLevel=n}return k(t,e),t.prototype.key=function(){return e.prototype.attribute.call(this,\"key\",this.toString)},t.prototype.setKey=function(e){return this.highLevel().attrOrCreate(\"key\").setValue(\"\"+e),this},t.prototype.value=function(){return e.prototype.attribute.call(this,\"value\",function(e){return new ne(e)})},t.prototype.wrapperClassName=function(){return\"GlobalSchemaImpl\"},t.prototype.kind=function(){return\"GlobalSchema\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"GlobalSchema\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.GlobalSchemaImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.GlobalSchemaImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t}(xe);t.GlobalSchemaImpl=Ie;var De=function(e){function t(){e.apply(this,arguments)}return k(t,e),t.prototype.relativeUri=function(){return e.prototype.attribute.call(this,\"relativeUri\",function(e){return new we(e)})},t.prototype.type=function(){return e.prototype.attribute.call(this,\"type\",function(e){return new K(e)})},t.prototype.is=function(){return e.prototype.attributes.call(this,\"is\",function(e){return new de(e)})},t.prototype.securedBy=function(){return e.prototype.attributes.call(this,\"securedBy\",function(e){return new le(e)})},t.prototype.uriParameters_original=function(){return e.prototype.elements.call(this,\"uriParameters\")},t.prototype.methods=function(){return e.prototype.elements.call(this,\"methods\")},t.prototype.resources=function(){return e.prototype.elements.call(this,\"resources\")},t.prototype.displayName=function(){return e.prototype.attribute.call(this,\"displayName\",this.toString)},t.prototype.setDisplayName=function(e){return this.highLevel().attrOrCreate(\"displayName\").setValue(\"\"+e),this},t.prototype.baseUriParameters=function(){return e.prototype.elements.call(this,\"baseUriParameters\")},t.prototype.description=function(){return e.prototype.attribute.call(this,\"description\",function(e){return new J(e)})},t.prototype.wrapperClassName=function(){return\"ResourceImpl\"},t.prototype.kind=function(){return\"Resource\"},t.prototype.allKinds=function(){return e.prototype.allKinds.call(this).concat(\"Resource\")},t.prototype.allWrapperClassNames=function(){return e.prototype.allWrapperClassNames.call(this).concat(\"RAML08.ResourceImpl\")},t.isInstance=function(e){if(null!=e&&e.allWrapperClassNames&&\"function\"==typeof e.allWrapperClassNames)for(var t=0,n=e.allWrapperClassNames();t<n.length;t++){var r=n[t];if(\"RAML08.ResourceImpl\"==r)return!0}return!1},t.prototype.RAMLVersion=function(){return\"RAML08\"},t.prototype.completeRelativeUri=function(){return M.completeRelativeUri(this)},t.prototype.absoluteUri=function(){return M.absoluteUri(this)},t.prototype.parentResource=function(){return M.parent(this)},t.prototype.childResource=function(e){return M.childResource(this,e)},t.prototype.childMethod=function(e){return M.childMethod(this,e)},t.prototype.ownerApi=function(){return M.ownerApi(this)},t.prototype.uriParameters=function(){return M.uriParametersPrimary(this)},t.prototype.allUriParameters=function(){return M.uriParameters(this)},t.prototype.absoluteUriParameters=function(){return M.absoluteUriParameters(this)},t.prototype.allSecuredBy=function(){return M.allSecuredBy(this)},t}(I.BasicNodeImpl);t.ResourceImpl=De,t.loadApiSync=T,t.loadRAMLSync=E,t.loadApi=C,t.loadRAML=N,t.getLanguageElementByRuntimeType=w},function(e,t,n){\"use strict\";function r(e){return\"Api\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function i(e){return\"LibraryBase\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function a(e){return\"Annotable\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function o(e){return\"AnnotationRef\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function s(e){return\"Reference\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function u(e){return\"ValueType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function c(e){return\"StringType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function l(e){return\"UriTemplate\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function p(e){return\"RelativeUriString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function f(e){return\"FullUriTemplateString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function d(e){return\"StatusCodeString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function m(e){return\"FixedUriString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function h(e){return\"ContentType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function y(e){return\"MarkdownString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function _(e){return\"SchemaString\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function g(e){return\"MimeType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function v(e){return\"AnyType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function b(e){return\"NumberType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function S(e){return\"IntegerType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function A(e){return\"NullType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function T(e){return\"TimeOnlyType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function E(e){return\"DateOnlyType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function C(e){return\"DateTimeOnlyType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function N(e){return\"DateTimeType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function w(e){return\"FileType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function k(e){return\"BooleanType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function x(e){return\"AnnotationTarget\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function R(e){return\"TraitRef\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function I(e){return\"Trait\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function D(e){return\"MethodBase\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function M(e){return\"Operation\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function P(e){return\"TypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function L(e){return\"ModelLocation\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function O(e){return\"LocationKind\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function U(e){return\"ExampleSpec\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function F(e){return\"UsesDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function B(e){return\"XMLFacetInfo\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function K(e){return\"ArrayTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function V(e){return\"UnionTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function j(e){return\"ObjectTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function W(e){return\"StringTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function q(e){return\"BooleanTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function z(e){return\"NumberTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function H(e){return\"IntegerTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function Y(e){return\"DateOnlyTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function J(e){return\"TimeOnlyTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function G(e){return\"DateTimeOnlyTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function X(e){return\"DateTimeTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function $(e){return\"FileTypeDeclaration\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function Q(e){return\"Response\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function Z(e){return\"SecuritySchemePart\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ee(e){return\"SecuritySchemeRef\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function te(e){return\"AbstractSecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ne(e){return\"SecuritySchemeSettings\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function re(e){return\"OAuth1SecuritySchemeSettings\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ie(e){return\"OAuth2SecuritySchemeSettings\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ae(e){return\"OAuth2SecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function oe(e){return\"OAuth1SecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function se(e){return\"PassThroughSecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ue(e){return\"BasicSecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ce(e){return\"DigestSecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function le(e){return\"CustomSecurityScheme\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function pe(e){return\"Method\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function fe(e){return\"ResourceTypeRef\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function de(e){return\"ResourceType\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function me(e){return\"ResourceBase\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function he(e){return\"Resource\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ye(e){return\"DocumentationItem\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function _e(e){return\"Library\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ge(e){return\"Overlay\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function ve(e){return\"Extension\"==e.kind()&&\"RAML10\"==e.RAMLVersion()}function be(e){return null==e.highLevel().parent()}function Se(e){return be(e)?e:null}t.isApi=r,t.isLibraryBase=i,t.isAnnotable=a,t.isAnnotationRef=o,t.isReference=s,t.isValueType=u,t.isStringType=c,t.isUriTemplate=l,t.isRelativeUriString=p,t.isFullUriTemplateString=f,t.isStatusCodeString=d,t.isFixedUriString=m,t.isContentType=h,t.isMarkdownString=y,t.isSchemaString=_,t.isMimeType=g,t.isAnyType=v,t.isNumberType=b,t.isIntegerType=S,t.isNullType=A,t.isTimeOnlyType=T,t.isDateOnlyType=E,t.isDateTimeOnlyType=C,t.isDateTimeType=N,t.isFileType=w,t.isBooleanType=k,t.isAnnotationTarget=x,t.isTraitRef=R,t.isTrait=I,t.isMethodBase=D,t.isOperation=M,t.isTypeDeclaration=P,t.isModelLocation=L,t.isLocationKind=O,t.isExampleSpec=U,t.isUsesDeclaration=F,t.isXMLFacetInfo=B,t.isArrayTypeDeclaration=K,t.isUnionTypeDeclaration=V,t.isObjectTypeDeclaration=j,t.isStringTypeDeclaration=W,t.isBooleanTypeDeclaration=q,t.isNumberTypeDeclaration=z,t.isIntegerTypeDeclaration=H,t.isDateOnlyTypeDeclaration=Y,t.isTimeOnlyTypeDeclaration=J,t.isDateTimeOnlyTypeDeclaration=G,t.isDateTimeTypeDeclaration=X,t.isFileTypeDeclaration=$,t.isResponse=Q,t.isSecuritySchemePart=Z,t.isSecuritySchemeRef=ee,t.isAbstractSecurityScheme=te,t.isSecuritySchemeSettings=ne,t.isOAuth1SecuritySchemeSettings=re,t.isOAuth2SecuritySchemeSettings=ie,t.isOAuth2SecurityScheme=ae,t.isOAuth1SecurityScheme=oe,t.isPassThroughSecurityScheme=se,t.isBasicSecurityScheme=ue,t.isDigestSecurityScheme=ce,t.isCustomSecurityScheme=le,t.isMethod=pe,t.isResourceTypeRef=fe,t.isResourceType=de,t.isResourceBase=me,t.isResource=he,t.isDocumentationItem=ye,t.isLibrary=_e,t.isOverlay=ge,t.isExtension=ve,t.isFragment=be,t.asFragment=Se},function(e,t,n){\"use strict\";var r=n(0);e.exports=r.getUniverse},function(e,t,n){\"use strict\";function r(e){return e.highLevel().localType()}function i(e){return e.highLevel().localType()}function a(e){var t=new Ie.Project(Me.dirname(e)),n=t.unit(Me.basename(e));return n&&n.isRAMLUnit()?ge.fromUnit(n).wrapperNode():null}function o(e){var t=\"\",n=e;do{e=n,t=e.relativeUri().value()+t,n=e.parent()}while(n.definition().key().name==Te.Universe10.Resource.name);return t}function s(e,t){return void 0===t&&(t=!1),t?c(e):u(e)}function u(e){var t=e.highLevel().lowLevel();return ke.LowLevelProxyNode.isInstance(t)?e:(null!=e.highLevel().reusedNode()?we:Ne).expandTraitsAndResourceTypes(e)}function c(e){return(null!=e.highLevel().reusedNode()?we:Ne).expandLibraries(e)}function l(e){var t=\"\",n=e;do{e=n,t=e.relativeUri().value()+t,n=e.parent()}while(n.definition().key().name==Te.Universe10.Resource.name);t=t.replace(/\\/\\//g,\"/\");var r=n.baseUri(),i=r?r.value():\"\";return i=i?i:\"\",Ce.stringEndsWith(i,\"/\")&&(t=t.substring(1)),t=i+t}function p(e,t){return e.runtimeType().validate(t).map(function(e){return e.getMessage()})}function f(e,t){return e.runtimeType().validate(t)}function d(e){return m(e)}function m(e){return e.highLevel().lowLevel().actual().libExpanded?e.traits_original():_(e,function(e){return Pe.isTraitType(e)})}function h(e){return y(e)}function y(e){return e.highLevel().lowLevel().actual().libExpanded?e.resourceTypes_original():_(e,function(e){return Pe.isResourceTypeType(e)})}function _(e,t){var n=Re.globalDeclarations(e.highLevel()).filter(function(e){return t(e.definition())}),r=e.highLevel().lowLevel(),i=r.includePath();i||(i=r.unit().path());var a=ke.LowLevelProxyNode.isInstance(e.highLevel().lowLevel()),o=a?new Ne.TraitsAndResourceTypesExpander:null;return n.map(function(t){var n,r=t.lowLevel().unit().path();return a&&(ke.LowLevelProxyNode.isInstance(t.lowLevel())||(t=o.createHighLevelNode(t,!1)),(new xe.ReferencePatcher).process(t,e.highLevel(),!0,!0)),r!=i?(n=me.buildWrapperNode(t,!1),n.meta().setCalculated()):n=t.wrapperNode(),n})}function g(e){var t=[],n=e;do{e=n,t.push(e.relativeUri().value()),n=e.parent()}while(n.definition().key().name==Te.Universe10.Resource.name);return t.reverse()}function v(e){return de.ResourceImpl.isInstance(e.parent())?e.parent():null}function b(e){var t=e.parent();return t.definition().key().name==Te.Universe10.Resource.name?t:null}function S(e,t){if(null==e)return null;var n=e.resources();return n?(n=n.filter(function(e){return e.relativeUri().value()==t}),0==n.length?null:n[0]):null}function A(e,t){if(!e)return null;for(var n=null,r=0;r<t.length;r++){if(!(n=S(e,t[r])))return null;e=n}return n}function T(e,t){return e?e.methods().filter(function(e){return e.method()==t}):null}function E(e,t,n){var r=A(e,t);return r?T(r,n):null}function C(e){return Pe.isApiSibling(e.definition())}function N(e){for(var t=e;!C(t);)t=t.parent();return t}function w(e){var t=e.parent();if(de.ResourceImpl.isInstance(t))return o(t)+\" \"+e.method().toLowerCase();if(de.ResourceTypeImpl.isInstance(t))return t.name()+\" \"+e.method().toLowerCase();throw new Error(\"Method is supposed to be owned by Resource or ResourceType.\\nHere the method is owned by \"+e.definition().key().name)}function k(e){var t=e.code().value();if(null!=ve.validateResponseString(t))return!1;try{if(parseInt(t.charAt(0))<4)return!0}catch(e){}return!1}function x(e){var t=[],n=function(e){t.push(e),e.resources().forEach(function(e){return n(e)})};return e.resources().forEach(function(e){return n(e)}),t}function R(e,t){for(var n={};null!=t;)D(t).forEach(function(e){return n[e.name()]=new Be(e)}),t=b(t);var r=ye.ramlPathMatch(o(t),n,{})(e);return r?new Ee(Object.keys(r.params).map(function(e){return new Fe(e,r.params[e])})):Ee.empty()}function I(e){return D(e)}function D(e){var t=e.uriParameters_original();return de.ResourceImpl.isInstance(e)?ce(t,e.relativeUri().value(),e,Te.Universe10.ResourceBase.properties.uriParameters.name):t}function M(e){return P(e)}function P(e){var t=e.baseUri()?e.baseUri().value():\"\";return ce(e.baseUriParameters_original(),t,e,Te.Universe10.Api.properties.baseUriParameters.name)}function L(e){var t=[],n=e;do{e=n,t=D(e).concat(t),n=e.parent()}while(n.definition().key().name==Te.Universe10.Resource.name);var r=n;r.baseUriParameters();return t=P(r).concat(t)}function O(e){return U(e)}function U(e){return e.protocols().map(function(e){return e.toUpperCase()})}function F(e){return B(e)}function B(e){return e.securedBy()}function K(e){var t=e.highLevel();if(!t)return\"\";var n=t.value();return n?n.toString():\"\"}function V(e){var t=e.highLevel();if(!t)return null;var n=Re.findDeclarationByNode(t,Re.LocationKind.VALUE_COMPLETION);if(!n)return null;if(!n.getKind||n.getKind()!=_e.NodeKind.NODE)return null;var r=n.wrapperNode();return de.AbstractSecuritySchemeImpl.isInstance(r)?r:null}function j(e){return e.highLevel().definition().universe().version()}function W(e){var t=e.value().lowLevel(),n=null,r=t.highLevelParseResult();if(r){var i=null,a=!1;if(r.isAttr()?(a=Pe.isAnnotationsProperty(r.property()),i=r.parent().types()):r.isElement()&&(i=r.asElement().types()),i){var o=e.name();if(o.indexOf(\".\")>=0){n=(a?i.getAnnotationTypeRegistry():i.getTypeRegistry()).get(o)}else n=a?i.getAnnotationType(o):i.getType(o)}}return new he.TypeInstanceImpl(t,n)}function q(e){var t=e.highLevel().value();return\"string\"==typeof t||null==t?t:t.valueName()}function z(e){return J(e)}function H(e){return J(e)}function Y(e){return J(e)}function J(e){var t=e.highLevel(),n=t.parent(),r=e.name(),i=Re.referenceTargets(t.property(),n).filter(function(e){return ge.qName(e,n)==r});return 0==i.length?null:i[0].wrapperNode()}function G(e,t,n,r){void 0===r&&(r=!0);var i=t.lowLevel(),a=t.definition().property(n?\"example\":\"examples\"),o=Se.getUniverse(\"RAML10\"),s=o.type(Ae.Universe10.ExampleSpec.name);return e.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==n}).map(function(e){var n=e.asJSON(),o=e.isSingle()?\"example\":null,u=i.unit(),c=new De.AstNode(u,n,i,null,o),l=r?new ge.ASTNodeImpl(c,t,s,a):t,p=e.annotations(),f=Oe(p,c,l,u),d=e.scalarsAnnotations(),m={};return Object.keys(d).forEach(function(e){return m[e]=Oe(d[e],c,l,u)}),new Ke(l,e,f,{description:function(){return m.description||[]},displayName:function(){return m.displayName||[]},strict:function(){return m.strict||[]}})})}function X(e,t){void 0===t&&(t=!1);var n=e.runtimeDefinition();return n?G(n,e.highLevel(),t):[]}function $(e){var t=X(e,!0);return t.length>0?t[0]:null}function Q(e){return X(e)}function Z(e){var t=e.runtimeDefinition(),n=t.fixedFacets();if(e.kind()==Ae.Universe10.UnionTypeDeclaration.name)for(var r=t.allFixedBuiltInFacets(),i=0,a=Object.keys(r);i<a.length;i++){var o=a[i];n[o]=r[o]}else for(var s=Object.keys(n),u=0,c=s;u<c.length;u++){var o=c[u];null==t.facet(o)&&delete n[o]}if(0==Object.keys(n).length)return null;var l=new De.AstNode(null,n);return new he.TypeInstanceImpl(l)}function ee(e){var t=e.highLevel().attributes(Se.universesInfo.Universe10.TypeDeclaration.properties.type.name);if(0==t.filter(function(e){return ge.StructuredValue.isInstance(e.value())}).length)return e.type_original().map(function(e){return null===e||\"NULL\"===e||\"Null\"===e?\"string\":e});var n=!1,r=t.map(function(e){var t=e.value();return null==t?null:\"string\"==typeof t?t:(ge.StructuredValue.isInstance(t)&&(n=!0),t.toString())});return n?null:r}function te(e){var t=!1,n=e.highLevel().attributes(Se.universesInfo.Universe10.TypeDeclaration.properties.schema.name);if(t)return null;if(0==n.filter(function(e){return ge.StructuredValue.isInstance(e.value())}).length)return e.schema_original();var r=n.map(function(e){var n=e.value();return\"string\"==typeof n?n:(ge.StructuredValue.isInstance(n)&&(t=!0),n.toString())});return t?null:r}function ne(e){var t=e.highLevel().attributes(Se.universesInfo.Universe10.TypeDeclaration.properties.type.name);t=t.concat(e.highLevel().attributes(Se.universesInfo.Universe10.TypeDeclaration.properties.schema.name));for(var n=t.map(function(e){return e.value()}),r=0,i=n;r<i.length;r++){var a=i[r];if(ge.StructuredValue.isInstance(a)){return new he.TypeInstanceImpl(a.lowLevel())}}return null}function re(e){for(var t=e.highLevel().attributes(Se.universesInfo.Universe10.ArrayTypeDeclaration.properties.items.name),n=t.map(function(e){return e.value()}),r=0,i=n;r<i.length;r++){var a=i[r];if(ge.StructuredValue.isInstance(a)){return new he.TypeInstanceImpl(a.lowLevel())}}return null}function ie(e){var t=e.value(),n=e.highLevel().lowLevel().unit().resolve(t),r=n.highLevel(),i=r.asElement();if(i){var a=i.wrapperNode();return fe.isLibrary(a)?(a.setAttributeDefaults(e.attributeDefaults()),a):null}return null}function ae(e){var t=e.highLevel().attributes(Se.universesInfo.Universe10.ArrayTypeDeclaration.properties.items.name);if(0==t.filter(function(e){return ge.StructuredValue.isInstance(e.value())}).length)return e.items_original().map(function(e){return null===e||\"NULL\"===e||\"Null\"===e?\"string\":e});var n=!1,r=t.map(function(e){var t=e.value();return null==t?null:\"string\"==typeof t?t:(ge.StructuredValue.isInstance(t)&&(n=!0),t.toString())});return n?null:r}function oe(e){var t=e.highLevel();if(!t)return null;var n=t.attr(Te.Universe10.TypeDeclaration.properties.type.name);if(null==n)return null;var r=n.lowLevel();if(null==r)return null;var i=n.value();if(!i||\"string\"!=typeof i)return null;var a=r.end()-i.length+1,o=n.lowLevel().unit();if(!o)return null;var s=Re.findDeclaration(o,a);return s&&s.getKind&&s.getKind()==_e.NodeKind.NODE&&Pe.isTypeDeclarationSibling(s.definition())?s.wrapperNode():null}function se(e){var t=e.runtimeType();if(!t)return null;if(!t.isArray()||!t.componentType)return null;var n=t,r=n.componentType();if(!r)return null;var i=Re.getNominalTypeSource(r);if(!i)return null;var a=i.getSource();return a&&a.isElement()&&Pe.isTypeDeclarationSibling(a.definition())?a.wrapperNode():null}function ue(e){var t=e.items_original();if(t&&\"string\"!=typeof t&&(!Array.isArray(t)||0!=t.length)){var n=e.highLevel(),r=Ae.Universe10.ArrayTypeDeclaration.properties.items.name,i=n.attr(r),a=n.definition().universe().type(Ae.Universe10.TypeDeclaration.name),o=n.definition().universe().type(Ae.Universe10.ArrayTypeDeclaration.name),s=new ge.ASTNodeImpl(i.lowLevel(),n,a,o.property(r));s.patchType(Le.doDescrimination(s))}var u=se(e);return u?u:oe(e)}function ce(e,t,n,r){if(\"string\"!=typeof t)return[];var i=n.highLevel(),a=i.definition(),o=a.property(r);if(!t)return[];var s={};e.forEach(function(e){var t=s[e.name()];t||(t=[],s[e.name()]=t),t.push(e)});for(var u=[],c=0,l={},p=t.indexOf(\"{\");p>=0&&!((c=t.indexOf(\"}\",++p))<0);p=t.indexOf(\"{\",c)){var f=t.substring(p,c);if(l[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var d=a.universe(),m=d.type(Ae.Universe10.StringTypeDeclaration.name),h=be.createStubNode(m,null,f,i.lowLevel().unit()),y=me.buildWrapperNode(h),_=y.highLevel();_.setParent(i),y.meta().setCalculated(),y.setName(f),_.patchProp(o),u.push(y)}}return Object.keys(s).filter(function(e){return!l[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function le(e){if(e.kind()==Ae.Universe10.Method.name||Pe.isTypeDeclarationSibling(e.definition())){for(var t=!1,n=e.highLevel().parent();null!=n;){var r=n.definition();if(Pe.isResourceTypeType(r)||Pe.isTraitType(r)){t=!0;break}n=n.parent()}if(!t)return null}var i=e.highLevel();if(null==i)return null;var a=i.lowLevel();if(null==a)return null;var o=a.children().filter(function(e){var t=e.key();return!!t&&((\"(\"!=t.charAt(0)||\")\"!=t.charAt(t.length-1))&&t.indexOf(\"<<\")>=0)});return 0==o.length?null:new he.TypeInstanceImpl(o)}var pe=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},fe=n(87),de=n(34),me=n(140),he=n(29),ye=n(324),_e=n(24),ge=n(4),ve=n(35),be=n(36),Se=n(0),Ae=n(3),Te=n(3),Ee=n(84),Ce=n(15),Ne=n(25),we=n(59),ke=n(17),xe=n(61),Re=n(21),Ie=n(9),De=n(62),Me=n(11),Pe=n(5),Le=n(46);t.resolveType=r,t.runtimeType=i,t.load=a,t.completeRelativeUri=o,t.expandSpec=s,t.expandTraitsAndResourceTypes=u,t.expandLibraries=c,t.absoluteUri=l,t.validateInstance=p,t.validateInstanceWithDetailedStatuses=f,t.traitsPrimary=d,t.allTraits=m,t.resourceTypesPrimary=h,t.allResourceTypes=y,t.relativeUriSegments=g,t.parentResource=v,t.parent=b,t.childResource=S,t.getResource=A,t.childMethod=T,t.getMethod=E,t.ownerApi=N,t.methodId=w,t.isOkRange=k,t.allResources=x,t.matchUri=R;t.uriParametersPrimary=I,t.uriParameters=D,t.baseUriParametersPrimary=M,t.baseUriParameters=P,t.absoluteUriParameters=L,t.protocolsPrimary=O,t.allProtocols=U,t.securedByPrimary=F,t.allSecuredBy=B,t.securitySchemeName=K,t.securityScheme=V,t.RAMLVersion=j,t.structuredValue=W,t.referenceName=q,t.referencedTrait=z,t.referencedAnnotation=H,t.referencedResourceType=Y;var Oe=function(e,t,n,r){var i=[];if(e)for(var a=Se.getUniverse(\"RAML10\"),o=a.type(\"Annotable\").property(\"annotations\"),s=0,u=Object.keys(e);s<u.length;s++){var c=u[s],l=e[c],p=new De.AstNode(r,l.value(),t,null,\"(\"+c+\")\"),f=new ge.ASTPropImpl(p,n,o.range(),o),d=new de.AnnotationRefImpl(f);i.push(d)}return i};t.examplesFromNominal=G,t.getTypeExample=$,t.getTypeExamples=Q,t.typeFixedFacets=Z,t.typeValue=ee,t.schemaValue=te,t.typeStructuredValue=ne,t.itemsStructuredValue=re,t.referencedNode=ie,t.getItems=ae,t.findComponentTypeDeclaration=ue,t.getTemplateParametrizedProperties=le;var Ue=function(){function e(e,t){this._content=e,this._name=t}return e.prototype.name=function(){return this._name},e.prototype.content=function(){return this._content},e}();t.SchemaDef=Ue;var Fe=function(){function e(e,t){this.key=e,this.value=t}return e}();t.ParamValue=Fe;var Be=function(){function e(e){this._param=e,this.description=e.description()?e.description().value():this.description,this.displayName=e.displayName(),this.type=e.type().length>0?e.type()[0]:\"string\",this.example=e.example(),this.required=e.required(),this.default=e.default()}return e}(),Ke=function(e){function t(t,n,r,i){e.call(this,t),this.expandable=n,this._annotations=r,this._scalarAnnotations=i}return pe(t,e),t.prototype.value=function(){return this.expandable.asString()},t.prototype.structuredValue=function(){var e;e=this.expandable.isJSONString()||this.expandable.isYAML()?this.expandable.asJSON():this.expandable.original();var t=this._node.lowLevel(),n=this.expandable.isSingle()?\"example\":null,r=new De.AstNode(t.unit(),e,t,null,n);return new he.TypeInstanceImpl(r)},t.prototype.strict=function(){return this.expandable.strict()},t.prototype.description=function(){var e=this.expandable.description();if(null==e&&null!==e)return null;var t=be.createAttr(this._node.definition().property(Ae.Universe10.ExampleSpec.properties.description.name),e);return new de.MarkdownStringImpl(t)},t.prototype.name=function(){return this.expandable.name()},t.prototype.displayName=function(){return this.expandable.displayName()},t.prototype.annotations=function(){return this._annotations},t.prototype.scalarsAnnotations=function(){return this._scalarAnnotations},t.prototype.uses=function(){return e.prototype.elements.call(this,\"uses\")},t}(he.BasicNodeImpl);t.ExampleSpecImpl=Ke},function(e,t){e.exports={34:{code:\"34\",message:\"\"},1104:{code:\"1104\",message:\"\"},1105:{code:\"1105\",message:\"\"},1106:{code:\"1106\",message:\"\"},1107:{code:\"1107\",message:\"\"},1108:{code:\"1108\",message:\"\"},1109:{code:\"1109\",message:\"\"},1110:{code:\"1110\",message:\"\"},CONTEXT_REQUIREMENT_VIOLATION:{code:\"CONTEXT_REQUIREMENT_VIOLATION\",message:\"{{v1}} should be {{v2}} to use type {{v3}}\"},INVALID_PARAMETER_NAME:{code:\"INVALID_PARAMETER_NAME\",message:\"Invalid parameter name: '{{paramName}}' is reserved\"},UNUSED_PARAMETER:{code:\"UNUSED_PARAMETER\",message:\"Unused parameter: '{{paramName}}'\"},INVALID_PROPERTY_OWNER_TYPE:{code:\"INVALID_PROPERTY_OWNER_TYPE\",message:\"Property '{{propName}}' can only be used if type is {{namesStr}}\"},NODE_KEY_IS_A_MAP:{code:\"NODE_KEY_IS_A_MAP\",message:\"Node key can not be a map\"},NODE_KEY_IS_A_SEQUENCE:{code:\"NODE_KEY_IS_A_SEQUENCE\",message:\"Node key can not be a sequence\"},SEQUENCE_REQUIRED:{code:\"SEQUENCE_REQUIRED\",message:\"Node: '{{name}}' should be wrapped in sequence\"},PROPERTY_MUST_BE_A_MAP_10:{code:\"PROPERTY_MUST_BE_A_MAP_10\",message:\"'{{propName}}' should be a map in RAML 1.0\"},PROPERTY_MUST_BE_A_MAP:{code:\"PROPERTY_MUST_BE_A_MAP\",message:\"Property '{{propName}}' should be a map\"},PROPERTY_MUST_BE_A_SEQUENCE:{code:\"PROPERTY_MUST_BE_A_SEQUENCE\",message:\"Property '{{propName}}' should be a sequence\"},INVALID_PROPERTY_RANGE:{code:\"INVALID_PROPERTY_RANGE\",message:\"Property '{{propName}}' must be a {{range}}\"},MAP_REQUIRED:{code:\"MAP_REQUIRED\",message:\"should be a map in RAML 1.0\"},UNRESOLVED_REFERENCE:{code:\"UNRESOLVED_REFERENCE\",message:\"Reference: '{{ref}}' can not be resolved\"},SCALAR_PROHIBITED:{code:\"SCALAR_PROHIBITED\",message:\"Property '{{propName}}' can not have scalar value\"},UNKNOWN_NODE:{code:\"UNKNOWN_NODE\",message:\"Unknown node: '{{name}}'\"},RECURSIVE_DEFINITION:{code:\"RECURSIVE_DEFINITION\",message:\"Recursive definition: '{{name}}'\"},PROPERTY_ALREADY_SPECIFIED:{code:\"PROPERTY_ALREADY_SPECIFIED\",message:\"'{{propName}}' is already specified.`\"},ISSUES_IN_THE_LIBRARY:{code:\"ISSUES_IN_THE_LIBRARY\",message:\"Issues in the used library: '{{value}}'\"},INVALID_LIBRARY_PATH:{code:\"INVALID_LIBRARY_PATH\",message:\"Can not resolve library from path: '{{path}}'\"},EMPTY_FILE:{code:\"EMPTY_FILE\",message:\"Empty file: {{path}}\"},SPACES_IN_KEY:{code:\"SPACES_IN_KEY\",message:\"Keys should not have spaces '{{value}}'\"},INCLUDE_ERROR:{code:\"INCLUDE_ERROR\",message:\"{{msg}}\"},PATH_EXCEEDS_ROOT:{code:\"PATH_EXCEEDS_ROOT\",message:\"Resolved include path exceeds file system root\"},ILLEGAL_PATTERN:{code:\"ILLEGAL_PATTERN\",message:\"Illegal pattern: '{{value}}'\"},UNKNOWN_FUNCTION:{code:\"UNKNOWN_FUNCTION\",message:\"Unknown function applied to parameter: '{{transformerName}}'\"},REQUEST_BODY_DISABLED:{code:\"REQUEST_BODY_DISABLED\",message:\"Request body is disabled for '{{methodName}}' method.\"},SCALAR_EXPECTED:{code:\"SCALAR_EXPECTED\",message:\"Scalar is expected here\"},STRING_EXPECTED:{code:\"STRING_EXPECTED\",message:\"Property '{{propName}}' must be a string\"},UNKNOWN_ANNOTATION:{code:\"UNKNOWN_ANNOTATION\",message:\"Unknown annotation: '{{aName}}'\"},STRING_EXPECTED_2:{code:\"STRING_EXPECTED_2\",message:\"{{propName}} value should be a string\"},SECUREDBY_LIST_08:{code:\"SECUREDBY_LIST_08\",message:\"'securedBy' should be a list in RAML08\"},INVALID_ANNOTATION_LOCATION:{code:\"INVALID_ANNOTATION_LOCATION\",message:\"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}\"},BOOLEAN_EXPECTED:{code:\"BOOLEAN_EXPECTED\",message:\"'true' or 'false' is expected here\"},NUMBER_EXPECTED:{code:\"NUMBER_EXPECTED\",message:\"Value of '{{propName}}' must be a number\"},STRING_EXPECTED_3:{code:\"STRING_EXPECTED_3\",message:\"'{{propName}}' must be a string\"},STATUS_MUST_BE_3NUMBER:{code:\"STATUS_MUST_BE_3NUMBER\",message:\"Status code should be 3 digits number.\"},EMPTY_VALUE_NOT_ALLOWED:{code:\"EMPTY_VALUE_NOT_ALLOWED\",message:\"Empty value is not allowed here\"},INVALID_VALUE_SCHEMA:{code:\"INVALID_VALUE_SCHEMA\",message:\"Invalid value schema: '{{iValue}}'\"},INVALID_VALUE:{code:\"INVALID_VALUE\",message:\"Invalid value: '{{iValue}}'. Allowed values are: {{aValues}}\"},SCHEMA_EXCEPTION:{code:\"SCHEMA_EXCEPTION\",message:\"Schema exception: {{msg}}\"},SCHEMA_ERROR:{code:\"SCHEMA_ERROR\",message:\"{{msg}}\"},MISSING_VERSION:{code:\"MISSING_VERSION\",message:\"Missing 'version'\"},URI_PARAMETER_NAME_MISSING:{code:\"URI_PARAMETER_NAME_MISSING\",message:\"URI parameter must have name specified\"},URI_EXCEPTION:{code:\"URI_EXCEPTION\",message:\"{{msg}}\"},INVALID_MEDIATYPE:{code:\"INVALID_MEDIATYPE\",message:\"Invalid media type '{{mediaType}}'\"},MEDIATYPE_EXCEPTION:{code:\"MEDIATYPE_EXCEPTION\",message:\"{{msg}}\"},FORM_IN_RESPONSE:{code:\"FORM_IN_RESPONSE\",message:\"Form related media types can not be used in responses\"},UNUSED_URL_PARAMETER:{code:\"UNUSED_URL_PARAMETER\",message:\"Unused url parameter {{paramName}}\"},UNRECOGNIZED_ELEMENT:{code:\"UNRECOGNIZED_ELEMENT\",message:\"Unrecognized {{referencedToName}}: '{{ref}}'.\"},TYPES_VARIETY_RESTRICTION:{code:\"TYPES_VARIETY_RESTRICTION\",message:\"Type can be either of: string, number, integer, file, date or boolean\"},UNRECOGNIZED_SECURITY_SCHEME:{code:\"UNRECOGNIZED_SECURITY_SCHEME\",message:\"Unrecognized security scheme type: '{{ref}}'. Allowed values are: 'OAuth 1.0', 'OAuth 2.0', 'Basic Authentication', 'DigestSecurityScheme Authentication', 'x-{other}'\"},DUPLICATE_TRAIT_REFERENCE:{code:\"DUPLICATE_TRAIT_REFERENCE\",message:\"Duplicate trait reference: '{{refValue}}'.\"},IS_IS_ARRAY:{code:\"IS_IS_ARRAY\",message:\"Property 'is' must be an array\"},RESOURCE_TYPE_NAME:{code:\"RESOURCE_TYPE_NAME\",message:\"Resource type name must be provided\"},MULTIPLE_RESOURCE_TYPES:{code:\"MULTIPLE_RESOURCE_TYPES\",message:\"A resource or resourceType can inherit from a single resourceType\"},UNKNOWN_RAML_VERSION:{code:\"UNKNOWN_RAML_VERSION\",message:\"Unknown version of RAML expected to see one of '#%RAML 0.8' or '#%RAML 1.0'\"},UNKNOWN_TOPL_LEVEL_TYPE:{code:\"UNKNOWN_TOPL_LEVEL_TYPE\",message:\"Unknown top level type: '{{typeName}}'\"},REDUNDANT_FRAGMENT_NAME:{code:\"REDUNDANT_FRAGMENT_NAME\",message:\"Redundant fragment name: '{{typeName}}'\"},WEB_FORMS:{code:\"WEB_FORMS\",message:\"File type can be only used in web forms\"},MISSING_REQUIRED_PROPERTY:{code:\"MISSING_REQUIRED_PROPERTY\",message:\"Missing required property '{{propName}}'\"},VALUE_NOT_PROVIDED:{code:\"VALUE_NOT_PROVIDED\",message:\"Value is not provided for parameter: '{{propName}}'\"},SUSPICIOUS_DOUBLEQUOTE:{code:\"SUSPICIOUS_DOUBLEQUOTE\",message:'Suspicious double quoted multiline scalar, it is likely that you forgot closing \"{{value}}'},ANNOTATION_TARGET_MUST_BE_A_STRING:{code:\"ANNOTATION_TARGET_MUST_BE_A_STRING\",message:\"Annotation target must be set by a string\"},ALLOWED_TARGETS_MUST_BE_ARRAY:{code:\"ALLOWED_TARGETS_MUST_BE_ARRAY\",message:\"'allowedTargets' property value must be an array of type names or a single type name\"},UNSUPPORTED_ANNOTATION_TARGET:{code:\"UNSUPPORTED_ANNOTATION_TARGET\",message:\"Unsupported annotation target: '{{aTarget}}'\"},SCHEMA_NAME_MUST_BE_STRING:{code:\"SCHEMA_NAME_MUST_BE_STRING\",message:\"Schema '{{name}}' must be a string\"},FORM_PARAMS_IN_RESPONSE:{code:\"FORM_PARAMS_IN_RESPONSE\",message:\"Form parameters can not be used in response\"},FORM_PARAMS_WITH_EXAMPLE:{code:\"FORM_PARAMS_WITH_EXAMPLE\",message:\"'formParameters' property cannot be used together with the 'example' or 'schema' properties\"},AUTHORIZATION_GRANTS_ENUM:{code:\"AUTHORIZATION_GRANTS_ENUM\",message:\"'authorizationGrants' value should be one of 'authorization_code', 'implicit', 'password', 'client_credentials' or to be an abolute URI\"},AUTHORIZATION_URI_REQUIRED:{code:\"AUTHORIZATION_URI_REQUIRED\",message:\"'authorizationUri' is required when `authorization_code` or `implicit` grant type are used \"},REPEATING_COMPONENTS_IN_ENUM:{code:\"REPEATING_COMPONENTS_IN_ENUM\",message:\"'enum' value contains repeating components\"},INTEGER_EXPECTED:{code:\"INTEGER_EXPECTED\",message:\"Integer is expected\"},NUMBER_EXPECTED_2:{code:\"NUMBER_EXPECTED_2\",message:\"Number is expected\"},RESOURCE_TYPE_NULL:{code:\"RESOURCE_TYPE_NULL\",message:\"Resource type can not be null\"},SCALAR_PROHIBITED_2:{code:\"SCALAR_PROHIBITED_2\",message:\"Node '{{name}}' can not be a scalar\"},VERSION_NOT_ALLOWED:{code:\"VERSION_NOT_ALLOWED\",message:\"'version' parameter not allowed here\",comment:\"I dont like the message, but its coming from JS 0.8 parser @Denis\"},INVALID_OVERLAY_NODE:{code:\"INVALID_OVERLAY_NODE\",message:\"The '{{nodeId}}' node does not match any node of the master api.\"},INVALID_OVERRIDE_IN_OVERLAY:{code:\"INVALID_OVERRIDE_IN_OVERLAY\",message:\"Property '{{propName}}' is not allowed to be overriden or added in overlays\"},KEYS_SHOULD_BE_UNIQUE:{code:\"KEYS_SHOULD_BE_UNIQUE\",message:\"Keys should be unique\"},ALREADY_EXISTS:{code:\"ALREADY_EXISTS\",message:\"{{capitalized}} '{{name}}' already exists\"},ALREADY_EXISTS_IN_CONTEXT:{code:\"ALREADY_EXISTS_IN_CONTEXT\",message:\"{{name}}' already exists in this context\"},PROPERTY_USED:{code:\"PROPERTY_USED\",message:\"Property already used: '{{propName}}'\"},PARENT_PROPERTY_USED:{code:\"PARENT_PROPERTY_USED\",message:\"{{parent}} property already used: '{{propName}}'\"},INVALID_JSON_SCHEMA:{code:\"INVALID_JSON_SCHEMA\",message:\"Invalid JSON schema. Unexpected value '{{propName}}'\"},EXAMPLE_SCHEMA_FAILURE:{code:\"EXAMPLE_SCHEMA_FAILURE\",message:\"Example does not conform to schema: {{msg}}\"},CAN_NOT_PARSE_JSON:{code:\"CAN_NOT_PARSE_JSON\",message:\"Can not parse JSON: {{msg}}\"},CAN_NOT_PARSE_XML:{code:\"CAN_NOT_PARSE_XML\",message:\"Can not parse XML: {{msg}}\"},OPTIONAL_SCLARAR_PROPERTIES_10:{code:\"OPTIONAL_SCLARAR_PROPERTIES_10\",message:\"Optional scalar properties are not allowed in {{templateNamePlural}} and their descendants: '{{propName}}?'\"},OPTIONAL_PROPERTIES_10:{code:\"OPTIONAL_PROPERTIES_10\",message:\"Optional properties are not allowed in '{{propName}}': '{{oPropName}}'\"},ONLY_METHODS_CAN_BE_OPTIONAL:{code:\"ONLY_METHODS_CAN_BE_OPTIONAL\",message:\"Only method nodes can be optional\"},PROPERTY_UNUSED:{code:\"PROPERTY_UNUSED\",message:\"{{propName}} unused\"},CYCLE_IN_DEFINITION:{code:\"CYCLE_IN_DEFINITION\",message:\"{{typeName}} definition contains cycle: {{cycle}}\"},SEQUENCE_NOT_ALLOWED_10:{code:\"SEQUENCE_NOT_ALLOWED_10\",message:\"In RAML 1.0 {{propName}} is not allowed to have sequence as definition\"},MAP_EXPECTED:{code:\"MAP_EXPECTED\",message:\"Map is expected here\"},ERROR_IN_INCLUDED_FILE:{code:\"ERROR_IN_INCLUDED_FILE\",message:\"Error in the included file: {{msg}}\"},NODE_SHOULD_HAVE_VALUE:{code:\"NODE_SHOULD_HAVE_VALUE\",message:\"node should have at least one member value\"},NAMED_PARAMETER_NEEDS_TYPE:{code:\"NAMED_PARAMETER_NEEDS_TYPE\",message:\"named parameter needs at least one type\"},ENUM_IS_EMPTY:{code:\"ENUM_IS_EMPTY\",message:\"enum is empty\"},ENUM_MUST_BE_AN_ARRAY:{code:\"ENUM_MUST_BE_AN_ARRAY\",message:\"the value of enum must be an array\"},DEFINITION_SHOULD_BE_A_MAP:{code:\"DEFINITION_SHOULD_BE_A_MAP\",message:\"{{typeName}} definition should be a map\"},RESOURCES_SHARE_SAME_URI:{code:\"RESOURCES_SHARE_SAME_URI\",message:\"Resources share same URI\"},TYPES_AND_SCHEMAS_ARE_EXCLUSIVE:{code:\"TYPES_AND_SCHEMAS_ARE_EXCLUSIVE\",message:\"'types' and 'schemas' are mutually exclusive\"},TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS:{code:\"TEMPLATE_PARAMETER_NAME_MUST_CONTAIN_NONWHITESPACE_CHARACTERS\",message:\"Trait or resource type parameter name must contain non whitespace characters\"},INVALID_SECURITY_SCHEME_SCOPE:{code:\"INVALID_SECURITY_SCHEME_SCOPE\",message:\"The '{{invalidScope}}' scope is not allowed for the '{{securityScheme}}' security scheme. Allowed scopes are: {{allowedScopes}}.\"}}},function(e,t,n){\"use strict\";function r(e,t,n,r){return void 0===n&&(n=b.builtInRegistry()),_(e,new M(null,t,!1,r),n)}function i(e,t,n){return void 0===t&&(t=b.builtInRegistry()),u(new M(null,e,!1,n),t)}function a(e){return\"?\"==e.charAt(e.length-1)}function o(e,t){return void 0===t&&(t=b.builtInRegistry()),u(new M(null,e,!1,e.provider&&e.provider()),t)}function s(e){return new U(e)}function u(e,t){var n=new L;if(e.anchor){if(e.anchor().__$$)return e.anchor().__$$;e.anchor().__$$=n}var r=e.childWithKey(\"types\");r&&r.kind()===D.ARRAY&&(r=s(r));var i=e.childWithKey(\"schemas\");i&&i.kind()===D.ARRAY&&(i=s(i));var a=new O(r,i,t,n);r&&r.kind()!==D.SCALAR&&r.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=b.derive(e.key(),[b.REFERENCE]);n.add(t),a.addType(t)}),i&&i.kind()!==D.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){var t=b.derive(e.key(),[b.REFERENCE]);n.add(t),a.addType(t)});var o=e.childWithKey(\"uses\");o&&o.kind()===D.ARRAY&&(o=s(o)),o&&o.kind()===D.MAP&&o.children().forEach(function(e){n.addLibrary(e.key(),u(e,t))}),r&&r.kind()!==D.SCALAR&&r.children().filter(function(e){return e.key()&&!0}).forEach(function(e){a.get(e.key())}),i&&i.kind()!==D.SCALAR&&i.children().filter(function(e){return e.key()&&!0}).forEach(function(e){a.get(e.key())}),a.types().forEach(function(e){return n.add(e)});var r=e.childWithKey(\"annotationTypes\");return r&&r.kind()===D.ARRAY&&(r=s(r)),null!=r&&r.kind()===D.MAP&&r.children().forEach(function(e){n.addAnnotationType(_(e.key(),e,a,!1,!0,!1))}),n}function c(e,t){var n=new P,r=!1,i=e.childWithKey(\"required\");if(i){var o=i.value();\"boolean\"==typeof o&&(r=!0),o===!1&&(n.optional=!0,n.id=e.key())}var s=e.key();return!r&&a(e.key())&&(s=s.substr(0,s.length-1),n.optional=!0),0==s.length||\"/.*/\"===s?n.additonal=!0:\"/\"==s.charAt(0)&&\"/\"==s.charAt(s.length-1)&&(s=s.substring(1,s.length-1),n.regExp=!0),n.type=_(null,e,t,!1,!1,!1),n.id=s,n}function l(e){var t=new F;t.name=e.name(),t.superTypes=e.superTypes().map(function(e){return d(e)}),t.annotations=[],t.customFacets=[],t.facetDeclarations=[],t.basicFacets=[],t.properties=[];var n={};return e.declaredMeta().forEach(function(e){if(e instanceof w.Annotation)t.annotations.push(e);else if(e instanceof w.CustomFacet)t.customFacets.push(e);else if(e instanceof w.NotScalar)t.notAScalar=!0;else if(e instanceof k.FacetDeclaration)t.facetDeclarations.push(e);else if(e instanceof T.HasProperty)if(n.hasOwnProperty(e.value()))n[e.value()].optional=!1;else{var r=new P;r.optional=!1,r.id=e.value(),r.type=b.ANY,n[e.value()]=r}else if(e instanceof T.AdditionalPropertyIs){var r=new P;r.optional=!1,r.id=\"/.*/\",r.additonal=!0,r.type=e.value(),n[\"/.*/\"]=r}else if(e instanceof T.MapPropertyIs){var r=new P;r.optional=!1,r.id=e.regexpValue(),r.regExp=!0,r.type=e.value(),n[e.regexpValue()]=r}else if(e instanceof T.PropertyIs)if(n.hasOwnProperty(e.propertyName()))n[e.propertyName()].type=e.value();else{var r=new P;r.optional=!0,r.id=e.propertyName(),r.type=e.value(),n[e.propertyName()]=r}else e instanceof T.KnownPropertyRestriction?t.additionalProperties=e.value():e instanceof w.DiscriminatorValue?e.isStrict()&&t.basicFacets.push(e):e instanceof w.HasPropertiesFacet||t.basicFacets.push(e)}),Object.keys(n).forEach(function(e){return t.properties.push(n[e])}),t}function p(e){return e instanceof E.AbstractType?l(e).toJSON():f(e)}function f(e){var t={},n={};e.types().forEach(function(e){n[e.name()]=p(e)}),Object.keys(n).length>0&&(t.types=n);var n={};return e.annotationTypes().forEach(function(e){n[e.name()]=p(e)}),Object.keys(n).length>0&&(t.annotationTypes=n),t}function d(e){if(e.isAnonymous()){if(e.isArray()){var t=e.oneMeta(T.ComponentShouldBeOfType);if(t){var n=t.value();return n.isAnonymous()&&n.isUnion()?\"(\"+d(n)+\")[]\":d(n)+\"[]\"}}return e.isUnion()?e.options().map(function(e){return d(e)}).join(\" | \"):e.superTypes().map(function(e){return d(e)}).join(\" , \")}return e.name()}function m(e,t){if(t===b.ANY||e===t||e.superTypes().some(function(e){return m(e,t)}))return!0;if(e.isUnion()&&e.options){var n=e.options();if(n.some(function(e){return m(e,t)}))return!0}if(t.isUnion()&&t.options){var n=t.options();if(n.some(function(t){return e==t}))return!0}return!1}function h(e,t){var n=e.requiredType(),r=e.requiredTypes();return r&&r.length>0?r.some(function(e){return m(t,e)}):m(t,n)}function y(e,t){for(var n=t.children(),r=0,i=n;r<i.length;r++){var a=i[r],o=a.key();if(o&&\"(\"==o.charAt(0)&&\")\"==o.charAt(o.length-1)){var s=o.substring(1,o.length-1),u=new w.Annotation(s,a.value());u.setOwnerFacet(e),e.addAnnotation(u)}}}function _(e,t,n,r,i,a,o){void 0===n&&(n=b.builtInRegistry()),void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===o&&(o=!1);var l=t.childWithKey(\"uses\");if(l&&(l.kind()===D.ARRAY&&(l=s(l)),l.kind()===D.MAP)){var p=new L;l.children().forEach(function(e){p.addLibrary(e.key(),u(e,b.builtInRegistry()))}),n=new O(null,null,n,p)}var f=t.contentProvider?t.contentProvider():null;if(t.kind()==D.SCALAR){var d,m=t.value();if(d=null==m||\"Null\"==m||\"NULL\"==m?b.STRING:C.parseToType(\"\"+m,n,f),null==e)return d;var v=b.derive(e,[d]);return n instanceof O&&(v=g(v,n)),v}if(t.kind()==D.ARRAY){var T=[];t.children().forEach(function(e){T.push(C.parseToType(\"\"+e.value(),n,f))});var v=b.derive(e,T);return n instanceof O&&(v=g(v,n)),v}var E=[],k=t.childWithKey(\"type\"),x=!1;k?t.childWithKey(\"schema\")&&(x=!0):k=t.childWithKey(\"schema\");var M=[];if(!k||o)E=r?t.childWithKey(\"properties\")?[b.OBJECT]:[b.ANY]:t.childWithKey(\"properties\")?[b.OBJECT]:[b.STRING];else{var P=[],U=k.childWithKey(\"value\");if(!U||U.kind()!=D.SCALAR&&U.kind()!=D.ARRAY||(P=[k.children().filter(function(e){var t=e.key();return!!t&&(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1))})],k=U),k.kind()==D.SCALAR){var m=k.value();if(null==m||\"Null\"==m||\"NULL\"==m)E=[b.STRING];else{var F=k.contentProvider?k.contentProvider():null;E=[C.parseToType(\"\"+m,n,f,F)]}}else k.kind()==D.ARRAY?E=k.children().map(function(e){var t=e.childWithKey(\"value\");return!t||t.kind()!=D.SCALAR&&t.kind()!=D.ARRAY?P.push([]):(P.push(e.children().filter(function(e){var t=e.key();return!!t&&(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1))})),e=t),e.value()}).map(function(e){return C.parseToType(\"\"+e,n,f)}):k.kind()==D.MAP&&(E=[_(\"\",k,n,!1,!1,!1)]);if(P.length>0&&P.filter(function(e){return e.length>0}).length>0)for(var B=0,K=P;B<K.length;B++){var V=K[B],j=[];M.push(j);for(var W=0,q=V;W<q.length;W++){var z=q[W],H=z.key(),Y=H.substring(1,H.length-1),J=new w.Annotation(Y,z.value());j.push(J)}}}for(var G=b.derive(e,E),X=0;X<M.length;X++){var $=M[X];G.addSupertypeAnnotation($,X)}n instanceof O&&(G=g(G,n));var Q=G,Z=null;if(t.children().forEach(function(e){var t=e.key();U=e.childWithKey(\"value\");var r=e;if(\"example\"!=t&&U&&(r=U),t&&\"type\"!==t&&\"uses\"!==t&&\"schema\"!==t&&(\"properties\"!=t&&\"additionalProperties\"!=t||!G.isSubTypeOf(b.OBJECT))){var a;if(\"items\"==t){if(G.isSubTypeOf(b.ARRAY)){var o=[];if(r.kind()==D.SCALAR){var s=r.value();o=null==s||\"Null\"==s||\"NULL\"==s?[b.STRING]:[C.parseToType(\"\"+s,n,f)]}else if(r.kind()==D.ARRAY){o=r.children().map(function(e){var t=e.childWithKey(\"value\");return!t||t.kind()!=D.SCALAR&&t.kind()!=D.ARRAY?P.push([]):(P.push(e.children().filter(function(e){var t=e.key();return!!t&&(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1))})),e=t),e.value()}).map(function(e){return C.parseToType(\"\"+e,n,f)});var u=b.error(S.ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE,Q);u.setValidationPath({name:\"items\"}),G.putExtra(A.PARSE_ERROR,u)}else r.kind()==D.MAP&&(o=[_(\"\",r,n,!1,!1,!1)]);var c=1==o.length?o[0]:b.derive(\"\",o);return a=new R.ComponentShouldBeOfType(c),Q.addMeta(a),Q.putExtra(A.HAS_ITEMS,!0),U&&y(a,e),a}}else{if(\"facets\"===t)return void(Z=t);if(\"default\"==t||\"xml\"==t||\"required\"==t)Z=t;else if(\"(\"==t.charAt(0)&&\")\"==t.charAt(t.length-1))return void G.addMeta(new w.Annotation(t.substr(1,t.length-2),r.value()));if((a=N.getInstance().buildFacet(t,r.value()))&&(\"format\"!=t||h(a,G)))a.setNode(r),G.addMeta(a);else if(i&&\"allowedTargets\"===t)G.addMeta(new w.AllowedTargets(r.value()));else{var l=new w.CustomFacet(t,r.value());l.setNode(r),G.addMeta(l)}}a&&y(a,e)}}),0==G.metaOfType(w.DiscriminatorValue).length&&G.addMeta(new w.DiscriminatorValue(G.name(),!1)),G.isSubTypeOf(b.OBJECT)){var ee=t.childWithKey(\"properties\"),te=!1;if(ee)if(G.addMeta(new w.HasPropertiesFacet),ee.kind()==D.MAP)ee.children().forEach(function(e){te=!0,c(e,n).add(G)});else{var ne=b.error(S.PROPERTIES_MAP,Q);ne.setValidationPath({name:\"properties\"}),G.putExtra(A.PARSE_ERROR,ne)}var re=t.childWithKey(\"additionalProperties\");if(re)if(U=re.childWithKey(\"value\"),U&&(re=U),\"boolean\"==typeof re.value())G.addMeta(new I.KnownPropertyRestriction(re.value()));else{var ne=b.error(S.ADDITIONAL_PROPERTIES_BOOLEAN,Q);ne.setValidationPath({name:\"additionalProperties\"}),G.putExtra(A.PARSE_ERROR,ne)}}var ee=t.childWithKey(\"facets\");if(ee)if(ee.kind()==D.MAP)ee.children().forEach(function(e){var t=c(e,n);G.addMeta(new w.FacetDeclaration(t.id,t.type,t.optional))});else{var ne=b.error(S.FACETS_MAP,Q);ne.setValidationPath({name:\"facets\"}),G.putExtra(A.PARSE_ERROR,ne)}return G.isAnonymous()&&G.isEmpty()&&1==G.superTypes().length?G.superTypes()[0]:(t.kind()!=D.SCALAR&&G.addMeta(new w.NotScalar),x&&Q.putExtra(b.SCHEMA_AND_TYPE,!0),Q.putExtra(b.GLOBAL,a),Q.putExtra(b.SOURCE_EXTRA,t),Q.putExtra(A.HAS_FACETS,Z),Q)}function g(e,t){for(var n,r=t;r&&!(n=r.typeMap()[e.name()]);)r=r.parent();return null!=n&&n.isSubTypeOf(b.REFERENCE)?null!=n&&n.isSubTypeOf(b.REFERENCE)&&(n.patch(e),e=n):t.addType(e),e.putExtra(A.TOP_LEVEL_EXTRA,!0),e}var v=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},b=n(6),S=b.messageRegistry,A=n(48),T=n(8),E=n(6),C=n(151),N=n(65),w=n(7),k=n(7),x=n(6),R=n(8),I=n(8);!function(e){e[e.SCALAR=0]=\"SCALAR\",e[e.ARRAY=1]=\"ARRAY\",e[e.MAP=2]=\"MAP\"}(t.NodeKind||(t.NodeKind={}));var D=t.NodeKind,M=function(){function e(e,t,n,r){void 0===n&&(n=!1),this._key=e,this.obj=t,this.inArr=n,this.provider=r}return e.prototype.value=function(){return this.obj},e.prototype.key=function(){if(!this._key&&this.kind()===D.MAP&&this.inArr){var e=Object.keys(this.obj);if(1===e.length)return e[0]}return this._key},e.prototype.childWithKey=function(t){return null==this.obj?null:this.obj.hasOwnProperty(t)?new e(t,this.obj[t],!1,this.contentProvider()):null},e.prototype.children=function(){var t=this;return Array.isArray(this.obj)?this.obj.map(function(n){return new e(null,n,!0,t.contentProvider())}):this.obj&&\"object\"==typeof this.obj?Object.keys(this.obj).map(function(n){return new e(n,t.obj[n],!1,t.provider)}):[]},e.prototype.kind=function(){return this.obj?Array.isArray(this.obj)?D.ARRAY:\"object\"==typeof this.obj?D.MAP:D.SCALAR:D.SCALAR},e.prototype.contentProvider=function(){return this.provider},e}();t.parseJSON=r,t.parseJSONTypeCollection=i;var P=function(){function e(){}return e.prototype.add=function(e){this.optional||this.additonal||this.regExp||this.type.isSubTypeOf(b.NIL)||e.addMeta(new T.HasProperty(this.id));var t;null!=(t=this.additonal?new T.AdditionalPropertyIs(this.type):this.regExp?new T.MapPropertyIs(this.id,this.type):new T.PropertyIs(this.id,this.type,this.optional))&&(e.addMeta(t),this.type instanceof b.InheritedType&&null==this.type.name()&&this.type.setContextMeta(t))},e}();t.PropertyBean=P;var L=function(){function e(){this._types=[],this._typeMap={},this.uses={},this._annotationTypes=[],this._annotationTypeMap={}}return e.prototype.library=function(e){return this.uses[e]},e.prototype.addLibrary=function(e,t){this.uses[e]=t},e.prototype.add=function(e){this._types.push(e),this._typeMap[e.name()]=e},e.prototype.getType=function(e){return this._typeMap.hasOwnProperty(e)?this._typeMap[e]:null},e.prototype.addAnnotationType=function(e){this._annotationTypes.push(e),this._annotationTypeMap[e.name()]=e},e.prototype.getAnnotationType=function(e){return this._annotationTypeMap.hasOwnProperty(e)?this._annotationTypeMap[e]:null},e.prototype.types=function(){return this._types},e.prototype.annotationTypes=function(){return this._annotationTypes},e.prototype.getAnnotationTypeRegistry=function(){var e=this,t=new x.TypeRegistry(b.builtInRegistry());return this.annotationTypes().forEach(function(e){return t.addType(e)}),Object.keys(this.uses).forEach(function(n){e.uses[n].annotationTypes().forEach(function(e){return t.put(n+\".\"+e.name(),e)})}),t},e.prototype.getTypeRegistry=function(){var e=this,t=new x.TypeRegistry(b.builtInRegistry());return this.types().forEach(function(e){return t.addType(e)}),Object.keys(this.uses).forEach(function(n){e.uses[n].types().forEach(function(e){return t.put(n+\".\"+e.name(),e)})}),t},e}();t.TypeCollection=L;var O=function(e){function t(t,n,r,i){e.call(this,r),this.toParse=t,this.schemas=n,this._c=i,this.parsing={}}return v(t,e),t.prototype.get=function(t){var n=e.prototype.get.call(this,t);if(!n||n.isSubTypeOf(b.REFERENCE)){var r=this.toParse?this.toParse.childWithKey(t):null;if(r||(r=this.schemas?this.schemas.childWithKey(t):null),r){if(this.parsing[t]){var i=b.derive(t,[b.RECURRENT]);return n&&n.isSubTypeOf(b.REFERENCE)?n.patch(i):n=i,n}this.parsing[t]=!0;try{var a=_(t,r,this)}finally{delete this.parsing[t]}return a}var o=t.indexOf(\".\");if(o!=-1){var s=t.substring(0,o),u=t.substr(o+1),c=this._c.library(s);if(c){var l=c.getType(u);if(l)return l}}}return n},t}(b.TypeRegistry);t.AccumulatingRegistry=O,t.parseTypes=o;var U=function(){function e(e){this.n=e}return e.prototype.key=function(){return null},e.prototype.value=function(){return null},e.prototype.childWithKey=function(e){for(var t=this.children(),n=0;n<t.length;n++)if(t[n].key()==e)return t[n];return null},e.prototype.children=function(){return this.n.children().map(function(e){var t=e.children();return 1==t.length?t[0]:e})},e.prototype.kind=function(){return D.MAP},e}();t.parseTypeCollection=u,t.parsePropertyBean=c;var F=function(){function e(){}return e.prototype.toJSON=function(){var e={};if(this.superTypes&&this.superTypes.length>0&&(1==this.superTypes.length?e.type=this.superTypes[0]:e.type=this.superTypes),this.customFacets&&this.customFacets.forEach(function(t){return e[t.facetName()]=t.value()}),this.annotations&&this.annotations.forEach(function(t){return e[\"(\"+t.facetName()+\")\"]=t.value()}),this.facetDeclarations&&this.facetDeclarations.length>0){var t={};this.facetDeclarations.forEach(function(e){var n=e.facetName();e.isOptional()&&(n+=\"?\");var r=null;r=e.type().isAnonymous()?e.type().isEmpty()?d(e.type()):l(e.type()).toJSON():d(e.type()),t[n]=r}),e.facets=t}if(this.properties&&this.properties.length>0){var n={};this.properties.forEach(function(e){var t=e.id;e.optional&&(t+=\"?\"),e.additonal&&(t=\"/.*/\"),e.regExp&&(t=\"/\"+t+\"/\");var r=null;r=e.type.isAnonymous()?e.type.isEmpty()?d(e.type):l(e.type).toJSON():d(e.type),n[t]=r}),e.properties=n}return this.basicFacets&&this.basicFacets.forEach(function(t){e[t.facetName()]=t.value()}),1==Object.keys(e).length&&!this.notAScalar&&e.type?e.type:(void 0!==this.additionalProperties&&(e.additionalProperties=this.additionalProperties),e)},e}();t.TypeProto=F,t.toProto=l,t.storeAsJSON=p,t.parse=_},function(e,t,n){\"use strict\";(function(e){function r(e,t){var n=T(t,e),r=!!y&&g.getValue(n);if(r&&r.provider)return r;var i=new S(e,t);return g.setValue(n,i),i}function i(e,t){var n=(T(t,e),!!y&&g.getValue(e));if(n)return n;var r=new A(e,t);return y&&g.setValue(e,r),r}function a(e,t){var n=T(t,e),r=!!y&&g.getValue(n);if(r)return r;try{var i=new S(e,t);return y&&g.setValue(n,i),i}catch(r){try{var i=new A(e,t);return y&&g.setValue(n,i),i}catch(e){return y&&g.setValue(n,new f.ValidationError(d.messageRegistry.CAN_NOT_PARSE_SCHEMA)),null}}}function o(e,t,n){null==n&&(n=s(e)),n.length>0&&(n+=\":\");for(var r=e.getElementsByTagName(n+t),i=[],a=0;a<r.length;a++){var o=r[a];o.parentNode===e&&i.push(o)}return i}function s(e){var t=\"\";if(e){var n=e;if(e.ownerDocument&&(n=e.ownerDocument),n){var r=n.documentElement;r&&(t=r.prefix)}}return t}var u=n(152),c=n(342),l=n(338),p=n(99).DOMParser,f=n(6),d=n(6),m=function(){function e(){}return e}();t.ValidationResult=m;var h={errorHandler:{warning:function(){return null},error:function(){return null},fatalError:function(){return null}}},y=!0,_=function(){function e(){this.errors={},this.size=0}return e.prototype.getValue=function(e){var t=this.errors[e];return t?t.value:null},e.prototype.setValue=function(e,t){var n=this.errors[e];if(n)n.value=t;else for(n={key:e,value:t},this.top&&(this.top.next=n),this.top=n,this.last||(this.last=n),this.errors[e]=n,this.size+=e.length;this.size>5242880&&this.last;){var r=this.last.key;delete this.errors[r],this.size-=r.length,this.last=this.last.next}},e}(),g=new _;e.cleanCache=function(){g=new _};var v=function(){function e(){}return e.prototype.contextPath=function(){return\"\"},e.prototype.normalizePath=function(e){return\"\"},e.prototype.content=function(e){return\"\"},e.prototype.hasAsyncRequests=function(){return!1},e.prototype.resolvePath=function(e,t){return\"\"},e.prototype.isAbsolutePath=function(e){return!1},e.prototype.contentAsync=function(e){var t=this;return{then:function(n){return n(t.content(e))},resolve:function(){return null}}},e.prototype.promiseResolve=function(e){return{then:function(t){return t(e)},resolve:function(){return null}}},e}(),b=function(e,t,n){return\"__EXAMPLE_\"+e+t+n},S=function(){function e(e,t){if(this.schema=e,this.provider=t,this.provider=t?t:new v,!e||0==e.trim().length||\"{\"!=e.trim().charAt(0))throw new f.ValidationError(d.messageRegistry.INVALID_JSON_SCHEMA);var r;try{var r=JSON.parse(e)}catch(e){throw new f.ValidationError(d.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e.message})}if(r){try{var i=n(50);this.setupId(r,this.provider.contextPath());(\"\"+r.$schema).indexOf(\"http://json-schema.org/draft-04/\")==-1?r=i.v4(r):this.fixRequired(r)}catch(e){throw new f.ValidationError(d.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,{msg:e.message})}delete r.$schema,this.jsonSchema=r}}return e.prototype.fixRequired=function(e){},e.prototype.getType=function(){return\"source.json\"},e.prototype.validateObject=function(e){this.validate(JSON.stringify(e))},e.prototype.getMissingReferences=function(e,t){var n=this;void 0===t&&(t=!1);var r=[],i=l.getValidator();e.forEach(function(e){return i.setRemoteReference(e.reference,e.content||{})});var a=null;if(this.jsonSchema.id&&\"string\"==typeof this.jsonSchema.id){a=this.jsonSchema.id;var o=a.indexOf(\"#\");o!=-1&&(a=a.substr(0,o))}try{i.validateSchema(this.jsonSchema)}catch(e){return[]}var r=i.getMissingRemoteReferences(),s=[];return r&&(s=u.filter(r,function(e){return!i.isResourceLoaded(e)&&e!=a})),t?s.map(function(e){return n.provider.normalizePath(e)}):s},e.prototype.getSchemaPath=function(e,t){if(void 0===t&&(t=!1),!e)return\"\";if(!e.id)return\"\";var n=e.id.trim();if(n.lastIndexOf(\"#\")!==n.length-1)return n;var r=n.substr(0,n.length-1);return t?this.provider.normalizePath(r):r},e.prototype.patchSchema=function(e){var t=this;if(!e)return e;if(!e.id)return e;var n=e.id.trim();n.lastIndexOf(\"#\")!==n.length-1&&(n+=\"#\",e.id=n);var r=n.substr(0,n.length-1);if(!this.provider.isAbsolutePath(r))return e;r=this.provider.normalizePath(r);var i=[];this.collectRefContainers(e,i),i.forEach(function(e){var n=e.$ref;if(\"string\"==typeof n&&0!==n.indexOf(\"#\")){n.indexOf(\"#\")===-1&&(n+=\"#\");var i=t.provider.resolvePath(r,n);e.$ref=i}})},e.prototype.collectRefContainers=function(e,t){var n=this;Object.keys(e).forEach(function(r){if(\"$ref\"===r)return void t.push(e);e[r]&&\"object\"==typeof e[r]&&n.collectRefContainers(e[r],t)})},e.prototype.validate=function(e,t){var r=this;void 0===t&&(t=[]);var i=b(e,this.schema,this.provider.contextPath()),a=g.getValue(i);if(a){if(a instanceof Error)throw a}else{var o=l.getValidator();t.forEach(function(e){return o.setRemoteReference(e.reference,e.content)}),o.validate(JSON.parse(e),this.jsonSchema);var s=o.getMissingRemoteReferences().filter(function(e){return!u.find(t,function(t){return e===t.reference})});if(!s||0===s.length)return void this.acceptErrors(i,o.getLastErrors(),d.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,!0);var c=[];s.forEach(function(e){var t,i={reference:e};try{var a=n(50),o=JSON.parse(r.provider.content(e));r.setupId(o,r.provider.normalizePath(e)),t=a.v4(o),delete t.$schema,i.content=t}catch(e){i.error=e}finally{c.push(i)}}),this.provider.hasAsyncRequests()||(c.forEach(function(e){t.push(e)}),this.validate(e,t))}},e.prototype.validateSelf=function(e){var t=this;void 0===e&&(e=[]);var r=b(\"__SCHEMA_VALIDATION__\",this.schema,this.provider.contextPath()),i=g.getValue(r);if(i){if(i instanceof Error)throw i}else{var a=l.getValidator();e.forEach(function(e){return a.setRemoteReference(e.reference,e.content)});try{a.validateSchema(this.jsonSchema)}catch(e){var o=\"Cannot assign to read only property '__$validated' of \";if(e.message&&0==e.message.indexOf(o)&&e.message.length>o.length){var s=e.message.substr(o.length,e.message.length-o.length),c=\"Unexpected value '\"+s+\"'\";this.acceptErrors(r,[{message:c,params:[]}],d.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,!0,!0)}throw e}var p=a.getMissingRemoteReferences().filter(function(t){return!u.find(e,function(e){return t===e.reference})});if(!p||0===p.length)return void this.acceptErrors(r,a.getLastErrors(),d.messageRegistry.INVALID_JSON_SCHEMA_DETAILS,!0,!0);var f=[];p.forEach(function(e){var r,i={reference:e};try{var a=n(50),o=JSON.parse(t.provider.content(e));t.setupId(o,t.provider.normalizePath(e)),r=a.v4(o),delete r.$schema,i.content=r}catch(e){i.error=e}finally{f.push(i)}}),this.provider.hasAsyncRequests()||(f.forEach(function(t){e.push(t)}),this.validateSelf(e))}},e.prototype.setupId=function(e,t){if(t&&e){if(e.id)return e.id=e.id.trim(),void(e.id.indexOf(\"#\")<0&&(e.id=e.id+\"#\"));e.id=t.replace(/\\\\/g,\"/\")+\"#\",this.patchSchema(e)}},e.prototype.acceptErrors=function(e,t,n,r,i){if(void 0===r&&(r=!1),void 0===i&&(i=!1),t&&t.length>0){var a=t.map(function(e){return e.message+\" \"+e.params}).join(\", \"),o=new f.ValidationError(n,{msg:a});if(o.isWarning=i,o.errors=t,g.setValue(e,o),r)throw o}else g.setValue(e,1)},e.prototype.contentAsync=function(e){var t,r=this,i=n(50),a=this.provider.contentAsync(e);return a?a.then(function(n){var a={reference:e};try{var o=JSON.parse(n);r.setupId(o,r.provider.normalizePath(e)),t=i.v4(o),delete t.$schema,a.content=t}catch(e){a.error=e}return a}):this.provider.promiseResolve({reference:e,content:null,error:new f.ValidationError(d.messageRegistry.REFERENCE_NOT_FOUND,{ref:e})})},e}();t.JSONSchemaObject=S;var A=function(){function e(e,t){if(this.schema=e,this.provider=t,this.extraElementData=null,this.references={},this.contentToResult={},t||(this.provider=new v),\"<\"!=e.charAt(0))throw new f.ValidationError(d.messageRegistry.INVALID_XML_SCHEMA);this.schemaString=this.handleReferenceElement(e)}return e.prototype.getType=function(){return\"text.xml\"},e.prototype.validateObject=function(e){if(this.extraElementData){var t=Object.keys(e)[0],n=new f.ValidationError(d.messageRegistry.EXTERNAL_TYPE_ERROR,{typeName:this.extraElementData.requestedName,objectName:t});if(!this.extraElementData.type&&!this.extraElementData.originalName)return void this.acceptErrors(\"key\",[n],!0);if(this.extraElementData.originalName&&t!==this.extraElementData.originalName)return void this.acceptErrors(\"key\",[n],!0);if(this.extraElementData.type){var r=e[t];delete e[t],e[this.extraElementData.name]=r}}this.validate(c.jsonToXml(e))},e.prototype.collectReferences=function(e,t,n){var r,i=this;r=new p(h).parseFromString(e);var a=o(r,\"schema\",this.namspacePrefix)[0],s=o(a,\"import\",this.namspacePrefix),u=o(a,\"include\",this.namspacePrefix);return s.concat(u).forEach(function(e){var r=e.getAttribute(\"schemaLocation\");if(r){var a=i.provider.resolvePath(t,r),o=n[a];if(!o){var s,u=Object.keys(n).length,l=i.provider.content(a);try{s=i.collectReferences(l,a,n)}catch(e){s=l}o=c.createXmlSchemaReference(a,u,s),n[a]=o}e.setAttribute(\"schemaLocation\",\"file_\"+o.virtualIndex+\".xsd\")}}),r.toString()},e.prototype.getMissingReferences=function(){var e,t=this;e=new p(h).parseFromString(this.schemaString);var n=o(e,\"schema\",this.namspacePrefix)[0],r=o(n,\"import\",this.namspacePrefix),i=o(n,\"include\",this.namspacePrefix),a=r.concat(i),s=[];return a.forEach(function(e){var n=e.getAttribute(\"schemaLocation\");if(n){var r=t.provider.resolvePath(t.provider.contextPath(),n);s.push(r)}}),s},e.prototype.collectReferencesAsync=function(e,t,n){var r,i=this;r=new p(h).parseFromString(e);var a=o(r,\"schema\",this.namspacePrefix)[0],s=o(a,\"import\",this.namspacePrefix),u=o(a,\"include\",this.namspacePrefix),l=s.concat(u);return Promise.all(l.map(function(e){var r=e.getAttribute(\"schemaLocation\");if(r){var a=i.provider.resolvePath(t,r),o=n[a];return o?(e.setAttribute(\"schemaLocation\",\"file_\"+o.virtualIndex+\".xsd\"),{}):i.provider.contentAsync(a).then(function(t){return i.collectReferencesAsync(t,a,n).then(function(e){return e},function(e){return t}).then(function(t){var r=Object.keys(n).length;return o=c.createXmlSchemaReference(a,r,t),n[a]=o,e.setAttribute(\"schemaLocation\",\"file_\"+o.virtualIndex+\".xsd\"),{}})})}return{}})).then(function(e){return Promise.resolve(r.toString())})},e.prototype.loadSchemaReferencesAsync=function(){return this.collectReferencesAsync(this.schemaString,this.provider.contextPath(),{})},e.prototype.validate=function(e){try{var t=this.contentToResult[e];if(t===!1)return;if(t)throw t;var n={},r=this.collectReferences(this.schemaString,this.provider.contextPath(),n),i=c.getValidator(r);if(this.provider.hasAsyncRequests())return;var a=i.validate(e,Object.keys(n).map(function(e){return n[e]}));this.acceptErrors(\"key\",a,!0),this.contentToResult[e]=!1,Object.keys(this.contentToResult).length>10&&(this.contentToResult={})}catch(t){throw this.contentToResult[e]=t,t}},e.prototype.handleReferenceElement=function(e){var t=new p(h).parseFromString(e);this.namspacePrefix=s(t);var n=o(t,\"schema\",this.namspacePrefix)[0],r=o(n,\"element\",this.namspacePrefix),i=u.find(r,function(e){return\"true\"===e.getAttribute(\"extraelement\")});if(!i)return e;var a={};return a.name=i.getAttribute(\"name\"),a.type=i.getAttribute(\"type\"),a.originalName=i.getAttribute(\"originalname\"),a.requestedName=i.getAttribute(\"requestedname\"),a.type||n.removeChild(i),i.removeAttribute(\"originalname\"),i.removeAttribute(\"requestedname\"),i.removeAttribute(\"extraelement\"),this.extraElementData=a,t.toString()},e.prototype.acceptErrors=function(e,t,n){if(void 0===n&&(n=!1),t&&t.length>0){var r=t.map(function(e){return e.message}).join(\", \"),i=new f.ValidationError(d.messageRegistry.CONTENT_DOES_NOT_MATCH_THE_SCHEMA,{msg:r});if(i.errors=t,g.setValue(e,i),n)throw i}else;},e}();t.XMLSchemaObject=A,t.getJSONSchema=r;var T=function(e,t){var n=\"\";return e&&(n=e.contextPath()),\"__SCHEMA_\"+t+n};t.getXMLSchema=i,t.createSchema=a}).call(t,n(13))},function(e,t,n){\"use strict\";function r(e){this.afterTransform=function(t,n){return i(e,t,n)},this.needTransform=!1,this.transforming=!1,this.writecb=null,this.writechunk=null,this.writeencoding=null}function i(e,t,n){var r=e._transformState;r.transforming=!1;var i=r.writecb;if(!i)return e.emit(\"error\",new Error(\"no writecb in Transform class\"));r.writechunk=null,r.writecb=null,null!==n&&void 0!==n&&e.push(n),i(t);var a=e._readableState;a.reading=!1,(a.needReadable||a.length<a.highWaterMark)&&e._read(a.highWaterMark)}function a(e){if(!(this instanceof a))return new a(e);s.call(this,e),this._transformState=new r(this);var t=this;this._readableState.needReadable=!0,this._readableState.sync=!1,e&&(\"function\"==typeof e.transform&&(this._transform=e.transform),\"function\"==typeof e.flush&&(this._flush=e.flush)),this.once(\"prefinish\",function(){\"function\"==typeof this._flush?this._flush(function(e,n){o(t,e,n)}):o(t)})}function o(e,t,n){if(t)return e.emit(\"error\",t);null!==n&&void 0!==n&&e.push(n);var r=e._writableState,i=e._transformState;if(r.length)throw new Error(\"Calling transform done when ws.length != 0\");if(i.transforming)throw new Error(\"Calling transform done when still transforming\");return e.push(null)}e.exports=a;var s=n(30),u=n(39);u.inherits=n(26),u.inherits(a,s),a.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},a.prototype._transform=function(e,t,n){throw new Error(\"_transform() is not implemented\")},a.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var i=this._readableState;(r.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},a.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0}},function(e,t,n){\"use strict\";(function(t,r){function i(){}function a(e,t,n){this.chunk=e,this.encoding=t,this.callback=n,this.next=null}function o(e,t){E=E||n(30),e=e||{},this.objectMode=!!e.objectMode,t instanceof E&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1;var a=e.decodeStrings===!1;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){h(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new T(this)}function s(e){if(E=E||n(30),!(D.call(s,this)||this instanceof E))return new s(e);this._writableState=new o(e,this),this.writable=!0,e&&(\"function\"==typeof e.write&&(this._write=e.write),\"function\"==typeof e.writev&&(this._writev=e.writev)),k.call(this)}function u(e,t){var n=new Error(\"write after end\");e.emit(\"error\",n),C(t,n)}function c(e,t,n,r){var i=!0,a=!1;return null===n?a=new TypeError(\"May not write null values to stream\"):\"string\"==typeof n||void 0===n||t.objectMode||(a=new TypeError(\"Invalid non-string/buffer chunk\")),a&&(e.emit(\"error\",a),C(r,a),i=!1),i}function l(e,t,n){return e.objectMode||e.decodeStrings===!1||\"string\"!=typeof t||(t=I.from(t,n)),t}function p(e,t,n,r,i,o){n||(r=l(t,r,i),R.isBuffer(r)&&(i=\"buffer\"));var s=t.objectMode?1:r.length;t.length+=s;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest=new a(r,i,o),c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else f(e,t,!1,s,r,i,o);return u}function f(e,t,n,r,i,a,o){t.writelen=r,t.writecb=o,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function d(e,t,n,r,i){--t.pendingcb,n?C(i,r):i(r),e._writableState.errorEmitted=!0,e.emit(\"error\",r)}function m(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}function h(e,t){var n=e._writableState,r=n.sync,i=n.writecb;if(m(n),t)d(e,n,r,t,i);else{var a=v(n);a||n.corked||n.bufferProcessing||!n.bufferedRequest||g(e,n),r?N(y,e,n,a,i):y(e,n,a,i)}}function y(e,t,n,r){n||_(e,t),t.pendingcb--,r(),S(e,t)}function _(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit(\"drain\"))}function g(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r),a=t.corkedRequestsFree;a.entry=n;for(var o=0;n;)i[o]=n,n=n.next,o+=1;f(e,t,!0,t.length,i,\"\",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new T(t)}else{for(;n;){var s=n.chunk,u=n.encoding,c=n.callback;if(f(e,t,!1,t.objectMode?1:s.length,s,u,c),n=n.next,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequestCount=0,t.bufferedRequest=n,t.bufferProcessing=!1}function v(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function b(e,t){t.prefinished||(t.prefinished=!0,e.emit(\"prefinish\"))}function S(e,t){var n=v(t);return n&&(0===t.pendingcb?(b(e,t),t.finished=!0,e.emit(\"finish\")):b(e,t)),n}function A(e,t,n){t.ending=!0,S(e,t),n&&(t.finished?C(n):e.once(\"finish\",n)),t.ended=!0,e.writable=!1}function T(e){var t=this;this.next=null,this.entry=null,this.finish=function(n){var r=t.entry;for(t.entry=null;r;){var i=r.callback;e.pendingcb--,i(n),r=r.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}}e.exports=s;var E,C=n(83),N=!t.browser&&[\"v0.10\",\"v0.9.\"].indexOf(t.version.slice(0,5))>-1?r:C;s.WritableState=o;var w=n(39);w.inherits=n(26);var k,x={deprecate:n(362)};!function(){try{k=n(66)}catch(e){}finally{k||(k=n(40).EventEmitter)}}();var R=n(16).Buffer,I=n(69);w.inherits(s,k),o.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(o.prototype,\"buffer\",{get:x.deprecate(function(){return this.getBuffer()},\"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.\")})}catch(e){}}();var D;\"function\"==typeof Symbol&&Symbol.hasInstance&&\"function\"==typeof Function.prototype[Symbol.hasInstance]?(D=Function.prototype[Symbol.hasInstance],Object.defineProperty(s,Symbol.hasInstance,{value:function(e){return!!D.call(this,e)||e&&e._writableState instanceof o}})):D=function(e){return e instanceof this},s.prototype.pipe=function(){this.emit(\"error\",new Error(\"Cannot pipe, not readable\"))},s.prototype.write=function(e,t,n){var r=this._writableState,a=!1,o=R.isBuffer(e);return\"function\"==typeof t&&(n=t,t=null),o?t=\"buffer\":t||(t=r.defaultEncoding),\"function\"!=typeof n&&(n=i),r.ended?u(this,n):(o||c(this,r,e,n))&&(r.pendingcb++,a=p(this,r,o,e,t,n)),a},s.prototype.cork=function(){this._writableState.corked++},s.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||g(this,e))},s.prototype.setDefaultEncoding=function(e){if(\"string\"==typeof e&&(e=e.toLowerCase()),!([\"hex\",\"utf8\",\"utf-8\",\"ascii\",\"binary\",\"base64\",\"ucs2\",\"ucs-2\",\"utf16le\",\"utf-16le\",\"raw\"].indexOf((e+\"\").toLowerCase())>-1))throw new TypeError(\"Unknown encoding: \"+e);return this._writableState.defaultEncoding=e,this},s.prototype._write=function(e,t,n){n(new Error(\"_write() is not implemented\"))},s.prototype._writev=null,s.prototype.end=function(e,t,n){var r=this._writableState;\"function\"==typeof e?(n=e,e=null,t=null):\"function\"==typeof t&&(n=t,t=null),null!==e&&void 0!==e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||A(this,r,n)}}).call(t,n(23),n(96).setImmediate)},function(e,t,n){function r(e){if(e&&!u(e))throw new Error(\"Unknown encoding: \"+e)}function i(e){return e.toString(this.encoding)}function a(e){this.charReceived=e.length%2,this.charLength=this.charReceived?2:0}function o(e){this.charReceived=e.length%3,this.charLength=this.charReceived?3:0}var s=n(16).Buffer,u=s.isEncoding||function(e){switch(e&&e.toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":case\"raw\":return!0;default:return!1}},c=t.StringDecoder=function(e){switch(this.encoding=(e||\"utf8\").toLowerCase().replace(/[-_]/,\"\"),r(e),this.encoding){case\"utf8\":this.surrogateSize=3;break;case\"ucs2\":case\"utf16le\":this.surrogateSize=2,this.detectIncompleteChar=a;break;case\"base64\":this.surrogateSize=3,this.detectIncompleteChar=o;break;default:return void(this.write=i)}this.charBuffer=new s(6),this.charReceived=0,this.charLength=0};c.prototype.write=function(e){for(var t=\"\";this.charLength;){var n=e.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:e.length;if(e.copy(this.charBuffer,this.charReceived,0,n),this.charReceived+=n,this.charReceived<this.charLength)return\"\";e=e.slice(n,e.length),t=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var r=t.charCodeAt(t.length-1);if(!(r>=55296&&r<=56319)){if(this.charReceived=this.charLength=0,0===e.length)return t;break}this.charLength+=this.surrogateSize,t=\"\"}this.detectIncompleteChar(e);var i=e.length;this.charLength&&(e.copy(this.charBuffer,0,e.length-this.charReceived,i),i-=this.charReceived),t+=e.toString(this.encoding,0,i);var i=t.length-1,r=t.charCodeAt(i);if(r>=55296&&r<=56319){var a=this.surrogateSize;return this.charLength+=a,this.charReceived+=a,this.charBuffer.copy(this.charBuffer,a,0,a),e.copy(this.charBuffer,0,0,a),t.substring(0,i)}return t},c.prototype.detectIncompleteChar=function(e){for(var t=e.length>=3?3:e.length;t>0;t--){var n=e[e.length-t];if(1==t&&n>>5==6){this.charLength=2;break}if(t<=2&&n>>4==14){this.charLength=3;break}if(t<=3&&n>>3==30){this.charLength=4;break}}this.charReceived=t},c.prototype.end=function(e){var t=\"\";if(e&&e.length&&(t=this.write(e)),this.charReceived){var n=this.charReceived,r=this.charBuffer,i=this.encoding;t+=r.slice(0,n).toString(i)}return t}},function(e,t,n){function r(e,t){this._id=e,this._clearFn=t}var i=Function.prototype.apply;t.setTimeout=function(){return new r(i.call(setTimeout,window,arguments),clearTimeout)},t.setInterval=function(){return new r(i.call(setInterval,window,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},r.prototype.unref=r.prototype.ref=function(){},r.prototype.close=function(){this._clearFn.call(window,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(354),t.setImmediate=setImmediate,t.clearImmediate=clearImmediate},function(e,t,n){(function(t,r,i,a){/*! *****************************************************************************\nCopyright (c) Microsoft Corporation. All rights reserved.\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\nthis file except in compliance with the License. You may obtain a copy of the\nLicense at http://www.apache.org/licenses/LICENSE-2.0\n\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\nMERCHANTABLITY OR NON-INFRINGEMENT.\n\nSee the Apache Version 2.0 License for specific language governing permissions\nand limitations under the License.\n***************************************************************************** */\nvar o,s=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};!function(e){!function(e){e[e.Unknown=0]=\"Unknown\",e[e.EndOfFileToken=1]=\"EndOfFileToken\",e[e.SingleLineCommentTrivia=2]=\"SingleLineCommentTrivia\",e[e.MultiLineCommentTrivia=3]=\"MultiLineCommentTrivia\",e[e.NewLineTrivia=4]=\"NewLineTrivia\",e[e.WhitespaceTrivia=5]=\"WhitespaceTrivia\",e[e.ShebangTrivia=6]=\"ShebangTrivia\",e[e.ConflictMarkerTrivia=7]=\"ConflictMarkerTrivia\",e[e.NumericLiteral=8]=\"NumericLiteral\",e[e.StringLiteral=9]=\"StringLiteral\",e[e.RegularExpressionLiteral=10]=\"RegularExpressionLiteral\",e[e.NoSubstitutionTemplateLiteral=11]=\"NoSubstitutionTemplateLiteral\",e[e.TemplateHead=12]=\"TemplateHead\",e[e.TemplateMiddle=13]=\"TemplateMiddle\",e[e.TemplateTail=14]=\"TemplateTail\",e[e.OpenBraceToken=15]=\"OpenBraceToken\",e[e.CloseBraceToken=16]=\"CloseBraceToken\",e[e.OpenParenToken=17]=\"OpenParenToken\",e[e.CloseParenToken=18]=\"CloseParenToken\",e[e.OpenBracketToken=19]=\"OpenBracketToken\",e[e.CloseBracketToken=20]=\"CloseBracketToken\",e[e.DotToken=21]=\"DotToken\",e[e.DotDotDotToken=22]=\"DotDotDotToken\",e[e.SemicolonToken=23]=\"SemicolonToken\",e[e.CommaToken=24]=\"CommaToken\",e[e.LessThanToken=25]=\"LessThanToken\",e[e.LessThanSlashToken=26]=\"LessThanSlashToken\",e[e.GreaterThanToken=27]=\"GreaterThanToken\",e[e.LessThanEqualsToken=28]=\"LessThanEqualsToken\",e[e.GreaterThanEqualsToken=29]=\"GreaterThanEqualsToken\",e[e.EqualsEqualsToken=30]=\"EqualsEqualsToken\",e[e.ExclamationEqualsToken=31]=\"ExclamationEqualsToken\",e[e.EqualsEqualsEqualsToken=32]=\"EqualsEqualsEqualsToken\",e[e.ExclamationEqualsEqualsToken=33]=\"ExclamationEqualsEqualsToken\",e[e.EqualsGreaterThanToken=34]=\"EqualsGreaterThanToken\",e[e.PlusToken=35]=\"PlusToken\",e[e.MinusToken=36]=\"MinusToken\",e[e.AsteriskToken=37]=\"AsteriskToken\",e[e.AsteriskAsteriskToken=38]=\"AsteriskAsteriskToken\",e[e.SlashToken=39]=\"SlashToken\",e[e.PercentToken=40]=\"PercentToken\",e[e.PlusPlusToken=41]=\"PlusPlusToken\",e[e.MinusMinusToken=42]=\"MinusMinusToken\",e[e.LessThanLessThanToken=43]=\"LessThanLessThanToken\",e[e.GreaterThanGreaterThanToken=44]=\"GreaterThanGreaterThanToken\",e[e.GreaterThanGreaterThanGreaterThanToken=45]=\"GreaterThanGreaterThanGreaterThanToken\",e[e.AmpersandToken=46]=\"AmpersandToken\",e[e.BarToken=47]=\"BarToken\",e[e.CaretToken=48]=\"CaretToken\",e[e.ExclamationToken=49]=\"ExclamationToken\",e[e.TildeToken=50]=\"TildeToken\",e[e.AmpersandAmpersandToken=51]=\"AmpersandAmpersandToken\",e[e.BarBarToken=52]=\"BarBarToken\",e[e.QuestionToken=53]=\"QuestionToken\",e[e.ColonToken=54]=\"ColonToken\",e[e.AtToken=55]=\"AtToken\",e[e.EqualsToken=56]=\"EqualsToken\",e[e.PlusEqualsToken=57]=\"PlusEqualsToken\",e[e.MinusEqualsToken=58]=\"MinusEqualsToken\",e[e.AsteriskEqualsToken=59]=\"AsteriskEqualsToken\",e[e.AsteriskAsteriskEqualsToken=60]=\"AsteriskAsteriskEqualsToken\",e[e.SlashEqualsToken=61]=\"SlashEqualsToken\",e[e.PercentEqualsToken=62]=\"PercentEqualsToken\",e[e.LessThanLessThanEqualsToken=63]=\"LessThanLessThanEqualsToken\",e[e.GreaterThanGreaterThanEqualsToken=64]=\"GreaterThanGreaterThanEqualsToken\",e[e.GreaterThanGreaterThanGreaterThanEqualsToken=65]=\"GreaterThanGreaterThanGreaterThanEqualsToken\",e[e.AmpersandEqualsToken=66]=\"AmpersandEqualsToken\",e[e.BarEqualsToken=67]=\"BarEqualsToken\",e[e.CaretEqualsToken=68]=\"CaretEqualsToken\",e[e.Identifier=69]=\"Identifier\",e[e.BreakKeyword=70]=\"BreakKeyword\",e[e.CaseKeyword=71]=\"CaseKeyword\",e[e.CatchKeyword=72]=\"CatchKeyword\",e[e.ClassKeyword=73]=\"ClassKeyword\",e[e.ConstKeyword=74]=\"ConstKeyword\",e[e.ContinueKeyword=75]=\"ContinueKeyword\",e[e.DebuggerKeyword=76]=\"DebuggerKeyword\",e[e.DefaultKeyword=77]=\"DefaultKeyword\",e[e.DeleteKeyword=78]=\"DeleteKeyword\",e[e.DoKeyword=79]=\"DoKeyword\",e[e.ElseKeyword=80]=\"ElseKeyword\",e[e.EnumKeyword=81]=\"EnumKeyword\",e[e.ExportKeyword=82]=\"ExportKeyword\",e[e.ExtendsKeyword=83]=\"ExtendsKeyword\",e[e.FalseKeyword=84]=\"FalseKeyword\",e[e.FinallyKeyword=85]=\"FinallyKeyword\",e[e.ForKeyword=86]=\"ForKeyword\",e[e.FunctionKeyword=87]=\"FunctionKeyword\",e[e.IfKeyword=88]=\"IfKeyword\",e[e.ImportKeyword=89]=\"ImportKeyword\",e[e.InKeyword=90]=\"InKeyword\",e[e.InstanceOfKeyword=91]=\"InstanceOfKeyword\",e[e.NewKeyword=92]=\"NewKeyword\",e[e.NullKeyword=93]=\"NullKeyword\",e[e.ReturnKeyword=94]=\"ReturnKeyword\",e[e.SuperKeyword=95]=\"SuperKeyword\",e[e.SwitchKeyword=96]=\"SwitchKeyword\",e[e.ThisKeyword=97]=\"ThisKeyword\",e[e.ThrowKeyword=98]=\"ThrowKeyword\",e[e.TrueKeyword=99]=\"TrueKeyword\",e[e.TryKeyword=100]=\"TryKeyword\",e[e.TypeOfKeyword=101]=\"TypeOfKeyword\",e[e.VarKeyword=102]=\"VarKeyword\",e[e.VoidKeyword=103]=\"VoidKeyword\",e[e.WhileKeyword=104]=\"WhileKeyword\",e[e.WithKeyword=105]=\"WithKeyword\",e[e.ImplementsKeyword=106]=\"ImplementsKeyword\",e[e.InterfaceKeyword=107]=\"InterfaceKeyword\",e[e.LetKeyword=108]=\"LetKeyword\",e[e.PackageKeyword=109]=\"PackageKeyword\",e[e.PrivateKeyword=110]=\"PrivateKeyword\",e[e.ProtectedKeyword=111]=\"ProtectedKeyword\",e[e.PublicKeyword=112]=\"PublicKeyword\",e[e.StaticKeyword=113]=\"StaticKeyword\",e[e.YieldKeyword=114]=\"YieldKeyword\",e[e.AbstractKeyword=115]=\"AbstractKeyword\",e[e.AsKeyword=116]=\"AsKeyword\",e[e.AnyKeyword=117]=\"AnyKeyword\",e[e.AsyncKeyword=118]=\"AsyncKeyword\",e[e.AwaitKeyword=119]=\"AwaitKeyword\",e[e.BooleanKeyword=120]=\"BooleanKeyword\",e[e.ConstructorKeyword=121]=\"ConstructorKeyword\",e[e.DeclareKeyword=122]=\"DeclareKeyword\",e[e.GetKeyword=123]=\"GetKeyword\",e[e.IsKeyword=124]=\"IsKeyword\",e[e.ModuleKeyword=125]=\"ModuleKeyword\",e[e.NamespaceKeyword=126]=\"NamespaceKeyword\",e[e.RequireKeyword=127]=\"RequireKeyword\",e[e.NumberKeyword=128]=\"NumberKeyword\",e[e.SetKeyword=129]=\"SetKeyword\",e[e.StringKeyword=130]=\"StringKeyword\",e[e.SymbolKeyword=131]=\"SymbolKeyword\",e[e.TypeKeyword=132]=\"TypeKeyword\",e[e.FromKeyword=133]=\"FromKeyword\",e[e.GlobalKeyword=134]=\"GlobalKeyword\",e[e.OfKeyword=135]=\"OfKeyword\",e[e.QualifiedName=136]=\"QualifiedName\",e[e.ComputedPropertyName=137]=\"ComputedPropertyName\",e[e.TypeParameter=138]=\"TypeParameter\",e[e.Parameter=139]=\"Parameter\",e[e.Decorator=140]=\"Decorator\",e[e.PropertySignature=141]=\"PropertySignature\",e[e.PropertyDeclaration=142]=\"PropertyDeclaration\",e[e.MethodSignature=143]=\"MethodSignature\",e[e.MethodDeclaration=144]=\"MethodDeclaration\",e[e.Constructor=145]=\"Constructor\",e[e.GetAccessor=146]=\"GetAccessor\",e[e.SetAccessor=147]=\"SetAccessor\",e[e.CallSignature=148]=\"CallSignature\",e[e.ConstructSignature=149]=\"ConstructSignature\",e[e.IndexSignature=150]=\"IndexSignature\",e[e.TypePredicate=151]=\"TypePredicate\",e[e.TypeReference=152]=\"TypeReference\",e[e.FunctionType=153]=\"FunctionType\",e[e.ConstructorType=154]=\"ConstructorType\",e[e.TypeQuery=155]=\"TypeQuery\",e[e.TypeLiteral=156]=\"TypeLiteral\",e[e.ArrayType=157]=\"ArrayType\",e[e.TupleType=158]=\"TupleType\",e[e.UnionType=159]=\"UnionType\",e[e.IntersectionType=160]=\"IntersectionType\",e[e.ParenthesizedType=161]=\"ParenthesizedType\",e[e.ThisType=162]=\"ThisType\",e[e.StringLiteralType=163]=\"StringLiteralType\",e[e.ObjectBindingPattern=164]=\"ObjectBindingPattern\",e[e.ArrayBindingPattern=165]=\"ArrayBindingPattern\",e[e.BindingElement=166]=\"BindingElement\",e[e.ArrayLiteralExpression=167]=\"ArrayLiteralExpression\",e[e.ObjectLiteralExpression=168]=\"ObjectLiteralExpression\",e[e.PropertyAccessExpression=169]=\"PropertyAccessExpression\",e[e.ElementAccessExpression=170]=\"ElementAccessExpression\",e[e.CallExpression=171]=\"CallExpression\",e[e.NewExpression=172]=\"NewExpression\",e[e.TaggedTemplateExpression=173]=\"TaggedTemplateExpression\",e[e.TypeAssertionExpression=174]=\"TypeAssertionExpression\",e[e.ParenthesizedExpression=175]=\"ParenthesizedExpression\",e[e.FunctionExpression=176]=\"FunctionExpression\",e[e.ArrowFunction=177]=\"ArrowFunction\",e[e.DeleteExpression=178]=\"DeleteExpression\",e[e.TypeOfExpression=179]=\"TypeOfExpression\",e[e.VoidExpression=180]=\"VoidExpression\",e[e.AwaitExpression=181]=\"AwaitExpression\",e[e.PrefixUnaryExpression=182]=\"PrefixUnaryExpression\",e[e.PostfixUnaryExpression=183]=\"PostfixUnaryExpression\",e[e.BinaryExpression=184]=\"BinaryExpression\",e[e.ConditionalExpression=185]=\"ConditionalExpression\",e[e.TemplateExpression=186]=\"TemplateExpression\",e[e.YieldExpression=187]=\"YieldExpression\",e[e.SpreadElementExpression=188]=\"SpreadElementExpression\",e[e.ClassExpression=189]=\"ClassExpression\",e[e.OmittedExpression=190]=\"OmittedExpression\",e[e.ExpressionWithTypeArguments=191]=\"ExpressionWithTypeArguments\",e[e.AsExpression=192]=\"AsExpression\",e[e.TemplateSpan=193]=\"TemplateSpan\",e[e.SemicolonClassElement=194]=\"SemicolonClassElement\",e[e.Block=195]=\"Block\",e[e.VariableStatement=196]=\"VariableStatement\",e[e.EmptyStatement=197]=\"EmptyStatement\",e[e.ExpressionStatement=198]=\"ExpressionStatement\",e[e.IfStatement=199]=\"IfStatement\";e[e.DoStatement=200]=\"DoStatement\",e[e.WhileStatement=201]=\"WhileStatement\",e[e.ForStatement=202]=\"ForStatement\",e[e.ForInStatement=203]=\"ForInStatement\",e[e.ForOfStatement=204]=\"ForOfStatement\",e[e.ContinueStatement=205]=\"ContinueStatement\",e[e.BreakStatement=206]=\"BreakStatement\",e[e.ReturnStatement=207]=\"ReturnStatement\",e[e.WithStatement=208]=\"WithStatement\",e[e.SwitchStatement=209]=\"SwitchStatement\",e[e.LabeledStatement=210]=\"LabeledStatement\",e[e.ThrowStatement=211]=\"ThrowStatement\",e[e.TryStatement=212]=\"TryStatement\",e[e.DebuggerStatement=213]=\"DebuggerStatement\",e[e.VariableDeclaration=214]=\"VariableDeclaration\",e[e.VariableDeclarationList=215]=\"VariableDeclarationList\",e[e.FunctionDeclaration=216]=\"FunctionDeclaration\",e[e.ClassDeclaration=217]=\"ClassDeclaration\",e[e.InterfaceDeclaration=218]=\"InterfaceDeclaration\",e[e.TypeAliasDeclaration=219]=\"TypeAliasDeclaration\",e[e.EnumDeclaration=220]=\"EnumDeclaration\",e[e.ModuleDeclaration=221]=\"ModuleDeclaration\",e[e.ModuleBlock=222]=\"ModuleBlock\",e[e.CaseBlock=223]=\"CaseBlock\",e[e.ImportEqualsDeclaration=224]=\"ImportEqualsDeclaration\",e[e.ImportDeclaration=225]=\"ImportDeclaration\",e[e.ImportClause=226]=\"ImportClause\",e[e.NamespaceImport=227]=\"NamespaceImport\",e[e.NamedImports=228]=\"NamedImports\",e[e.ImportSpecifier=229]=\"ImportSpecifier\",e[e.ExportAssignment=230]=\"ExportAssignment\",e[e.ExportDeclaration=231]=\"ExportDeclaration\",e[e.NamedExports=232]=\"NamedExports\",e[e.ExportSpecifier=233]=\"ExportSpecifier\",e[e.MissingDeclaration=234]=\"MissingDeclaration\",e[e.ExternalModuleReference=235]=\"ExternalModuleReference\",e[e.JsxElement=236]=\"JsxElement\",e[e.JsxSelfClosingElement=237]=\"JsxSelfClosingElement\",e[e.JsxOpeningElement=238]=\"JsxOpeningElement\",e[e.JsxText=239]=\"JsxText\",e[e.JsxClosingElement=240]=\"JsxClosingElement\",e[e.JsxAttribute=241]=\"JsxAttribute\",e[e.JsxSpreadAttribute=242]=\"JsxSpreadAttribute\",e[e.JsxExpression=243]=\"JsxExpression\",e[e.CaseClause=244]=\"CaseClause\",e[e.DefaultClause=245]=\"DefaultClause\",e[e.HeritageClause=246]=\"HeritageClause\",e[e.CatchClause=247]=\"CatchClause\",e[e.PropertyAssignment=248]=\"PropertyAssignment\",e[e.ShorthandPropertyAssignment=249]=\"ShorthandPropertyAssignment\",e[e.EnumMember=250]=\"EnumMember\",e[e.SourceFile=251]=\"SourceFile\",e[e.JSDocTypeExpression=252]=\"JSDocTypeExpression\",e[e.JSDocAllType=253]=\"JSDocAllType\",e[e.JSDocUnknownType=254]=\"JSDocUnknownType\",e[e.JSDocArrayType=255]=\"JSDocArrayType\",e[e.JSDocUnionType=256]=\"JSDocUnionType\",e[e.JSDocTupleType=257]=\"JSDocTupleType\",e[e.JSDocNullableType=258]=\"JSDocNullableType\",e[e.JSDocNonNullableType=259]=\"JSDocNonNullableType\",e[e.JSDocRecordType=260]=\"JSDocRecordType\",e[e.JSDocRecordMember=261]=\"JSDocRecordMember\",e[e.JSDocTypeReference=262]=\"JSDocTypeReference\",e[e.JSDocOptionalType=263]=\"JSDocOptionalType\",e[e.JSDocFunctionType=264]=\"JSDocFunctionType\",e[e.JSDocVariadicType=265]=\"JSDocVariadicType\",e[e.JSDocConstructorType=266]=\"JSDocConstructorType\",e[e.JSDocThisType=267]=\"JSDocThisType\",e[e.JSDocComment=268]=\"JSDocComment\",e[e.JSDocTag=269]=\"JSDocTag\",e[e.JSDocParameterTag=270]=\"JSDocParameterTag\",e[e.JSDocReturnTag=271]=\"JSDocReturnTag\",e[e.JSDocTypeTag=272]=\"JSDocTypeTag\",e[e.JSDocTemplateTag=273]=\"JSDocTemplateTag\",e[e.SyntaxList=274]=\"SyntaxList\",e[e.Count=275]=\"Count\",e[e.FirstAssignment=56]=\"FirstAssignment\",e[e.LastAssignment=68]=\"LastAssignment\",e[e.FirstReservedWord=70]=\"FirstReservedWord\",e[e.LastReservedWord=105]=\"LastReservedWord\",e[e.FirstKeyword=70]=\"FirstKeyword\",e[e.LastKeyword=135]=\"LastKeyword\",e[e.FirstFutureReservedWord=106]=\"FirstFutureReservedWord\",e[e.LastFutureReservedWord=114]=\"LastFutureReservedWord\",e[e.FirstTypeNode=151]=\"FirstTypeNode\",e[e.LastTypeNode=163]=\"LastTypeNode\",e[e.FirstPunctuation=15]=\"FirstPunctuation\",e[e.LastPunctuation=68]=\"LastPunctuation\",e[e.FirstToken=0]=\"FirstToken\",e[e.LastToken=135]=\"LastToken\",e[e.FirstTriviaToken=2]=\"FirstTriviaToken\",e[e.LastTriviaToken=7]=\"LastTriviaToken\",e[e.FirstLiteralToken=8]=\"FirstLiteralToken\",e[e.LastLiteralToken=11]=\"LastLiteralToken\",e[e.FirstTemplateToken=11]=\"FirstTemplateToken\",e[e.LastTemplateToken=14]=\"LastTemplateToken\",e[e.FirstBinaryOperator=25]=\"FirstBinaryOperator\",e[e.LastBinaryOperator=68]=\"LastBinaryOperator\",e[e.FirstNode=136]=\"FirstNode\"}(e.SyntaxKind||(e.SyntaxKind={}));e.SyntaxKind;!function(e){e[e.None=0]=\"None\",e[e.Export=2]=\"Export\",e[e.Ambient=4]=\"Ambient\",e[e.Public=8]=\"Public\",e[e.Private=16]=\"Private\",e[e.Protected=32]=\"Protected\",e[e.Static=64]=\"Static\",e[e.Abstract=128]=\"Abstract\",e[e.Async=256]=\"Async\",e[e.Default=512]=\"Default\",e[e.MultiLine=1024]=\"MultiLine\",e[e.Synthetic=2048]=\"Synthetic\",e[e.DeclarationFile=4096]=\"DeclarationFile\",e[e.Let=8192]=\"Let\",e[e.Const=16384]=\"Const\",e[e.OctalLiteral=32768]=\"OctalLiteral\",e[e.Namespace=65536]=\"Namespace\",e[e.ExportContext=131072]=\"ExportContext\",e[e.ContainsThis=262144]=\"ContainsThis\",e[e.HasImplicitReturn=524288]=\"HasImplicitReturn\",e[e.HasExplicitReturn=1048576]=\"HasExplicitReturn\",e[e.GlobalAugmentation=2097152]=\"GlobalAugmentation\",e[e.HasClassExtends=4194304]=\"HasClassExtends\",e[e.HasDecorators=8388608]=\"HasDecorators\",e[e.HasParamDecorators=16777216]=\"HasParamDecorators\",e[e.HasAsyncFunctions=33554432]=\"HasAsyncFunctions\",e[e.Modifier=1022]=\"Modifier\",e[e.AccessibilityModifier=56]=\"AccessibilityModifier\",e[e.BlockScoped=24576]=\"BlockScoped\",e[e.ReachabilityCheckFlags=1572864]=\"ReachabilityCheckFlags\",e[e.EmitHelperFlags=62914560]=\"EmitHelperFlags\"}(e.NodeFlags||(e.NodeFlags={}));e.NodeFlags;!function(e){e[e.None=0]=\"None\",e[e.DisallowIn=1]=\"DisallowIn\",e[e.Yield=2]=\"Yield\",e[e.Decorator=4]=\"Decorator\",e[e.Await=8]=\"Await\",e[e.ThisNodeHasError=16]=\"ThisNodeHasError\",e[e.JavaScriptFile=32]=\"JavaScriptFile\",e[e.ParserGeneratedFlags=31]=\"ParserGeneratedFlags\",e[e.TypeExcludesFlags=10]=\"TypeExcludesFlags\",e[e.ThisNodeOrAnySubNodesHasError=64]=\"ThisNodeOrAnySubNodesHasError\",e[e.HasAggregatedChildData=128]=\"HasAggregatedChildData\"}(e.ParserContextFlags||(e.ParserContextFlags={}));e.ParserContextFlags;!function(e){e[e.None=0]=\"None\",e[e.IntrinsicNamedElement=1]=\"IntrinsicNamedElement\",e[e.IntrinsicIndexedElement=2]=\"IntrinsicIndexedElement\",e[e.ValueElement=4]=\"ValueElement\",e[e.UnknownElement=16]=\"UnknownElement\",e[e.IntrinsicElement=3]=\"IntrinsicElement\"}(e.JsxFlags||(e.JsxFlags={}));e.JsxFlags;!function(e){e[e.Succeeded=1]=\"Succeeded\",e[e.Failed=2]=\"Failed\",e[e.FailedAndReported=3]=\"FailedAndReported\"}(e.RelationComparisonResult||(e.RelationComparisonResult={}));var t=(e.RelationComparisonResult,function(){function e(){}return e}());e.OperationCanceledException=t,function(e){e[e.Success=0]=\"Success\",e[e.DiagnosticsPresent_OutputsSkipped=1]=\"DiagnosticsPresent_OutputsSkipped\",e[e.DiagnosticsPresent_OutputsGenerated=2]=\"DiagnosticsPresent_OutputsGenerated\"}(e.ExitStatus||(e.ExitStatus={}));e.ExitStatus;!function(e){e[e.None=0]=\"None\",e[e.WriteArrayAsGenericType=1]=\"WriteArrayAsGenericType\",e[e.UseTypeOfFunction=2]=\"UseTypeOfFunction\",e[e.NoTruncation=4]=\"NoTruncation\",e[e.WriteArrowStyleSignature=8]=\"WriteArrowStyleSignature\",e[e.WriteOwnNameForAnyLike=16]=\"WriteOwnNameForAnyLike\",e[e.WriteTypeArgumentsOfSignature=32]=\"WriteTypeArgumentsOfSignature\",e[e.InElementType=64]=\"InElementType\",e[e.UseFullyQualifiedType=128]=\"UseFullyQualifiedType\"}(e.TypeFormatFlags||(e.TypeFormatFlags={}));e.TypeFormatFlags;!function(e){e[e.None=0]=\"None\",e[e.WriteTypeParametersOrArguments=1]=\"WriteTypeParametersOrArguments\",e[e.UseOnlyExternalAliasing=2]=\"UseOnlyExternalAliasing\"}(e.SymbolFormatFlags||(e.SymbolFormatFlags={}));e.SymbolFormatFlags;!function(e){e[e.Accessible=0]=\"Accessible\",e[e.NotAccessible=1]=\"NotAccessible\",e[e.CannotBeNamed=2]=\"CannotBeNamed\"}(e.SymbolAccessibility||(e.SymbolAccessibility={}));e.SymbolAccessibility;!function(e){e[e.This=0]=\"This\",e[e.Identifier=1]=\"Identifier\"}(e.TypePredicateKind||(e.TypePredicateKind={}));e.TypePredicateKind;!function(e){e[e.Unknown=0]=\"Unknown\",e[e.TypeWithConstructSignatureAndValue=1]=\"TypeWithConstructSignatureAndValue\",e[e.VoidType=2]=\"VoidType\",e[e.NumberLikeType=3]=\"NumberLikeType\",e[e.StringLikeType=4]=\"StringLikeType\",e[e.BooleanType=5]=\"BooleanType\",e[e.ArrayLikeType=6]=\"ArrayLikeType\",e[e.ESSymbolType=7]=\"ESSymbolType\",e[e.TypeWithCallSignature=8]=\"TypeWithCallSignature\",e[e.ObjectType=9]=\"ObjectType\"}(e.TypeReferenceSerializationKind||(e.TypeReferenceSerializationKind={}));e.TypeReferenceSerializationKind;!function(e){e[e.None=0]=\"None\",e[e.FunctionScopedVariable=1]=\"FunctionScopedVariable\",e[e.BlockScopedVariable=2]=\"BlockScopedVariable\",e[e.Property=4]=\"Property\",e[e.EnumMember=8]=\"EnumMember\",e[e.Function=16]=\"Function\",e[e.Class=32]=\"Class\",e[e.Interface=64]=\"Interface\",e[e.ConstEnum=128]=\"ConstEnum\",e[e.RegularEnum=256]=\"RegularEnum\",e[e.ValueModule=512]=\"ValueModule\",e[e.NamespaceModule=1024]=\"NamespaceModule\",e[e.TypeLiteral=2048]=\"TypeLiteral\",e[e.ObjectLiteral=4096]=\"ObjectLiteral\",e[e.Method=8192]=\"Method\",e[e.Constructor=16384]=\"Constructor\",e[e.GetAccessor=32768]=\"GetAccessor\",e[e.SetAccessor=65536]=\"SetAccessor\",e[e.Signature=131072]=\"Signature\",e[e.TypeParameter=262144]=\"TypeParameter\",e[e.TypeAlias=524288]=\"TypeAlias\",e[e.ExportValue=1048576]=\"ExportValue\",e[e.ExportType=2097152]=\"ExportType\",e[e.ExportNamespace=4194304]=\"ExportNamespace\",e[e.Alias=8388608]=\"Alias\",e[e.Instantiated=16777216]=\"Instantiated\",e[e.Merged=33554432]=\"Merged\",e[e.Transient=67108864]=\"Transient\",e[e.Prototype=134217728]=\"Prototype\",e[e.SyntheticProperty=268435456]=\"SyntheticProperty\",e[e.Optional=536870912]=\"Optional\",e[e.ExportStar=1073741824]=\"ExportStar\",e[e.Enum=384]=\"Enum\",e[e.Variable=3]=\"Variable\",e[e.Value=107455]=\"Value\",e[e.Type=793056]=\"Type\",e[e.Namespace=1536]=\"Namespace\",e[e.Module=1536]=\"Module\",e[e.Accessor=98304]=\"Accessor\",e[e.FunctionScopedVariableExcludes=107454]=\"FunctionScopedVariableExcludes\",e[e.BlockScopedVariableExcludes=107455]=\"BlockScopedVariableExcludes\",e[e.ParameterExcludes=107455]=\"ParameterExcludes\",e[e.PropertyExcludes=107455]=\"PropertyExcludes\",e[e.EnumMemberExcludes=107455]=\"EnumMemberExcludes\",e[e.FunctionExcludes=106927]=\"FunctionExcludes\",e[e.ClassExcludes=899519]=\"ClassExcludes\",e[e.InterfaceExcludes=792960]=\"InterfaceExcludes\",e[e.RegularEnumExcludes=899327]=\"RegularEnumExcludes\",e[e.ConstEnumExcludes=899967]=\"ConstEnumExcludes\",e[e.ValueModuleExcludes=106639]=\"ValueModuleExcludes\",e[e.NamespaceModuleExcludes=0]=\"NamespaceModuleExcludes\",e[e.MethodExcludes=99263]=\"MethodExcludes\",e[e.GetAccessorExcludes=41919]=\"GetAccessorExcludes\",e[e.SetAccessorExcludes=74687]=\"SetAccessorExcludes\",e[e.TypeParameterExcludes=530912]=\"TypeParameterExcludes\",e[e.TypeAliasExcludes=793056]=\"TypeAliasExcludes\",e[e.AliasExcludes=8388608]=\"AliasExcludes\",e[e.ModuleMember=8914931]=\"ModuleMember\",e[e.ExportHasLocal=944]=\"ExportHasLocal\",e[e.HasExports=1952]=\"HasExports\",e[e.HasMembers=6240]=\"HasMembers\",e[e.BlockScoped=418]=\"BlockScoped\",e[e.PropertyOrAccessor=98308]=\"PropertyOrAccessor\",e[e.Export=7340032]=\"Export\",e[e.Classifiable=788448]=\"Classifiable\"}(e.SymbolFlags||(e.SymbolFlags={}));e.SymbolFlags;!function(e){e[e.TypeChecked=1]=\"TypeChecked\",e[e.LexicalThis=2]=\"LexicalThis\",e[e.CaptureThis=4]=\"CaptureThis\",e[e.SuperInstance=256]=\"SuperInstance\",e[e.SuperStatic=512]=\"SuperStatic\",e[e.ContextChecked=1024]=\"ContextChecked\",e[e.AsyncMethodWithSuper=2048]=\"AsyncMethodWithSuper\",e[e.AsyncMethodWithSuperBinding=4096]=\"AsyncMethodWithSuperBinding\",e[e.CaptureArguments=8192]=\"CaptureArguments\",e[e.EnumValuesComputed=16384]=\"EnumValuesComputed\",e[e.LexicalModuleMergesWithClass=32768]=\"LexicalModuleMergesWithClass\",e[e.LoopWithCapturedBlockScopedBinding=65536]=\"LoopWithCapturedBlockScopedBinding\",e[e.CapturedBlockScopedBinding=131072]=\"CapturedBlockScopedBinding\",e[e.BlockScopedBindingInLoop=262144]=\"BlockScopedBindingInLoop\",e[e.ClassWithBodyScopedClassBinding=524288]=\"ClassWithBodyScopedClassBinding\",e[e.BodyScopedClassBinding=1048576]=\"BodyScopedClassBinding\",e[e.NeedsLoopOutParameter=2097152]=\"NeedsLoopOutParameter\"}(e.NodeCheckFlags||(e.NodeCheckFlags={}));e.NodeCheckFlags;!function(e){e[e.Any=1]=\"Any\",e[e.String=2]=\"String\",e[e.Number=4]=\"Number\",e[e.Boolean=8]=\"Boolean\",e[e.Void=16]=\"Void\",e[e.Undefined=32]=\"Undefined\",e[e.Null=64]=\"Null\",e[e.Enum=128]=\"Enum\",e[e.StringLiteral=256]=\"StringLiteral\",e[e.TypeParameter=512]=\"TypeParameter\",e[e.Class=1024]=\"Class\",e[e.Interface=2048]=\"Interface\",e[e.Reference=4096]=\"Reference\",e[e.Tuple=8192]=\"Tuple\",e[e.Union=16384]=\"Union\",e[e.Intersection=32768]=\"Intersection\",e[e.Anonymous=65536]=\"Anonymous\",e[e.Instantiated=131072]=\"Instantiated\",e[e.FromSignature=262144]=\"FromSignature\",e[e.ObjectLiteral=524288]=\"ObjectLiteral\",e[e.FreshObjectLiteral=1048576]=\"FreshObjectLiteral\",e[e.ContainsUndefinedOrNull=2097152]=\"ContainsUndefinedOrNull\",e[e.ContainsObjectLiteral=4194304]=\"ContainsObjectLiteral\",e[e.ContainsAnyFunctionType=8388608]=\"ContainsAnyFunctionType\",e[e.ESSymbol=16777216]=\"ESSymbol\",e[e.ThisType=33554432]=\"ThisType\",e[e.ObjectLiteralPatternWithComputedProperties=67108864]=\"ObjectLiteralPatternWithComputedProperties\",e[e.Intrinsic=16777343]=\"Intrinsic\",e[e.Primitive=16777726]=\"Primitive\",e[e.StringLike=258]=\"StringLike\",e[e.NumberLike=132]=\"NumberLike\",e[e.ObjectType=80896]=\"ObjectType\",e[e.UnionOrIntersection=49152]=\"UnionOrIntersection\",e[e.StructuredType=130048]=\"StructuredType\",e[e.RequiresWidening=6291456]=\"RequiresWidening\",e[e.PropagatingFlags=14680064]=\"PropagatingFlags\"}(e.TypeFlags||(e.TypeFlags={}));e.TypeFlags;!function(e){e[e.Call=0]=\"Call\",e[e.Construct=1]=\"Construct\"}(e.SignatureKind||(e.SignatureKind={}));e.SignatureKind;!function(e){e[e.String=0]=\"String\",e[e.Number=1]=\"Number\"}(e.IndexKind||(e.IndexKind={}));e.IndexKind;!function(e){e[e.None=0]=\"None\",e[e.ExportsProperty=1]=\"ExportsProperty\",e[e.ModuleExports=2]=\"ModuleExports\",e[e.PrototypeProperty=3]=\"PrototypeProperty\",e[e.ThisProperty=4]=\"ThisProperty\"}(e.SpecialPropertyAssignmentKind||(e.SpecialPropertyAssignmentKind={}));e.SpecialPropertyAssignmentKind;!function(e){e[e.Warning=0]=\"Warning\",e[e.Error=1]=\"Error\",e[e.Message=2]=\"Message\"}(e.DiagnosticCategory||(e.DiagnosticCategory={}));e.DiagnosticCategory;!function(e){e[e.Classic=1]=\"Classic\",e[e.NodeJs=2]=\"NodeJs\"}(e.ModuleResolutionKind||(e.ModuleResolutionKind={}));e.ModuleResolutionKind;!function(e){e[e.None=0]=\"None\",e[e.CommonJS=1]=\"CommonJS\",e[e.AMD=2]=\"AMD\",e[e.UMD=3]=\"UMD\",e[e.System=4]=\"System\",e[e.ES6=5]=\"ES6\",e[e.ES2015=5]=\"ES2015\"}(e.ModuleKind||(e.ModuleKind={}));e.ModuleKind;!function(e){e[e.None=0]=\"None\",e[e.Preserve=1]=\"Preserve\",e[e.React=2]=\"React\"}(e.JsxEmit||(e.JsxEmit={}));e.JsxEmit;!function(e){e[e.CarriageReturnLineFeed=0]=\"CarriageReturnLineFeed\",e[e.LineFeed=1]=\"LineFeed\"}(e.NewLineKind||(e.NewLineKind={}));e.NewLineKind;!function(e){e[e.ES3=0]=\"ES3\",e[e.ES5=1]=\"ES5\",e[e.ES6=2]=\"ES6\",e[e.ES2015=2]=\"ES2015\",e[e.Latest=2]=\"Latest\"}(e.ScriptTarget||(e.ScriptTarget={}));e.ScriptTarget;!function(e){e[e.Standard=0]=\"Standard\",e[e.JSX=1]=\"JSX\"}(e.LanguageVariant||(e.LanguageVariant={}));e.LanguageVariant;!function(e){e[e.Simple=0]=\"Simple\",e[e.Pretty=1]=\"Pretty\"}(e.DiagnosticStyle||(e.DiagnosticStyle={}));e.DiagnosticStyle;!function(e){e[e.nullCharacter=0]=\"nullCharacter\",e[e.maxAsciiCharacter=127]=\"maxAsciiCharacter\",e[e.lineFeed=10]=\"lineFeed\",e[e.carriageReturn=13]=\"carriageReturn\",e[e.lineSeparator=8232]=\"lineSeparator\",e[e.paragraphSeparator=8233]=\"paragraphSeparator\",e[e.nextLine=133]=\"nextLine\",e[e.space=32]=\"space\",e[e.nonBreakingSpace=160]=\"nonBreakingSpace\",e[e.enQuad=8192]=\"enQuad\",e[e.emQuad=8193]=\"emQuad\",e[e.enSpace=8194]=\"enSpace\",e[e.emSpace=8195]=\"emSpace\",e[e.threePerEmSpace=8196]=\"threePerEmSpace\",e[e.fourPerEmSpace=8197]=\"fourPerEmSpace\",e[e.sixPerEmSpace=8198]=\"sixPerEmSpace\",e[e.figureSpace=8199]=\"figureSpace\",e[e.punctuationSpace=8200]=\"punctuationSpace\",e[e.thinSpace=8201]=\"thinSpace\",e[e.hairSpace=8202]=\"hairSpace\",e[e.zeroWidthSpace=8203]=\"zeroWidthSpace\",e[e.narrowNoBreakSpace=8239]=\"narrowNoBreakSpace\",e[e.ideographicSpace=12288]=\"ideographicSpace\",e[e.mathematicalSpace=8287]=\"mathematicalSpace\",e[e.ogham=5760]=\"ogham\",e[e._=95]=\"_\",e[e.$=36]=\"$\",e[e._0=48]=\"_0\",e[e._1=49]=\"_1\",e[e._2=50]=\"_2\",e[e._3=51]=\"_3\",e[e._4=52]=\"_4\",e[e._5=53]=\"_5\",e[e._6=54]=\"_6\",e[e._7=55]=\"_7\",e[e._8=56]=\"_8\",e[e._9=57]=\"_9\",e[e.a=97]=\"a\",e[e.b=98]=\"b\",e[e.c=99]=\"c\",e[e.d=100]=\"d\",e[e.e=101]=\"e\",e[e.f=102]=\"f\",e[e.g=103]=\"g\",e[e.h=104]=\"h\",e[e.i=105]=\"i\",e[e.j=106]=\"j\",e[e.k=107]=\"k\",e[e.l=108]=\"l\",e[e.m=109]=\"m\",e[e.n=110]=\"n\",e[e.o=111]=\"o\",e[e.p=112]=\"p\",e[e.q=113]=\"q\",e[e.r=114]=\"r\",e[e.s=115]=\"s\",e[e.t=116]=\"t\",e[e.u=117]=\"u\",e[e.v=118]=\"v\",e[e.w=119]=\"w\",e[e.x=120]=\"x\",e[e.y=121]=\"y\",e[e.z=122]=\"z\",e[e.A=65]=\"A\",e[e.B=66]=\"B\",e[e.C=67]=\"C\",e[e.D=68]=\"D\",e[e.E=69]=\"E\",e[e.F=70]=\"F\",e[e.G=71]=\"G\",e[e.H=72]=\"H\",e[e.I=73]=\"I\",e[e.J=74]=\"J\",e[e.K=75]=\"K\",e[e.L=76]=\"L\",e[e.M=77]=\"M\",e[e.N=78]=\"N\",e[e.O=79]=\"O\",e[e.P=80]=\"P\",e[e.Q=81]=\"Q\",e[e.R=82]=\"R\",e[e.S=83]=\"S\",e[e.T=84]=\"T\",e[e.U=85]=\"U\",e[e.V=86]=\"V\",e[e.W=87]=\"W\",e[e.X=88]=\"X\",e[e.Y=89]=\"Y\",e[e.Z=90]=\"Z\",e[e.ampersand=38]=\"ampersand\",e[e.asterisk=42]=\"asterisk\",e[e.at=64]=\"at\",e[e.backslash=92]=\"backslash\",e[e.backtick=96]=\"backtick\",e[e.bar=124]=\"bar\",e[e.caret=94]=\"caret\",e[e.closeBrace=125]=\"closeBrace\",e[e.closeBracket=93]=\"closeBracket\",e[e.closeParen=41]=\"closeParen\",e[e.colon=58]=\"colon\",e[e.comma=44]=\"comma\",e[e.dot=46]=\"dot\",e[e.doubleQuote=34]=\"doubleQuote\",e[e.equals=61]=\"equals\",e[e.exclamation=33]=\"exclamation\",e[e.greaterThan=62]=\"greaterThan\",e[e.hash=35]=\"hash\",e[e.lessThan=60]=\"lessThan\",e[e.minus=45]=\"minus\",e[e.openBrace=123]=\"openBrace\",e[e.openBracket=91]=\"openBracket\",e[e.openParen=40]=\"openParen\",e[e.percent=37]=\"percent\",e[e.plus=43]=\"plus\",e[e.question=63]=\"question\",e[e.semicolon=59]=\"semicolon\",e[e.singleQuote=39]=\"singleQuote\",e[e.slash=47]=\"slash\",e[e.tilde=126]=\"tilde\",e[e.backspace=8]=\"backspace\",e[e.formFeed=12]=\"formFeed\",e[e.byteOrderMark=65279]=\"byteOrderMark\",e[e.tab=9]=\"tab\",e[e.verticalTab=11]=\"verticalTab\"}(e.CharacterCodes||(e.CharacterCodes={}));e.CharacterCodes}(o||(o={}));var o;!function(e){function t(e){function t(e){for(var t in u)e(t,u[t])}function n(e){return u[s(e)]}function r(e,t){u[s(e)]=t}function i(e){return g(u,s(e))}function a(e){delete u[s(e)]}function o(){u={}}function s(t){return e?e(t):t}var u={};return{get:n,set:r,contains:i,remove:a,forEachValue:t,clear:o}}function n(e,t,n){return n(G(e)?H(e):Q(e,t))}function r(e,t){if(e)for(var n=0,r=e.length;n<r;n++){var i=t(e[n],n);if(i)return i}}function i(e,t){if(e)for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i===t)return!0}return!1}function a(e,t){if(e)for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}function o(e,t){var n=0;if(e)for(var r=0,i=e;r<i.length;r++){var a=i[r];t(a)&&n++}return n}function s(e,t){var n;if(e){n=[];for(var r=0,i=e;r<i.length;r++){var a=i[r];t(a)&&n.push(a)}}return n}function u(e,t){var n;if(e){n=[];for(var r=0,i=e;r<i.length;r++){var a=i[r];n.push(t(a))}}return n}function c(e,t){return t&&t.length?e&&e.length?e.concat(t):t:e}function l(e){var t;if(e){t=[];for(var n=0,r=e;n<r.length;n++){var a=r[n];i(t,a)||t.push(a)}}return t}function p(e,t){for(var n=0,r=0,i=e;r<i.length;r++){n+=i[r][t]}return n}function f(e,t){if(e&&t)for(var n=0,r=t;n<r.length;n++){var i=r[n];e.push(i)}}function d(e,t,n,r){for(;n<r;){if(e[n]!==t[n])return!1;n++}return!0}function m(e){if(0!==e.length)return e[e.length-1]}function h(e,t){for(var n=0,r=e.length-1;n<=r;){var i=n+(r-n>>1),a=e[i];if(a===t)return i;a>t?r=i-1:n=i+1}return~n}function y(e,t,n){if(e){var r=e.length;if(r>0){var i=0,a=arguments.length<=2?e[i]:n;for(i++;i<r;)a=t(a,e[i]),i++;return a}}return n}function _(e,t,n){if(e){var r=e.length-1;if(r>=0){var i=arguments.length<=2?e[r]:n;for(r--;r>=0;)i=t(i,e[r]),r--;return i}}return n}function g(e,t){return he.call(e,t)}function v(e,t){return he.call(e,t)?e[t]:void 0}function b(e){for(var t in e)if(g(e,t))return!1;return!0}function S(e){var t={};for(var n in e)t[n]=e[n];return t}function A(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)g(n,r)||(n[r]=t[r]);return n}function T(e,t){var n;for(var r in e)if(n=t(e[r]))break;return n}function E(e,t){var n;for(var r in e)if(n=t(r))break;return n}function C(e,t){return g(e,t)?e[t]:void 0}function N(e,t){for(var n in e)t[n]=e[n]}function w(e,t){var n={};return r(e,function(e){n[t(e)]=e}),n}function k(e,t,n){var r=n;if(e)for(var i in e)g(e,i)&&(r=t(r,e[i],String(i)));return r}function x(e){return Array.isArray?Array.isArray(e):e instanceof Array}function R(e){var t;return function(){return e&&(t=e(),e=void 0),t}}function I(e,t,n){return n=n||0,e.replace(/{(\\d+)}/g,function(e,r){return t[+r+n]})}function D(t){return e.localizedDiagnosticMessages&&e.localizedDiagnosticMessages[t.key]?e.localizedDiagnosticMessages[t.key]:t.message}function M(e,t,n,r){var i=t+n;ge.assert(t>=0,\"start must be non-negative, is \"+t),ge.assert(n>=0,\"length must be non-negative, is \"+n),e&&(ge.assert(t<=e.text.length,\"start must be within the bounds of the file. \"+t+\" > \"+e.text.length),ge.assert(i<=e.text.length,\"end must be the bounds of the file. \"+i+\" > \"+e.text.length));var a=D(r);return arguments.length>4&&(a=I(a,arguments,4)),{file:e,start:t,length:n,messageText:a,category:r.category,code:r.code}}function P(e){var t=D(e);return arguments.length>1&&(t=I(t,arguments,1)),{file:void 0,start:void 0,length:void 0,messageText:t,category:e.category,code:e.code}}function L(e,t){var n=D(t);return arguments.length>2&&(n=I(n,arguments,2)),{messageText:n,category:t.category,code:t.code,next:e}}function O(e,t){for(var n=e;n.next;)n=n.next;return n.next=t,e}function U(e,t){return e===t?0:void 0===e?-1:void 0===t?1:e<t?-1:1}function F(e){return e.file?e.file.fileName:void 0}function B(e,t){return U(F(e),F(t))||U(e.start,t.start)||U(e.length,t.length)||U(e.code,t.code)||K(e.messageText,t.messageText)||0}function K(e,t){for(;e&&t;){var n=\"string\"==typeof e?e:e.messageText,r=\"string\"==typeof t?t:t.messageText,i=U(n,r);if(i)return i;e=\"string\"==typeof e?void 0:e.next,t=\"string\"==typeof t?void 0:t.next}return e||t?e?1:-1:0}function V(e){return j(e.sort(B))}function j(e){if(e.length<2)return e;for(var t=[e[0]],n=e[0],r=1;r<e.length;r++){var i=e[r];0===B(i,n)||(t.push(i),n=i)}return t}function W(e){return e.replace(/\\\\/g,\"/\")}function q(e){if(47===e.charCodeAt(0)){if(47!==e.charCodeAt(1))return 1;var t=e.indexOf(\"/\",2);if(t<0)return 2;var n=e.indexOf(\"/\",t+1);return n<0?t+1:n+1}if(58===e.charCodeAt(1))return 47===e.charCodeAt(2)?3:2;if(0===e.lastIndexOf(\"file:///\",0))return\"file:///\".length;var r=e.indexOf(\"://\");return r!==-1?r+\"://\".length:0}function z(t,n){for(var r=t.substr(n).split(e.directorySeparator),i=[],a=0,o=r;a<o.length;a++){var s=o[a];\".\"!==s&&(\"..\"===s&&i.length>0&&\"..\"!==m(i)?i.pop():s&&i.push(s))}return i}function H(t){t=W(t);var n=q(t),r=z(t,n);return t.substr(0,n)+r.join(e.directorySeparator)}function Y(t){return t.substr(0,Math.max(q(t),t.lastIndexOf(e.directorySeparator)))}function J(e){return e&&!G(e)&&e.indexOf(\"://\")!==-1}function G(e){return 0!==q(e)}function X(e,t){var n=z(e,t);return[e.substr(0,t)].concat(n)}function $(e,t){e=W(e);var n=q(e);return 0===n&&(e=ie(W(t),e),n=q(e)),X(e,n)}function Q(e,t){return Z($(e,t))}function Z(t){if(t&&t.length)return t[0]+t.slice(1).join(e.directorySeparator)}function ee(t){for(var n=t.length,r=t.indexOf(\"://\")+\"://\".length;r<n&&47===t.charCodeAt(r);)r++;if(r===n)return[t];var i=t.indexOf(e.directorySeparator,r);return i!==-1?(r=i+1,X(t,r)):[t+e.directorySeparator]}function te(e,t){return J(e)?ee(e):$(e,t)}function ne(t,n,r,i,a){var o=te(n,r),s=te(t,r);s.length>1&&\"\"===m(s)&&s.length--;var u;for(u=0;u<o.length&&u<s.length&&i(s[u])===i(o[u]);u++);if(u){for(var c=\"\",l=o.slice(u,o.length);u<s.length;u++)\"\"!==s[u]&&(c=c+\"..\"+e.directorySeparator);return c+l.join(e.directorySeparator)}var p=Z(o);return a&&G(p)&&(p=\"file:///\"+p),p}function re(t){if(void 0!==t){var n=t.lastIndexOf(e.directorySeparator);return n<0?t:t.substring(n+1)}}function ie(t,n){return t&&t.length?n&&n.length?0!==q(n)?n:t.charAt(t.length-1)===e.directorySeparator?t+n:t+e.directorySeparator+n:t:n}function ae(e,t){var n=e.length,r=t.length;return n>r&&e.substr(n-r,r)===t}function oe(t){return t&&t.allowJs?ye:e.supportedTypeScriptExtensions}function se(e,t){if(!e)return!1;for(var n=0,r=oe(t);n<r.length;n++){if(ae(e,r[n]))return!0}return!1}function ue(e){for(var t=0,n=_e;t<n.length;t++){var r=n[t];if(ae(e,r))return e.substr(0,e.length-r.length)}return e}function ce(e,t){this.flags=e,this.name=t,this.declarations=void 0}function le(e,t){this.flags=t}function pe(e){}function fe(e,t,n){this.kind=e,this.pos=t,this.end=n,this.flags=0,this.parent=void 0}function de(e,t){for(var n=[],r=0,i=t;r<i.length;r++){var a=i[r];a!==e&&n.push(a)}return n}function me(e){return e?function(e){return e}:function(e){return e.toLowerCase()}}!function(e){e[e.False=0]=\"False\",e[e.Maybe=1]=\"Maybe\",e[e.True=-1]=\"True\"}(e.Ternary||(e.Ternary={}));e.Ternary;e.createFileMap=t,e.toPath=n,function(e){e[e.LessThan=-1]=\"LessThan\",e[e.EqualTo=0]=\"EqualTo\",e[e.GreaterThan=1]=\"GreaterThan\"}(e.Comparison||(e.Comparison={}));e.Comparison;e.forEach=r,e.contains=i,e.indexOf=a,e.countWhere=o,e.filter=s,e.map=u,e.concatenate=c,e.deduplicate=l,e.sum=p,e.addRange=f,e.rangeEquals=d,e.lastOrUndefined=m,e.binarySearch=h,e.reduceLeft=y,e.reduceRight=_;var he=Object.prototype.hasOwnProperty;e.hasProperty=g,e.getProperty=v,e.isEmpty=b,e.clone=S,e.extend=A,e.forEachValue=T,e.forEachKey=E,e.lookUp=C,e.copyMap=N,e.arrayToMap=w,e.reduceProperties=k,e.isArray=x,e.memoize=R,e.localizedDiagnosticMessages=void 0,e.getLocaleSpecificMessage=D,e.createFileDiagnostic=M,e.createCompilerDiagnostic=P,e.chainDiagnosticMessages=L,e.concatenateDiagnosticMessageChains=O,e.compareValues=U,e.compareDiagnostics=B,e.sortAndDeduplicateDiagnostics=V,e.deduplicateSortedDiagnostics=j,e.normalizeSlashes=W,e.getRootLength=q,e.directorySeparator=\"/\",e.normalizePath=H,e.getDirectoryPath=Y,e.isUrl=J,e.isRootedDiskPath=G,e.getNormalizedPathComponents=$,e.getNormalizedAbsolutePath=Q,e.getNormalizedPathFromPathComponents=Z,e.getRelativePathToDirectoryOrUrl=ne,e.getBaseFileName=re,e.combinePaths=ie,e.fileExtensionIs=ae,e.supportedTypeScriptExtensions=[\".ts\",\".tsx\",\".d.ts\"],e.supportedJavascriptExtensions=[\".js\",\".jsx\"];var ye=e.supportedTypeScriptExtensions.concat(e.supportedJavascriptExtensions);e.getSupportedExtensions=oe,e.isSupportedSourceFileName=se;var _e=[\".d.ts\",\".ts\",\".js\",\".tsx\",\".jsx\"];e.removeFileExtension=ue,e.objectAllocator={getNodeConstructor:function(){return fe},getSourceFileConstructor:function(){return fe},getSymbolConstructor:function(){return ce},getTypeConstructor:function(){return le},getSignatureConstructor:function(){return pe}},function(e){e[e.None=0]=\"None\",e[e.Normal=1]=\"Normal\",e[e.Aggressive=2]=\"Aggressive\",e[e.VeryAggressive=3]=\"VeryAggressive\"}(e.AssertionLevel||(e.AssertionLevel={}));var ge;e.AssertionLevel;!function(e){function t(e){return i>=e}function n(e,t,n){if(!e){var r=\"\";throw n&&(r=\"\\r\\nVerbose Debug Information: \"+n()),new Error(\"Debug Failure. False expression: \"+(t||\"\")+r)}}function r(t){e.assert(!1,t)}var i=0;e.shouldAssert=t,e.assert=n,e.fail=r}(ge=e.Debug||(e.Debug={})),e.copyListRemovingItem=de,e.createGetCanonicalFileName=me}(o||(o={}));var o;!function(e){e.sys=function(){return\"undefined\"!=typeof WScript&&\"function\"==typeof ActiveXObject?function(){function t(e,t){if(o.FileExists(e)){s.Open();try{if(t)s.Charset=t,s.LoadFromFile(e);else{s.Charset=\"x-ansi\",s.LoadFromFile(e);var n=s.ReadText(2)||\"\";s.Position=0,s.Charset=n.length>=2&&(255===n.charCodeAt(0)&&254===n.charCodeAt(1)||254===n.charCodeAt(0)&&255===n.charCodeAt(1))?\"unicode\":\"utf-8\"}return s.ReadText()}catch(e){throw e}finally{s.Close()}}}function n(e,t,n){s.Open(),u.Open();try{s.Charset=\"utf-8\",s.WriteText(t),s.Position=n?0:3,s.CopyTo(u),u.SaveToFile(e,2)}finally{u.Close(),s.Close()}}function r(e){return e.toLowerCase()}function i(e){for(var t=[],n=new Enumerator(e);!n.atEnd();n.moveNext())t.push(n.item().Name);return t.sort()}function a(t,n,a){function s(t){for(var c=o.GetFolder(t||\".\"),l=i(c.files),p=0,f=l;p<f.length;p++){var d=f[p],m=e.combinePaths(t,d);n&&!e.fileExtensionIs(m,n)||e.contains(a,r(m))||u.push(m)}for(var h=i(c.subfolders),y=0,_=h;y<_.length;y++){var d=_[y],g=e.combinePaths(t,d);e.contains(a,r(g))||s(g)}}var u=[];return a=e.map(a,function(n){return r(e.combinePaths(t,n))}),s(t),u}var o=new ActiveXObject(\"Scripting.FileSystemObject\"),s=new ActiveXObject(\"ADODB.Stream\");s.Type=2;var u=new ActiveXObject(\"ADODB.Stream\");u.Type=1;for(var c=[],l=0;l<WScript.Arguments.length;l++)c[l]=WScript.Arguments.Item(l);return{args:c,newLine:\"\\r\\n\",useCaseSensitiveFileNames:!1,write:function(e){WScript.StdOut.Write(e)},readFile:t,writeFile:n,resolvePath:function(e){return o.GetAbsolutePathName(e)},fileExists:function(e){return o.FileExists(e)},directoryExists:function(e){return o.FolderExists(e)},createDirectory:function(e){this.directoryExists(e)||o.CreateFolder(e)},getExecutingFilePath:function(){return WScript.ScriptFullName},getCurrentDirectory:function(){return new ActiveXObject(\"WScript.Shell\").CurrentDirectory},readDirectory:a,exit:function(e){try{WScript.Quit(e)}catch(e){}}}}():void 0!==t&&t.nextTick&&!t.browser?function(){function a(){return parseInt(t.version.charAt(1))>=4}function o(e,t){if(l.existsSync(e)){var n=l.readFileSync(e),r=n.length;if(r>=2&&254===n[0]&&255===n[1]){r&=-2;for(var i=0;i<r;i+=2){var a=n[i];n[i]=n[i+1],n[i+1]=a}return n.toString(\"utf16le\",2)}return r>=2&&255===n[0]&&254===n[1]?n.toString(\"utf16le\",2):r>=3&&239===n[0]&&187===n[1]&&191===n[2]?n.toString(\"utf8\",3):n.toString(\"utf8\")}}function s(e,t,n){n&&(t=\"\\ufeff\"+t);var r;try{r=l.openSync(e,\"w\"),l.writeSync(r,t,void 0,\"utf8\")}finally{void 0!==r&&l.closeSync(r)}}function u(e){return y?e:e.toLowerCase()}function c(t,n,r){function i(t){for(var o=l.readdirSync(t||\".\").sort(),s=[],c=0,p=o;c<p.length;c++){var f=p[c],d=e.combinePaths(t,f);if(!e.contains(r,u(d))){var m=l.statSync(d);m.isFile()?n&&!e.fileExtensionIs(d,n)||a.push(d):m.isDirectory()&&s.push(d)}}for(var h=0,y=s;h<y.length;h++){var f=y[h];i(f)}}var a=[];return r=e.map(r,function(n){return u(e.combinePaths(t,n))}),i(t),a}var l=n(47),p=n(404),f=n(403),d=function(t,n){function r(e){return l.statSync(e).mtime}function i(e){var t=c[e];t&&l.stat(t.filePath,function(e,n){e?t.callback(t.filePath):t.mtime.getTime()!==n.mtime.getTime()&&(t.mtime=r(t.filePath),t.callback(t.filePath,0===t.mtime.getTime()))})}function a(){u=setInterval(function(){for(var e=0,t=p,r=-1;e<n&&t!==r;)i(t),r<0&&(r=t),t++,t===c.length&&(t=0),e++;p=t},t)}function o(e,t){var n={filePath:e,callback:t,mtime:r(e)};return c.push(n),1===c.length&&a(),n}function s(t){c=e.copyListRemovingItem(t,c)}void 0===t&&(t=2500),void 0===n&&(n=30);var u,c=[],p=0;return{getModifiedTime:r,poll:i,startWatchTimer:a,addFile:o,removeFile:s}}(),m=function(){function t(t){var n=e.getDirectoryPath(t);if(u.contains(n)){var r=u.get(n);r.referenceCount-=1,r.referenceCount<=0&&(r.close(),u.remove(n))}}function n(e){if(u.contains(e)){return void(u.get(e).referenceCount+=1)}var t=l.watch(e,{persistent:!0},function(t,n){return s(t,n,e)});t.referenceCount=1,u.set(e,t)}function r(e,t){c.contains(e)?c.get(e).push(t):c.set(e,[t])}function i(t,i){return r(t,i),n(e.getDirectoryPath(t)),{filePath:t,callback:i}}function a(e){o(e.filePath,e.callback),t(e.filePath)}function o(t,n){if(c.contains(t)){var r=e.copyListRemovingItem(n,c.get(t));0===r.length?c.remove(t):c.set(t,r)}}function s(t,n,r){var i=\"string\"!=typeof n?void 0:e.toPath(n,r,e.createGetCanonicalFileName(e.sys.useCaseSensitiveFileNames));if((\"change\"===t||\"rename\"===t)&&c.contains(i))for(var a=0,o=c.get(i);a<o.length;a++){var s=o[a];s(i)}}var u=e.createFileMap(),c=e.createFileMap();return{addFile:i,removeFile:a}}(),h=f.platform(),y=\"win32\"!==h&&\"win64\"!==h&&\"darwin\"!==h;return{args:t.argv.slice(2),newLine:f.EOL,useCaseSensitiveFileNames:y,write:function(e){t.stdout.write(e)},readFile:o,writeFile:s,watchFile:function(e,t){var n=a()?m:d,r=n.addFile(e,t);return{close:function(){return n.removeFile(r)}}},watchDirectory:function(n,r,i){var o;return o=!a()||\"win32\"!==t.platform&&\"darwin\"!==t.platform?{persistent:!0}:{persistent:!0,recursive:!!i},l.watch(n,o,function(t,i){\"rename\"===t&&r(i?e.normalizePath(e.combinePaths(n,i)):i)})},resolvePath:function(e){return p.resolve(e)},fileExists:function(e){return l.existsSync(e)},directoryExists:function(e){return l.existsSync(e)&&l.statSync(e).isDirectory()},createDirectory:function(e){this.directoryExists(e)||l.mkdirSync(e)},getExecutingFilePath:function(){return r},getCurrentDirectory:function(){return t.cwd()},readDirectory:c,getMemoryUsage:function(){return i.gc&&i.gc(),t.memoryUsage().heapUsed},exit:function(e){t.exit(e)}}}():\"undefined\"!=typeof ChakraHost?function(){return{newLine:ChakraHost.newLine||\"\\r\\n\",args:ChakraHost.args,useCaseSensitiveFileNames:!!ChakraHost.useCaseSensitiveFileNames,write:ChakraHost.echo,readFile:function(e,t){return ChakraHost.readFile(e)},writeFile:function(e,t,n){n&&(t=\"\\ufeff\"+t),ChakraHost.writeFile(e,t)},resolvePath:ChakraHost.resolvePath,fileExists:ChakraHost.fileExists,directoryExists:ChakraHost.directoryExists,createDirectory:ChakraHost.createDirectory,getExecutingFilePath:function(){return ChakraHost.executingFile},getCurrentDirectory:function(){return ChakraHost.currentDirectory},readDirectory:ChakraHost.readDirectory,exit:ChakraHost.quit}}():void 0}()}(o||(o={}));var o;!function(e){e.Diagnostics={Unterminated_string_literal:{code:1002,category:e.DiagnosticCategory.Error,key:\"Unterminated_string_literal_1002\",message:\"Unterminated string literal.\"},Identifier_expected:{code:1003,category:e.DiagnosticCategory.Error,key:\"Identifier_expected_1003\",message:\"Identifier expected.\"},_0_expected:{code:1005,category:e.DiagnosticCategory.Error,key:\"_0_expected_1005\",message:\"'{0}' expected.\"},A_file_cannot_have_a_reference_to_itself:{code:1006,category:e.DiagnosticCategory.Error,key:\"A_file_cannot_have_a_reference_to_itself_1006\",message:\"A file cannot have a reference to itself.\"},Trailing_comma_not_allowed:{code:1009,category:e.DiagnosticCategory.Error,key:\"Trailing_comma_not_allowed_1009\",message:\"Trailing comma not allowed.\"},Asterisk_Slash_expected:{code:1010,category:e.DiagnosticCategory.Error,key:\"Asterisk_Slash_expected_1010\",message:\"'*/' expected.\"},Unexpected_token:{code:1012,category:e.DiagnosticCategory.Error,key:\"Unexpected_token_1012\",message:\"Unexpected token.\"},A_rest_parameter_must_be_last_in_a_parameter_list:{code:1014,category:e.DiagnosticCategory.Error,key:\"A_rest_parameter_must_be_last_in_a_parameter_list_1014\",message:\"A rest parameter must be last in a parameter list.\"},Parameter_cannot_have_question_mark_and_initializer:{code:1015,category:e.DiagnosticCategory.Error,key:\"Parameter_cannot_have_question_mark_and_initializer_1015\",message:\"Parameter cannot have question mark and initializer.\"},A_required_parameter_cannot_follow_an_optional_parameter:{code:1016,category:e.DiagnosticCategory.Error,key:\"A_required_parameter_cannot_follow_an_optional_parameter_1016\",message:\"A required parameter cannot follow an optional parameter.\"},An_index_signature_cannot_have_a_rest_parameter:{code:1017,category:e.DiagnosticCategory.Error,key:\"An_index_signature_cannot_have_a_rest_parameter_1017\",message:\"An index signature cannot have a rest parameter.\"},An_index_signature_parameter_cannot_have_an_accessibility_modifier:{code:1018,category:e.DiagnosticCategory.Error,key:\"An_index_signature_parameter_cannot_have_an_accessibility_modifier_1018\",message:\"An index signature parameter cannot have an accessibility modifier.\"},An_index_signature_parameter_cannot_have_a_question_mark:{code:1019,category:e.DiagnosticCategory.Error,key:\"An_index_signature_parameter_cannot_have_a_question_mark_1019\",message:\"An index signature parameter cannot have a question mark.\"},An_index_signature_parameter_cannot_have_an_initializer:{code:1020,category:e.DiagnosticCategory.Error,key:\"An_index_signature_parameter_cannot_have_an_initializer_1020\",message:\"An index signature parameter cannot have an initializer.\"},An_index_signature_must_have_a_type_annotation:{code:1021,category:e.DiagnosticCategory.Error,key:\"An_index_signature_must_have_a_type_annotation_1021\",message:\"An index signature must have a type annotation.\"},An_index_signature_parameter_must_have_a_type_annotation:{code:1022,category:e.DiagnosticCategory.Error,key:\"An_index_signature_parameter_must_have_a_type_annotation_1022\",message:\"An index signature parameter must have a type annotation.\"},An_index_signature_parameter_type_must_be_string_or_number:{code:1023,category:e.DiagnosticCategory.Error,key:\"An_index_signature_parameter_type_must_be_string_or_number_1023\",message:\"An index signature parameter type must be 'string' or 'number'.\"},Accessibility_modifier_already_seen:{code:1028,category:e.DiagnosticCategory.Error,key:\"Accessibility_modifier_already_seen_1028\",message:\"Accessibility modifier already seen.\"},_0_modifier_must_precede_1_modifier:{code:1029,category:e.DiagnosticCategory.Error,key:\"_0_modifier_must_precede_1_modifier_1029\",message:\"'{0}' modifier must precede '{1}' modifier.\"},_0_modifier_already_seen:{code:1030,category:e.DiagnosticCategory.Error,key:\"_0_modifier_already_seen_1030\",message:\"'{0}' modifier already seen.\"},_0_modifier_cannot_appear_on_a_class_element:{code:1031,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_appear_on_a_class_element_1031\",message:\"'{0}' modifier cannot appear on a class element.\"},super_must_be_followed_by_an_argument_list_or_member_access:{code:1034,category:e.DiagnosticCategory.Error,key:\"super_must_be_followed_by_an_argument_list_or_member_access_1034\",message:\"'super' must be followed by an argument list or member access.\"},Only_ambient_modules_can_use_quoted_names:{code:1035,category:e.DiagnosticCategory.Error,key:\"Only_ambient_modules_can_use_quoted_names_1035\",message:\"Only ambient modules can use quoted names.\"},Statements_are_not_allowed_in_ambient_contexts:{code:1036,category:e.DiagnosticCategory.Error,key:\"Statements_are_not_allowed_in_ambient_contexts_1036\",message:\"Statements are not allowed in ambient contexts.\"},A_declare_modifier_cannot_be_used_in_an_already_ambient_context:{code:1038,category:e.DiagnosticCategory.Error,key:\"A_declare_modifier_cannot_be_used_in_an_already_ambient_context_1038\",message:\"A 'declare' modifier cannot be used in an already ambient context.\"},Initializers_are_not_allowed_in_ambient_contexts:{code:1039,category:e.DiagnosticCategory.Error,key:\"Initializers_are_not_allowed_in_ambient_contexts_1039\",message:\"Initializers are not allowed in ambient contexts.\"},_0_modifier_cannot_be_used_in_an_ambient_context:{code:1040,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_be_used_in_an_ambient_context_1040\",message:\"'{0}' modifier cannot be used in an ambient context.\"},_0_modifier_cannot_be_used_with_a_class_declaration:{code:1041,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_be_used_with_a_class_declaration_1041\",message:\"'{0}' modifier cannot be used with a class declaration.\"},_0_modifier_cannot_be_used_here:{code:1042,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_be_used_here_1042\",message:\"'{0}' modifier cannot be used here.\"},_0_modifier_cannot_appear_on_a_data_property:{code:1043,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_appear_on_a_data_property_1043\",message:\"'{0}' modifier cannot appear on a data property.\"},_0_modifier_cannot_appear_on_a_module_element:{code:1044,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_appear_on_a_module_element_1044\",message:\"'{0}' modifier cannot appear on a module element.\"},A_0_modifier_cannot_be_used_with_an_interface_declaration:{code:1045,category:e.DiagnosticCategory.Error,key:\"A_0_modifier_cannot_be_used_with_an_interface_declaration_1045\",message:\"A '{0}' modifier cannot be used with an interface declaration.\"},A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file:{code:1046,category:e.DiagnosticCategory.Error,key:\"A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file_1046\",message:\"A 'declare' modifier is required for a top level declaration in a .d.ts file.\"},A_rest_parameter_cannot_be_optional:{code:1047,category:e.DiagnosticCategory.Error,key:\"A_rest_parameter_cannot_be_optional_1047\",message:\"A rest parameter cannot be optional.\"},A_rest_parameter_cannot_have_an_initializer:{code:1048,category:e.DiagnosticCategory.Error,key:\"A_rest_parameter_cannot_have_an_initializer_1048\",message:\"A rest parameter cannot have an initializer.\"},A_set_accessor_must_have_exactly_one_parameter:{code:1049,category:e.DiagnosticCategory.Error,key:\"A_set_accessor_must_have_exactly_one_parameter_1049\",message:\"A 'set' accessor must have exactly one parameter.\"},A_set_accessor_cannot_have_an_optional_parameter:{code:1051,category:e.DiagnosticCategory.Error,key:\"A_set_accessor_cannot_have_an_optional_parameter_1051\",message:\"A 'set' accessor cannot have an optional parameter.\"},A_set_accessor_parameter_cannot_have_an_initializer:{code:1052,category:e.DiagnosticCategory.Error,key:\"A_set_accessor_parameter_cannot_have_an_initializer_1052\",message:\"A 'set' accessor parameter cannot have an initializer.\"},A_set_accessor_cannot_have_rest_parameter:{code:1053,category:e.DiagnosticCategory.Error,key:\"A_set_accessor_cannot_have_rest_parameter_1053\",message:\"A 'set' accessor cannot have rest parameter.\"},A_get_accessor_cannot_have_parameters:{code:1054,category:e.DiagnosticCategory.Error,key:\"A_get_accessor_cannot_have_parameters_1054\",message:\"A 'get' accessor cannot have parameters.\"},Type_0_is_not_a_valid_async_function_return_type:{code:1055,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_a_valid_async_function_return_type_1055\",message:\"Type '{0}' is not a valid async function return type.\"},Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher:{code:1056,category:e.DiagnosticCategory.Error,key:\"Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher_1056\",message:\"Accessors are only available when targeting ECMAScript 5 and higher.\"},An_async_function_or_method_must_have_a_valid_awaitable_return_type:{code:1057,category:e.DiagnosticCategory.Error,key:\"An_async_function_or_method_must_have_a_valid_awaitable_return_type_1057\",message:\"An async function or method must have a valid awaitable return type.\"},Operand_for_await_does_not_have_a_valid_callable_then_member:{code:1058,category:e.DiagnosticCategory.Error,key:\"Operand_for_await_does_not_have_a_valid_callable_then_member_1058\",message:\"Operand for 'await' does not have a valid callable 'then' member.\"},Return_expression_in_async_function_does_not_have_a_valid_callable_then_member:{code:1059,category:e.DiagnosticCategory.Error,key:\"Return_expression_in_async_function_does_not_have_a_valid_callable_then_member_1059\",message:\"Return expression in async function does not have a valid callable 'then' member.\"},Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member:{code:1060,category:e.DiagnosticCategory.Error,key:\"Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member_1060\",message:\"Expression body for async arrow function does not have a valid callable 'then' member.\"},Enum_member_must_have_initializer:{code:1061,category:e.DiagnosticCategory.Error,key:\"Enum_member_must_have_initializer_1061\",message:\"Enum member must have initializer.\"},_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method:{code:1062,category:e.DiagnosticCategory.Error,key:\"_0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method_1062\",message:\"{0} is referenced directly or indirectly in the fulfillment callback of its own 'then' method.\"},An_export_assignment_cannot_be_used_in_a_namespace:{code:1063,category:e.DiagnosticCategory.Error,key:\"An_export_assignment_cannot_be_used_in_a_namespace_1063\",message:\"An export assignment cannot be used in a namespace.\"},The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type:{code:1064,category:e.DiagnosticCategory.Error,key:\"The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type_1064\",message:\"The return type of an async function or method must be the global Promise<T> type.\"},In_ambient_enum_declarations_member_initializer_must_be_constant_expression:{code:1066,category:e.DiagnosticCategory.Error,key:\"In_ambient_enum_declarations_member_initializer_must_be_constant_expression_1066\",message:\"In ambient enum declarations member initializer must be constant expression.\"},Unexpected_token_A_constructor_method_accessor_or_property_was_expected:{code:1068,category:e.DiagnosticCategory.Error,key:\"Unexpected_token_A_constructor_method_accessor_or_property_was_expected_1068\",message:\"Unexpected token. A constructor, method, accessor, or property was expected.\"},A_0_modifier_cannot_be_used_with_an_import_declaration:{code:1079,category:e.DiagnosticCategory.Error,key:\"A_0_modifier_cannot_be_used_with_an_import_declaration_1079\",message:\"A '{0}' modifier cannot be used with an import declaration.\"},Invalid_reference_directive_syntax:{code:1084,category:e.DiagnosticCategory.Error,key:\"Invalid_reference_directive_syntax_1084\",message:\"Invalid 'reference' directive syntax.\"},Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher:{code:1085,category:e.DiagnosticCategory.Error,key:\"Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_1085\",message:\"Octal literals are not available when targeting ECMAScript 5 and higher.\"},An_accessor_cannot_be_declared_in_an_ambient_context:{code:1086,category:e.DiagnosticCategory.Error,key:\"An_accessor_cannot_be_declared_in_an_ambient_context_1086\",message:\"An accessor cannot be declared in an ambient context.\"},_0_modifier_cannot_appear_on_a_constructor_declaration:{code:1089,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_appear_on_a_constructor_declaration_1089\",message:\"'{0}' modifier cannot appear on a constructor declaration.\"},_0_modifier_cannot_appear_on_a_parameter:{code:1090,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_appear_on_a_parameter_1090\",message:\"'{0}' modifier cannot appear on a parameter.\"},Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:{code:1091,category:e.DiagnosticCategory.Error,key:\"Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091\",message:\"Only a single variable declaration is allowed in a 'for...in' statement.\"},Type_parameters_cannot_appear_on_a_constructor_declaration:{code:1092,category:e.DiagnosticCategory.Error,key:\"Type_parameters_cannot_appear_on_a_constructor_declaration_1092\",message:\"Type parameters cannot appear on a constructor declaration.\"},Type_annotation_cannot_appear_on_a_constructor_declaration:{code:1093,category:e.DiagnosticCategory.Error,key:\"Type_annotation_cannot_appear_on_a_constructor_declaration_1093\",message:\"Type annotation cannot appear on a constructor declaration.\"},An_accessor_cannot_have_type_parameters:{code:1094,category:e.DiagnosticCategory.Error,key:\"An_accessor_cannot_have_type_parameters_1094\",message:\"An accessor cannot have type parameters.\"},A_set_accessor_cannot_have_a_return_type_annotation:{code:1095,category:e.DiagnosticCategory.Error,key:\"A_set_accessor_cannot_have_a_return_type_annotation_1095\",message:\"A 'set' accessor cannot have a return type annotation.\"},An_index_signature_must_have_exactly_one_parameter:{code:1096,category:e.DiagnosticCategory.Error,key:\"An_index_signature_must_have_exactly_one_parameter_1096\",message:\"An index signature must have exactly one parameter.\"},_0_list_cannot_be_empty:{code:1097,category:e.DiagnosticCategory.Error,key:\"_0_list_cannot_be_empty_1097\",message:\"'{0}' list cannot be empty.\"},Type_parameter_list_cannot_be_empty:{code:1098,category:e.DiagnosticCategory.Error,key:\"Type_parameter_list_cannot_be_empty_1098\",message:\"Type parameter list cannot be empty.\"},Type_argument_list_cannot_be_empty:{code:1099,category:e.DiagnosticCategory.Error,key:\"Type_argument_list_cannot_be_empty_1099\",message:\"Type argument list cannot be empty.\"},Invalid_use_of_0_in_strict_mode:{code:1100,category:e.DiagnosticCategory.Error,key:\"Invalid_use_of_0_in_strict_mode_1100\",message:\"Invalid use of '{0}' in strict mode.\"},with_statements_are_not_allowed_in_strict_mode:{code:1101,category:e.DiagnosticCategory.Error,key:\"with_statements_are_not_allowed_in_strict_mode_1101\",message:\"'with' statements are not allowed in strict mode.\"},delete_cannot_be_called_on_an_identifier_in_strict_mode:{code:1102,category:e.DiagnosticCategory.Error,key:\"delete_cannot_be_called_on_an_identifier_in_strict_mode_1102\",message:\"'delete' cannot be called on an identifier in strict mode.\"},A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement:{code:1104,category:e.DiagnosticCategory.Error,key:\"A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement_1104\",message:\"A 'continue' statement can only be used within an enclosing iteration statement.\"},A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:{code:1105,category:e.DiagnosticCategory.Error,key:\"A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement_1105\",message:\"A 'break' statement can only be used within an enclosing iteration or switch statement.\"},Jump_target_cannot_cross_function_boundary:{code:1107,category:e.DiagnosticCategory.Error,key:\"Jump_target_cannot_cross_function_boundary_1107\",message:\"Jump target cannot cross function boundary.\"},A_return_statement_can_only_be_used_within_a_function_body:{code:1108,category:e.DiagnosticCategory.Error,key:\"A_return_statement_can_only_be_used_within_a_function_body_1108\",message:\"A 'return' statement can only be used within a function body.\"},Expression_expected:{code:1109,category:e.DiagnosticCategory.Error,key:\"Expression_expected_1109\",message:\"Expression expected.\"},Type_expected:{code:1110,category:e.DiagnosticCategory.Error,key:\"Type_expected_1110\",message:\"Type expected.\"},A_class_member_cannot_be_declared_optional:{code:1112,category:e.DiagnosticCategory.Error,key:\"A_class_member_cannot_be_declared_optional_1112\",message:\"A class member cannot be declared optional.\"},A_default_clause_cannot_appear_more_than_once_in_a_switch_statement:{code:1113,category:e.DiagnosticCategory.Error,key:\"A_default_clause_cannot_appear_more_than_once_in_a_switch_statement_1113\",message:\"A 'default' clause cannot appear more than once in a 'switch' statement.\"},Duplicate_label_0:{code:1114,category:e.DiagnosticCategory.Error,key:\"Duplicate_label_0_1114\",message:\"Duplicate label '{0}'\"},A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement:{code:1115,category:e.DiagnosticCategory.Error,key:\"A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement_1115\",message:\"A 'continue' statement can only jump to a label of an enclosing iteration statement.\"},A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:{code:1116,category:e.DiagnosticCategory.Error,key:\"A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement_1116\",message:\"A 'break' statement can only jump to a label of an enclosing statement.\"},An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode:{code:1117,category:e.DiagnosticCategory.Error,key:\"An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode_1117\",message:\"An object literal cannot have multiple properties with the same name in strict mode.\"},An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name:{code:1118,category:e.DiagnosticCategory.Error,key:\"An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118\",message:\"An object literal cannot have multiple get/set accessors with the same name.\"},An_object_literal_cannot_have_property_and_accessor_with_the_same_name:{code:1119,category:e.DiagnosticCategory.Error,key:\"An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119\",message:\"An object literal cannot have property and accessor with the same name.\"},An_export_assignment_cannot_have_modifiers:{code:1120,category:e.DiagnosticCategory.Error,key:\"An_export_assignment_cannot_have_modifiers_1120\",message:\"An export assignment cannot have modifiers.\"},Octal_literals_are_not_allowed_in_strict_mode:{code:1121,category:e.DiagnosticCategory.Error,key:\"Octal_literals_are_not_allowed_in_strict_mode_1121\",message:\"Octal literals are not allowed in strict mode.\"},A_tuple_type_element_list_cannot_be_empty:{code:1122,category:e.DiagnosticCategory.Error,key:\"A_tuple_type_element_list_cannot_be_empty_1122\",message:\"A tuple type element list cannot be empty.\"},Variable_declaration_list_cannot_be_empty:{code:1123,category:e.DiagnosticCategory.Error,key:\"Variable_declaration_list_cannot_be_empty_1123\",message:\"Variable declaration list cannot be empty.\"},Digit_expected:{code:1124,category:e.DiagnosticCategory.Error,key:\"Digit_expected_1124\",message:\"Digit expected.\"},Hexadecimal_digit_expected:{code:1125,category:e.DiagnosticCategory.Error,key:\"Hexadecimal_digit_expected_1125\",message:\"Hexadecimal digit expected.\"},Unexpected_end_of_text:{code:1126,category:e.DiagnosticCategory.Error,key:\"Unexpected_end_of_text_1126\",message:\"Unexpected end of text.\"},Invalid_character:{code:1127,category:e.DiagnosticCategory.Error,key:\"Invalid_character_1127\",message:\"Invalid character.\"},Declaration_or_statement_expected:{code:1128,category:e.DiagnosticCategory.Error,key:\"Declaration_or_statement_expected_1128\",message:\"Declaration or statement expected.\"},Statement_expected:{code:1129,category:e.DiagnosticCategory.Error,key:\"Statement_expected_1129\",message:\"Statement expected.\"},case_or_default_expected:{code:1130,category:e.DiagnosticCategory.Error,key:\"case_or_default_expected_1130\",message:\"'case' or 'default' expected.\"},Property_or_signature_expected:{code:1131,category:e.DiagnosticCategory.Error,key:\"Property_or_signature_expected_1131\",message:\"Property or signature expected.\"},Enum_member_expected:{code:1132,category:e.DiagnosticCategory.Error,key:\"Enum_member_expected_1132\",message:\"Enum member expected.\"},Variable_declaration_expected:{code:1134,category:e.DiagnosticCategory.Error,key:\"Variable_declaration_expected_1134\",message:\"Variable declaration expected.\"},Argument_expression_expected:{code:1135,category:e.DiagnosticCategory.Error,key:\"Argument_expression_expected_1135\",message:\"Argument expression expected.\"},Property_assignment_expected:{code:1136,category:e.DiagnosticCategory.Error,key:\"Property_assignment_expected_1136\",message:\"Property assignment expected.\"},Expression_or_comma_expected:{code:1137,category:e.DiagnosticCategory.Error,key:\"Expression_or_comma_expected_1137\",message:\"Expression or comma expected.\"},Parameter_declaration_expected:{code:1138,category:e.DiagnosticCategory.Error,key:\"Parameter_declaration_expected_1138\",message:\"Parameter declaration expected.\"},Type_parameter_declaration_expected:{code:1139,category:e.DiagnosticCategory.Error,key:\"Type_parameter_declaration_expected_1139\",message:\"Type parameter declaration expected.\"},Type_argument_expected:{code:1140,category:e.DiagnosticCategory.Error,key:\"Type_argument_expected_1140\",message:\"Type argument expected.\"},String_literal_expected:{code:1141,category:e.DiagnosticCategory.Error,key:\"String_literal_expected_1141\",message:\"String literal expected.\"},Line_break_not_permitted_here:{code:1142,category:e.DiagnosticCategory.Error,key:\"Line_break_not_permitted_here_1142\",message:\"Line break not permitted here.\"},or_expected:{code:1144,category:e.DiagnosticCategory.Error,key:\"or_expected_1144\",message:\"'{' or ';' expected.\"},Modifiers_not_permitted_on_index_signature_members:{code:1145,category:e.DiagnosticCategory.Error,key:\"Modifiers_not_permitted_on_index_signature_members_1145\",message:\"Modifiers not permitted on index signature members.\"},Declaration_expected:{code:1146,category:e.DiagnosticCategory.Error,key:\"Declaration_expected_1146\",message:\"Declaration expected.\"},Import_declarations_in_a_namespace_cannot_reference_a_module:{code:1147,category:e.DiagnosticCategory.Error,key:\"Import_declarations_in_a_namespace_cannot_reference_a_module_1147\",message:\"Import declarations in a namespace cannot reference a module.\"},Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file:{code:1148,category:e.DiagnosticCategory.Error,key:\"Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting__1148\",message:\"Cannot compile modules unless the '--module' flag is provided with a valid module type. Consider setting the 'module' compiler option in a 'tsconfig.json' file.\"},File_name_0_differs_from_already_included_file_name_1_only_in_casing:{code:1149,category:e.DiagnosticCategory.Error,key:\"File_name_0_differs_from_already_included_file_name_1_only_in_casing_1149\",message:\"File name '{0}' differs from already included file name '{1}' only in casing\"},new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead:{code:1150,category:e.DiagnosticCategory.Error,key:\"new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead_1150\",message:\"'new T[]' cannot be used to create an array. Use 'new Array<T>()' instead.\"},const_declarations_must_be_initialized:{code:1155,category:e.DiagnosticCategory.Error,key:\"const_declarations_must_be_initialized_1155\",message:\"'const' declarations must be initialized\"},const_declarations_can_only_be_declared_inside_a_block:{code:1156,category:e.DiagnosticCategory.Error,key:\"const_declarations_can_only_be_declared_inside_a_block_1156\",message:\"'const' declarations can only be declared inside a block.\"},let_declarations_can_only_be_declared_inside_a_block:{code:1157,category:e.DiagnosticCategory.Error,key:\"let_declarations_can_only_be_declared_inside_a_block_1157\",message:\"'let' declarations can only be declared inside a block.\"},Unterminated_template_literal:{code:1160,category:e.DiagnosticCategory.Error,key:\"Unterminated_template_literal_1160\",message:\"Unterminated template literal.\"},Unterminated_regular_expression_literal:{code:1161,category:e.DiagnosticCategory.Error,key:\"Unterminated_regular_expression_literal_1161\",message:\"Unterminated regular expression literal.\"},An_object_member_cannot_be_declared_optional:{code:1162,category:e.DiagnosticCategory.Error,key:\"An_object_member_cannot_be_declared_optional_1162\",message:\"An object member cannot be declared optional.\"},A_yield_expression_is_only_allowed_in_a_generator_body:{code:1163,category:e.DiagnosticCategory.Error,key:\"A_yield_expression_is_only_allowed_in_a_generator_body_1163\",message:\"A 'yield' expression is only allowed in a generator body.\"},Computed_property_names_are_not_allowed_in_enums:{code:1164,category:e.DiagnosticCategory.Error,key:\"Computed_property_names_are_not_allowed_in_enums_1164\",message:\"Computed property names are not allowed in enums.\"},A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol:{code:1165,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol_1165\",message:\"A computed property name in an ambient context must directly refer to a built-in symbol.\"},A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol:{code:1166,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol_1166\",message:\"A computed property name in a class property declaration must directly refer to a built-in symbol.\"},A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol:{code:1168,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol_1168\",message:\"A computed property name in a method overload must directly refer to a built-in symbol.\"},A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol:{code:1169,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol_1169\",message:\"A computed property name in an interface must directly refer to a built-in symbol.\"},A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol:{code:1170,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol_1170\",message:\"A computed property name in a type literal must directly refer to a built-in symbol.\"},A_comma_expression_is_not_allowed_in_a_computed_property_name:{code:1171,category:e.DiagnosticCategory.Error,key:\"A_comma_expression_is_not_allowed_in_a_computed_property_name_1171\",message:\"A comma expression is not allowed in a computed property name.\"},extends_clause_already_seen:{code:1172,category:e.DiagnosticCategory.Error,key:\"extends_clause_already_seen_1172\",message:\"'extends' clause already seen.\"},extends_clause_must_precede_implements_clause:{code:1173,category:e.DiagnosticCategory.Error,key:\"extends_clause_must_precede_implements_clause_1173\",message:\"'extends' clause must precede 'implements' clause.\"},Classes_can_only_extend_a_single_class:{code:1174,category:e.DiagnosticCategory.Error,key:\"Classes_can_only_extend_a_single_class_1174\",message:\"Classes can only extend a single class.\"},implements_clause_already_seen:{code:1175,category:e.DiagnosticCategory.Error,key:\"implements_clause_already_seen_1175\",message:\"'implements' clause already seen.\"},Interface_declaration_cannot_have_implements_clause:{code:1176,category:e.DiagnosticCategory.Error,key:\"Interface_declaration_cannot_have_implements_clause_1176\",message:\"Interface declaration cannot have 'implements' clause.\"},Binary_digit_expected:{code:1177,category:e.DiagnosticCategory.Error,key:\"Binary_digit_expected_1177\",message:\"Binary digit expected.\"},Octal_digit_expected:{code:1178,category:e.DiagnosticCategory.Error,key:\"Octal_digit_expected_1178\",message:\"Octal digit expected.\"},Unexpected_token_expected:{code:1179,category:e.DiagnosticCategory.Error,key:\"Unexpected_token_expected_1179\",message:\"Unexpected token. '{' expected.\"},Property_destructuring_pattern_expected:{code:1180,category:e.DiagnosticCategory.Error,key:\"Property_destructuring_pattern_expected_1180\",message:\"Property destructuring pattern expected.\"},Array_element_destructuring_pattern_expected:{code:1181,category:e.DiagnosticCategory.Error,key:\"Array_element_destructuring_pattern_expected_1181\",message:\"Array element destructuring pattern expected.\"},A_destructuring_declaration_must_have_an_initializer:{code:1182,category:e.DiagnosticCategory.Error,key:\"A_destructuring_declaration_must_have_an_initializer_1182\",message:\"A destructuring declaration must have an initializer.\"},An_implementation_cannot_be_declared_in_ambient_contexts:{code:1183,category:e.DiagnosticCategory.Error,key:\"An_implementation_cannot_be_declared_in_ambient_contexts_1183\",message:\"An implementation cannot be declared in ambient contexts.\"},Modifiers_cannot_appear_here:{code:1184,category:e.DiagnosticCategory.Error,key:\"Modifiers_cannot_appear_here_1184\",message:\"Modifiers cannot appear here.\"},Merge_conflict_marker_encountered:{code:1185,category:e.DiagnosticCategory.Error,key:\"Merge_conflict_marker_encountered_1185\",message:\"Merge conflict marker encountered.\"},A_rest_element_cannot_have_an_initializer:{code:1186,category:e.DiagnosticCategory.Error,key:\"A_rest_element_cannot_have_an_initializer_1186\",message:\"A rest element cannot have an initializer.\"},A_parameter_property_may_not_be_a_binding_pattern:{code:1187,category:e.DiagnosticCategory.Error,key:\"A_parameter_property_may_not_be_a_binding_pattern_1187\",message:\"A parameter property may not be a binding pattern.\"},Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement:{code:1188,category:e.DiagnosticCategory.Error,key:\"Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement_1188\",message:\"Only a single variable declaration is allowed in a 'for...of' statement.\"},The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:{code:1189,category:e.DiagnosticCategory.Error,key:\"The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer_1189\",message:\"The variable declaration of a 'for...in' statement cannot have an initializer.\"},The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer:{code:1190,category:e.DiagnosticCategory.Error,key:\"The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer_1190\",message:\"The variable declaration of a 'for...of' statement cannot have an initializer.\"},An_import_declaration_cannot_have_modifiers:{code:1191,category:e.DiagnosticCategory.Error,key:\"An_import_declaration_cannot_have_modifiers_1191\",message:\"An import declaration cannot have modifiers.\"},Module_0_has_no_default_export:{code:1192,category:e.DiagnosticCategory.Error,key:\"Module_0_has_no_default_export_1192\",message:\"Module '{0}' has no default export.\"},An_export_declaration_cannot_have_modifiers:{code:1193,category:e.DiagnosticCategory.Error,key:\"An_export_declaration_cannot_have_modifiers_1193\",message:\"An export declaration cannot have modifiers.\"},Export_declarations_are_not_permitted_in_a_namespace:{code:1194,category:e.DiagnosticCategory.Error,key:\"Export_declarations_are_not_permitted_in_a_namespace_1194\",message:\"Export declarations are not permitted in a namespace.\"},Catch_clause_variable_name_must_be_an_identifier:{code:1195,category:e.DiagnosticCategory.Error,key:\"Catch_clause_variable_name_must_be_an_identifier_1195\",message:\"Catch clause variable name must be an identifier.\"},Catch_clause_variable_cannot_have_a_type_annotation:{code:1196,category:e.DiagnosticCategory.Error,key:\"Catch_clause_variable_cannot_have_a_type_annotation_1196\",message:\"Catch clause variable cannot have a type annotation.\"},Catch_clause_variable_cannot_have_an_initializer:{code:1197,category:e.DiagnosticCategory.Error,key:\"Catch_clause_variable_cannot_have_an_initializer_1197\",message:\"Catch clause variable cannot have an initializer.\"},An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive:{code:1198,category:e.DiagnosticCategory.Error,key:\"An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive_1198\",message:\"An extended Unicode escape value must be between 0x0 and 0x10FFFF inclusive.\"},Unterminated_Unicode_escape_sequence:{code:1199,category:e.DiagnosticCategory.Error,key:\"Unterminated_Unicode_escape_sequence_1199\",message:\"Unterminated Unicode escape sequence.\"},Line_terminator_not_permitted_before_arrow:{code:1200,category:e.DiagnosticCategory.Error,key:\"Line_terminator_not_permitted_before_arrow_1200\",message:\"Line terminator not permitted before arrow.\"},Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead:{code:1202,category:e.DiagnosticCategory.Error,key:\"Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk__1202\",message:\"Import assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'import * as ns from \\\"mod\\\"', 'import {a} from \\\"mod\\\"', 'import d from \\\"mod\\\"', or another module format instead.\"},Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_or_another_module_format_instead:{code:1203,category:e.DiagnosticCategory.Error,key:\"Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_o_1203\",message:\"Export assignment cannot be used when targeting ECMAScript 6 modules. Consider using 'export default' or another module format instead.\"},Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower:{code:1204,category:e.DiagnosticCategory.Error,key:\"Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower_1204\",message:\"Cannot compile modules into 'es2015' when targeting 'ES5' or lower.\"},Decorators_are_not_valid_here:{code:1206,category:e.DiagnosticCategory.Error,key:\"Decorators_are_not_valid_here_1206\",message:\"Decorators are not valid here.\"},Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name:{code:1207,category:e.DiagnosticCategory.Error,key:\"Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name_1207\",message:\"Decorators cannot be applied to multiple get/set accessors of the same name.\"},Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided:{code:1208,category:e.DiagnosticCategory.Error,key:\"Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided_1208\",message:\"Cannot compile namespaces when the '--isolatedModules' flag is provided.\"},Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided:{code:1209,category:e.DiagnosticCategory.Error,key:\"Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided_1209\",message:\"Ambient const enums are not allowed when the '--isolatedModules' flag is provided.\"},Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:{code:1210,category:e.DiagnosticCategory.Error,key:\"Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode_1210\",message:\"Invalid use of '{0}'. Class definitions are automatically in strict mode.\"},A_class_declaration_without_the_default_modifier_must_have_a_name:{code:1211,category:e.DiagnosticCategory.Error,key:\"A_class_declaration_without_the_default_modifier_must_have_a_name_1211\",message:\"A class declaration without the 'default' modifier must have a name\"},Identifier_expected_0_is_a_reserved_word_in_strict_mode:{code:1212,category:e.DiagnosticCategory.Error,key:\"Identifier_expected_0_is_a_reserved_word_in_strict_mode_1212\",message:\"Identifier expected. '{0}' is a reserved word in strict mode\"},Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:{code:1213,category:e.DiagnosticCategory.Error,key:\"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_stric_1213\",message:\"Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.\"},Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:{code:1214,category:e.DiagnosticCategory.Error,key:\"Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode_1214\",message:\"Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.\"},Invalid_use_of_0_Modules_are_automatically_in_strict_mode:{code:1215,category:e.DiagnosticCategory.Error,key:\"Invalid_use_of_0_Modules_are_automatically_in_strict_mode_1215\",message:\"Invalid use of '{0}'. Modules are automatically in strict mode.\"},Export_assignment_is_not_supported_when_module_flag_is_system:{code:1218,category:e.DiagnosticCategory.Error,key:\"Export_assignment_is_not_supported_when_module_flag_is_system_1218\",message:\"Export assignment is not supported when '--module' flag is 'system'.\"},Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning:{code:1219,category:e.DiagnosticCategory.Error,key:\"Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_t_1219\",message:\"Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.\"},Generators_are_only_available_when_targeting_ECMAScript_6_or_higher:{code:1220,category:e.DiagnosticCategory.Error,key:\"Generators_are_only_available_when_targeting_ECMAScript_6_or_higher_1220\",message:\"Generators are only available when targeting ECMAScript 6 or higher.\"},Generators_are_not_allowed_in_an_ambient_context:{code:1221,category:e.DiagnosticCategory.Error,key:\"Generators_are_not_allowed_in_an_ambient_context_1221\",message:\"Generators are not allowed in an ambient context.\"},An_overload_signature_cannot_be_declared_as_a_generator:{code:1222,category:e.DiagnosticCategory.Error,key:\"An_overload_signature_cannot_be_declared_as_a_generator_1222\",message:\"An overload signature cannot be declared as a generator.\"},_0_tag_already_specified:{code:1223,category:e.DiagnosticCategory.Error,key:\"_0_tag_already_specified_1223\",message:\"'{0}' tag already specified.\"},Signature_0_must_have_a_type_predicate:{code:1224,category:e.DiagnosticCategory.Error,key:\"Signature_0_must_have_a_type_predicate_1224\",message:\"Signature '{0}' must have a type predicate.\"},Cannot_find_parameter_0:{code:1225,category:e.DiagnosticCategory.Error,key:\"Cannot_find_parameter_0_1225\",message:\"Cannot find parameter '{0}'.\"},Type_predicate_0_is_not_assignable_to_1:{code:1226,category:e.DiagnosticCategory.Error,key:\"Type_predicate_0_is_not_assignable_to_1_1226\",message:\"Type predicate '{0}' is not assignable to '{1}'.\"},Parameter_0_is_not_in_the_same_position_as_parameter_1:{code:1227,category:e.DiagnosticCategory.Error,key:\"Parameter_0_is_not_in_the_same_position_as_parameter_1_1227\",message:\"Parameter '{0}' is not in the same position as parameter '{1}'.\"},A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods:{code:1228,category:e.DiagnosticCategory.Error,key:\"A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods_1228\",message:\"A type predicate is only allowed in return type position for functions and methods.\"},A_type_predicate_cannot_reference_a_rest_parameter:{code:1229,category:e.DiagnosticCategory.Error,key:\"A_type_predicate_cannot_reference_a_rest_parameter_1229\",message:\"A type predicate cannot reference a rest parameter.\"},A_type_predicate_cannot_reference_element_0_in_a_binding_pattern:{code:1230,category:e.DiagnosticCategory.Error,key:\"A_type_predicate_cannot_reference_element_0_in_a_binding_pattern_1230\",message:\"A type predicate cannot reference element '{0}' in a binding pattern.\"},An_export_assignment_can_only_be_used_in_a_module:{code:1231,category:e.DiagnosticCategory.Error,key:\"An_export_assignment_can_only_be_used_in_a_module_1231\",message:\"An export assignment can only be used in a module.\"},An_import_declaration_can_only_be_used_in_a_namespace_or_module:{code:1232,category:e.DiagnosticCategory.Error,key:\"An_import_declaration_can_only_be_used_in_a_namespace_or_module_1232\",message:\"An import declaration can only be used in a namespace or module.\"},An_export_declaration_can_only_be_used_in_a_module:{code:1233,category:e.DiagnosticCategory.Error,key:\"An_export_declaration_can_only_be_used_in_a_module_1233\",message:\"An export declaration can only be used in a module.\"},An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:{code:1234,category:e.DiagnosticCategory.Error,key:\"An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file_1234\",message:\"An ambient module declaration is only allowed at the top level in a file.\"},A_namespace_declaration_is_only_allowed_in_a_namespace_or_module:{code:1235,category:e.DiagnosticCategory.Error,key:\"A_namespace_declaration_is_only_allowed_in_a_namespace_or_module_1235\",message:\"A namespace declaration is only allowed in a namespace or module.\"},The_return_type_of_a_property_decorator_function_must_be_either_void_or_any:{code:1236,category:e.DiagnosticCategory.Error,key:\"The_return_type_of_a_property_decorator_function_must_be_either_void_or_any_1236\",message:\"The return type of a property decorator function must be either 'void' or 'any'.\"},The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any:{code:1237,category:e.DiagnosticCategory.Error,key:\"The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any_1237\",message:\"The return type of a parameter decorator function must be either 'void' or 'any'.\"},Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression:{code:1238,category:e.DiagnosticCategory.Error,key:\"Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression_1238\",message:\"Unable to resolve signature of class decorator when called as an expression.\"},Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression:{code:1239,category:e.DiagnosticCategory.Error,key:\"Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression_1239\",message:\"Unable to resolve signature of parameter decorator when called as an expression.\"},Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression:{code:1240,category:e.DiagnosticCategory.Error,key:\"Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression_1240\",message:\"Unable to resolve signature of property decorator when called as an expression.\"},Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression:{code:1241,category:e.DiagnosticCategory.Error,key:\"Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression_1241\",message:\"Unable to resolve signature of method decorator when called as an expression.\"},abstract_modifier_can_only_appear_on_a_class_or_method_declaration:{code:1242,category:e.DiagnosticCategory.Error,key:\"abstract_modifier_can_only_appear_on_a_class_or_method_declaration_1242\",message:\"'abstract' modifier can only appear on a class or method declaration.\"},_0_modifier_cannot_be_used_with_1_modifier:{code:1243,category:e.DiagnosticCategory.Error,key:\"_0_modifier_cannot_be_used_with_1_modifier_1243\",message:\"'{0}' modifier cannot be used with '{1}' modifier.\"},Abstract_methods_can_only_appear_within_an_abstract_class:{code:1244,category:e.DiagnosticCategory.Error,key:\"Abstract_methods_can_only_appear_within_an_abstract_class_1244\",message:\"Abstract methods can only appear within an abstract class.\"},Method_0_cannot_have_an_implementation_because_it_is_marked_abstract:{code:1245,category:e.DiagnosticCategory.Error,key:\"Method_0_cannot_have_an_implementation_because_it_is_marked_abstract_1245\",message:\"Method '{0}' cannot have an implementation because it is marked abstract.\"},An_interface_property_cannot_have_an_initializer:{code:1246,category:e.DiagnosticCategory.Error,key:\"An_interface_property_cannot_have_an_initializer_1246\",message:\"An interface property cannot have an initializer.\"},A_type_literal_property_cannot_have_an_initializer:{code:1247,category:e.DiagnosticCategory.Error,key:\"A_type_literal_property_cannot_have_an_initializer_1247\",message:\"A type literal property cannot have an initializer.\"},A_class_member_cannot_have_the_0_keyword:{code:1248,category:e.DiagnosticCategory.Error,key:\"A_class_member_cannot_have_the_0_keyword_1248\",message:\"A class member cannot have the '{0}' keyword.\"},A_decorator_can_only_decorate_a_method_implementation_not_an_overload:{code:1249,category:e.DiagnosticCategory.Error,key:\"A_decorator_can_only_decorate_a_method_implementation_not_an_overload_1249\",message:\"A decorator can only decorate a method implementation, not an overload.\"},with_statements_are_not_allowed_in_an_async_function_block:{code:1300,category:e.DiagnosticCategory.Error,key:\"with_statements_are_not_allowed_in_an_async_function_block_1300\",message:\"'with' statements are not allowed in an async function block.\"},await_expression_is_only_allowed_within_an_async_function:{code:1308,category:e.DiagnosticCategory.Error,key:\"await_expression_is_only_allowed_within_an_async_function_1308\",message:\"'await' expression is only allowed within an async function.\"},Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher:{code:1311,category:e.DiagnosticCategory.Error,key:\"Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher_1311\",message:\"Async functions are only available when targeting ECMAScript 6 and higher.\"},can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment:{code:1312,category:e.DiagnosticCategory.Error,key:\"can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment_1312\",message:\"'=' can only be used in an object literal property inside a destructuring assignment.\"},The_body_of_an_if_statement_cannot_be_the_empty_statement:{code:1313,category:e.DiagnosticCategory.Error,key:\"The_body_of_an_if_statement_cannot_be_the_empty_statement_1313\",message:\"The body of an 'if' statement cannot be the empty statement.\"},Duplicate_identifier_0:{code:2300,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_0_2300\",message:\"Duplicate identifier '{0}'.\"},Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor:{code:2301,category:e.DiagnosticCategory.Error,key:\"Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2301\",message:\"Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor.\"},Static_members_cannot_reference_class_type_parameters:{code:2302,category:e.DiagnosticCategory.Error,key:\"Static_members_cannot_reference_class_type_parameters_2302\",message:\"Static members cannot reference class type parameters.\"},Circular_definition_of_import_alias_0:{code:2303,category:e.DiagnosticCategory.Error,key:\"Circular_definition_of_import_alias_0_2303\",message:\"Circular definition of import alias '{0}'.\"},Cannot_find_name_0:{code:2304,category:e.DiagnosticCategory.Error,key:\"Cannot_find_name_0_2304\",message:\"Cannot find name '{0}'.\"},Module_0_has_no_exported_member_1:{code:2305,category:e.DiagnosticCategory.Error,key:\"Module_0_has_no_exported_member_1_2305\",message:\"Module '{0}' has no exported member '{1}'.\"},File_0_is_not_a_module:{code:2306,category:e.DiagnosticCategory.Error,key:\"File_0_is_not_a_module_2306\",message:\"File '{0}' is not a module.\"},Cannot_find_module_0:{code:2307,category:e.DiagnosticCategory.Error,key:\"Cannot_find_module_0_2307\",message:\"Cannot find module '{0}'.\"},Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity:{code:2308,category:e.DiagnosticCategory.Error,key:\"Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambig_2308\",message:\"Module {0} has already exported a member named '{1}'. Consider explicitly re-exporting to resolve the ambiguity.\"},An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements:{code:2309,category:e.DiagnosticCategory.Error,key:\"An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements_2309\",message:\"An export assignment cannot be used in a module with other exported elements.\"},Type_0_recursively_references_itself_as_a_base_type:{code:2310,category:e.DiagnosticCategory.Error,key:\"Type_0_recursively_references_itself_as_a_base_type_2310\",message:\"Type '{0}' recursively references itself as a base type.\"},A_class_may_only_extend_another_class:{code:2311,category:e.DiagnosticCategory.Error,key:\"A_class_may_only_extend_another_class_2311\",message:\"A class may only extend another class.\"},An_interface_may_only_extend_a_class_or_another_interface:{code:2312,category:e.DiagnosticCategory.Error,key:\"An_interface_may_only_extend_a_class_or_another_interface_2312\",message:\"An interface may only extend a class or another interface.\"},Type_parameter_0_has_a_circular_constraint:{code:2313,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_has_a_circular_constraint_2313\",message:\"Type parameter '{0}' has a circular constraint.\"},Generic_type_0_requires_1_type_argument_s:{code:2314,category:e.DiagnosticCategory.Error,key:\"Generic_type_0_requires_1_type_argument_s_2314\",message:\"Generic type '{0}' requires {1} type argument(s).\"},Type_0_is_not_generic:{code:2315,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_generic_2315\",message:\"Type '{0}' is not generic.\"},Global_type_0_must_be_a_class_or_interface_type:{code:2316,category:e.DiagnosticCategory.Error,key:\"Global_type_0_must_be_a_class_or_interface_type_2316\",message:\"Global type '{0}' must be a class or interface type.\"},Global_type_0_must_have_1_type_parameter_s:{code:2317,category:e.DiagnosticCategory.Error,key:\"Global_type_0_must_have_1_type_parameter_s_2317\",message:\"Global type '{0}' must have {1} type parameter(s).\"},Cannot_find_global_type_0:{code:2318,category:e.DiagnosticCategory.Error,key:\"Cannot_find_global_type_0_2318\",message:\"Cannot find global type '{0}'.\"},Named_property_0_of_types_1_and_2_are_not_identical:{code:2319,category:e.DiagnosticCategory.Error,key:\"Named_property_0_of_types_1_and_2_are_not_identical_2319\",message:\"Named property '{0}' of types '{1}' and '{2}' are not identical.\"},Interface_0_cannot_simultaneously_extend_types_1_and_2:{code:2320,category:e.DiagnosticCategory.Error,key:\"Interface_0_cannot_simultaneously_extend_types_1_and_2_2320\",message:\"Interface '{0}' cannot simultaneously extend types '{1}' and '{2}'.\"},Excessive_stack_depth_comparing_types_0_and_1:{code:2321,category:e.DiagnosticCategory.Error,key:\"Excessive_stack_depth_comparing_types_0_and_1_2321\",message:\"Excessive stack depth comparing types '{0}' and '{1}'.\"},Type_0_is_not_assignable_to_type_1:{code:2322,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_assignable_to_type_1_2322\",message:\"Type '{0}' is not assignable to type '{1}'.\"},Cannot_redeclare_exported_variable_0:{code:2323,category:e.DiagnosticCategory.Error,key:\"Cannot_redeclare_exported_variable_0_2323\",message:\"Cannot redeclare exported variable '{0}'.\"},Property_0_is_missing_in_type_1:{code:2324,category:e.DiagnosticCategory.Error,key:\"Property_0_is_missing_in_type_1_2324\",message:\"Property '{0}' is missing in type '{1}'.\"},Property_0_is_private_in_type_1_but_not_in_type_2:{code:2325,category:e.DiagnosticCategory.Error,key:\"Property_0_is_private_in_type_1_but_not_in_type_2_2325\",message:\"Property '{0}' is private in type '{1}' but not in type '{2}'.\"},Types_of_property_0_are_incompatible:{code:2326,category:e.DiagnosticCategory.Error,key:\"Types_of_property_0_are_incompatible_2326\",message:\"Types of property '{0}' are incompatible.\"},Property_0_is_optional_in_type_1_but_required_in_type_2:{code:2327,category:e.DiagnosticCategory.Error,key:\"Property_0_is_optional_in_type_1_but_required_in_type_2_2327\",message:\"Property '{0}' is optional in type '{1}' but required in type '{2}'.\"},Types_of_parameters_0_and_1_are_incompatible:{code:2328,category:e.DiagnosticCategory.Error,key:\"Types_of_parameters_0_and_1_are_incompatible_2328\",message:\"Types of parameters '{0}' and '{1}' are incompatible.\"},Index_signature_is_missing_in_type_0:{code:2329,category:e.DiagnosticCategory.Error,key:\"Index_signature_is_missing_in_type_0_2329\",message:\"Index signature is missing in type '{0}'.\"},Index_signatures_are_incompatible:{code:2330,category:e.DiagnosticCategory.Error,key:\"Index_signatures_are_incompatible_2330\",message:\"Index signatures are incompatible.\"},this_cannot_be_referenced_in_a_module_or_namespace_body:{code:2331,category:e.DiagnosticCategory.Error,key:\"this_cannot_be_referenced_in_a_module_or_namespace_body_2331\",message:\"'this' cannot be referenced in a module or namespace body.\"},this_cannot_be_referenced_in_current_location:{code:2332,category:e.DiagnosticCategory.Error,key:\"this_cannot_be_referenced_in_current_location_2332\",message:\"'this' cannot be referenced in current location.\"},this_cannot_be_referenced_in_constructor_arguments:{code:2333,category:e.DiagnosticCategory.Error,key:\"this_cannot_be_referenced_in_constructor_arguments_2333\",message:\"'this' cannot be referenced in constructor arguments.\"},this_cannot_be_referenced_in_a_static_property_initializer:{code:2334,category:e.DiagnosticCategory.Error,key:\"this_cannot_be_referenced_in_a_static_property_initializer_2334\",message:\"'this' cannot be referenced in a static property initializer.\"},super_can_only_be_referenced_in_a_derived_class:{code:2335,category:e.DiagnosticCategory.Error,key:\"super_can_only_be_referenced_in_a_derived_class_2335\",message:\"'super' can only be referenced in a derived class.\"},super_cannot_be_referenced_in_constructor_arguments:{code:2336,category:e.DiagnosticCategory.Error,key:\"super_cannot_be_referenced_in_constructor_arguments_2336\",message:\"'super' cannot be referenced in constructor arguments.\"},Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors:{code:2337,category:e.DiagnosticCategory.Error,key:\"Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors_2337\",message:\"Super calls are not permitted outside constructors or in nested functions inside constructors.\"},super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class:{code:2338,category:e.DiagnosticCategory.Error,key:\"super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_der_2338\",message:\"'super' property access is permitted only in a constructor, member function, or member accessor of a derived class.\"},Property_0_does_not_exist_on_type_1:{code:2339,category:e.DiagnosticCategory.Error,key:\"Property_0_does_not_exist_on_type_1_2339\",message:\"Property '{0}' does not exist on type '{1}'.\"},Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword:{code:2340,category:e.DiagnosticCategory.Error,key:\"Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword_2340\",message:\"Only public and protected methods of the base class are accessible via the 'super' keyword.\"},Property_0_is_private_and_only_accessible_within_class_1:{code:2341,category:e.DiagnosticCategory.Error,key:\"Property_0_is_private_and_only_accessible_within_class_1_2341\",message:\"Property '{0}' is private and only accessible within class '{1}'.\"},An_index_expression_argument_must_be_of_type_string_number_symbol_or_any:{code:2342,category:e.DiagnosticCategory.Error,key:\"An_index_expression_argument_must_be_of_type_string_number_symbol_or_any_2342\",message:\"An index expression argument must be of type 'string', 'number', 'symbol', or 'any'.\"},Type_0_does_not_satisfy_the_constraint_1:{code:2344,category:e.DiagnosticCategory.Error,key:\"Type_0_does_not_satisfy_the_constraint_1_2344\",message:\"Type '{0}' does not satisfy the constraint '{1}'.\"},Argument_of_type_0_is_not_assignable_to_parameter_of_type_1:{code:2345,category:e.DiagnosticCategory.Error,key:\"Argument_of_type_0_is_not_assignable_to_parameter_of_type_1_2345\",message:\"Argument of type '{0}' is not assignable to parameter of type '{1}'.\"},Supplied_parameters_do_not_match_any_signature_of_call_target:{code:2346,category:e.DiagnosticCategory.Error,key:\"Supplied_parameters_do_not_match_any_signature_of_call_target_2346\",message:\"Supplied parameters do not match any signature of call target.\"},Untyped_function_calls_may_not_accept_type_arguments:{code:2347,category:e.DiagnosticCategory.Error,key:\"Untyped_function_calls_may_not_accept_type_arguments_2347\",message:\"Untyped function calls may not accept type arguments.\"},Value_of_type_0_is_not_callable_Did_you_mean_to_include_new:{code:2348,category:e.DiagnosticCategory.Error,key:\"Value_of_type_0_is_not_callable_Did_you_mean_to_include_new_2348\",message:\"Value of type '{0}' is not callable. Did you mean to include 'new'?\"},Cannot_invoke_an_expression_whose_type_lacks_a_call_signature:{code:2349,category:e.DiagnosticCategory.Error,key:\"Cannot_invoke_an_expression_whose_type_lacks_a_call_signature_2349\",message:\"Cannot invoke an expression whose type lacks a call signature.\"},Only_a_void_function_can_be_called_with_the_new_keyword:{code:2350,category:e.DiagnosticCategory.Error,key:\"Only_a_void_function_can_be_called_with_the_new_keyword_2350\",message:\"Only a void function can be called with the 'new' keyword.\"},Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature:{code:2351,category:e.DiagnosticCategory.Error,key:\"Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature_2351\",message:\"Cannot use 'new' with an expression whose type lacks a call or construct signature.\"},Neither_type_0_nor_type_1_is_assignable_to_the_other:{code:2352,category:e.DiagnosticCategory.Error,key:\"Neither_type_0_nor_type_1_is_assignable_to_the_other_2352\",message:\"Neither type '{0}' nor type '{1}' is assignable to the other.\"},Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1:{code:2353,category:e.DiagnosticCategory.Error,key:\"Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1_2353\",message:\"Object literal may only specify known properties, and '{0}' does not exist in type '{1}'.\"},No_best_common_type_exists_among_return_expressions:{code:2354,category:e.DiagnosticCategory.Error,key:\"No_best_common_type_exists_among_return_expressions_2354\",message:\"No best common type exists among return expressions.\"},A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value:{code:2355,category:e.DiagnosticCategory.Error,key:\"A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value_2355\",message:\"A function whose declared type is neither 'void' nor 'any' must return a value.\"},An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type:{code:2356,category:e.DiagnosticCategory.Error,key:\"An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type_2356\",message:\"An arithmetic operand must be of type 'any', 'number' or an enum type.\"},The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer:{code:2357,category:e.DiagnosticCategory.Error,key:\"The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer_2357\",message:\"The operand of an increment or decrement operator must be a variable, property or indexer.\"},The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:{code:2358,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358\",message:\"The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter.\"},The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type:{code:2359,category:e.DiagnosticCategory.Error,key:\"The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359\",message:\"The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type.\"},The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol:{code:2360,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol_2360\",message:\"The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'.\"},The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter:{code:2361,category:e.DiagnosticCategory.Error,key:\"The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter_2361\",message:\"The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter\"},The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:{code:2362,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2362\",message:\"The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.\"},The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type:{code:2363,category:e.DiagnosticCategory.Error,key:\"The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type_2363\",message:\"The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.\"},Invalid_left_hand_side_of_assignment_expression:{code:2364,category:e.DiagnosticCategory.Error,key:\"Invalid_left_hand_side_of_assignment_expression_2364\",message:\"Invalid left-hand side of assignment expression.\"},Operator_0_cannot_be_applied_to_types_1_and_2:{code:2365,category:e.DiagnosticCategory.Error,key:\"Operator_0_cannot_be_applied_to_types_1_and_2_2365\",message:\"Operator '{0}' cannot be applied to types '{1}' and '{2}'.\"},Type_parameter_name_cannot_be_0:{code:2368,category:e.DiagnosticCategory.Error,key:\"Type_parameter_name_cannot_be_0_2368\",message:\"Type parameter name cannot be '{0}'\"},A_parameter_property_is_only_allowed_in_a_constructor_implementation:{code:2369,category:e.DiagnosticCategory.Error,key:\"A_parameter_property_is_only_allowed_in_a_constructor_implementation_2369\",message:\"A parameter property is only allowed in a constructor implementation.\"},A_rest_parameter_must_be_of_an_array_type:{code:2370,category:e.DiagnosticCategory.Error,key:\"A_rest_parameter_must_be_of_an_array_type_2370\",message:\"A rest parameter must be of an array type.\"},A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation:{code:2371,category:e.DiagnosticCategory.Error,key:\"A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation_2371\",message:\"A parameter initializer is only allowed in a function or constructor implementation.\"},Parameter_0_cannot_be_referenced_in_its_initializer:{code:2372,category:e.DiagnosticCategory.Error,key:\"Parameter_0_cannot_be_referenced_in_its_initializer_2372\",message:\"Parameter '{0}' cannot be referenced in its initializer.\"},Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it:{code:2373,category:e.DiagnosticCategory.Error,key:\"Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it_2373\",message:\"Initializer of parameter '{0}' cannot reference identifier '{1}' declared after it.\"},Duplicate_string_index_signature:{code:2374,category:e.DiagnosticCategory.Error,key:\"Duplicate_string_index_signature_2374\",message:\"Duplicate string index signature.\"},Duplicate_number_index_signature:{code:2375,category:e.DiagnosticCategory.Error,key:\"Duplicate_number_index_signature_2375\",message:\"Duplicate number index signature.\"},A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties:{code:2376,category:e.DiagnosticCategory.Error,key:\"A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_proper_2376\",message:\"A 'super' call must be the first statement in the constructor when a class contains initialized properties or has parameter properties.\"},Constructors_for_derived_classes_must_contain_a_super_call:{code:2377,category:e.DiagnosticCategory.Error,key:\"Constructors_for_derived_classes_must_contain_a_super_call_2377\",message:\"Constructors for derived classes must contain a 'super' call.\"},A_get_accessor_must_return_a_value:{code:2378,category:e.DiagnosticCategory.Error,key:\"A_get_accessor_must_return_a_value_2378\",message:\"A 'get' accessor must return a value.\"},Getter_and_setter_accessors_do_not_agree_in_visibility:{code:2379,category:e.DiagnosticCategory.Error,key:\"Getter_and_setter_accessors_do_not_agree_in_visibility_2379\",message:\"Getter and setter accessors do not agree in visibility.\"},get_and_set_accessor_must_have_the_same_type:{code:2380,category:e.DiagnosticCategory.Error,key:\"get_and_set_accessor_must_have_the_same_type_2380\",message:\"'get' and 'set' accessor must have the same type.\"},A_signature_with_an_implementation_cannot_use_a_string_literal_type:{code:2381,category:e.DiagnosticCategory.Error,key:\"A_signature_with_an_implementation_cannot_use_a_string_literal_type_2381\",message:\"A signature with an implementation cannot use a string literal type.\"},Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature:{code:2382,category:e.DiagnosticCategory.Error,key:\"Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature_2382\",message:\"Specialized overload signature is not assignable to any non-specialized signature.\"},Overload_signatures_must_all_be_exported_or_not_exported:{code:2383,category:e.DiagnosticCategory.Error,key:\"Overload_signatures_must_all_be_exported_or_not_exported_2383\",message:\"Overload signatures must all be exported or not exported.\"},Overload_signatures_must_all_be_ambient_or_non_ambient:{code:2384,category:e.DiagnosticCategory.Error,key:\"Overload_signatures_must_all_be_ambient_or_non_ambient_2384\",message:\"Overload signatures must all be ambient or non-ambient.\"},Overload_signatures_must_all_be_public_private_or_protected:{code:2385,category:e.DiagnosticCategory.Error,key:\"Overload_signatures_must_all_be_public_private_or_protected_2385\",message:\"Overload signatures must all be public, private or protected.\"},Overload_signatures_must_all_be_optional_or_required:{code:2386,category:e.DiagnosticCategory.Error,key:\"Overload_signatures_must_all_be_optional_or_required_2386\",message:\"Overload signatures must all be optional or required.\"},Function_overload_must_be_static:{code:2387,category:e.DiagnosticCategory.Error,key:\"Function_overload_must_be_static_2387\",message:\"Function overload must be static.\"},Function_overload_must_not_be_static:{code:2388,category:e.DiagnosticCategory.Error,key:\"Function_overload_must_not_be_static_2388\",message:\"Function overload must not be static.\"},Function_implementation_name_must_be_0:{code:2389,category:e.DiagnosticCategory.Error,key:\"Function_implementation_name_must_be_0_2389\",message:\"Function implementation name must be '{0}'.\"},Constructor_implementation_is_missing:{code:2390,category:e.DiagnosticCategory.Error,key:\"Constructor_implementation_is_missing_2390\",message:\"Constructor implementation is missing.\"},Function_implementation_is_missing_or_not_immediately_following_the_declaration:{code:2391,category:e.DiagnosticCategory.Error,key:\"Function_implementation_is_missing_or_not_immediately_following_the_declaration_2391\",message:\"Function implementation is missing or not immediately following the declaration.\"},Multiple_constructor_implementations_are_not_allowed:{code:2392,category:e.DiagnosticCategory.Error,key:\"Multiple_constructor_implementations_are_not_allowed_2392\",message:\"Multiple constructor implementations are not allowed.\"},Duplicate_function_implementation:{code:2393,category:e.DiagnosticCategory.Error,key:\"Duplicate_function_implementation_2393\",message:\"Duplicate function implementation.\"},Overload_signature_is_not_compatible_with_function_implementation:{code:2394,category:e.DiagnosticCategory.Error,key:\"Overload_signature_is_not_compatible_with_function_implementation_2394\",message:\"Overload signature is not compatible with function implementation.\"},Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local:{code:2395,category:e.DiagnosticCategory.Error,key:\"Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local_2395\",message:\"Individual declarations in merged declaration '{0}' must be all exported or all local.\"},Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters:{code:2396,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters_2396\",message:\"Duplicate identifier 'arguments'. Compiler uses 'arguments' to initialize rest parameters.\"},Declaration_name_conflicts_with_built_in_global_identifier_0:{code:2397,category:e.DiagnosticCategory.Error,key:\"Declaration_name_conflicts_with_built_in_global_identifier_0_2397\",message:\"Declaration name conflicts with built-in global identifier '{0}'.\"},Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference:{code:2399,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference_2399\",message:\"Duplicate identifier '_this'. Compiler uses variable declaration '_this' to capture 'this' reference.\"},Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference:{code:2400,category:e.DiagnosticCategory.Error,key:\"Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference_2400\",message:\"Expression resolves to variable declaration '_this' that compiler uses to capture 'this' reference.\"},Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference:{code:2401,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference_2401\",message:\"Duplicate identifier '_super'. Compiler uses '_super' to capture base class reference.\"},Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference:{code:2402,category:e.DiagnosticCategory.Error,key:\"Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference_2402\",message:\"Expression resolves to '_super' that compiler uses to capture base class reference.\"},Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2:{code:2403,category:e.DiagnosticCategory.Error,key:\"Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_t_2403\",message:\"Subsequent variable declarations must have the same type.  Variable '{0}' must be of type '{1}', but here has type '{2}'.\"},The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:{code:2404,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation_2404\",message:\"The left-hand side of a 'for...in' statement cannot use a type annotation.\"},The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any:{code:2405,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any_2405\",message:\"The left-hand side of a 'for...in' statement must be of type 'string' or 'any'.\"},Invalid_left_hand_side_in_for_in_statement:{code:2406,category:e.DiagnosticCategory.Error,key:\"Invalid_left_hand_side_in_for_in_statement_2406\",message:\"Invalid left-hand side in 'for...in' statement.\"},The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter:{code:2407,category:e.DiagnosticCategory.Error,key:\"The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter_2407\",message:\"The right-hand side of a 'for...in' statement must be of type 'any', an object type or a type parameter.\"},Setters_cannot_return_a_value:{code:2408,category:e.DiagnosticCategory.Error,key:\"Setters_cannot_return_a_value_2408\",message:\"Setters cannot return a value.\"},Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class:{code:2409,category:e.DiagnosticCategory.Error,key:\"Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class_2409\",message:\"Return type of constructor signature must be assignable to the instance type of the class\"},All_symbols_within_a_with_block_will_be_resolved_to_any:{code:2410,category:e.DiagnosticCategory.Error,key:\"All_symbols_within_a_with_block_will_be_resolved_to_any_2410\",message:\"All symbols within a 'with' block will be resolved to 'any'.\"},Property_0_of_type_1_is_not_assignable_to_string_index_type_2:{code:2411,category:e.DiagnosticCategory.Error,key:\"Property_0_of_type_1_is_not_assignable_to_string_index_type_2_2411\",message:\"Property '{0}' of type '{1}' is not assignable to string index type '{2}'.\"},Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2:{code:2412,category:e.DiagnosticCategory.Error,key:\"Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2_2412\",message:\"Property '{0}' of type '{1}' is not assignable to numeric index type '{2}'.\"},Numeric_index_type_0_is_not_assignable_to_string_index_type_1:{code:2413,category:e.DiagnosticCategory.Error,key:\"Numeric_index_type_0_is_not_assignable_to_string_index_type_1_2413\",message:\"Numeric index type '{0}' is not assignable to string index type '{1}'.\"},Class_name_cannot_be_0:{code:2414,category:e.DiagnosticCategory.Error,key:\"Class_name_cannot_be_0_2414\",message:\"Class name cannot be '{0}'\"},Class_0_incorrectly_extends_base_class_1:{code:2415,category:e.DiagnosticCategory.Error,key:\"Class_0_incorrectly_extends_base_class_1_2415\",message:\"Class '{0}' incorrectly extends base class '{1}'.\"},Class_static_side_0_incorrectly_extends_base_class_static_side_1:{code:2417,category:e.DiagnosticCategory.Error,key:\"Class_static_side_0_incorrectly_extends_base_class_static_side_1_2417\",message:\"Class static side '{0}' incorrectly extends base class static side '{1}'.\"},Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0:{code:2419,category:e.DiagnosticCategory.Error,key:\"Type_name_0_in_extends_clause_does_not_reference_constructor_function_for_0_2419\",message:\"Type name '{0}' in extends clause does not reference constructor function for '{0}'.\"},Class_0_incorrectly_implements_interface_1:{code:2420,category:e.DiagnosticCategory.Error,key:\"Class_0_incorrectly_implements_interface_1_2420\",message:\"Class '{0}' incorrectly implements interface '{1}'.\"},A_class_may_only_implement_another_class_or_interface:{code:2422,category:e.DiagnosticCategory.Error,key:\"A_class_may_only_implement_another_class_or_interface_2422\",message:\"A class may only implement another class or interface.\"},Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:{code:2423,category:e.DiagnosticCategory.Error,key:\"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_access_2423\",message:\"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.\"},Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property:{code:2424,category:e.DiagnosticCategory.Error,key:\"Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_proper_2424\",message:\"Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.\"},Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function:{code:2425,category:e.DiagnosticCategory.Error,key:\"Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_functi_2425\",message:\"Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.\"},Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function:{code:2426,category:e.DiagnosticCategory.Error,key:\"Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_functi_2426\",message:\"Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.\"},Interface_name_cannot_be_0:{code:2427,category:e.DiagnosticCategory.Error,key:\"Interface_name_cannot_be_0_2427\",message:\"Interface name cannot be '{0}'\"},All_declarations_of_an_interface_must_have_identical_type_parameters:{code:2428,category:e.DiagnosticCategory.Error,key:\"All_declarations_of_an_interface_must_have_identical_type_parameters_2428\",message:\"All declarations of an interface must have identical type parameters.\"},Interface_0_incorrectly_extends_interface_1:{code:2430,category:e.DiagnosticCategory.Error,key:\"Interface_0_incorrectly_extends_interface_1_2430\",message:\"Interface '{0}' incorrectly extends interface '{1}'.\"},Enum_name_cannot_be_0:{code:2431,category:e.DiagnosticCategory.Error,key:\"Enum_name_cannot_be_0_2431\",message:\"Enum name cannot be '{0}'\"},In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element:{code:2432,category:e.DiagnosticCategory.Error,key:\"In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enu_2432\",message:\"In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.\"},A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged:{code:2433,category:e.DiagnosticCategory.Error,key:\"A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merg_2433\",message:\"A namespace declaration cannot be in a different file from a class or function with which it is merged\"},A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged:{code:2434,category:e.DiagnosticCategory.Error,key:\"A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged_2434\",message:\"A namespace declaration cannot be located prior to a class or function with which it is merged\"},Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces:{code:2435,category:e.DiagnosticCategory.Error,key:\"Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces_2435\",message:\"Ambient modules cannot be nested in other modules or namespaces.\"},Ambient_module_declaration_cannot_specify_relative_module_name:{code:2436,category:e.DiagnosticCategory.Error,key:\"Ambient_module_declaration_cannot_specify_relative_module_name_2436\",message:\"Ambient module declaration cannot specify relative module name.\"},Module_0_is_hidden_by_a_local_declaration_with_the_same_name:{code:2437,category:e.DiagnosticCategory.Error,key:\"Module_0_is_hidden_by_a_local_declaration_with_the_same_name_2437\",message:\"Module '{0}' is hidden by a local declaration with the same name\"},Import_name_cannot_be_0:{code:2438,category:e.DiagnosticCategory.Error,key:\"Import_name_cannot_be_0_2438\",message:\"Import name cannot be '{0}'\"},Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name:{code:2439,category:e.DiagnosticCategory.Error,key:\"Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relati_2439\",message:\"Import or export declaration in an ambient module declaration cannot reference module through relative module name.\"},Import_declaration_conflicts_with_local_declaration_of_0:{code:2440,category:e.DiagnosticCategory.Error,key:\"Import_declaration_conflicts_with_local_declaration_of_0_2440\",message:\"Import declaration conflicts with local declaration of '{0}'\"},Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module:{code:2441,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_2441\",message:\"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module.\"},Types_have_separate_declarations_of_a_private_property_0:{code:2442,category:e.DiagnosticCategory.Error,key:\"Types_have_separate_declarations_of_a_private_property_0_2442\",message:\"Types have separate declarations of a private property '{0}'.\"},Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2:{code:2443,category:e.DiagnosticCategory.Error,key:\"Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2_2443\",message:\"Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.\"},Property_0_is_protected_in_type_1_but_public_in_type_2:{code:2444,category:e.DiagnosticCategory.Error,key:\"Property_0_is_protected_in_type_1_but_public_in_type_2_2444\",message:\"Property '{0}' is protected in type '{1}' but public in type '{2}'.\"},Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses:{code:2445,category:e.DiagnosticCategory.Error,key:\"Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses_2445\",message:\"Property '{0}' is protected and only accessible within class '{1}' and its subclasses.\"},Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1:{code:2446,category:e.DiagnosticCategory.Error,key:\"Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1_2446\",message:\"Property '{0}' is protected and only accessible through an instance of class '{1}'.\"},The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead:{code:2447,category:e.DiagnosticCategory.Error,key:\"The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead_2447\",message:\"The '{0}' operator is not allowed for boolean types. Consider using '{1}' instead.\"},Block_scoped_variable_0_used_before_its_declaration:{code:2448,category:e.DiagnosticCategory.Error,key:\"Block_scoped_variable_0_used_before_its_declaration_2448\",message:\"Block-scoped variable '{0}' used before its declaration.\"},The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant:{code:2449,category:e.DiagnosticCategory.Error,key:\"The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant_2449\",message:\"The operand of an increment or decrement operator cannot be a constant.\"},Left_hand_side_of_assignment_expression_cannot_be_a_constant:{code:2450,category:e.DiagnosticCategory.Error,key:\"Left_hand_side_of_assignment_expression_cannot_be_a_constant_2450\",message:\"Left-hand side of assignment expression cannot be a constant.\"},Cannot_redeclare_block_scoped_variable_0:{code:2451,category:e.DiagnosticCategory.Error,key:\"Cannot_redeclare_block_scoped_variable_0_2451\",message:\"Cannot redeclare block-scoped variable '{0}'.\"},An_enum_member_cannot_have_a_numeric_name:{code:2452,category:e.DiagnosticCategory.Error,key:\"An_enum_member_cannot_have_a_numeric_name_2452\",message:\"An enum member cannot have a numeric name.\"},The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly:{code:2453,category:e.DiagnosticCategory.Error,key:\"The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_typ_2453\",message:\"The type argument for type parameter '{0}' cannot be inferred from the usage. Consider specifying the type arguments explicitly.\"},Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0:{code:2455,category:e.DiagnosticCategory.Error,key:\"Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0_2455\",message:\"Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.\"},Type_alias_0_circularly_references_itself:{code:2456,category:e.DiagnosticCategory.Error,key:\"Type_alias_0_circularly_references_itself_2456\",message:\"Type alias '{0}' circularly references itself.\"},Type_alias_name_cannot_be_0:{code:2457,category:e.DiagnosticCategory.Error,key:\"Type_alias_name_cannot_be_0_2457\",message:\"Type alias name cannot be '{0}'\"},An_AMD_module_cannot_have_multiple_name_assignments:{code:2458,category:e.DiagnosticCategory.Error,key:\"An_AMD_module_cannot_have_multiple_name_assignments_2458\",message:\"An AMD module cannot have multiple name assignments.\"},Type_0_has_no_property_1_and_no_string_index_signature:{code:2459,category:e.DiagnosticCategory.Error,key:\"Type_0_has_no_property_1_and_no_string_index_signature_2459\",message:\"Type '{0}' has no property '{1}' and no string index signature.\"},Type_0_has_no_property_1:{code:2460,category:e.DiagnosticCategory.Error,key:\"Type_0_has_no_property_1_2460\",message:\"Type '{0}' has no property '{1}'.\"},Type_0_is_not_an_array_type:{code:2461,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_an_array_type_2461\",message:\"Type '{0}' is not an array type.\"},A_rest_element_must_be_last_in_an_array_destructuring_pattern:{code:2462,category:e.DiagnosticCategory.Error,key:\"A_rest_element_must_be_last_in_an_array_destructuring_pattern_2462\",message:\"A rest element must be last in an array destructuring pattern\"},A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature:{code:2463,category:e.DiagnosticCategory.Error,key:\"A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature_2463\",message:\"A binding pattern parameter cannot be optional in an implementation signature.\"},A_computed_property_name_must_be_of_type_string_number_symbol_or_any:{code:2464,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_must_be_of_type_string_number_symbol_or_any_2464\",message:\"A computed property name must be of type 'string', 'number', 'symbol', or 'any'.\"},this_cannot_be_referenced_in_a_computed_property_name:{code:2465,category:e.DiagnosticCategory.Error,key:\"this_cannot_be_referenced_in_a_computed_property_name_2465\",message:\"'this' cannot be referenced in a computed property name.\"},super_cannot_be_referenced_in_a_computed_property_name:{code:2466,category:e.DiagnosticCategory.Error,key:\"super_cannot_be_referenced_in_a_computed_property_name_2466\",message:\"'super' cannot be referenced in a computed property name.\"},A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type:{code:2467,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type_2467\",message:\"A computed property name cannot reference a type parameter from its containing type.\"},Cannot_find_global_value_0:{code:2468,category:e.DiagnosticCategory.Error,key:\"Cannot_find_global_value_0_2468\",message:\"Cannot find global value '{0}'.\"},The_0_operator_cannot_be_applied_to_type_symbol:{code:2469,category:e.DiagnosticCategory.Error,key:\"The_0_operator_cannot_be_applied_to_type_symbol_2469\",message:\"The '{0}' operator cannot be applied to type 'symbol'.\"},Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object:{code:2470,category:e.DiagnosticCategory.Error,key:\"Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object_2470\",message:\"'Symbol' reference does not refer to the global Symbol constructor object.\"},A_computed_property_name_of_the_form_0_must_be_of_type_symbol:{code:2471,category:e.DiagnosticCategory.Error,key:\"A_computed_property_name_of_the_form_0_must_be_of_type_symbol_2471\",message:\"A computed property name of the form '{0}' must be of type 'symbol'.\"},Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher:{code:2472,category:e.DiagnosticCategory.Error,key:\"Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher_2472\",message:\"Spread operator in 'new' expressions is only available when targeting ECMAScript 5 and higher.\"},Enum_declarations_must_all_be_const_or_non_const:{code:2473,category:e.DiagnosticCategory.Error,key:\"Enum_declarations_must_all_be_const_or_non_const_2473\",message:\"Enum declarations must all be const or non-const.\"},In_const_enum_declarations_member_initializer_must_be_constant_expression:{code:2474,category:e.DiagnosticCategory.Error,key:\"In_const_enum_declarations_member_initializer_must_be_constant_expression_2474\",message:\"In 'const' enum declarations member initializer must be constant expression.\"},const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment:{code:2475,category:e.DiagnosticCategory.Error,key:\"const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_im_2475\",message:\"'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment.\"},A_const_enum_member_can_only_be_accessed_using_a_string_literal:{code:2476,category:e.DiagnosticCategory.Error,key:\"A_const_enum_member_can_only_be_accessed_using_a_string_literal_2476\",message:\"A const enum member can only be accessed using a string literal.\"},const_enum_member_initializer_was_evaluated_to_a_non_finite_value:{code:2477,category:e.DiagnosticCategory.Error,key:\"const_enum_member_initializer_was_evaluated_to_a_non_finite_value_2477\",message:\"'const' enum member initializer was evaluated to a non-finite value.\"},const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN:{code:2478,category:e.DiagnosticCategory.Error,key:\"const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN_2478\",message:\"'const' enum member initializer was evaluated to disallowed value 'NaN'.\"},Property_0_does_not_exist_on_const_enum_1:{code:2479,category:e.DiagnosticCategory.Error,key:\"Property_0_does_not_exist_on_const_enum_1_2479\",message:\"Property '{0}' does not exist on 'const' enum '{1}'.\"},let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations:{code:2480,category:e.DiagnosticCategory.Error,key:\"let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations_2480\",message:\"'let' is not allowed to be used as a name in 'let' or 'const' declarations.\"},Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1:{code:2481,category:e.DiagnosticCategory.Error,key:\"Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1_2481\",message:\"Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'.\"},The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation:{code:2483,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation_2483\",message:\"The left-hand side of a 'for...of' statement cannot use a type annotation.\"},Export_declaration_conflicts_with_exported_declaration_of_0:{code:2484,category:e.DiagnosticCategory.Error,key:\"Export_declaration_conflicts_with_exported_declaration_of_0_2484\",message:\"Export declaration conflicts with exported declaration of '{0}'\"},The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant:{code:2485,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant_2485\",message:\"The left-hand side of a 'for...of' statement cannot be a previously defined constant.\"},The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant:{code:2486,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant_2486\",message:\"The left-hand side of a 'for...in' statement cannot be a previously defined constant.\"},Invalid_left_hand_side_in_for_of_statement:{code:2487,category:e.DiagnosticCategory.Error,key:\"Invalid_left_hand_side_in_for_of_statement_2487\",message:\"Invalid left-hand side in 'for...of' statement.\"},Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator:{code:2488,category:e.DiagnosticCategory.Error,key:\"Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator_2488\",message:\"Type must have a '[Symbol.iterator]()' method that returns an iterator.\"},An_iterator_must_have_a_next_method:{code:2489,category:e.DiagnosticCategory.Error,key:\"An_iterator_must_have_a_next_method_2489\",message:\"An iterator must have a 'next()' method.\"},The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property:{code:2490,category:e.DiagnosticCategory.Error,key:\"The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property_2490\",message:\"The type returned by the 'next()' method of an iterator must have a 'value' property.\"},The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern:{code:2491,category:e.DiagnosticCategory.Error,key:\"The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern_2491\",message:\"The left-hand side of a 'for...in' statement cannot be a destructuring pattern.\"},Cannot_redeclare_identifier_0_in_catch_clause:{code:2492,category:e.DiagnosticCategory.Error,key:\"Cannot_redeclare_identifier_0_in_catch_clause_2492\",message:\"Cannot redeclare identifier '{0}' in catch clause\"},Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2:{code:2493,category:e.DiagnosticCategory.Error,key:\"Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2_2493\",message:\"Tuple type '{0}' with length '{1}' cannot be assigned to tuple with length '{2}'.\"},Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher:{code:2494,category:e.DiagnosticCategory.Error,key:\"Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher_2494\",message:\"Using a string in a 'for...of' statement is only supported in ECMAScript 5 and higher.\"},Type_0_is_not_an_array_type_or_a_string_type:{code:2495,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_an_array_type_or_a_string_type_2495\",message:\"Type '{0}' is not an array type or a string type.\"},The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression:{code:2496,category:e.DiagnosticCategory.Error,key:\"The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_stand_2496\",message:\"The 'arguments' object cannot be referenced in an arrow function in ES3 and ES5. Consider using a standard function expression.\"},Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct:{code:2497,category:e.DiagnosticCategory.Error,key:\"Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct_2497\",message:\"Module '{0}' resolves to a non-module entity and cannot be imported using this construct.\"},Module_0_uses_export_and_cannot_be_used_with_export_Asterisk:{code:2498,category:e.DiagnosticCategory.Error,key:\"Module_0_uses_export_and_cannot_be_used_with_export_Asterisk_2498\",message:\"Module '{0}' uses 'export =' and cannot be used with 'export *'.\"},An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments:{code:2499,category:e.DiagnosticCategory.Error,key:\"An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments_2499\",message:\"An interface can only extend an identifier/qualified-name with optional type arguments.\"},A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments:{code:2500,category:e.DiagnosticCategory.Error,key:\"A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments_2500\",message:\"A class can only implement an identifier/qualified-name with optional type arguments.\"},A_rest_element_cannot_contain_a_binding_pattern:{code:2501,category:e.DiagnosticCategory.Error,key:\"A_rest_element_cannot_contain_a_binding_pattern_2501\",message:\"A rest element cannot contain a binding pattern.\"},_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation:{code:2502,category:e.DiagnosticCategory.Error,key:\"_0_is_referenced_directly_or_indirectly_in_its_own_type_annotation_2502\",message:\"'{0}' is referenced directly or indirectly in its own type annotation.\"},Cannot_find_namespace_0:{code:2503,category:e.DiagnosticCategory.Error,key:\"Cannot_find_namespace_0_2503\",message:\"Cannot find namespace '{0}'.\"},No_best_common_type_exists_among_yield_expressions:{code:2504,category:e.DiagnosticCategory.Error,key:\"No_best_common_type_exists_among_yield_expressions_2504\",message:\"No best common type exists among yield expressions.\"},A_generator_cannot_have_a_void_type_annotation:{code:2505,category:e.DiagnosticCategory.Error,key:\"A_generator_cannot_have_a_void_type_annotation_2505\",message:\"A generator cannot have a 'void' type annotation.\"},_0_is_referenced_directly_or_indirectly_in_its_own_base_expression:{code:2506,category:e.DiagnosticCategory.Error,key:\"_0_is_referenced_directly_or_indirectly_in_its_own_base_expression_2506\",message:\"'{0}' is referenced directly or indirectly in its own base expression.\"},Type_0_is_not_a_constructor_function_type:{code:2507,category:e.DiagnosticCategory.Error,key:\"Type_0_is_not_a_constructor_function_type_2507\",message:\"Type '{0}' is not a constructor function type.\"},No_base_constructor_has_the_specified_number_of_type_arguments:{code:2508,category:e.DiagnosticCategory.Error,key:\"No_base_constructor_has_the_specified_number_of_type_arguments_2508\",message:\"No base constructor has the specified number of type arguments.\"},Base_constructor_return_type_0_is_not_a_class_or_interface_type:{code:2509,category:e.DiagnosticCategory.Error,key:\"Base_constructor_return_type_0_is_not_a_class_or_interface_type_2509\",message:\"Base constructor return type '{0}' is not a class or interface type.\"},Base_constructors_must_all_have_the_same_return_type:{code:2510,category:e.DiagnosticCategory.Error,key:\"Base_constructors_must_all_have_the_same_return_type_2510\",message:\"Base constructors must all have the same return type.\"},Cannot_create_an_instance_of_the_abstract_class_0:{code:2511,category:e.DiagnosticCategory.Error,key:\"Cannot_create_an_instance_of_the_abstract_class_0_2511\",message:\"Cannot create an instance of the abstract class '{0}'.\"},Overload_signatures_must_all_be_abstract_or_not_abstract:{code:2512,category:e.DiagnosticCategory.Error,key:\"Overload_signatures_must_all_be_abstract_or_not_abstract_2512\",message:\"Overload signatures must all be abstract or not abstract.\"},Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression:{code:2513,category:e.DiagnosticCategory.Error,key:\"Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513\",message:\"Abstract method '{0}' in class '{1}' cannot be accessed via super expression.\"},Classes_containing_abstract_methods_must_be_marked_abstract:{code:2514,category:e.DiagnosticCategory.Error,key:\"Classes_containing_abstract_methods_must_be_marked_abstract_2514\",message:\"Classes containing abstract methods must be marked abstract.\"},Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2:{code:2515,category:e.DiagnosticCategory.Error,key:\"Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515\",message:\"Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'.\"},All_declarations_of_an_abstract_method_must_be_consecutive:{code:2516,category:e.DiagnosticCategory.Error,key:\"All_declarations_of_an_abstract_method_must_be_consecutive_2516\",message:\"All declarations of an abstract method must be consecutive.\"},Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type:{code:2517,category:e.DiagnosticCategory.Error,key:\"Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517\",message:\"Cannot assign an abstract constructor type to a non-abstract constructor type.\"},A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard:{code:2518,category:e.DiagnosticCategory.Error,key:\"A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518\",message:\"A 'this'-based type guard is not compatible with a parameter-based type guard.\"},Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions:{code:2520,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions_2520\",message:\"Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.\"},Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions:{code:2521,category:e.DiagnosticCategory.Error,key:\"Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions_2521\",message:\"Expression resolves to variable declaration '{0}' that compiler uses to support async functions.\"},The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression:{code:2522,category:e.DiagnosticCategory.Error,key:\"The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_2522\",message:\"The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression.\"},yield_expressions_cannot_be_used_in_a_parameter_initializer:{code:2523,category:e.DiagnosticCategory.Error,key:\"yield_expressions_cannot_be_used_in_a_parameter_initializer_2523\",message:\"'yield' expressions cannot be used in a parameter initializer.\"},await_expressions_cannot_be_used_in_a_parameter_initializer:{code:2524,category:e.DiagnosticCategory.Error,key:\"await_expressions_cannot_be_used_in_a_parameter_initializer_2524\",message:\"'await' expressions cannot be used in a parameter initializer.\"},Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value:{code:2525,category:e.DiagnosticCategory.Error,key:\"Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value_2525\",message:\"Initializer provides no value for this binding element and the binding element has no default value.\"},A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface:{code:2526,category:e.DiagnosticCategory.Error,key:\"A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface_2526\",message:\"A 'this' type is available only in a non-static member of a class or interface.\"},The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary:{code:2527,category:e.DiagnosticCategory.Error,key:\"The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary_2527\",message:\"The inferred type of '{0}' references an inaccessible 'this' type. A type annotation is necessary.\"},A_module_cannot_have_multiple_default_exports:{code:2528,category:e.DiagnosticCategory.Error,key:\"A_module_cannot_have_multiple_default_exports_2528\",message:\"A module cannot have multiple default exports.\"},Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions:{code:2529,category:e.DiagnosticCategory.Error,key:\"Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_func_2529\",message:\"Duplicate identifier '{0}'. Compiler reserves name '{1}' in top level scope of a module containing async functions.\"},JSX_element_attributes_type_0_may_not_be_a_union_type:{code:2600,category:e.DiagnosticCategory.Error,key:\"JSX_element_attributes_type_0_may_not_be_a_union_type_2600\",message:\"JSX element attributes type '{0}' may not be a union type.\"},The_return_type_of_a_JSX_element_constructor_must_return_an_object_type:{code:2601,category:e.DiagnosticCategory.Error,key:\"The_return_type_of_a_JSX_element_constructor_must_return_an_object_type_2601\",message:\"The return type of a JSX element constructor must return an object type.\"},JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist:{code:2602,category:e.DiagnosticCategory.Error,key:\"JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist_2602\",message:\"JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist.\"},Property_0_in_type_1_is_not_assignable_to_type_2:{code:2603,category:e.DiagnosticCategory.Error,key:\"Property_0_in_type_1_is_not_assignable_to_type_2_2603\",message:\"Property '{0}' in type '{1}' is not assignable to type '{2}'\"},JSX_element_type_0_does_not_have_any_construct_or_call_signatures:{code:2604,category:e.DiagnosticCategory.Error,key:\"JSX_element_type_0_does_not_have_any_construct_or_call_signatures_2604\",message:\"JSX element type '{0}' does not have any construct or call signatures.\"},JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements:{code:2605,category:e.DiagnosticCategory.Error,key:\"JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements_2605\",message:\"JSX element type '{0}' is not a constructor function for JSX elements.\"},Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property:{code:2606,category:e.DiagnosticCategory.Error,key:\"Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property_2606\",message:\"Property '{0}' of JSX spread attribute is not assignable to target property.\"},JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property:{code:2607,category:e.DiagnosticCategory.Error,key:\"JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property_2607\",message:\"JSX element class does not support attributes because it does not have a '{0}' property\"},The_global_type_JSX_0_may_not_have_more_than_one_property:{code:2608,category:e.DiagnosticCategory.Error,key:\"The_global_type_JSX_0_may_not_have_more_than_one_property_2608\",message:\"The global type 'JSX.{0}' may not have more than one property\"},Cannot_emit_namespaced_JSX_elements_in_React:{code:2650,category:e.DiagnosticCategory.Error,key:\"Cannot_emit_namespaced_JSX_elements_in_React_2650\",message:\"Cannot emit namespaced JSX elements in React\"},A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums:{code:2651,category:e.DiagnosticCategory.Error,key:\"A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651\",message:\"A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.\"},Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead:{code:2652,category:e.DiagnosticCategory.Error,key:\"Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652\",message:\"Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead.\"},Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1:{code:2653,category:e.DiagnosticCategory.Error,key:\"Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653\",message:\"Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.\"},Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition:{code:2654,category:e.DiagnosticCategory.Error,key:\"Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_pack_2654\",message:\"Exported external package typings file cannot contain tripleslash references. Please contact the package author to update the package definition.\"},Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition:{code:2656,category:e.DiagnosticCategory.Error,key:\"Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_2656\",message:\"Exported external package typings file '{0}' is not a module. Please contact the package author to update the package definition.\"},JSX_expressions_must_have_one_parent_element:{code:2657,category:e.DiagnosticCategory.Error,key:\"JSX_expressions_must_have_one_parent_element_2657\",message:\"JSX expressions must have one parent element\"},Type_0_provides_no_match_for_the_signature_1:{code:2658,category:e.DiagnosticCategory.Error,key:\"Type_0_provides_no_match_for_the_signature_1_2658\",message:\"Type '{0}' provides no match for the signature '{1}'\"},super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher:{code:2659,category:e.DiagnosticCategory.Error,key:\"super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659\",message:\"'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher.\"},super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions:{code:2660,category:e.DiagnosticCategory.Error,key:\"super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions_2660\",message:\"'super' can only be referenced in members of derived classes or object literal expressions.\"},Cannot_re_export_name_that_is_not_defined_in_the_module:{code:2661,category:e.DiagnosticCategory.Error,key:\"Cannot_re_export_name_that_is_not_defined_in_the_module_2661\",message:\"Cannot re-export name that is not defined in the module.\"},Cannot_find_name_0_Did_you_mean_the_static_member_1_0:{code:2662,category:e.DiagnosticCategory.Error,key:\"Cannot_find_name_0_Did_you_mean_the_static_member_1_0_2662\",message:\"Cannot find name '{0}'. Did you mean the static member '{1}.{0}'?\"},Cannot_find_name_0_Did_you_mean_the_instance_member_this_0:{code:2663,category:e.DiagnosticCategory.Error,key:\"Cannot_find_name_0_Did_you_mean_the_instance_member_this_0_2663\",message:\"Cannot find name '{0}'. Did you mean the instance member 'this.{0}'?\"},Invalid_module_name_in_augmentation_module_0_cannot_be_found:{code:2664,category:e.DiagnosticCategory.Error,key:\"Invalid_module_name_in_augmentation_module_0_cannot_be_found_2664\",message:\"Invalid module name in augmentation, module '{0}' cannot be found.\"},Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope:{code:2665,category:e.DiagnosticCategory.Error,key:\"Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope_2665\",message:\"Module augmentation cannot introduce new names in the top level scope.\"},Exports_and_export_assignments_are_not_permitted_in_module_augmentations:{code:2666,category:e.DiagnosticCategory.Error,key:\"Exports_and_export_assignments_are_not_permitted_in_module_augmentations_2666\",message:\"Exports and export assignments are not permitted in module augmentations.\"},Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module:{code:2667,category:e.DiagnosticCategory.Error,key:\"Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_mod_2667\",message:\"Imports are not permitted in module augmentations. Consider moving them to the enclosing external module.\"},export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible:{code:2668,category:e.DiagnosticCategory.Error,key:\"export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always__2668\",message:\"'export' modifier cannot be applied to ambient modules and module augmentations since they are always visible.\"},Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations:{code:2669,category:e.DiagnosticCategory.Error,key:\"Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_2669\",message:\"Augmentations for the global scope can only be directly nested in external modules or ambient module declarations.\"},Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context:{code:2670,category:e.DiagnosticCategory.Error,key:\"Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambien_2670\",message:\"Augmentations for the global scope should have 'declare' modifier unless they appear in already ambient context.\"},Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity:{code:2671,category:e.DiagnosticCategory.Error,key:\"Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity_2671\",message:\"Cannot augment module '{0}' because it resolves to a non-module entity.\"},Import_declaration_0_is_using_private_name_1:{code:4e3,category:e.DiagnosticCategory.Error,key:\"Import_declaration_0_is_using_private_name_1_4000\",message:\"Import declaration '{0}' is using private name '{1}'.\"},Type_parameter_0_of_exported_class_has_or_is_using_private_name_1:{code:4002,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002\",message:\"Type parameter '{0}' of exported class has or is using private name '{1}'.\"},Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1:{code:4004,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004\",message:\"Type parameter '{0}' of exported interface has or is using private name '{1}'.\"},Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4006,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4006\",message:\"Type parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.\"},Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4008,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4008\",message:\"Type parameter '{0}' of call signature from exported interface has or is using private name '{1}'.\"},Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:{code:4010,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4010\",message:\"Type parameter '{0}' of public static method from exported class has or is using private name '{1}'.\"},Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:{code:4012,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4012\",message:\"Type parameter '{0}' of public method from exported class has or is using private name '{1}'.\"},Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:{code:4014,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4014\",message:\"Type parameter '{0}' of method from exported interface has or is using private name '{1}'.\"},Type_parameter_0_of_exported_function_has_or_is_using_private_name_1:{code:4016,category:e.DiagnosticCategory.Error,key:\"Type_parameter_0_of_exported_function_has_or_is_using_private_name_1_4016\",message:\"Type parameter '{0}' of exported function has or is using private name '{1}'.\"},Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:{code:4019,category:e.DiagnosticCategory.Error,key:\"Implements_clause_of_exported_class_0_has_or_is_using_private_name_1_4019\",message:\"Implements clause of exported class '{0}' has or is using private name '{1}'.\"},Extends_clause_of_exported_class_0_has_or_is_using_private_name_1:{code:4020,category:e.DiagnosticCategory.Error,key:\"Extends_clause_of_exported_class_0_has_or_is_using_private_name_1_4020\",message:\"Extends clause of exported class '{0}' has or is using private name '{1}'.\"},Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1:{code:4022,category:e.DiagnosticCategory.Error,key:\"Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1_4022\",message:\"Extends clause of exported interface '{0}' has or is using private name '{1}'.\"},Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4023,category:e.DiagnosticCategory.Error,key:\"Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4023\",message:\"Exported variable '{0}' has or is using name '{1}' from external module {2} but cannot be named.\"},Exported_variable_0_has_or_is_using_name_1_from_private_module_2:{code:4024,category:e.DiagnosticCategory.Error,key:\"Exported_variable_0_has_or_is_using_name_1_from_private_module_2_4024\",message:\"Exported variable '{0}' has or is using name '{1}' from private module '{2}'.\"},Exported_variable_0_has_or_is_using_private_name_1:{code:4025,category:e.DiagnosticCategory.Error,key:\"Exported_variable_0_has_or_is_using_private_name_1_4025\",message:\"Exported variable '{0}' has or is using private name '{1}'.\"},Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4026,category:e.DiagnosticCategory.Error,key:\"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot__4026\",message:\"Public static property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"},Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4027,category:e.DiagnosticCategory.Error,key:\"Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4027\",message:\"Public static property '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"},Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:{code:4028,category:e.DiagnosticCategory.Error,key:\"Public_static_property_0_of_exported_class_has_or_is_using_private_name_1_4028\",message:\"Public static property '{0}' of exported class has or is using private name '{1}'.\"},Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4029,category:e.DiagnosticCategory.Error,key:\"Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_name_4029\",message:\"Public property '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.\"},Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4030,category:e.DiagnosticCategory.Error,key:\"Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2_4030\",message:\"Public property '{0}' of exported class has or is using name '{1}' from private module '{2}'.\"},Public_property_0_of_exported_class_has_or_is_using_private_name_1:{code:4031,category:e.DiagnosticCategory.Error,key:\"Public_property_0_of_exported_class_has_or_is_using_private_name_1_4031\",message:\"Public property '{0}' of exported class has or is using private name '{1}'.\"},Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4032,category:e.DiagnosticCategory.Error,key:\"Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2_4032\",message:\"Property '{0}' of exported interface has or is using name '{1}' from private module '{2}'.\"},Property_0_of_exported_interface_has_or_is_using_private_name_1:{code:4033,category:e.DiagnosticCategory.Error,key:\"Property_0_of_exported_interface_has_or_is_using_private_name_1_4033\",message:\"Property '{0}' of exported interface has or is using private name '{1}'.\"},Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4034,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_4034\",message:\"Parameter '{0}' of public static property setter from exported class has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1:{code:4035,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1_4035\",message:\"Parameter '{0}' of public static property setter from exported class has or is using private name '{1}'.\"},Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4036,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_4036\",message:\"Parameter '{0}' of public property setter from exported class has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1:{code:4037,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1_4037\",message:\"Parameter '{0}' of public property setter from exported class has or is using private name '{1}'.\"},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4038,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_externa_4038\",message:\"Return type of public static property getter from exported class has or is using name '{0}' from external module {1} but cannot be named.\"},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4039,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_4039\",message:\"Return type of public static property getter from exported class has or is using name '{0}' from private module '{1}'.\"},Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0:{code:4040,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0_4040\",message:\"Return type of public static property getter from exported class has or is using private name '{0}'.\"},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4041,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_modul_4041\",message:\"Return type of public property getter from exported class has or is using name '{0}' from external module {1} but cannot be named.\"},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4042,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_4042\",message:\"Return type of public property getter from exported class has or is using name '{0}' from private module '{1}'.\"},Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0:{code:4043,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0_4043\",message:\"Return type of public property getter from exported class has or is using private name '{0}'.\"},Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4044,category:e.DiagnosticCategory.Error,key:\"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_mod_4044\",message:\"Return type of constructor signature from exported interface has or is using name '{0}' from private module '{1}'.\"},Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4045,category:e.DiagnosticCategory.Error,key:\"Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0_4045\",message:\"Return type of constructor signature from exported interface has or is using private name '{0}'.\"},Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4046,category:e.DiagnosticCategory.Error,key:\"Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4046\",message:\"Return type of call signature from exported interface has or is using name '{0}' from private module '{1}'.\"},Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4047,category:e.DiagnosticCategory.Error,key:\"Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0_4047\",message:\"Return type of call signature from exported interface has or is using private name '{0}'.\"},Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4048,category:e.DiagnosticCategory.Error,key:\"Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4048\",message:\"Return type of index signature from exported interface has or is using name '{0}' from private module '{1}'.\"},Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0:{code:4049,category:e.DiagnosticCategory.Error,key:\"Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0_4049\",message:\"Return type of index signature from exported interface has or is using private name '{0}'.\"},Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4050,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module__4050\",message:\"Return type of public static method from exported class has or is using name '{0}' from external module {1} but cannot be named.\"},Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4051,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4051\",message:\"Return type of public static method from exported class has or is using name '{0}' from private module '{1}'.\"},Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:{code:4052,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0_4052\",message:\"Return type of public static method from exported class has or is using private name '{0}'.\"},Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4053,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_c_4053\",message:\"Return type of public method from exported class has or is using name '{0}' from external module {1} but cannot be named.\"},Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:{code:4054,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1_4054\",message:\"Return type of public method from exported class has or is using name '{0}' from private module '{1}'.\"},Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:{code:4055,category:e.DiagnosticCategory.Error,key:\"Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0_4055\",message:\"Return type of public method from exported class has or is using private name '{0}'.\"},Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:{code:4056,category:e.DiagnosticCategory.Error,key:\"Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1_4056\",message:\"Return type of method from exported interface has or is using name '{0}' from private module '{1}'.\"},Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0:{code:4057,category:e.DiagnosticCategory.Error,key:\"Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0_4057\",message:\"Return type of method from exported interface has or is using private name '{0}'.\"},Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:{code:4058,category:e.DiagnosticCategory.Error,key:\"Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named_4058\",message:\"Return type of exported function has or is using name '{0}' from external module {1} but cannot be named.\"},Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:{code:4059,category:e.DiagnosticCategory.Error,key:\"Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1_4059\",message:\"Return type of exported function has or is using name '{0}' from private module '{1}'.\"},Return_type_of_exported_function_has_or_is_using_private_name_0:{code:4060,category:e.DiagnosticCategory.Error,key:\"Return_type_of_exported_function_has_or_is_using_private_name_0_4060\",message:\"Return type of exported function has or is using private name '{0}'.\"},Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4061,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_can_4061\",message:\"Parameter '{0}' of constructor from exported class has or is using name '{1}' from external module {2} but cannot be named.\"},Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4062,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2_4062\",message:\"Parameter '{0}' of constructor from exported class has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1:{code:4063,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1_4063\",message:\"Parameter '{0}' of constructor from exported class has or is using private name '{1}'.\"},Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4064,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_mod_4064\",message:\"Parameter '{0}' of constructor signature from exported interface has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4065,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1_4065\",message:\"Parameter '{0}' of constructor signature from exported interface has or is using private name '{1}'.\"},Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4066,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4066\",message:\"Parameter '{0}' of call signature from exported interface has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1:{code:4067,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1_4067\",message:\"Parameter '{0}' of call signature from exported interface has or is using private name '{1}'.\"},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4068,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module__4068\",message:\"Parameter '{0}' of public static method from exported class has or is using name '{1}' from external module {2} but cannot be named.\"},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4069,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4069\",message:\"Parameter '{0}' of public static method from exported class has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:{code:4070,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1_4070\",message:\"Parameter '{0}' of public static method from exported class has or is using private name '{1}'.\"},Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4071,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_c_4071\",message:\"Parameter '{0}' of public method from exported class has or is using name '{1}' from external module {2} but cannot be named.\"},Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:{code:4072,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2_4072\",message:\"Parameter '{0}' of public method from exported class has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:{code:4073,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1_4073\",message:\"Parameter '{0}' of public method from exported class has or is using private name '{1}'.\"},Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:{code:4074,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2_4074\",message:\"Parameter '{0}' of method from exported interface has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1:{code:4075,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1_4075\",message:\"Parameter '{0}' of method from exported interface has or is using private name '{1}'.\"},Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:{code:4076,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named_4076\",message:\"Parameter '{0}' of exported function has or is using name '{1}' from external module {2} but cannot be named.\"},Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:{code:4077,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2_4077\",message:\"Parameter '{0}' of exported function has or is using name '{1}' from private module '{2}'.\"},Parameter_0_of_exported_function_has_or_is_using_private_name_1:{code:4078,category:e.DiagnosticCategory.Error,key:\"Parameter_0_of_exported_function_has_or_is_using_private_name_1_4078\",message:\"Parameter '{0}' of exported function has or is using private name '{1}'.\"},Exported_type_alias_0_has_or_is_using_private_name_1:{code:4081,category:e.DiagnosticCategory.Error,key:\"Exported_type_alias_0_has_or_is_using_private_name_1_4081\",message:\"Exported type alias '{0}' has or is using private name '{1}'.\"},Default_export_of_the_module_has_or_is_using_private_name_0:{code:4082,category:e.DiagnosticCategory.Error,key:\"Default_export_of_the_module_has_or_is_using_private_name_0_4082\",message:\"Default export of the module has or is using private name '{0}'.\"},The_current_host_does_not_support_the_0_option:{code:5001,category:e.DiagnosticCategory.Error,key:\"The_current_host_does_not_support_the_0_option_5001\",message:\"The current host does not support the '{0}' option.\"},Cannot_find_the_common_subdirectory_path_for_the_input_files:{code:5009,category:e.DiagnosticCategory.Error,key:\"Cannot_find_the_common_subdirectory_path_for_the_input_files_5009\",message:\"Cannot find the common subdirectory path for the input files.\"},Cannot_read_file_0_Colon_1:{code:5012,category:e.DiagnosticCategory.Error,key:\"Cannot_read_file_0_Colon_1_5012\",message:\"Cannot read file '{0}': {1}\"},Unsupported_file_encoding:{code:5013,category:e.DiagnosticCategory.Error,key:\"Unsupported_file_encoding_5013\",message:\"Unsupported file encoding.\"},Failed_to_parse_file_0_Colon_1:{code:5014,category:e.DiagnosticCategory.Error,key:\"Failed_to_parse_file_0_Colon_1_5014\",message:\"Failed to parse file '{0}': {1}.\"},Unknown_compiler_option_0:{code:5023,category:e.DiagnosticCategory.Error,key:\"Unknown_compiler_option_0_5023\",message:\"Unknown compiler option '{0}'.\"},Compiler_option_0_requires_a_value_of_type_1:{code:5024,category:e.DiagnosticCategory.Error,key:\"Compiler_option_0_requires_a_value_of_type_1_5024\",message:\"Compiler option '{0}' requires a value of type {1}.\"},Could_not_write_file_0_Colon_1:{code:5033,category:e.DiagnosticCategory.Error,key:\"Could_not_write_file_0_Colon_1_5033\",message:\"Could not write file '{0}': {1}\"},Option_project_cannot_be_mixed_with_source_files_on_a_command_line:{code:5042,category:e.DiagnosticCategory.Error,key:\"Option_project_cannot_be_mixed_with_source_files_on_a_command_line_5042\",message:\"Option 'project' cannot be mixed with source files on a command line.\"},Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher:{code:5047,category:e.DiagnosticCategory.Error,key:\"Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES_5047\",message:\"Option 'isolatedModules' can only be used when either option '--module' is provided or option 'target' is 'ES2015' or higher.\"},Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided:{code:5051,category:e.DiagnosticCategory.Error,key:\"Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_prov_5051\",message:\"Option 'inlineSources' can only be used when either option '--inlineSourceMap' or option '--sourceMap' is provided.\"},Option_0_cannot_be_specified_without_specifying_option_1:{code:5052,category:e.DiagnosticCategory.Error,key:\"Option_0_cannot_be_specified_without_specifying_option_1_5052\",message:\"Option '{0}' cannot be specified without specifying option '{1}'.\"},Option_0_cannot_be_specified_with_option_1:{code:5053,category:e.DiagnosticCategory.Error,key:\"Option_0_cannot_be_specified_with_option_1_5053\",message:\"Option '{0}' cannot be specified with option '{1}'.\"},A_tsconfig_json_file_is_already_defined_at_Colon_0:{code:5054,category:e.DiagnosticCategory.Error,key:\"A_tsconfig_json_file_is_already_defined_at_Colon_0_5054\",message:\"A 'tsconfig.json' file is already defined at: '{0}'.\"},Cannot_write_file_0_because_it_would_overwrite_input_file:{code:5055,category:e.DiagnosticCategory.Error,key:\"Cannot_write_file_0_because_it_would_overwrite_input_file_5055\",message:\"Cannot write file '{0}' because it would overwrite input file.\"},Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files:{code:5056,category:e.DiagnosticCategory.Error,key:\"Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files_5056\",message:\"Cannot write file '{0}' because it would be overwritten by multiple input files.\"},Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0:{code:5057,category:e.DiagnosticCategory.Error,key:\"Cannot_find_a_tsconfig_json_file_at_the_specified_directory_Colon_0_5057\",message:\"Cannot find a tsconfig.json file at the specified directory: '{0}'\"},The_specified_path_does_not_exist_Colon_0:{code:5058,category:e.DiagnosticCategory.Error,key:\"The_specified_path_does_not_exist_Colon_0_5058\",message:\"The specified path does not exist: '{0}'\"},Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier:{code:5059,category:e.DiagnosticCategory.Error,key:\"Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier_5059\",message:\"Invalide value for '--reactNamespace'. '{0}' is not a valid identifier.\"},Concatenate_and_emit_output_to_single_file:{code:6001,category:e.DiagnosticCategory.Message,key:\"Concatenate_and_emit_output_to_single_file_6001\",message:\"Concatenate and emit output to single file.\"},Generates_corresponding_d_ts_file:{code:6002,category:e.DiagnosticCategory.Message,key:\"Generates_corresponding_d_ts_file_6002\",message:\"Generates corresponding '.d.ts' file.\"},Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations:{code:6003,category:e.DiagnosticCategory.Message,key:\"Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations_6003\",message:\"Specifies the location where debugger should locate map files instead of generated locations.\"},Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations:{code:6004,category:e.DiagnosticCategory.Message,key:\"Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations_6004\",message:\"Specifies the location where debugger should locate TypeScript files instead of source locations.\"},Watch_input_files:{code:6005,category:e.DiagnosticCategory.Message,key:\"Watch_input_files_6005\",message:\"Watch input files.\"},Redirect_output_structure_to_the_directory:{code:6006,category:e.DiagnosticCategory.Message,key:\"Redirect_output_structure_to_the_directory_6006\",message:\"Redirect output structure to the directory.\"},Do_not_erase_const_enum_declarations_in_generated_code:{code:6007,category:e.DiagnosticCategory.Message,key:\"Do_not_erase_const_enum_declarations_in_generated_code_6007\",message:\"Do not erase const enum declarations in generated code.\"},Do_not_emit_outputs_if_any_errors_were_reported:{code:6008,category:e.DiagnosticCategory.Message,key:\"Do_not_emit_outputs_if_any_errors_were_reported_6008\",message:\"Do not emit outputs if any errors were reported.\"},Do_not_emit_comments_to_output:{code:6009,category:e.DiagnosticCategory.Message,key:\"Do_not_emit_comments_to_output_6009\",message:\"Do not emit comments to output.\"},Do_not_emit_outputs:{code:6010,category:e.DiagnosticCategory.Message,key:\"Do_not_emit_outputs_6010\",message:\"Do not emit outputs.\"},Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking:{code:6011,category:e.DiagnosticCategory.Message,key:\"Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typech_6011\",message:\"Allow default imports from modules with no default export. This does not affect code emit, just typechecking.\"},Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental:{code:6015,category:e.DiagnosticCategory.Message,key:\"Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental_6015\",message:\"Specify ECMAScript target version: 'ES3' (default), 'ES5', or 'ES2015' (experimental)\"},Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015:{code:6016,category:e.DiagnosticCategory.Message,key:\"Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015_6016\",message:\"Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'\"},Print_this_message:{code:6017,category:e.DiagnosticCategory.Message,key:\"Print_this_message_6017\",message:\"Print this message.\"},Print_the_compiler_s_version:{code:6019,category:e.DiagnosticCategory.Message,key:\"Print_the_compiler_s_version_6019\",message:\"Print the compiler's version.\"},Compile_the_project_in_the_given_directory:{code:6020,category:e.DiagnosticCategory.Message,key:\"Compile_the_project_in_the_given_directory_6020\",message:\"Compile the project in the given directory.\"},Syntax_Colon_0:{code:6023,category:e.DiagnosticCategory.Message,key:\"Syntax_Colon_0_6023\",message:\"Syntax: {0}\"},options:{code:6024,category:e.DiagnosticCategory.Message,key:\"options_6024\",message:\"options\"},file:{code:6025,category:e.DiagnosticCategory.Message,key:\"file_6025\",message:\"file\"},Examples_Colon_0:{code:6026,category:e.DiagnosticCategory.Message,key:\"Examples_Colon_0_6026\",message:\"Examples: {0}\"},Options_Colon:{code:6027,category:e.DiagnosticCategory.Message,key:\"Options_Colon_6027\",message:\"Options:\"},Version_0:{code:6029,category:e.DiagnosticCategory.Message,key:\"Version_0_6029\",message:\"Version {0}\"},Insert_command_line_options_and_files_from_a_file:{code:6030,category:e.DiagnosticCategory.Message,key:\"Insert_command_line_options_and_files_from_a_file_6030\",message:\"Insert command line options and files from a file.\"},File_change_detected_Starting_incremental_compilation:{code:6032,category:e.DiagnosticCategory.Message,key:\"File_change_detected_Starting_incremental_compilation_6032\",message:\"File change detected. Starting incremental compilation...\"},KIND:{code:6034,category:e.DiagnosticCategory.Message,key:\"KIND_6034\",message:\"KIND\"},FILE:{code:6035,category:e.DiagnosticCategory.Message,key:\"FILE_6035\",message:\"FILE\"},VERSION:{code:6036,category:e.DiagnosticCategory.Message,key:\"VERSION_6036\",message:\"VERSION\"},LOCATION:{code:6037,category:e.DiagnosticCategory.Message,key:\"LOCATION_6037\",message:\"LOCATION\"},DIRECTORY:{code:6038,category:e.DiagnosticCategory.Message,key:\"DIRECTORY_6038\",message:\"DIRECTORY\"},Compilation_complete_Watching_for_file_changes:{code:6042,category:e.DiagnosticCategory.Message,key:\"Compilation_complete_Watching_for_file_changes_6042\",message:\"Compilation complete. Watching for file changes.\"},Generates_corresponding_map_file:{code:6043,category:e.DiagnosticCategory.Message,key:\"Generates_corresponding_map_file_6043\",message:\"Generates corresponding '.map' file.\"},Compiler_option_0_expects_an_argument:{code:6044,category:e.DiagnosticCategory.Error,key:\"Compiler_option_0_expects_an_argument_6044\",message:\"Compiler option '{0}' expects an argument.\"},Unterminated_quoted_string_in_response_file_0:{code:6045,category:e.DiagnosticCategory.Error,key:\"Unterminated_quoted_string_in_response_file_0_6045\",message:\"Unterminated quoted string in response file '{0}'.\"},Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none:{code:6046,category:e.DiagnosticCategory.Error,key:\"Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none_6046\",message:\"Argument for '--module' option must be 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'none'.\"},Argument_for_target_option_must_be_ES3_ES5_or_ES2015:{code:6047,category:e.DiagnosticCategory.Error,key:\"Argument_for_target_option_must_be_ES3_ES5_or_ES2015_6047\",message:\"Argument for '--target' option must be 'ES3', 'ES5', or 'ES2015'.\"},Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1:{code:6048,category:e.DiagnosticCategory.Error,key:\"Locale_must_be_of_the_form_language_or_language_territory_For_example_0_or_1_6048\",message:\"Locale must be of the form <language> or <language>-<territory>. For example '{0}' or '{1}'.\"},Unsupported_locale_0:{code:6049,category:e.DiagnosticCategory.Error,key:\"Unsupported_locale_0_6049\",message:\"Unsupported locale '{0}'.\"},Unable_to_open_file_0:{code:6050,category:e.DiagnosticCategory.Error,key:\"Unable_to_open_file_0_6050\",message:\"Unable to open file '{0}'.\"},Corrupted_locale_file_0:{code:6051,category:e.DiagnosticCategory.Error,key:\"Corrupted_locale_file_0_6051\",message:\"Corrupted locale file {0}.\"},Raise_error_on_expressions_and_declarations_with_an_implied_any_type:{code:6052,category:e.DiagnosticCategory.Message,key:\"Raise_error_on_expressions_and_declarations_with_an_implied_any_type_6052\",message:\"Raise error on expressions and declarations with an implied 'any' type.\"},File_0_not_found:{code:6053,category:e.DiagnosticCategory.Error,key:\"File_0_not_found_6053\",message:\"File '{0}' not found.\"},File_0_has_unsupported_extension_The_only_supported_extensions_are_1:{code:6054,category:e.DiagnosticCategory.Error,key:\"File_0_has_unsupported_extension_The_only_supported_extensions_are_1_6054\",message:\"File '{0}' has unsupported extension. The only supported extensions are {1}.\"},Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures:{code:6055,category:e.DiagnosticCategory.Message,key:\"Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures_6055\",message:\"Suppress noImplicitAny errors for indexing objects lacking index signatures.\"},Do_not_emit_declarations_for_code_that_has_an_internal_annotation:{code:6056,category:e.DiagnosticCategory.Message,key:\"Do_not_emit_declarations_for_code_that_has_an_internal_annotation_6056\",message:\"Do not emit declarations for code that has an '@internal' annotation.\"},Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir:{code:6058,category:e.DiagnosticCategory.Message,key:\"Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDi_6058\",message:\"Specifies the root directory of input files. Use to control the output directory structure with --outDir.\"},File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files:{code:6059,category:e.DiagnosticCategory.Error,key:\"File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files_6059\",message:\"File '{0}' is not under 'rootDir' '{1}'. 'rootDir' is expected to contain all source files.\"},Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix:{code:6060,category:e.DiagnosticCategory.Message,key:\"Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix_6060\",message:\"Specifies the end of line sequence to be used when emitting files: 'CRLF' (dos) or 'LF' (unix).\"},NEWLINE:{code:6061,category:e.DiagnosticCategory.Message,key:\"NEWLINE_6061\",message:\"NEWLINE\"},Argument_for_newLine_option_must_be_CRLF_or_LF:{code:6062,category:e.DiagnosticCategory.Error,key:\"Argument_for_newLine_option_must_be_CRLF_or_LF_6062\",message:\"Argument for '--newLine' option must be 'CRLF' or 'LF'.\"},Argument_for_moduleResolution_option_must_be_node_or_classic:{code:6063,category:e.DiagnosticCategory.Error,key:\"Argument_for_moduleResolution_option_must_be_node_or_classic_6063\",message:\"Argument for '--moduleResolution' option must be 'node' or 'classic'.\"},Enables_experimental_support_for_ES7_decorators:{code:6065,category:e.DiagnosticCategory.Message,key:\"Enables_experimental_support_for_ES7_decorators_6065\",message:\"Enables experimental support for ES7 decorators.\"},Enables_experimental_support_for_emitting_type_metadata_for_decorators:{code:6066,category:e.DiagnosticCategory.Message,key:\"Enables_experimental_support_for_emitting_type_metadata_for_decorators_6066\",message:\"Enables experimental support for emitting type metadata for decorators.\"},Enables_experimental_support_for_ES7_async_functions:{code:6068,category:e.DiagnosticCategory.Message,key:\"Enables_experimental_support_for_ES7_async_functions_6068\",message:\"Enables experimental support for ES7 async functions.\"},Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6:{code:6069,category:e.DiagnosticCategory.Message,key:\"Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6_6069\",message:\"Specifies module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6).\"},Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file:{code:6070,category:e.DiagnosticCategory.Message,key:\"Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file_6070\",message:\"Initializes a TypeScript project and creates a tsconfig.json file.\"},Successfully_created_a_tsconfig_json_file:{code:6071,category:e.DiagnosticCategory.Message,key:\"Successfully_created_a_tsconfig_json_file_6071\",message:\"Successfully created a tsconfig.json file.\"},Suppress_excess_property_checks_for_object_literals:{code:6072,category:e.DiagnosticCategory.Message,key:\"Suppress_excess_property_checks_for_object_literals_6072\",message:\"Suppress excess property checks for object literals.\"},Stylize_errors_and_messages_using_color_and_context_experimental:{code:6073,category:e.DiagnosticCategory.Message,key:\"Stylize_errors_and_messages_using_color_and_context_experimental_6073\",message:\"Stylize errors and messages using color and context. (experimental)\"},Do_not_report_errors_on_unused_labels:{code:6074,category:e.DiagnosticCategory.Message,key:\"Do_not_report_errors_on_unused_labels_6074\",message:\"Do not report errors on unused labels.\"},Report_error_when_not_all_code_paths_in_function_return_a_value:{code:6075,category:e.DiagnosticCategory.Message,key:\"Report_error_when_not_all_code_paths_in_function_return_a_value_6075\",message:\"Report error when not all code paths in function return a value.\"},Report_errors_for_fallthrough_cases_in_switch_statement:{code:6076,category:e.DiagnosticCategory.Message,key:\"Report_errors_for_fallthrough_cases_in_switch_statement_6076\",message:\"Report errors for fallthrough cases in switch statement.\"},Do_not_report_errors_on_unreachable_code:{code:6077,category:e.DiagnosticCategory.Message,key:\"Do_not_report_errors_on_unreachable_code_6077\",message:\"Do not report errors on unreachable code.\"},Disallow_inconsistently_cased_references_to_the_same_file:{code:6078,category:e.DiagnosticCategory.Message,key:\"Disallow_inconsistently_cased_references_to_the_same_file_6078\",message:\"Disallow inconsistently-cased references to the same file.\"},Specify_JSX_code_generation_Colon_preserve_or_react:{code:6080,category:e.DiagnosticCategory.Message,key:\"Specify_JSX_code_generation_Colon_preserve_or_react_6080\",message:\"Specify JSX code generation: 'preserve' or 'react'\"},Argument_for_jsx_must_be_preserve_or_react:{code:6081,category:e.DiagnosticCategory.Message,key:\"Argument_for_jsx_must_be_preserve_or_react_6081\",message:\"Argument for '--jsx' must be 'preserve' or 'react'.\"},Only_amd_and_system_modules_are_supported_alongside_0:{code:6082,category:e.DiagnosticCategory.Error,key:\"Only_amd_and_system_modules_are_supported_alongside_0_6082\",message:\"Only 'amd' and 'system' modules are supported alongside --{0}.\"},Allow_javascript_files_to_be_compiled:{code:6083,category:e.DiagnosticCategory.Message,key:\"Allow_javascript_files_to_be_compiled_6083\",message:\"Allow javascript files to be compiled.\"},Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit:{code:6084,category:e.DiagnosticCategory.Message,key:\"Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit_6084\",message:\"Specifies the object invoked for createElement and __spread when targeting 'react' JSX emit\"},Do_not_emit_use_strict_directives_in_module_output:{code:6112,category:e.DiagnosticCategory.Message,key:\"Do_not_emit_use_strict_directives_in_module_output_6112\",message:\"Do not emit 'use strict' directives in module output.\"},Variable_0_implicitly_has_an_1_type:{code:7005,category:e.DiagnosticCategory.Error,key:\"Variable_0_implicitly_has_an_1_type_7005\",message:\"Variable '{0}' implicitly has an '{1}' type.\"},Parameter_0_implicitly_has_an_1_type:{code:7006,category:e.DiagnosticCategory.Error,key:\"Parameter_0_implicitly_has_an_1_type_7006\",message:\"Parameter '{0}' implicitly has an '{1}' type.\"},Member_0_implicitly_has_an_1_type:{code:7008,category:e.DiagnosticCategory.Error,key:\"Member_0_implicitly_has_an_1_type_7008\",message:\"Member '{0}' implicitly has an '{1}' type.\"},new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type:{code:7009,category:e.DiagnosticCategory.Error,key:\"new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type_7009\",message:\"'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.\"},_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type:{code:7010,category:e.DiagnosticCategory.Error,key:\"_0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type_7010\",message:\"'{0}', which lacks return-type annotation, implicitly has an '{1}' return type.\"},Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type:{code:7011,category:e.DiagnosticCategory.Error,key:\"Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type_7011\",message:\"Function expression, which lacks return-type annotation, implicitly has an '{0}' return type.\"},Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:{code:7013,category:e.DiagnosticCategory.Error,key:\"Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7013\",message:\"Construct signature, which lacks return-type annotation, implicitly has an 'any' return type.\"},Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:{code:7015,category:e.DiagnosticCategory.Error,key:\"Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number_7015\",message:\"Element implicitly has an 'any' type because index expression is not of type 'number'.\"},Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation:{code:7016,category:e.DiagnosticCategory.Error,key:\"Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation_7016\",message:\"Property '{0}' implicitly has type 'any', because its 'set' accessor lacks a type annotation.\"},Index_signature_of_object_type_implicitly_has_an_any_type:{code:7017,category:e.DiagnosticCategory.Error,key:\"Index_signature_of_object_type_implicitly_has_an_any_type_7017\",message:\"Index signature of object type implicitly has an 'any' type.\"},Object_literal_s_property_0_implicitly_has_an_1_type:{code:7018,category:e.DiagnosticCategory.Error,key:\"Object_literal_s_property_0_implicitly_has_an_1_type_7018\",message:\"Object literal's property '{0}' implicitly has an '{1}' type.\"},Rest_parameter_0_implicitly_has_an_any_type:{code:7019,category:e.DiagnosticCategory.Error,key:\"Rest_parameter_0_implicitly_has_an_any_type_7019\",message:\"Rest parameter '{0}' implicitly has an 'any[]' type.\"},Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type:{code:7020,category:e.DiagnosticCategory.Error,key:\"Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type_7020\",message:\"Call signature, which lacks return-type annotation, implicitly has an 'any' return type.\"},_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer:{code:7022,category:e.DiagnosticCategory.Error,key:\"_0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or__7022\",message:\"'{0}' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.\"},_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:{code:7023,category:e.DiagnosticCategory.Error,key:\"_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_reference_7023\",message:\"'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.\"},Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions:{code:7024,category:e.DiagnosticCategory.Error,key:\"Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_ref_7024\",message:\"Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.\"},Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type:{code:7025,category:e.DiagnosticCategory.Error,key:\"Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_typ_7025\",message:\"Generator implicitly has type '{0}' because it does not yield any values. Consider supplying a return type.\"},JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists:{code:7026,category:e.DiagnosticCategory.Error,key:\"JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists_7026\",message:\"JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists\"},Unreachable_code_detected:{code:7027,category:e.DiagnosticCategory.Error,key:\"Unreachable_code_detected_7027\",message:\"Unreachable code detected.\"},Unused_label:{code:7028,category:e.DiagnosticCategory.Error,key:\"Unused_label_7028\",message:\"Unused label.\"},Fallthrough_case_in_switch:{code:7029,category:e.DiagnosticCategory.Error,key:\"Fallthrough_case_in_switch_7029\",message:\"Fallthrough case in switch.\"},Not_all_code_paths_return_a_value:{code:7030,category:e.DiagnosticCategory.Error,key:\"Not_all_code_paths_return_a_value_7030\",message:\"Not all code paths return a value.\"},You_cannot_rename_this_element:{code:8e3,category:e.DiagnosticCategory.Error,key:\"You_cannot_rename_this_element_8000\",message:\"You cannot rename this element.\"},You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library:{code:8001,category:e.DiagnosticCategory.Error,key:\"You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library_8001\",message:\"You cannot rename elements that are defined in the standard TypeScript library.\"},import_can_only_be_used_in_a_ts_file:{code:8002,category:e.DiagnosticCategory.Error,key:\"import_can_only_be_used_in_a_ts_file_8002\",message:\"'import ... =' can only be used in a .ts file.\"},export_can_only_be_used_in_a_ts_file:{code:8003,category:e.DiagnosticCategory.Error,key:\"export_can_only_be_used_in_a_ts_file_8003\",message:\"'export=' can only be used in a .ts file.\"},type_parameter_declarations_can_only_be_used_in_a_ts_file:{code:8004,category:e.DiagnosticCategory.Error,key:\"type_parameter_declarations_can_only_be_used_in_a_ts_file_8004\",message:\"'type parameter declarations' can only be used in a .ts file.\"},implements_clauses_can_only_be_used_in_a_ts_file:{code:8005,category:e.DiagnosticCategory.Error,key:\"implements_clauses_can_only_be_used_in_a_ts_file_8005\",message:\"'implements clauses' can only be used in a .ts file.\"},interface_declarations_can_only_be_used_in_a_ts_file:{code:8006,category:e.DiagnosticCategory.Error,key:\"interface_declarations_can_only_be_used_in_a_ts_file_8006\",message:\"'interface declarations' can only be used in a .ts file.\"},module_declarations_can_only_be_used_in_a_ts_file:{code:8007,category:e.DiagnosticCategory.Error,key:\"module_declarations_can_only_be_used_in_a_ts_file_8007\",message:\"'module declarations' can only be used in a .ts file.\"},type_aliases_can_only_be_used_in_a_ts_file:{code:8008,category:e.DiagnosticCategory.Error,key:\"type_aliases_can_only_be_used_in_a_ts_file_8008\",message:\"'type aliases' can only be used in a .ts file.\"},_0_can_only_be_used_in_a_ts_file:{code:8009,category:e.DiagnosticCategory.Error,key:\"_0_can_only_be_used_in_a_ts_file_8009\",message:\"'{0}' can only be used in a .ts file.\"},types_can_only_be_used_in_a_ts_file:{code:8010,category:e.DiagnosticCategory.Error,key:\"types_can_only_be_used_in_a_ts_file_8010\",message:\"'types' can only be used in a .ts file.\"},type_arguments_can_only_be_used_in_a_ts_file:{code:8011,category:e.DiagnosticCategory.Error,key:\"type_arguments_can_only_be_used_in_a_ts_file_8011\",message:\"'type arguments' can only be used in a .ts file.\"},parameter_modifiers_can_only_be_used_in_a_ts_file:{code:8012,category:e.DiagnosticCategory.Error,key:\"parameter_modifiers_can_only_be_used_in_a_ts_file_8012\",message:\"'parameter modifiers' can only be used in a .ts file.\"},property_declarations_can_only_be_used_in_a_ts_file:{code:8014,category:e.DiagnosticCategory.Error,key:\"property_declarations_can_only_be_used_in_a_ts_file_8014\",message:\"'property declarations' can only be used in a .ts file.\"},enum_declarations_can_only_be_used_in_a_ts_file:{code:8015,category:e.DiagnosticCategory.Error,key:\"enum_declarations_can_only_be_used_in_a_ts_file_8015\",message:\"'enum declarations' can only be used in a .ts file.\"},type_assertion_expressions_can_only_be_used_in_a_ts_file:{code:8016,category:e.DiagnosticCategory.Error,key:\"type_assertion_expressions_can_only_be_used_in_a_ts_file_8016\",message:\"'type assertion expressions' can only be used in a .ts file.\"},Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_class_extends_clauses:{code:9002,category:e.DiagnosticCategory.Error,key:\"Only_identifiers_Slashqualified_names_with_optional_type_arguments_are_currently_supported_in_a_clas_9002\",message:\"Only identifiers/qualified-names with optional type arguments are currently supported in a class 'extends' clauses.\"},class_expressions_are_not_currently_supported:{code:9003,category:e.DiagnosticCategory.Error,key:\"class_expressions_are_not_currently_supported_9003\",message:\"'class' expressions are not currently supported.\"},JSX_attributes_must_only_be_assigned_a_non_empty_expression:{code:17e3,category:e.DiagnosticCategory.Error,key:\"JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000\",message:\"JSX attributes must only be assigned a non-empty 'expression'.\"},JSX_elements_cannot_have_multiple_attributes_with_the_same_name:{code:17001,category:e.DiagnosticCategory.Error,key:\"JSX_elements_cannot_have_multiple_attributes_with_the_same_name_17001\",message:\"JSX elements cannot have multiple attributes with the same name.\"},Expected_corresponding_JSX_closing_tag_for_0:{code:17002,category:e.DiagnosticCategory.Error,key:\"Expected_corresponding_JSX_closing_tag_for_0_17002\",message:\"Expected corresponding JSX closing tag for '{0}'.\"},JSX_attribute_expected:{code:17003,category:e.DiagnosticCategory.Error,key:\"JSX_attribute_expected_17003\",message:\"JSX attribute expected.\"},Cannot_use_JSX_unless_the_jsx_flag_is_provided:{code:17004,category:e.DiagnosticCategory.Error,key:\"Cannot_use_JSX_unless_the_jsx_flag_is_provided_17004\",message:\"Cannot use JSX unless the '--jsx' flag is provided.\"},A_constructor_cannot_contain_a_super_call_when_its_class_extends_null:{code:17005,category:e.DiagnosticCategory.Error,key:\"A_constructor_cannot_contain_a_super_call_when_its_class_extends_null_17005\",message:\"A constructor cannot contain a 'super' call when its class extends 'null'\"},An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:{code:17006,category:e.DiagnosticCategory.Error,key:\"An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_ex_17006\",message:\"An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.\"},A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses:{code:17007,category:e.DiagnosticCategory.Error,key:\"A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Con_17007\",message:\"A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.\"},JSX_element_0_has_no_corresponding_closing_tag:{code:17008,category:e.DiagnosticCategory.Error,key:\"JSX_element_0_has_no_corresponding_closing_tag_17008\",message:\"JSX element '{0}' has no corresponding closing tag.\"},super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class:{code:17009,category:e.DiagnosticCategory.Error,key:\"super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class_17009\",message:\"'super' must be called before accessing 'this' in the constructor of a derived class.\"}}}(o||(o={}));var o;!function(e){function t(e){return e>=69}function n(e,t){if(e<t[0])return!1;for(var n,r=0,i=t.length;r+1<i;){if(n=r+(i-r)/2,n-=n%2,t[n]<=e&&e<=t[n+1])return!0;e<t[n]?i=n:r=n+2}return!1}function r(e,t){return t>=1?n(e,P):n(e,D)}function i(e,t){return t>=1?n(e,L):n(e,M)}function a(e){return O[e]}function o(e){return I[e]}function s(e){for(var t=new Array,n=0,r=0;n<e.length;){var i=e.charCodeAt(n);switch(n++,i){case 13:10===e.charCodeAt(n)&&n++;case 10:t.push(r),r=n;break;default:i>127&&m(i)&&(t.push(r),r=n)}}return t.push(r),t}function u(e,t,n){return c(l(e),t,n)}function c(t,n,r){return e.Debug.assert(n>=0&&n<t.length),t[n]+r}function l(e){return e.lineMap||(e.lineMap=s(e.text))}function p(t,n){var r=e.binarySearch(t,n);return r<0&&(r=~r-1,e.Debug.assert(r!==-1,\"position cannot precede the beginning of the file\")),{line:r,character:n-t[r]}}function f(e,t){return p(l(e),t)}function d(e){return 32===e||9===e||11===e||12===e||160===e||133===e||5760===e||e>=8192&&e<=8203||8239===e||8287===e||12288===e||65279===e}function m(e){return 10===e||13===e||8232===e||8233===e}function h(e){return e>=48&&e<=57}function y(e){return e>=48&&e<=55}function _(e,t){var n=e.charCodeAt(t);switch(n){case 13:case 10:case 9:case 11:case 12:case 32:case 47:case 60:case 61:case 62:return!0;case 35:return 0===t;default:return n>127}}function g(e,t,n){if(!(t>=0))return t;for(;;){var r=e.charCodeAt(t);switch(r){case 13:10===e.charCodeAt(t+1)&&t++;case 10:if(t++,n)return t;continue;case 9:case 11:case 12:case 32:t++;continue;case 47:if(47===e.charCodeAt(t+1)){for(t+=2;t<e.length&&!m(e.charCodeAt(t));)t++;continue}if(42===e.charCodeAt(t+1)){for(t+=2;t<e.length;){if(42===e.charCodeAt(t)&&47===e.charCodeAt(t+1)){t+=2;break}t++}continue}break;case 60:case 61:case 62:if(v(e,t)){t=b(e,t);continue}break;case 35:if(0===t&&S(e,t)){t=A(e,t);continue}break;default:if(r>127&&(d(r)||m(r))){t++;continue}}return t}}function v(t,n){if(e.Debug.assert(n>=0),0===n||m(t.charCodeAt(n-1))){var r=t.charCodeAt(n);if(n+F<t.length){for(var i=0,a=F;i<a;i++)if(t.charCodeAt(n+i)!==r)return!1;return 61===r||32===t.charCodeAt(n+F)}}return!1}function b(t,n,r){r&&r(e.Diagnostics.Merge_conflict_marker_encountered,F);var i=t.charCodeAt(n),a=t.length;if(60===i||62===i)for(;n<a&&!m(t.charCodeAt(n));)n++;else for(e.Debug.assert(61===i);n<a;){var o=t.charCodeAt(n);if(62===o&&v(t,n))break;n++}return n}function S(t,n){return e.Debug.assert(0===n),B.test(t)}function A(e,t){return t+=B.exec(e)[0].length}function T(t,n,r){for(var i,a=r||0===n;n<t.length;){var o=t.charCodeAt(n);switch(o){case 13:10===t.charCodeAt(n+1)&&n++;case 10:if(n++,r)return i;a=!0,i&&i.length&&(e.lastOrUndefined(i).hasTrailingNewLine=!0);continue;case 9:case 11:case 12:case 32:n++;continue;case 47:var s=t.charCodeAt(n+1),u=!1;if(47===s||42===s){var c=47===s?2:3,l=n;if(n+=2,47===s)for(;n<t.length;){if(m(t.charCodeAt(n))){u=!0;break}n++}else for(;n<t.length;){if(42===t.charCodeAt(n)&&47===t.charCodeAt(n+1)){n+=2;break}n++}a&&(i||(i=[]),i.push({pos:l,end:n,hasTrailingNewLine:u,kind:c}));continue}break;default:if(o>127&&(d(o)||m(o))){i&&i.length&&m(o)&&(e.lastOrUndefined(i).hasTrailingNewLine=!0),n++;continue}}return i}return i}function E(e,t){return T(e,t,!1)}function C(e,t){return T(e,t,!0)}function N(e){return B.test(e)?B.exec(e)[0]:void 0}function w(e,t){return e>=65&&e<=90||e>=97&&e<=122||36===e||95===e||e>127&&r(e,t)}function k(e,t){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||36===e||95===e||e>127&&i(e,t)}function x(e,t){if(!w(e.charCodeAt(0),t))return!1;for(var n=1,r=e.length;n<r;n++)if(!k(e.charCodeAt(n),t))return!1;return!0}function R(n,r,i,a,o,s,u){function c(e,t){o&&o(e,t||0)}function l(){for(var t=ee;h(a.charCodeAt(ee));)ee++;if(46===a.charCodeAt(ee))for(ee++;h(a.charCodeAt(ee));)ee++;var n=ee;if(69===a.charCodeAt(ee)||101===a.charCodeAt(ee))if(ee++,43!==a.charCodeAt(ee)&&45!==a.charCodeAt(ee)||ee++,h(a.charCodeAt(ee))){for(ee++;h(a.charCodeAt(ee));)ee++;n=ee}else c(e.Diagnostics.Digit_expected);return\"\"+ +a.substring(t,n)}function p(){for(var e=ee;y(a.charCodeAt(ee));)ee++;return+a.substring(e,ee)}function f(e){return g(e,!1)}function _(e){return g(e,!0)}function g(e,t){for(var n=0,r=0;n<e||t;){var i=a.charCodeAt(ee);if(i>=48&&i<=57)r=16*r+i-48;else if(i>=65&&i<=70)r=16*r+i-65+10;else{if(!(i>=97&&i<=102))break;r=16*r+i-97+10}ee++,n++}return n<e&&(r=-1),r}function T(){var t=a.charCodeAt(ee);ee++;for(var n=\"\",r=ee;;){if(ee>=te){n+=a.substring(r,ee),ue=!0,c(e.Diagnostics.Unterminated_string_literal);break}var i=a.charCodeAt(ee);if(i===t){n+=a.substring(r,ee),ee++;break}if(92!==i){if(m(i)){n+=a.substring(r,ee),ue=!0,c(e.Diagnostics.Unterminated_string_literal);break}ee++}else n+=a.substring(r,ee),n+=C(),r=ee}return n}function E(){var t=96===a.charCodeAt(ee);ee++;for(var n,r=ee,i=\"\";;){if(ee>=te){i+=a.substring(r,ee),ue=!0,c(e.Diagnostics.Unterminated_template_literal),n=t?11:14;break}var o=a.charCodeAt(ee);if(96===o){i+=a.substring(r,ee),ee++,n=t?11:14;break}if(36===o&&ee+1<te&&123===a.charCodeAt(ee+1)){i+=a.substring(r,ee),ee+=2,n=t?12:13;break}92!==o?13!==o?ee++:(i+=a.substring(r,ee),ee++,ee<te&&10===a.charCodeAt(ee)&&ee++,i+=\"\\n\",r=ee):(i+=a.substring(r,ee),i+=C(),r=ee)}return e.Debug.assert(void 0!==n),ae=i,n}function C(){if(++ee>=te)return c(e.Diagnostics.Unexpected_end_of_text),\"\";var t=a.charCodeAt(ee);switch(ee++,t){case 48:return\"\\0\";case 98:return\"\\b\";case 116:return\"\\t\";case 110:return\"\\n\";case 118:return\"\\v\";case 102:return\"\\f\";case 114:return\"\\r\";case 39:return\"'\";case 34:return'\"';case 117:return ee<te&&123===a.charCodeAt(ee)?(se=!0,ee++,x()):N(4);case 120:return N(2);case 13:ee<te&&10===a.charCodeAt(ee)&&ee++;case 10:case 8232:case 8233:return\"\";default:return String.fromCharCode(t)}}function N(t){var n=f(t);return n>=0?String.fromCharCode(n):(c(e.Diagnostics.Hexadecimal_digit_expected),\"\")}function x(){var t=_(1),n=!1;return t<0?(c(e.Diagnostics.Hexadecimal_digit_expected),n=!0):t>1114111&&(c(e.Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive),n=!0),ee>=te?(c(e.Diagnostics.Unexpected_end_of_text),n=!0):125===a.charCodeAt(ee)?ee++:(c(e.Diagnostics.Unterminated_Unicode_escape_sequence),n=!0),n?\"\":R(t)}function R(t){if(e.Debug.assert(0<=t&&t<=1114111),t<=65535)return String.fromCharCode(t);var n=Math.floor((t-65536)/1024)+55296,r=(t-65536)%1024+56320;return String.fromCharCode(n,r)}function D(){if(ee+5<te&&117===a.charCodeAt(ee+1)){var e=ee;ee+=2;var t=f(4);return ee=e,t}return-1}function M(){for(var e=\"\",t=ee;ee<te;){var r=a.charCodeAt(ee);if(k(r,n))ee++;else{if(92!==r)break;if(!((r=D())>=0&&k(r,n)))break;e+=a.substring(t,ee),e+=String.fromCharCode(r),ee+=6,t=ee}}return e+=a.substring(t,ee)}function P(){var e=ae.length;if(e>=2&&e<=11){var t=ae.charCodeAt(0);if(t>=97&&t<=122&&U.call(I,ae))return ie=I[ae]}return ie=69}function L(t){e.Debug.assert(2!==t||8!==t,\"Expected either base 2 or base 8\");for(var n=0,r=0;;){var i=a.charCodeAt(ee),o=i-48;if(!h(i)||o>=t)break;n=n*t+o,ee++,r++}return 0===r?-1:n}function O(){for(ne=ee,se=!1,oe=!1,ue=!1;;){if(re=ee,ee>=te)return ie=1;var t=a.charCodeAt(ee);if(35===t&&0===ee&&S(a,ee)){if(ee=A(a,ee),r)continue;return ie=6}switch(t){case 10:case 13:if(oe=!0,r){ee++;continue}return 13===t&&ee+1<te&&10===a.charCodeAt(ee+1)?ee+=2:ee++,ie=4;case 9:case 11:case 12:case 32:if(r){ee++;continue}for(;ee<te&&d(a.charCodeAt(ee));)ee++;return ie=5;case 33:return 61===a.charCodeAt(ee+1)?61===a.charCodeAt(ee+2)?(ee+=3,ie=33):(ee+=2,ie=31):(ee++,ie=49);case 34:case 39:return ae=T(),ie=9;case 96:return ie=E();case 37:return 61===a.charCodeAt(ee+1)?(ee+=2,ie=62):(ee++,ie=40);case 38:return 38===a.charCodeAt(ee+1)?(ee+=2,ie=51):61===a.charCodeAt(ee+1)?(ee+=2,ie=66):(ee++,ie=46);case 40:return ee++,ie=17;case 41:return ee++,ie=18;case 42:return 61===a.charCodeAt(ee+1)?(ee+=2,ie=59):42===a.charCodeAt(ee+1)?61===a.charCodeAt(ee+2)?(ee+=3,ie=60):(ee+=2,ie=38):(ee++,ie=37);case 43:return 43===a.charCodeAt(ee+1)?(ee+=2,ie=41):61===a.charCodeAt(ee+1)?(ee+=2,ie=57):(ee++,ie=35);case 44:return ee++,ie=24;case 45:return 45===a.charCodeAt(ee+1)?(ee+=2,ie=42):61===a.charCodeAt(ee+1)?(ee+=2,ie=58):(ee++,ie=36);case 46:return h(a.charCodeAt(ee+1))?(ae=l(),ie=8):46===a.charCodeAt(ee+1)&&46===a.charCodeAt(ee+2)?(ee+=3,ie=22):(ee++,ie=21);case 47:if(47===a.charCodeAt(ee+1)){for(ee+=2;ee<te&&!m(a.charCodeAt(ee));)ee++;if(r)continue;return ie=2}if(42===a.charCodeAt(ee+1)){ee+=2;for(var o=!1;ee<te;){var s=a.charCodeAt(ee);if(42===s&&47===a.charCodeAt(ee+1)){ee+=2,o=!0;break}m(s)&&(oe=!0),ee++}if(o||c(e.Diagnostics.Asterisk_Slash_expected),r)continue;return ue=!o,ie=3}return 61===a.charCodeAt(ee+1)?(ee+=2,ie=61):(ee++,ie=39);case 48:if(ee+2<te&&(88===a.charCodeAt(ee+1)||120===a.charCodeAt(ee+1))){ee+=2;var u=_(1);return u<0&&(c(e.Diagnostics.Hexadecimal_digit_expected),u=0),ae=\"\"+u,ie=8}if(ee+2<te&&(66===a.charCodeAt(ee+1)||98===a.charCodeAt(ee+1))){ee+=2;var u=L(2);return u<0&&(c(e.Diagnostics.Binary_digit_expected),u=0),ae=\"\"+u,ie=8}if(ee+2<te&&(79===a.charCodeAt(ee+1)||111===a.charCodeAt(ee+1))){ee+=2;var u=L(8);return u<0&&(c(e.Diagnostics.Octal_digit_expected),u=0),ae=\"\"+u,ie=8}if(ee+1<te&&y(a.charCodeAt(ee+1)))return ae=\"\"+p(),ie=8;case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return ae=l(),ie=8;case 58:return ee++,ie=54;case 59:return ee++,ie=23;case 60:if(v(a,ee)){if(ee=b(a,ee,c),r)continue;return ie=7}return 60===a.charCodeAt(ee+1)?61===a.charCodeAt(ee+2)?(ee+=3,ie=63):(ee+=2,ie=43):61===a.charCodeAt(ee+1)?(ee+=2,ie=28):1===i&&47===a.charCodeAt(ee+1)&&42!==a.charCodeAt(ee+2)?(ee+=2,ie=26):(ee++,ie=25);case 61:if(v(a,ee)){if(ee=b(a,ee,c),r)continue;return ie=7}return 61===a.charCodeAt(ee+1)?61===a.charCodeAt(ee+2)?(ee+=3,ie=32):(ee+=2,ie=30):62===a.charCodeAt(ee+1)?(ee+=2,ie=34):(ee++,ie=56);case 62:if(v(a,ee)){if(ee=b(a,ee,c),r)continue;return ie=7}return ee++,ie=27;case 63:return ee++,ie=53;case 91:return ee++,ie=19;case 93:return ee++,ie=20;case 94:return 61===a.charCodeAt(ee+1)?(ee+=2,ie=68):(ee++,ie=48);case 123:return ee++,ie=15;case 124:return 124===a.charCodeAt(ee+1)?(ee+=2,ie=52):61===a.charCodeAt(ee+1)?(ee+=2,ie=67):(ee++,ie=47);case 125:return ee++,ie=16;case 126:return ee++,ie=50;case 64:return ee++,ie=55;case 92:var f=D();return f>=0&&w(f,n)?(ee+=6,ae=String.fromCharCode(f)+M(),ie=P()):(c(e.Diagnostics.Invalid_character),ee++,ie=0);default:if(w(t,n)){for(ee++;ee<te&&k(t=a.charCodeAt(ee),n);)ee++;return ae=a.substring(re,ee),92===t&&(ae+=M()),ie=P()}if(d(t)){ee++;continue}if(m(t)){oe=!0,ee++;continue}return c(e.Diagnostics.Invalid_character),ee++,ie=0}}}function F(){if(27===ie){if(62===a.charCodeAt(ee))return 62===a.charCodeAt(ee+1)?61===a.charCodeAt(ee+2)?(ee+=3,ie=65):(ee+=2,ie=45):61===a.charCodeAt(ee+1)?(ee+=2,ie=64):(ee++,ie=44);if(61===a.charCodeAt(ee))return ee++,ie=29}return ie}function B(){if(39===ie||61===ie){for(var t=re+1,r=!1,i=!1;;){if(t>=te){ue=!0,c(e.Diagnostics.Unterminated_regular_expression_literal);break}var o=a.charCodeAt(t);if(m(o)){ue=!0,c(e.Diagnostics.Unterminated_regular_expression_literal);break}if(r)r=!1;else{if(47===o&&!i){t++;break}91===o?i=!0:92===o?r=!0:93===o&&(i=!1)}t++}for(;t<te&&k(a.charCodeAt(t),n);)t++;ee=t,ae=a.substring(re,ee),ie=10}return ie}function K(){return e.Debug.assert(16===ie,\"'reScanTemplateToken' should only be called on a '}'\"),ee=re,ie=E()}function V(){return ee=re=ne,ie=j()}function j(){if(ne=re=ee,ee>=te)return ie=1;var e=a.charCodeAt(ee);if(60===e)return 47===a.charCodeAt(ee+1)?(ee+=2,ie=26):(ee++,ie=25);if(123===e)return ee++,ie=15;for(;ee<te&&(ee++,123!==(e=a.charCodeAt(ee))&&60!==e););return ie=239}function W(){if(t(ie)){for(var e=ee;ee<te;){var r=a.charCodeAt(ee);if(45!==r&&(e===ee?!w(r,n):!k(r,n)))break;ee++}ae+=a.substr(e,ee-e)}return ie}function q(){if(ee>=te)return ie=1;ne=ee;for(var e=a.charCodeAt(ee);ee<te&&(e=a.charCodeAt(ee),d(e));)ee++;switch(re=ee,e){case 64:return ee+=1,ie=55;case 10:case 13:return ee+=1,ie=4;case 42:return ee+=1,ie=37;case 123:return ee+=1,ie=15;case 125:return ee+=1,ie=16;case 91:return ee+=1,ie=19;case 93:return ee+=1,ie=20;case 61:return ee+=1,ie=56;case 44:return ee+=1,ie=24}if(w(e,2)){for(ee++;k(a.charCodeAt(ee),2)&&ee<te;)ee++;return ie=69}return ee+=1,ie=0}function z(e,t){var n=ee,r=ne,i=re,a=ie,o=ae,s=oe,u=e();return u&&!t||(ee=n,ne=r,re=i,ie=a,ae=o,oe=s),u}function H(e,t,n){var r=te,i=ee,o=ne,s=re,u=ie,c=oe,l=ae,p=se,f=ue;G(a,e,t);var d=n();return te=r,ee=i,ne=o,re=s,ie=u,oe=c,ae=l,se=p,ue=f,d}function Y(e){return z(e,!0)}function J(e){return z(e,!1)}function G(e,t,n){a=e||\"\",te=void 0===n?a.length:t+n,Z(t||0)}function X(e){o=e}function $(e){n=e}function Q(e){i=e}function Z(t){e.Debug.assert(t>=0),ee=t,ne=t,re=t,ie=0,oe=!1,ae=void 0,se=!1,ue=!1}void 0===i&&(i=0);var ee,te,ne,re,ie,ae,oe,se,ue;return G(a,s,u),{getStartPos:function(){return ne},getTextPos:function(){return ee},getToken:function(){return ie},getTokenPos:function(){return re},getTokenText:function(){return a.substring(re,ee)},getTokenValue:function(){return ae},hasExtendedUnicodeEscape:function(){return se},hasPrecedingLineBreak:function(){return oe},isIdentifier:function(){return 69===ie||ie>105},isReservedWord:function(){return ie>=70&&ie<=105},isUnterminated:function(){return ue},reScanGreaterToken:F,reScanSlashToken:B,reScanTemplateToken:K,scanJsxIdentifier:W,reScanJsxToken:V,scanJsxToken:j,scanJSDocToken:q,scan:O,setText:G,setScriptTarget:$,setLanguageVariant:Q,setOnError:X,setTextPos:Z,tryScan:J,lookAhead:Y,scanRange:H}}e.tokenIsIdentifierOrKeyword=t;var I={abstract:115,any:117,as:116,boolean:120,break:70,case:71,catch:72,class:73,continue:75,const:74,constructor:121,debugger:76,declare:122,default:77,delete:78,do:79,else:80,enum:81,export:82,extends:83,false:84,finally:85,for:86,from:133,function:87,get:123,if:88,implements:106,import:89,in:90,instanceof:91,interface:107,is:124,let:108,module:125,namespace:126,new:92,null:93,number:128,package:109,private:110,protected:111,public:112,require:127,global:134,return:94,set:129,static:113,string:130,super:95,switch:96,symbol:131,this:97,throw:98,true:99,try:100,type:132,typeof:101,var:102,void:103,while:104,with:105,yield:114,async:118,await:119,of:135,\"{\":15,\"}\":16,\"(\":17,\")\":18,\"[\":19,\"]\":20,\".\":21,\"...\":22,\";\":23,\",\":24,\"<\":25,\">\":27,\"<=\":28,\">=\":29,\"==\":30,\"!=\":31,\"===\":32,\"!==\":33,\"=>\":34,\"+\":35,\"-\":36,\"**\":38,\"*\":37,\"/\":39,\"%\":40,\"++\":41,\"--\":42,\"<<\":43,\"</\":26,\">>\":44,\">>>\":45,\"&\":46,\"|\":47,\"^\":48,\"!\":49,\"~\":50,\"&&\":51,\"||\":52,\"?\":53,\":\":54,\"=\":56,\"+=\":57,\"-=\":58,\"*=\":59,\"**=\":60,\"/=\":61,\"%=\":62,\"<<=\":63,\">>=\":64,\">>>=\":65,\"&=\":66,\"|=\":67,\"^=\":68,\"@\":55},D=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1569,1594,1600,1610,1649,1747,1749,1749,1765,1766,1786,1788,1808,1808,1810,1836,1920,1957,2309,2361,2365,2365,2384,2384,2392,2401,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2784,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2877,2908,2909,2911,2913,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3294,3294,3296,3297,3333,3340,3342,3344,3346,3368,3370,3385,3424,3425,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3805,3840,3840,3904,3911,3913,3946,3976,3979,4096,4129,4131,4135,4137,4138,4176,4181,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6067,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12329,12337,12341,12344,12346,12353,12436,12445,12446,12449,12538,12540,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65138,65140,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],M=[170,170,181,181,186,186,192,214,216,246,248,543,546,563,592,685,688,696,699,705,720,721,736,740,750,750,768,846,864,866,890,890,902,902,904,906,908,908,910,929,931,974,976,983,986,1011,1024,1153,1155,1158,1164,1220,1223,1224,1227,1228,1232,1269,1272,1273,1329,1366,1369,1369,1377,1415,1425,1441,1443,1465,1467,1469,1471,1471,1473,1474,1476,1476,1488,1514,1520,1522,1569,1594,1600,1621,1632,1641,1648,1747,1749,1756,1759,1768,1770,1773,1776,1788,1808,1836,1840,1866,1920,1968,2305,2307,2309,2361,2364,2381,2384,2388,2392,2403,2406,2415,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2492,2494,2500,2503,2504,2507,2509,2519,2519,2524,2525,2527,2531,2534,2545,2562,2562,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2649,2652,2654,2654,2662,2676,2689,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2784,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2876,2883,2887,2888,2891,2893,2902,2903,2908,2909,2911,2913,2918,2927,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3010,3014,3016,3018,3021,3031,3031,3047,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3134,3140,3142,3144,3146,3149,3157,3158,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3395,3398,3400,3402,3405,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3805,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3946,3953,3972,3974,3979,3984,3991,3993,4028,4038,4038,4096,4129,4131,4135,4137,4138,4140,4146,4150,4153,4160,4169,4176,4185,4256,4293,4304,4342,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4969,4977,5024,5108,5121,5740,5743,5750,5761,5786,5792,5866,6016,6099,6112,6121,6160,6169,6176,6263,6272,6313,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8255,8256,8319,8319,8400,8412,8417,8417,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8544,8579,12293,12295,12321,12335,12337,12341,12344,12346,12353,12436,12441,12442,12445,12446,12449,12542,12549,12588,12593,12686,12704,12727,13312,19893,19968,40869,40960,42124,44032,55203,63744,64045,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65056,65059,65075,65076,65101,65103,65136,65138,65140,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65381,65470,65474,65479,65482,65487,65490,65495,65498,65500],P=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,880,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1162,1319,1329,1366,1369,1369,1377,1415,1488,1514,1520,1522,1568,1610,1646,1647,1649,1747,1749,1749,1765,1766,1774,1775,1786,1788,1791,1791,1808,1808,1810,1839,1869,1957,1969,1969,1994,2026,2036,2037,2042,2042,2048,2069,2074,2074,2084,2084,2088,2088,2112,2136,2208,2208,2210,2220,2308,2361,2365,2365,2384,2384,2392,2401,2417,2423,2425,2431,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2493,2493,2510,2510,2524,2525,2527,2529,2544,2545,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2649,2652,2654,2654,2674,2676,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2749,2768,2768,2784,2785,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2877,2877,2908,2909,2911,2913,2929,2929,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3024,3024,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3133,3160,3161,3168,3169,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3261,3261,3294,3294,3296,3297,3313,3314,3333,3340,3342,3344,3346,3386,3389,3389,3406,3406,3424,3425,3450,3455,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3585,3632,3634,3635,3648,3654,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3804,3807,3840,3840,3904,3911,3913,3948,3976,3980,4096,4138,4159,4159,4176,4181,4186,4189,4193,4193,4197,4198,4206,4208,4213,4225,4238,4238,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5905,5920,5937,5952,5969,5984,5996,5998,6e3,6016,6067,6103,6103,6108,6108,6176,6263,6272,6312,6314,6314,6320,6389,6400,6428,6480,6509,6512,6516,6528,6571,6593,6599,6656,6678,6688,6740,6823,6823,6917,6963,6981,6987,7043,7072,7086,7087,7098,7141,7168,7203,7245,7247,7258,7293,7401,7404,7406,7409,7413,7414,7424,7615,7680,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8305,8305,8319,8319,8336,8348,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11502,11506,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11648,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11823,11823,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42527,42538,42539,42560,42606,42623,42647,42656,42735,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43009,43011,43013,43015,43018,43020,43042,43072,43123,43138,43187,43250,43255,43259,43259,43274,43301,43312,43334,43360,43388,43396,43442,43471,43471,43520,43560,43584,43586,43588,43595,43616,43638,43642,43642,43648,43695,43697,43697,43701,43702,43705,43709,43712,43712,43714,43714,43739,43741,43744,43754,43762,43764,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44002,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65136,65140,65142,65276,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500],L=[170,170,181,181,186,186,192,214,216,246,248,705,710,721,736,740,748,748,750,750,768,884,886,887,890,893,902,902,904,906,908,908,910,929,931,1013,1015,1153,1155,1159,1162,1319,1329,1366,1369,1369,1377,1415,1425,1469,1471,1471,1473,1474,1476,1477,1479,1479,1488,1514,1520,1522,1552,1562,1568,1641,1646,1747,1749,1756,1759,1768,1770,1788,1791,1791,1808,1866,1869,1969,1984,2037,2042,2042,2048,2093,2112,2139,2208,2208,2210,2220,2276,2302,2304,2403,2406,2415,2417,2423,2425,2431,2433,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2492,2500,2503,2504,2507,2510,2519,2519,2524,2525,2527,2531,2534,2545,2561,2563,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2620,2620,2622,2626,2631,2632,2635,2637,2641,2641,2649,2652,2654,2654,2662,2677,2689,2691,2693,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2748,2757,2759,2761,2763,2765,2768,2768,2784,2787,2790,2799,2817,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2869,2873,2876,2884,2887,2888,2891,2893,2902,2903,2908,2909,2911,2915,2918,2927,2929,2929,2946,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,3001,3006,3010,3014,3016,3018,3021,3024,3024,3031,3031,3046,3055,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3133,3140,3142,3144,3146,3149,3157,3158,3160,3161,3168,3171,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3260,3268,3270,3272,3274,3277,3285,3286,3294,3294,3296,3299,3302,3311,3313,3314,3330,3331,3333,3340,3342,3344,3346,3386,3389,3396,3398,3400,3402,3406,3415,3415,3424,3427,3430,3439,3450,3455,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3530,3530,3535,3540,3542,3542,3544,3551,3570,3571,3585,3642,3648,3662,3664,3673,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3769,3771,3773,3776,3780,3782,3782,3784,3789,3792,3801,3804,3807,3840,3840,3864,3865,3872,3881,3893,3893,3895,3895,3897,3897,3902,3911,3913,3948,3953,3972,3974,3991,3993,4028,4038,4038,4096,4169,4176,4253,4256,4293,4295,4295,4301,4301,4304,4346,4348,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4744,4746,4749,4752,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4822,4824,4880,4882,4885,4888,4954,4957,4959,4992,5007,5024,5108,5121,5740,5743,5759,5761,5786,5792,5866,5870,5872,5888,5900,5902,5908,5920,5940,5952,5971,5984,5996,5998,6e3,6002,6003,6016,6099,6103,6103,6108,6109,6112,6121,6155,6157,6160,6169,6176,6263,6272,6314,6320,6389,6400,6428,6432,6443,6448,6459,6470,6509,6512,6516,6528,6571,6576,6601,6608,6617,6656,6683,6688,6750,6752,6780,6783,6793,6800,6809,6823,6823,6912,6987,6992,7001,7019,7027,7040,7155,7168,7223,7232,7241,7245,7293,7376,7378,7380,7414,7424,7654,7676,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8204,8205,8255,8256,8276,8276,8305,8305,8319,8319,8336,8348,8400,8412,8417,8417,8421,8432,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8505,8508,8511,8517,8521,8526,8526,8544,8584,11264,11310,11312,11358,11360,11492,11499,11507,11520,11557,11559,11559,11565,11565,11568,11623,11631,11631,11647,11670,11680,11686,11688,11694,11696,11702,11704,11710,11712,11718,11720,11726,11728,11734,11736,11742,11744,11775,11823,11823,12293,12295,12321,12335,12337,12341,12344,12348,12353,12438,12441,12442,12445,12447,12449,12538,12540,12543,12549,12589,12593,12686,12704,12730,12784,12799,13312,19893,19968,40908,40960,42124,42192,42237,42240,42508,42512,42539,42560,42607,42612,42621,42623,42647,42655,42737,42775,42783,42786,42888,42891,42894,42896,42899,42912,42922,43e3,43047,43072,43123,43136,43204,43216,43225,43232,43255,43259,43259,43264,43309,43312,43347,43360,43388,43392,43456,43471,43481,43520,43574,43584,43597,43600,43609,43616,43638,43642,43643,43648,43714,43739,43741,43744,43759,43762,43766,43777,43782,43785,43790,43793,43798,43808,43814,43816,43822,43968,44010,44012,44013,44016,44025,44032,55203,55216,55238,55243,55291,63744,64109,64112,64217,64256,64262,64275,64279,64285,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65019,65024,65039,65056,65062,65075,65076,65101,65103,65136,65140,65142,65276,65296,65305,65313,65338,65343,65343,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500];e.isUnicodeIdentifierStart=r;var O=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(I);e.tokenToString=a,e.stringToToken=o,e.computeLineStarts=s,e.getPositionOfLineAndCharacter=u,e.computePositionOfLineAndCharacter=c,e.getLineStarts=l,e.computeLineAndCharacterOfPosition=p,e.getLineAndCharacterOfPosition=f;var U=Object.prototype.hasOwnProperty;e.isWhiteSpace=d,e.isLineBreak=m,e.isOctalDigit=y,e.couldStartTrivia=_,e.skipTrivia=g;var F=\"<<<<<<<\".length,B=/^#!.*/;e.getLeadingCommentRanges=E,e.getTrailingCommentRanges=C,e.getShebang=N,e.isIdentifierStart=w,e.isIdentifierPart=k,e.isIdentifier=x,e.createScanner=R}(o||(o={}));var o;!function(e){function t(e,t){var n=e.declarations;if(n)for(var r=0,i=n;r<i.length;r++){var a=i[r];if(a.kind===t)return a}}function n(){if(0===Tn.length){var e=\"\",t=function(t){return e+=t};return{string:function(){return e},writeKeyword:t,writeOperator:t,writePunctuation:t,writeSpace:t,writeStringLiteral:t,writeParameter:t,writeSymbol:t,writeLine:function(){return e+=\" \"},increaseIndent:function(){},decreaseIndent:function(){},clear:function(){return e=\"\"},trackSymbol:function(){},reportInaccessibleThisError:function(){}}}return Tn.pop()}function r(e){e.clear(),Tn.push(e)}function i(e){return e.end-e.pos}function a(e,t,n){if(!e||!t)return e===t;if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++){if(!(n?n(e[r],t[r]):e[r]===t[r]))return!1}return!0}function o(t,n){return t.resolvedModules&&e.hasProperty(t.resolvedModules,n)}function s(e,t){return o(e,t)?e.resolvedModules[t]:void 0}function u(e,t,n){e.resolvedModules||(e.resolvedModules={}),e.resolvedModules[t]=n}function c(e){return l(e),0!=(64&e.parserContextFlags)}function l(t){if(!(128&t.parserContextFlags)){(0!=(16&t.parserContextFlags)||e.forEachChild(t,c))&&(t.parserContextFlags|=64),t.parserContextFlags|=128}}function p(e){for(;e&&251!==e.kind;)e=e.parent;return e}function f(e){switch(e.kind){case 195:case 223:case 202:case 203:case 204:return!0}return!1}function d(t,n){return e.Debug.assert(t>=0),e.getLineStarts(n)[t]}function m(t){var n=p(t),r=e.getLineAndCharacterOfPosition(n,t.pos);return n.fileName+\"(\"+(r.line+1)+\",\"+(r.character+1)+\")\"}function h(e){return e.pos}function y(e){return!e||e.pos===e.end&&e.pos>=0&&1!==e.kind}function _(e){return!y(e)}function g(t,n){return y(t)?t.pos:e.skipTrivia((n||p(t)).text,t.pos)}function v(t,n){return y(t)||!t.decorators?g(t,n):e.skipTrivia((n||p(t)).text,t.decorators.end)}function b(t,n,r){if(void 0===r&&(r=!1),y(n))return\"\";var i=t.text;return i.substring(r?n.pos:e.skipTrivia(i,n.pos),n.end)}function S(t,n){return y(n)?\"\":t.substring(e.skipTrivia(t,n.pos),n.end)}function A(e,t){return void 0===t&&(t=!1),b(p(e),e,t)}function T(e){return e.length>=2&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)?\"_\"+e:e}function E(e){return e.length>=3&&95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95===e.charCodeAt(2)?e.substr(1):e}function C(t){return e.getBaseFileName(t).replace(/^(\\d)/,\"_$1\").replace(/\\W/g,\"_\")}function N(e){return 0!=(24576&W(e))||D(e)}function w(e){return e&&221===e.kind&&(9===e.name.kind||x(e))}function k(e){return 251===e.kind||221===e.kind||ie(e)||ue(e)}function x(e){return!!(2097152&e.flags)}function R(e){if(!e||!w(e))return!1;switch(e.parent.kind){case 251:return F(e.parent);case 222:return w(e.parent.parent)&&!F(e.parent.parent.parent)}return!1}function I(e){for(var t=e.parent;t;){if(ie(t))return t;switch(t.kind){case 251:case 223:case 247:case 221:case 202:case 203:case 204:return t;case 195:if(!ie(t.parent))return t}t=t.parent}}function D(e){return e&&214===e.kind&&e.parent&&247===e.parent.kind}function M(e){return 0===i(e)?\"(Missing)\":A(e)}function P(t,n,r,i,a){var o=p(t),s=U(o,t);return e.createFileDiagnostic(o,s.start,s.length,n,r,i,a)}function L(e,t){var n=p(e),r=U(n,e);return{file:n,start:r.start,length:r.length,code:t.code,category:t.category,messageText:t.next?t:t.messageText}}function O(t,n){var r=e.createScanner(t.languageVersion,!0,t.languageVariant,t.text,void 0,n);r.scan();var i=r.getTokenPos();return e.createTextSpanFromBounds(i,r.getTextPos())}function U(t,n){var r=n;switch(n.kind){case 251:var i=e.skipTrivia(t.text,0,!1);return i===t.text.length?e.createTextSpan(0,0):O(t,i);case 214:case 166:case 217:case 189:case 218:case 221:case 220:case 250:case 216:case 176:case 144:case 219:r=n.name}if(void 0===r)return O(t,n.pos);var a=y(r)?r.pos:e.skipTrivia(t.text,r.pos);return e.createTextSpanFromBounds(a,r.end)}function F(e){return void 0!==e.externalModuleIndicator}function B(e){return void 0!==(e.externalModuleIndicator||e.commonJsModuleIndicator)}function K(e){return 0!=(4096&e.flags)}function V(e){return 220===e.kind&&q(e)}function j(e){for(;e&&(166===e.kind||Ye(e));)e=e.parent;return e}function W(e){e=j(e);var t=e.flags;return 214===e.kind&&(e=e.parent),e&&215===e.kind&&(t|=e.flags,e=e.parent),e&&196===e.kind&&(t|=e.flags),t}function q(e){return!!(16384&W(e))}function z(e){return!!(8192&W(e))}function H(e){return 171===e.kind&&95===e.expression.kind}function Y(e){return 198===e.kind&&9===e.expression.kind}function J(t,n){return e.getLeadingCommentRanges(n.text,t.pos)}function G(t,n){return e.getLeadingCommentRanges(n,t.pos)}function X(e,t){return $(e,t.text)}function $(t,n){function r(e){return 42===n.charCodeAt(e.pos+1)&&42===n.charCodeAt(e.pos+2)&&47!==n.charCodeAt(e.pos+3)}var i=139===t.kind||138===t.kind?e.concatenate(e.getTrailingCommentRanges(n,t.pos),e.getLeadingCommentRanges(n,t.pos)):G(t,n);return e.filter(i,r)}function Q(t){if(151<=t.kind&&t.kind<=163)return!0;switch(t.kind){case 117:case 128:case 130:case 120:case 131:return!0;case 103:return 180!==t.parent.kind;case 191:return!an(t);case 69:136===t.parent.kind&&t.parent.right===t?t=t.parent:169===t.parent.kind&&t.parent.name===t&&(t=t.parent),e.Debug.assert(69===t.kind||136===t.kind||169===t.kind,\"'node' was expected to be a qualified name, identifier or property access in 'isTypeNode'.\");case 136:case 169:case 97:var n=t.parent;if(155===n.kind)return!1;if(151<=n.kind&&n.kind<=163)return!0;switch(n.kind){case 191:return!an(n);case 138:return t===n.constraint;case 142:case 141:case 139:case 214:return t===n.type;case 216:case 176:case 177:case 145:case 144:case 143:case 146:case 147:return t===n.type;case 148:case 149:case 150:return t===n.type;case 174:return t===n.type;case 171:case 172:return n.typeArguments&&e.indexOf(n.typeArguments,t)>=0;case 173:return!1}}return!1}function Z(t,n){function r(t){switch(t.kind){case 207:return n(t);case 223:case 195:case 199:case 200:case 201:case 202:case 203:case 204:case 208:case 209:case 244:case 245:case 210:case 212:case 247:return e.forEachChild(t,r)}}return r(t)}function ee(t,n){function r(t){switch(t.kind){case 187:n(t);var i=t.expression;i&&r(i);case 220:case 218:case 221:case 219:case 217:case 189:return;default:if(ie(t)){var a=t.name;if(a&&137===a.kind)return void r(a.expression)}else Q(t)||e.forEachChild(t,r)}}return r(t)}function te(e){if(e)switch(e.kind){case 166:case 250:case 139:case 248:case 142:case 141:case 249:case 214:return!0}return!1}function ne(e){return e&&(146===e.kind||147===e.kind)}function re(e){return e&&(217===e.kind||189===e.kind)}function ie(e){return e&&ae(e.kind)}function ae(e){switch(e){case 145:case 176:case 216:case 177:case 144:case 143:case 146:case 147:case 148:case 149:case 150:case 153:case 154:return!0}}function oe(e){switch(e.kind){case 144:case 143:case 145:case 146:case 147:case 216:case 176:return!0}return!1}function se(e,t){switch(e.kind){case 202:case 203:case 204:case 200:case 201:return!0;case 210:return t&&se(e.statement,t)}return!1}function ue(e){return e&&195===e.kind&&ie(e.parent)}function ce(e){return e&&144===e.kind&&168===e.parent.kind}function le(e){return e&&1===e.kind}function pe(e){return e&&0===e.kind}function fe(e){for(;;)if(!(e=e.parent)||ie(e))return e}function de(e){for(;;)if(!(e=e.parent)||re(e))return e}function me(e,t){for(;;){if(!(e=e.parent))return;switch(e.kind){case 137:if(re(e.parent.parent))return e;e=e.parent;break;case 140:139===e.parent.kind&&Qe(e.parent.parent)?e=e.parent.parent:Qe(e.parent)&&(e=e.parent);break;case 177:if(!t)continue;case 216:case 176:case 221:case 142:case 141:case 144:case 143:case 145:case 146:case 147:case 148:case 149:case 150:case 220:case 251:return e}}}function he(e,t){for(;;){if(!(e=e.parent))return e;switch(e.kind){case 137:e=e.parent;break;case 216:case 176:case 177:if(!t)continue;case 142:case 141:case 144:case 143:case 145:case 146:case 147:return e;case 140:139===e.parent.kind&&Qe(e.parent.parent)?e=e.parent.parent:Qe(e.parent)&&(e=e.parent)}}}function ye(e){return(169===e.kind||170===e.kind)&&95===e.expression.kind}function _e(e){if(e)switch(e.kind){case 152:return e.typeName;case 191:return e.expression;case 69:case 136:return e}}function ge(e){return 173===e.kind?e.tag:e.expression}function ve(e){switch(e.kind){case 217:return!0;case 142:return 217===e.parent.kind;case 146:case 147:case 144:return void 0!==e.body&&217===e.parent.kind;case 139:return void 0!==e.parent.body&&(145===e.parent.kind||144===e.parent.kind||147===e.parent.kind)&&217===e.parent.parent.kind}return!1}function be(e){return void 0!==e.decorators&&ve(e)}function Se(e){return 169===e.kind}function Ae(e){return 170===e.kind}function Te(e){switch(e.kind){case 95:case 93:case 99:case 84:case 10:case 167:case 168:case 169:case 170:case 171:case 172:case 173:case 192:case 174:case 175:case 176:case 189:case 177:case 180:case 178:case 179:case 182:case 183:case 184:case 185:case 188:case 186:case 11:case 190:case 236:case 237:case 187:case 181:return!0;case 136:for(;136===e.parent.kind;)e=e.parent;return 155===e.parent.kind;case 69:if(155===e.parent.kind)return!0;case 8:case 9:case 97:var t=e.parent;switch(t.kind){case 214:case 139:case 142:case 141:case 250:case 248:case 166:return t.initializer===e;case 198:case 199:case 200:case 201:case 207:case 208:case 209:case 244:case 211:case 209:return t.expression===e;case 202:var n=t;return n.initializer===e&&215!==n.initializer.kind||n.condition===e||n.incrementor===e;case 203:case 204:var r=t;return r.initializer===e&&215!==r.initializer.kind||r.expression===e;case 174:case 192:return e===t.expression;case 193:return e===t.expression;case 137:return e===t.expression;case 140:case 243:case 242:return!0;case 191:return t.expression===e&&an(t);default:if(Te(t))return!0}}return!1}function Ee(e){return\"./\"===e.substr(0,2)||\"../\"===e.substr(0,3)||\".\\\\\"===e.substr(0,2)||\"..\\\\\"===e.substr(0,3)}function Ce(t,n){var r=e.getModuleInstanceState(t);return 1===r||n&&2===r}function Ne(e){return 224===e.kind&&235===e.moduleReference.kind}function we(t){return e.Debug.assert(Ne(t)),t.moduleReference.expression}function ke(e){return 224===e.kind&&235!==e.moduleReference.kind}function xe(e){return Re(e)}function Re(e){return e&&!!(32&e.parserContextFlags)}function Ie(e,t){return 171===e.kind&&69===e.expression.kind&&\"require\"===e.expression.text&&1===e.arguments.length&&(!t||9===e.arguments[0].kind)}function De(e){if(184!==e.kind)return 0;var t=e;if(56!==t.operatorToken.kind||169!==t.left.kind)return 0;var n=t.left;if(69===n.expression.kind){var r=n.expression;if(\"exports\"===r.text)return 1;if(\"module\"===r.text&&\"exports\"===n.name.text)return 2}else{if(97===n.expression.kind)return 4;if(169===n.expression.kind){var i=n.expression;if(69===i.expression.kind&&\"prototype\"===i.name.text)return 3}}return 0}function Me(e){if(225===e.kind)return e.moduleSpecifier;if(224===e.kind){var t=e.moduleReference;if(235===t.kind)return t.expression}return 231===e.kind?e.moduleSpecifier:221===e.kind&&9===e.name.kind?e.name:void 0}function Pe(e){if(e)switch(e.kind){case 139:case 144:case 143:case 249:case 248:case 142:case 141:return void 0!==e.questionToken}return!1}function Le(e){return 264===e.kind&&e.parameters.length>0&&266===e.parameters[0].type.kind}function Oe(e,t,n){if(e){var r=Ue(e,n);if(r)for(var i=0,a=r.tags;i<a.length;i++){var o=a[i];if(o.kind===t)return o}}}function Ue(e,t){if(e.jsDocComment)return e.jsDocComment;if(t){var n=214===e.parent.kind&&e.parent.initializer===e&&196===e.parent.parent.parent.kind,r=n?e.parent.parent.parent:void 0;if(r)return r.jsDocComment;var i=e.parent;if(i&&i.parent&&184===i.kind&&56===i.operatorToken.kind&&198===i.parent.kind)return i.parent.jsDocComment;if(i&&248===i.kind)return i.jsDocComment}}function Fe(e){return Oe(e,272,!1)}function Be(e){return Oe(e,271,!0)}function Ke(e){return Oe(e,273,!1)}function Ve(e){if(e.name&&69===e.name.kind){var t=e.name.text,n=Ue(e.parent,!0);if(n)for(var r=0,i=n.tags;r<i.length;r++){var a=i[r];if(270===a.kind){var o=a,s=o.preParameterName||o.postParameterName;if(s.text===t)return o}}}}function je(t){return We(e.lastOrUndefined(t.parameters))}function We(e){if(e){if(32&e.parserContextFlags){if(e.type&&265===e.type.kind)return!0;var t=Ve(e);if(t&&t.typeExpression)return 265===t.typeExpression.type.kind}return void 0!==e.dotDotDotToken}return!1}function qe(e){return 8<=e&&e<=11}function ze(e){return 9===e||11===e}function He(e){return 11<=e&&e<=14}function Ye(e){return!!e&&(165===e.kind||164===e.kind)}function Je(e,t){for(;e;){if(e===t)return!0;e=e.parent}return!1}function Ge(e){for(;e;){if(4100&e.flags)return!0;e=e.parent}return!1}function Xe(e){switch(e.kind){case 177:case 166:case 217:case 189:case 145:case 220:case 250:case 233:case 216:case 176:case 146:case 226:case 224:case 229:case 218:case 144:case 143:case 221:case 227:case 139:case 248:case 142:case 141:case 147:case 249:case 219:case 138:case 214:return!0}return!1}function $e(e){switch(e.kind){case 206:case 205:case 213:case 200:case 198:case 197:case 203:case 204:case 202:case 199:case 210:case 207:case 209:case 211:case 212:case 196:case 201:case 208:case 230:return!0;default:return!1}}function Qe(e){switch(e.kind){case 145:case 142:case 144:case 146:case 147:case 143:case 150:return!0;default:return!1}}function Ze(e){if(69!==e.kind&&9!==e.kind&&8!==e.kind)return!1;var t=e.parent;return!(229!==t.kind&&233!==t.kind||!t.propertyName)||!!Xe(t)&&t.name===e}function et(e){var t=e.parent;switch(t.kind){case 142:case 141:case 144:case 143:case 146:case 147:case 250:case 248:case 169:return t.name===e;case 136:if(t.right===e){for(;136===t.kind;)t=t.parent;return 155===t.kind}return!1;case 166:case 229:return t.propertyName===e;case 233:return!0}return!1}function tt(e){return 224===e.kind||226===e.kind&&!!e.name||227===e.kind||229===e.kind||233===e.kind||230===e.kind&&69===e.expression.kind}function nt(e){var t=at(e.heritageClauses,83);return t&&t.types.length>0?t.types[0]:void 0}function rt(e){var t=at(e.heritageClauses,106);return t?t.types:void 0}function it(e){var t=at(e.heritageClauses,83);return t?t.types:void 0}function at(e,t){if(e)for(var n=0,r=e;n<r.length;n++){var i=r[n];if(i.token===t)return i}}function ot(t,n,r){if(!t.getCompilerOptions().noResolve){var i=e.isRootedDiskPath(r.fileName)?r.fileName:e.combinePaths(e.getDirectoryPath(n.fileName),r.fileName);return t.getSourceFile(i)}}function st(e,t){for(;e;){if(e.kind===t)return e;e=e.parent}}function ut(t,n){var r=/^\\/\\/\\/\\s*<reference\\s+/gim,i=/^(\\/\\/\\/\\s*<reference\\s+no-default-lib\\s*=\\s*)('|\")(.+?)\\2\\s*\\/>/gim;if(r.test(t)){if(i.test(t))return{isNoDefaultLib:!0};var a=e.fullTripleSlashReferencePathRegEx.exec(t);if(a){return{fileReference:{pos:n.pos,end:n.end,fileName:a[3]},isNoDefaultLib:!1}}return{diagnosticMessage:e.Diagnostics.Invalid_reference_directive_syntax,isNoDefaultLib:!1}}}function ct(e){return 70<=e&&e<=135}function lt(e){return 2<=e&&e<=7}function pt(e){return ie(e)&&0!=(256&e.flags)&&!ne(e)}function ft(e){return 9===e||8===e}function dt(e){return e.name&&mt(e.name)}function mt(e){return 137===e.kind&&!ft(e.expression.kind)&&!ht(e.expression)}function ht(e){return Se(e)&&gt(e.expression)}function yt(e){if(69===e.kind||9===e.kind||8===e.kind)return e.text;if(137===e.kind){var t=e.expression;if(ht(t)){return _t(t.name.text)}}}function _t(e){return\"__@\"+e}function gt(e){return 69===e.kind&&\"Symbol\"===e.text}function vt(e){switch(e){case 115:case 118:case 74:case 122:case 77:case 82:case 112:case 110:case 111:case 113:return!0}return!1}function bt(e){return 139===St(e).kind}function St(e){for(;166===e.kind;)e=e.parent.parent;return e}function At(e){return ie(e)||221===e.kind||251===e.kind}function Tt(t,n,r,i){var a=void 0!==n?e.createNode(t.kind,n.pos,n.end):wt(t.kind);for(var o in t)!a.hasOwnProperty(o)&&t.hasOwnProperty(o)&&(a[o]=t[o]);return void 0!==r&&(a.flags=r),void 0!==i&&(a.parent=i),a}function Et(e,t){var n=Tt(e,e,e.flags,t);if(Ct(n)){var r=n.left,i=n.right;n.left=Et(r,n),n.right=Tt(i,i,i.flags,t)}return n}function Ct(e){return 136===e.kind}function Nt(e){return e.pos===-1}function wt(t,n){var r=e.createNode(t,-1,-1);return r.startsOnNewLine=n,r}function kt(){var e=[];return e.pos=-1,e.end=-1,e}function xt(){function t(){return l}function n(t){if(e.hasProperty(u,t.fileName))for(var n=0,r=u[t.fileName];n<r.length;n++){var i=r[n];i.file=t}}function r(e){var t;e.file?(t=u[e.file.fileName])||(t=[],u[e.file.fileName]=t):t=s,t.push(e),c=!0,l++}function i(){return o(),s}function a(t){function n(e){r.push(e)}if(o(),t)return u[t]||[];var r=[];e.forEach(s,n);for(var i in u)e.hasProperty(u,i)&&e.forEach(u[i],n);return e.sortAndDeduplicateDiagnostics(r)}function o(){if(c){c=!1,s=e.sortAndDeduplicateDiagnostics(s);for(var t in u)e.hasProperty(u,t)&&(u[t]=e.sortAndDeduplicateDiagnostics(u[t]))}}var s=[],u={},c=!1,l=0;return{add:r,getGlobalDiagnostics:i,getDiagnostics:a,getModificationCount:t,reattachFileDiagnostics:n}}function Rt(e){function t(e){return Cn[e]||Dt(e.charCodeAt(0))}return e=En.test(e)?e.replace(En,t):e}function It(e){var t=e.substr(0,1);return t.toLowerCase()===t}function Dt(e){return\"\\\\u\"+(\"0000\"+e.toString(16).toUpperCase()).slice(-4)}function Mt(e){return Nn.test(e)?e.replace(Nn,function(e){return Dt(e.charCodeAt(0))}):e}function Pt(e){return void 0===wn[e]&&(wn[e]=Pt(e-1)+wn[1]),wn[e]}function Lt(){return wn[1].length}function Ot(t){function n(e){e&&e.length&&(l&&(u+=Pt(c),l=!1),u+=e)}function r(){u=\"\",c=0,l=!0,p=0,f=0}function i(e){void 0!==e&&(l&&(l=!1),u+=e)}function a(t){if(t&&t.length){n(t);var r=e.computeLineStarts(t);r.length>1&&(p=p+r.length-1,f=u.length-t.length+e.lastOrUndefined(r))}}function o(){l||(u+=t,p++,f=u.length,l=!0)}function s(e,t){n(S(e,t))}var u,c,l,p,f;return r(),{write:n,rawWrite:i,writeTextOfNode:s,writeLiteral:a,writeLine:o,increaseIndent:function(){c++},decreaseIndent:function(){c--},getIndent:function(){return c},getTextPos:function(){return u.length},getLine:function(){return p+1},getColumn:function(){return l?c*Lt()+1:u.length-f+1},getText:function(){return u},reset:r}}function Ut(t,n){var r=function(e){return t.getCanonicalFileName(e)},i=e.toPath(t.getCommonSourceDirectory(),t.getCurrentDirectory(),r),a=e.getNormalizedAbsolutePath(n,t.getCurrentDirectory()),o=e.getRelativePathToDirectoryOrUrl(i,a,i,r,!1);return e.removeFileExtension(o)}function Ft(t,n,r){var i=n.getCompilerOptions();return(i.outDir?e.removeFileExtension(jt(t,n,i.outDir)):e.removeFileExtension(t.fileName))+r}function Bt(e){return e.target||0}function Kt(e){return\"number\"==typeof e.module?e.module:2===Bt(e)?5:1}function Vt(t,n,r){function i(e,t){return t.sourceMap?e+\".map\":void 0}function a(t,n){return n.declaration?e.removeFileExtension(t)+\".d.ts\":void 0}var o=t.getCompilerOptions();if(o.outFile||o.out)!function(t){var r=e.filter(t.getSourceFiles(),function(e){return!K(e)&&(!F(e)||Kt(o)&&F(e))});if(r.length){var s=o.outFile||o.out;n({jsFilePath:s,sourceMapFilePath:i(s,o),declarationFilePath:a(s,o)},r,!0)}}(t);else for(var s=void 0===r?t.getSourceFiles():[r],u=0,c=s;u<c.length;u++){var l=c[u];K(l)||function(t,r){var s=\".js\";1===o.jsx&&(xe(r)?e.fileExtensionIs(r.fileName,\".jsx\")&&(s=\".jsx\"):1===r.languageVariant&&(s=\".jsx\"));var u=Ft(r,t,s);n({jsFilePath:u,sourceMapFilePath:i(u,o),declarationFilePath:xe(r)?void 0:a(u,o)},[r],!1)}(t,l)}}function jt(t,n,r){var i=e.getNormalizedAbsolutePath(t.fileName,n.getCurrentDirectory());return i=i.replace(n.getCommonSourceDirectory(),\"\"),e.combinePaths(r,i)}function Wt(t,n,r,i,a){t.writeFile(r,i,a,function(t){n.add(e.createCompilerDiagnostic(e.Diagnostics.Could_not_write_file_0_Colon_1,r,t))})}function qt(t,n){return e.getLineAndCharacterOfPosition(t,n).line}function zt(t,n){return e.computeLineAndCharacterOfPosition(t,n).line}function Ht(t){return e.forEach(t.members,function(e){if(145===e.kind&&_(e.body))return e})}function Yt(e){return e&&e.parameters.length>0&&e.parameters[0].type}function Jt(t,n){var r,i,a,o;return dt(n)?(r=n,146===n.kind?a=n:147===n.kind?o=n:e.Debug.fail(\"Accessor has wrong kind\")):e.forEach(t,function(e){if((146===e.kind||147===e.kind)&&(64&e.flags)==(64&n.flags)){yt(e.name)===yt(n.name)&&(r?i||(i=e):r=e,146!==e.kind||a||(a=e),147!==e.kind||o||(o=e))}}),{firstAccessor:r,secondAccessor:i,getAccessor:a,setAccessor:o}}function Gt(e,t,n,r){r&&r.length&&n.pos!==r[0].pos&&zt(e,n.pos)!==zt(e,r[0].pos)&&t.writeLine()}function Xt(t,n,r,i,a,o,s){var u=!a;e.forEach(i,function(e){u&&(r.write(\" \"),u=!1),s(t,n,r,e,o),e.hasTrailingNewLine?r.writeLine():a?r.write(\" \"):u=!0})}function $t(t,n,r,i,a,o,s){function u(e){return 42===t.charCodeAt(e.pos+1)&&33===t.charCodeAt(e.pos+2)}var c,l;if(s?0===a.pos&&(c=e.filter(e.getLeadingCommentRanges(t,a.pos),u)):c=e.getLeadingCommentRanges(t,a.pos),c){for(var p=[],f=void 0,d=0,m=c;d<m.length;d++){var h=m[d];if(f){var y=zt(n,f.end);if(zt(n,h.pos)>=y+2)break}p.push(h),f=h}if(p.length){var y=zt(n,e.lastOrUndefined(p).end);zt(n,e.skipTrivia(t,a.pos))>=y+2&&(Gt(n,r,a,c),Xt(t,n,r,p,!0,o,i),l={nodePos:a.pos,detachedCommentEndPos:e.lastOrUndefined(p).end})}}return l}function Qt(t,n,r,i,a){if(42===t.charCodeAt(i.pos+1))for(var o=e.computeLineAndCharacterOfPosition(n,i.pos),s=n.length,u=void 0,c=i.pos,l=o.line;c<i.end;l++){var p=l+1===s?t.length+1:n[l+1];if(c!==i.pos){void 0===u&&(u=en(t,n[o.line],i.pos));var f=r.getIndent()*Lt(),d=f-u+en(t,c,p);if(d>0){var m=d%Lt(),h=Pt((d-m)/Lt());for(r.rawWrite(h);m;)r.rawWrite(\" \"),m--}else r.rawWrite(\"\")}Zt(t,i,r,a,c,p),c=p}else r.write(t.substring(i.pos,i.end))}function Zt(e,t,n,r,i,a){var o=Math.min(t.end,a-1),s=e.substring(i,o).replace(/^\\s+|\\s+$/g,\"\");s?(n.write(s),o!==t.end&&n.writeLine()):n.writeLiteral(r)}function en(t,n,r){for(var i=0;n<r&&e.isWhiteSpace(t.charCodeAt(n));n++)9===t.charCodeAt(n)?i+=Lt()-i%Lt():i++;return i}function tn(e){switch(e){case 113:return 64;case 112:return 8;case 111:return 32;case 110:return 16;case 115:return 128;case 82:return 2;case 122:return 4;case 74:return 16384;case 77:return 512;case 118:return 256}return 0}function nn(e){if(e)switch(e.kind){case 169:case 170:case 172:case 171:case 236:case 237:case 173:case 167:case 175:case 168:case 189:case 176:case 69:case 10:case 8:case 9:case 11:case 186:case 84:case 93:case 97:case 99:case 95:return!0}return!1}function rn(e){return e>=56&&e<=68}function an(e){return 191===e.kind&&83===e.parent.token&&re(e.parent.parent)}function on(e){return sn(e.expression)}function sn(e){return 69===e.kind||!!Se(e)&&sn(e.expression)}function un(e){return 136===e.parent.kind&&e.parent.right===e||169===e.parent.kind&&e.parent.name===e}function cn(e){var t=e.kind;return 168===t?0===e.properties.length:167===t&&0===e.elements.length}function ln(e){return e&&e.valueDeclaration&&512&e.valueDeclaration.flags?e.valueDeclaration.localSymbol:void 0}function pn(t){return e.forEach(e.supportedJavascriptExtensions,function(n){return e.fileExtensionIs(t,n)})}function fn(t){for(var n=[],r=t.length,i=0;i<r;i++){var a=t.charCodeAt(i);a<128?n.push(a):a<2048?(n.push(a>>6|192),n.push(63&a|128)):a<65536?(n.push(a>>12|224),n.push(a>>6&63|128),n.push(63&a|128)):a<131072?(n.push(a>>18|240),n.push(a>>12&63|128),n.push(a>>6&63|128),n.push(63&a|128)):e.Debug.assert(!1,\"Unexpected code point\")}return n}function dn(e){return void 0===e?void 0:mn(e)}function mn(t){return\"string\"==typeof t?'\"'+Rt(t)+'\"':\"number\"==typeof t?isFinite(t)?String(t):\"null\":\"boolean\"==typeof t?t?\"true\":\"false\":\"object\"==typeof t&&t?e.isArray(t)?hn(yn,t):hn(gn,t):\"null\"}function hn(t,n){e.Debug.assert(!n.hasOwnProperty(\"__cycle\"),\"Converting circular structure to JSON\"),n.__cycle=!0;var r=t(n);return delete n.__cycle,r}function yn(t){return\"[\"+e.reduceLeft(t,_n,\"\")+\"]\"}function _n(e,t){return(e?e+\",\":e)+mn(t)}function gn(t){return\"{\"+e.reduceProperties(t,vn,\"\")+\"}\"}function vn(e,t,n){return void 0===t||\"function\"==typeof t||\"__cycle\"===n?e:(e?e+\",\":e)+'\"'+Rt(n)+'\":'+mn(t)}function bn(e){for(var t,n,r,i,a=\"\",o=fn(e),s=0,u=o.length;s<u;)t=o[s]>>2,n=(3&o[s])<<4|o[s+1]>>4,r=(15&o[s+1])<<2|o[s+2]>>6,i=63&o[s+2],s+1>=u?r=i=64:s+2>=u&&(i=64),a+=kn.charAt(t)+kn.charAt(n)+kn.charAt(r)+kn.charAt(i),s+=3;return a}function Sn(t,n,r){return e.isRootedDiskPath(t)?e.getRelativePathToDirectoryOrUrl(n,t,n,r,!1):t}function An(t){return 0===t.newLine?xn:1===t.newLine?Rn:e.sys?e.sys.newLine:xn}e.getDeclarationOfKind=t;var Tn=[];e.getSingleLineStringWriter=n,e.releaseStringWriter=r,e.getFullWidth=i,e.arrayIsEqualTo=a,e.hasResolvedModule=o,e.getResolvedModule=s,e.setResolvedModule=u,e.containsParseError=c,e.getSourceFileOfNode=p,e.isStatementWithLocals=f,e.getStartPositionOfLine=d,e.nodePosToString=m,e.getStartPosOfNode=h,e.nodeIsMissing=y,e.nodeIsPresent=_,e.getTokenPosOfNode=g,e.getNonDecoratorTokenPosOfNode=v,e.getSourceTextOfNodeFromSourceFile=b,e.getTextOfNodeFromSourceText=S,e.getTextOfNode=A,e.escapeIdentifier=T,e.unescapeIdentifier=E,e.makeIdentifierFromModuleName=C,e.isBlockOrCatchScoped=N,e.isAmbientModule=w,e.isBlockScopedContainerTopLevel=k,e.isGlobalScopeAugmentation=x,e.isExternalModuleAugmentation=R,e.getEnclosingBlockScopeContainer=I,e.isCatchClauseVariableDeclaration=D,e.declarationNameToString=M,e.createDiagnosticForNode=P,e.createDiagnosticForNodeFromMessageChain=L,e.getSpanOfTokenAtPosition=O,e.getErrorSpanForNode=U,e.isExternalModule=F,e.isExternalOrCommonJsModule=B,e.isDeclarationFile=K,e.isConstEnumDeclaration=V,e.getCombinedNodeFlags=W,e.isConst=q,e.isLet=z,e.isSuperCallExpression=H,e.isPrologueDirective=Y,e.getLeadingCommentRangesOfNode=J,e.getLeadingCommentRangesOfNodeFromText=G,e.getJsDocComments=X,e.getJsDocCommentsFromText=$,e.fullTripleSlashReferencePathRegEx=/^(\\/\\/\\/\\s*<reference\\s+path\\s*=\\s*)('|\")(.+?)\\2.*?\\/>/,e.fullTripleSlashAMDReferencePathRegEx=/^(\\/\\/\\/\\s*<amd-dependency\\s+path\\s*=\\s*)('|\")(.+?)\\2.*?\\/>/,e.isTypeNode=Q,e.forEachReturnStatement=Z,e.forEachYieldExpression=ee,e.isVariableLike=te,e.isAccessor=ne,e.isClassLike=re,e.isFunctionLike=ie,e.isFunctionLikeKind=ae,e.introducesArgumentsExoticObject=oe,e.isIterationStatement=se,e.isFunctionBlock=ue,e.isObjectLiteralMethod=ce,e.isIdentifierTypePredicate=le,e.isThisTypePredicate=pe,e.getContainingFunction=fe,e.getContainingClass=de,e.getThisContainer=me,e.getSuperContainer=he,e.isSuperPropertyOrElementAccess=ye,e.getEntityNameFromTypeNode=_e,e.getInvokedExpression=ge,e.nodeCanBeDecorated=ve,e.nodeIsDecorated=be,e.isPropertyAccessExpression=Se,e.isElementAccessExpression=Ae,e.isExpression=Te,e.isExternalModuleNameRelative=Ee,e.isInstantiatedModule=Ce,e.isExternalModuleImportEqualsDeclaration=Ne,e.getExternalModuleImportEqualsDeclarationExpression=we,e.isInternalModuleImportEqualsDeclaration=ke,e.isSourceFileJavaScript=xe,e.isInJavaScriptFile=Re,e.isRequireCall=Ie,e.getSpecialPropertyAssignmentKind=De,e.getExternalModuleName=Me,e.hasQuestionToken=Pe,e.isJSDocConstructSignature=Le,e.getJSDocTypeTag=Fe,e.getJSDocReturnTag=Be,e.getJSDocTemplateTag=Ke,e.getCorrespondingJSDocParameterTag=Ve,e.hasRestParameter=je,e.isRestParameter=We,e.isLiteralKind=qe,e.isTextualLiteralKind=ze,e.isTemplateLiteralKind=He,e.isBindingPattern=Ye,e.isNodeDescendentOf=Je,e.isInAmbientContext=Ge,e.isDeclaration=Xe,e.isStatement=$e,e.isClassElement=Qe,e.isDeclarationName=Ze,e.isIdentifierName=et,e.isAliasSymbolDeclaration=tt,e.getClassExtendsHeritageClauseElement=nt,e.getClassImplementsHeritageClauseElements=rt,e.getInterfaceBaseTypeNodes=it,e.getHeritageClause=at,e.tryResolveScriptReference=ot,e.getAncestor=st,e.getFileReferenceFromReferencePath=ut,e.isKeyword=ct,e.isTrivia=lt,e.isAsyncFunctionLike=pt,e.isStringOrNumericLiteral=ft,e.hasDynamicName=dt,e.isDynamicName=mt,e.isWellKnownSymbolSyntactically=ht,e.getPropertyNameForPropertyNameNode=yt,e.getPropertyNameForKnownSymbolName=_t,e.isESSymbolIdentifier=gt,e.isModifierKind=vt,e.isParameterDeclaration=bt,e.getRootDeclaration=St,e.nodeStartsNewLexicalEnvironment=At,e.cloneNode=Tt,e.cloneEntityName=Et,e.isQualifiedName=Ct,e.nodeIsSynthesized=Nt,e.createSynthesizedNode=wt,e.createSynthesizedNodeArray=kt,e.createDiagnosticCollection=xt;var En=/[\\\\\\\"\\u0000-\\u001f\\t\\v\\f\\b\\r\\n\\u2028\\u2029\\u0085]/g,Cn={\"\\0\":\"\\\\0\",\"\\t\":\"\\\\t\",\"\\v\":\"\\\\v\",\"\\f\":\"\\\\f\",\"\\b\":\"\\\\b\",\"\\r\":\"\\\\r\",\"\\n\":\"\\\\n\",\"\\\\\":\"\\\\\\\\\",'\"':'\\\\\"',\"\\u2028\":\"\\\\u2028\",\"\\u2029\":\"\\\\u2029\",\"\":\"\\\\u0085\"};e.escapeString=Rt,e.isIntrinsicJsxName=It;var Nn=/[^\\u0000-\\u007F]/g;e.escapeNonAsciiCharacters=Mt;var wn=[\"\",\"    \"];e.getIndentString=Pt,e.getIndentSize=Lt,e.createTextWriter=Ot,e.getExternalModuleNameFromPath=Ut,e.getOwnEmitOutputFilePath=Ft,e.getEmitScriptTarget=Bt,e.getEmitModuleKind=Kt,e.forEachExpectedEmitFile=Vt,e.getSourceFilePathInNewDir=jt,e.writeFile=Wt,e.getLineOfLocalPosition=qt,e.getLineOfLocalPositionFromLineMap=zt,e.getFirstConstructorWithBody=Ht,e.getSetAccessorTypeAnnotationNode=Yt,e.getAllAccessorDeclarations=Jt,e.emitNewLineBeforeLeadingComments=Gt,e.emitComments=Xt,e.emitDetachedComments=$t,e.writeCommentRange=Qt,e.modifierToFlag=tn,e.isLeftHandSideExpression=nn,e.isAssignmentOperator=rn,e.isExpressionWithTypeArgumentsInClassExtendsClause=an,e.isSupportedExpressionWithTypeArguments=on,e.isRightSideOfQualifiedNameOrPropertyAccess=un,e.isEmptyObjectLiteralOrArrayLiteral=cn,e.getLocalSymbolForExportDefault=ln,e.hasJavaScriptFileExtension=pn,e.stringify=\"undefined\"!=typeof JSON&&JSON.stringify?JSON.stringify:dn;var kn=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";e.convertToBase64=bn,e.convertToRelativePath=Sn;var xn=\"\\r\\n\",Rn=\"\\n\";e.getNewLineCharacter=An}(o||(o={}));var o;!function(e){function t(e){return 2===e.target?\"lib.es6.d.ts\":\"lib.d.ts\"}function n(e){return e.start+e.length}function r(e){return 0===e.length}function i(e,t){return t>=e.start&&t<n(e)}function a(e,t){return t.start>=e.start&&n(t)<=n(e)}function o(e,t){return Math.max(e.start,t.start)<Math.min(n(e),n(t))}function s(e,t){var r=Math.max(e.start,t.start),i=Math.min(n(e),n(t));if(r<i)return m(r,i)}function u(e,t){return t.start<=n(e)&&n(t)>=e.start}function c(e,t,r){var i=t+r;return t<=n(e)&&i>=e.start}function l(e,t,n,r){var i=e+t,a=n+r;return n<=i&&a>=e}function p(e,t){return t<=n(e)&&t>=e.start}function f(e,t){var r=Math.max(e.start,t.start),i=Math.min(n(e),n(t));if(r<=i)return m(r,i)}function d(e,t){if(e<0)throw new Error(\"start < 0\");if(t<0)throw new Error(\"length < 0\");return{start:e,length:t}}function m(e,t){return d(e,t-e)}function h(e){return d(e.span.start,e.newLength)}function y(e){return r(e.span)&&0===e.newLength}function _(e,t){if(t<0)throw new Error(\"newLength < 0\");return{span:e,newLength:t}}function g(t){if(0===t.length)return e.unchangedTextChangeRange;if(1===t.length)return t[0];for(var r=t[0],i=r.span.start,a=n(r.span),o=i+r.newLength,s=1;s<t.length;s++){var u=t[s],c=i,l=a,p=o,f=u.span.start,d=n(u.span),h=f+u.newLength;i=Math.min(c,f),a=Math.max(l,l+(d-p)),o=Math.max(h,h+(p-d))}return _(m(i,a),o-i)}function v(t){if(t&&138===t.kind)for(var n=t;n;n=n.parent)if(e.isFunctionLike(n)||e.isClassLike(n)||218===n.kind)return n}function b(t){return 56&t.flags&&145===t.parent.kind&&e.isClassLike(t.parent.parent)}e.getDefaultLibFileName=t,e.textSpanEnd=n,e.textSpanIsEmpty=r,e.textSpanContainsPosition=i,e.textSpanContainsTextSpan=a,e.textSpanOverlapsWith=o,e.textSpanOverlap=s,e.textSpanIntersectsWithTextSpan=u,e.textSpanIntersectsWith=c,e.decodedTextSpanIntersectsWith=l,e.textSpanIntersectsWithPosition=p,e.textSpanIntersection=f,e.createTextSpan=d,e.createTextSpanFromBounds=m,e.textChangeRangeNewSpan=h,e.textChangeRangeIsUnchanged=y,e.createTextChangeRange=_,e.unchangedTextChangeRange=_(d(0,0),0),e.collapseTextChangeRangesAcrossMultipleVersions=g,e.getTypeParameterOwner=v,e.isParameterPropertyDeclaration=b}(o||(o={}));var o;!function(e){function t(t,n,r){return 251===t?new(p||(p=e.objectAllocator.getSourceFileConstructor()))(t,n,r):new(l||(l=e.objectAllocator.getNodeConstructor()))(t,n,r)}function n(e,t){if(t)return e(t)}function r(e,t){if(t)return e(t)}function i(e,t){if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n],a=e(i);if(a)return a}}function a(e,t,a){if(e){var o=a?r:i,s=a||t;switch(e.kind){case 136:return n(t,e.left)||n(t,e.right);case 138:return n(t,e.name)||n(t,e.constraint)||n(t,e.expression);case 249:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||n(t,e.questionToken)||n(t,e.equalsToken)||n(t,e.objectAssignmentInitializer);case 139:case 142:case 141:case 248:case 214:case 166:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.propertyName)||n(t,e.dotDotDotToken)||n(t,e.name)||n(t,e.questionToken)||n(t,e.type)||n(t,e.initializer);case 153:case 154:case 148:case 149:case 150:return o(s,e.decorators)||o(s,e.modifiers)||o(s,e.typeParameters)||o(s,e.parameters)||n(t,e.type);case 144:case 143:case 145:case 146:case 147:case 176:case 216:case 177:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.asteriskToken)||n(t,e.name)||n(t,e.questionToken)||o(s,e.typeParameters)||o(s,e.parameters)||n(t,e.type)||n(t,e.equalsGreaterThanToken)||n(t,e.body);case 152:return n(t,e.typeName)||o(s,e.typeArguments);case 151:return n(t,e.parameterName)||n(t,e.type);case 155:return n(t,e.exprName);case 156:return o(s,e.members);case 157:return n(t,e.elementType);case 158:return o(s,e.elementTypes);case 159:case 160:return o(s,e.types);case 161:return n(t,e.type);case 164:case 165:return o(s,e.elements);case 167:return o(s,e.elements);case 168:return o(s,e.properties);case 169:return n(t,e.expression)||n(t,e.dotToken)||n(t,e.name);case 170:return n(t,e.expression)||n(t,e.argumentExpression);case 171:case 172:return n(t,e.expression)||o(s,e.typeArguments)||o(s,e.arguments);case 173:return n(t,e.tag)||n(t,e.template);case 174:return n(t,e.type)||n(t,e.expression);case 175:return n(t,e.expression);case 178:return n(t,e.expression);case 179:return n(t,e.expression);case 180:return n(t,e.expression);case 182:return n(t,e.operand);case 187:return n(t,e.asteriskToken)||n(t,e.expression);case 181:return n(t,e.expression);case 183:return n(t,e.operand);case 184:return n(t,e.left)||n(t,e.operatorToken)||n(t,e.right);case 192:return n(t,e.expression)||n(t,e.type);case 185:return n(t,e.condition)||n(t,e.questionToken)||n(t,e.whenTrue)||n(t,e.colonToken)||n(t,e.whenFalse);case 188:return n(t,e.expression);case 195:case 222:return o(s,e.statements);case 251:return o(s,e.statements)||n(t,e.endOfFileToken);case 196:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.declarationList);case 215:return o(s,e.declarations);case 198:return n(t,e.expression);case 199:return n(t,e.expression)||n(t,e.thenStatement)||n(t,e.elseStatement);case 200:return n(t,e.statement)||n(t,e.expression);case 201:return n(t,e.expression)||n(t,e.statement);case 202:return n(t,e.initializer)||n(t,e.condition)||n(t,e.incrementor)||n(t,e.statement);case 203:return n(t,e.initializer)||n(t,e.expression)||n(t,e.statement);case 204:return n(t,e.initializer)||n(t,e.expression)||n(t,e.statement);case 205:case 206:return n(t,e.label);case 207:return n(t,e.expression);case 208:return n(t,e.expression)||n(t,e.statement);case 209:return n(t,e.expression)||n(t,e.caseBlock);case 223:return o(s,e.clauses);case 244:return n(t,e.expression)||o(s,e.statements);case 245:return o(s,e.statements);case 210:return n(t,e.label)||n(t,e.statement);case 211:return n(t,e.expression);case 212:return n(t,e.tryBlock)||n(t,e.catchClause)||n(t,e.finallyBlock);case 247:return n(t,e.variableDeclaration)||n(t,e.block);case 140:return n(t,e.expression);case 217:case 189:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||o(s,e.typeParameters)||o(s,e.heritageClauses)||o(s,e.members);case 218:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||o(s,e.typeParameters)||o(s,e.heritageClauses)||o(s,e.members);case 219:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||o(s,e.typeParameters)||n(t,e.type);case 220:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||o(s,e.members);case 250:return n(t,e.name)||n(t,e.initializer);case 221:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||n(t,e.body);case 224:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.name)||n(t,e.moduleReference);case 225:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.importClause)||n(t,e.moduleSpecifier);case 226:return n(t,e.name)||n(t,e.namedBindings);case 227:return n(t,e.name);case 228:case 232:return o(s,e.elements);case 231:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.exportClause)||n(t,e.moduleSpecifier);case 229:case 233:return n(t,e.propertyName)||n(t,e.name);case 230:return o(s,e.decorators)||o(s,e.modifiers)||n(t,e.expression);case 186:return n(t,e.head)||o(s,e.templateSpans);case 193:return n(t,e.expression)||n(t,e.literal);case 137:return n(t,e.expression);case 246:return o(s,e.types);case 191:return n(t,e.expression)||o(s,e.typeArguments);case 235:return n(t,e.expression);case 234:return o(s,e.decorators);case 236:return n(t,e.openingElement)||o(s,e.children)||n(t,e.closingElement);case 237:case 238:return n(t,e.tagName)||o(s,e.attributes);case 241:return n(t,e.name)||n(t,e.initializer);case 242:return n(t,e.expression);case 243:return n(t,e.expression);case 240:return n(t,e.tagName);case 252:return n(t,e.type);case 256:return o(s,e.types);case 257:return o(s,e.types);case 255:return n(t,e.elementType);case 259:return n(t,e.type);case 258:return n(t,e.type);case 260:return o(s,e.members);case 262:return n(t,e.name)||o(s,e.typeArguments);case 263:return n(t,e.type);case 264:return o(s,e.parameters)||n(t,e.type);case 265:return n(t,e.type);case 266:return n(t,e.type);case 267:return n(t,e.type);case 261:return n(t,e.name)||n(t,e.type);case 268:return o(s,e.tags);case 270:return n(t,e.preParameterName)||n(t,e.typeExpression)||n(t,e.postParameterName);case 271:return n(t,e.typeExpression);case 272:return n(t,e.typeExpression);case 273:return o(s,e.typeParameters)}}}function o(t,n,r,i){void 0===i&&(i=!1);var a=(new Date).getTime(),o=f.parseSourceFile(t,n,r,void 0,i);return e.parseTime+=(new Date).getTime()-a,o}function s(e,t,n,r){return d.updateSourceFile(e,t,n,r)}function u(e,t,n){return f.JSDocParser.parseIsolatedJSDocComment(e,t,n)}function c(e,t,n){return f.JSDocParser.parseJSDocTypeExpressionForTests(e,t,n)}e.parseTime=0;var l,p;e.createNode=t,e.forEachChild=a,e.createSourceFile=o,e.updateSourceFile=s,e.parseIsolatedJSDocComment=u,e.parseJSDocTypeExpressionForTests=c;var f;!function(t){function n(t,n,r,a,u){i(t,n,r,e.hasJavaScriptFileExtension(t)||0===n.lastIndexOf(\"// @language=javascript\",0),a);var c=s(t,r,u);return o(),c}function r(t){return e.fileExtensionIs(t,\".tsx\")||e.fileExtensionIs(t,\".jsx\")||e.fileExtensionIs(t,\".js\")?1:0}function i(t,n,i,a,o){Ui=e.objectAllocator.getNodeConstructor(),Fi=e.objectAllocator.getSourceFileConstructor(),Wi=n,Vi=o,Ki=[],Yi=0,zi={},Hi=0,qi=0,Ji=a?32:0,$i=!1,Gi.setText(Wi),Gi.setOnError(D),Gi.setScriptTarget(i),Gi.setLanguageVariant(r(t))}function o(){Gi.setText(\"\"),Gi.setOnError(void 0),Ki=void 0,Bi=void 0,zi=void 0,Vi=void 0,Wi=void 0}function s(t,n,r){return Bi=l(t,n),32&Ji&&(Bi.parserContextFlags=32),ji=L(),Li(Bi),Bi.statements=Ne(0,xr),e.Debug.assert(1===ji),Bi.endOfFileToken=G(),Oi(Bi),Bi.nodeCount=qi,Bi.identifierCount=Hi,Bi.identifiers=zi,Bi.parseDiagnostics=Ki,r&&c(Bi),Bi}function u(t){if(32&Ji){var n=e.getLeadingCommentRangesOfNode(t,Bi);if(n)for(var r=0,i=n;r<i.length;r++){var a=i[r],o=ea.parseJSDocComment(t,a.pos,a.end-a.pos);o&&(t.jsDocComment=o)}}return t}function c(e){function t(e){if(e.parent!==n){e.parent=n;var r=n;n=e,a(e,t),n=r}}var n=e;a(e,t)}function l(t,n){var i=new Fi(251,0,Wi.length);return qi++,i.text=Wi,i.bindDiagnostics=[],i.languageVersion=n,i.fileName=e.normalizePath(t),i.flags=e.fileExtensionIs(i.fileName,\".d.ts\")?4096:0,i.languageVariant=r(i.fileName),i}function p(e,t){e?Ji|=t:Ji&=~t}function f(e){p(e,1)}function d(e){p(e,2)}function m(e){p(e,4)}function h(e){p(e,8)}function y(e,t){var n=e&Ji;if(n){p(!1,n);var r=t();return p(!0,n),r}return t()}function _(e,t){var n=e&~Ji;if(n){p(!0,n);var r=t();return p(!1,n),r}return t()}function g(e){return y(1,e)}function v(e){return _(1,e)}function b(e){return _(2,e)}function S(e){return _(4,e)}function A(e){return _(8,e)}function T(e){return y(8,e)}function E(e){return _(10,e)}function C(e){return 0!=(Ji&e)}function N(){return C(2)}function w(){return C(1)}function k(){return C(4)}function x(){return C(8)}function R(e,t){var n=Gi.getTokenPos();I(n,Gi.getTextPos()-n,e,t)}function I(t,n,r,i){var a=e.lastOrUndefined(Ki);a&&t===a.start||Ki.push(e.createFileDiagnostic(Bi,t,n,r,i)),$i=!0}function D(e,t){I(Gi.getTextPos(),t||0,e)}function M(){return Gi.getStartPos()}function P(){return Gi.getStartPos()}function L(){return ji=Gi.scan()}function O(){return ji=Gi.reScanGreaterToken()}function U(){return ji=Gi.reScanSlashToken()}function F(){return ji=Gi.reScanTemplateToken()}function B(){return ji=Gi.scanJsxIdentifier()}function K(){return ji=Gi.scanJsxToken()}function V(t,n){var r=ji,i=Ki.length,a=$i,o=Ji,s=n?Gi.lookAhead(t):Gi.tryScan(t);return e.Debug.assert(o===Ji),s&&!n||(ji=r,Ki.length=i,$i=a),s}function j(e){return V(e,!0)}function W(e){return V(e,!1)}function q(){return 69===ji||(114!==ji||!N())&&((119!==ji||!x())&&ji>105)}function z(t,n,r){return void 0===r&&(r=!0),ji===t?(r&&L(),!0):(n?R(n):R(e.Diagnostics._0_expected,e.tokenToString(t)),!1)}function H(e){return ji===e&&(L(),!0)}function Y(e){if(ji===e)return G()}function J(e,t,n,r){return Y(e)||ee(e,t,n,r)}function G(){var e=Q(ji);return L(),Z(e)}function X(){return 23===ji||(16===ji||1===ji||Gi.hasPrecedingLineBreak())}function $(){return X()?(23===ji&&L(),!0):z(23)}function Q(e,t){return qi++,t>=0||(t=Gi.getStartPos()),new Ui(e,t,t)}function Z(e,t){return e.end=void 0===t?Gi.getStartPos():t,Ji&&(e.parserContextFlags=Ji),$i&&($i=!1,e.parserContextFlags|=16),e}function ee(e,t,n,r){t?I(Gi.getStartPos(),0,n,r):R(n,r);var i=Q(e,Gi.getStartPos());return i.text=\"\",Z(i)}function te(t){return t=e.escapeIdentifier(t),e.hasProperty(zi,t)?zi[t]:zi[t]=t}function ne(t,n){if(Hi++,t){var r=Q(69);return 69!==ji&&(r.originalKeywordKind=ji),r.text=te(Gi.getTokenValue()),L(),Z(r)}return ee(69,!1,n||e.Diagnostics.Identifier_expected)}function re(e){return ne(q(),e)}function ie(){return ne(e.tokenIsIdentifierOrKeyword(ji))}function ae(){return e.tokenIsIdentifierOrKeyword(ji)||9===ji||8===ji}function oe(e){return 9===ji||8===ji?Je(!0):e&&19===ji?le():ie()}function se(){return oe(!0)}function ue(){return oe(!1)}function ce(){return 9===ji||8===ji||e.tokenIsIdentifierOrKeyword(ji)}function le(){var e=Q(137);return z(19),e.expression=g(Ht),z(20),Z(e)}function pe(e){return ji===e&&W(de)}function fe(){return L(),!Gi.hasPrecedingLineBreak()&&he()}function de(){return 74===ji?81===L():82===ji?(L(),77===ji?j(ye):37!==ji&&15!==ji&&he()):77===ji?ye():113===ji?(L(),he()):fe()}function me(){return e.isModifierKind(ji)&&W(de)}function he(){return 19===ji||15===ji||37===ji||ae()}function ye(){return L(),73===ji||87===ji}function _e(t,n){if(ke(t))return!0;switch(t){case 0:case 1:case 3:return!(23===ji&&n)&&Nr();case 2:return 71===ji||77===ji;case 4:return _t();case 5:return j($r)||23===ji&&!n;case 6:return 19===ji||ae();case 12:return 19===ji||37===ji||ae();case 9:return 19===ji||ae();case 7:return 15===ji?j(ge):n?q()&&!Se():Wt()&&!Se();case 8:return Ur();case 10:return 24===ji||22===ji||Ur();case 17:return q();case 11:case 15:return 24===ji||22===ji||qt();case 16:return it();case 18:case 19:return 24===ji||Rt();case 20:return li();case 21:return e.tokenIsIdentifierOrKeyword(ji);case 13:return e.tokenIsIdentifierOrKeyword(ji)||15===ji;case 14:return!0;case 22:case 23:case 25:return ea.isJSDocType();case 24:return ce()}e.Debug.fail(\"Non-exhaustive case in 'isListElement'.\")}function ge(){if(e.Debug.assert(15===ji),16===L()){var t=L();return 24===t||15===t||83===t||106===t}return!0}function ve(){return L(),q()}function be(){return L(),e.tokenIsIdentifierOrKeyword(ji)}function Se(){return(106===ji||83===ji)&&j(Ae)}function Ae(){return L(),qt()}function Te(e){if(1===ji)return!0;switch(e){case 1:case 2:case 4:case 5:case 6:case 12:case 9:case 21:return 16===ji;case 3:return 16===ji||71===ji||77===ji;case 7:return 15===ji||83===ji||106===ji;case 8:return Ee();case 17:return 27===ji||17===ji||15===ji||83===ji||106===ji;case 11:return 18===ji||23===ji;case 15:case 19:case 10:return 20===ji;case 16:return 18===ji||20===ji;case 18:return 27===ji||17===ji;case 20:return 15===ji||16===ji;case 13:return 27===ji||39===ji;case 14:return 25===ji&&j(Ai);case 22:return 18===ji||54===ji||16===ji;case 23:return 27===ji||16===ji;case 25:return 20===ji||16===ji;case 24:return 16===ji}}function Ee(){return!!X()||(!!un(ji)||34===ji)}function Ce(){for(var e=0;e<26;e++)if(Yi&1<<e&&(_e(e,!0)||Te(e)))return!0;return!1}function Ne(e,t){var n=Yi;Yi|=1<<e;var r=[];for(r.pos=M();!Te(e);)if(_e(e,!1)){var i=we(e,t);r.push(i)}else if(Fe(e))break;return r.end=P(),Yi=n,r}function we(e,t){var n=ke(e);return n?xe(n):t()}function ke(t){if(!$i&&Vi){var n=Vi.currentNode(Gi.getStartPos());if(!e.nodeIsMissing(n)&&!n.intersectsChange&&!e.containsParseError(n)){if((31&n.parserContextFlags)===Ji&&Re(n,t))return n}}}function xe(e){return Gi.setTextPos(e.end),L(),e}function Re(e,t){switch(t){case 5:return Ie(e);case 2:return De(e);case 0:case 1:case 3:return Me(e);case 6:return Pe(e);case 4:return Le(e);case 8:return Oe(e);case 16:return Ue(e);case 20:case 17:case 19:case 18:case 11:case 12:case 7:case 13:case 14:}return!1}function Ie(e){if(e)switch(e.kind){case 145:case 150:case 146:case 147:case 142:case 194:return!0;case 144:var t=e;return!(69===t.name.kind&&121===t.name.originalKeywordKind)}return!1}function De(e){if(e)switch(e.kind){case 244:case 245:return!0}return!1}function Me(e){if(e)switch(e.kind){case 216:case 196:case 195:case 199:case 198:case 211:case 207:case 209:case 206:case 205:case 203:case 204:case 202:case 201:case 208:case 197:case 212:case 210:case 200:case 213:case 225:case 224:case 231:case 230:case 221:case 217:case 218:case 220:case 219:return!0}return!1}function Pe(e){return 250===e.kind}function Le(e){if(e)switch(e.kind){case 149:case 143:case 150:case 141:case 148:return!0}return!1}function Oe(e){return 214===e.kind&&void 0===e.initializer}function Ue(e){return 139===e.kind&&void 0===e.initializer}function Fe(e){return R(Be(e)),!!Ce()||(L(),!1)}function Be(t){switch(t){case 0:return e.Diagnostics.Declaration_or_statement_expected;case 1:return e.Diagnostics.Declaration_or_statement_expected;case 2:return e.Diagnostics.case_or_default_expected;case 3:return e.Diagnostics.Statement_expected;case 4:return e.Diagnostics.Property_or_signature_expected;case 5:return e.Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected;case 6:return e.Diagnostics.Enum_member_expected;case 7:return e.Diagnostics.Expression_expected;case 8:return e.Diagnostics.Variable_declaration_expected;case 9:return e.Diagnostics.Property_destructuring_pattern_expected;case 10:return e.Diagnostics.Array_element_destructuring_pattern_expected;case 11:return e.Diagnostics.Argument_expression_expected;case 12:return e.Diagnostics.Property_assignment_expected;case 15:return e.Diagnostics.Expression_or_comma_expected;case 16:return e.Diagnostics.Parameter_declaration_expected;case 17:return e.Diagnostics.Type_parameter_declaration_expected;case 18:return e.Diagnostics.Type_argument_expected;case 19:return e.Diagnostics.Type_expected;case 20:return e.Diagnostics.Unexpected_token_expected;case 21:return e.Diagnostics.Identifier_expected;case 13:return e.Diagnostics.Identifier_expected;case 14:return e.Diagnostics.Identifier_expected;case 22:return e.Diagnostics.Parameter_declaration_expected;case 23:return e.Diagnostics.Type_argument_expected;case 25:return e.Diagnostics.Type_expected;case 24:return e.Diagnostics.Property_assignment_expected}}function Ke(e,t,n){var r=Yi;Yi|=1<<e;var i=[];i.pos=M();for(var a=-1;;)if(_e(e,!1)){if(i.push(we(e,t)),a=Gi.getTokenPos(),H(24))continue;if(a=-1,Te(e))break;z(24),n&&23===ji&&!Gi.hasPrecedingLineBreak()&&L()}else{if(Te(e))break;if(Fe(e))break}return a>=0&&(i.hasTrailingComma=!0),i.end=P(),Yi=r,i}function Ve(){var e=M(),t=[];return t.pos=e,t.end=e,t}function je(e,t,n,r){if(z(n)){var i=Ke(e,t);return z(r),i}return Ve()}function We(e,t){for(var n=re(t);H(21);){var r=Q(136,n.pos);r.left=n,r.right=qe(e),n=Z(r)}return n}function qe(t){if(Gi.hasPrecedingLineBreak()&&e.tokenIsIdentifierOrKeyword(ji)){if(j(Sr))return ee(69,!0,e.Diagnostics.Identifier_expected)}return t?ie():re()}function ze(){var t=Q(186);t.head=Ge(),e.Debug.assert(12===t.head.kind,\"Template head has wrong token kind\");var n=[];n.pos=M();do{n.push(He())}while(13===e.lastOrUndefined(n).literal.kind);return n.end=P(),t.templateSpans=n,Z(t)}function He(){var t=Q(193);t.expression=g(Ht);var n;return 16===ji?(F(),n=Ge()):n=J(14,!1,e.Diagnostics._0_expected,e.tokenToString(16)),t.literal=n,Z(t)}function Ye(){return Xe(163,!0)}function Je(e){return Xe(ji,e)}function Ge(){return Xe(ji,!1)}function Xe(t,n){var r=Q(t),i=Gi.getTokenValue();r.text=n?te(i):i,Gi.hasExtendedUnicodeEscape()&&(r.hasExtendedUnicodeEscape=!0),Gi.isUnterminated()&&(r.isUnterminated=!0);var a=Gi.getTokenPos();return L(),Z(r),8===r.kind&&48===Wi.charCodeAt(a)&&e.isOctalDigit(Wi.charCodeAt(a+1))&&(r.flags|=32768),r}function $e(){var t=We(!1,e.Diagnostics.Type_expected),n=Q(152,t.pos);return n.typeName=t,Gi.hasPrecedingLineBreak()||25!==ji||(n.typeArguments=je(18,Kt,25,27)),Z(n)}function Qe(e){L();var t=Q(151,e.pos);return t.parameterName=e,t.type=Kt(),Z(t)}function Ze(){var e=Q(162);return L(),Z(e)}function et(){var e=Q(155);return z(101),e.exprName=We(!0),Z(e)}function tt(){var e=Q(138);return e.name=re(),H(83)&&(Rt()||!qt()?e.constraint=Kt():e.expression=bn()),Z(e)}function nt(){if(25===ji)return je(17,tt,25,27)}function rt(){if(H(54))return Kt()}function it(){return 22===ji||Ur()||e.isModifierKind(ji)||55===ji}function at(e,t){t&&(e.flags|=t.flags,e.modifiers=t)}function ot(){var t=Q(139);return t.decorators=Qr(),at(t,Zr()),t.dotDotDotToken=Y(22),t.name=Fr(),0===e.getFullWidth(t.name)&&0===t.flags&&e.isModifierKind(ji)&&L(),t.questionToken=Y(53),t.type=rt(),t.initializer=st(!0),u(Z(t))}function st(e){return e?ut():Jr()}function ut(){return Yt(!0)}function ct(e,t,n,r,i){var a=34===e;i.typeParameters=nt(),i.parameters=lt(t,n,r),a?(z(e),i.type=Ft()):H(e)&&(i.type=Ft())}function lt(e,t,n){if(z(17)){var r=N(),i=x();d(e),h(t);var a=Ke(16,ot);if(d(r),h(i),!z(18)&&n)return;return a}return n?void 0:Ve()}function pt(){H(24)||$()}function ft(e){var t=Q(e);return 149===e&&z(92),ct(54,!1,!1,!1,t),pt(),Z(t)}function dt(){return 19===ji&&j(mt)}function mt(){if(L(),22===ji||20===ji)return!0;if(e.isModifierKind(ji)){if(L(),q())return!0}else{if(!q())return!1;L()}return 54===ji||24===ji||53===ji&&(L(),54===ji||24===ji||20===ji)}function ht(e,t,n){var r=Q(150,e);return r.decorators=t,at(r,n),r.parameters=je(16,ot,19,20),r.type=jt(),pt(),Z(r)}function yt(){var e=Gi.getStartPos(),t=se(),n=Y(53);if(17===ji||25===ji){var r=Q(143,e);return r.name=t,r.questionToken=n,ct(54,!1,!1,!1,r),pt(),Z(r)}var i=Q(141,e);return i.name=t,i.questionToken=n,i.type=jt(),56===ji&&(i.initializer=Jr()),pt(),Z(i)}function _t(){switch(ji){case 17:case 25:case 19:return!0;default:if(e.isModifierKind(ji)){var t=j(gt);if(t)return t}return ae()&&j(vt)}}function gt(){for(;e.isModifierKind(ji);)L();return dt()}function vt(){return L(),17===ji||25===ji||53===ji||54===ji||X()}function bt(){switch(ji){case 17:case 25:return ft(148);case 19:return dt()?ht(Gi.getStartPos(),void 0,void 0):yt();case 92:if(j(At))return ft(149);case 9:case 8:return yt();default:if(e.isModifierKind(ji)){var t=W(St);if(t)return t}if(e.tokenIsIdentifierOrKeyword(ji))return yt()}}function St(){var e=Gi.getStartPos(),t=Qr(),n=Zr();return dt()?ht(e,t,n):void 0}function At(){return L(),17===ji||25===ji}function Tt(){var e=Q(156);return e.members=Et(),Z(e)}function Et(){var e;return z(15)?(e=Ne(4,bt),z(16)):e=Ve(),e}function Ct(){var e=Q(158);return e.elementTypes=je(19,Kt,19,20),Z(e)}function Nt(){var e=Q(161);return z(17),e.type=Kt(),z(18),Z(e)}function wt(e){var t=Q(e);return 154===e&&z(92),ct(34,!1,!1,!1,t),Z(t)}function kt(){var e=G();return 21===ji?void 0:e}function xt(){switch(ji){case 117:case 130:case 128:case 120:case 131:return W(kt)||$e();case 9:return Ye();case 103:return G();case 97:var e=Ze();return 124!==ji||Gi.hasPrecedingLineBreak()?e:Qe(e);case 101:return et();case 15:return Tt();case 19:return Ct();case 17:return Nt();default:return $e()}}function Rt(){switch(ji){case 117:case 130:case 128:case 120:case 131:case 103:case 97:case 101:case 15:case 19:case 25:case 92:case 9:return!0;case 17:return j(It);default:return q()}}function It(){return L(),18===ji||it()||Rt()}function Dt(){for(var e=xt();!Gi.hasPrecedingLineBreak()&&H(19);){z(20);var t=Q(157,e.pos);t.elementType=e,e=Z(t)}return e}function Mt(e,t,n){var r=t();if(ji===n){var i=[r];for(i.pos=r.pos;H(n);)i.push(t());i.end=P();var a=Q(e,r.pos);a.types=i,r=Z(a)}return r}function Pt(){return Mt(160,Dt,46)}function Lt(){return Mt(159,Pt,47)}function Ot(){return 25===ji||17===ji&&j(Ut)}function Ut(){if(L(),18===ji||22===ji)return!0;if(q()||e.isModifierKind(ji)){if(L(),54===ji||24===ji||53===ji||56===ji||q()||e.isModifierKind(ji))return!0;if(18===ji&&(L(),34===ji))return!0}return!1}function Ft(){var e=q()&&W(Bt),t=Kt();if(e){var n=Q(151,e.pos);return n.parameterName=e,n.type=t,Z(n)}return t}function Bt(){var e=re();if(124===ji&&!Gi.hasPrecedingLineBreak())return L(),e}function Kt(){return y(10,Vt)}function Vt(){return Ot()?wt(153):92===ji?wt(154):Lt()}function jt(){return H(54)?Kt():void 0}function Wt(){switch(ji){case 97:case 95:case 93:case 99:case 84:case 8:case 9:case 11:case 12:case 17:case 19:case 15:case 87:case 73:case 92:case 39:case 61:case 69:return!0;default:return q()}}function qt(){if(Wt())return!0;switch(ji){case 35:case 36:case 50:case 49:case 78:case 101:case 103:case 41:case 42:case 25:case 119:case 114:return!0;default:return!!ln()||q()}}function zt(){return 15!==ji&&87!==ji&&73!==ji&&55!==ji&&qt()}function Ht(){var e=k();e&&m(!1);for(var t,n=Jt();t=Y(24);)n=fn(n,t,Jt());return e&&m(!0),n}function Yt(e){if(56===ji||!(Gi.hasPrecedingLineBreak()||e&&15===ji)&&qt())return z(56),Jt()}function Jt(){if(Gt())return $t();var t=Zt();if(t)return t;var n=sn(0);return 69===n.kind&&34===ji?Qt(n):e.isLeftHandSideExpression(n)&&e.isAssignmentOperator(O())?fn(n,G(),Jt()):on(n)}function Gt(){return 114===ji&&(!!N()||j(Tr))}function Xt(){return L(),!Gi.hasPrecedingLineBreak()&&q()}function $t(){var e=Q(187);return L(),Gi.hasPrecedingLineBreak()||37!==ji&&!qt()?Z(e):(e.asteriskToken=Y(37),e.expression=Jt(),Z(e))}function Qt(t){e.Debug.assert(34===ji,\"parseSimpleArrowFunctionExpression should only have been called if we had a =>\");var n=Q(177,t.pos),r=Q(139,t.pos);return r.name=t,Z(r),n.parameters=[r],n.parameters.pos=r.pos,n.parameters.end=r.end,n.equalsGreaterThanToken=J(34,!1,e.Diagnostics._0_expected,\"=>\"),n.body=an(!1),Z(n)}function Zt(){var t=en();if(0!==t){var n=1===t?rn(!0):W(nn);if(n){var r=!!(256&n.flags),i=ji;return n.equalsGreaterThanToken=J(34,!1,e.Diagnostics._0_expected,\"=>\"),n.body=34===i||15===i?an(r):re(),Z(n)}}}function en(){return 17===ji||25===ji||118===ji?j(tn):34===ji?1:0}function tn(){if(118===ji){if(L(),Gi.hasPrecedingLineBreak())return 0;if(17!==ji&&25!==ji)return 0}var t=ji,n=L();if(17===t){if(18===n){switch(L()){case 34:case 54:case 15:return 1;default:return 0}}return 19===n||15===n?2:22===n?1:q()?54===L()?1:2:0}if(e.Debug.assert(25===t),!q())return 0;if(1===Bi.languageVariant){return j(function(){var e=L();if(83===e){switch(L()){case 56:case 27:return!1;default:return!0}}else if(24===e)return!0;return!1})?1:0}return 2}function nn(){return rn(!1)}function rn(e){var t=Q(177);if(at(t,ei()),ct(54,!1,!!(256&t.flags),!e,t),t.parameters&&(e||34===ji||15===ji))return t}function an(e){return 15===ji?rr(!1,e,!1):23!==ji&&87!==ji&&73!==ji&&Nr()&&!zt()?rr(!1,e,!0):e?A(Jt):T(Jt)}function on(t){var n=Y(53);if(!n)return t;var r=Q(185,t.pos);return r.condition=t,r.questionToken=n,r.whenTrue=y(Xi,Jt),r.colonToken=J(54,!1,e.Diagnostics._0_expected,e.tokenToString(54)),r.whenFalse=Jt(),Z(r)}function sn(e){return cn(e,bn())}function un(e){return 90===e||135===e}function cn(e,t){for(;;){O();var n=pn();if(!(38===ji?n>=e:n>e))break;if(90===ji&&w())break;if(116===ji){if(Gi.hasPrecedingLineBreak())break;L(),t=dn(t,Kt())}else t=fn(t,G(),sn(n))}return t}function ln(){return(!w()||90!==ji)&&pn()>0}function pn(){switch(ji){case 52:return 1;case 51:return 2;case 47:return 3;case 48:return 4;case 46:return 5;case 30:case 31:case 32:case 33:return 6;case 25:case 27:case 28:case 29:case 91:case 90:case 116:return 7;case 43:case 44:case 45:return 8;case 35:case 36:return 9;case 37:case 39:case 40:return 10;case 38:return 11}return-1}function fn(e,t,n){var r=Q(184,e.pos);return r.left=e,r.operatorToken=t,r.right=n,Z(r)}function dn(e,t){var n=Q(192,e.pos);return n.expression=e,n.type=t,Z(n)}function mn(){var e=Q(182);return e.operator=ji,L(),e.operand=Sn(),Z(e)}function hn(){var e=Q(178);return L(),e.expression=Sn(),Z(e)}function yn(){var e=Q(179);return L(),e.expression=Sn(),Z(e)}function _n(){var e=Q(180);return L(),e.expression=Sn(),Z(e)}function gn(){return 119===ji&&(!!x()||j(Xt))}function vn(){var e=Q(181);return L(),e.expression=Sn(),Z(e)}function bn(){if(gn())return vn();if(An()){var t=Tn();return 38===ji?cn(pn(),t):t}var n=ji,r=Sn();if(38===ji){var i=e.skipTrivia(Wi,r.pos);174===r.kind?I(i,r.end-i,e.Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses):I(i,r.end-i,e.Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses,e.tokenToString(n))}return r}function Sn(){switch(ji){case 35:case 36:case 50:case 49:return mn();case 78:return hn();case 101:return yn();case 103:return _n();case 25:return Fn();default:return Tn()}}function An(){switch(ji){case 35:case 36:case 50:case 49:case 78:case 101:case 103:return!1;case 25:if(1!==Bi.languageVariant)return!1;default:return!0}}function Tn(){if(41===ji||42===ji){var t=Q(182);return t.operator=ji,L(),t.operand=En(),Z(t)}if(1===Bi.languageVariant&&25===ji&&j(be))return kn(!0);var n=En();if(e.Debug.assert(e.isLeftHandSideExpression(n)),(41===ji||42===ji)&&!Gi.hasPrecedingLineBreak()){var t=Q(183,n.pos);return t.operand=n,t.operator=ji,L(),Z(t)}return n}function En(){return Kn(95===ji?Nn():Cn())}function Cn(){return Bn(qn())}function Nn(){var t=G();if(17===ji||21===ji||19===ji)return t;var n=Q(169,t.pos);return n.expression=t,n.dotToken=J(21,!1,e.Diagnostics.super_must_be_followed_by_an_argument_list_or_member_access),n.name=qe(!0),Z(n)}function wn(e,t){return e.kind===t.kind&&(69===e.kind?e.text===t.text:e.right.text===t.right.text&&wn(e.left,t.left))}function kn(t){var n,r=Dn(t);if(238===r.kind){var i=Q(236,r.pos);i.openingElement=r,i.children=In(i.openingElement.tagName),i.closingElement=Un(t),wn(i.openingElement.tagName,i.closingElement.tagName)||I(i.closingElement.pos,i.closingElement.end-i.closingElement.pos,e.Diagnostics.Expected_corresponding_JSX_closing_tag_for_0,e.getTextOfNodeFromSourceText(Wi,i.openingElement.tagName)),n=Z(i)}else e.Debug.assert(237===r.kind),n=r;if(t&&25===ji){var a=W(function(){return kn(!0)});if(a){R(e.Diagnostics.JSX_expressions_must_have_one_parent_element);var o=Q(184,n.pos);return o.end=a.end,o.left=n,o.right=a,o.operatorToken=ee(24,!1,void 0),o.operatorToken.pos=o.operatorToken.end=o.right.pos,o}}return n}function xn(){var e=Q(239,Gi.getStartPos());return ji=Gi.scanJsxToken(),Z(e)}function Rn(){switch(ji){case 239:return xn();case 15:return Pn(!1);case 25:return kn(!1)}e.Debug.fail(\"Unknown JSX child kind \"+ji)}function In(t){var n=[];n.pos=Gi.getStartPos();var r=Yi;for(Yi|=16384;;){if(26===(ji=Gi.reScanJsxToken()))break;if(1===ji){I(t.pos,t.end-t.pos,e.Diagnostics.JSX_element_0_has_no_corresponding_closing_tag,e.getTextOfNodeFromSourceText(Wi,t));break}n.push(Rn())}return n.end=Gi.getTokenPos(),Yi=r,n}function Dn(e){var t=Gi.getStartPos();z(25);var n,r=Mn(),i=Ne(13,Ln);return 27===ji?(n=Q(238,t),K()):(z(39),e?z(27):(z(27,void 0,!1),K()),n=Q(237,t)),n.tagName=r,n.attributes=i,Z(n)}function Mn(){B();for(var e=ie();H(21);){B();var t=Q(136,e.pos);t.left=e,t.right=ie(),e=Z(t)}return e}function Pn(e){var t=Q(243);return z(15),16!==ji&&(t.expression=Jt()),e?z(16):(z(16,void 0,!1),K()),Z(t)}function Ln(){if(15===ji)return On();B();var e=Q(241);if(e.name=ie(),H(56))switch(ji){case 9:e.initializer=Je();break;default:e.initializer=Pn(!0)}return Z(e)}function On(){var e=Q(242);return z(15),z(22),e.expression=Ht(),z(16),Z(e)}function Un(e){var t=Q(240);return z(26),t.tagName=Mn(),e?z(27):(z(27,void 0,!1),K()),Z(t)}function Fn(){var e=Q(174);return z(25),e.type=Kt(),z(27),e.expression=Sn(),Z(e)}function Bn(e){for(;;){var t=Y(21);if(t){var n=Q(169,e.pos);n.expression=e,n.dotToken=t,n.name=qe(!0),e=Z(n)}else if(k()||!H(19)){if(11!==ji&&12!==ji)return e;var r=Q(173,e.pos);r.tag=e,r.template=11===ji?Je():ze(),e=Z(r)}else{var i=Q(170,e.pos);if(i.expression=e,20!==ji&&(i.argumentExpression=g(Ht),9===i.argumentExpression.kind||8===i.argumentExpression.kind)){var a=i.argumentExpression;a.text=te(a.text)}z(20),e=Z(i)}}}function Kn(e){for(;;)if(e=Bn(e),25!==ji){if(17!==ji)return e;var t=Q(171,e.pos);t.expression=e,t.arguments=Vn(),e=Z(t)}else{var n=W(jn);if(!n)return e;var t=Q(171,e.pos);t.expression=e,t.typeArguments=n,t.arguments=Vn(),e=Z(t)}}function Vn(){z(17);var e=Ke(11,Jn);return z(18),e}function jn(){if(H(25)){var e=Ke(18,Kt);if(z(27))return e&&Wn()?e:void 0}}function Wn(){switch(ji){case 17:case 21:case 18:case 20:case 54:case 23:case 53:case 30:case 32:case 31:case 33:case 51:case 52:case 48:case 46:case 47:case 16:case 1:return!0;case 24:case 15:default:return!1}}function qn(){switch(ji){case 8:case 9:case 11:return Je();case 97:case 95:case 93:case 99:case 84:return G();case 17:return zn();case 19:return Gn();case 15:return Qn();case 118:if(!j(Ar))break;return Zn();case 73:return ni();case 87:return Zn();case 92:return tr();case 39:case 61:if(10===U())return Je();break;case 12:return ze()}return re(e.Diagnostics.Expression_expected)}function zn(){var e=Q(175);return z(17),e.expression=g(Ht),z(18),Z(e)}function Hn(){var e=Q(188);return z(22),e.expression=Jt(),Z(e)}function Yn(){return 22===ji?Hn():24===ji?Q(190):Jt()}function Jn(){return y(Xi,Yn)}function Gn(){var e=Q(167);return z(19),Gi.hasPrecedingLineBreak()&&(e.flags|=1024),e.elements=Ke(15,Yn),z(20),Z(e)}function Xn(e,t,n){return pe(123)?Gr(146,e,t,n):pe(129)?Gr(147,e,t,n):void 0}function $n(){var e=Gi.getStartPos(),t=Qr(),n=Zr(),r=Xn(e,t,n);if(r)return r;var i=Y(37),a=q(),o=se(),s=Y(53);if(i||17===ji||25===ji)return zr(e,t,n,i,o,s);if(a&&(24===ji||16===ji||56===ji)){var c=Q(249,e);c.name=o,c.questionToken=s;var l=Y(56);return l&&(c.equalsToken=l,c.objectAssignmentInitializer=g(Jt)),u(Z(c))}var p=Q(248,e);return p.modifiers=n,p.name=o,p.questionToken=s,z(54),p.initializer=g(Jt),u(Z(p))}function Qn(){var e=Q(168);return z(15),Gi.hasPrecedingLineBreak()&&(e.flags|=1024),e.properties=Ke(12,$n,!0),z(16),Z(e)}function Zn(){var e=k();e&&m(!1);var t=Q(176);at(t,Zr()),z(87),t.asteriskToken=Y(37);var n=!!t.asteriskToken,r=!!(256&t.flags);return t.name=n&&r?E(er):n?b(er):r?A(er):er(),ct(54,n,r,!1,t),t.body=rr(n,r,!1),e&&m(!0),u(Z(t))}function er(){return q()?re():void 0}function tr(){var e=Q(172);return z(92),e.expression=Cn(),e.typeArguments=W(jn),(e.typeArguments||17===ji)&&(e.arguments=Vn()),Z(e)}function nr(e,t){var n=Q(195);return z(15,t)||e?(n.statements=Ne(1,xr),z(16)):n.statements=Ve(),Z(n)}function rr(e,t,n,r){var i=N();d(e);var a=x();h(t);var o=k();o&&m(!1);var s=nr(n,r);return o&&m(!0),d(i),h(a),s}function ir(){var e=Q(197);return z(23),Z(e)}function ar(){var e=Q(199);return z(88),z(17),e.expression=g(Ht),z(18),e.thenStatement=xr(),e.elseStatement=H(80)?xr():void 0,Z(e)}function or(){var e=Q(200);return z(79),e.statement=xr(),z(104),z(17),e.expression=g(Ht),z(18),H(23),Z(e)}function sr(){var e=Q(201);return z(104),z(17),e.expression=g(Ht),z(18),e.statement=xr(),Z(e)}function ur(){var e=M();z(86),z(17);var t=void 0;23!==ji&&(t=102===ji||108===ji||74===ji?Kr(!0):v(Ht));var n;if(H(90)){var r=Q(203,e);r.initializer=t,r.expression=g(Ht),z(18),n=r}else if(H(135)){var i=Q(204,e);i.initializer=t,i.expression=g(Jt),z(18),n=i}else{var a=Q(202,e);a.initializer=t,z(23),23!==ji&&18!==ji&&(a.condition=g(Ht)),z(23),18!==ji&&(a.incrementor=g(Ht)),z(18),n=a}return n.statement=xr(),Z(n)}function cr(e){var t=Q(e);return z(206===e?70:75),X()||(t.label=re()),$(),Z(t)}function lr(){var e=Q(207);return z(94),X()||(e.expression=g(Ht)),$(),Z(e)}function pr(){var e=Q(208);return z(105),z(17),e.expression=g(Ht),z(18),e.statement=xr(),Z(e)}function fr(){var e=Q(244);return z(71),e.expression=g(Ht),z(54),e.statements=Ne(3,xr),Z(e)}function dr(){var e=Q(245);return z(77),z(54),e.statements=Ne(3,xr),Z(e)}function mr(){return 71===ji?fr():dr()}function hr(){var e=Q(209);z(96),z(17),e.expression=g(Ht),z(18);var t=Q(223,Gi.getStartPos());return z(15),t.clauses=Ne(2,mr),z(16),e.caseBlock=Z(t),Z(e)}function yr(){var e=Q(211);return z(98),e.expression=Gi.hasPrecedingLineBreak()?void 0:g(Ht),$(),Z(e)}function _r(){var e=Q(212);return z(100),e.tryBlock=nr(!1),e.catchClause=72===ji?gr():void 0,e.catchClause&&85!==ji||(z(85),e.finallyBlock=nr(!1)),Z(e)}function gr(){var e=Q(247);return z(72),z(17)&&(e.variableDeclaration=Br()),z(18),e.block=nr(!1),Z(e)}function vr(){var e=Q(213);return z(76),$(),Z(e)}function br(){var e=Gi.getStartPos(),t=g(Ht);if(69===t.kind&&H(54)){var n=Q(210,e);return n.label=t,n.statement=xr(),u(Z(n))}var r=Q(198,e);return r.expression=t,$(),u(Z(r))}function Sr(){return L(),e.tokenIsIdentifierOrKeyword(ji)&&!Gi.hasPrecedingLineBreak()}function Ar(){return L(),87===ji&&!Gi.hasPrecedingLineBreak()}function Tr(){return L(),(e.tokenIsIdentifierOrKeyword(ji)||8===ji)&&!Gi.hasPrecedingLineBreak()}function Er(){for(;;)switch(ji){case 102:case 108:case 74:case 87:case 73:case 81:return!0;case 107:case 132:return Xt();case 125:case 126:return Ir();case 115:case 118:case 122:case 110:case 111:case 112:if(L(),Gi.hasPrecedingLineBreak())return!1;continue;case 134:return 15===L();case 89:return L(),9===ji||37===ji||15===ji||e.tokenIsIdentifierOrKeyword(ji);case 82:if(L(),56===ji||37===ji||15===ji||77===ji)return!0;continue;case 113:L();continue;default:return!1}}function Cr(){return j(Er)}function Nr(){switch(ji){case 55:case 23:case 15:case 102:case 108:case 87:case 73:case 81:case 88:case 79:case 104:case 86:case 75:case 70:case 94:case 105:case 96:case 98:case 100:case 76:case 72:case 85:return!0;case 74:case 82:case 89:return Cr();case 118:case 122:case 107:case 125:case 126:case 132:case 134:return!0;case 112:case 110:case 111:case 113:return Cr()||!j(Sr);default:return qt()}}function wr(){return L(),q()||15===ji||19===ji}function kr(){return j(wr)}function xr(){switch(ji){case 23:return ir();case 15:return nr(!1);case 102:return jr(Gi.getStartPos(),void 0,void 0);case 108:if(kr())return jr(Gi.getStartPos(),void 0,void 0);break;case 87:return Wr(Gi.getStartPos(),void 0,void 0);case 73:return ri(Gi.getStartPos(),void 0,void 0);case 88:return ar();case 79:return or();case 104:return sr();case 86:return ur();case 75:return cr(205);case 70:return cr(206);case 94:return lr();case 105:return pr();case 96:return hr();case 98:return yr();case 100:case 72:case 85:return _r();case 76:return vr();case 55:return Rr();case 118:case 107:case 132:case 125:case 126:case 122:case 74:case 81:case 82:case 89:case 110:case 111:case 112:case 115:case 113:case 134:if(Cr())return Rr()}return br()}function Rr(){var t=M(),n=Qr(),r=Zr();switch(ji){case 102:case 108:case 74:return jr(t,n,r);case 87:return Wr(t,n,r);case 73:return ri(t,n,r);case 107:return fi(t,n,r);case 132:return di(t,n,r);case 81:return hi(t,n,r);case 134:case 125:case 126:return vi(t,n,r);case 89:return Ti(t,n,r);case 82:return L(),77===ji||56===ji?Pi(t,n,r):Mi(t,n,r);default:if(n||r){var i=ee(234,!0,e.Diagnostics.Declaration_expected);return i.pos=t,i.decorators=n,at(i,r),Z(i)}}}function Ir(){return L(),!Gi.hasPrecedingLineBreak()&&(q()||9===ji)}function Dr(e,t,n){return 15!==ji&&X()?void $():rr(e,t,!1,n)}function Mr(){if(24===ji)return Q(190);var e=Q(166);return e.dotDotDotToken=Y(22),e.name=Fr(),e.initializer=st(!1),Z(e)}function Pr(){var e=Q(166),t=q(),n=se();return t&&54!==ji?e.name=n:(z(54),e.propertyName=n,e.name=Fr()),e.initializer=st(!1),Z(e)}function Lr(){var e=Q(164);return z(15),e.elements=Ke(9,Pr),z(16),Z(e)}function Or(){var e=Q(165);return z(19),e.elements=Ke(10,Mr),z(20),Z(e)}function Ur(){return 15===ji||19===ji||q()}function Fr(){return 19===ji?Or():15===ji?Lr():re()}function Br(){var e=Q(214);return e.name=Fr(),e.type=jt(),un(ji)||(e.initializer=Yt(!1)),Z(e)}function Kr(t){var n=Q(215);switch(ji){case 102:break;case 108:n.flags|=8192;break;case 74:n.flags|=16384;break;default:e.Debug.fail()}if(L(),135===ji&&j(Vr))n.declarations=Ve();else{var r=w();f(t),n.declarations=Ke(8,Br),f(r)}return Z(n)}function Vr(){return ve()&&18===L()}function jr(e,t,n){var r=Q(196,e);return r.decorators=t,at(r,n),r.declarationList=Kr(!1),$(),u(Z(r))}function Wr(t,n,r){var i=Q(216,t);i.decorators=n,at(i,r),z(87),i.asteriskToken=Y(37),i.name=512&i.flags?er():re();var a=!!i.asteriskToken,o=!!(256&i.flags);return ct(54,a,o,!1,i),i.body=Dr(a,o,e.Diagnostics.or_expected),u(Z(i))}function qr(t,n,r){var i=Q(145,t);return i.decorators=n,at(i,r),z(121),ct(54,!1,!1,!1,i),i.body=Dr(!1,!1,e.Diagnostics.or_expected),u(Z(i))}function zr(e,t,n,r,i,a,o){var s=Q(144,e);s.decorators=t,at(s,n),s.asteriskToken=r,s.name=i,s.questionToken=a;var c=!!r,l=!!(256&s.flags);return ct(54,c,l,!1,s),s.body=Dr(c,l,o),u(Z(s))}function Hr(e,t,n,r,i){var a=Q(142,e);return a.decorators=t,at(a,n),a.name=r,a.questionToken=i,a.type=jt(),a.initializer=n&&64&n.flags?g(Jr):y(3,Jr),$(),Z(a)}function Yr(t,n,r){var i=Y(37),a=se(),o=Y(53);return i||17===ji||25===ji?zr(t,n,r,i,a,o,e.Diagnostics.or_expected):Hr(t,n,r,a,o)}function Jr(){return Yt(!1)}function Gr(e,t,n,r){var i=Q(e,t);return i.decorators=n,at(i,r),i.name=se(),ct(54,!1,!1,!1,i),i.body=Dr(!1,!1),Z(i)}function Xr(e){switch(e){case 112:case 110:case 111:case 113:return!0;default:return!1}}function $r(){var t;if(55===ji)return!0;for(;e.isModifierKind(ji);){if(t=ji,Xr(t))return!0;L()}if(37===ji)return!0;if(ae()&&(t=ji,L()),19===ji)return!0;if(void 0!==t){if(!e.isKeyword(t)||129===t||123===t)return!0;switch(ji){case 17:case 25:case 54:case 56:case 53:return!0;default:return X()}}return!1}function Qr(){for(var e;;){var t=M();if(!H(55))break;e||(e=[],e.pos=t);var n=Q(140,t);n.expression=S(En),e.push(Z(n))}return e&&(e.end=P()),e}function Zr(t){for(var n,r=0;;){var i=Gi.getStartPos(),a=ji;if(74===ji&&t){if(!W(fe))break}else if(!me())break;n||(n=[],n.pos=i),r|=e.modifierToFlag(a),n.push(Z(Q(a,i)))}return n&&(n.flags=r,n.end=Gi.getStartPos()),n}function ei(){var t,n=0;if(118===ji){var r=Gi.getStartPos(),i=ji;L(),t=[],t.pos=r,n|=e.modifierToFlag(i),t.push(Z(Q(i,r))),t.flags=n,t.end=Gi.getStartPos()}return t}function ti(){if(23===ji){var t=Q(194);return L(),Z(t)}var n=M(),r=Qr(),i=Zr(!0),a=Xn(n,r,i);if(a)return a;if(121===ji)return qr(n,r,i);if(dt())return ht(n,r,i);if(e.tokenIsIdentifierOrKeyword(ji)||9===ji||8===ji||37===ji||19===ji)return Yr(n,r,i);if(r||i){return Hr(n,r,i,ee(69,!0,e.Diagnostics.Declaration_expected),void 0)}e.Debug.fail(\"Should not have attempted to parse class member declaration.\")}function ni(){return ii(Gi.getStartPos(),void 0,void 0,189)}function ri(e,t,n){return ii(e,t,n,217)}function ii(e,t,n,r){var i=Q(r,e);return i.decorators=t,at(i,n),z(73),i.name=ai(),i.typeParameters=nt(),i.heritageClauses=si(!0),z(15)?(i.members=pi(),z(16)):i.members=Ve(),Z(i)}function ai(){return q()&&!oi()?re():void 0}function oi(){return 106===ji&&j(be)}function si(e){if(li())return Ne(20,ui)}function ui(){if(83===ji||106===ji){var e=Q(246);return e.token=ji,L(),e.types=Ke(7,ci),Z(e)}}function ci(){var e=Q(191);return e.expression=En(),25===ji&&(e.typeArguments=je(18,Kt,25,27)),Z(e)}function li(){return 83===ji||106===ji}function pi(){return Ne(5,ti)}function fi(e,t,n){var r=Q(218,e);return r.decorators=t,at(r,n),z(107),r.name=re(),r.typeParameters=nt(),r.heritageClauses=si(!1),r.members=Et(),Z(r)}function di(e,t,n){var r=Q(219,e);return r.decorators=t,at(r,n),z(132),r.name=re(),r.typeParameters=nt(),z(56),r.type=Kt(),$(),Z(r)}function mi(){var e=Q(250,Gi.getStartPos());return e.name=se(),e.initializer=g(Jr),Z(e)}function hi(e,t,n){var r=Q(220,e);return r.decorators=t,at(r,n),z(81),r.name=re(),z(15)?(r.members=Ke(6,mi),z(16)):r.members=Ve(),Z(r)}function yi(){var e=Q(222,Gi.getStartPos());return z(15)?(e.statements=Ne(1,xr),z(16)):e.statements=Ve(),Z(e)}function _i(e,t,n,r){var i=Q(221,e),a=65536&r;return i.decorators=t,at(i,n),i.flags|=r,i.name=re(),i.body=H(21)?_i(M(),void 0,void 0,2|a):yi(),Z(i)}function gi(e,t,n){var r=Q(221,e);return r.decorators=t,at(r,n),134===ji?(r.name=re(),r.flags|=2097152):r.name=Je(!0),r.body=yi(),Z(r)}function vi(e,t,n){var r=n?n.flags:0;if(134===ji)return gi(e,t,n);if(H(126))r|=65536;else if(z(125),9===ji)return gi(e,t,n);return _i(e,t,n,r)}function bi(){return 127===ji&&j(Si)}function Si(){return 17===L()}function Ai(){return 39===L()}function Ti(e,t,n){z(89);var r,i=Gi.getStartPos();if(q()&&(r=re(),24!==ji&&133!==ji)){var a=Q(224,e);return a.decorators=t,at(a,n),a.name=r,z(56),a.moduleReference=Ci(),$(),Z(a)}var o=Q(225,e);return o.decorators=t,at(o,n),(r||37===ji||15===ji)&&(o.importClause=Ei(r,i),z(133)),o.moduleSpecifier=wi(),$(),Z(o)}function Ei(e,t){var n=Q(226,t);return e&&(n.name=e),n.name&&!H(24)||(n.namedBindings=37===ji?ki():xi(228)),Z(n)}function Ci(){return bi()?Ni():We(!1)}function Ni(){var e=Q(235);return z(127),z(17),e.expression=wi(),z(18),Z(e)}function wi(){if(9===ji){var e=Je();return te(e.text),e}return Ht()}function ki(){var e=Q(227);return z(37),z(116),e.name=re(),Z(e)}function xi(e){var t=Q(e);return t.elements=je(21,228===e?Ii:Ri,15,16),Z(t)}function Ri(){return Di(233)}function Ii(){return Di(229)}function Di(t){var n=Q(t),r=e.isKeyword(ji)&&!q(),i=Gi.getTokenPos(),a=Gi.getTextPos(),o=ie();return 116===ji?(n.propertyName=o,z(116),r=e.isKeyword(ji)&&!q(),i=Gi.getTokenPos(),a=Gi.getTextPos(),n.name=ie()):n.name=o,229===t&&r&&I(i,a-i,e.Diagnostics.Identifier_expected),Z(n)}function Mi(e,t,n){var r=Q(231,e);return r.decorators=t,at(r,n),H(37)?(z(133),r.moduleSpecifier=wi()):(r.exportClause=xi(232),(133===ji||9===ji&&!Gi.hasPrecedingLineBreak())&&(z(133),r.moduleSpecifier=wi())),$(),Z(r)}function Pi(e,t,n){var r=Q(230,e);return r.decorators=t,at(r,n),H(56)?r.isExportEquals=!0:z(77),r.expression=Jt(),$(),Z(r)}function Li(t){for(var n,r=e.createScanner(t.languageVersion,!1,0,Wi),i=[],a=[];;){var o=r.scan();if(2!==o){if(e.isTrivia(o))continue;break}var s={pos:r.getTokenPos(),end:r.getTextPos(),kind:r.getToken()},u=Wi.substring(s.pos,s.end),c=e.getFileReferenceFromReferencePath(u,s);if(c){var l=c.fileReference;t.hasNoDefaultLib=c.isNoDefaultLib;var p=c.diagnosticMessage;l&&i.push(l),p&&Ki.push(e.createFileDiagnostic(t,s.pos,s.end-s.pos,p))}else{var f=/^\\/\\/\\/\\s*<amd-module\\s+name\\s*=\\s*('|\")(.+?)\\1/gim,d=f.exec(u);d&&(n&&Ki.push(e.createFileDiagnostic(t,s.pos,s.end-s.pos,e.Diagnostics.An_AMD_module_cannot_have_multiple_name_assignments)),n=d[2]);var m=/^\\/\\/\\/\\s*<amd-dependency\\s/gim,h=/\\spath\\s*=\\s*('|\")(.+?)\\1/gim,y=/\\sname\\s*=\\s*('|\")(.+?)\\1/gim;if(m.exec(u)){var _=h.exec(u),g=y.exec(u);if(_){var v={path:_[2],name:g?g[2]:void 0};a.push(v)}}}}t.referencedFiles=i,t.amdDependencies=a,t.moduleName=n}function Oi(t){t.externalModuleIndicator=e.forEach(t.statements,function(e){return 2&e.flags||224===e.kind&&235===e.moduleReference.kind||225===e.kind||230===e.kind||231===e.kind?e:void 0})}var Ui,Fi,Bi,Ki,Vi,ji,Wi,qi,zi,Hi,Yi,Ji,Gi=e.createScanner(2,!0),Xi=5,$i=!1;t.parseSourceFile=n,t.fixupParentReferences=c;var Qi;!function(e){e[e.SourceElements=0]=\"SourceElements\",e[e.BlockStatements=1]=\"BlockStatements\",e[e.SwitchClauses=2]=\"SwitchClauses\",e[e.SwitchClauseStatements=3]=\"SwitchClauseStatements\",e[e.TypeMembers=4]=\"TypeMembers\",e[e.ClassMembers=5]=\"ClassMembers\",e[e.EnumMembers=6]=\"EnumMembers\",e[e.HeritageClauseElement=7]=\"HeritageClauseElement\",e[e.VariableDeclarations=8]=\"VariableDeclarations\",e[e.ObjectBindingElements=9]=\"ObjectBindingElements\",e[e.ArrayBindingElements=10]=\"ArrayBindingElements\",e[e.ArgumentExpressions=11]=\"ArgumentExpressions\",e[e.ObjectLiteralMembers=12]=\"ObjectLiteralMembers\",e[e.JsxAttributes=13]=\"JsxAttributes\",e[e.JsxChildren=14]=\"JsxChildren\",e[e.ArrayLiteralMembers=15]=\"ArrayLiteralMembers\",e[e.Parameters=16]=\"Parameters\",e[e.TypeParameters=17]=\"TypeParameters\",e[e.TypeArguments=18]=\"TypeArguments\",e[e.TupleElementTypes=19]=\"TupleElementTypes\",e[e.HeritageClauses=20]=\"HeritageClauses\",e[e.ImportOrExportSpecifiers=21]=\"ImportOrExportSpecifiers\",e[e.JSDocFunctionParameters=22]=\"JSDocFunctionParameters\",e[e.JSDocTypeArguments=23]=\"JSDocTypeArguments\",e[e.JSDocRecordMembers=24]=\"JSDocRecordMembers\",e[e.JSDocTupleTypes=25]=\"JSDocTupleTypes\",e[e.Count=26]=\"Count\"}(Qi||(Qi={}));var Zi;!function(e){e[e.False=0]=\"False\",e[e.True=1]=\"True\",e[e.Unknown=2]=\"Unknown\"}(Zi||(Zi={}));var ea;!function(t){function n(){switch(ji){case 37:case 53:case 17:case 19:case 49:case 15:case 87:case 22:case 92:case 97:return!0}return e.tokenIsIdentifierOrKeyword(ji)}function r(e,t,n){i(\"file.js\",e,2,!0,void 0),Gi.setText(e,t,n),ji=Gi.scan();var r=a(),s=Ki;return o(),r?{jsDocTypeExpression:r,diagnostics:s}:void 0}function a(){var e=Q(252,Gi.getTokenPos());return z(15),e.type=s(),z(16),c(e),Z(e)}function s(){var e=u();if(47===ji){var t=Q(256,e.pos);t.types=N(e),e=Z(t)}if(56===ji){var n=Q(263,e.pos);L(),n.type=e,e=Z(n)}return e}function u(){for(var e=l();;)if(19===ji){var t=Q(255,e.pos);t.elementType=e,L(),z(20),e=Z(t)}else if(53===ji){var n=Q(258,e.pos);n.type=e,L(),e=Z(n)}else{if(49!==ji)break;var r=Q(259,e.pos);r.type=e,L(),e=Z(r)}return e}function l(){switch(ji){case 37:return w();case 53:return k();case 17:return C();case 19:return T();case 49:return A();case 15:return b();case 87:return m();case 22:return d();case 92:return f();case 97:return p();case 117:case 130:case 128:case 120:case 131:case 103:return G()}return y()}function p(){var e=Q(267);return L(),z(54),e.type=u(),Z(e)}function f(){var e=Q(266);return L(),z(54),e.type=u(),Z(e)}function d(){var e=Q(265);return L(),e.type=u(),Z(e)}function m(){var e=Q(264);return L(),z(17),e.parameters=Ke(22,h),E(e.parameters),z(18),54===ji&&(L(),e.type=u()),Z(e)}function h(){var e=Q(139);return e.type=u(),H(56)&&(e.questionToken=Q(56)),Z(e)}function y(){var e=Q(262);if(e.name=ue(),25===ji)e.typeArguments=_();else for(;H(21);){if(25===ji){e.typeArguments=_();break}e.name=v(e.name)}return Z(e)}function _(){L();var e=Ke(23,u);return E(e),g(e),z(27),e}function g(t){if(0===Ki.length&&t&&0===t.length){var n=t.pos-\"<\".length;return I(n,e.skipTrivia(Wi,t.end)+\">\".length-n,e.Diagnostics.Type_argument_list_cannot_be_empty)}}function v(e){var t=Q(136,e.pos);return t.left=e,t.right=ie(),Z(t)}function b(){var e=Q(260);return L(),e.members=Ke(24,S),E(e.members),z(16),Z(e)}function S(){var e=Q(261);return e.name=ue(),54===ji&&(L(),e.type=u()),Z(e)}function A(){var e=Q(259);return L(),e.type=u(),Z(e)}function T(){var e=Q(257);return L(),e.types=Ke(25,u),E(e.types),z(20),Z(e)}function E(t){if(0===Ki.length&&t.hasTrailingComma){I(t.end-\",\".length,\",\".length,e.Diagnostics.Trailing_comma_not_allowed)}}function C(){var e=Q(256);return L(),e.types=N(u()),z(18),Z(e)}function N(t){e.Debug.assert(!!t);var n=[];for(n.pos=t.pos,n.push(t);H(47);)n.push(u());return n.end=Gi.getStartPos(),n}function w(){var e=Q(253);return L(),Z(e)}function k(){var e=Gi.getStartPos();if(L(),24===ji||16===ji||18===ji||27===ji||56===ji||47===ji){var t=Q(254,e);return Z(t)}var t=Q(258,e);return t.type=u(),Z(t)}function x(e,t,n){i(\"file.js\",e,2,!0,void 0),Bi={languageVariant:0,text:e};var r=M(t,n),a=Ki;return o(),r?{jsDocComment:r,diagnostics:a}:void 0}function D(e,t,n){var r=ji,i=Ki.length,a=$i,o=M(t,n);return o&&(o.parent=e),ji=r,Ki.length=i,$i=a,o}function M(t,n){function r(){if(v){var e=Q(268,t);return e.tags=v,Z(e,g)}}function i(){for(;5===ji||4===ji;)h()}function o(){e.Debug.assert(55===ji);var t=Q(55,Gi.getTokenPos());t.end=Gi.getTextPos(),h();var n=y();if(n){c(s(t,n)||u(t,n))}}function s(e,t){if(t)switch(t.text){case\"param\":return p(e,t);case\"return\":case\"returns\":return f(e,t);case\"template\":return m(e,t);case\"type\":return d(e,t)}}function u(e,t){var n=Q(269,e.pos);return n.atToken=e,n.tagName=t,Z(n)}function c(e){e&&(v||(v=[],v.pos=e.pos),v.push(e),v.end=e.end)}function l(){if(15===ji){return a()}}function p(t,n){var r=l();i();var a,o;if(Y(19)?(a=y(),o=!0,Y(56)&&Ht(),z(20)):69===ji&&(a=y()),!a)return void I(Gi.getStartPos(),0,e.Diagnostics.Identifier_expected);var s,u;r?u=a:s=a,r||(r=l());var c=Q(270,t.pos);return c.atToken=t,c.tagName=n,c.preParameterName=s,c.typeExpression=r,c.postParameterName=u,c.isBracketed=o,Z(c)}function f(t,n){e.forEach(v,function(e){return 271===e.kind})&&I(n.pos,Gi.getTokenPos()-n.pos,e.Diagnostics._0_tag_already_specified,n.text);var r=Q(271,t.pos);return r.atToken=t,r.tagName=n,r.typeExpression=l(),Z(r)}function d(t,n){e.forEach(v,function(e){return 272===e.kind})&&I(n.pos,Gi.getTokenPos()-n.pos,e.Diagnostics._0_tag_already_specified,n.text);var r=Q(272,t.pos);return r.atToken=t,r.tagName=n,r.typeExpression=l(),Z(r)}function m(t,n){e.forEach(v,function(e){return 273===e.kind})&&I(n.pos,Gi.getTokenPos()-n.pos,e.Diagnostics._0_tag_already_specified,n.text);var r=[];for(r.pos=Gi.getStartPos();;){var i=y();if(!i)return void I(Gi.getStartPos(),0,e.Diagnostics.Identifier_expected);var a=Q(138,i.pos);if(a.name=i,Z(a),r.push(a),24!==ji)break;h()}var o=Q(273,t.pos);return o.atToken=t,o.tagName=n,o.typeParameters=r,Z(o),r.end=o.end,o}function h(){return ji=Gi.scanJSDocToken()}function y(){if(69!==ji)return void R(e.Diagnostics.Identifier_expected);var t=Gi.getTokenPos(),n=Gi.getTextPos(),r=Q(69,t);return r.text=_.substring(t,n),Z(r,n),h(),r}var _=Wi;t=t||0;var g=void 0===n?_.length:t+n;n=g-t,e.Debug.assert(t>=0),e.Debug.assert(t<=g),e.Debug.assert(g<=_.length);var v,b;return 47===_.charCodeAt(t)&&42===_.charCodeAt(t+1)&&42===_.charCodeAt(t+2)&&42!==_.charCodeAt(t+3)&&Gi.scanRange(t+3,n-5,function(){var e=!0,t=!0;for(h();1!==ji;){switch(ji){case 55:e&&o(),t=!1;break;case 4:e=!0,t=!1;break;case 37:t&&(e=!1),t=!0;break;case 69:e=!1;break;case 1:}h()}b=r()}),b}t.isJSDocType=n,t.parseJSDocTypeExpressionForTests=r,t.parseJSDocTypeExpression=a,t.parseIsolatedJSDocComment=x,t.parseJSDocComment=D,t.parseJSDocCommentWorker=M}(ea=t.JSDocParser||(t.JSDocParser={}))}(f||(f={}));var d;!function(t){function n(t,n,r,i){if(i=i||e.Debug.shouldAssert(2),p(t,n,r,i),e.textChangeRangeIsUnchanged(r))return t;if(0===t.statements.length)return f.parseSourceFile(t.fileName,n,t.languageVersion,void 0,!0);var a=t;e.Debug.assert(!a.hasBeenIncrementallyParsed),a.hasBeenIncrementallyParsed=!0;var o=t.text,s=d(t),l=c(t,r);p(t,n,l,i),e.Debug.assert(l.span.start<=r.span.start),e.Debug.assert(e.textSpanEnd(l.span)===e.textSpanEnd(r.span)),e.Debug.assert(e.textSpanEnd(e.textChangeRangeNewSpan(l))===e.textSpanEnd(e.textChangeRangeNewSpan(r)));var m=e.textChangeRangeNewSpan(l).length-l.span.length;return u(a,l.span.start,e.textSpanEnd(l.span),e.textSpanEnd(e.textChangeRangeNewSpan(l)),m,o,n,i),f.parseSourceFile(t.fileName,n,t.languageVersion,s,!0)}function r(t,n,r,o,u,c){function l(t){var n=\"\";c&&i(t)&&(n=o.substring(t.pos,t.end)),t._children&&(t._children=void 0),t.jsDocComment&&(t.jsDocComment=void 0),t.pos+=r,t.end+=r,c&&i(t)&&e.Debug.assert(n===u.substring(t.pos,t.end)),a(t,l,p),s(t,c)}function p(e){e._children=void 0,e.pos+=r,e.end+=r;for(var t=0,n=e;t<n.length;t++){l(n[t])}}n?p(t):l(t)}function i(e){switch(e.kind){case 9:case 8:case 69:return!0}return!1}function o(t,n,r,i,a){e.Debug.assert(t.end>=n,\"Adjusting an element that was entirely before the change range\"),e.Debug.assert(t.pos<=r,\"Adjusting an element that was entirely after the change range\"),e.Debug.assert(t.pos<=t.end),t.pos=Math.min(t.pos,i),t.end>=r?t.end+=a:t.end=Math.min(t.end,i),e.Debug.assert(t.pos<=t.end),t.parent&&(e.Debug.assert(t.pos>=t.parent.pos),e.Debug.assert(t.end<=t.parent.end))}function s(t,n){if(n){var r=t.pos;a(t,function(t){e.Debug.assert(t.pos>=r),r=t.end}),e.Debug.assert(r<=t.end)}}function u(t,n,i,u,c,l,p,f){function d(t){if(e.Debug.assert(t.pos<=t.end),t.pos>i)return void r(t,!1,c,l,p,f);var h=t.end;if(h>=n)return t.intersectsChange=!0,t._children=void 0,o(t,n,i,u,c),a(t,d,m),void s(t,f);e.Debug.assert(h<n)}function m(t){if(e.Debug.assert(t.pos<=t.end),t.pos>i)return void r(t,!0,c,l,p,f);var a=t.end;if(a>=n){t.intersectsChange=!0,t._children=void 0,o(t,n,i,u,c);for(var s=0,m=t;s<m.length;s++){d(m[s])}}else e.Debug.assert(a<n)}d(t)}function c(t,n){for(var r=n.span.start,i=0;r>0&&i<=1;i++){var a=l(t,r);e.Debug.assert(a.pos<=r);var o=a.pos;r=Math.max(0,o-1)}var s=e.createTextSpanFromBounds(r,e.textSpanEnd(n.span)),u=n.newLength+(n.span.start-r);return e.createTextChangeRange(s,u)}function l(t,n){function r(t){var n=void 0;return a(t,function(t){e.nodeIsPresent(t)&&(n=t)}),n}function i(t){if(!e.nodeIsMissing(t))return t.pos<=n?(t.pos>=s.pos&&(s=t),n<t.end?(a(t,i),!0):(e.Debug.assert(t.end<=n),void(o=t))):(e.Debug.assert(t.pos>n),!0)}var o,s=t;if(a(t,i),o){var u=function(e){for(;;){var t=r(e);if(!t)return e;e=t}}(o);u.pos>s.pos&&(s=u)}return s}function p(t,n,r,i){var a=t.text;if(r&&(e.Debug.assert(a.length-r.span.length+r.newLength===n.length),i||e.Debug.shouldAssert(3))){var o=a.substr(0,r.span.start),s=n.substr(0,r.span.start);e.Debug.assert(o===s);var u=a.substring(e.textSpanEnd(r.span),a.length),c=n.substring(e.textSpanEnd(e.textChangeRangeNewSpan(r)),n.length);e.Debug.assert(u===c)}}function d(t){function n(e){function n(t){return e>=t.pos&&e<t.end&&(a(t,n,s),!0)}function s(t){if(e>=t.pos&&e<t.end)for(var u=0,c=t.length;u<c;u++){var l=t[u];if(l){if(l.pos===e)return r=t,i=u,o=l,!0;if(l.pos<e&&e<l.end)return a(l,n,s),!0}}return!1}r=void 0,i=-1,o=void 0,a(t,n,s)}var r=t.statements,i=0;e.Debug.assert(i<r.length);var o=r[i],s=-1;return{currentNode:function(t){return t!==s&&(o&&o.end===t&&i<r.length-1&&(i++,o=r[i]),o&&o.pos===t||n(t)),s=t,e.Debug.assert(!o||o.pos===t),o}}}t.updateSourceFile=n;var m;!function(e){e[e.Value=-1]=\"Value\"}(m||(m={}))}(d||(d={}))}(o||(o={}));var o;!function(e){function t(e,t){return 2&(e|t)?2:e&t&8?8:4}function n(t){if(218===t.kind||219===t.kind)return 0;if(e.isConstEnumDeclaration(t))return 2;if(225!==t.kind&&224!==t.kind||2&t.flags){if(222===t.kind){var r=0;return e.forEachChild(t,function(e){switch(n(e)){case 0:return!1;case 2:return r=2,!1;case 1:return r=1,!0}}),r}return 221===t.kind?n(t.body):1}return 0}function r(t,n){var r=(new Date).getTime();o(t,n),e.bindTime+=(new Date).getTime()-r}e.bindTime=0,function(e){e[e.NonInstantiated=0]=\"NonInstantiated\",e[e.Instantiated=1]=\"Instantiated\",e[e.ConstEnumOnly=2]=\"ConstEnumOnly\"}(e.ModuleInstanceState||(e.ModuleInstanceState={}));var i;e.ModuleInstanceState;!function(e){e[e.Unintialized=1]=\"Unintialized\",e[e.Reachable=2]=\"Reachable\",e[e.Unreachable=4]=\"Unreachable\",e[e.ReportedUnreachable=8]=\"ReportedUnreachable\"}(i||(i={})),e.getModuleInstanceState=n;var a;!function(e){e[e.None=0]=\"None\",e[e.IsContainer=1]=\"IsContainer\",e[e.IsBlockScopedContainer=2]=\"IsBlockScopedContainer\",e[e.HasLocals=4]=\"HasLocals\",e[e.IsContainerWithLocals=5]=\"IsContainerWithLocals\"}(a||(a={}));var o=function(){function r(t,n){Re=t,Ie=n,He=!!Re.externalModuleIndicator,Je={},Ye=e.objectAllocator.getSymbolConstructor(),Re.locals||(Q(Re),Re.symbolCount=Ge,Re.classifiableNames=Je),Re=void 0,Ie=void 0,De=void 0,Me=void 0,Pe=void 0,Le=void 0,Oe=!1,Ue=!1,Be=void 0,Ke=void 0,Ve=void 0,je=!1,We=!1,qe=!1,ze=!1}function i(e,t){return Ge++,new Ye(e,t)}function a(e,t,n){if(e.flags|=n,t.symbol=e,e.declarations||(e.declarations=[]),e.declarations.push(t),1952&n&&!e.exports&&(e.exports={}),6240&n&&!e.members&&(e.members={}),107455&n){var r=e.valueDeclaration;(!r||r.kind!==t.kind&&221===r.kind)&&(e.valueDeclaration=t)}}function o(t){if(t.name){if(e.isAmbientModule(t))return e.isGlobalScopeAugmentation(t)?\"__global\":'\"'+t.name.text+'\"';if(137===t.name.kind){var n=t.name.expression;return e.isStringOrNumericLiteral(n.kind)?n.text:(e.Debug.assert(e.isWellKnownSymbolSyntactically(n)),e.getPropertyNameForKnownSymbolName(n.name.text))}return t.name.text}switch(t.kind){case 145:return\"__constructor\";case 153:case 148:return\"__call\";case 154:case 149:return\"__new\";case 150:return\"__index\";case 231:return\"__export\";case 230:return t.isExportEquals?\"export=\":\"default\";case 184:switch(e.getSpecialPropertyAssignmentKind(t)){case 2:return\"export=\";case 1:case 4:return t.left.name.text;case 3:return t.left.expression.name.text}e.Debug.fail(\"Unknown binary declaration kind\");break;case 216:case 217:return 512&t.flags?\"default\":void 0;case 264:return e.isJSDocConstructSignature(t)?\"__new\":\"__call\";case 139:e.Debug.assert(264===t.parent.kind);var r=t.parent;return\"p\"+e.indexOf(r.parameters,t)}}function s(t){return t.name?e.declarationNameToString(t.name):o(t)}function u(t,n,r,u,c){e.Debug.assert(!e.hasDynamicName(r));var l,p=512&r.flags,f=p&&n?\"default\":o(r);if(void 0!==f){if(l=e.hasProperty(t,f)?t[f]:t[f]=i(0,f),f&&788448&u&&(Je[f]=f),l.flags&c){r.name&&(r.name.parent=r);var d=2&l.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0;e.forEach(l.declarations,function(t){512&t.flags&&(d=e.Diagnostics.A_module_cannot_have_multiple_default_exports)}),e.forEach(l.declarations,function(t){Re.bindDiagnostics.push(e.createDiagnosticForNode(t.name||t,d,s(t)))}),Re.bindDiagnostics.push(e.createDiagnosticForNode(r.name||r,d,s(r))),l=i(0,f)}}else l=i(0,\"__missing\");return a(l,r,u),l.parent=n,l}function c(t,n,r){var i=2&e.getCombinedNodeFlags(t);if(8388608&n)return 233===t.kind||224===t.kind&&i?u(Me.symbol.exports,Me.symbol,t,n,r):u(Me.locals,void 0,t,n,r);if(!e.isAmbientModule(t)&&(i||131072&Me.flags)){var a=(107455&n?1048576:0)|(793056&n?2097152:0)|(1536&n?4194304:0),o=u(Me.locals,void 0,t,a,r);return o.exportSymbol=u(Me.symbol.exports,Me.symbol,t,n,r),t.localSymbol=o,o}return u(Me.locals,void 0,t,n,r)}function l(t){var n=De,r=Me,i=Pe;De=t;var a=T(t);1&a?(Me=Pe=t,4&a&&(Me.locals={}),E(Me)):2&a&&(Pe=t,Pe.locals=void 0);var o,s,u,c,l,f=t.kind,d=t.flags;d&=-1572865,d&=-62914561,218===f&&(Oe=!1);var m=251===f||222===f||e.isFunctionLikeKind(f);m&&(o=Fe,s=Be,u=Ke,c=Ve,l=Ue,Fe=2,Ue=!1,Be=Ke=Ve=void 0),e.isInJavaScriptFile(t)&&t.jsDocComment&&Q(t.jsDocComment),p(t),2===Fe&&e.isFunctionLikeKind(f)&&e.nodeIsPresent(t.body)&&(d|=524288,Ue&&(d|=1048576)),218===f&&(d=Oe?262144|d:d&-262145),251===f&&(je&&(d|=4194304),qe&&(d|=8388608),ze&&(d|=16777216),We&&(d|=33554432)),t.flags=d,m&&(Ue=l,Fe=o,Be=s,Ke=u,Ve=c),Me=r,De=n,Pe=i}function p(t){if(ke(t))return void e.forEachChild(t,Q);switch(t.kind){case 201:f(t);break;case 200:d(t);break;case 202:m(t);break;case 203:case 204:h(t);break;case 199:y(t);break;case 207:case 211:_(t);break;case 206:case 205:g(t);break;case 212:v(t);break;case 209:b(t);break;case 223:S(t);break;case 210:A(t);break;default:e.forEachChild(t,Q)}}function f(e){var t=84===e.expression.kind?4:Fe,n=99===e.expression.kind?4:Fe;Q(e.expression),Fe=t;var r=Te();Q(e.statement),Ce(r,n)}function d(e){var t=Fe,n=Te();Q(e.statement),Ce(n,99===e.expression.kind?4:t),Q(e.expression)}function m(e){var t=Fe,n=Te();Q(e.initializer),Q(e.condition),Q(e.incrementor),Q(e.statement),Ce(n,e.condition&&99!==e.condition.kind?t:4)}function h(e){var t=Fe,n=Te();Q(e.initializer),Q(e.expression),Q(e.statement),Ce(n,t)}function y(e){var n=84===e.expression.kind?4:Fe,r=99===e.expression.kind?4:Fe;if(Fe=n,Q(e.expression),Q(e.thenStatement),e.elseStatement){var i=Fe;Fe=r,Q(e.elseStatement),Fe=t(Fe,i)}else Fe=t(Fe,r)}function _(e){Q(e.expression),207===e.kind&&(Ue=!0),Fe=4}function g(e){Q(e.label),we(e.label,206===e.kind?Fe:4)&&(Fe=4)}function v(e){var n=Fe;Q(e.tryBlock);var r=Fe;Fe=n,Q(e.catchClause);var i=Fe;Fe=n,Q(e.finallyBlock),Fe=t(r,i)}function b(t){var n=Fe,r=Te();Q(t.expression),Q(t.caseBlock),Ce(r,e.forEach(t.caseBlock.clauses,function(e){return 245===e.kind})&&2!==Fe?4:n)}function S(t){for(var n=Fe,r=0,i=t.clauses;r<i.length;r++){var a=i[r];Fe=n,Q(a),a.statements.length&&2===Fe&&Ie.noFallthroughCasesInSwitch&&X(a,e.Diagnostics.Fallthrough_case_in_switch)}}function A(e){Q(e.label);var t=Ae(e.label);Q(e.statement),t&&Ee(e.label,Fe)}function T(t){switch(t.kind){case 189:case 217:case 218:case 220:case 168:case 156:case 260:return 1;case 148:case 149:case 150:case 144:case 143:case 216:case 145:case 146:case 147:case 153:case 154:case 176:case 177:case 221:case 251:case 219:return 5;case 247:case 202:case 203:case 204:case 223:return 2;case 195:return e.isFunctionLike(t.parent)?0:2}return 0}function E(e){Le&&(Le.nextContainer=e),Le=e}function C(e,t,n){N(e,t,n)}function N(e,t,n){switch(Me.kind){case 221:return c(e,t,n);case 251:return k(e,t,n);case 189:case 217:return w(e,t,n);case 220:return u(Me.symbol.exports,Me.symbol,e,t,n);case 156:case 168:case 218:case 260:return u(Me.symbol.members,Me.symbol,e,t,n);case 153:case 154:case 148:case 149:case 150:case 144:case 143:case 145:case 146:case 147:case 216:case 176:case 177:case 264:case 219:return u(Me.locals,void 0,e,t,n)}}function w(e,t,n){return 64&e.flags?u(Me.symbol.exports,Me.symbol,e,t,n):u(Me.symbol.members,Me.symbol,e,t,n)}function k(t,n,r){return e.isExternalModule(Re)?c(t,n,r):u(Re.locals,void 0,t,n,r)}function x(e){var t=251===e.kind?e:e.body;if(251===t.kind||222===t.kind)for(var n=0,r=t.statements;n<r.length;n++){var i=r[n];if(231===i.kind||230===i.kind)return!0}return!1}function R(t){e.isInAmbientContext(t)&&!x(t)?t.flags|=131072:t.flags&=-131073}function I(t){if(R(t),e.isAmbientModule(t))2&t.flags&&X(t,e.Diagnostics.export_modifier_cannot_be_applied_to_ambient_modules_and_module_augmentations_since_they_are_always_visible),C(t,512,106639);else{var r=n(t);if(0===r)C(t,1024,0);else if(C(t,512,106639),304&t.symbol.flags)t.symbol.constEnumOnlyModule=!1;else{var i=2===r;void 0===t.symbol.constEnumOnlyModule?t.symbol.constEnumOnlyModule=i:t.symbol.constEnumOnlyModule=t.symbol.constEnumOnlyModule&&i}}}function D(e){var t=i(131072,o(e));a(t,e,131072);var n=i(2048,\"__type\");a(n,e,2048),n.members=(r={},r[t.name]=t,r);var r}function M(t){var n;if(function(e){e[e.Property=1]=\"Property\",e[e.Accessor=2]=\"Accessor\"}(n||(n={})),He)for(var r={},i=0,a=t.properties;i<a.length;i++){var o=a[i];if(69===o.name.kind){var s=o.name,u=248===o.kind||249===o.kind||144===o.kind?1:2,c=r[s.text];if(c){if(1===u&&1===c){var l=e.getErrorSpanForNode(Re,s);Re.bindDiagnostics.push(e.createFileDiagnostic(Re,l.start,l.length,e.Diagnostics.An_object_literal_cannot_have_multiple_properties_with_the_same_name_in_strict_mode))}}else r[s.text]=u}}return P(t,4096,\"__object\")}function P(e,t,n){a(i(t,n),e,t)}function L(t,n,r){switch(Pe.kind){case 221:c(t,n,r);break;case 251:if(e.isExternalModule(Me)){c(t,n,r);break}default:Pe.locals||(Pe.locals={},E(Pe)),u(Pe.locals,void 0,t,n,r)}}function O(e){L(e,2,107455)}function U(t){He&&t.originalKeywordKind>=106&&t.originalKeywordKind<=114&&!e.isIdentifierName(t)&&(Re.parseDiagnostics.length||Re.bindDiagnostics.push(e.createDiagnosticForNode(t,F(t),e.declarationNameToString(t))))}function F(t){return e.getContainingClass(t)?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode:Re.externalModuleIndicator?e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode:e.Diagnostics.Identifier_expected_0_is_a_reserved_word_in_strict_mode}function B(t){He&&e.isLeftHandSideExpression(t.left)&&e.isAssignmentOperator(t.operatorToken.kind)&&W(t,t.left)}function K(e){He&&e.variableDeclaration&&W(e,e.variableDeclaration.name)}function V(t){if(He&&69===t.expression.kind){var n=e.getErrorSpanForNode(Re,t.expression);Re.bindDiagnostics.push(e.createFileDiagnostic(Re,n.start,n.length,e.Diagnostics.delete_cannot_be_called_on_an_identifier_in_strict_mode))}}function j(e){return 69===e.kind&&(\"eval\"===e.text||\"arguments\"===e.text)}function W(t,n){if(n&&69===n.kind){var r=n;if(j(r)){var i=e.getErrorSpanForNode(Re,n);Re.bindDiagnostics.push(e.createFileDiagnostic(Re,i.start,i.length,q(t),r.text))}}}function q(t){return e.getContainingClass(t)?e.Diagnostics.Invalid_use_of_0_Class_definitions_are_automatically_in_strict_mode:Re.externalModuleIndicator?e.Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode:e.Diagnostics.Invalid_use_of_0_in_strict_mode}function z(e){He&&W(e,e.name)}function H(t){He&&32768&t.flags&&Re.bindDiagnostics.push(e.createDiagnosticForNode(t,e.Diagnostics.Octal_literals_are_not_allowed_in_strict_mode))}function Y(e){He&&W(e,e.operand)}function J(e){He&&(41!==e.operator&&42!==e.operator||W(e,e.operand))}function G(t){He&&X(t,e.Diagnostics.with_statements_are_not_allowed_in_strict_mode)}function X(t,n,r,i,a){var o=e.getSpanOfTokenAtPosition(Re,t.pos);Re.bindDiagnostics.push(e.createFileDiagnostic(Re,o.start,o.length,n,r,i,a))}function $(t){return\"__\"+e.indexOf(t.parent.parameters,t)}function Q(e){if(e){e.parent=De;var t=He;t||Z(e),ne(e),l(e),He=t}}function Z(t){switch(t.kind){case 251:case 222:return void ee(t.statements);case 195:return void(e.isFunctionLike(t.parent)&&ee(t.statements));case 217:case 189:return void(He=!0)}}function ee(t){for(var n=0,r=t;n<r.length;n++){var i=r[n];if(!e.isPrologueDirective(i))return;if(te(i))return void(He=!0)}}function te(t){var n=e.getTextOfNodeFromSourceText(Re.text,t.expression);return'\"use strict\"'===n||\"'use strict'\"===n}function ne(t){switch(t.kind){case 69:return U(t);case 184:if(e.isInJavaScriptFile(t)){switch(e.getSpecialPropertyAssignmentKind(t)){case 1:le(t);break;case 2:pe(t);break;case 3:de(t);break;case 4:fe(t);break;case 0:break;default:e.Debug.fail(\"Unknown special property assignment kind\")}}return B(t);case 247:return K(t);case 178:return V(t);case 8:return H(t);case 183:return Y(t);case 182:return J(t);case 208:return G(t);case 162:return void(Oe=!0);case 151:return re(t);case 138:return C(t,262144,530912);case 139:return ge(t);case 214:case 166:return _e(t);case 142:case 141:case 261:return Se(t,4|(t.questionToken?536870912:0),107455);case 248:case 249:return Se(t,4,107455);case 250:return Se(t,8,107455);case 148:case 149:case 150:return C(t,131072,0);case 144:case 143:return Se(t,8192|(t.questionToken?536870912:0),e.isObjectLiteralMethod(t)?107455:99263);case 216:return ve(t);case 145:return C(t,16384,0);case 146:return Se(t,32768,41919);case 147:return Se(t,65536,74687);case 153:case 154:case 264:return D(t);case 156:case 260:return P(t,2048,\"__type\");case 168:return M(t);case 176:case 177:return be(t);case 171:e.isInJavaScriptFile(t)&&me(t);break;case 189:case 217:return he(t);case 218:return L(t,64,792960);case 219:return L(t,524288,793056);case 220:return ye(t);case 221:return I(t);case 224:case 227:case 229:case 233:return C(t,8388608,8388608);case 226:return ue(t);case 231:return se(t);case 230:return oe(t);case 251:return ie()}}function re(e){var t=e.parameterName,n=e.type;t&&69===t.kind&&U(t),t&&162===t.kind&&(Oe=!0),Q(n)}function ie(){R(Re),e.isExternalModule(Re)&&ae()}function ae(){P(Re,512,'\"'+e.removeFileExtension(Re.fileName)+'\"')}function oe(e){var t=230===e.kind?e.expression:e.right;Me.symbol&&Me.symbol.exports?69===t.kind&&230===e.kind?u(Me.symbol.exports,Me.symbol,e,8388608,8496063):u(Me.symbol.exports,Me.symbol,e,4,8496063):P(e,8388608,o(e))}function se(e){Me.symbol&&Me.symbol.exports?e.exportClause||u(Me.symbol.exports,Me.symbol,e,1073741824,0):P(e,1073741824,o(e))}function ue(e){e.name&&C(e,8388608,8388608)}function ce(e){Re.commonJsModuleIndicator||(Re.commonJsModuleIndicator=e,ae())}function le(e){ce(e),u(Re.symbol.exports,Re.symbol,e.left,7340036,0)}function pe(e){ce(e),oe(e)}function fe(e){176!==Me.kind&&216!==Me.kind||(Me.symbol.members=Me.symbol.members||{},u(Me.symbol.members,Me.symbol,e,4,107451))}function de(e){var t=e.left,n=t.expression,r=n.expression;t.parent=e,r.parent=n,n.parent=t;var i=Me.locals[r.text];i&&16&i.flags&&(i.members||(i.members={}),u(i.members,i,t,4,107455))}function me(t){!Re.commonJsModuleIndicator&&e.isRequireCall(t,!1)&&ce(t)}function he(t){if(e.isDeclarationFile(Re)||e.isInAmbientContext(t)||(void 0!==e.getClassExtendsHeritageClauseElement(t)&&(je=!0),e.nodeIsDecorated(t)&&(qe=!0)),217===t.kind)L(t,32,899519);else{P(t,32,t.name?t.name.text:\"__class\"),t.name&&(Je[t.name.text]=t.name.text)}var n=t.symbol,r=i(134217732,\"prototype\");e.hasProperty(n.exports,r.name)&&(t.name&&(t.name.parent=t),Re.bindDiagnostics.push(e.createDiagnosticForNode(n.exports[r.name].declarations[0],e.Diagnostics.Duplicate_identifier_0,r.name))),n.exports[r.name]=r,r.parent=n}function ye(t){return e.isConst(t)?L(t,128,899967):L(t,256,899327)}function _e(t){He&&W(t,t.name),e.isBindingPattern(t.name)||(e.isBlockOrCatchScoped(t)?O(t):e.isParameterDeclaration(t)?C(t,1,107455):C(t,1,107454))}function ge(t){if(e.isDeclarationFile(Re)||e.isInAmbientContext(t)||!e.nodeIsDecorated(t)||(qe=!0,ze=!0),He&&W(t,t.name),e.isBindingPattern(t.name)?P(t,1,$(t)):C(t,1,107455),e.isParameterPropertyDeclaration(t)){var n=t.parent.parent;u(n.symbol.members,n.symbol,t,4,107455)}}function ve(t){return e.isDeclarationFile(Re)||e.isInAmbientContext(t)||e.isAsyncFunctionLike(t)&&(We=!0),z(t),C(t,16,106927)}function be(t){return e.isDeclarationFile(Re)||e.isInAmbientContext(t)||e.isAsyncFunctionLike(t)&&(We=!0),z(t),P(t,16,t.name?t.name.text:\"__function\")}function Se(t,n,r){return e.isDeclarationFile(Re)||e.isInAmbientContext(t)||(e.isAsyncFunctionLike(t)&&(We=!0),e.nodeIsDecorated(t)&&(qe=!0)),e.hasDynamicName(t)?P(t,n,\"__computed\"):C(t,n,r)}function Ae(t){return xe(),!e.hasProperty(Ke,t.text)&&(Ke[t.text]=Be.push(1)-1,!0)}function Te(){xe();var e=Be.push(1)-1;return Ve.push(e),e}function Ee(t,n){var r=Ke[t.text];e.Debug.assert(void 0!==r),e.Debug.assert(Be.length==r+1),Ke[t.text]=void 0,Ne(Be.pop(),n,t)}function Ce(t,n){Be.length!==t+1&&e.Debug.assert(!1,\"Label stack: \"+Be.length+\", index:\"+t);var r=Ve.pop();t!==r&&e.Debug.assert(!1,\"i: \"+r+\", index: \"+t),Ne(Be.pop(),n,void 0)}function Ne(n,r,i){1===n?(i&&!Ie.allowUnusedLabels&&Re.bindDiagnostics.push(e.createDiagnosticForNode(i,e.Diagnostics.Unused_label)),Fe=r):Fe=t(n,r)}function we(n,r){xe();var i=n?Ke[n.text]:e.lastOrUndefined(Ve);if(void 0===i)return!1;var a=Be[i];return Be[i]=1===a?r:t(a,r),!0}function ke(t){switch(Fe){case 4:if(e.isStatement(t)&&197!==t.kind||217===t.kind||221===t.kind&&function(e){var t=n(e);return 1===t||2===t&&Ie.preserveConstEnums}(t)||220===t.kind&&(!e.isConstEnumDeclaration(t)||Ie.preserveConstEnums)){Fe=8;!Ie.allowUnreachableCode&&!e.isInAmbientContext(t)&&(196!==t.kind||24576&e.getCombinedNodeFlags(t.declarationList)||e.forEach(t.declarationList.declarations,function(e){return e.initializer}))&&X(t,e.Diagnostics.Unreachable_code_detected)}case 8:return!0;default:return!1}}function xe(){Ke||(Fe=2,Ke={},Be=[],Ve=[])}var Re,Ie,De,Me,Pe,Le,Oe,Ue,Fe,Be,Ke,Ve,je,We,qe,ze,He,Ye,Je,Ge=0;return r}();e.bindSourceFile=r}(o||(o={}));var o;!function(e){function t(e){return e.id||(e.id=a,a++),e.id}function n(e){return e.id||(e.id=i,i++),e.id}function r(r,i){function a(e,t){return Gc(e,t),Jp}function s(t,n,r,i,a){var o=t?e.createDiagnosticForNode(t,n,r,i,a):e.createCompilerDiagnostic(n,r,i,a);sd.add(o)}function u(e,t){return Vp++,new Up(e,t)}function c(e){var t=0;return 2&e&&(t|=107455),1&e&&(t|=107454),4&e&&(t|=107455),8&e&&(t|=107455),16&e&&(t|=106927),32&e&&(t|=899519),64&e&&(t|=792960),256&e&&(t|=899327),128&e&&(t|=899967),512&e&&(t|=106639),8192&e&&(t|=99263),32768&e&&(t|=41919),65536&e&&(t|=74687),262144&e&&(t|=530912),524288&e&&(t|=793056),8388608&e&&(t|=8388608),t}function l(e,t){t.mergeId||(t.mergeId=o,o++),nd[t.mergeId]=e}function p(e){var t=u(33554432|e.flags,e.name);return t.declarations=e.declarations.slice(0),t.parent=e.parent,e.valueDeclaration&&(t.valueDeclaration=e.valueDeclaration),e.constEnumOnlyModule&&(t.constEnumOnlyModule=!0),e.members&&(t.members=d(e.members)),e.exports&&(t.exports=d(e.exports)),l(t,e),t}function f(t,n){if(t.flags&c(n.flags)){var r=2&t.flags||2&n.flags?e.Diagnostics.Cannot_redeclare_block_scoped_variable_0:e.Diagnostics.Duplicate_identifier_0;e.forEach(n.declarations,function(e){s(e.name?e.name:e,r,we(n))}),e.forEach(t.declarations,function(e){s(e.name?e.name:e,r,we(n))})}else 512&n.flags&&512&t.flags&&t.constEnumOnlyModule&&!n.constEnumOnlyModule&&(t.constEnumOnlyModule=!1),t.flags|=n.flags,n.valueDeclaration&&(!t.valueDeclaration||221===t.valueDeclaration.kind&&221!==n.valueDeclaration.kind)&&(t.valueDeclaration=n.valueDeclaration),e.forEach(n.declarations,function(e){t.declarations.push(e)}),n.members&&(t.members||(t.members={}),m(t.members,n.members)),n.exports&&(t.exports||(t.exports={}),m(t.exports,n.exports)),l(t,n)}function d(t){var n={};for(var r in t)e.hasProperty(t,r)&&(n[r]=t[r]);return n}function m(t,n){for(var r in n)if(e.hasProperty(n,r))if(e.hasProperty(t,r)){var i=t[r];33554432&i.flags||(t[r]=i=p(i)),f(i,n[r])}else t[r]=n[r]}function h(t){var n=t.parent;if(n.symbol.valueDeclaration!==n)return void e.Debug.assert(n.symbol.declarations.length>1);if(e.isGlobalScopeAugmentation(n))m(Jf,n.symbol.exports);else{var r=J(t,t,e.Diagnostics.Invalid_module_name_in_augmentation_module_0_cannot_be_found);if(!r)return;r=G(r),1536&r.flags?(r=33554432&r.flags?r:p(r),f(r,n.symbol)):s(t,e.Diagnostics.Cannot_augment_module_0_because_it_resolves_to_a_non_module_entity,t.text)}}function y(t,n,r){for(var i in n)e.hasProperty(n,i)&&(e.hasProperty(t,i)?e.forEach(t[i].declarations,function(t,n){return function(r){return sd.add(e.createDiagnosticForNode(r,n,t))}}(i,r)):t[i]=n[i])}function _(e){if(67108864&e.flags)return e;var t=n(e);return rd[t]||(rd[t]={})}function g(e){var n=t(e);return id[n]||(id[n]={})}function v(t){return 251===t.kind&&!e.isExternalOrCommonJsModule(t)}function b(t,n,r){if(r&&e.hasProperty(t,n)){var i=t[n];if(e.Debug.assert(0==(16777216&i.flags),\"Should never get an instantiated symbol here.\"),i.flags&r)return i;if(8388608&i.flags){var a=V(i);if(a===Qp||a.flags&r)return i}}}function S(t,n){var r=t.parent,i=t.parent.parent,a=b(r.locals,n,107455),o=b(i.symbol.members,n,107455);if(a&&o)return[a,o];e.Debug.fail(\"There should exist two symbols, one as property declaration and one as parameter declaration\")}function A(t,n){var i=e.getSourceFileOfNode(t),a=e.getSourceFileOfNode(n);if(i!==a){if(Hp||!qp.outFile&&!qp.out)return!0;var o=r.getSourceFiles();return e.indexOf(o,i)<=e.indexOf(o,a)}return t.pos<=n.pos?214!==t.kind||!function(t,n){var r=e.getEnclosingBlockScopeContainer(t);if(196===t.parent.parent.kind||202===t.parent.parent.kind)return N(n,t,r);if(204===t.parent.parent.kind||203===t.parent.parent.kind){return N(n,t.parent.parent.expression,r)}}(t,n):function(t,n){for(var r=e.getEnclosingBlockScopeContainer(t),i=n;i;){if(i===r)return!1;if(e.isFunctionLike(i))return!0;if(i.parent&&142===i.parent.kind&&0==(64&i.parent.flags)&&i.parent.initializer===i)return!0;i=i.parent}return!1}(t,n)}function T(t,n,r,i,a){var o,u,c,l,p=t;e:for(;t;){if(t.locals&&!v(t)&&(o=b(t.locals,n,r))){var f=!0;if(e.isFunctionLike(t)&&u&&u!==t.body&&(r&o.flags&793056&&268!==u.kind&&(f=!!(262144&o.flags)&&(u===t.type||139===u.kind||138===u.kind)),107455&r&&1&o.flags&&(f=139===u.kind||u===t.type&&139===o.valueDeclaration.kind)),f)break e;o=void 0}switch(t.kind){case 251:if(!e.isExternalOrCommonJsModule(t))break;case 221:var d=ie(t).exports;if(251===t.kind||e.isAmbientModule(t)){if(o=d.default){var m=e.getLocalSymbolForExportDefault(o);if(m&&o.flags&r&&m.name===n)break e;o=void 0}if(e.hasProperty(d,n)&&8388608===d[n].flags&&e.getDeclarationOfKind(d[n],233))break}if(o=b(d,n,8914931&r))break e;break;case 220:if(o=b(ie(t).exports,n,8&r))break e;break;case 142:case 141:if(e.isClassLike(t.parent)&&!(64&t.flags)){var h=ue(t.parent);h&&h.locals&&b(h.locals,n,107455&r)&&(c=t)}break;case 217:case 189:case 218:if(o=b(ie(t).members,n,793056&r)){if(u&&64&u.flags)return void s(p,e.Diagnostics.Static_members_cannot_reference_class_type_parameters);break e}if(189===t.kind&&32&r){var y=t.name;if(y&&n===y.text){o=t.symbol;break e}}break;case 137:if(l=t.parent.parent,(e.isClassLike(l)||218===l.kind)&&(o=b(ie(l).members,n,793056&r)))return void s(p,e.Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type);break;case 144:case 143:case 145:case 146:case 147:case 216:case 177:if(3&r&&\"arguments\"===n){o=Xp;break e}break;case 176:if(3&r&&\"arguments\"===n){o=Xp;break e}if(16&r){var _=t.name;if(_&&n===_.text){o=t.symbol;break e}}break;case 140:t.parent&&139===t.parent.kind&&(t=t.parent),t.parent&&e.isClassElement(t.parent)&&(t=t.parent)}u=t,t=t.parent}if(o||(o=b(Jf,n,r)),!o)return void(i&&(E(p,n,a)||s(p,i,\"string\"==typeof a?a:e.declarationNameToString(a))));if(i){if(c){var g=c.name;return void s(p,e.Diagnostics.Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor,e.declarationNameToString(g),\"string\"==typeof a?a:e.declarationNameToString(a))}if(2&r){var S=oe(o);2&S.flags&&C(S,p)}}return o}function E(t,n,r){if(!t||69===t.kind&&rl(t)||Vi(t))return!1;for(var i=e.getThisContainer(t,!0),a=i;a;){if(e.isClassLike(a.parent)){var o=ie(a.parent);if(!o)break;if(hn(ct(o),n))return s(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0,\"string\"==typeof r?r:e.declarationNameToString(r),we(o)),!0;if(a===i&&!(64&a.flags)){if(hn(Dt(o).thisType,n))return s(t,e.Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0,\"string\"==typeof r?r:e.declarationNameToString(r)),!0}}a=a.parent}return!1}function C(t,n){e.Debug.assert(0!=(2&t.flags));var r=e.forEach(t.declarations,function(t){return e.isBlockOrCatchScoped(t)?t:void 0});e.Debug.assert(void 0!==r,\"Block-scoped variable declaration is undefined\"),A(e.getAncestor(r,214),n)||s(n,e.Diagnostics.Block_scoped_variable_0_used_before_its_declaration,e.declarationNameToString(r.name))}function N(t,n,r){if(!n)return!1;for(var i=t;i&&i!==r&&!e.isFunctionLike(i);i=i.parent)if(i===n)return!0;return!1}function w(t){if(e.isAliasSymbolDeclaration(t)){if(224===t.kind)return t;for(;t&&225!==t.kind;)t=t.parent;return t}}function k(t){return e.forEach(t.declarations,function(t){return e.isAliasSymbolDeclaration(t)?t:void 0})}function x(t){return 235===t.moduleReference.kind?G(Y(t,e.getExternalModuleImportEqualsDeclarationExpression(t))):q(t.moduleReference,t)}function R(t){var n=Y(t,t.parent.moduleSpecifier);if(n){var r=K(n.exports.default);if(r||Yp){if(!r&&Yp)return G(n)||K(n)}else s(t.name,e.Diagnostics.Module_0_has_no_default_export,we(n));return r}}function I(e){var t=e.parent.parent.moduleSpecifier;return X(Y(e,t),t)}function D(t,n){if(794592&t.flags)return t;var r=u(t.flags|n.flags,t.name);return r.declarations=e.concatenate(t.declarations,n.declarations),r.parent=t.parent||n.parent,t.valueDeclaration&&(r.valueDeclaration=t.valueDeclaration),n.members&&(r.members=n.members),t.exports&&(r.exports=t.exports),r}function M(t,n){if(1536&t.flags){var r=Z(t);if(e.hasProperty(r,n))return K(r[n])}}function P(e,t){if(3&e.flags){var n=e.valueDeclaration.type;if(n)return K(hn(Rr(n),t))}}function L(t,n){var r=Y(t,t.moduleSpecifier),i=X(r,t.moduleSpecifier);if(i){var a=n.propertyName||n.name;if(a.text){var o=M(i,a.text),u=P(i,a.text),c=o&&u?D(u,o):o||u;return c||s(a,e.Diagnostics.Module_0_has_no_exported_member_1,z(r),e.declarationNameToString(a)),c}}}function O(e){return L(e.parent.parent.parent,e)}function U(e){return e.parent.parent.moduleSpecifier?L(e.parent.parent,e):H(e.propertyName||e.name,901119)}function F(e){return H(e.expression,901119)}function B(e){switch(e.kind){case 224:return x(e);case 226:return R(e);case 227:return I(e);case 229:return O(e);case 233:return U(e);case 230:return F(e)}}function K(e){return e&&8388608&e.flags&&!(901119&e.flags)?V(e):e}function V(t){e.Debug.assert(0!=(8388608&t.flags),\"Should only get Alias here.\");var n=_(t);if(n.target)n.target===Zp&&(n.target=Qp);else{n.target=Zp;var r=k(t),i=B(r);n.target===Zp?n.target=i||Qp:s(r,e.Diagnostics.Circular_definition_of_import_alias_0,we(t))}return n.target}function j(e){var t=ie(e),n=V(t);if(n){(n===Qp&&qp.isolatedModules||n!==Qp&&107455&n.flags&&!Nl(n))&&W(t)}}function W(t){var n=_(t);if(!n.referenced){n.referenced=!0;var r=k(t);230===r.kind?Ds(r.expression):233===r.kind?Ds(r.propertyName||r.name):e.isInternalModuleImportEqualsDeclaration(r)&&Ds(r.moduleReference)}}function q(t,n){return n||(n=e.getAncestor(t,224),e.Debug.assert(void 0!==n)),69===t.kind&&e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),69===t.kind||136===t.parent.kind?H(t,1536):(e.Debug.assert(224===t.parent.kind),H(t,901119))}function z(e){return e.parent?z(e.parent)+\".\"+we(e):we(e)}function H(t,n,r){if(!e.nodeIsMissing(t)){var i;if(69===t.kind){var a=1536===n?e.Diagnostics.Cannot_find_namespace_0:e.Diagnostics.Cannot_find_name_0;if(!(i=T(t,t.text,n,r?void 0:a,t)))return}else if(136===t.kind||169===t.kind){var o=136===t.kind?t.left:t.expression,u=136===t.kind?t.right:t.name,c=H(o,1536,r);if(!c||c===Qp||e.nodeIsMissing(u))return;if(!(i=b(Z(c),u.text,n)))return void(r||s(u,e.Diagnostics.Module_0_has_no_exported_member_1,z(c),e.declarationNameToString(u)))}else e.Debug.fail(\"Unknown entity name kind.\");return e.Debug.assert(0==(16777216&i.flags),\"Should never get an instantiated symbol here.\"),i.flags&n?i:V(i)}}function Y(t,n){return J(t,n,e.Diagnostics.Cannot_find_module_0)}function J(t,n,i){if(9===n.kind){var a=n,o=e.escapeIdentifier(a.text);if(void 0!==o){if(!e.isExternalModuleNameRelative(o)){var u=b(Jf,'\"'+o+'\"',512);if(u)return re(u)}var c=e.getResolvedModule(e.getSourceFileOfNode(t),a.text),l=c&&r.getSourceFile(c.resolvedFileName);if(l)return l.symbol?re(l.symbol):void(i&&s(a,e.Diagnostics.File_0_is_not_a_module,l.fileName));i&&s(a,i,o)}}}function G(e){return e&&re(K(e.exports[\"export=\"]))||e}function X(t,n){var r=G(t);return!r||1539&r.flags||(s(n,e.Diagnostics.Module_0_resolves_to_a_non_module_entity_and_cannot_be_imported_using_this_construct,we(t)),r=void 0),r}function $(e){return void 0!==e.exports[\"export=\"]}function Q(e){return An(ee(e))}function Z(e){return 1536&e.flags?ee(e):e.exports||Wp}function ee(e){var t=_(e);return t.resolvedExports||(t.resolvedExports=ne(e))}function te(t,n,r,i){for(var a in n)\"default\"===a||e.hasProperty(t,a)?r&&i&&\"default\"!==a&&e.hasProperty(t,a)&&K(t[a])!==K(n[a])&&(r[a].exportsWithDuplicate?r[a].exportsWithDuplicate.push(i):r[a].exportsWithDuplicate=[i]):(t[a]=n[a],r&&i&&(r[a]={specifierText:e.getTextOfNode(i.moduleSpecifier)}))}function ne(t){function n(t){if(t&&1952&t.flags&&!e.contains(r,t)){r.push(t);var i=d(t.exports),a=t.exports.__export;if(a){for(var o={},s={},u=0,c=a.declarations;u<c.length;u++){var l=c[u];te(o,n(Y(l,l.moduleSpecifier)),s,l)}for(var p in s){var f=s[p].exportsWithDuplicate;if(\"export=\"!==p&&f&&f.length&&!e.hasProperty(i,p))for(var m=0,h=f;m<h.length;m++){var l=h[m];sd.add(e.createDiagnosticForNode(l,e.Diagnostics.Module_0_has_already_exported_a_member_named_1_Consider_explicitly_re_exporting_to_resolve_the_ambiguity,s[p].specifierText,p))}}te(i,o)}return i}}var r=[];return n(t)||t.exports}function re(e){var t;return e&&e.mergeId&&(t=nd[e.mergeId])?t:e}function ie(e){return re(e.symbol)}function ae(e){return re(e.parent)}function oe(e){return e&&0!=(1048576&e.flags)?re(e.exportSymbol):e}function se(e){return 16777216&e.flags?se(_(e).target):!!(107455&e.flags)||!!(8388608&e.flags)&&0!=(107455&V(e).flags)}function ue(t){for(var n=t.members,r=0,i=n;r<i.length;r++){var a=i[r];if(145===a.kind&&e.nodeIsPresent(a.body))return a}}function ce(e){var t=new Fp($p,e);return t.id=Kp,Kp++,t}function le(e,t){var n=ce(e);return n.intrinsicName=t,n}function pe(e,t){var n=ce(e);return n.symbol=t,n}function fe(e){return 95===e.charCodeAt(0)&&95===e.charCodeAt(1)&&95!==e.charCodeAt(2)&&64!==e.charCodeAt(2)}function de(t){var n;for(var r in t)if(e.hasProperty(t,r)&&!fe(r)){n||(n=[]);var i=t[r];se(i)&&n.push(i)}return n||jp}function me(e,t,n,r,i,a){return e.members=t,e.properties=de(t),e.callSignatures=n,e.constructSignatures=r,i&&(e.stringIndexType=i),a&&(e.numberIndexType=a),e}function he(e,t,n,r,i,a){return me(pe(65536,e),t,n,r,i,a)}function ye(t,n){for(var r,i=t;i;i=i.parent){if(i.locals&&!v(i)&&(r=n(i.locals)))return r;switch(i.kind){case 251:if(!e.isExternalOrCommonJsModule(i))break;case 221:if(r=n(ie(i).exports))return r;break;case 217:case 218:if(r=n(ie(i).members))return r}}return n(Jf)}function _e(e){return 107455===e?107455:1536}function ge(t,n,r,i){function a(o){function s(e,t){return!ve(e,n,t)||!!ge(e.parent,n,_e(t),i)}function u(n,i){if(t===(i||n))return!e.forEach(n.declarations,Se)&&s(n,r)}return u(e.lookUp(o,t.name))?[t]:e.forEachValue(o,function(t){if(8388608&t.flags&&\"export=\"!==t.name&&!e.getDeclarationOfKind(t,233)&&(!i||e.forEach(t.declarations,e.isExternalModuleImportEqualsDeclaration))){var n=V(t);if(u(t,V(t)))return[t];var o=n.exports?a(n.exports):void 0;if(o&&s(t,_e(r)))return[t].concat(o)}})}if(t)return ye(n,a)}function ve(t,n,r){var i=!1;return ye(n,function(n){if(!e.hasProperty(n,t.name))return!1;var a=n[t.name];return a===t||(a=8388608&a.flags&&!e.getDeclarationOfKind(a,233)?V(a):a,!!(a.flags&r)&&(i=!0,!0))}),i}function be(t,n,r){function i(e){for(;e;e=e.parent)if(Se(e))return ie(e)}if(t&&n&&!(262144&t.flags)){for(var a=t,o=r;t;){var s=ge(t,n,o,!1);if(s){var u=Ae(s[0]);return u?u:{accessibility:1,errorSymbolName:we(a,n,r),errorModuleName:t!==a?we(t,n,1536):void 0}}o=_e(r),t=ae(t)}var c=e.forEach(a.declarations,i);if(c){if(c!==i(n))return{accessibility:2,errorSymbolName:we(a,n,r),errorModuleName:we(c)}}return{accessibility:1,errorSymbolName:we(a,n,r)}}return{accessibility:0}}function Se(t){return e.isAmbientModule(t)||251===t.kind&&e.isExternalOrCommonJsModule(t)}function Ae(t){function n(t){if(!Pe(t)){var n=w(t);return!(!n||2&n.flags||!Pe(n.parent))&&(g(t).isVisible=!0,r?e.contains(r,n)||r.push(n):r=[n],!0)}return!0}var r;if(!e.forEach(t.declarations,function(e){return!n(e)}))return{accessibility:0,aliasesToMakeVisible:r}}function Te(t,n){var r;r=155===t.parent.kind?1156031:136===t.kind||169===t.kind||224===t.parent.kind?1536:793056;var i=Dc(t),a=T(n,i.text,r,void 0,void 0);return a&&Ae(a)||{accessibility:1,errorSymbolName:e.getTextOfNode(i),errorNode:i}}function Ee(t,n){t.writeKeyword(e.tokenToString(n))}function Ce(t,n){t.writePunctuation(e.tokenToString(n))}function Ne(e){e.writeSpace(\" \")}function we(t,n,r){var i=e.getSingleLineStringWriter();Me().buildSymbolDisplay(t,i,n,r);var a=i.string();return e.releaseStringWriter(i),a}function ke(t,n,r,i){var a=e.getSingleLineStringWriter();Me().buildSignatureDisplay(t,a,n,r,i);var o=a.string();return e.releaseStringWriter(a),o}function xe(t,n,r){var i=e.getSingleLineStringWriter();Me().buildTypeDisplay(t,i,n,r);var a=i.string();e.releaseStringWriter(i);var o=qp.noErrorTruncation||4&r?void 0:100;return o&&a.length>=o&&(a=a.substr(0,o-\"...\".length)+\"...\"),a}function Re(t,n,r){var i=e.getSingleLineStringWriter();Me().buildTypePredicateDisplay(t,i,n,r);var a=i.string();return e.releaseStringWriter(i),a}function Ie(e){if(e.symbol&&2048&e.symbol.flags){for(var t=e.symbol.declarations[0].parent;161===t.kind;)t=t.parent;if(219===t.kind)return ie(t)}}function De(t){return t&&t.parent&&222===t.parent.kind&&e.isExternalModuleAugmentation(t.parent.parent)}function Me(){function t(t){if(t.declarations&&t.declarations.length){var n=t.declarations[0];if(n.name)return e.declarationNameToString(n.name);switch(n.kind){case 189:return\"(Anonymous class)\";case 176:case 177:return\"(Anonymous function)\"}}return t.name}function n(e,n){n.writeSymbol(t(e),e)}function r(t,r,i,o,s,u){function l(e){f&&(1&s&&(16777216&e.flags?c(yt(f),e.mapper,r,i):a(f,r,i)),Ce(r,21)),f=e,n(e,r)}function p(t,n){if(t){var r=ge(t,i,n,!!(2&s));if(r&&!ve(r[0],i,1===r.length?n:_e(n))||p(ae(r?r[0]:t),_e(n)),r)for(var a=0,o=r;a<o.length;a++){var u=o[a];l(u)}else{if(!f&&e.forEach(t.declarations,Se))return;if(2048&t.flags||4096&t.flags)return;l(t)}}}var f;r.trackSymbol(t,i,o);var d=262144&t.flags,m=128&u;return d||!i&&!m?l(t):void p(t,o)}function i(t,n,i,a,o){function s(t,o){16777343&t.flags?n.writeKeyword(16&a||!We(t)?t.intrinsicName:\"any\"):33554432&t.flags?(v&&n.reportInaccessibleThisError(),n.writeKeyword(\"this\")):4096&t.flags?l(t,o):3712&t.flags?r(t.symbol,n,i,793056,0,o):8192&t.flags?p(t):49152&t.flags?f(t,o):65536&t.flags?m(t,o):256&t.flags?n.writeStringLiteral('\"'+e.escapeString(t.text)+'\"'):(Ce(n,15),Ne(n),Ce(n,22),Ne(n),Ce(n,16))}function u(e,t){for(var r=0;r<e.length;r++)r>0&&(24!==t&&Ne(n),Ce(n,t),Ne(n)),s(e[r],24===t?0:64)}function c(e,t,a,o,u){if((32&e.flags||!fe(e.name))&&r(e,n,i,793056,0,u),a<o){for(Ce(n,25),s(t[a],0),a++;a<o;)Ce(n,24),Ne(n),s(t[a],0),a++;Ce(n,27)}}function l(t,r){var i=t.typeArguments||jp;if(t.target!==gf||1&r){var a=t.target.outerTypeParameters,o=0;if(a)for(var u=a.length;o<u;){var l=o,p=Bn(a[o]);do{o++}while(o<u&&Bn(a[o])===p);e.rangeEquals(a,i,l,o)||(c(p,i,l,o,r),Ce(n,21))}var f=(t.target.typeParameters||jp).length;c(t.symbol,i,o,f,r)}else s(i[0],64),Ce(n,19),Ce(n,20)}function p(e){Ce(n,19),u(e.elementTypes,24),Ce(n,20)}function f(e,t){64&t&&Ce(n,17),u(e.types,16384&e.flags?47:46),64&t&&Ce(n,18)}function m(t,a){var s=t.symbol;if(s)if(928&s.flags)h(t,a);else if(function(){var t=!!(8192&s.flags&&e.forEach(s.declarations,function(e){return 64&e.flags})),n=!!(16&s.flags)&&(s.parent||e.forEach(s.declarations,function(e){return 251===e.parent.kind||222===e.parent.kind}));if(t||n)return!!(2&a)||e.contains(o,s)}())h(t,a);else if(e.contains(o,s)){var u=Ie(t);u?r(u,n,i,793056,0,a):Ee(n,117)}else o||(o=[]),o.push(s),_(t,a),o.pop();else _(t,a)}function h(e,t){Ee(n,101),Ne(n),r(e.symbol,n,i,107455,0,t)}function y(t,n,r){var i=Pn(t.symbol,n);return i?(e.Debug.assert(0!==i.parameters.length),e.declarationNameToString(i.parameters[0].name)):r}function _(e,t){var a=on(e);if(!a.properties.length&&!a.stringIndexType&&!a.numberIndexType){if(!a.callSignatures.length&&!a.constructSignatures.length)return Ce(n,15),void Ce(n,16);if(1===a.callSignatures.length&&!a.constructSignatures.length)return 64&t&&Ce(n,17),d(a.callSignatures[0],n,i,8|g,void 0,o),void(64&t&&Ce(n,18));if(1===a.constructSignatures.length&&!a.callSignatures.length)return 64&t&&Ce(n,17),Ee(n,92),Ne(n),d(a.constructSignatures[0],n,i,8|g,void 0,o),void(64&t&&Ce(n,18))}var u=v;v=!0,Ce(n,15),n.writeLine(),n.increaseIndent();for(var c=0,l=a.callSignatures;c<l.length;c++){var p=l[c];d(p,n,i,g,void 0,o),Ce(n,23),n.writeLine()}for(var f=0,m=a.constructSignatures;f<m.length;f++){var p=m[f];d(p,n,i,g,1,o),Ce(n,23),n.writeLine()}a.stringIndexType&&(Ce(n,19),n.writeParameter(y(a,0,\"x\")),Ce(n,54),Ne(n),Ee(n,130),Ce(n,20),Ce(n,54),Ne(n),s(a.stringIndexType,0),Ce(n,23),n.writeLine()),a.numberIndexType&&(Ce(n,19),n.writeParameter(y(a,1,\"x\")),Ce(n,54),Ne(n),Ee(n,128),Ce(n,20),Ce(n,54),Ne(n),s(a.numberIndexType,0),Ce(n,23),n.writeLine());for(var h=0,_=a.properties;h<_.length;h++){var b=_[h],S=ct(b);if(8208&b.flags&&!sn(S).length)for(var A=_n(S,0),T=0,E=A;T<E.length;T++){var p=E[T];r(b,n),536870912&b.flags&&Ce(n,53),d(p,n,i,g,void 0,o),Ce(n,23),n.writeLine()}else r(b,n),536870912&b.flags&&Ce(n,53),Ce(n,54),Ne(n),s(S,0),Ce(n,23),n.writeLine()}n.decreaseIndent(),Ce(n,16),v=u}var g=16&a,v=!1;return s(t,a)}function a(e,t,n,r){var i=gc(e);(32&i.flags||64&i.flags||524288&i.flags)&&u(ht(e),t,n,r)}function o(e,t,r,a,o){n(e.symbol,t);var s=Fn(e);s&&(Ne(t),Ee(t,83),Ne(t),i(s,t,r,a,o))}function s(t,r,a,o,s){var u=t.valueDeclaration;e.isRestParameter(u)&&Ce(r,22),n(t,r),Tn(u)&&Ce(r,53),Ce(r,54),Ne(r),i(ct(t),r,a,o,s)}function u(e,t,n,r,i){if(e&&e.length){Ce(t,25);for(var a=0;a<e.length;a++)a>0&&(Ce(t,24),Ne(t)),o(e[a],t,n,r,i);Ce(t,27)}}function c(e,t,n,r,a,o){if(e&&e.length){Ce(n,25);for(var s=0;s<e.length;s++)s>0&&(Ce(n,24),Ne(n)),i(t(e[s]),n,r,0);Ce(n,27)}}function l(e,t,n,r,i){Ce(t,17);for(var a=0;a<e.length;a++)a>0&&(Ce(t,24),Ne(t)),s(e[a],t,n,r,i);Ce(t,18)}function p(t,n,r,a,o){e.isIdentifierTypePredicate(t)?n.writeParameter(t.parameterName):Ee(n,97),Ne(n),Ee(n,124),Ne(n),i(t.type,n,r,a,o)}function f(e,t,n,r,a){if(8&r?(Ne(t),Ce(t,34)):Ce(t,54),Ne(t),e.typePredicate)p(e.typePredicate,t,n,r,a);else{i(kn(e),t,n,r,a)}}function d(e,t,n,r,i,a){1===i&&(Ee(t,92),Ne(t)),e.target&&32&r?c(e.target.typeParameters,e.mapper,t,n):u(e.typeParameters,t,n,r,a),l(e.parameters,t,n,r,a),f(e,t,n,r,a)}return Wf||(Wf={buildSymbolDisplay:r,buildTypeDisplay:i,buildTypeParameterDisplay:o,buildTypePredicateDisplay:p,buildParameterDisplay:s,buildDisplayForParametersAndDelimiters:l,buildDisplayForTypeParametersAndDelimiters:u,buildTypeParameterDisplayFromSymbol:a,buildSignatureDisplay:d,buildReturnTypeDisplay:f})}function Pe(t){if(t){var n=g(t);return void 0===n.isVisible&&(n.isVisible=!!function(){switch(t.kind){case 166:return Pe(t.parent.parent);case 214:if(e.isBindingPattern(t.name)&&!t.name.elements.length)return!1;case 221:case 217:case 218:case 219:case 216:case 220:case 224:if(e.isExternalModuleAugmentation(t))return!0;var n=Ke(t);return 2&e.getCombinedNodeFlags(t)||224!==t.kind&&251!==n.kind&&e.isInAmbientContext(n)?Pe(n):v(n);case 142:case 141:case 146:case 147:case 144:case 143:if(48&t.flags)return!1;case 145:case 149:case 148:case 150:case 139:case 222:case 153:case 154:case 156:case 152:case 157:case 158:case 159:case 160:case 161:return Pe(t.parent);case 226:case 227:case 229:return!1;case 138:case 251:return!0;case 230:return!1;default:e.Debug.fail(\"isDeclarationVisible unknown: SyntaxKind: \"+t.kind)}}()),n.isVisible}return!1}function Le(t){function n(t){e.forEach(t,function(t){g(t).isVisible=!0;var r=w(t)||t;if(e.contains(a,r)||a.push(r),e.isInternalModuleImportEqualsDeclaration(t)){var i=t.moduleReference,o=Dc(i),s=T(t,o.text,901119,e.Diagnostics.Cannot_find_name_0,o);s&&n(s.declarations)}})}var r;if(t.parent&&230===t.parent.kind)r=T(t.parent,t.text,9289727,e.Diagnostics.Cannot_find_name_0,t);else if(233===t.parent.kind){var i=t.parent;r=i.parent.parent.moduleSpecifier?L(i.parent.parent,i):H(i.propertyName||i.name,9289727)}var a=[];return r&&n(r.declarations),a}function Oe(e,t){var n=Ue(e,t);if(n>=0){for(var r=Zf.length,i=n;i<r;i++)ed[i]=!1;return!1}return Zf.push(e),ed.push(!0),td.push(t),!0}function Ue(e,t){for(var n=Zf.length-1;n>=0;n--){if(Fe(Zf[n],td[n]))return-1;if(Zf[n]===e&&td[n]===t)return n}return-1}function Fe(t,n){return 0===n?_(t).type:2===n?_(t).declaredType:1===n?(e.Debug.assert(!!(1024&t.flags)),t.resolvedBaseConstructorType):3===n?t.resolvedReturnType:void e.Debug.fail(\"Unhandled TypeSystemPropertyName \"+n)}function Be(){return Zf.pop(),td.pop(),ed.pop()}function Ke(t){for(t=e.getRootDeclaration(t);t;)switch(t.kind){case 214:case 215:case 229:case 228:case 227:case 226:t=t.parent;break;default:return t.parent}}function Ve(t){var n=Dt(ae(t));return n.typeParameters?jn(n,e.map(n.typeParameters,function(e){return ef})):n}function je(e,t){var n=hn(e,t);return n?ct(n):void 0}function We(e){return e&&0!=(1&e.flags)}function qe(e){var t=ie(e);return t&&_(t).type||Xe(e)}function ze(t){switch(t.kind){case 69:return t.text;case 9:case 8:return t.text;case 137:if(e.isStringOrNumericLiteral(t.expression.kind))return t.expression.text}}function He(t){return 137===t.kind&&!e.isStringOrNumericLiteral(t.expression.kind)}function Ye(t){var n=t.parent,r=qe(n.parent);if(r===cf)return cf;if(!r||We(r))return t.initializer?Ds(t.initializer):r;var i;if(164===n.kind){var a=t.propertyName||t.name;if(He(a))return ef;var o=ze(a);if(!(i=je(r,o)||Fa(o)&&vn(r,1)||vn(r,0)))return s(a,e.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature,xe(r),e.declarationNameToString(a)),cf}else{var u=$u(r,n,!1);if(t.dotDotDotToken)i=ur(u);else{var c=\"\"+e.indexOf(n.elements,t);if(!(i=Ai(r)?je(r,c):u))return Ei(r)?s(t,e.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2,xe(r),r.elementTypes.length,n.elements.length):s(t,e.Diagnostics.Type_0_has_no_property_1,xe(r),c),cf}}return i}function Je(e){var t=Ge(e);if(t)return Rr(t)}function Ge(t){var n=e.getJSDocTypeTag(t);if(n&&n.typeExpression)return n.typeExpression.type;if(214===t.kind&&215===t.parent.kind&&196===t.parent.parent.kind){var r=e.getJSDocTypeTag(t.parent.parent);if(r&&r.typeExpression)return r.typeExpression.type}else if(139===t.kind){var i=e.getCorrespondingJSDocParameterTag(t);if(i&&i.typeExpression)return i.typeExpression.type}}function Xe(t){if(32&t.parserContextFlags){var n=Je(t);if(n&&n!==cf)return n}if(203===t.parent.parent.kind)return tf;if(204===t.parent.parent.kind)return Xu(t.parent.parent.expression)||ef;if(e.isBindingPattern(t.parent))return Ye(t);if(t.type)return Rr(t.type);if(139===t.kind){var r=t.parent;if(147===r.kind&&!e.hasDynamicName(r)){var i=e.getDeclarationOfKind(t.parent.symbol,146);if(i)return kn(Cn(i))}var n=ia(t);if(n)return n}return t.initializer?Ds(t.initializer):249===t.kind?Hi(t.name):e.isBindingPattern(t.name)?et(t.name,!1):void 0}function $e(t,n){return t.initializer?wi(Ds(t.initializer)):e.isBindingPattern(t.name)?et(t.name,n):ef}function Qe(t,n){var r={},i=!1;e.forEach(t.elements,function(e){var t=e.propertyName||e.name;if(He(t))return void(i=!0);var a=ze(t),o=67108868|(e.initializer?536870912:0),s=u(o,a);s.type=$e(e,n),s.bindingElement=e,r[s.name]=s});var a=he(void 0,r,jp,jp,void 0,void 0);return n&&(a.pattern=t),i&&(a.flags|=67108864),a}function Ze(t,n){var r=t.elements;if(0===r.length||r[r.length-1].dotDotDotToken)return zp>=2?or(ef):kf;var i=e.map(r,function(e){return 190===e.kind?ef:$e(e,n)});if(n){var a=pr(i);return a.pattern=t,a}return lr(i)}function et(e,t){return 164===e.kind?Qe(e,t):Ze(e,t)}function tt(t,n){var r=Xe(t);if(r)return n&&Ri(t,r),248===t.kind?r:wi(r);if(r=t.dotDotDotToken?kf:ef,n&&qp.noImplicitAny){var i=e.getRootDeclaration(t);su(i)||139===i.kind&&su(i.parent)||xi(t,r)}return r}function nt(t){var n=_(t);if(!n.type){if(134217728&t.flags)return n.type=Ve(t);var r=t.valueDeclaration;if(247===r.parent.kind)return n.type=ef;if(230===r.kind)return n.type=Os(r.expression);if(184===r.kind)return n.type=vr(e.map(t.declarations,function(e){return Ds(e.right)}));if(169===r.kind&&184===r.parent.kind)return n.type=Ds(r.parent.right);if(!Oe(t,0))return cf;var i=tt(r,!0);Be()||(t.valueDeclaration.type?(i=cf,s(t.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation,we(t))):(i=ef,qp.noImplicitAny&&s(t.valueDeclaration,e.Diagnostics._0_implicitly_has_type_any_because_it_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer,we(t)))),n.type=i}return n.type}function rt(t){if(t){if(146===t.kind)return t.type&&Rr(t.type);var n=e.getSetAccessorTypeAnnotationNode(t);return n&&Rr(n)}}function it(t){var n=_(t);if(!n.type){if(!Oe(t,0))return cf;var r=e.getDeclarationOfKind(t,146),i=e.getDeclarationOfKind(t,147),a=void 0,o=rt(r);if(o)a=o;else{var u=rt(i);u?a=u:r&&r.body?a=es(r):(qp.noImplicitAny&&s(i,e.Diagnostics.Property_0_implicitly_has_type_any_because_its_set_accessor_lacks_a_type_annotation,we(t)),a=ef)}if(!Be()&&(a=ef,qp.noImplicitAny)){s(e.getDeclarationOfKind(t,146),e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,we(t))}n.type=a}return n.type}function at(e){var t=_(e);return t.type||(t.type=pe(65536,e)),t.type}function ot(e){var t=_(e);return t.type||(t.type=xt(ae(e))),t.type}function st(e){var t=_(e);if(!t.type){var n=V(e);t.type=107455&n.flags?ct(n):cf}return t.type}function ut(e){var t=_(e);return t.type||(t.type=Hr(ct(t.target),t.mapper)),t.type}function ct(e){return 16777216&e.flags?ut(e):7&e.flags?nt(e):9136&e.flags?at(e):8&e.flags?ot(e):98304&e.flags?it(e):8388608&e.flags?st(e):cf}function lt(e){return 4096&e.flags?e.target:e}function pt(t,n){function r(t){var i=lt(t);return i===n||e.forEach(At(i),r)}return r(t)}function ft(t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r],o=Rt(ie(a));t?e.contains(t,o)||t.push(o):t=[o]}return t}function dt(e,t){for(;;){if(!(t=t.parent))return e;if(217===t.kind||189===t.kind||216===t.kind||176===t.kind||144===t.kind||177===t.kind){var n=t.typeParameters;if(n)return ft(dt(e,t),n)}}}function mt(t){return dt(void 0,32&t.flags?t.valueDeclaration:e.getDeclarationOfKind(t,218))}function ht(e){for(var t,n=0,r=e.declarations;n<r.length;n++){var i=r[n];if(218===i.kind||217===i.kind||189===i.kind||219===i.kind){var a=i;a.typeParameters&&(t=ft(t,a.typeParameters))}}return t}function yt(t){return e.concatenate(mt(t),ht(t))}function _t(e){return 80896&e.flags&&_n(e,1).length>0}function gt(t){return e.getClassExtendsHeritageClauseElement(t.symbol.valueDeclaration)}function vt(t,n){var r=n?n.length:0;return e.filter(_n(t,1),function(e){return(e.typeParameters?e.typeParameters.length:0)===r})}function bt(t,n){var r=vt(t,n);if(n){var i=e.map(n,Rr);r=e.map(r,function(e){return Rn(e,i)})}return r}function St(t){if(!t.resolvedBaseConstructorType){var n=gt(t);if(!n)return t.resolvedBaseConstructorType=sf;if(!Oe(t,1))return cf;var r=Os(n.expression);if(80896&r.flags&&on(r),!Be())return s(t.symbol.valueDeclaration,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_base_expression,we(t.symbol)),t.resolvedBaseConstructorType=cf;if(r!==cf&&r!==uf&&!_t(r))return s(n.expression,e.Diagnostics.Type_0_is_not_a_constructor_function_type,xe(r)),t.resolvedBaseConstructorType=cf;t.resolvedBaseConstructorType=r}return t.resolvedBaseConstructorType}function At(t){var n=32&t.symbol.flags,r=64&t.symbol.flags;return t.resolvedBaseTypes||(n||r||e.Debug.fail(\"type must be class or interface\"),n&&Tt(t),r&&Ct(t)),t.resolvedBaseTypes}function Tt(t){t.resolvedBaseTypes=t.resolvedBaseTypes||jp;var n=St(t);if(80896&n.flags){var r,i=gt(t),a=n&&n.symbol?Dt(n.symbol):void 0;if(n.symbol&&32&n.symbol.flags&&Et(a))r=Wn(i,n.symbol);else{var o=bt(n,i.typeArguments);if(!o.length)return void s(i.expression,e.Diagnostics.No_base_constructor_has_the_specified_number_of_type_arguments);r=kn(o[0])}if(r!==cf)return 3072&lt(r).flags?t===r||pt(r,t)?void s(t.symbol.valueDeclaration,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,xe(t,void 0,1)):void(t.resolvedBaseTypes===jp?t.resolvedBaseTypes=[r]:t.resolvedBaseTypes.push(r)):void s(i.expression,e.Diagnostics.Base_constructor_return_type_0_is_not_a_class_or_interface_type,xe(r))}}function Et(e){var t=e.outerTypeParameters;if(t){var n=t.length-1,r=e.typeArguments;return t[n].symbol!==r[n].symbol}return!0}function Ct(t){t.resolvedBaseTypes=t.resolvedBaseTypes||jp;for(var n=0,r=t.symbol.declarations;n<r.length;n++){var i=r[n];if(218===i.kind&&e.getInterfaceBaseTypeNodes(i))for(var a=0,o=e.getInterfaceBaseTypeNodes(i);a<o.length;a++){var u=o[a],c=Rr(u);c!==cf&&(3072&lt(c).flags?t===c||pt(c,t)?s(i,e.Diagnostics.Type_0_recursively_references_itself_as_a_base_type,xe(t,void 0,1)):t.resolvedBaseTypes===jp?t.resolvedBaseTypes=[c]:t.resolvedBaseTypes.push(c):s(u,e.Diagnostics.An_interface_may_only_extend_a_class_or_another_interface))}}}function Nt(t){for(var n=0,r=t.declarations;n<r.length;n++){var i=r[n];if(218===i.kind){if(262144&i.flags)return!1;var a=e.getInterfaceBaseTypeNodes(i);if(a)for(var o=0,s=a;o<s.length;o++){var u=s[o];if(e.isSupportedExpressionWithTypeArguments(u)){var c=H(u.expression,793056,!0);if(!c||!(64&c.flags)||wt(c).thisType)return!1}}}}return!0}function wt(t){var n=_(t);if(!n.declaredType){var r=32&t.flags?1024:2048,i=n.declaredType=pe(r,t),a=mt(t),o=ht(t);(a||o||1024===r||!Nt(t))&&(i.flags|=4096,i.typeParameters=e.concatenate(a,o),i.outerTypeParameters=a,i.localTypeParameters=o,i.instantiations={},i.instantiations[Kn(i.typeParameters)]=i,i.target=i,i.typeArguments=i.typeParameters,i.thisType=ce(33554944),i.thisType.symbol=t,i.thisType.constraint=i)}return n.declaredType}function kt(t){var n=_(t);if(!n.declaredType){if(!Oe(t,2))return cf;var r=e.getDeclarationOfKind(t,219),i=Rr(r.type);Be()?(n.typeParameters=ht(t),n.typeParameters&&(n.instantiations={},n.instantiations[Kn(n.typeParameters)]=i)):(i=cf,s(r.name,e.Diagnostics.Type_alias_0_circularly_references_itself,we(t))),n.declaredType=i}return n.declaredType}function xt(e){var t=_(e);if(!t.declaredType){var n=ce(128);n.symbol=e,t.declaredType=n}return t.declaredType}function Rt(t){var n=_(t);if(!n.declaredType){var r=ce(512);r.symbol=t,e.getDeclarationOfKind(t,138).constraint||(r.constraint=zf),n.declaredType=r}return n.declaredType}function It(e){var t=_(e);return t.declaredType||(t.declaredType=Dt(V(e))),t.declaredType}function Dt(t){return e.Debug.assert(0==(16777216&t.flags)),96&t.flags?wt(t):524288&t.flags?kt(t):384&t.flags?xt(t):262144&t.flags?Rt(t):8388608&t.flags?It(t):cf}function Mt(e){if(e.typeArguments)for(var t=0,n=e.typeArguments;t<n.length;t++){var r=n[t];if(!Pt(r))return!1}return!0}function Pt(e){switch(e.kind){case 117:case 130:case 128:case 120:case 131:case 103:case 163:return!0;case 157:return Pt(e.elementType);case 152:return Mt(e)}return!1}function Lt(e){return e.type&&Pt(e.type)||!e.type&&!e.initializer}function Ot(e){if(!(145===e.kind||e.type&&Pt(e.type)))return!1;for(var t=0,n=e.parameters;t<n.length;t++){if(!Lt(n[t]))return!1}return!0}function Ut(e){if(e.declarations&&1===e.declarations.length){var t=e.declarations[0];if(t)switch(t.kind){case 142:case 141:return Lt(t);case 144:case 143:case 145:return Ot(t)}}return!1}function Ft(e){for(var t={},n=0,r=e;n<r.length;n++){var i=r[n];t[i.name]=i}return t}function Bt(e,t,n){for(var r={},i=0,a=e;i<a.length;i++){var o=a[i];r[o.name]=n&&Ut(o)?o:qr(o,t)}return r}function Kt(t,n){for(var r=0,i=n;r<i.length;r++){var a=i[r];e.hasProperty(t,a.name)||(t[a.name]=a)}}function Vt(e){if(!e.declaredProperties){var t=e.symbol;e.declaredProperties=de(t.members),e.declaredCallSignatures=Nn(t.members.__call),e.declaredConstructSignatures=Nn(t.members.__new),e.declaredStringIndexType=Ln(t,0),e.declaredNumberIndexType=Ln(t,1)}return e}function jt(t,n){return 4096&t.flags?jn(t.target,e.concatenate(t.typeArguments,[n||t.target.thisType])):t}function Wt(t,n,r,i){var a=Br,o=n.symbol.members,s=n.declaredCallSignatures,u=n.declaredConstructSignatures,c=n.declaredStringIndexType,l=n.declaredNumberIndexType;e.rangeEquals(r,i,0,r.length)||(a=Pr(r,i),o=Bt(n.declaredProperties,a,1===r.length),s=Ir(n.declaredCallSignatures,a,Wr),u=Ir(n.declaredConstructSignatures,a,Wr),c=Hr(n.declaredStringIndexType,a),l=Hr(n.declaredNumberIndexType,a));var p=At(n);if(p.length){o===n.symbol.members&&(o=Ft(n.declaredProperties));for(var f=e.lastOrUndefined(i),d=0,m=p;d<m.length;d++){var h=m[d],y=f?jt(Hr(h,a),f):h;Kt(o,sn(y)),s=e.concatenate(s,_n(y,0)),u=e.concatenate(u,_n(y,1)),c=c||vn(y,0),l=l||vn(y,1)}}me(t,o,s,u,c,l)}function qt(e){Wt(e,Vt(e),jp,jp)}function zt(t){var n=Vt(t.target),r=e.concatenate(n.typeParameters,[n.thisType]);Wt(t,n,r,t.typeArguments&&t.typeArguments.length===r.length?t.typeArguments:e.concatenate(t.typeArguments,[t]))}function Ht(e,t,n,r,i,a,o,s){var u=new Bp($p);return u.declaration=e,u.typeParameters=t,u.parameters=n,u.resolvedReturnType=r,u.typePredicate=i,u.minArgumentCount=a,u.hasRestParameter=o,u.hasStringLiterals=s,u}function Yt(e){return Ht(e.declaration,e.typeParameters,e.parameters,e.resolvedReturnType,e.typePredicate,e.minArgumentCount,e.hasRestParameter,e.hasStringLiterals)}function Jt(t){var n=St(t),r=_n(n,1);if(0===r.length)return[Ht(void 0,t.localTypeParameters,jp,t,void 0,0,!1,!1)];for(var i=gt(t),a=e.map(i.typeArguments,Rr),o=a?a.length:0,s=[],u=0,c=r;u<c.length;u++){var l=c[u],p=l.typeParameters?l.typeParameters.length:0;if(p===o){var f=p?Rn(l,a):Yt(l);f.typeParameters=t.localTypeParameters,f.resolvedReturnType=t,s.push(f)}}return s}function Gt(e){for(var t={},n=0;n<e.length;n++){var r=u(67108868,\"\"+n);r.type=e[n],t[n]=r}return t}function Xt(e){var t=vr(e.elementTypes,!0),n=on(ar(gf,[t,e])),r=Gt(e.elementTypes);Kt(r,n.properties),me(e,r,n.callSignatures,n.constructSignatures,n.stringIndexType,n.numberIndexType)}function $t(e,t,n,r){for(var i=0,a=e;i<a.length;i++){var o=a[i];if(hi(o,t,n,r,$r))return o}}function Qt(t,n,r){if(n.typeParameters){if(r>0)return;for(var i=1;i<t.length;i++)if(!$t(t[i],n,!1,!1))return;return[n]}for(var a=void 0,i=0;i<t.length;i++){var o=i===r?n:$t(t[i],n,!0,!0);if(!o)return;e.contains(a,o)||(a||(a=[])).push(o)}return a}function Zt(t,n){for(var r=e.map(t,function(e){return _n(e,n)}),i=void 0,a=0;a<r.length;a++)for(var o=0,s=r[a];o<s.length;o++){var u=s[o];if(!i||!$t(i,u,!1,!0)){var c=Qt(r,u,a);if(c){var l=u;c.length>1&&(l=Yt(u),l.resolvedReturnType=void 0,l.unionSignatures=c),(i||(i=[])).push(l)}}}return i||jp}function en(e,t){for(var n=[],r=0,i=e;r<i.length;r++){var a=i[r],o=vn(a,t);if(!o)return;n.push(o)}return vr(n)}function tn(e){me(e,Wp,Zt(e.types,0),Zt(e.types,1),en(e.types,0),en(e.types,1))}function nn(e,t){return e?t?Sr([e,t]):e:t}function rn(t){for(var n=jp,r=jp,i=void 0,a=void 0,o=0,s=t.types;o<s.length;o++){var u=s[o];n=e.concatenate(n,_n(u,0)),r=e.concatenate(r,_n(u,1)),i=nn(i,vn(u,0)),a=nn(a,vn(u,1))}me(t,Wp,n,r,i,a)}function an(e){var t=e.symbol;if(e.target){var n=Bt(sn(e.target),e.mapper,!1),r=Ir(_n(e.target,0),e.mapper,Wr),i=Ir(_n(e.target,1),e.mapper,Wr),a=Hr(vn(e.target,0),e.mapper),o=Hr(vn(e.target,1),e.mapper);me(e,n,r,i,a,o)}else if(2048&t.flags){var n=t.members,r=Nn(n.__call),i=Nn(n.__new),a=Ln(t,0),o=Ln(t,1);me(e,n,r,i,a,o)}else{var n=Wp,i=jp;if(1952&t.flags&&(n=Z(t)),32&t.flags){var s=wt(t);i=Nn(t.members.__constructor),i.length||(i=Jt(s));var u=St(s);80896&u.flags&&(n=Ft(de(n)),Kt(n,sn(u)))}var o=384&t.flags?tf:void 0;me(e,n,jp,i,void 0,o),8208&t.flags&&(e.callSignatures=Nn(t))}}function on(e){return e.members||(4096&e.flags?zt(e):3072&e.flags?qt(e):65536&e.flags?an(e):8192&e.flags?Xt(e):16384&e.flags?tn(e):32768&e.flags&&rn(e)),e}function sn(e){return 80896&e.flags?on(e).properties:jp}function un(t,n){if(80896&t.flags){var r=on(t);if(e.hasProperty(r.members,n)){var i=r.members[n];if(se(i))return i}}}function cn(e){for(var t=0,n=e.types;t<n.length;t++){for(var r=n[t],i=0,a=ln(r);i<a.length;i++){mn(e,a[i].name)}if(16384&e.flags)break}return e.resolvedProperties?An(e.resolvedProperties):jp}function ln(e){return e=fn(e),49152&e.flags?cn(e):sn(e)}function pn(e){if(!e.resolvedApparentType){for(var t=Fn(e);t&&512&t.flags;)t=Fn(t);e.resolvedApparentType=jt(t||lf,e)}return e.resolvedApparentType}function fn(e){return 512&e.flags&&(e=pn(e)),258&e.flags?e=vf:132&e.flags?e=bf:8&e.flags?e=Sf:16777216&e.flags&&(e=Ef),e}function dn(t,n){for(var r,i=t.types,a=32768&t.flags?536870912:0,o=0,s=i;o<s.length;o++){var c=s[o],l=fn(c);if(l!==cf){var p=hn(l,n);if(!p||48&ao(p)){if(16384&t.flags)return}else a&=p.flags,r?e.contains(r,p)||r.push(p):r=[p]}}if(r){if(1===r.length)return r[0];for(var f=[],d=[],m=0,h=r;m<h.length;m++){var p=h[m];p.declarations&&e.addRange(d,p.declarations),f.push(ct(p))}var y=u(335544324|a,n);return y.containingType=t,y.declarations=d,y.type=16384&t.flags?vr(f):Sr(f),y}}function mn(t,n){var r=t.resolvedProperties||(t.resolvedProperties={});if(e.hasProperty(r,n))return r[n];var i=dn(t,n);return i&&(r[n]=i),i}function hn(t,n){if(t=fn(t),80896&t.flags){var r=on(t);if(e.hasProperty(r.members,n)){var i=r.members[n];if(se(i))return i}if(r===df||r.callSignatures.length||r.constructSignatures.length){var i=un(_f,n);if(i)return i}return un(yf,n)}if(49152&t.flags)return mn(t,n)}function yn(e,t){if(130048&e.flags){var n=on(e);return 0===t?n.callSignatures:n.constructSignatures}return jp}function _n(e,t){return yn(fn(e),t)}function gn(e,t){if(130048&e.flags){var n=on(e);return 0===t?n.stringIndexType:n.numberIndexType}}function vn(e,t){return gn(fn(e),t)}function bn(t){if(32&t.parserContextFlags){var n=e.getJSDocTemplateTag(t);if(n)return Sn(n.typeParameters)}}function Sn(t){var n=[];return e.forEach(t,function(t){var r=Rt(t.symbol);e.contains(n,r)||n.push(r)}),n}function An(e){var t=[];for(var n in e)fe(n)||t.push(e[n]);return t}function Tn(t){if(32&t.parserContextFlags){if(t.type&&263===t.type.kind)return!0;var n=e.getCorrespondingJSDocParameterTag(t);if(n){if(n.isBracketed)return!0;if(n.typeExpression)return 263===n.typeExpression.type.kind}}if(e.hasQuestionToken(t))return!0;if(t.initializer){var r=t.parent,i=Cn(r),a=e.indexOf(r.parameters,t);return e.Debug.assert(a>=0),a>=i.minArgumentCount}return!1}function En(e){if(69===e.parameterName.kind){var t=e.parameterName;return{kind:1,parameterName:t?t.text:void 0,parameterIndex:t?js(e.parent.parameters,t):void 0,type:Rr(e.type)}}return{kind:0,type:Rr(e.type)}}function Cn(t){var n=g(t);if(!n.resolvedSignature){for(var r=145===t.kind?wt(re(t.parent.symbol)):void 0,i=r?r.localTypeParameters:t.typeParameters?Sn(t.typeParameters):bn(t),a=[],o=!1,s=-1,u=e.isJSDocConstructSignature(t),c=void 0,l=void 0,p=u?1:0,f=t.parameters.length;p<f;p++){var d=t.parameters[p],m=d.symbol;if(m&&4&m.flags&&!e.isBindingPattern(d.name)){m=T(d,m.name,107455,void 0,void 0)}a.push(m),d.type&&163===d.type.kind&&(o=!0),d.initializer||d.questionToken||d.dotDotDotToken?s<0&&(s=p):s=-1}if(s<0&&(s=t.parameters.length),u)s--,c=Rr(t.parameters[0].type);else if(r)c=r;else if(t.type)c=Rr(t.type),151===t.type.kind&&(l=En(t.type));else{if(32&t.parserContextFlags){var h=Qo(t);h&&h!==cf&&(c=h)}if(146===t.kind&&!e.hasDynamicName(t)){var y=e.getDeclarationOfKind(t.symbol,147);c=rt(y)}!c&&e.nodeIsMissing(t.body)&&(c=ef)}n.resolvedSignature=Ht(t,i,a,c,l,s,e.hasRestParameter(t),o)}return n.resolvedSignature}function Nn(e){if(!e)return jp;for(var t=[],n=0,r=e.declarations.length;n<r;n++){var i=e.declarations[n];switch(i.kind){case 153:case 154:case 216:case 144:case 143:case 145:case 148:case 149:case 150:case 146:case 147:case 176:case 177:case 264:if(n>0&&i.body){var a=e.declarations[n-1];if(i.parent===a.parent&&i.kind===a.kind&&i.pos===a.end)break}t.push(Cn(i))}}return t}function wn(e){var t=Y(e,e);if(t){var n=G(t);if(n)return ct(n)}return ef}function kn(t){if(!t.resolvedReturnType){if(!Oe(t,3))return cf;var n=void 0;if(n=t.target?Hr(kn(t.target),t.mapper):t.unionSignatures?vr(e.map(t.unionSignatures,kn)):es(t.declaration),!Be()&&(n=ef,qp.noImplicitAny)){var r=t.declaration;r.name?s(r.name,e.Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions,e.declarationNameToString(r.name)):s(r,e.Diagnostics.Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions)}t.resolvedReturnType=n}return t.resolvedReturnType}function xn(t){if(t.hasRestParameter){var n=ct(e.lastOrUndefined(t.parameters));if(4096&n.flags&&n.target===gf)return n.typeArguments[0]}return ef}function Rn(e,t){return Wr(e,Pr(e.typeParameters,t),!0)}function In(e){return e.typeParameters?(e.erasedSignatureCache||(e.target?e.erasedSignatureCache=Wr(In(e.target),e.mapper):e.erasedSignatureCache=Wr(e,Ur(e.typeParameters),!0)),e.erasedSignatureCache):e}function Dn(e){if(!e.isolatedSignatureType){var t=145===e.declaration.kind||149===e.declaration.kind,n=pe(327680);n.members=Wp,n.properties=jp,n.callSignatures=t?jp:[e],n.constructSignatures=t?[e]:jp,e.isolatedSignatureType=n}return e.isolatedSignatureType}function Mn(e){return e.members.__index}function Pn(e,t){var n=1===t?128:130,r=Mn(e);if(r)for(var i=0,a=r.declarations;i<a.length;i++){var o=a[i],s=o;if(1===s.parameters.length){var u=s.parameters[0];if(u&&u.type&&u.type.kind===n)return s}}}function Ln(e,t){var n=Pn(e,t);return n?n.type?Rr(n.type):ef:void 0}function On(t){return e.getDeclarationOfKind(t.symbol,138).constraint}function Un(t,n){for(var r;t&&!(33554432&t.flags)&&512&t.flags&&!e.contains(r,t);){if(t===n)return!0;(r||(r=[])).push(t);var i=On(t);t=i&&Rr(i)}return!1}function Fn(t){if(!t.constraint)if(t.target){var n=Fn(t.target);t.constraint=n?Hr(n,t.mapper):zf}else{var r=On(t),i=Rr(r);Un(i,t)&&(s(r,e.Diagnostics.Type_parameter_0_has_a_circular_constraint,xe(t)),i=cf),t.constraint=i}return t.constraint===zf?void 0:t.constraint}function Bn(t){return ie(e.getDeclarationOfKind(t.symbol,138).parent)}function Kn(e){if(e)switch(e.length){case 1:return\"\"+e[0].id;case 2:return e[0].id+\",\"+e[1].id;default:for(var t=\"\",n=0;n<e.length;n++)n>0&&(t+=\",\"),t+=e[n].id;return t}return\"\"}function Vn(e){for(var t=0,n=0,r=e;n<r.length;n++){t|=r[n].flags}return 14680064&t}function jn(e,t){var n=Kn(t),r=e.instantiations[n];if(!r){var i=4096|(t?Vn(t):0);r=e.instantiations[n]=pe(i,e.symbol),r.target=e,r.typeArguments=t}return r}function Wn(t,n){var r=Dt(n),i=r.localTypeParameters;return i?t.typeArguments&&t.typeArguments.length===i.length?jn(r,e.concatenate(r.outerTypeParameters,e.map(t.typeArguments,Rr))):(s(t,e.Diagnostics.Generic_type_0_requires_1_type_argument_s,xe(r,void 0,1),i.length),cf):t.typeArguments?(s(t,e.Diagnostics.Type_0_is_not_generic,xe(r)),cf):r}function qn(t,n){var r=Dt(n),i=_(n),a=i.typeParameters;if(a){if(!t.typeArguments||t.typeArguments.length!==a.length)return s(t,e.Diagnostics.Generic_type_0_requires_1_type_argument_s,we(n),a.length),cf;var o=e.map(t.typeArguments,Rr),u=Kn(o);return i.instantiations[u]||(i.instantiations[u]=Hr(r,Pr(a,o)))}return t.typeArguments?(s(t,e.Diagnostics.Type_0_is_not_generic,we(n)),cf):r}function zn(t,n){return t.typeArguments?(s(t,e.Diagnostics.Type_0_is_not_generic,we(n)),cf):Dt(n)}function Hn(t){switch(t.kind){case 152:return t.typeName;case 262:return t.name;case 191:if(e.isSupportedExpressionWithTypeArguments(t))return t.expression}}function Yn(e,t){return t?H(t,793056)||Qp:Qp}function Jn(e,t){return t===Qp?cf:96&t.flags?Wn(e,t):524288&t.flags?qn(e,t):107455&t.flags&&262===e.kind?ct(t):zn(e,t)}function Gn(t){var n=g(t);if(!n.resolvedType){var r=void 0,i=void 0;if(262===t.kind){r=Yn(t,Hn(t)),i=Jn(t,r),n.resolvedSymbol=r,n.resolvedType=i}else{var a=152===t.kind?t.typeName:e.isSupportedExpressionWithTypeArguments(t)?t.expression:void 0;r=a&&H(a,793056)||Qp,i=r===Qp?cf:96&r.flags?Wn(t,r):524288&r.flags?qn(t,r):zn(t,r)}n.resolvedSymbol=r,n.resolvedType=i}return n.resolvedType}function Xn(e){var t=g(e);return t.resolvedType||(t.resolvedType=wi(Os(e.exprName))),t.resolvedType}function $n(t,n){function r(e){for(var t=e.declarations,n=0,r=t;n<r.length;n++){var i=r[n];switch(i.kind){case 217:case 218:case 220:return i}}}if(!t)return n?ff:lf;var i=Dt(t);return 80896&i.flags?(i.typeParameters?i.typeParameters.length:0)!==n?(s(r(t),e.Diagnostics.Global_type_0_must_have_1_type_parameter_s,t.name,n),n?ff:lf):i:(s(r(t),e.Diagnostics.Global_type_0_must_be_a_class_or_interface_type,t.name),n?ff:lf)}function Qn(t){return er(t,107455,e.Diagnostics.Cannot_find_global_value_0)}function Zn(t){return er(t,793056,e.Diagnostics.Cannot_find_global_type_0)}function er(e,t,n){return T(void 0,e,t,n,e)}function tr(e,t){return void 0===t&&(t=0),$n(Zn(e),t)}function nr(e,t){var n=er(e,1536,void 0),r=n&&b(n.exports,t,793056);return r&&Dt(r)}function rr(){return mf||(mf=Qn(\"Symbol\"))}function ir(e){var t=Mf();return t!==ff?jn(t,[e]):lf}function ar(e,t){return e!==ff?jn(e,t):lf}function or(e){return ar(Cf,[e])}function sr(e){return ar(wf,[e])}function ur(e){return ar(gf,[e])}function cr(e){var t=g(e);return t.resolvedType||(t.resolvedType=ur(Rr(e.elementType))),t.resolvedType}function lr(e){var t=Kn(e);return Gf[t]||(Gf[t]=pr(e))}function pr(e){var t=pe(8192|Vn(e));return t.elementTypes=e,t}function fr(t){var n=g(t);return n.resolvedType||(n.resolvedType=lr(e.map(t.elementTypes,Rr))),n.resolvedType}function dr(t,n,r){n.flags&r?mr(t,n.types,r):e.contains(t,n)||t.push(n)}function mr(e,t,n){for(var r=0,i=t;r<i.length;r++){dr(e,i[r],n)}}function hr(e,t){for(var n=0,r=t.length;n<r;n++)if(e!==t[n]&&Zr(e,t[n]))return!0;return!1}function yr(e){for(var t=e.length;t>0;)t--,hr(e[t],e)&&e.splice(t,1)}function _r(e){for(var t=0,n=e;t<n.length;t++){if(We(n[t]))return!0}return!1}function gr(e,t){for(var n=e.length;n>0&&e.length>1;)n--,e[n]===t&&e.splice(n,1)}function vr(e,t){if(0===e.length)return pf;var n=[];if(mr(n,e,16384),_r(n))return ef;if(t?(gr(n,sf),gr(n,uf)):yr(n),1===n.length)return n[0];var r=Kn(n),i=Xf[r];return i||(i=Xf[r]=pe(16384|Vn(n)),i.types=n),i}function br(t){var n=g(t);return n.resolvedType||(n.resolvedType=vr(e.map(t.types,Rr),!0)),n.resolvedType}function Sr(e){if(0===e.length)return lf;var t=[];if(mr(t,e,32768),_r(t))return ef;if(1===t.length)return t[0];var n=Kn(t),r=$f[n];return r||(r=$f[n]=pe(32768|Vn(t)),r.types=t),r}function Ar(t){var n=g(t);return n.resolvedType||(n.resolvedType=Sr(e.map(t.types,Rr))),n.resolvedType}function Tr(e){var t=g(e);return t.resolvedType||(t.resolvedType=pe(65536,e.symbol)),t.resolvedType}function Er(t){if(e.hasProperty(Qf,t))return Qf[t];var n=Qf[t]=ce(256);return n.text=t,n}function Cr(e){var t=g(e);return t.resolvedType||(t.resolvedType=Er(e.text)),t.resolvedType}function Nr(e){var t=g(e);if(!t.resolvedType){var n=Rr(e.type);t.resolvedType=n?ur(n):cf}return t.resolvedType}function wr(t){var n=g(t);if(!n.resolvedType){var r=e.map(t.types,Rr);n.resolvedType=lr(r)}return n.resolvedType}function kr(t){var n=e.getThisContainer(t,!1),r=n&&n.parent;return!r||!e.isClassLike(r)&&218!==r.kind||64&n.flags||145===n.kind&&!e.isNodeDescendentOf(t,n.body)?(s(t,e.Diagnostics.A_this_type_is_available_only_in_a_non_static_member_of_a_class_or_interface),cf):wt(ie(r)).thisType}function xr(e){var t=g(e);return t.resolvedType||(t.resolvedType=kr(e)),t.resolvedType}function Rr(e){switch(e.kind){case 117:case 253:case 254:return ef;case 130:return tf;case 128:return nf;case 120:return rf;case 131:return af;case 103:return of;case 162:return xr(e);case 163:return Cr(e);case 152:case 262:return Gn(e);case 151:return rf;case 191:return Gn(e);case 155:return Xn(e);case 157:case 255:return cr(e);case 158:return fr(e);case 159:case 256:return br(e);case 160:return Ar(e);case 161:case 258:case 259:case 266:case 267:case 263:return Rr(e.type);case 153:case 154:case 156:case 264:case 260:return Tr(e);case 69:case 136:var t=ul(e);return t&&Dt(t);case 257:return wr(e);case 265:return Nr(e);default:return cf}}function Ir(e,t,n){if(e&&e.length){for(var r=[],i=0,a=e;i<a.length;i++){var o=a[i];r.push(n(o,t))}return r}return e}function Dr(e,t){return function(n){return n===e?t:n}}function Mr(e,t,n,r){return function(i){return i===e?t:i===n?r:i}}function Pr(e,t){switch(e.length){case 1:return Dr(e[0],t[0]);case 2:return Mr(e[0],t[0],e[1],t[1])}return function(n){for(var r=0;r<e.length;r++)if(n===e[r])return t[r];return n}}function Lr(e){return function(t){return t===e?ef:t}}function Or(e,t){return function(n){return n===e||n===t?ef:n}}function Ur(e){switch(e.length){case 1:return Lr(e[0]);case 2:return Or(e[0],e[1])}return function(t){for(var n=0,r=e;n<r.length;n++){if(t===r[n])return ef}return t}}function Fr(e){if(!e.mapper){var t=function(t){for(var n=e.typeParameters,r=0;r<n.length;r++)if(t===n[r])return e.inferences[r].isFixed=!0,Fi(e,r);return t};t.context=e,e.mapper=t}return e.mapper}function Br(e){return e}function Kr(e,t){return function(n){return Hr(e(n),t)}}function Vr(e){var t=ce(512);return t.symbol=e.symbol,t.target=e,t}function jr(t,n){return e.isIdentifierTypePredicate(t)?{kind:1,parameterName:t.parameterName,parameterIndex:t.parameterIndex,type:Hr(t.type,n)}:{kind:0,type:Hr(t.type,n)}}function Wr(t,n,r){var i,a;if(t.typeParameters&&!r){i=e.map(t.typeParameters,Vr),n=Kr(Pr(t.typeParameters,i),n);for(var o=0,s=i;o<s.length;o++){s[o].mapper=n}}t.typePredicate&&(a=jr(t.typePredicate,n));var u=Ht(t.declaration,i,Ir(t.parameters,n,qr),Hr(t.resolvedReturnType,n),a,t.minArgumentCount,t.hasRestParameter,t.hasStringLiterals);return u.target=t,u.mapper=n,u}function qr(e,t){if(16777216&e.flags){var n=_(e);e=n.target,t=Kr(n.mapper,t)}var r=u(83886080|e.flags,e.name);return r.declarations=e.declarations,r.parent=e.parent,r.target=e,r.mapper=t,e.valueDeclaration&&(r.valueDeclaration=e.valueDeclaration),r}function zr(e,t){if(t.instantiations){var n=t.instantiations[e.id];if(n)return n}else t.instantiations=[];var r=pe(196608,e.symbol);return r.target=e,r.mapper=t,t.instantiations[e.id]=r,r}function Hr(e,t){if(e&&t!==Br){if(512&e.flags)return t(e);if(65536&e.flags)return e.symbol&&14384&e.symbol.flags?zr(e,t):e;if(4096&e.flags)return jn(e.target,Ir(e.typeArguments,t,Hr));if(8192&e.flags)return lr(Ir(e.elementTypes,t,Hr));if(16384&e.flags)return vr(Ir(e.types,t,Hr),!0);if(32768&e.flags)return Sr(Ir(e.types,t,Hr))}return e}function Yr(t){switch(e.Debug.assert(144!==t.kind||e.isObjectLiteralMethod(t)),t.kind){case 176:case 177:return Jr(t);case 168:return e.forEach(t.properties,Yr);case 167:return e.forEach(t.elements,Yr);case 185:return Yr(t.whenTrue)||Yr(t.whenFalse);case 184:return 52===t.operatorToken.kind&&(Yr(t.left)||Yr(t.right));case 248:return Yr(t.initializer);case 144:case 143:return Jr(t);case 175:return Yr(t.expression)}return!1}function Jr(t){return!t.typeParameters&&t.parameters.length&&!e.forEach(t.parameters,function(e){return e.type})}function Gr(e){if(80896&e.flags){var t=on(e);if(t.constructSignatures.length){var n=pe(65536,e.symbol);n.members=t.members,n.properties=t.properties,n.callSignatures=jp,n.constructSignatures=jp,e=n}}return e}function Xr(e,t){return ci(e,t,dd,void 0)}function $r(e,t){return ci(e,t,dd,void 0)?-1:0}function Qr(e,t){return ci(e,t,fd,void 0)?-1:0}function Zr(e,t){return ti(e,t,void 0)}function ei(e,t){return ni(e,t,void 0)}function ti(e,t,n,r,i){return ci(e,t,pd,n,r,i)}function ni(e,t,n,r,i){return ci(e,t,fd,n,r,i)}function ri(e,t,n){return 0!==ii(e,t,n,!1,void 0,Qr)}function ii(t,n,r,i,a,o){if(t===n)return-1;if(!n.hasRestParameter&&t.minArgumentCount>n.parameters.length)return 0;t=In(t),n=In(n);for(var s=-1,u=si(t),c=si(n),l=ui(t,u,n,c),p=t.parameters,f=n.parameters,d=0;d<l;d++){var m=d<u?ct(p[d]):xn(t),h=d<c?ct(f[d]):xn(n),y=o(h,m,!1)||o(m,h,i);if(!y)return i&&a(e.Diagnostics.Types_of_parameters_0_and_1_are_incompatible,p[d<u?d:u].name,f[d<c?d:c].name),0;s&=y}if(!r){var _=kn(n);if(_===of)return s;var g=kn(t);if(n.typePredicate){if(t.typePredicate)s&=ai(t.typePredicate,n.typePredicate,i,a,o);else if(e.isIdentifierTypePredicate(n.typePredicate))return i&&a(e.Diagnostics.Signature_0_must_have_a_type_predicate,ke(t)),0}else s&=o(g,_,i)}return s}function ai(t,n,r,i,a){if(t.kind!==n.kind)return r&&(i(e.Diagnostics.A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Re(t),Re(n))),0;if(1===t.kind){var o=t,s=n;if(o.parameterIndex!==s.parameterIndex)return r&&(i(e.Diagnostics.Parameter_0_is_not_in_the_same_position_as_parameter_1,o.parameterName,s.parameterName),i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Re(t),Re(n))),0}var u=a(t.type,n.type,r);return 0===u&&r&&i(e.Diagnostics.Type_predicate_0_is_not_assignable_to_1,Re(t),Re(n)),u}function oi(e,t){var n=In(e),r=In(t),i=kn(n),a=kn(r);return!(a!==of&&!ci(a,i,fd,void 0)&&!ci(i,a,fd,void 0))&&ri(n,r,!0)}function si(e){var t=e.parameters.length;return e.hasRestParameter?t-1:t}function ui(e,t,n,r){return e.hasRestParameter===n.hasRestParameter?e.hasRestParameter?Math.max(t,r)+1:Math.min(t,r):e.hasRestParameter?r:t}function ci(t,n,r,i,a,o){function u(t,n,r,a){e.Debug.assert(!!i),R=e.chainDiagnosticMessages(R,t,n,r,a)}function c(t,n,r){var i=xe(n),a=xe(r);i===a&&(i=xe(n,void 0,128),a=xe(r,void 0,128)),u(t||e.Diagnostics.Type_0_is_not_assignable_to_type_1,i,a)}function l(e,t,n,i){var a;if(e===t)return-1;if(r===dd)return p(e,t);if(We(t))return-1;if(e===sf)return-1;if(e===uf&&t!==sf)return-1;if(128&e.flags&&t===nf)return-1;if(128&e.flags&&128&t.flags&&(a=x(e,t)))return a;if(256&e.flags&&t===tf)return-1;if(r===fd){if(We(e))return-1;if(e===nf&&128&t.flags)return-1}if(8&e.flags&&8&t.flags)return-1;if(1048576&e.flags){if(d(e,t,n))return n&&c(i,e,t),0;49152&t.flags&&(e=Ci(e))}var o=R;if(16384&e.flags){if(a=g(e,t,n))return a}else if(32768&t.flags){if(a=y(e,t,n))return a}else{if(32768&e.flags&&(a=_(e,t,n&&!(16384&t.flags))))return a;if(16384&t.flags&&(a=h(e,t,n)))return a}if(512&e.flags){var s=Fn(e);(!s||1&s.flags)&&(s=lf);if(a=l(s,t,n&&s!==lf))return R=o,a}else{if(4096&e.flags&&4096&t.flags&&e.target===t.target&&(a=v(e,t,n)))return a;var u=fn(e);if(113664&u.flags&&80896&t.flags){if(a=b(u,e,t,n&&R===o&&!(16777726&e.flags)))return R=o,a}}return n&&c(i,e,t),0}function p(e,t){var n;return 80896&e.flags&&80896&t.flags?4096&e.flags&&4096&t.flags&&e.target===t.target&&(n=v(e,t,!1))?n:b(e,e,t,!1):(16384&e.flags&&16384&t.flags||32768&e.flags&&32768&t.flags)&&(n=m(e,t))&&(n&=m(t,e))?n:0}function f(e,t){if(80896&e.flags){var n=on(e);if(r===fd&&(e===yf||0===n.properties.length)||n.stringIndexType||n.numberIndexType||hn(e,t))return!0}else if(49152&e.flags)for(var i=0,a=e.types;i<a.length;i++){var o=a[i];if(f(o,t))return!0}return!1}function d(t,n,r){if(!(67108864&n.flags)&&ms(n,80896))for(var a=0,o=sn(t);a<o.length;a++){var s=o[a];if(!f(n,s.name))return r&&(e.Debug.assert(!!i),i=s.valueDeclaration,u(e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,we(s),xe(n))),!0}return!1}function m(e,t){for(var n=-1,r=e.types,i=0,a=r;i<a.length;i++){var o=a[i],s=h(o,t,!1);if(!s)return 0;n&=s}return n}function h(e,t,n){for(var r=t.types,i=0,a=r.length;i<a;i++){var o=l(e,r[i],n&&i===a-1);if(o)return o}return 0}function y(e,t,n){for(var r=-1,i=t.types,a=0,o=i;a<o.length;a++){var s=o[a],u=l(e,s,n);if(!u)return 0;r&=u}return r}function _(e,t,n){for(var r=e.types,i=0,a=r.length;i<a;i++){var o=l(r[i],t,n&&i===a-1);if(o)return o}return 0}function g(e,t,n){for(var r=-1,i=e.types,a=0,o=i;a<o.length;a++){var s=o[a],u=l(s,t,n);if(!u)return 0;r&=u}return r}function v(e,t,n){var i=e.typeArguments||jp,a=t.typeArguments||jp;if(i.length!==a.length&&r===dd)return 0;for(var o=i.length<=a.length?i.length:a.length,s=-1,u=0;u<o;u++){var c=l(i[u],a[u],n);if(!c)return 0;s&=c}return s}function b(t,n,i,a){if(O)return 0;var o=r!==dd||t.id<i.id?t.id+\",\"+i.id:i.id+\",\"+t.id,s=r[o];if(void 0!==s){if(!a||2!==s)return 1===s?-1:0;r[o]=3}if(L>0){for(var u=0;u<L;u++)if(M[u][o])return 1;if(100===L)return O=!0,0}else I=[],D=[],M=[],P=0;I[L]=t,D[L]=i,M[L]={},M[L][o]=1,L++;var c=P;1&P||!pi(t,I,L)||(P|=1),2&P||!pi(i,D,L)||(P|=2);var l;if(3===P?l=1:(l=S(t,i,a))&&(l&=T(t,i,0,a))&&(l&=T(t,i,1,a))&&(l&=N(t,n,i,a))&&(l&=w(t,n,i,a)),P=c,L--,l){var p=M[L],f=l===-1||0===L?r:M[L-1];e.copyMap(p,f)}else r[o]=a?3:2;return l}function S(t,n,i){if(r===dd)return A(t,n);for(var a=-1,o=sn(n),s=r===pd&&!(524288&t.flags),c=0,p=o;c<p.length;c++){var f=p[c],d=hn(t,f.name);if(d!==f)if(d){if(!(134217728&f.flags)){var m=ao(d),h=ao(f);if(16&m||16&h){if(d.valueDeclaration!==f.valueDeclaration)return i&&(16&m&&16&h?u(e.Diagnostics.Types_have_separate_declarations_of_a_private_property_0,we(f)):u(e.Diagnostics.Property_0_is_private_in_type_1_but_not_in_type_2,we(f),xe(16&m?t:n),xe(16&m?n:t))),0}else if(32&h){var y=d.parent&&32&d.parent.flags,_=y?Dt(ae(d)):void 0,g=Dt(ae(f));if(!_||!pt(_,g))return i&&u(e.Diagnostics.Property_0_is_protected_but_type_1_is_not_a_class_derived_from_2,we(f),xe(_||t),xe(g)),0}else if(32&m)return i&&u(e.Diagnostics.Property_0_is_protected_in_type_1_but_public_in_type_2,we(f),xe(t),xe(n)),0;var v=l(ct(d),ct(f),i);if(!v)return i&&u(e.Diagnostics.Types_of_property_0_are_incompatible,we(f)),0;if(a&=v,536870912&d.flags&&!(536870912&f.flags))return i&&u(e.Diagnostics.Property_0_is_optional_in_type_1_but_required_in_type_2,we(f),xe(t),xe(n)),0}}else if(!(536870912&f.flags)||s)return i&&u(e.Diagnostics.Property_0_is_missing_in_type_1,we(f),xe(t)),0}return a}function A(e,t){if(!(80896&e.flags&&80896&t.flags))return 0;var n=sn(e),r=sn(t);if(n.length!==r.length)return 0;for(var i=-1,a=0,o=n;a<o.length;a++){var s=o[a],u=un(t,s.name);if(!u)return 0;var c=di(s,u,l);if(!c)return 0;i&=c}return i}function T(t,n,i,a){if(r===dd)return C(t,n,i);if(n===df||t===df)return-1;var o=_n(t,i),s=_n(n,i);if(1===i&&o.length&&s.length&&li(t)&&!li(n))return a&&u(e.Diagnostics.Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type),0;var c=-1,l=R;e:for(var p=0,f=s;p<f.length;p++){var d=f[p];if(!d.hasStringLiterals||262144&n.flags){for(var m=a,h=0,y=o;h<y.length;h++){var _=y[h];if(!_.hasStringLiterals||262144&t.flags){var g=E(_,d,m);if(g){c&=g,R=l;continue e}m=!1}}return m&&u(e.Diagnostics.Type_0_provides_no_match_for_the_signature_1,xe(t),ke(d,void 0,void 0,i)),0}}return c}function E(e,t,n){return ii(e,t,!1,n,u,l)}function C(e,t,n){var r=_n(e,n),i=_n(t,n);if(r.length!==i.length)return 0;for(var a=-1,o=0,s=r.length;o<s;o++){var u=hi(r[o],i[o],!1,!1,l);if(!u)return 0;a&=u}return a}function N(t,n,i,a){if(r===dd)return k(0,t,i);var o=vn(i,0);if(o){if(1&o.flags&&!(16777726&n.flags))return-1;var s=vn(t,0);if(!s)return a&&u(e.Diagnostics.Index_signature_is_missing_in_type_0,xe(t)),0;var c=l(s,o,a);return c?c:(a&&u(e.Diagnostics.Index_signatures_are_incompatible),0)}return-1}function w(t,n,i,a){if(r===dd)return k(1,t,i);var o=vn(i,1);if(o){if(1&o.flags&&!(16777726&n.flags))return-1;var s=vn(t,0),c=vn(t,1);if(!s&&!c)return a&&u(e.Diagnostics.Index_signature_is_missing_in_type_0,xe(t)),0;var p=void 0;return p=s&&c?l(s,o,!1)||l(c,o,a):l(s||c,o,a),p?p:(a&&u(e.Diagnostics.Index_signatures_are_incompatible),0)}return-1}function k(e,t,n){var r=vn(n,e),i=vn(t,e);return i||r?i&&r?l(i,r):0:-1}function x(t,n){if(t.symbol.name!==n.symbol.name||128&t.symbol.flags||128&n.symbol.flags)return 0;for(var r=ct(n.symbol),i=0,a=ln(ct(t.symbol));i<a.length;i++){var o=a[i];if(8&o.flags){var s=hn(r,o.name);if(!(s&&8&s.flags))return u(e.Diagnostics.Property_0_is_missing_in_type_1,o.name,xe(n,void 0,128)),0}}return-1}var R,I,D,M,P,L=0,O=!1;e.Debug.assert(r!==dd||!i,\"no error reporting in identity checking\");var U=l(t,n,!!i,a);return O?s(i,e.Diagnostics.Excessive_stack_depth_comparing_types_0_and_1,xe(t),xe(n)):R&&(o&&(R=e.concatenateDiagnosticMessageChains(o,R)),sd.add(e.createDiagnosticForNodeFromMessageChain(i,R))),0!==U}function li(e){if(65536&e.flags){var t=e.symbol;if(t&&32&t.flags){var n=vc(t);if(n&&128&n.flags)return!0}}return!1}function pi(e,t,n){if(135168&e.flags&&n>=5)for(var r=e.symbol,i=0,a=0;a<n;a++){var o=t[a];if(135168&o.flags&&o.symbol===r&&++i>=5)return!0}return!1}function fi(e,t){return 0!==di(e,t,$r)}function di(e,t,n){if(e===t)return-1;var r=48&ao(e);if(r!==(48&ao(t)))return 0;if(r){if(gc(e)!==gc(t))return 0}else if((536870912&e.flags)!=(536870912&t.flags))return 0;return n(ct(e),ct(t))}function mi(e,t,n){return e.parameters.length===t.parameters.length&&e.minArgumentCount===t.minArgumentCount&&e.hasRestParameter===t.hasRestParameter||!!(n&&e.minArgumentCount<=t.minArgumentCount&&(e.hasRestParameter&&!t.hasRestParameter||e.hasRestParameter===t.hasRestParameter&&e.parameters.length>=t.parameters.length))}function hi(e,t,n,r,i){if(e===t)return-1;if(!mi(e,t,n))return 0;if((e.typeParameters?e.typeParameters.length:0)!==(t.typeParameters?t.typeParameters.length:0))return 0;e=In(e),t=In(t);for(var a=-1,o=t.parameters.length,s=0;s<o;s++){var u=yi(e,s)?xn(e):ct(e.parameters[s]),c=yi(t,s)?xn(t):ct(t.parameters[s]),l=i(u,c);if(!l)return 0;a&=l}return r||(a&=i(kn(e),kn(t))),a}function yi(e,t){return e.hasRestParameter&&t>=e.parameters.length-1}function _i(e,t){for(var n=0,r=t;n<r.length;n++){var i=r[n];if(e!==i&&!Zr(i,e))return!1}return!0}function gi(t){return e.forEach(t,function(e){return _i(e,t)?e:void 0})}function vi(t,n,r){for(var i,a,o=0,s=0;s<t.length;s++){for(var u=0,c=void 0,l=0;l<t.length;l++)Zr(t[l],t[s])?u++:c||(c=t[l]);if(e.Debug.assert(!!c,\"If there is no common supertype, each type should have a downfallType\"),u>o&&(i=t[s],a=c,o=u),o===t.length-1)break}ti(a,i,n,e.Diagnostics.Type_argument_candidate_1_is_not_a_valid_type_argument_because_it_is_not_a_supertype_of_candidate_0,r)}function bi(e){return 4096&e.flags&&e.target===gf}function Si(e){return!(96&e.flags)&&ei(e,kf)}function Ai(e){return!!hn(e,\"0\")}function Ti(e){return 256&e.flags}function Ei(e){return!!(8192&e.flags)}function Ci(e){if(1048576&e.flags){var t=e.regularType;return t||(t=ce(e.flags&-1048577),t.symbol=e.symbol,t.members=e.members,t.properties=e.properties,t.callSignatures=e.callSignatures,t.constructSignatures=e.constructSignatures,t.stringIndexType=e.stringIndexType,t.numberIndexType=e.numberIndexType,e.regularType=t),t}return e}function Ni(t){var n=sn(t),r={};e.forEach(n,function(e){var t=ct(e),n=wi(t);if(t!==n){var i=u(67108864|e.flags,e.name);i.declarations=e.declarations,i.parent=e.parent,i.type=n,i.target=e,e.valueDeclaration&&(i.valueDeclaration=e.valueDeclaration),e=i}r[e.name]=e});var i=vn(t,0),a=vn(t,1);return i&&(i=wi(i)),a&&(a=wi(a)),he(t.symbol,r,jp,jp,i,a)}function wi(t){if(6291456&t.flags){if(96&t.flags)return ef;if(524288&t.flags)return Ni(t);if(16384&t.flags)return vr(e.map(t.types,wi),!0);if(bi(t))return ur(wi(t.typeArguments[0]));if(Ei(t))return lr(e.map(t.elementTypes,wi))}return t}function ki(t){var n=!1;if(16384&t.flags)for(var r=0,i=t.types;r<i.length;r++){var a=i[r];ki(a)&&(n=!0)}if(bi(t))return ki(t.typeArguments[0]);if(Ei(t))for(var o=0,u=t.elementTypes;o<u.length;o++){var a=u[o];ki(a)&&(n=!0)}if(524288&t.flags)for(var c=0,l=sn(t);c<l.length;c++){var p=l[c],a=ct(p);2097152&a.flags&&(ki(a)||s(p.valueDeclaration,e.Diagnostics.Object_literal_s_property_0_implicitly_has_an_1_type,p.name,xe(wi(a))),n=!0)}return n}function xi(t,n){var r,i=xe(wi(n));switch(t.kind){case 142:case 141:r=e.Diagnostics.Member_0_implicitly_has_an_1_type;break;case 139:r=t.dotDotDotToken?e.Diagnostics.Rest_parameter_0_implicitly_has_an_any_type:e.Diagnostics.Parameter_0_implicitly_has_an_1_type;break;case 216:case 144:case 143:case 146:case 147:case 176:case 177:if(!t.name)return void s(t,e.Diagnostics.Function_expression_which_lacks_return_type_annotation_implicitly_has_an_0_return_type,i);r=e.Diagnostics._0_which_lacks_return_type_annotation_implicitly_has_an_1_return_type;break;default:r=e.Diagnostics.Variable_0_implicitly_has_an_1_type}s(t,r,e.declarationNameToString(t.name),i)}function Ri(e,t){i&&qp.noImplicitAny&&2097152&t.flags&&(ki(t)||xi(e,t))}function Ii(e,t,n){var r,i=e.parameters.length,a=t.parameters.length;e.hasRestParameter&&t.hasRestParameter?(r=i>a?i:a,i--,a--):e.hasRestParameter?(i--,r=a):t.hasRestParameter?(a--,r=i):r=i<a?i:a;for(var o=0;o<r;o++){n(o<i?ct(e.parameters[o]):xn(e),o<a?ct(t.parameters[o]):xn(t))}}function Di(t,n){return{typeParameters:t,inferUnionTypes:n,inferences:e.map(t,Mi),inferredTypes:new Array(t.length)}}function Mi(){return{primary:void 0,secondary:void 0,isFixed:!1}}function Pi(t,n,r){function i(e,t){for(var n=0;n<f;n++)if(e===l[n]&&t===p[n])return!0;return!1}function a(n,r){if(16384&n.flags&&16384&r.flags||32768&n.flags&&32768&r.flags){for(var u=void 0,m=0,h=r.types;m<h.length;m++){var y=h[m];Li(y,n.types)&&((u||(u=[])).push(y),a(y,y))}u&&(n=Oi(n,u),r=Oi(r,u))}if(512&r.flags){if(8388608&n.flags)return;for(var _=t.typeParameters,g=0;g<_.length;g++)if(r===_[g]){var v=t.inferences[g];if(!v.isFixed){var b=d?v.secondary||(v.secondary=[]):v.primary||(v.primary=[]);e.contains(b,n)||b.push(n)}return}}else if(4096&n.flags&&4096&r.flags&&n.target===r.target)for(var S=n.typeArguments||jp,A=r.typeArguments||jp,T=S.length<A.length?S.length:A.length,g=0;g<T;g++)a(S[g],A[g]);else if(8192&n.flags&&8192&r.flags&&n.elementTypes.length===r.elementTypes.length)for(var S=n.elementTypes,A=r.elementTypes,g=0;g<S.length;g++)a(S[g],A[g]);else if(49152&r.flags){for(var A=r.types,E=0,C=void 0,N=0,w=A;N<w.length;N++){var y=w[N];512&y.flags&&e.contains(t.typeParameters,y)?(C=y,E++):a(n,y)}16384&r.flags&&1===E&&(d++,a(n,C),d--)}else if(49152&n.flags)for(var S=n.types,k=0,x=S;k<x.length;k++){var R=x[k];a(R,r)}else if(n=fn(n),80896&n.flags&&(4096&r.flags&&r.typeArguments||8192&r.flags||65536&r.flags&&r.symbol&&10272&r.symbol.flags)){if(i(n,r))return;if(pi(n,l,f)&&pi(r,p,f))return;0===f&&(l=[],p=[]),l[f]=n,p[f]=r,f++,o(n,r),s(n,r,0),s(n,r,1),c(n,r,0,0),c(n,r,1,1),c(n,r,0,1),f--}}function o(e,t){for(var n=sn(t),r=0,i=n;r<i.length;r++){var o=i[r],s=un(e,o.name);s&&a(ct(s),ct(o))}}function s(e,t,n){for(var r=_n(e,n),i=_n(t,n),a=r.length,o=i.length,s=a<o?a:o,c=0;c<s;c++)u(In(r[a-s+c]),In(i[o-s+c]))}function u(e,t){Ii(e,t,a),e.typePredicate&&t.typePredicate&&e.typePredicate.kind===t.typePredicate.kind?a(e.typePredicate.type,t.typePredicate.type):a(kn(e),kn(t))}function c(e,t,n,r){var i=vn(t,r);if(i){var o=vn(e,n);o&&a(o,i)}}var l,p,f=0,d=0;a(n,r)}function Li(e,t){for(var n=0,r=t;n<r.length;n++){if(Xr(r[n],e))return!0}return!1}function Oi(e,t){for(var n=[],r=0,i=e.types;r<i.length;r++){var a=i[r];Li(a,t)||n.push(a)}return 16384&e.flags?vr(n,!0):Sr(n)}function Ui(e,t){var n=e.inferences[t];return n.primary||n.secondary||jp}function Fi(e,t){var n,r=e.inferredTypes[t];if(!r){var i=Ui(e,t);if(i.length){var a=e.inferUnionTypes?vr(i):gi(i);r=a?wi(a):cf,n=!!a}else r=lf,n=!0;if(e.inferredTypes[t]=r,n){var o=Fn(e.typeParameters[t]);if(o){var s=Hr(o,Fr(e));ei(r,jt(s,r))||(e.inferredTypes[t]=r=s)}}else(void 0===e.failedTypeParameterIndex||e.failedTypeParameterIndex>t)&&(e.failedTypeParameterIndex=t)}return r}function Bi(e){for(var t=0;t<e.inferredTypes.length;t++)Fi(e,t);return e.inferredTypes}function Ki(t){var n=g(t);return n.resolvedSymbol||(n.resolvedSymbol=!e.nodeIsMissing(t)&&T(t,t.text,1156031,e.Diagnostics.Cannot_find_name_0,t)||Qp),n.resolvedSymbol}function Vi(t){for(;t;)switch(t.kind){case 155:return!0;case 69:case 136:t=t.parent;continue;default:return!1}e.Debug.fail(\"should not get here\")}function ji(t){return!!(t.initializer||e.isBindingPattern(t.parent)&&ji(t.parent.parent))}function Wi(t,n){function r(n){if(n.operatorToken.kind>=56&&n.operatorToken.kind<=68){var r=zi(n.left);if(69===r.kind&&Ki(r)===t)return!0}return e.forEachChild(n,a)}function i(n){return!(e.isBindingPattern(n.name)||ie(n)!==t||!ji(n))||e.forEachChild(n,a)}function a(t){switch(t.kind){case 184:return r(t);case 214:case 166:return i(t);case 164:case 165:case 167:case 168:case 169:case 170:case 171:case 172:case 174:case 192:case 175:case 182:case 178:case 181:case 179:case 180:case 183:case 187:case 185:case 188:case 195:case 196:case 198:case 199:case 200:case 201:case 202:case 203:case 204:case 207:case 208:case 209:case 244:case 245:case 210:case 211:case 212:case 247:case 236:case 237:case 241:case 242:case 238:case 243:return e.forEachChild(t,a)}return!1}var o=g(n);if(o.assignmentChecks){var s=o.assignmentChecks[t.id];if(void 0!==s)return s}else o.assignmentChecks={};return o.assignmentChecks[t.id]=a(n)}function qi(t,n){function r(n,r,i){function a(e){return i===!!(e.flags&c)}if(179!==r.left.kind||9!==r.right.kind)return n;var o=r.left,s=r.right;if(69!==o.expression.kind||Ki(o.expression)!==t)return n;33===r.operatorToken.kind&&(i=!i);var u=ud[s.text];if(u&&u.type===sf)return n;var c;return u?c=u.flags:(i=!i,c=16777614),16384&n.flags?vr(e.filter(n.types,a),!0):i&&u&&Zr(u.type,n)?u.type:a(n)?n:pf}function i(e,t,n){return n?p(p(e,t.left,!0),t.right,!0):vr([p(e,t.left,!1),p(e,t.right,!1)])}function a(e,t,n){return n?vr([p(e,t.left,!0),p(e,t.right,!0)]):p(p(e,t.left,!1),t.right,!1)}function o(n,r,i){if(We(n)||69!==r.left.kind||Ki(r.left)!==t)return n;var a=Os(r.right);if(!Zr(a,_f))return n;var o,u=hn(a,\"prototype\");if(u){var c=ct(u);We(c)||(o=c)}if(!o){var l=void 0;2048&a.flags?l=Vt(a).declaredConstructSignatures:65536&a.flags&&(l=_n(a,1)),l&&l.length&&(o=vr(e.map(l,function(e){return kn(In(e))})))}return o?s(n,o,i):n}function s(t,n,r){if(!r)return 16384&t.flags?vr(e.filter(t.types,function(e){return!Zr(e,n)})):t;if(16384&t.flags){var i=e.filter(t.types,function(e){return ei(e,n)});if(i.length)return vr(i)}return ei(n,t)?n:t}function u(n,r,i){if(1&n.flags)return n;var a=Wo(r),o=a.typePredicate;if(!o)return n;if(!e.isIdentifierTypePredicate(o)){return c(n,o,zi(r.expression),i)}return r.arguments[o.parameterIndex]&&l(r.arguments[o.parameterIndex])===t?s(n,o.type,i):n}function c(e,n,r,i){if(170===r.kind||169===r.kind){var a=r,o=zi(a.expression);if(69===o.kind&&l(o)===t)return s(e,n.type,i)}return e}function l(e){switch(e=zi(e),e.kind){case 69:case 169:return sl(e)}}function p(e,t,n){switch(t.kind){case 171:return u(e,t,n);case 175:return p(e,t.expression,n);case 184:var s=t.operatorToken.kind;if(32===s||33===s)return r(e,t,n);if(51===s)return i(e,t,n);if(52===s)return a(e,t,n);if(91===s)return o(e,t,n);break;case 182:if(49===t.operator)return p(e,t.operand,!n)}return e}var f=ct(t);if(n&&3&t.flags&&(We(f)||97792&f.flags)){var d=e.getDeclarationOfKind(t,214),m=d&&Ke(d),h=f,y=[];e:for(;n.parent;){var _=n;switch(n=n.parent,n.kind){case 199:case 185:case 184:y.push({node:n,child:_});break;case 251:case 221:break e}if(n===m)break}for(var g=void 0;g=y.pop();){var v=g.node,_=g.child;switch(v.kind){case 199:_!==v.expression&&(f=p(f,v.expression,_===v.thenStatement));break;case 185:_!==v.condition&&(f=p(f,v.condition,_===v.whenTrue));break;case 184:_===v.right&&(51===v.operatorToken.kind?f=p(f,v.left,!0):52===v.operatorToken.kind&&(f=p(f,v.left,!1)));break;default:e.Debug.fail(\"Unreachable!\")}f!==h&&Wi(t,v)&&(f=h)}f===pf&&(f=h)}return f}function zi(e){for(;175===e.kind;)e=e.expression;return e}function Hi(t){var n=Ki(t);if(n===Xp){var r=e.getContainingFunction(t);177===r.kind&&zp<2&&s(t,e.Diagnostics.The_arguments_object_cannot_be_referenced_in_an_arrow_function_in_ES3_and_ES5_Consider_using_a_standard_function_expression),8&t.parserContextFlags&&(g(r).flags|=8192)}8388608&n.flags&&!Vi(t)&&!Nl(V(n))&&W(n);var i=oe(n);if(2===zp&&32&i.flags&&217===i.valueDeclaration.kind&&e.nodeIsDecorated(i.valueDeclaration))for(var r=e.getContainingClass(t);void 0!==r;){if(r===i.valueDeclaration&&r.name!==t){g(r).flags|=524288,g(t).flags|=1048576;break}r=e.getContainingClass(r)}return Du(t,t),Ru(t,t),Ji(t,n),qi(i,t)}function Yi(t,n){for(var r=t;r&&r!==n;){if(e.isFunctionLike(r))return!0;r=r.parent}return!1}function Ji(t,n){if(!(zp>=2||0==(34&n.flags)||247===n.valueDeclaration.parent.kind)){for(var r=e.getEnclosingBlockScopeContainer(n.valueDeclaration),i=Yi(t.parent,r),a=r,o=!1;a&&!e.nodeStartsNewLexicalEnvironment(a);){if(e.isIterationStatement(a,!1)){o=!0;break}a=a.parent}o&&(i&&(g(a).flags|=65536),202===r.kind&&e.getAncestor(n.valueDeclaration,215).parent===r&&Gi(t,r)&&(g(n.valueDeclaration).flags|=2097152),g(n.valueDeclaration).flags|=262144),i&&(g(n.valueDeclaration).flags|=131072)}}function Gi(t,n){for(var r=t;175===r.parent.kind;)r=r.parent;var i=!1;if(184===r.parent.kind&&(i=r.parent.left===r&&e.isAssignmentOperator(r.parent.operatorToken.kind)),182===r.parent.kind||183===r.parent.kind){var a=r.parent;i=41===a.operator||42===a.operator}if(!i)return!1;for(;r!==n;){if(r===n.statement)return!0;r=r.parent}return!1}function Xi(e,t){if(g(e).flags|=2,142===t.kind||145===t.kind){g(t.parent).flags|=4}else g(t).flags|=4}function $i(t){if(e.isSuperCallExpression(t))return t;if(!e.isFunctionLike(t))return e.forEachChild(t,$i)}function Qi(e){var t=g(e);return void 0===t.hasSuperCall&&(t.superCall=$i(e.body),t.hasSuperCall=!!t.superCall),t.superCall}function Zi(e){return St(Dt(ie(e)))===uf}function ea(t){var n=e.getThisContainer(t,!0),r=!1;if(145===n.kind){var i=n.parent;if(e.getClassExtendsHeritageClauseElement(i)&&!Zi(i)){var a=Qi(n);(!a||a.end>t.pos)&&s(t,e.Diagnostics.super_must_be_called_before_accessing_this_in_the_constructor_of_a_derived_class)}}switch(177===n.kind&&(n=e.getThisContainer(n,!1),r=zp<2),n.kind){case 221:s(t,e.Diagnostics.this_cannot_be_referenced_in_a_module_or_namespace_body);break;case 220:s(t,e.Diagnostics.this_cannot_be_referenced_in_current_location);break;case 145:na(t,n)&&s(t,e.Diagnostics.this_cannot_be_referenced_in_constructor_arguments);break;case 142:case 141:64&n.flags&&s(t,e.Diagnostics.this_cannot_be_referenced_in_a_static_property_initializer);break;case 137:s(t,e.Diagnostics.this_cannot_be_referenced_in_a_computed_property_name)}if(r&&Xi(t,n),e.isClassLike(n.parent)){var o=ie(n.parent);return 64&n.flags?ct(o):Dt(o).thisType}if(e.isInJavaScriptFile(t)){var u=ta(n);if(u&&u!==cf)return u;if(176===n.kind&&3===e.getSpecialPropertyAssignmentKind(n.parent)){var c=n.parent.left.expression.expression,l=Os(c).symbol;if(l&&l.members&&16&l.flags)return qo(l)}}return ef}function ta(t){var n=e.getJSDocTypeTag(t);if(n&&n.typeExpression&&n.typeExpression.type&&264===n.typeExpression.type.kind){var r=n.typeExpression.type;if(r.parameters.length>0&&267===r.parameters[0].type.kind)return Rr(r.parameters[0].type)}}function na(e,t){for(var n=e;n&&n!==t;n=n.parent)if(139===n.kind)return!0;return!1}function ra(t){var n=171===t.parent.kind&&t.parent.expression===t,r=e.getSuperContainer(t,!0),i=!1;if(!n)for(;r&&177===r.kind;)r=e.getSuperContainer(r,!0),i=zp<2;var a=function(t){return!!t&&(n?145===t.kind:!(!e.isClassLike(t.parent)&&168!==t.parent.kind)&&(64&t.flags?144===t.kind||143===t.kind||146===t.kind||147===t.kind:144===t.kind||143===t.kind||146===t.kind||147===t.kind||142===t.kind||141===t.kind||145===t.kind))}(r),o=0;if(!a){for(var u=t;u&&u!==r&&137!==u.kind;)u=u.parent;return u&&137===u.kind?s(t,e.Diagnostics.super_cannot_be_referenced_in_a_computed_property_name):n?s(t,e.Diagnostics.Super_calls_are_not_permitted_outside_constructors_or_in_nested_functions_inside_constructors):r&&r.parent&&(e.isClassLike(r.parent)||168===r.parent.kind)?s(t,e.Diagnostics.super_property_access_is_permitted_only_in_a_constructor_member_function_or_member_accessor_of_a_derived_class):s(t,e.Diagnostics.super_can_only_be_referenced_in_members_of_derived_classes_or_object_literal_expressions),cf}if(o=64&r.flags||n?512:256,g(t).flags|=o,144===r.kind&&256&r.flags&&(e.isSuperPropertyOrElementAccess(t.parent)&&Ia(t.parent)?g(r).flags|=4096:g(r).flags|=2048),i&&Xi(t.parent,r),168===r.parent.kind)return zp<2?(s(t,e.Diagnostics.super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher),cf):ef;var c=r.parent,l=Dt(ie(c)),p=l&&At(l)[0];return p?145===r.kind&&na(t,r)?(s(t,e.Diagnostics.super_cannot_be_referenced_in_constructor_arguments),cf):512===o?St(l):p:(e.getClassExtendsHeritageClauseElement(c)||s(t,e.Diagnostics.super_can_only_be_referenced_in_a_derived_class),cf)}function ia(t){var n=t.parent;if((wa(n)||e.isObjectLiteralMethod(n))&&Yr(n)){var r=xa(n);if(r){var i=e.hasRestParameter(n),a=n.parameters.length-(i?1:0),o=e.indexOf(n.parameters,t);if(o<a)return Jo(r,o);if(i&&o===n.parameters.length-1&&yi(r,n.parameters.length-1))return ct(e.lastOrUndefined(r.parameters))}}}function aa(t){var n=t.parent;if(t===n.initializer){if(n.type)return Rr(n.type);if(139===n.kind){var r=ia(n);if(r)return r}if(e.isBindingPattern(n.name))return et(n.name,!0)}}function oa(t){var n=e.getContainingFunction(t);if(n&&!n.asteriskToken)return ca(n)}function sa(t){var n=e.getContainingFunction(t);if(n){var r=ca(n);if(r)return t.asteriskToken?r:tc(r)}}function ua(t){for(;t.parent&&!e.isFunctionLike(t.parent);){if(139===t.parent.kind&&t.parent.initializer===t)return!0;t=t.parent}return!1}function ca(t){if(t.type||145===t.kind||146===t.kind&&e.getSetAccessorTypeAnnotationNode(e.getDeclarationOfKind(t.symbol,147)))return kn(Cn(t));var n=ka(t);return n?kn(n):void 0}function la(t,n){var r=ko(t),i=e.indexOf(r,n);if(i>=0){return Jo(Wo(t),i)}}function pa(e,t){if(173===e.parent.kind)return la(e.parent,t)}function fa(e){var t=e.parent,n=t.operatorToken.kind;if(n>=56&&n<=68){if(e===t.right)return Os(t.left)}else{if(52===n){var r=Ca(t);return r||e!==t.right||(r=Os(t.left)),r}if((51===n||24===n)&&e===t.right)return Ca(t)}}function da(e,t){if(!(16384&e.flags))return t(e);for(var n,r,i=e.types,a=0,o=i;a<o.length;a++){var s=o[a],u=t(s);u&&(n?r?r.push(u):r=[n,u]:n=u)}return r?vr(r):n}function ma(e,t){return da(e,function(e){var n=130048&e.flags?hn(e,t):void 0;return n?ct(n):void 0})}function ha(e,t){return da(e,function(e){return gn(e,t)})}function ya(t){return!!(16384&t.flags?e.forEach(t.types,Ti):Ti(t))}function _a(t){return!!(16384&t.flags?e.forEach(t.types,Ai):Ai(t))}function ga(t,n){return!!(16384&t.flags?e.forEach(t.types,function(e){return gn(e,n)}):gn(t,n))}function va(t){if(e.Debug.assert(e.isObjectLiteralMethod(t)),!Zc(t))return ba(t)}function ba(t){var n=t.parent,r=Ea(n);if(r){if(!e.hasDynamicName(t)){var i=ie(t).name,a=ma(r,i);if(a)return a}return La(t.name)&&ha(r,1)||ha(r,0)}}function Sa(t){var n=t.parent,r=Ea(n);if(r){return ma(r,\"\"+e.indexOf(n.elements,t))||ha(r,1)||(zp>=2?Zu(r,void 0):void 0)}}function Aa(e){var t=e.parent;return e===t.whenTrue||e===t.whenFalse?Ca(t):void 0}function Ta(t){var n=t.kind,r=t.parent,i=$a(r);if(241===t.kind){if(!i||We(i))return;return je(i,t.name.text)}if(242===t.kind)return i;e.Debug.fail(\"Expected JsxAttribute or JsxSpreadAttribute, got ts.SyntaxKind[\"+n+\"]\")}function Ea(e){var t=Ca(e);return t&&fn(t)}function Ca(t){if(!Zc(t)){if(t.contextualType)return t.contextualType;var n=t.parent;switch(n.kind){case 214:case 139:case 142:case 141:case 166:return aa(t);case 177:case 207:return oa(t);case 187:return sa(n);case 171:case 172:return la(n,t);case 174:case 192:return Rr(n.type);case 184:return fa(t);case 248:return ba(n);case 167:return Sa(t);case 185:return Aa(t);case 193:return e.Debug.assert(186===n.parent.kind),pa(n.parent,t);case 175:return Ca(n);case 243:return Ca(n);case 241:case 242:return Ta(n)}}}function Na(e){var t=yn(e,0);if(1===t.length){var n=t[0];if(!n.typeParameters)return n}}function wa(e){return 176===e.kind||177===e.kind}function ka(t){return wa(t)||e.isObjectLiteralMethod(t)?xa(t):void 0}function xa(t){e.Debug.assert(144!==t.kind||e.isObjectLiteralMethod(t));var n=e.isObjectLiteralMethod(t)?va(t):Ea(t);if(n){if(!(16384&n.flags))return Na(n);for(var r,i=n.types,a=0,o=i;a<o.length;a++){var s=o[a],u=Na(s);if(u)if(r){if(!hi(r[0],u,!1,!0,$r))return;r.push(u)}else r=[u]}var c;return r&&(c=Yt(r[0]),c.resolvedReturnType=void 0,c.unionSignatures=r),c}}function Ra(e){return e&&e.context}function Ia(e){var t=e.parent;return 184===t.kind&&56===t.operatorToken.kind&&t.left===e||(248===t.kind?Ia(t.parent):167===t.kind&&Ia(t))}function Da(e,t){return $u(Ds(e.expression,t),e.expression,!1)}function Ma(e){return 166===e.kind&&!!e.initializer||184===e.kind&&56===e.operatorToken.kind}function Pa(t,n){for(var r=t.elements,i=!1,a=[],o=Ia(t),u=0,c=r;u<c.length;u++){var l=c[u];if(o&&188===l.kind){var p=Os(l.expression,n),f=vn(p,1)||(zp>=2?Zu(p,void 0):void 0);f&&a.push(f)}else{var d=Os(l,n);a.push(d)}i=i||188===l.kind}if(!i){if(o&&a.length){var d=pr(a);return d.pattern=t,d}var m=Ea(t);if(m&&_a(m)){var h=m.pattern;if(h&&(165===h.kind||167===h.kind))for(var y=h.elements,_=a.length;_<y.length;_++){var g=y[_];Ma(g)?a.push(m.elementTypes[_]):(190!==g.kind&&s(g,e.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),a.push(cf))}if(a.length)return lr(a)}}return ur(a.length?vr(a):sf)}function La(e){return 137===e.kind?Oa(e):Fa(e.text)}function Oa(e){return Ua(Ba(e),132)}function Ua(e,t){return We(e)||hs(e,t)}function Fa(e){return(+e).toString()===e}function Ba(t){var n=g(t.expression);return n.resolvedType||(n.resolvedType=Os(t.expression),Ua(n.resolvedType,16777606)?_o(t.expression,n.resolvedType,!0):s(t,e.Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any)),n.resolvedType}function Ka(t,n){function r(n){if(c&&ga(c,n)){for(var r=[],i=0;i<o.length;i++){var a=t.properties[i];if(0===n||La(a.name)){var s=ct(o[i]);e.contains(r,s)||r.push(s)}}var u=r.length?vr(r):sf;return p|=u.flags,u}}var i=Ia(t);lp(t,i);for(var a={},o=[],c=Ea(t),l=c&&c.pattern&&(164===c.pattern.kind||168===c.pattern.kind),p=0,f=!1,d=0,m=t.properties;d<m.length;d++){var h=m[d],y=h.symbol;if(248===h.kind||249===h.kind||e.isObjectLiteralMethod(h)){var _=void 0;248===h.kind?_=Ms(h,n):144===h.kind?_=Ps(h,n):(e.Debug.assert(249===h.kind),_=Os(h.name,n)),p|=_.flags;var g=u(67108868|y.flags,y.name);if(i){(248===h.kind&&Ma(h.initializer)||249===h.kind&&h.objectAssignmentInitializer)&&(g.flags|=536870912),e.hasDynamicName(h)&&(f=!0)}else if(l&&!(67108864&c.flags)){var v=hn(c,y.name);v?g.flags|=536870912&v.flags:qp.suppressExcessPropertyErrors||s(h.name,e.Diagnostics.Object_literal_may_only_specify_known_properties_and_0_does_not_exist_in_type_1,we(y),xe(c))}g.declarations=y.declarations,g.parent=y.parent,y.valueDeclaration&&(g.valueDeclaration=y.valueDeclaration),g.type=_,g.target=y,y=g}else e.Debug.assert(146===h.kind||147===h.kind),$s(h);e.hasDynamicName(h)||(a[y.name]=y),o.push(y)}if(l)for(var b=0,S=ln(c);b<S.length;b++){var g=S[b];e.hasProperty(a,g.name)||(536870912&g.flags||s(g.valueDeclaration||g.bindingElement,e.Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value),a[g.name]=g,o.push(g))}var A=r(0),T=r(1),E=he(t.symbol,a,jp,jp,A,T),C=qp.suppressExcessPropertyErrors?0:1048576;return E.flags|=4718592|C|14680064&p|(f?67108864:0),i&&(E.pattern=t),E}function Va(e){return no(e),jf||ef}function ja(e){no(e.openingElement),Ja(e.closingElement);for(var t=0,n=e.children;t<n.length;t++){var r=n[t];switch(r.kind){case 243:ro(r);break;case 236:ja(r);break;case 237:Va(r)}}return jf||ef}function Wa(e){return e.indexOf(\"-\")<0}function qa(t){return 136!==t.kind&&e.isIntrinsicJsxName(t.text)}function za(t,n,r){var i=void 0;if(n===lf&&Wa(t.name.text))s(t.parent,e.Diagnostics.JSX_element_class_does_not_support_attributes_because_it_does_not_have_a_0_property,Xa());else if(n&&!We(n)){var a=hn(n,t.name.text);if(i=a&&ct(a),Wa(t.name.text)){var o=vn(n,0);if(o)i=o;else if(!i)return s(t.name,e.Diagnostics.Property_0_does_not_exist_on_type_1,t.name.text,xe(n)),cf}}var u;return u=t.initializer?Os(t.initializer):rf,i&&ni(u,i,t),r[t.name.text]=!0,u}function Ha(t,n,r){for(var i=Os(t.expression),a=ln(i),o=0,s=a;o<s.length;o++){var u=s[o];if(!r[u.name]){var c=hn(n,u.name);if(c){var l=e.chainDiagnosticMessages(void 0,e.Diagnostics.Property_0_of_JSX_spread_attribute_is_not_assignable_to_target_property,u.name);ni(ct(u),ct(c),t,void 0,l)}r[u.name]=!0}}return i}function Ya(e){return void 0===cd[e]?cd[e]=nr(ld.JSX,e)||cf:cd[e]}function Ja(t){function n(e){if(69===e.tagName.kind){var t=e.tagName,n=Ki(t);return n.exportSymbol||n}return uo(e.tagName).symbol}var r=g(t);return r.resolvedSymbol||(qa(t.tagName)?r.resolvedSymbol=function(t){var n=Ya(ld.IntrinsicElements);if(n!==cf){var i=hn(n,t.tagName.text);if(i)return r.jsxFlags|=1,i;return vn(n,0)?(r.jsxFlags|=2,n.symbol):(s(t,e.Diagnostics.Property_0_does_not_exist_on_type_1,t.tagName.text,\"JSX.\"+ld.IntrinsicElements),Qp)}return qp.noImplicitAny&&s(t,e.Diagnostics.JSX_element_implicitly_has_type_any_because_no_interface_JSX_0_exists,ld.IntrinsicElements),Qp}(t):r.resolvedSymbol=function(e){var t=n(e);return t&&t!==Qp&&(r.jsxFlags|=4,8388608&t.flags&&W(t)),t||Qp}(t)),r.resolvedSymbol}function Ga(t){e.Debug.assert(!!(4&g(t).jsxFlags),\"Should not call getJsxElementInstanceType on non-class Element\");var n=Ja(t);if(n===Qp)return ef;var r=ct(n);if(We(r))return ef;var i=_n(r,1);return 0===i.length&&(i=_n(r,0),0===i.length)?(s(t.tagName,e.Diagnostics.JSX_element_type_0_does_not_have_any_construct_or_call_signatures,e.getTextOfNode(t.tagName)),cf):vr(i.map(kn))}function Xa(){var t=er(ld.JSX,1536,void 0),n=t&&b(t.exports,ld.ElementAttributesPropertyNameContainer,793056),r=n&&Dt(n),i=r&&ln(r);return i?0===i.length?\"\":1===i.length?i[0].name:void s(n.declarations[0],e.Diagnostics.The_global_type_JSX_0_may_not_have_more_than_one_property,ld.ElementAttributesPropertyNameContainer):void 0}function $a(t){var n=g(t);if(!n.resolvedJsxType){var r=Ja(t);if(4&n.jsxFlags){var i=Ga(t),a=Za();if(!a||!ei(i,a)){var o=ct(r),u=o&&_n(o,0),c=u&&u.length>0&&u[0],l=c&&kn(c),p=l&&(0===c.parameters.length?lf:ct(c.parameters[0]));if(l&&ei(l,jf)){var f=Ya(ld.IntrinsicAttributes);return f!==cf&&(p=nn(f,p)),n.resolvedJsxType=p}}if(a&&ci(i,a,fd,t,e.Diagnostics.JSX_element_type_0_is_not_a_constructor_function_for_JSX_elements),We(i))return n.resolvedJsxType=i;var d=Xa();if(void 0===d)return n.resolvedJsxType=ef;if(\"\"===d)return n.resolvedJsxType=i;var m=je(i,d);if(m){if(We(m)||m===cf)return n.resolvedJsxType=m;if(16384&m.flags)return s(t.tagName,e.Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type,xe(m)),n.resolvedJsxType=ef;var h=m,y=Ya(ld.IntrinsicClassAttributes);if(y!==cf){var _=ht(y.symbol);_?1===_.length&&(h=nn(jn(y,[i]),h)):h=nn(m,y)}var v=Ya(ld.IntrinsicAttributes);return v!==cf&&(h=nn(v,h)),n.resolvedJsxType=h}return n.resolvedJsxType=lf}return 1&n.jsxFlags?n.resolvedJsxType=ct(r):2&n.jsxFlags?n.resolvedJsxType=Ln(r,0):n.resolvedJsxType=ef}return n.resolvedJsxType}function Qa(e){return hn($a(e.parent),e.name.text)||Qp}function Za(){return Kf||(Kf=nr(ld.JSX,ld.ElementClass)),Kf}function eo(){var e=Ya(ld.IntrinsicElements);return e?ln(e):jp}function to(t){0===(qp.jsx||0)&&s(t,e.Diagnostics.Cannot_use_JSX_unless_the_jsx_flag_is_provided),void 0===jf&&qp.noImplicitAny&&s(t,e.Diagnostics.JSX_element_implicitly_has_type_any_because_the_global_type_JSX_Element_does_not_exist)}function no(t){pp(t),to(t);var n=2===qp.jsx?e.Diagnostics.Cannot_find_name_0:void 0,r=qp.reactNamespace?qp.reactNamespace:\"React\",i=T(t.tagName,r,107455,n,r);i&&(_(i).referenced=!0);for(var a=$a(t),o={},u=!1,c=t.attributes.length-1;c>=0;c--)if(241===t.attributes[c].kind)za(t.attributes[c],a,o);else{e.Debug.assert(242===t.attributes[c].kind);var l=Ha(t.attributes[c],a,o);We(l)&&(u=!0)}if(a&&!u)for(var p=ln(a),c=0;c<p.length;c++)536870912&p[c].flags||void 0!==o[p[c].name]||s(t,e.Diagnostics.Property_0_is_missing_in_type_1,p[c].name,xe(a))}function ro(e){return e.expression?Os(e.expression):cf}function io(e){return e.valueDeclaration?e.valueDeclaration.kind:142}function ao(t){return t.valueDeclaration?e.getCombinedNodeFlags(t.valueDeclaration):134217728&t.flags?72:0}function oo(t,n,r,i){var a=ao(i),o=Dt(ae(i));if(95===n.kind){var u=169===t.kind?t.name:t.right;if(zp<2&&144!==io(i))return s(u,e.Diagnostics.Only_public_and_protected_methods_of_the_base_class_are_accessible_via_the_super_keyword),!1;if(128&a)return s(u,e.Diagnostics.Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression,we(i),xe(o)),!1}if(!(48&a))return!0;var c=e.getContainingClass(t),l=c?Dt(ie(c)):void 0;return 16&a?o===l||(s(t,e.Diagnostics.Property_0_is_private_and_only_accessible_within_class_1,we(i),xe(o)),!1):95===n.kind||(l&&pt(l,o)?!!(64&a)||(33554432&r.flags&&(r=Fn(r)),!!(3072&lt(r).flags&&pt(r,l))||(s(t,e.Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1,we(i),xe(l)),!1)):(s(t,e.Diagnostics.Property_0_is_protected_and_only_accessible_within_class_1_and_its_subclasses,we(i),xe(o)),!1))}function so(e){return co(e,e.expression,e.name)}function uo(e){return co(e,e.left,e.right)}function co(t,n,r){var i=Os(n);if(We(i))return i;var a=fn(wi(i));if(a===cf)return cf;var o=hn(a,r.text);return o?(g(t).resolvedSymbol=o,o.parent&&32&o.parent.flags&&oo(t,n,a,o),ct(o)):(r.text&&s(r,e.Diagnostics.Property_0_does_not_exist_on_type_1,e.declarationNameToString(r),xe(33554432&i.flags?a:i)),cf)}function lo(e,t){var n=169===e.kind?e.expression:e.left,r=Os(n);if(r!==cf&&!We(r)){var i=hn(wi(r),t);if(i&&i.parent&&32&i.parent.flags)return oo(e,n,r,i)}return!0}function po(t){var n=t.initializer;if(215===n.kind){var r=n.declarations[0];if(r&&!e.isBindingPattern(r.name))return ie(r)}else if(69===n.kind)return Ki(n)}function fo(e){return vn(e,1)&&!vn(e,0)}function mo(e){var t=zi(e);if(69===t.kind){var n=Ki(t);if(3&n.flags)for(var r=e,i=e.parent;i;){if(203===i.kind&&r===i.statement&&po(i)===n&&fo(Os(i.expression)))return!0;r=i,i=i.parent}}return!1}function ho(t){if(!t.argumentExpression){var n=e.getSourceFileOfNode(t);if(172===t.parent.kind&&t.parent.expression===t){var r=e.skipTrivia(n.text,t.expression.end),i=t.end;Cp(n,r,i-r,e.Diagnostics.new_T_cannot_be_used_to_create_an_array_Use_new_Array_T_instead)}else{var r=t.end-\"]\".length,i=t.end;Cp(n,r,i-r,e.Diagnostics.Expression_expected)}}var a=fn(Os(t.expression)),o=t.argumentExpression?Os(t.argumentExpression):cf;if(a===cf)return cf;var u=ys(a);if(u&&(!t.argumentExpression||9!==t.argumentExpression.kind))return s(t.argumentExpression,e.Diagnostics.A_const_enum_member_can_only_be_accessed_using_a_string_literal),cf;if(t.argumentExpression){var c=yo(t.argumentExpression,o);if(void 0!==c){var l=hn(a,c);if(l)return g(t).resolvedSymbol=l,ct(l);if(u)return s(t.argumentExpression,e.Diagnostics.Property_0_does_not_exist_on_const_enum_1,c,we(a.symbol)),cf}}if(Ua(o,16777606)){if(Ua(o,132)||mo(t.argumentExpression)){var p=vn(a,1);if(p)return p}var f=vn(a,0);return f?f:(!qp.noImplicitAny||qp.suppressImplicitAnyIndexErrors||We(a)||s(t,vn(a,1)?e.Diagnostics.Element_implicitly_has_an_any_type_because_index_expression_is_not_of_type_number:e.Diagnostics.Index_signature_of_object_type_implicitly_has_an_any_type),ef)}return s(t,e.Diagnostics.An_index_expression_argument_must_be_of_type_string_number_symbol_or_any),cf}function yo(t,n){if(9===t.kind||8===t.kind)return t.text;if(170===t.kind||169===t.kind){var r=Il(t);if(void 0!==r)return r.toString()}if(_o(t,n,!1)){var i=t.name.text;return e.getPropertyNameForKnownSymbolName(i)}}function _o(t,n,r){if(n===cf)return!1;if(!e.isWellKnownSymbolSyntactically(t))return!1;if(0==(16777216&n.flags))return r&&s(t,e.Diagnostics.A_computed_property_name_of_the_form_0_must_be_of_type_symbol,e.getTextOfNode(t)),!1;var i=t.expression,a=Ki(i);if(!a)return!1;var o=rr();return!!o&&(a===o||(r&&s(i,e.Diagnostics.Symbol_reference_does_not_refer_to_the_global_Symbol_constructor_object),!1))}function go(t){return 173===t.kind?Os(t.template):140!==t.kind&&e.forEach(t.arguments,function(e){Os(e)}),Hf}function vo(e){return go(e),Yf}function bo(t,n){var r,i,a,o,s=0,u=-1;e.Debug.assert(!n.length);for(var c=0,l=t;c<l.length;c++){var p=l[c],f=p.declaration&&ie(p.declaration),d=p.declaration&&p.declaration.parent;i&&f!==i?(a=s=n.length,r=d):r&&d===r?a++:(r=d,a=s),i=f,p.hasStringLiterals?(u++,o=u,s++):o=a,n.splice(o,0,p)}}function So(e){for(var t=0;t<e.length;t++){var n=e[t];if(n&&188===n.kind)return t}return-1}function Ao(t,n,r){var i,a,o,s=-1;if(173===t.kind){var u=t;if(i=n.length,a=void 0,186===u.template.kind){var c=u.template,l=e.lastOrUndefined(c.templateSpans);e.Debug.assert(void 0!==l),o=e.nodeIsMissing(l.literal)||!!l.literal.isUnterminated}else{var p=u.template;e.Debug.assert(11===p.kind),o=!!p.isUnterminated}}else if(140===t.kind)!0,a=void 0,i=xo(t,void 0,r);else{var f=t;if(!f.arguments)return e.Debug.assert(172===f.kind),0===r.minArgumentCount;i=f.arguments.hasTrailingComma?n.length+1:n.length,o=f.arguments.end===f.end,a=f.typeArguments,s=So(n)}if(a&&(!r.typeParameters||a.length!==r.typeParameters.length))return!1;if(s>=0)return yi(r,s);if(!r.hasRestParameter&&i>r.parameters.length)return!1;var d=i>=r.minArgumentCount;return o||d}function To(e){if(80896&e.flags){var t=on(e);if(1===t.callSignatures.length&&0===t.constructSignatures.length&&0===t.properties.length&&!t.stringIndexType&&!t.numberIndexType)return t.callSignatures[0]}}function Eo(e,t,n){var r=Di(e.typeParameters,!0);return Ii(t,e,function(e,t){Pi(r,Hr(e,n),t)}),Rn(e,Bi(r))}function Co(e,t,n,r,i){for(var a=t.typeParameters,o=Fr(i),s=0;s<a.length;s++)i.inferences[s].isFixed||(i.inferredTypes[s]=void 0);void 0===i.failedTypeParameterIndex||i.inferences[i.failedTypeParameterIndex].isFixed||(i.failedTypeParameterIndex=void 0);for(var u=xo(e,n,t),s=0;s<u;s++){var c=Lo(e,n,s);if(void 0===c||190!==c.kind){var l=Jo(t,s),p=Po(e,s,c);if(void 0===p){p=Is(c,l,r&&void 0!==r[s]?Br:o)}Pi(i,p,l)}}if(r)for(var s=0;s<u;s++)if(r[s]===!1){var c=n[s],l=Jo(t,s);Pi(i,Is(c,l,o),l)}Bi(i)}function No(t,n,r,i,a){for(var o,s=t.typeParameters,u=!0,c=0;c<s.length;c++)if(u){var l=Fn(s[c]);if(l){var p=void 0,f=e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1;i&&a&&(p=e.chainDiagnosticMessages(p,f),f=a),o||(o=Pr(s,r));var d=r[c];u=ni(d,jt(Hr(l,o),d),i?n[c]:void 0,f,p)}}return u}function wo(t,n,r,i,a,o){for(var s=xo(t,n,r),u=0;u<s;u++){var c=Lo(t,n,u);if(void 0===c||190!==c.kind){var l=Jo(r,u),p=Po(t,u,c);void 0===p&&(p=9!==c.kind||o?Is(c,l,a&&a[u]?Br:void 0):Er(c.text));if(!ci(p,l,i,o?Oo(t,u,c):void 0,e.Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1))return!1}}return!0}function ko(t){var n;if(173===t.kind){var r=t.template;n=[void 0],186===r.kind&&e.forEach(r.templateSpans,function(e){n.push(e.expression)})}else{if(140===t.kind)return;n=t.arguments||jp}return n}function xo(e,t,n){if(140!==e.kind)return t.length;switch(e.parent.kind){case 217:case 189:return 1;case 142:return 2;case 144:case 146:case 147:return 0===zp?2:n.parameters.length>=3?3:2;case 139:return 3}}function Ro(t){if(217===t.kind){var n=ie(t);return ct(n)}if(139===t.kind&&(t=t.parent,145===t.kind)){var n=ie(t);return ct(n)}return 142===t.kind||144===t.kind||146===t.kind||147===t.kind?dl(t):(e.Debug.fail(\"Unsupported decorator target.\"),cf)}function Io(t){if(217===t.kind)return e.Debug.fail(\"Class decorators should not have a second synthetic argument.\"),cf;if(139===t.kind&&(t=t.parent,145===t.kind))return ef;if(142===t.kind||144===t.kind||146===t.kind||147===t.kind){var n=t;switch(n.name.kind){case 69:case 8:case 9:return Er(n.name.text);case 137:var r=Ba(n.name);return hs(r,16777216)?r:tf;default:return e.Debug.fail(\"Unsupported property name.\"),cf}}return e.Debug.fail(\"Unsupported decorator target.\"),cf}function Do(t){if(217===t.kind)return e.Debug.fail(\"Class decorators should not have a third synthetic argument.\"),cf;if(139===t.kind)return nf;if(142===t.kind)return e.Debug.fail(\"Property decorators should not have a third synthetic argument.\"),cf;if(144===t.kind||146===t.kind||147===t.kind){return ir(pl(t))}return e.Debug.fail(\"Unsupported decorator target.\"),cf}function Mo(t,n){return 0===n?Ro(t.parent):1===n?Io(t.parent):2===n?Do(t.parent):(e.Debug.fail(\"Decorators should not have a fourth synthetic argument.\"),cf)}function Po(e,t,n){return 140===e.kind?Mo(e,t):0===t&&173===e.kind?Tf:void 0}function Lo(e,t,n){if(140!==e.kind&&(0!==n||173!==e.kind))return t[n]}function Oo(e,t,n){return 140===e.kind?e.expression:0===t&&173===e.kind?e.template:n}function Uo(t,n,r,a){function o(n,r,i,o){var s;s=e.chainDiagnosticMessages(s,n,r,i,o),a&&(s=e.chainDiagnosticMessages(s,a)),sd.add(e.createDiagnosticForNodeFromMessageChain(t,s))}function s(n,r){for(var i=0,a=n;i<a.length;i++){var o=a[i];if(Ao(t,d,o)){for(var s=void 0,c=void 0,l=o.typeParameters?Di(o.typeParameters,!1):void 0;;){if(s=o,s.typeParameters){var p=void 0;if(u?(p=e.map(u,Rr),c=No(s,u,p,!1)):(Co(t,s,d,f,l),c=void 0===l.failedTypeParameterIndex,p=l.inferredTypes),!c)break;s=Rn(s,p)}if(!wo(t,d,s,r,f,!1))break;var m=f?e.indexOf(f,!0):-1;if(m<0)return s;f[m]=!1}if(o.typeParameters){var g=s;c?h=g:(y=o,u||(_=l))}else e.Debug.assert(o===s),h=o}}}var u,c=173===t.kind,l=140===t.kind;c||l||(u=t.typeArguments,95!==t.expression.kind&&e.forEach(u,qc));var p=r||[];if(bo(n,p),!p.length)return o(e.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target),vo(t);var f,d=ko(t);if(!l)for(var m=c?1:0;m<d.length;m++)Yr(d[m])&&(f||(f=new Array(d.length)),f[m]=!0);var h,y,_,g;if(p.length>1&&(g=s(p,pd)),g||(h=void 0,y=void 0,_=void 0,g=s(p,fd)),g)return g;if(h)wo(t,d,h,fd,void 0,!0);else if(y)if(c||l||!u){e.Debug.assert(_.failedTypeParameterIndex>=0);var v=y.typeParameters[_.failedTypeParameterIndex],b=Ui(_,_.failedTypeParameterIndex),S=e.chainDiagnosticMessages(void 0,e.Diagnostics.The_type_argument_for_type_parameter_0_cannot_be_inferred_from_the_usage_Consider_specifying_the_type_arguments_explicitly,xe(v));a&&(S=e.chainDiagnosticMessages(S,a)),vi(b,t.expression||t.tag,S)}else{var A=t.typeArguments;No(y,A,e.map(A,Rr),!0,a)}else o(e.Diagnostics.Supplied_parameters_do_not_match_any_signature_of_call_target);if(!i)for(var T=0,E=p;T<E.length;T++){var C=E[T];if(Ao(t,d,C))return C.typeParameters&&u&&(C=Rn(C,e.map(u,Rr))),C}return vo(t)}function Fo(t,n){if(95===t.expression.kind){var r=ra(t.expression);if(r!==cf){return Uo(t,bt(r,e.getClassExtendsHeritageClauseElement(e.getContainingClass(t)).typeArguments),n)}return go(t)}var i=Os(t.expression),a=fn(i);if(a===cf)return vo(t);var o=_n(a,0),u=_n(a,1);return We(i)||!(o.length||u.length||16384&i.flags)&&ei(i,_f)?(i!==cf&&t.typeArguments&&s(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),go(t)):o.length?Uo(t,o,n):(u.length?s(t,e.Diagnostics.Value_of_type_0_is_not_callable_Did_you_mean_to_include_new,xe(i)):s(t,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature),vo(t))}function Bo(t,n){if(t.arguments&&zp<1){var r=So(t.arguments);r>=0&&s(t.arguments[r],e.Diagnostics.Spread_operator_in_new_expressions_is_only_available_when_targeting_ECMAScript_5_and_higher)}var i=Os(t.expression);if((i=fn(i))===cf)return vo(t);var a=i.symbol&&vc(i.symbol);if(a&&128&a.flags)return s(t,e.Diagnostics.Cannot_create_an_instance_of_the_abstract_class_0,e.declarationNameToString(a.name)),vo(t);if(We(i))return t.typeArguments&&s(t,e.Diagnostics.Untyped_function_calls_may_not_accept_type_arguments),go(t);var o=_n(i,1);if(o.length)return Uo(t,o,n);var u=_n(i,0);if(u.length){var c=Uo(t,u,n);return kn(c)!==of&&s(t,e.Diagnostics.Only_a_void_function_can_be_called_with_the_new_keyword),c}return s(t,e.Diagnostics.Cannot_use_new_with_an_expression_whose_type_lacks_a_call_or_construct_signature),vo(t)}function Ko(t,n){var r=Os(t.tag),i=fn(r);if(i===cf)return vo(t);var a=_n(i,0);return We(r)||!a.length&&!(16384&r.flags)&&ei(r,_f)?go(t):a.length?Uo(t,a,n):(s(t,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature),vo(t))}function Vo(t){switch(t.parent.kind){case 217:case 189:return e.Diagnostics.Unable_to_resolve_signature_of_class_decorator_when_called_as_an_expression;case 139:return e.Diagnostics.Unable_to_resolve_signature_of_parameter_decorator_when_called_as_an_expression;case 142:return e.Diagnostics.Unable_to_resolve_signature_of_property_decorator_when_called_as_an_expression;case 144:case 146:case 147:return e.Diagnostics.Unable_to_resolve_signature_of_method_decorator_when_called_as_an_expression}}function jo(t,n){var r=Os(t.expression),i=fn(r);if(i===cf)return vo(t);var a=_n(i,0);if(r===ef||!a.length&&!(16384&r.flags)&&ei(r,_f))return go(t);var o=Vo(t);if(!a.length){var s=void 0;return s=e.chainDiagnosticMessages(s,e.Diagnostics.Cannot_invoke_an_expression_whose_type_lacks_a_call_signature),s=e.chainDiagnosticMessages(s,o),sd.add(e.createDiagnosticForNodeFromMessageChain(t,s)),vo(t)}return Uo(t,a,n,o)}function Wo(t,n){var r=g(t);return r.resolvedSignature&&!n||(r.resolvedSignature=Hf,171===t.kind?r.resolvedSignature=Fo(t,n):172===t.kind?r.resolvedSignature=Bo(t,n):173===t.kind?r.resolvedSignature=Ko(t,n):140===t.kind?r.resolvedSignature=jo(t,n):e.Debug.fail(\"Branch in 'getResolvedSignature' should be unreachable.\")),r.resolvedSignature}function qo(e){var t=_(e);return t.inferredClassType||(t.inferredClassType=he(void 0,e.members,jp,jp,void 0,void 0)),t.inferredClassType}function zo(t){tp(t,t.typeArguments)||rp(t,t.arguments);var n=Wo(t);if(95===t.expression.kind)return of;if(172===t.kind){var r=n.declaration;if(r&&145!==r.kind&&149!==r.kind&&154!==r.kind&&!e.isJSDocConstructSignature(r)){var i=Os(t.expression).symbol;return i&&i.members&&16&i.flags?qo(i):(qp.noImplicitAny&&s(t,e.Diagnostics.new_expression_whose_target_lacks_a_construct_signature_implicitly_has_an_any_type),ef)}}return e.isInJavaScriptFile(t)&&e.isRequireCall(t,!0)?wn(t.arguments[0]):kn(n)}function Ho(e){return kn(Wo(e))}function Yo(t){var n=Ci(Os(t.expression)),r=Rr(t.type);if(i&&r!==cf){var a=wi(n);ms(r,258)&&ms(a,258)||ei(r,a)||ni(n,r,t,e.Diagnostics.Neither_type_0_nor_type_1_is_assignable_to_the_other)}return r}function Jo(e,t){return e.hasRestParameter?t<e.parameters.length-1?ct(e.parameters[t]):xn(e):t<e.parameters.length?ct(e.parameters[t]):ef}function Go(t,n,r){for(var i=t.parameters.length-(t.hasRestParameter?1:0),a=0;a<i;a++){var o=t.parameters[a],s=Jo(n,a);$o(o,s,r)}if(t.hasRestParameter&&yi(n,t.parameters.length-1)){var o=e.lastOrUndefined(t.parameters),s=ct(e.lastOrUndefined(n.parameters));$o(o,s,r)}}function Xo(t){if(e.isBindingPattern(t.name))for(var n=0,r=t.name.elements;n<r.length;n++){var i=r[n];190!==i.kind&&(69===i.name.kind&&(_(ie(i)).type=Ye(i)),Xo(i))}}function $o(e,t,n){var r=_(e);r.type?Ra(n)&&Pi(n.context,r.type,Hr(t,n)):(r.type=Hr(t,n),Xo(e.valueDeclaration))}function Qo(t){var n=e.getJSDocReturnTag(t);if(n&&n.typeExpression)return Rr(n.typeExpression.type)}function Zo(e){var t=Pf();return t!==ff?(e=hu(e),jn(t,[e])):lf}function es(t,n){var r=ka(t);if(!t.body)return cf;var i,a=e.isAsyncFunctionLike(t);if(195!==t.body.kind)i=Ds(t.body,n),a&&(i=yu(i,t,e.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member));else{var o=void 0,u=!!t.asteriskToken;if(u){if(o=ts(t.body,n),0===o.length){var c=sr(ef);return qp.noImplicitAny&&s(t.asteriskToken,e.Diagnostics.Generator_implicitly_has_type_0_because_it_does_not_yield_any_values_Consider_supplying_a_return_type,xe(c)),c}}else if(o=ns(t.body,n,a),0===o.length){if(a){var l=Zo(of);return l===lf?(s(t,e.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type),cf):l}return of}if(!(i=r?vr(o):gi(o)))return u?(s(t,e.Diagnostics.No_best_common_type_exists_among_yield_expressions),sr(cf)):(s(t,e.Diagnostics.No_best_common_type_exists_among_return_expressions),vr(o));u&&(i=sr(i))}r||Ri(t,i);var p=wi(i);if(a){var l=Zo(p);return l===lf?(s(t,e.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type),cf):l}return p}function ts(t,n){var r=[];return e.forEachYieldExpression(t,function(t){var i=t.expression;if(i){var a=Ds(i,n);t.asteriskToken&&(a=Qu(a,t.expression)),e.contains(r,a)||r.push(a)}}),r}function ns(t,n,r){var i=[];return e.forEachReturnStatement(t,function(a){var o=a.expression;if(o){var s=Ds(o,n);r&&(s=yu(s,t.parent,e.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member)),e.contains(i,s)||i.push(s)}}),i}function rs(t,n){if(i&&!(n===of||We(n)||n&&16384&n.flags&&ms(n,17))&&!e.nodeIsMissing(t.body)&&195===t.body.kind&&524288&t.flags){var r=1048576&t.flags;if(n&&!r)s(t.type,e.Diagnostics.A_function_whose_declared_type_is_neither_void_nor_any_must_return_a_value);else if(qp.noImplicitReturns){if(!n){var a=r?kn(Cn(t)):of;if(a===of||We(a))return}s(t.type||t,e.Diagnostics.Not_all_code_paths_return_a_value)}}}function is(t,n){if(e.Debug.assert(144!==t.kind||e.isObjectLiteralMethod(t)),Gl(t)||176!==t.kind||up(t),n===Br&&Yr(t))return zc(t),df;var r=g(t),a=ct(t.symbol),o=Yr(t),s=o&&Ra(n);if(s||!(1024&r.flags)){var u=xa(t),c=!!(1024&r.flags);if(s||!c){if(r.flags|=1024,u){var l=_n(a,0)[0];if(o&&Go(l,u,n||Br),s||!t.type&&!l.resolvedReturnType){var p=es(t,n);l.resolvedReturnType||(l.resolvedReturnType=p)}}c||(Hs(t),zc(t))}}return i&&144!==t.kind&&143!==t.kind&&(Du(t,t.name),Ru(t,t.name)),a}function as(t){e.Debug.assert(144!==t.kind||e.isObjectLiteralMethod(t));var n=e.isAsyncFunctionLike(t),r=t.type&&(n?gu(t):Rr(t.type));if(t.asteriskToken||rs(t,r),t.body)if(t.type||kn(Cn(t)),195===t.body.kind)qc(t.body);else{var i=Os(t.body);if(r)if(n){var a=yu(i,t.body,e.Diagnostics.Expression_body_for_async_arrow_function_does_not_have_a_valid_callable_then_member);ni(a,r,t.body)}else ni(i,r,t.body)}}function os(e,t,n){return!!Ua(t,132)||(s(e,n),!1)}function ss(e,t,n){function r(e){var t=g(e).resolvedSymbol;return t&&oe(t)}function i(e){switch(e.kind){case 69:var t=r(e);return!t||t===Qp||t===Xp||0!=(3&t.flags);case 169:var t=r(e);return!t||t===Qp||0!=(t.flags&-9);case 170:return!0;case 175:return i(e.expression);default:return!1}}function a(e){switch(e.kind){case 69:case 169:var t=r(e);return t&&0!=(3&t.flags)&&0!=(16384&ao(t));case 170:var n=e.argumentExpression,t=r(e.expression);if(t&&n&&9===n.kind){var i=n.text,o=hn(ct(t),i);return o&&0!=(3&o.flags)&&0!=(16384&ao(o))}return!1;case 175:return a(e.expression);default:return!1}}return i(e)?!a(e)||(s(e,n),!1):(s(e,t),!1)}function us(e){return Os(e.expression),rf}function cs(e){return Os(e.expression),tf}function ls(e){return Os(e.expression),sf}function ps(t){return i&&(8&t.parserContextFlags||Ep(t,e.Diagnostics.await_expression_is_only_allowed_within_an_async_function),ua(t)&&s(t,e.Diagnostics.await_expressions_cannot_be_used_in_a_parameter_initializer)),yu(Os(t.expression),t)}function fs(t){var n=Os(t.operand);switch(t.operator){case 35:case 36:case 50:return ms(n,16777216)&&s(t.operand,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(t.operator)),nf;case 49:return rf;case 41:case 42:return os(t.operand,n,e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type)&&ss(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant),nf}return cf}function ds(t){var n=Os(t.operand);return os(t.operand,n,e.Diagnostics.An_arithmetic_operand_must_be_of_type_any_number_or_an_enum_type)&&ss(t.operand,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_property_or_indexer,e.Diagnostics.The_operand_of_an_increment_or_decrement_operator_cannot_be_a_constant),nf}function ms(e,t){if(e.flags&t)return!0;if(49152&e.flags){for(var n=e.types,r=0,i=n;r<i.length;r++){if(i[r].flags&t)return!0}return!1}return!1}function hs(e,t){if(e.flags&t)return!0;if(49152&e.flags){for(var n=e.types,r=0,i=n;r<i.length;r++){if(!(i[r].flags&t))return!1}return!0}return!1}function ys(e){return 80896&e.flags&&e.symbol&&_s(e.symbol)}function _s(e){return 0!=(128&e.flags)}function gs(t,n,r,i){return hs(r,16777726)&&s(t,e.Diagnostics.The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),We(i)||Zr(i,_f)||s(n,e.Diagnostics.The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type),rf}function vs(t,n,r,i){return Ua(r,16777606)||s(t,e.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol),Ua(i,81408)||s(n,e.Diagnostics.The_right_hand_side_of_an_in_expression_must_be_of_type_any_an_object_type_or_a_type_parameter),rf}function bs(t,n,r){for(var i=t.properties,a=0,o=i;a<o.length;a++){var u=o[a];if(248===u.kind||249===u.kind){var c=u.name;if(137===c.kind&&Ba(c),He(c))continue;var l=ze(c),p=We(n)?n:je(n,l)||Fa(l)&&vn(n,1)||vn(n,0);p?249===u.kind?As(u,p):As(u.initializer,p):s(c,e.Diagnostics.Type_0_has_no_property_1_and_no_string_index_signature,xe(n),e.declarationNameToString(c))}else s(u,e.Diagnostics.Property_assignment_expected)}return n}function Ss(t,n,r){for(var i=$u(n,t,!1)||cf,a=t.elements,o=0;o<a.length;o++){var u=a[o];if(190!==u.kind)if(188!==u.kind){var c=\"\"+o,l=We(n)?n:Ai(n)?je(n,c):i;l?As(u,l,r):Ei(n)?s(u,e.Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2,xe(n),n.elementTypes.length,a.length):s(u,e.Diagnostics.Type_0_has_no_property_1,xe(n),c)}else if(o<a.length-1)s(u,e.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern);else{var p=u.expression;184===p.kind&&56===p.operatorToken.kind?s(p.operatorToken,e.Diagnostics.A_rest_element_cannot_have_an_initializer):As(p,ur(i),r)}}return n}function As(e,t,n){var r;if(249===e.kind){var i=e;i.objectAssignmentInitializer&&Cs(i.name,i.equalsToken,i.objectAssignmentInitializer,n),r=e.name}else r=e;return 184===r.kind&&56===r.operatorToken.kind&&(Es(r,n),r=r.left),168===r.kind?bs(r,t,n):167===r.kind?Ss(r,t,n):Ts(r,t,n)}function Ts(t,n,r){var i=Os(t,r);return ss(t,e.Diagnostics.Invalid_left_hand_side_of_assignment_expression,e.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)&&ni(n,i,t,void 0),n}function Es(e,t){return Cs(e.left,e.operatorToken,e.right,t,e)}function Cs(t,n,r,a,o){function u(n){var i=ms(f,16777216)?t:ms(d,16777216)?r:void 0;return!i||(s(i,e.Diagnostics.The_0_operator_cannot_be_applied_to_type_symbol,e.tokenToString(n)),!1)}function c(n){if(i&&p>=56&&p<=68){ss(t,e.Diagnostics.Invalid_left_hand_side_of_assignment_expression,e.Diagnostics.Left_hand_side_of_assignment_expression_cannot_be_a_constant)&&ni(n,f,t,void 0)}}function l(){s(o||n,e.Diagnostics.Operator_0_cannot_be_applied_to_types_1_and_2,e.tokenToString(n.kind),xe(f),xe(d))}var p=n.kind;if(56===p&&(168===t.kind||167===t.kind))return As(t,Os(r,a),a);var f=Os(t,a),d=Os(r,a);switch(p){case 37:case 38:case 59:case 60:case 39:case 61:case 40:case 62:case 36:case 58:case 43:case 63:case 44:case 64:case 45:case 65:case 47:case 67:case 48:case 68:case 46:case 66:96&f.flags&&(f=d),96&d.flags&&(d=f);var m=void 0;if(8&f.flags&&8&d.flags&&void 0!==(m=function(e){switch(e){case 47:case 67:return 52;case 48:case 68:return 33;case 46:case 66:return 51;default:return}}(n.kind)))s(o||n,e.Diagnostics.The_0_operator_is_not_allowed_for_boolean_types_Consider_using_1_instead,e.tokenToString(n.kind),e.tokenToString(m));else{var h=os(t,f,e.Diagnostics.The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type),y=os(r,d,e.Diagnostics.The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_or_an_enum_type);h&&y&&c(nf)}return nf;case 35:case 57:96&f.flags&&(f=d),96&d.flags&&(d=f);var _=void 0;if(hs(f,132)&&hs(d,132))_=nf;else if(hs(f,258)||hs(d,258)?_=tf:(We(f)||We(d))&&(_=f===cf||d===cf?cf:ef),_&&!u(p))return _;return _?(57===p&&c(_),_):(l(),ef);case 25:case 27:case 28:case 29:if(!u(p))return rf;case 30:case 31:case 32:case 33:return ms(f,258)&&ms(d,258)?rf:(ei(f,d)||ei(d,f)||l(),rf);case 91:return gs(t,r,f,d);case 90:return vs(t,r,f,d);case 51:return d;case 52:return vr([f,d]);case 56:return c(d),Ci(d);case 24:return d}}function Ns(t){for(var n=t,r=t.parent;r;){if(e.isFunctionLike(r)&&n===r.body)return!1;if(e.isClassLike(n))return!0;n=r,r=r.parent}return!1}function ws(t){if(i&&(2&t.parserContextFlags&&!Ns(t)||Ep(t,e.Diagnostics.A_yield_expression_is_only_allowed_in_a_generator_body),ua(t)&&s(t,e.Diagnostics.yield_expressions_cannot_be_used_in_a_parameter_initializer)),t.expression){var n=e.getContainingFunction(t);if(n&&n.asteriskToken){var r=Ds(t.expression,void 0),a=void 0,o=!!t.asteriskToken;if(o&&(a=Qu(r,t.expression)),n.type){var u=tc(Rr(n.type))||ef;o?ni(a,u,t.expression,void 0):ni(r,u,t.expression,void 0)}}}return ef}function ks(e,t){return Os(e.condition),vr([Os(e.whenTrue,t),Os(e.whenFalse,t)])}function xs(e){var t=Ca(e);return t&&ya(t)?Er(e.text):tf}function Rs(t){return e.forEach(t.templateSpans,function(e){Os(e.expression)}),tf}function Is(e,t,n){var r=e.contextualType;e.contextualType=t;var i=Os(e,n);return e.contextualType=r,i}function Ds(e,t){var n=g(e);return n.resolvedType||(n.resolvedType=Os(e,t)),n.resolvedType}function Ms(e,t){return 137===e.name.kind&&Ba(e.name),Os(e.initializer,t)}function Ps(e,t){return hp(e),137===e.name.kind&&Ba(e.name),Ls(e,is(e,t),t)}function Ls(e,t,n){if(Ra(n)){var r=To(t);if(r&&r.typeParameters){var i=Ea(e);if(i){var a=To(i);if(a&&!a.typeParameters)return Dn(Eo(r,a,n))}}}return t}function Os(t,n){var r;if(136===t.kind)r=uo(t);else{r=Ls(t,Fs(t,n),n)}if(ys(r)){169===t.parent.kind&&t.parent.expression===t||170===t.parent.kind&&t.parent.expression===t||(69===t.kind||136===t.kind)&&ol(t)||s(t,e.Diagnostics.const_enums_can_only_be_used_in_property_or_index_access_expressions_or_the_right_hand_side_of_an_import_declaration_or_export_assignment)}return r}function Us(e){return Pp(e),nf}function Fs(t,n){switch(t.kind){case 69:return Hi(t);case 97:return ea(t);case 95:return ra(t);case 93:return uf;case 99:case 84:return rf;case 8:return Us(t);case 186:return Rs(t);case 9:return xs(t);case 11:return tf;case 10:return Af;case 167:return Pa(t,n);case 168:return Ka(t,n);case 169:return so(t);case 170:return ho(t);case 171:case 172:return zo(t);case 173:return Ho(t);case 175:return Os(t.expression,n);case 189:return mc(t);case 176:case 177:return is(t,n);case 179:return cs(t);case 174:case 192:return Yo(t);case 178:return us(t);case 180:return ls(t);case 181:return ps(t);case 182:return fs(t);case 183:return ds(t);case 184:return Es(t,n);case 185:return ks(t,n);case 188:return Da(t,n);case 190:return sf;case 187:return ws(t);case 243:return ro(t);case 236:return ja(t);case 237:return Va(t);case 238:e.Debug.fail(\"Shouldn't ever directly check a JsxOpeningElement\")}return cf}function Bs(t){t.expression&&Ep(t.expression,e.Diagnostics.Type_expected),qc(t.constraint),Fn(Rt(ie(t))),i&&fc(t.name,e.Diagnostics.Type_parameter_name_cannot_be_0)}function Ks(t){Wl(t)||ql(t),Uu(t);var n=e.getContainingFunction(t);56&t.flags&&(n=e.getContainingFunction(t),145===n.kind&&e.nodeIsPresent(n.body)||s(t,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation)),t.questionToken&&e.isBindingPattern(t.name)&&n.body&&s(t,e.Diagnostics.A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature),!t.dotDotDotToken||e.isBindingPattern(t.name)||bi(ct(t.symbol))||s(t,e.Diagnostics.A_rest_parameter_must_be_of_an_array_type)}function Vs(e){return!(!e.asteriskToken||!e.body)&&(144===e.kind||216===e.kind||176===e.kind)}function js(e,t){if(e)for(var n=0;n<e.length;n++){var r=e[n];if(69===r.name.kind&&r.name.text===t.text)return n}return-1}function Ws(t){var n=qs(t);if(!n)return void s(t,e.Diagnostics.A_type_predicate_is_only_allowed_in_return_type_position_for_functions_and_methods);var r=Cn(n).typePredicate;if(r){var i=t.parameterName;if(e.isThisTypePredicate(r))xr(i);else if(r.parameterIndex>=0)n.parameters[r.parameterIndex].dotDotDotToken?s(i,e.Diagnostics.A_type_predicate_cannot_reference_a_rest_parameter):ni(r.type,pl(n.parameters[r.parameterIndex]),t.type);else if(i){for(var a=!1,o=0,u=n.parameters;o<u.length;o++){var c=u[o].name;if(e.isBindingPattern(c)&&zs(c,i,r.parameterName)){a=!0;break}}a||s(t.parameterName,e.Diagnostics.Cannot_find_parameter_0,r.parameterName)}}}function qs(e){switch(e.parent.kind){case 177:case 148:case 216:case 176:case 153:case 144:case 143:var t=e.parent;if(e===t.type)return t}}function zs(t,n,r){for(var i=0,a=t.elements;i<a.length;i++){var o=a[i].name;if(69===o.kind&&o.text===r)return s(n,e.Diagnostics.A_type_predicate_cannot_reference_element_0_in_a_binding_pattern,r),!0;if((165===o.kind||164===o.kind)&&zs(o,n,r))return!0}}function Hs(t){if(150===t.kind?Zl(t):153!==t.kind&&216!==t.kind&&154!==t.kind&&148!==t.kind&&145!==t.kind&&149!==t.kind||Gl(t),dc(t.typeParameters),e.forEach(t.parameters,Ks),t.type&&qc(t.type),i){if(ku(t),qp.noImplicitAny&&!t.type)switch(t.kind){case 149:s(t,e.Diagnostics.Construct_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type);break;case 148:s(t,e.Diagnostics.Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type)}if(t.type)if(zp>=2&&Vs(t)){var n=Rr(t.type);if(n===of)s(t.type,e.Diagnostics.A_generator_cannot_have_a_void_type_annotation);else{var r=tc(n)||ef,a=sr(r);ni(a,n,t.type)}}else e.isAsyncFunctionLike(t)&&gu(t)}uu(t)}function Ys(t){if(218===t.kind){var n=ie(t);if(n.declarations.length>0&&n.declarations[0]!==t)return}var r=Mn(ie(t));if(r)for(var i=!1,a=!1,o=0,u=r.declarations;o<u.length;o++){var c=u[o],l=c;if(1===l.parameters.length&&l.parameters[0].type)switch(l.parameters[0].type.kind){case 130:a?s(l,e.Diagnostics.Duplicate_string_index_signature):a=!0;break;case 128:i?s(l,e.Diagnostics.Duplicate_number_index_signature):i=!0}}}function Js(e){Wl(e)||ql(e)||xp(e)||sp(e.name),Uu(e)}function Gs(t){hp(t)||sp(t.name),Nu(t),128&t.flags&&t.body&&s(t,e.Diagnostics.Method_0_cannot_have_an_implementation_because_it_is_marked_abstract,e.declarationNameToString(t.name))}function Xs(t){function n(e){return!(142!==e.kind||64&e.flags||!e.initializer)}Hs(t),wp(t)||kp(t),qc(t.body);var r=ie(t);if(t===e.getDeclarationOfKind(r,t.kind)&&lu(r),!e.nodeIsMissing(t.body)&&i){var a=t.parent;if(e.getClassExtendsHeritageClauseElement(a)){var o=Zi(a),u=Qi(t);if(u){if(o&&s(u,e.Diagnostics.A_constructor_cannot_contain_a_super_call_when_its_class_extends_null),e.forEach(t.parent.members,n)||e.forEach(t.parameters,function(e){return 56&e.flags})){for(var c=t.body.statements,l=void 0,p=0,f=c;p<f.length;p++){var d=f[p];if(198===d.kind&&e.isSuperCallExpression(d.expression)){l=d;break}if(!e.isPrologueDirective(d))break}l||s(t,e.Diagnostics.A_super_call_must_be_the_first_statement_in_the_constructor_when_a_class_contains_initialized_properties_or_has_parameter_properties)}}else o||s(t,e.Diagnostics.Constructors_for_derived_classes_must_contain_a_super_call)}}}function $s(t){if(i){if(Gl(t)||dp(t)||sp(t.name),Eu(t),Hs(t),146===t.kind&&!e.isInAmbientContext(t)&&e.nodeIsPresent(t.body)&&524288&t.flags&&(1048576&t.flags?qp.noImplicitReturns&&s(t.name,e.Diagnostics.Not_all_code_paths_return_a_value):s(t.name,e.Diagnostics.A_get_accessor_must_return_a_value)),137===t.name.kind&&Ba(t.name),!e.hasDynamicName(t)){var n=146===t.kind?147:146,r=e.getDeclarationOfKind(t.symbol,n);if(r){(56&t.flags)!=(56&r.flags)&&s(t.name,e.Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility);var a=rt(t),o=rt(r);a&&o&&(Xr(a,o)||s(t,e.Diagnostics.get_and_set_accessor_must_have_the_same_type))}}it(ie(t))}168!==t.parent.kind?qc(t.body):zc(t)}function Qs(e){qc(e.body)}function Zs(e){Eu(e)}function eu(t,n){for(var r,i,a=!0,o=0;o<t.length;o++){var s=Fn(t[o]);if(s){r||(r=e.map(n,Rr),i=Pr(t,r));var u=r[o];a=a&&ni(u,jt(Hr(s,i),u),n[o],e.Diagnostics.Type_0_does_not_satisfy_the_constraint_1)}}return a}function tu(t){tp(t,t.typeArguments);var n=Gn(t);if(n!==cf&&t.typeArguments&&(e.forEach(t.typeArguments,qc),i)){var r=g(t).resolvedSymbol;eu(524288&r.flags?_(r).typeParameters:n.target.localTypeParameters,t.typeArguments)}}function nu(e){Xn(e)}function ru(t){if(e.forEach(t.members,qc),i){pc(Tr(t)),Ys(t)}}function iu(e){qc(e.elementType)}function au(t){Hl(t.elementTypes)||0!==t.elementTypes.length||Np(t,e.Diagnostics.A_tuple_type_element_list_cannot_be_empty),e.forEach(t.elementTypes,qc)}function ou(t){e.forEach(t.types,qc)}function su(t){return 16&t.flags&&e.isInAmbientContext(t)}function uu(t){if(i){var n=Cn(t);if(n.hasStringLiterals){if(e.nodeIsPresent(t.body))return void s(t,e.Diagnostics.A_signature_with_an_implementation_cannot_use_a_string_literal_type);var r;if(!t.name&&t.parent&&218===t.parent.kind){e.Debug.assert(148===t.kind||149===t.kind);var a=148===t.kind?0:1;r=_n(Dt(ie(t.parent)),a)}else r=Nn(ie(t));for(var o=0,u=r;o<u.length;o++){var c=u[o];if(!c.hasStringLiterals&&ri(n,c,!1))return}s(t,e.Diagnostics.Specialized_overload_signature_is_not_assignable_to_any_non_specialized_signature)}}}function cu(t,n){var r=e.getCombinedNodeFlags(t);return 218!==t.parent.kind&&217!==t.parent.kind&&189!==t.parent.kind&&e.isInAmbientContext(t)&&(4&r||(r|=2),r|=4),r&n}function lu(t){function n(e,t){return void 0!==t&&t.parent===e[0].parent?t:e[0]}function r(t){if(!t.name||!e.nodeIsMissing(t.name)){var n=!1,r=e.forEachChild(t.parent,function(e){if(n)return e;n=e===t});if(r&&r.pos===t.end&&r.kind===t.kind){var i=r.name||r;if(t.name&&r.name&&t.name.text===r.name.text){if((144===t.kind||143===t.kind)&&(64&t.flags)!=(64&r.flags)){s(i,64&t.flags?e.Diagnostics.Function_overload_must_be_static:e.Diagnostics.Function_overload_must_not_be_static)}return}if(e.nodeIsPresent(r.body))return void s(i,e.Diagnostics.Function_implementation_name_must_be_0,e.declarationNameToString(t.name))}var a=t.name||t;h?s(a,e.Diagnostics.Constructor_implementation_is_missing):128&t.flags?s(a,e.Diagnostics.All_declarations_of_an_abstract_method_must_be_consecutive):s(a,e.Diagnostics.Function_implementation_is_missing_or_not_immediately_following_the_declaration)}}if(i){for(var a,o,u,c=0,l=182,p=!1,f=!0,d=!1,m=t.declarations,h=0!=(16384&t.flags),y=t.parent&&1536&t.parent.flags,_=!1,g=!1,v=0,b=m;v<b.length;v++){var S=b[v],A=S,T=e.isInAmbientContext(A),E=218===A.parent.kind||156===A.parent.kind||T;if(E&&(u=void 0),216===A.kind||144===A.kind||143===A.kind||145===A.kind){var C=cu(A,182);c|=C,l&=C,p=p||e.hasQuestionToken(A),f=f&&e.hasQuestionToken(A),e.nodeIsPresent(A.body)&&a?h?g=!0:_=!0:!y&&u&&u.parent===A.parent&&u.end!==A.pos&&r(u),e.nodeIsPresent(A.body)?a||(a=A):d=!0,u=A,E||(o=A)}}if(g&&e.forEach(m,function(t){s(t,e.Diagnostics.Multiple_constructor_implementations_are_not_allowed)}),_&&e.forEach(m,function(t){s(t.name,e.Diagnostics.Duplicate_function_implementation)}),y||!o||o.body||128&o.flags||r(o),d&&(function(t,r,i,a,o){if(0!=(a^o)){var u=cu(n(t,r),i);e.forEach(t,function(t){var n=cu(t,i)^u;2&n?s(t.name,e.Diagnostics.Overload_signatures_must_all_be_exported_or_not_exported):4&n?s(t.name,e.Diagnostics.Overload_signatures_must_all_be_ambient_or_non_ambient):48&n?s(t.name,e.Diagnostics.Overload_signatures_must_all_be_public_private_or_protected):128&n&&s(t.name,e.Diagnostics.Overload_signatures_must_all_be_abstract_or_not_abstract)})}}(m,a,182,c,l),function(t,r,i,a){if(i!==a){var o=e.hasQuestionToken(n(t,r));e.forEach(t,function(t){e.hasQuestionToken(t)!==o&&s(t.name,e.Diagnostics.Overload_signatures_must_all_be_optional_or_required)})}}(m,a,p,f),a)){var N=Nn(t),w=Cn(a);if(!w.hasStringLiterals)for(var k=0,x=N;k<x.length;k++){var R=x[k];if(!R.hasStringLiterals&&!oi(w,R)){s(R.declaration,e.Diagnostics.Overload_signature_is_not_compatible_with_function_implementation);break}}}}}function pu(t){function n(t){switch(t.kind){case 218:return 2097152;case 221:return e.isAmbientModule(t)||0!==e.getModuleInstanceState(t)?5242880:4194304;case 217:case 220:return 3145728;case 224:var r=0,i=V(ie(t));return e.forEach(i.declarations,function(e){r|=n(e)}),r;default:return 1048576}}if(i){var r=t.localSymbol;if((r||(r=ie(t),7340032&r.flags))&&e.getDeclarationOfKind(r,t.kind)===t){for(var a=0,o=0,u=0,c=0,l=r.declarations;c<l.length;c++){var p=l[c],f=n(p),d=cu(p,514);2&d?512&d?u|=f:a|=f:o|=f}var m=a|o,h=a&o,y=u&m;if(h||y)for(var _=0,g=r.declarations;_<g.length;_++){var p=g[_],f=n(p);f&y?s(p.name,e.Diagnostics.Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead,e.declarationNameToString(p.name)):f&h&&s(p.name,e.Diagnostics.Individual_declarations_in_merged_declaration_0_must_be_all_exported_or_all_local,e.declarationNameToString(p.name))}}}}function fu(t,n,r){return t=wi(t),!We(t)&&ei(t,Bf())?(n&&(r||(r=e.Diagnostics.Operand_for_await_does_not_have_a_valid_callable_then_member),s(n,r)),cf):t}function du(t){if(!(1&t.flags)){if(4096&t.flags&&t.target===Lf())return t.typeArguments[0];var n=Uf();if(n!==lf&&ei(t,n)){var r=je(t,\"then\");if(!(r&&1&r.flags)){var i=r?_n(r,0):jp;if(0!==i.length){var a=vr(e.map(i,mu));if(!(1&a.flags)){var o=_n(a,0);if(0!==o.length){return vr(e.map(o,mu))}}}}}}}function mu(e){return Jo(e,0)}function hu(e){return yu(e,void 0,void 0)}function yu(t,n,r){function i(t){if(16384&t.flags){for(var a=[],o=0,u=t.types;o<u.length;o++){var c=u[o];a.push(i(c))}return vr(a)}var l=du(t);if(void 0===l)return fu(t,n,r);if(t.id===l.id||od.indexOf(l.id)>=0)return n&&s(n,e.Diagnostics._0_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method,we(t.symbol)),cf;od.push(t.id);var p=i(l);return od.pop(),p}return i(t)}function _u(t,n){if(t===cf)return cf;var r=Pf();return r===ff||r===lt(t)?yu(t,n,e.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type):(s(n,e.Diagnostics.The_return_type_of_an_async_function_or_method_must_be_the_global_Promise_T_type),cf)}function gu(t){if(qp.noCustomAsyncPromise&&zp>=2){return _u(Rr(t.type),t.type)}var n=Ff();if(n===lf)return cf;var r=Rr(t.type);if(r===cf&&qp.isolatedModules)return cf;var i=g(t.type).resolvedSymbol;if(!i||!se(i)){var a=i?we(i):xe(r);return s(t,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type,a),cf}if(Au(t),!ni(ct(i),n,t,e.Diagnostics.Type_0_is_not_a_valid_async_function_return_type))return cf;var o=e.getEntityNameFromTypeNode(t.type),u=Dc(o),c=b(t.locals,u.text,107455);return c?(s(c.valueDeclaration,e.Diagnostics.Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions,u.text,z(i)),cf):yu(r,t,e.Diagnostics.An_async_function_or_method_must_have_a_valid_awaitable_return_type)}function vu(t){var n=Wo(t),r=kn(n);if(!(1&r.flags)){var i,a,o=Vo(t);switch(t.parent.kind){case 217:i=vr([ct(ie(t.parent)),of]);break;case 139:i=of,a=e.chainDiagnosticMessages(a,e.Diagnostics.The_return_type_of_a_parameter_decorator_function_must_be_either_void_or_any);break;case 142:i=of,a=e.chainDiagnosticMessages(a,e.Diagnostics.The_return_type_of_a_property_decorator_function_must_be_either_void_or_any);break;case 144:case 146:case 147:i=vr([ir(pl(t.parent)),of])}ni(r,i,t,o,a)}}function bu(e){if(e&&152===e.kind){var t=Dc(e.typeName),n=152===t.parent.kind?793056:1536,r=T(t,t.text,8388608|n,void 0,void 0);if(r&&8388608&r.flags){107455&V(r).flags&&!Nl(V(r))&&W(r)}}}function Su(e){bu(e.type)}function Au(e){bu(e.type)}function Tu(e){for(var t=0,n=e.parameters;t<n.length;t++){Su(n[t])}}function Eu(t){if(t.decorators&&e.nodeCanBeDecorated(t)){if(qp.experimentalDecorators||s(t,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning),qp.emitDecoratorMetadata)switch(t.kind){case 217:var n=e.getFirstConstructorWithBody(t);n&&Tu(n);break;case 144:case 146:case 147:Tu(t),Au(t);break;case 142:case 139:Su(t)}e.forEach(t.decorators,vu)}}function Cu(e){i&&(Nu(e)||up(e),Du(e,e.name),Ru(e,e.name),Mu(e,e.name),Pu(e,e.name))}function Nu(t){Eu(t),Hs(t);var n=e.isAsyncFunctionLike(t);if(t.name&&137===t.name.kind&&Ba(t.name),!e.hasDynamicName(t)){var r=ie(t),a=t.localSymbol||r;t===e.forEach(a.declarations,function(n){return n.kind!==t.kind||e.isSourceFileJavaScript(e.getSourceFileOfNode(n))?void 0:n})&&lu(a),r.parent&&e.getDeclarationOfKind(r,t.kind)===t&&lu(r)}if(qc(t.body),!t.asteriskToken){rs(t,t.type&&(n?gu(t):Rr(t.type)))}i&&!t.type&&(qp.noImplicitAny&&e.nodeIsMissing(t.body)&&!su(t)&&xi(t,ef),t.asteriskToken&&e.nodeIsPresent(t.body)&&kn(Cn(t)))}function wu(t){195===t.kind&&Mp(t),e.forEach(t.statements,qc)}function ku(t){!e.hasRestParameter(t)||e.isInAmbientContext(t)||e.nodeIsMissing(t.body)||e.forEach(t.parameters,function(t){t.name&&!e.isBindingPattern(t.name)&&t.name.text===Xp.name&&s(t,e.Diagnostics.Duplicate_identifier_arguments_Compiler_uses_arguments_to_initialize_rest_parameters)})}function xu(t,n,r){if(!n||n.text!==r)return!1;if(142===t.kind||141===t.kind||144===t.kind||143===t.kind||146===t.kind||147===t.kind)return!1;if(e.isInAmbientContext(t))return!1;var i=e.getRootDeclaration(t);return 139!==i.kind||!e.nodeIsMissing(i.parent.body)}function Ru(e,t){xu(e,t,\"_this\")&&ad.push(e)}function Iu(t){for(var n=t;n;){if(4&xl(n)){return void(69!==t.kind?s(t.name,e.Diagnostics.Duplicate_identifier_this_Compiler_uses_variable_declaration_this_to_capture_this_reference):s(t,e.Diagnostics.Expression_resolves_to_variable_declaration_this_that_compiler_uses_to_capture_this_reference))}n=n.parent}}function Du(t,n){if(xu(t,n,\"_super\")){var r=e.getContainingClass(t);if(r&&!e.isInAmbientContext(r)&&e.getClassExtendsHeritageClauseElement(r)){69!==t.kind?s(t,e.Diagnostics.Duplicate_identifier_super_Compiler_uses_super_to_capture_base_class_reference):s(t,e.Diagnostics.Expression_resolves_to_super_that_compiler_uses_to_capture_base_class_reference)}}}function Mu(t,n){if((xu(t,n,\"require\")||xu(t,n,\"exports\"))&&(221!==t.kind||1===e.getModuleInstanceState(t))){var r=Ke(t);251===r.kind&&e.isExternalOrCommonJsModule(r)&&s(n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module,e.declarationNameToString(n),e.declarationNameToString(n))}}function Pu(t,n){if(qp.noCustomAsyncPromise&&xu(t,n,\"Promise\")&&(221!==t.kind||1===e.getModuleInstanceState(t))){var r=Ke(t);251===r.kind&&e.isExternalOrCommonJsModule(r)&&33554432&r.flags&&s(n,e.Diagnostics.Duplicate_identifier_0_Compiler_reserves_name_1_in_top_level_scope_of_a_module_containing_async_functions,e.declarationNameToString(n),e.declarationNameToString(n))}}function Lu(t){if(0==(24576&e.getCombinedNodeFlags(t))&&!e.isParameterDeclaration(t)&&(214!==t.kind||t.initializer)){var n=ie(t);if(1&n.flags){var r=T(t,t.name.text,3,void 0,void 0);if(r&&r!==n&&2&r.flags&&24576&ao(r)){var i=e.getAncestor(r.valueDeclaration,215),a=196===i.parent.kind&&i.parent.parent?i.parent.parent:void 0;if(!(a&&(195===a.kind&&e.isFunctionLike(a.parent)||222===a.kind||221===a.kind||251===a.kind))){var o=we(r);s(t,e.Diagnostics.Cannot_initialize_outer_scoped_variable_0_in_the_same_scope_as_block_scoped_declaration_1,o,o)}}}}}function Ou(t){function n(i){if(69===i.kind){var a=g(i).resolvedSymbol;if(a&&a!==Qp&&b(r.locals,a.name,107455)===a){if(139===a.valueDeclaration.kind){if(a.valueDeclaration===t)return void s(i,e.Diagnostics.Parameter_0_cannot_be_referenced_in_its_initializer,e.declarationNameToString(t.name));if(a.valueDeclaration.pos<t.pos)return}s(i,e.Diagnostics.Initializer_of_parameter_0_cannot_reference_identifier_1_declared_after_it,e.declarationNameToString(t.name),e.declarationNameToString(i))}}else e.forEachChild(i,n)}if(139===e.getRootDeclaration(t).kind){var r=e.getContainingFunction(t);n(t.initializer)}}function Uu(t){if(Eu(t),qc(t.type),137===t.name.kind&&(Ba(t.name),t.initializer&&Ds(t.initializer)),166===t.kind&&t.propertyName&&137===t.propertyName.kind&&Ba(t.propertyName),e.isBindingPattern(t.name)&&e.forEach(t.name.elements,qc),t.initializer&&139===e.getRootDeclaration(t).kind&&e.nodeIsMissing(e.getContainingFunction(t).body))return void s(t,e.Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation);if(e.isBindingPattern(t.name))return void(t.initializer&&203!==t.parent.parent.kind&&(ni(Ds(t.initializer),tt(t),t,void 0),Ou(t)));var n=ie(t),r=nt(n);if(t===n.valueDeclaration)t.initializer&&203!==t.parent.parent.kind&&(ni(Ds(t.initializer),r,t,void 0),Ou(t));else{var i=tt(t);r===cf||i===cf||Xr(r,i)||s(t.name,e.Diagnostics.Subsequent_variable_declarations_must_have_the_same_type_Variable_0_must_be_of_type_1_but_here_has_type_2,e.declarationNameToString(t.name),xe(r),xe(i)),t.initializer&&ni(Ds(t.initializer),i,t,void 0)}142!==t.kind&&141!==t.kind&&(pu(t),214!==t.kind&&166!==t.kind||Lu(t),Du(t,t.name),Ru(t,t.name),Mu(t,t.name),Pu(t,t.name))}function Fu(e){return gp(e),Uu(e)}function Bu(e){return _p(e),Uu(e)}function Ku(t){Wl(t)||ql(t)||bp(t.declarationList)||Ap(t),e.forEach(t.declarationList.declarations,qc)}function Vu(t){if(t.modifiers&&168===t.parent.kind){if(!e.isAsyncFunctionLike(t))return Ep(t,e.Diagnostics.Modifiers_cannot_appear_here);if(t.modifiers.length>1)return Ep(t,e.Diagnostics.Modifiers_cannot_appear_here)}}function ju(e){Mp(e),Os(e.expression)}function Wu(t){Mp(t),Os(t.expression),qc(t.thenStatement),197===t.thenStatement.kind&&s(t.thenStatement,e.Diagnostics.The_body_of_an_if_statement_cannot_be_the_empty_statement),qc(t.elseStatement)}function qu(e){Mp(e),qc(e.statement),Os(e.expression)}function zu(e){Mp(e),Os(e.expression),qc(e.statement)}function Hu(t){Mp(t)||t.initializer&&215===t.initializer.kind&&bp(t.initializer),t.initializer&&(215===t.initializer.kind?e.forEach(t.initializer.declarations,Fu):Os(t.initializer)),t.condition&&Os(t.condition),t.incrementor&&Os(t.incrementor),qc(t.statement)}function Yu(t){if(fp(t),215===t.initializer.kind)Gu(t);else{var n=t.initializer,r=Xu(t.expression);if(167===n.kind||168===n.kind)As(n,r||cf);else{var i=Os(n);ss(n,e.Diagnostics.Invalid_left_hand_side_in_for_of_statement,e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_be_a_previously_defined_constant),r&&ni(r,i,n,void 0)}}qc(t.statement)}function Ju(t){if(fp(t),215===t.initializer.kind){var n=t.initializer.declarations[0];n&&e.isBindingPattern(n.name)&&s(n.name,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern),Gu(t)}else{var r=t.initializer,i=Os(r);167===r.kind||168===r.kind?s(r,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_destructuring_pattern):Ua(i,258)?ss(r,e.Diagnostics.Invalid_left_hand_side_in_for_in_statement,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_be_a_previously_defined_constant):s(r,e.Diagnostics.The_left_hand_side_of_a_for_in_statement_must_be_of_type_string_or_any)}Ua(Os(t.expression),81408)||s(t.expression,e.Diagnostics.The_right_hand_side_of_a_for_in_statement_must_be_of_type_any_an_object_type_or_a_type_parameter),qc(t.statement)}function Gu(e){var t=e.initializer;if(t.declarations.length>=1){Fu(t.declarations[0])}}function Xu(e){return $u(fl(e),e,!0)}function $u(t,n,r){if(We(t))return t;if(zp>=2)return Qu(t,n);if(r)return nc(t,n);if(Si(t)){var i=vn(t,1);if(i)return i}return s(n,e.Diagnostics.Type_0_is_not_an_array_type,xe(t)),cf}function Qu(e,t){var n=Zu(e,t);return t&&n&&ni(e,or(n),t),n||ef}function Zu(t,n){if(!We(t)){var r=t;if(!r.iterableElementType)if(4096&t.flags&&t.target===Cf)r.iterableElementType=t.typeArguments[0];else{var i=je(t,e.getPropertyNameForKnownSymbolName(\"iterator\"));if(We(i))return;var a=i?_n(i,0):jp;if(0===a.length)return void(n&&s(n,e.Diagnostics.Type_must_have_a_Symbol_iterator_method_that_returns_an_iterator));r.iterableElementType=ec(vr(e.map(a,kn)),n)}return r.iterableElementType}}function ec(t,n){if(!We(t)){var r=t;if(!r.iteratorElementType)if(4096&t.flags&&t.target===Nf)r.iteratorElementType=t.typeArguments[0];else{var i=je(t,\"next\");if(We(i))return;var a=i?_n(i,0):jp;if(0===a.length)return void(n&&s(n,e.Diagnostics.An_iterator_must_have_a_next_method));var o=vr(e.map(a,kn));if(We(o))return;var u=je(o,\"value\");if(!u)return void(n&&s(n,e.Diagnostics.The_type_returned_by_the_next_method_of_an_iterator_must_have_a_value_property));r.iteratorElementType=u}return r.iteratorElementType}}function tc(e){if(!We(e))return 4096&e.flags&&e.target===wf?e.typeArguments[0]:Zu(e,void 0)||ec(e,void 0)}function nc(t,n){e.Debug.assert(zp<2);var r=t;16384&t.flags?r=vr(e.filter(t.types,function(e){return!(258&e.flags)})):258&t.flags&&(r=pf);var i=t!==r,a=!1;if(i&&(zp<1&&(s(n,e.Diagnostics.Using_a_string_in_a_for_of_statement_is_only_supported_in_ECMAScript_5_and_higher),a=!0),r===lf))return tf;if(!Si(r)){if(!a){s(n,i?e.Diagnostics.Type_0_is_not_an_array_type:e.Diagnostics.Type_0_is_not_an_array_type_or_a_string_type,xe(r))}return i?tf:cf}var o=vn(r,1)||cf;return i?258&o.flags?tf:vr([o,tf]):o}function rc(e){Mp(e)||yp(e)}function ic(t){return!(146!==t.kind||!e.getSetAccessorTypeAnnotationNode(e.getDeclarationOfKind(t.symbol,147)))}function ac(t){if(!Mp(t)){e.getContainingFunction(t)||Ep(t,e.Diagnostics.A_return_statement_can_only_be_used_within_a_function_body)}if(t.expression){var n=e.getContainingFunction(t);if(n){var r=Cn(n),i=kn(r),a=Ds(t.expression);if(n.asteriskToken)return;if(147===n.kind)s(t.expression,e.Diagnostics.Setters_cannot_return_a_value);else if(145===n.kind)ni(a,i,t.expression)||s(t.expression,e.Diagnostics.Return_type_of_constructor_signature_must_be_assignable_to_the_instance_type_of_the_class);else if(n.type||ic(n))if(e.isAsyncFunctionLike(n)){var o=du(i),u=yu(a,t.expression,e.Diagnostics.Return_expression_in_async_function_does_not_have_a_valid_callable_then_member);o&&ni(u,o,t.expression)}else ni(a,i,t.expression)}}}function oc(t){Mp(t)||8&t.parserContextFlags&&Ep(t,e.Diagnostics.with_statements_are_not_allowed_in_an_async_function_block),Os(t.expression),s(t.expression,e.Diagnostics.All_symbols_within_a_with_block_will_be_resolved_to_any)}function sc(t){Mp(t);var n,r=!1,a=Os(t.expression),o=ms(a,258);e.forEach(t.caseBlock.clauses,function(s){if(245===s.kind&&!r)if(void 0===n)n=s;else{var u=e.getSourceFileOfNode(t),c=e.skipTrivia(u.text,s.pos),l=s.statements.length>0?s.statements[0].pos:s.end;Cp(u,c,l-c,e.Diagnostics.A_default_clause_cannot_appear_more_than_once_in_a_switch_statement),r=!0}if(i&&244===s.kind){var p=s,f=Os(p.expression);o&&ms(f,258)||ei(a,f)||ni(f,a,p.expression,void 0)}e.forEach(s.statements,qc)})}function uc(t){if(!Mp(t))for(var n=t.parent;n&&!e.isFunctionLike(n);){if(210===n.kind&&n.label.text===t.label.text){var r=e.getSourceFileOfNode(t);Np(t.label,e.Diagnostics.Duplicate_label_0,e.getTextOfNodeFromSourceText(r.text,t.label));break}n=n.parent}qc(t.statement)}function cc(t){Mp(t)||void 0===t.expression&&Lp(t,e.Diagnostics.Line_break_not_permitted_here),t.expression&&Os(t.expression)}function lc(t){Mp(t),wu(t.tryBlock);var n=t.catchClause;if(n){if(n.variableDeclaration)if(69!==n.variableDeclaration.name.kind)Ep(n.variableDeclaration.name,e.Diagnostics.Catch_clause_variable_name_must_be_an_identifier);else if(n.variableDeclaration.type)Ep(n.variableDeclaration.type,e.Diagnostics.Catch_clause_variable_cannot_have_a_type_annotation);else if(n.variableDeclaration.initializer)Ep(n.variableDeclaration.initializer,e.Diagnostics.Catch_clause_variable_cannot_have_an_initializer);else{var r=n.variableDeclaration.name.text,i=n.block.locals;if(i&&e.hasProperty(i,r)){var a=i[r];a&&0!=(2&a.flags)&&Np(a.valueDeclaration,e.Diagnostics.Cannot_redeclare_identifier_0_in_catch_clause,r)}}wu(n.block)}t.finallyBlock&&wu(t.finallyBlock)}function pc(t){function n(t,n,r,i,a,o){if(a&&(1!==o||La(t.valueDeclaration.name))){var u;if(137===t.valueDeclaration.name.kind||t.parent===r.symbol)u=t.valueDeclaration;else if(i)u=i;else if(2048&r.flags){var c=e.forEach(At(r),function(e){return un(e,t.name)&&vn(e,o)});u=c?void 0:r.symbol.declarations[0]}if(u&&!ei(n,a)){s(u,0===o?e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_string_index_type_2:e.Diagnostics.Property_0_of_type_1_is_not_assignable_to_numeric_index_type_2,we(t),xe(n),xe(a))}}}var r=Pn(t.symbol,1),i=Pn(t.symbol,0),a=vn(t,0),o=vn(t,1);if((a||o)&&(e.forEach(sn(t),function(e){var s=ct(e);n(e,s,t,i,a,0),n(e,s,t,r,o,1)}),1024&t.flags&&e.isClassLike(t.symbol.valueDeclaration)))for(var u=t.symbol.valueDeclaration,c=0,l=u.members;c<l.length;c++){var p=l[c];if(!(64&p.flags)&&e.hasDynamicName(p)){var f=ct(p.symbol);n(p.symbol,f,t,i,a,0),n(p.symbol,f,t,r,o,1)}}var d;if(a&&o&&!(d=r||i)&&2048&t.flags){d=e.forEach(At(t),function(e){return vn(e,0)&&vn(e,1)})?void 0:t.symbol.declarations[0]}d&&!ei(o,a)&&s(d,e.Diagnostics.Numeric_index_type_0_is_not_assignable_to_string_index_type_1,xe(o),xe(a))}function fc(e,t){switch(e.text){case\"any\":case\"number\":case\"boolean\":case\"string\":case\"symbol\":case\"void\":s(e,t,e.text)}}function dc(t){if(t)for(var n=0,r=t.length;n<r;n++){var a=t[n];if(Bs(a),i)for(var o=0;o<n;o++)t[o].symbol===a.symbol&&s(a.name,e.Diagnostics.Duplicate_identifier_0,e.declarationNameToString(a.name))}}function mc(e){return _c(e),zc(e),ct(ie(e))}function hc(t){e.forEach(t.members,qc)}function yc(t){t.name||512&t.flags||Ep(t,e.Diagnostics.A_class_declaration_without_the_default_modifier_must_have_a_name),_c(t),e.forEach(t.members,qc)}function _c(t){ap(t),Eu(t),t.name&&(fc(t.name,e.Diagnostics.Class_name_cannot_be_0),Ru(t,t.name),Mu(t,t.name),Pu(t,t.name)),dc(t.typeParameters),pu(t);var n=ie(t),r=Dt(n),a=jt(r),o=ct(n),u=e.getClassExtendsHeritageClauseElement(t);if(u){var c=At(r);if(c.length&&i){var l=c[0],p=St(r);if(qc(u.expression),u.typeArguments){e.forEach(u.typeArguments,qc);for(var f=0,d=vt(p,u.typeArguments);f<d.length;f++){var m=d[f];if(!eu(m.typeParameters,u.typeArguments))break}}if(ni(a,jt(l,r.thisType),t.name||t,e.Diagnostics.Class_0_incorrectly_extends_base_class_1),ni(o,Gr(p),t.name||t,e.Diagnostics.Class_static_side_0_incorrectly_extends_base_class_static_side_1),!(p.symbol&&32&p.symbol.flags)){var h=bt(p,u.typeArguments);e.forEach(h,function(e){return kn(e)!==l})&&s(u.expression,e.Diagnostics.Base_constructors_must_all_have_the_same_return_type)}bc(r,l)}}var y=e.getClassImplementsHeritageClauseElements(t);if(y)for(var _=0,g=y;_<g.length;_++){var v=g[_];if(e.isSupportedExpressionWithTypeArguments(v)||s(v.expression,e.Diagnostics.A_class_can_only_implement_an_identifier_Slashqualified_name_with_optional_type_arguments),tu(v),i){var b=Rr(v);if(b!==cf){var S=4096&b.flags?b.target:b;3072&S.flags?ni(a,jt(b,r.thisType),t.name||t,e.Diagnostics.Class_0_incorrectly_implements_interface_1):s(v,e.Diagnostics.A_class_may_only_implement_another_class_or_interface)}}}i&&(pc(r),Ys(t))}function gc(e){return 16777216&e.flags?_(e).target:e}function vc(t){return e.forEach(t.declarations,function(t){return e.isClassLike(t)?t:void 0})}function bc(t,n){for(var r=sn(n),i=0,a=r;i<a.length;i++){var o=a[i],u=gc(o);if(!(134217728&u.flags)){var c=gc(un(t,u.name)),l=ao(u);if(e.Debug.assert(!!c,\"derived should point to something, even if it is the base class' declaration.\"),c)if(c===u){var p=vc(t.symbol);!(128&l)||p&&128&p.flags||(189===p.kind?s(p,e.Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,we(o),xe(n)):s(p,e.Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,xe(t),we(o),xe(n)))}else{var f=ao(c);if(16&l||16&f)continue;if((64&l)!=(64&f))continue;if(u.flags&c.flags&8192||98308&u.flags&&98308&c.flags)continue;var d=void 0;8192&u.flags?98304&c.flags?d=e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_accessor:(e.Debug.assert(0!=(4&c.flags)),d=e.Diagnostics.Class_0_defines_instance_member_function_1_but_extended_class_2_defines_it_as_instance_member_property):4&u.flags?(e.Debug.assert(0!=(8192&c.flags)),d=e.Diagnostics.Class_0_defines_instance_member_property_1_but_extended_class_2_defines_it_as_instance_member_function):(e.Debug.assert(0!=(98304&u.flags)),e.Debug.assert(0!=(8192&c.flags)),d=e.Diagnostics.Class_0_defines_instance_member_accessor_1_but_extended_class_2_defines_it_as_instance_member_function),s(c.valueDeclaration.name,d,xe(n),we(u),xe(t))}}}}function Sc(e){return 146===e||147===e}function Ac(e,t){if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++){var i=e[n],a=t[n];if(i.name.text!==a.name.text)return!1;if(i.constraint||a.constraint){if(!i.constraint||!a.constraint)return!1;if(!Xr(Rr(i.constraint),Rr(a.constraint)))return!1}}return!0}function Tc(t,n){var r=At(t);if(r.length<2)return!0;var i={};e.forEach(Vt(t).declaredProperties,function(e){i[e.name]={prop:e,containingType:t}});for(var a=!0,o=0,s=r;o<s.length;o++)for(var u=s[o],c=sn(jt(u,t.thisType)),l=0,p=c;l<p.length;l++){var f=p[l];if(e.hasProperty(i,f.name)){var d=i[f.name],m=d.containingType!==t;if(m&&!fi(d.prop,f)){a=!1;var h=xe(d.containingType),y=xe(u),_=e.chainDiagnosticMessages(void 0,e.Diagnostics.Named_property_0_of_types_1_and_2_are_not_identical,we(f),h,y);_=e.chainDiagnosticMessages(_,e.Diagnostics.Interface_0_cannot_simultaneously_extend_types_1_and_2,xe(t),h,y),sd.add(e.createDiagnosticForNodeFromMessageChain(n,_))}}else i[f.name]={prop:f,containingType:u}}return a}function Ec(t){if(Wl(t)||ql(t)||op(t),dc(t.typeParameters),i){fc(t.name,e.Diagnostics.Interface_name_cannot_be_0),pu(t);var n=ie(t),r=e.getDeclarationOfKind(n,218);if(n.declarations.length>1&&(t===r||Ac(r.typeParameters,t.typeParameters)||s(t.name,e.Diagnostics.All_declarations_of_an_interface_must_have_identical_type_parameters)),t===r){var a=Dt(n),o=jt(a);if(Tc(a,t.name)){for(var u=0,c=At(a);u<c.length;u++){ni(o,jt(c[u],a.thisType),t.name,e.Diagnostics.Interface_0_incorrectly_extends_interface_1)}pc(a)}}}e.forEach(e.getInterfaceBaseTypeNodes(t),function(t){e.isSupportedExpressionWithTypeArguments(t)||s(t.expression,e.Diagnostics.An_interface_can_only_extend_an_identifier_Slashqualified_name_with_optional_type_arguments),tu(t)}),e.forEach(t.members,qc),i&&Ys(t)}function Cc(t){Wl(t)||ql(t),fc(t.name,e.Diagnostics.Type_alias_name_cannot_be_0),qc(t.type)}function Nc(t){var n=g(t);if(!(16384&n.flags)){for(var r=ie(t),i=Dt(r),a=0,o=e.isInAmbientContext(t),u=e.isConst(t),c=0,l=t.members;c<l.length;c++){var p=l[c];if(He(p.name))s(p.name,e.Diagnostics.Computed_property_names_are_not_allowed_in_enums);else{Fa(ze(p.name))&&s(p.name,e.Diagnostics.An_enum_member_cannot_have_a_numeric_name)}var f=void 0===a,d=p.initializer;d?a=function(t,n,r,i){function a(n){switch(n.kind){case 182:var r=a(n.operand);if(void 0===r)return;switch(n.operator){case 35:return r;case 36:return-r;case 50:return~r}return;case 184:var i=a(n.left);if(void 0===i)return;var u=a(n.right);if(void 0===u)return;switch(n.operatorToken.kind){case 47:return i|u;case 46:return i&u;case 44:return i>>u;case 45:return i>>>u;case 43:return i<<u;case 48:return i^u;case 37:return i*u;case 39:return i/u;case 35:return i+u;case 36:return i-u;case 40:return i%u}return;case 8:return+n.text;case 175:return a(n.expression);case 69:case 170:case 169:var c,l=t.parent,p=ct(ie(l.parent)),f=void 0;if(69===n.kind)c=p,f=n.text;else{var d=void 0;if(170===n.kind){if(void 0===n.argumentExpression||9!==n.argumentExpression.kind)return;d=n.expression,f=n.argumentExpression.text}else d=n.expression,f=n.name.text;for(var m=d;m&&69!==m.kind;){if(169!==m.kind)return;m=m.expression}if(c=Os(d),!(c.symbol&&384&c.symbol.flags))return}if(void 0===f)return;var h=un(c,f);if(!(h&&8&h.flags))return;var y=h.valueDeclaration;if(l===y)return;return A(y,l)?g(y).enumMemberValue:(o=!1,void s(n,e.Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums))}}var o=!0,u=a(t);return o&&(void 0===u?r?s(t,e.Diagnostics.In_const_enum_declarations_member_initializer_must_be_constant_expression):i?s(t,e.Diagnostics.In_ambient_enum_declarations_member_initializer_must_be_constant_expression):ni(Os(t),n,t,void 0):r&&(isNaN(u)?s(t,e.Diagnostics.const_enum_member_initializer_was_evaluated_to_disallowed_value_NaN):isFinite(u)||s(t,e.Diagnostics.const_enum_member_initializer_was_evaluated_to_a_non_finite_value))),u}(d,i,u,o):o&&!u?a=void 0:f&&s(p.name,e.Diagnostics.Enum_member_must_have_initializer),void 0!==a&&(g(p).enumMemberValue=a,a++)}n.flags|=16384}}function wc(t){if(i){Wl(t)||ql(t),fc(t.name,e.Diagnostics.Enum_name_cannot_be_0),Ru(t,t.name),Mu(t,t.name),Pu(t,t.name),pu(t),Nc(t);var n=e.isConst(t);qp.isolatedModules&&n&&e.isInAmbientContext(t)&&s(t.name,e.Diagnostics.Ambient_const_enums_are_not_allowed_when_the_isolatedModules_flag_is_provided);var r=ie(t);if(t===e.getDeclarationOfKind(r,t.kind)){r.declarations.length>1&&e.forEach(r.declarations,function(t){e.isConstEnumDeclaration(t)!==n&&s(t.name,e.Diagnostics.Enum_declarations_must_all_be_const_or_non_const)});var a=!1;e.forEach(r.declarations,function(t){if(220!==t.kind)return!1;var n=t;if(!n.members.length)return!1;var r=n.members[0];r.initializer||(a?s(r.name,e.Diagnostics.In_an_enum_with_multiple_declarations_only_one_declaration_can_omit_an_initializer_for_its_first_enum_element):a=!0)})}}}function kc(t){for(var n=t.declarations,r=0,i=n;r<i.length;r++){var a=i[r];if((217===a.kind||216===a.kind&&e.nodeIsPresent(a.body))&&!e.isInAmbientContext(a))return a}}function xc(t,n){var r=e.getEnclosingBlockScopeContainer(t),i=e.getEnclosingBlockScopeContainer(n);return v(r)?v(i):!v(i)&&r===i}function Rc(t){if(i){var n=e.isGlobalScopeAugmentation(t),r=e.isInAmbientContext(t);n&&!r&&s(t.name,e.Diagnostics.Augmentations_for_the_global_scope_should_have_declare_modifier_unless_they_appear_in_already_ambient_context);var a=e.isAmbientModule(t);if(Bc(t,a?e.Diagnostics.An_ambient_module_declaration_is_only_allowed_at_the_top_level_in_a_file:e.Diagnostics.A_namespace_declaration_is_only_allowed_in_a_namespace_or_module))return;Wl(t)||ql(t)||r||9!==t.name.kind||Np(t.name,e.Diagnostics.Only_ambient_modules_can_use_quoted_names),Ru(t,t.name),Mu(t,t.name),Pu(t,t.name),pu(t);var o=ie(t);if(512&o.flags&&o.declarations.length>1&&!r&&e.isInstantiatedModule(t,qp.preserveConstEnums||qp.isolatedModules)){var u=kc(o);u&&(e.getSourceFileOfNode(t)!==e.getSourceFileOfNode(u)?s(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_in_a_different_file_from_a_class_or_function_with_which_it_is_merged):t.pos<u.pos&&s(t.name,e.Diagnostics.A_namespace_declaration_cannot_be_located_prior_to_a_class_or_function_with_which_it_is_merged));var c=e.getDeclarationOfKind(o,217);c&&xc(t,c)&&(g(t).flags|=32768)}if(a)if(e.isExternalModuleAugmentation(t)){var l=n||33554432&ie(t).flags;if(l)for(var p=0,f=t.body.statements;p<f.length;p++){var d=f[p];Ic(d,n)}}else v(t.parent)?n?s(t.name,e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):e.isExternalModuleNameRelative(t.name.text)&&s(t.name,e.Diagnostics.Ambient_module_declaration_cannot_specify_relative_module_name):n?s(t.name,e.Diagnostics.Augmentations_for_the_global_scope_can_only_be_directly_nested_in_external_modules_or_ambient_module_declarations):s(t.name,e.Diagnostics.Ambient_modules_cannot_be_nested_in_other_modules_or_namespaces)}qc(t.body)}function Ic(t,n){switch(t.kind){case 196:for(var r=0,i=t.declarationList.declarations;r<i.length;r++){Ic(i[r],n)}break;case 230:case 231:Ep(t,e.Diagnostics.Exports_and_export_assignments_are_not_permitted_in_module_augmentations);break;case 224:if(9!==t.moduleReference.kind){s(t.name,e.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope);break}case 225:Ep(t,e.Diagnostics.Imports_are_not_permitted_in_module_augmentations_Consider_moving_them_to_the_enclosing_external_module);break;case 166:case 214:var a=t.name;if(e.isBindingPattern(a)){for(var o=0,u=a.elements;o<u.length;o++){Ic(u[o],n)}break}case 217:case 220:case 216:case 218:case 221:case 219:var c=ie(t);if(c){var l=!(33554432&c.flags);l||(l=n?void 0!==c.parent:e.isExternalModuleAugmentation(c.parent.valueDeclaration)),l&&s(t,e.Diagnostics.Module_augmentation_cannot_introduce_new_names_in_the_top_level_scope)}}}function Dc(t){for(;;)if(136===t.kind)t=t.left;else{if(169!==t.kind)break;t=t.expression}return e.Debug.assert(69===t.kind),t}function Mc(t){var n=e.getExternalModuleName(t);if(!e.nodeIsMissing(n)&&9!==n.kind)return s(n,e.Diagnostics.String_literal_expected),!1;var r=222===t.parent.kind&&e.isAmbientModule(t.parent.parent);return 251===t.parent.kind||r?!(r&&e.isExternalModuleNameRelative(n.text)&&!De(t))||(s(t,e.Diagnostics.Import_or_export_declaration_in_an_ambient_module_declaration_cannot_reference_module_through_relative_module_name),!1):(s(n,231===t.kind?e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace:e.Diagnostics.Import_declarations_in_a_namespace_cannot_reference_a_module),!1)}function Pc(t){var n=ie(t),r=V(n);if(r!==Qp){var i=(107455&n.flags?107455:0)|(793056&n.flags?793056:0)|(1536&n.flags?1536:0);if(r.flags&i){s(t,233===t.kind?e.Diagnostics.Export_declaration_conflicts_with_exported_declaration_of_0:e.Diagnostics.Import_declaration_conflicts_with_local_declaration_of_0,we(n))}}}function Lc(e){Ru(e,e.name),Mu(e,e.name),Pu(e,e.name),Pc(e)}function Oc(t){if(!Bc(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(!Wl(t)&&!ql(t)&&1022&t.flags&&Ep(t,e.Diagnostics.An_import_declaration_cannot_have_modifiers),Mc(t))){var n=t.importClause;n&&(n.name&&Lc(n),n.namedBindings&&(227===n.namedBindings.kind?Lc(n.namedBindings):e.forEach(n.namedBindings.elements,Lc)))}}function Uc(t){if(!Bc(t,e.Diagnostics.An_import_declaration_can_only_be_used_in_a_namespace_or_module)&&(Wl(t)||ql(t),e.isInternalModuleImportEqualsDeclaration(t)||Mc(t)))if(Lc(t),2&t.flags&&j(t),e.isInternalModuleImportEqualsDeclaration(t)){var n=V(ie(t));if(n!==Qp){if(107455&n.flags){var r=Dc(t.moduleReference);1536&H(r,108479).flags||s(r,e.Diagnostics.Module_0_is_hidden_by_a_local_declaration_with_the_same_name,e.declarationNameToString(r))}793056&n.flags&&fc(t.name,e.Diagnostics.Import_name_cannot_be_0)}}else 5!==Hp||e.isInAmbientContext(t)||Np(t,e.Diagnostics.Import_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_import_Asterisk_as_ns_from_mod_import_a_from_mod_import_d_from_mod_or_another_module_format_instead)}function Fc(t){if(!Bc(t,e.Diagnostics.An_export_declaration_can_only_be_used_in_a_module)&&(!Wl(t)&&!ql(t)&&1022&t.flags&&Ep(t,e.Diagnostics.An_export_declaration_cannot_have_modifiers),!t.moduleSpecifier||Mc(t)))if(t.exportClause){e.forEach(t.exportClause.elements,Kc);var n=222===t.parent.kind&&e.isAmbientModule(t.parent.parent);251===t.parent.kind||n||s(t,e.Diagnostics.Export_declarations_are_not_permitted_in_a_namespace)}else{var r=Y(t,t.moduleSpecifier);r&&$(r)&&s(t.moduleSpecifier,e.Diagnostics.Module_0_uses_export_and_cannot_be_used_with_export_Asterisk,we(r))}}function Bc(e,t){if(251!==e.parent.kind&&222!==e.parent.kind&&221!==e.parent.kind)return Ep(e,t)}function Kc(t){if(Pc(t),!t.parent.parent.moduleSpecifier){var n=t.propertyName||t.name,r=T(n,n.text,9289727,void 0,void 0);r&&(r===Gp||v(Ke(r.declarations[0])))?s(n,e.Diagnostics.Cannot_re_export_name_that_is_not_defined_in_the_module):j(t)}}function Vc(t){if(!Bc(t,e.Diagnostics.An_export_assignment_can_only_be_used_in_a_module)){var n=251===t.parent.kind?t.parent:t.parent.parent;if(221===n.kind&&!e.isAmbientModule(n))return void s(t,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_namespace);!Wl(t)&&!ql(t)&&1022&t.flags&&Ep(t,e.Diagnostics.An_export_assignment_cannot_have_modifiers),69===t.expression.kind?j(t):Ds(t.expression),Wc(n),t.isExportEquals&&!e.isInAmbientContext(t)&&(5===Hp?Np(t,e.Diagnostics.Export_assignment_cannot_be_used_when_targeting_ECMAScript_6_modules_Consider_using_export_default_or_another_module_format_instead):4===Hp&&Np(t,e.Diagnostics.Export_assignment_is_not_supported_when_module_flag_is_system))}}function jc(e){for(var t in e.exports)if(\"export=\"!==t)return!0;return!1}function Wc(t){function n(e){return 216!==e.kind||!!e.body}var r=ie(t),i=_(r);if(!i.exportsChecked){var a=r.exports[\"export=\"];if(a&&jc(r)){var o=k(a)||a.valueDeclaration;De(o)||s(o,e.Diagnostics.An_export_assignment_cannot_be_used_in_a_module_with_other_exported_elements)}var u=ee(r);for(var c in u)if(\"__export\"!==c){var l=u[c],p=l.declarations,f=l.flags;if(!(1984&f)&&(524288&f?p.length-1:p.length)>1){var d=e.filter(p,n);if(d.length>1)for(var m=0,h=d;m<h.length;m++){var o=h[m];sd.add(e.createDiagnosticForNode(o,e.Diagnostics.Cannot_redeclare_exported_variable_0,c))}}}i.exportsChecked=!0}}function qc(e){if(e){var t=e.kind;if(Op)switch(t){case 221:case 217:case 218:case 216:Op.throwIfCancellationRequested()}switch(t){case 138:return Bs(e);case 139:return Ks(e);case 142:case 141:return Js(e);case 153:case 154:case 148:case 149:return Hs(e);case 150:return Hs(e);case 144:case 143:return Gs(e);case 145:return Xs(e);case 146:case 147:return $s(e);case 152:return tu(e);case 151:return Ws(e);case 155:return nu(e);case 156:return ru(e);case 157:return iu(e);case 158:return au(e);case 159:case 160:return ou(e);case 161:return qc(e.type);case 216:return Cu(e);case 195:case 222:return wu(e);case 196:return Ku(e);case 198:return ju(e);case 199:return Wu(e);case 200:return qu(e);case 201:return zu(e);case 202:return Hu(e);case 203:return Ju(e);case 204:return Yu(e);case 205:case 206:return rc(e);case 207:return ac(e);case 208:return oc(e);case 209:return sc(e);case 210:return uc(e);case 211:return cc(e);case 212:return lc(e);case 214:return Fu(e);case 166:return Bu(e);case 217:return yc(e);case 218:return Ec(e);case 219:return Cc(e);case 220:return wc(e);case 221:return Rc(e);case 225:return Oc(e);case 224:return Uc(e);case 231:return Fc(e);case 230:return Vc(e);case 197:return void Mp(e);case 213:return void Mp(e);case 234:return Zs(e)}}}function zc(e){Vf&&Vf.push(e)}function Hc(){for(var e=0,t=Vf;e<t.length;e++){var n=t[e];switch(n.kind){case 176:case 177:case 144:case 143:as(n);break;case 146:case 147:Qs(n);break;case 189:hc(n)}}}function Yc(t){var n=(new Date).getTime();Jc(t),e.checkTime+=(new Date).getTime()-n}function Jc(t){var n=g(t);if(!(1&n.flags)){if(qp.skipDefaultLibCheck&&t.hasNoDefaultLib)return;Dp(t),ad.length=0,Vf=[],e.forEach(t.statements,qc),Hc(),Vf=void 0,e.isExternalOrCommonJsModule(t)&&Wc(t),ad.length&&(e.forEach(ad,Iu),ad.length=0),n.flags|=1}}function Gc(e,t){try{return Op=t,Xc(e)}finally{Op=void 0}}function Xc(t){return Qc(),t?(Yc(t),sd.getDiagnostics(t.fileName)):(e.forEach(r.getSourceFiles(),Yc),sd.getDiagnostics())}function $c(){return Qc(),sd.getGlobalDiagnostics()}function Qc(){if(!i)throw new Error(\"Trying to get diagnostics from a type checker that does not produce them.\")}function Zc(e){if(e)for(;e.parent;){if(208===e.parent.kind&&e.parent.statement===e)return!0;e=e.parent}return!1}function el(t,n){function r(t,n){if(t.flags&n){var r=t.name;e.hasProperty(a,r)||(a[r]=t)}}function i(e,t){if(t)for(var n in e){var i=e[n];r(i,t)}}var a={},o=0;return Zc(t)?[]:(function(){for(;t;){switch(t.locals&&!v(t)&&i(t.locals,n),t.kind){case 251:if(!e.isExternalOrCommonJsModule(t))break;case 221:i(ie(t).exports,8914931&n);break;case 220:i(ie(t).exports,8&n);break;case 189:t.name&&r(t.symbol,n);case 217:case 218:64&o||i(ie(t).members,793056&n);break;case 176:t.name&&r(t.symbol,n)}e.introducesArgumentsExoticObject(t)&&r(Xp,n),o=t.flags,t=t.parent}i(Jf,n)}(),An(a))}function tl(e){return 69===e.kind&&nl(e.parent)&&e.parent.name===e}function nl(e){switch(e.kind){case 138:case 217:case 218:case 219:case 220:return!0}}function rl(e){for(var t=e;t.parent&&136===t.parent.kind;)t=t.parent;return t.parent&&152===t.parent.kind}function il(e){for(var t=e;t.parent&&169===t.parent.kind;)t=t.parent;return t.parent&&191===t.parent.kind}function al(e){for(;136===e.parent.kind;)e=e.parent;return 224===e.parent.kind?e.parent.moduleReference===e&&e.parent:230===e.parent.kind?e.parent.expression===e&&e.parent:void 0}function ol(e){return void 0!==al(e)}function sl(t){if(e.isDeclarationName(t))return ie(t.parent);if(e.isInJavaScriptFile(t)&&169===t.parent.kind){switch(e.getSpecialPropertyAssignmentKind(t.parent.parent)){case 1:case 3:return ie(t.parent);case 4:case 2:return ie(t.parent.parent)}}if(230===t.parent.kind)return H(t,9289727);if(169!==t.kind&&ol(t))return q(t);if(e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),il(t)){var n=0;return 191===t.parent.kind?(n=793056,e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)&&(n|=107455)):n=1536,n|=8388608,H(t,n)}if(238===t.parent.kind||237===t.parent.kind||240===t.parent.kind)return Ja(t.parent);if(e.isExpression(t)){if(e.nodeIsMissing(t))return;if(69===t.kind){var n=8496063;return H(t,n)}if(169===t.kind){var r=g(t).resolvedSymbol;return r||so(t),g(t).resolvedSymbol}if(136===t.kind){var r=g(t).resolvedSymbol;return r||uo(t),g(t).resolvedSymbol}}else{if(rl(t)){var n=152===t.parent.kind?793056:1536;return n|=8388608,H(t,n)}if(241===t.parent.kind)return Qa(t.parent)}return 151===t.parent.kind?H(t,1):void 0}function ul(t){if(!Zc(t)){if(e.isDeclarationName(t))return ie(t.parent);if(69===t.kind){if(ol(t))return 230===t.parent.kind?sl(t):q(t);if(166===t.parent.kind&&164===t.parent.parent.kind&&t===t.parent.propertyName){var n=pl(t.parent.parent),r=n&&hn(n,t.text);if(r)return r}}switch(t.kind){case 69:case 169:case 136:return sl(t);case 97:case 95:return(e.isExpression(t)?Os(t):Rr(t)).symbol;case 162:return Rr(t).symbol;case 121:var i=t.parent;if(i&&145===i.kind)return i.parent.symbol;return;case 9:if(e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t||(225===t.parent.kind||231===t.parent.kind)&&t.parent.moduleSpecifier===t)return Y(t,t);case 8:if(170===t.parent.kind&&t.parent.argumentExpression===t){var a=Os(t.parent.expression);if(a===cf)return;var o=fn(a);if(o===cf)return;return hn(o,t.text)}}}}function cl(e){if(e&&249===e.kind)return H(e.name,8496063)}function ll(e){return e.parent.parent.moduleSpecifier?L(e.parent.parent,e):H(e.propertyName||e.name,9289727)}function pl(t){if(Zc(t))return cf;if(e.isTypeNode(t))return Rr(t);if(e.isExpression(t))return fl(t);if(e.isExpressionWithTypeArgumentsInClassExtendsClause(t))return At(Dt(ie(t.parent.parent)))[0];if(nl(t)){var n=ie(t);return Dt(n)}if(tl(t)){var n=ul(t);return n&&Dt(n)}if(e.isDeclaration(t)){var n=ie(t);return ct(n)}if(e.isDeclarationName(t)){var n=ul(t);return n&&ct(n)}if(e.isBindingPattern(t))return Xe(t.parent);if(ol(t)){var n=ul(t),r=n&&Dt(n);return r!==cf?r:ct(n)}return cf}function fl(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),Os(t)}function dl(e){var t=ie(e.parent);return 64&e.flags?ct(t):Dt(t)}function ml(t){t=fn(t);var n=Ft(ln(t));return(_n(t,0).length||_n(t,1).length)&&e.forEach(ln(_f),function(t){e.hasProperty(n,t.name)||(n[t.name]=t)}),de(n)}function hl(t){if(268435456&t.flags){var n=[],r=t.name;return e.forEach(_(t).containingType.types,function(e){var t=hn(e,r);t&&n.push(t)}),n}if(67108864&t.flags){var i=_(t).target;if(i)return[i]}return[t]}function yl(e){return Fl(e)===Xp}function _l(t){function n(e){return(e=K(e))&&!!(107455&e.flags)}var r=Y(t.parent,t);if(!r)return!0;var i=$(r);r=G(r);var a=_(r);return void 0===a.exportsSomeValue&&(a.exportsSomeValue=i?!!(107455&r.flags):e.forEachValue(ee(r),n)),a.exportsSomeValue}function gl(e){var t=Fl(e);if(t){if(1048576&t.flags){var n=re(t.exportSymbol);if(944&n.flags)return;t=n}var r=ae(t);if(r){if(512&r.flags&&251===r.valueDeclaration.kind)return r.valueDeclaration;for(var i=e.parent;i;i=i.parent)if((221===i.kind||220===i.kind)&&ie(i)===r)return i}}}function vl(e){var t=Fl(e);return t&&8388608&t.flags?k(t):void 0}function bl(t){if(418&t.flags){var n=_(t);if(void 0===n.isDeclaratonWithCollidingName){var r=e.getEnclosingBlockScopeContainer(t.valueDeclaration);if(e.isStatementWithLocals(r)){var i=g(t.valueDeclaration);if(T(r.parent,t.name,107455,void 0,void 0))n.isDeclaratonWithCollidingName=!0;else if(131072&i.flags){var a=262144&i.flags,o=e.isIterationStatement(r,!1),s=195===r.kind&&e.isIterationStatement(r.parent,!1);n.isDeclaratonWithCollidingName=!(e.isBlockScopedContainerTopLevel(r)||a&&(o||s))}else n.isDeclaratonWithCollidingName=!1}}return n.isDeclaratonWithCollidingName}return!1}function Sl(e){var t=Fl(e);return t&&bl(t)?t.valueDeclaration:void 0}function Al(e){return bl(ie(e))}function Tl(t){switch(t.kind){case 224:case 226:case 227:case 229:case 233:return Cl(ie(t));case 231:var n=t.exportClause;return n&&e.forEach(n.elements,Tl);case 230:return!t.expression||69!==t.expression.kind||Cl(ie(t))}return!1}function El(t){return!(251!==t.parent.kind||!e.isInternalModuleImportEqualsDeclaration(t))&&(Cl(ie(t))&&t.moduleReference&&!e.nodeIsMissing(t.moduleReference))}function Cl(e){var t=V(e);return!(t!==Qp||!qp.isolatedModules)||t!==Qp&&t&&107455&t.flags&&(qp.preserveConstEnums||!Nl(t))}function Nl(e){return _s(e)||e.constEnumOnlyModule}function wl(t,n){if(e.isAliasSymbolDeclaration(t)){if(_(ie(t)).referenced)return!0}return!!n&&e.forEachChild(t,function(e){return wl(e,n)})}function kl(t){if(e.nodeIsPresent(t.body)){var n=ie(t),r=Nn(n);return r.length>1||1===r.length&&r[0].declaration!==t}return!1}function xl(e){return g(e).flags}function Rl(e){return Nc(e.parent),g(e).enumMemberValue}function Il(t){if(250===t.kind)return Rl(t);var n=g(t).resolvedSymbol;return n&&8&n.flags&&e.isConstEnumDeclaration(n.valueDeclaration.parent)?Rl(n.valueDeclaration):void 0}function Dl(e){return 80896&e.flags&&_n(e,0).length>0}function Ml(t){var n=H(t,107455,!0),r=n?ct(n):void 0;if(r&&_t(r))return e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue;var i=H(t,793056,!0);if(!i)return e.TypeReferenceSerializationKind.ObjectType;var a=Dt(i);return a===cf?e.TypeReferenceSerializationKind.Unknown:1&a.flags?e.TypeReferenceSerializationKind.ObjectType:hs(a,16)?e.TypeReferenceSerializationKind.VoidType:hs(a,8)?e.TypeReferenceSerializationKind.BooleanType:hs(a,132)?e.TypeReferenceSerializationKind.NumberLikeType:hs(a,258)?e.TypeReferenceSerializationKind.StringLikeType:hs(a,8192)?e.TypeReferenceSerializationKind.ArrayLikeType:hs(a,16777216)?e.TypeReferenceSerializationKind.ESSymbolType:Dl(a)?e.TypeReferenceSerializationKind.TypeWithCallSignature:bi(a)?e.TypeReferenceSerializationKind.ArrayLikeType:e.TypeReferenceSerializationKind.ObjectType}function Pl(e,t,n,r){var i=ie(e),a=!i||133120&i.flags?cf:ct(i);Me().buildTypeDisplay(a,r,t,n)}function Ll(e,t,n,r){var i=Cn(e);Me().buildTypeDisplay(kn(i),r,t,n)}function Ol(e,t,n,r){var i=fl(e);Me().buildTypeDisplay(i,r,t,n)}function Ul(t){return e.hasProperty(Jf,t)}function Fl(e){return g(e).resolvedSymbol||T(e,e.text,9544639,void 0,void 0)}function Bl(t){e.Debug.assert(!e.nodeIsSynthesized(t));var n=Fl(t);return n&&oe(n).valueDeclaration}function Kl(t){var n=e.getExternalModuleName(t),r=J(n,n,void 0);if(r)return e.getDeclarationOfKind(r,251)}function Vl(){var e=Of();return e!==ff?jn(e,[ef]):lf}function jl(){var e=u(67108868,\"then\");_(e).type=_f;var t=pe(65536);return t.properties=[e],t.members=Ft(t.properties),t.callSignatures=[],t.constructSignatures=[],t}function Wl(t){if(!t.decorators)return!1;if(!e.nodeCanBeDecorated(t))return 144!==t.kind||e.nodeIsPresent(t.body)?Ep(t,e.Diagnostics.Decorators_are_not_valid_here):Ep(t,e.Diagnostics.A_decorator_can_only_decorate_a_method_implementation_not_an_overload);if(146===t.kind||147===t.kind){var n=e.getAllAccessorDeclarations(t.parent.members,t);if(n.firstAccessor.decorators&&t===n.secondAccessor)return Ep(t,e.Diagnostics.Decorators_cannot_be_applied_to_multiple_get_Slashset_accessors_of_the_same_name)}return!1}function ql(t){switch(t.kind){case 146:case 147:case 145:case 142:case 141:case 144:case 143:case 150:case 221:case 225:case 224:case 231:case 230:case 139:break;case 216:if(t.modifiers&&(t.modifiers.length>1||118!==t.modifiers[0].kind)&&222!==t.parent.kind&&251!==t.parent.kind)return Ep(t,e.Diagnostics.Modifiers_cannot_appear_here);break;case 217:case 218:case 196:case 219:if(t.modifiers&&222!==t.parent.kind&&251!==t.parent.kind)return Ep(t,e.Diagnostics.Modifiers_cannot_appear_here);break;case 220:if(t.modifiers&&(t.modifiers.length>1||74!==t.modifiers[0].kind)&&222!==t.parent.kind&&251!==t.parent.kind)return Ep(t,e.Diagnostics.Modifiers_cannot_appear_here);break;default:return!1}if(t.modifiers){for(var n,r,i,a,o,s=0,u=0,c=t.modifiers;u<c.length;u++){var l=c[u];switch(l.kind){case 74:if(220!==t.kind&&217===t.parent.kind)return Np(t,e.Diagnostics.A_class_member_cannot_have_the_0_keyword,e.tokenToString(74));break;case 112:case 111:case 110:var p=void 0;if(112===l.kind?p=\"public\":111===l.kind?(p=\"protected\",i=l):(p=\"private\",r=l),56&s)return Np(l,e.Diagnostics.Accessibility_modifier_already_seen);if(64&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,p,\"static\");if(256&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,p,\"async\");if(222===t.parent.kind||251===t.parent.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_element,p);if(128&s)return 110===l.kind?Np(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,p,\"abstract\"):Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,p,\"abstract\");s|=e.modifierToFlag(l.kind);break;case 113:if(64&s)return Np(l,e.Diagnostics._0_modifier_already_seen,\"static\");if(256&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,\"static\",\"async\");if(222===t.parent.kind||251===t.parent.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_module_element,\"static\");if(139===t.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,\"static\");if(128&s)return Np(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,\"static\",\"abstract\");s|=64,n=l;break;case 82:if(2&s)return Np(l,e.Diagnostics._0_modifier_already_seen,\"export\");if(4&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,\"export\",\"declare\");if(128&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,\"export\",\"abstract\");if(256&s)return Np(l,e.Diagnostics._0_modifier_must_precede_1_modifier,\"export\",\"async\");if(217===t.parent.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,\"export\");if(139===t.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,\"export\");s|=2;break;case 122:if(4&s)return Np(l,e.Diagnostics._0_modifier_already_seen,\"declare\");if(256&s)return Np(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,\"async\");if(217===t.parent.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_class_element,\"declare\");if(139===t.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,\"declare\");if(e.isInAmbientContext(t.parent)&&222===t.parent.kind)return Np(l,e.Diagnostics.A_declare_modifier_cannot_be_used_in_an_already_ambient_context);s|=4,a=l;break;case 115:if(128&s)return Np(l,e.Diagnostics._0_modifier_already_seen,\"abstract\");if(217!==t.kind){if(144!==t.kind)return Np(l,e.Diagnostics.abstract_modifier_can_only_appear_on_a_class_or_method_declaration);if(!(217===t.parent.kind&&128&t.parent.flags))return Np(l,e.Diagnostics.Abstract_methods_can_only_appear_within_an_abstract_class);if(64&s)return Np(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,\"static\",\"abstract\");if(16&s)return Np(l,e.Diagnostics._0_modifier_cannot_be_used_with_1_modifier,\"private\",\"abstract\")}s|=128;break;case 118:if(256&s)return Np(l,e.Diagnostics._0_modifier_already_seen,\"async\");if(4&s||e.isInAmbientContext(t.parent))return Np(l,e.Diagnostics._0_modifier_cannot_be_used_in_an_ambient_context,\"async\");if(139===t.kind)return Np(l,e.Diagnostics._0_modifier_cannot_appear_on_a_parameter,\"async\");s|=256,o=l}}if(145!==t.kind)return(225===t.kind||224===t.kind)&&4&s?Np(a,e.Diagnostics.A_0_modifier_cannot_be_used_with_an_import_declaration,\"declare\"):139===t.kind&&56&s&&e.isBindingPattern(t.name)?Np(t,e.Diagnostics.A_parameter_property_may_not_be_a_binding_pattern):256&s?zl(t,o):void 0;if(64&s)return Np(n,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,\"static\");if(128&s)return Np(n,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,\"abstract\");if(32&s)return Np(i,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,\"protected\");if(16&s)return Np(r,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,\"private\");if(256&s)return Np(o,e.Diagnostics._0_modifier_cannot_appear_on_a_constructor_declaration,\"async\")}}function zl(t,n){if(zp<2)return Np(n,e.Diagnostics.Async_functions_are_only_available_when_targeting_ECMAScript_6_and_higher);switch(t.kind){case 144:case 216:case 176:case 177:if(!t.asteriskToken)return!1}return Np(n,e.Diagnostics._0_modifier_cannot_be_used_here,\"async\")}function Hl(t){if(t&&t.hasTrailingComma){var n=t.end-\",\".length,r=t.end;return Cp(e.getSourceFileOfNode(t[0]),n,r-n,e.Diagnostics.Trailing_comma_not_allowed)}}function Yl(t,n,r){if(Hl(n))return!0;if(n&&0===n.length){var i=n.pos-\"<\".length;return Cp(r,i,e.skipTrivia(r.text,n.end)+\">\".length-i,e.Diagnostics.Type_parameter_list_cannot_be_empty)}}function Jl(t){if(Hl(t))return!0;for(var n=!1,r=t.length,i=0;i<r;i++){var a=t[i];if(a.dotDotDotToken){if(i!==r-1)return Np(a.dotDotDotToken,e.Diagnostics.A_rest_parameter_must_be_last_in_a_parameter_list);if(e.isBindingPattern(a.name))return Np(a.name,e.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);if(a.questionToken)return Np(a.questionToken,e.Diagnostics.A_rest_parameter_cannot_be_optional);if(a.initializer)return Np(a.name,e.Diagnostics.A_rest_parameter_cannot_have_an_initializer)}else if(a.questionToken){if(n=!0,a.initializer)return Np(a.name,e.Diagnostics.Parameter_cannot_have_question_mark_and_initializer)}else if(n&&!a.initializer)return Np(a.name,e.Diagnostics.A_required_parameter_cannot_follow_an_optional_parameter)}}function Gl(t){var n=e.getSourceFileOfNode(t);return Wl(t)||ql(t)||Yl(t,t.typeParameters,n)||Jl(t.parameters)||Xl(t,n)}function Xl(t,n){if(177===t.kind){var r=t;if(e.getLineAndCharacterOfPosition(n,r.equalsGreaterThanToken.pos).line!==e.getLineAndCharacterOfPosition(n,r.equalsGreaterThanToken.end).line)return Np(r.equalsGreaterThanToken,e.Diagnostics.Line_terminator_not_permitted_before_arrow)}return!1}function $l(t){var n=t.parameters[0];return 1!==t.parameters.length?n?Np(n.name,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter):Np(t,e.Diagnostics.An_index_signature_must_have_exactly_one_parameter):n.dotDotDotToken?Np(n.dotDotDotToken,e.Diagnostics.An_index_signature_cannot_have_a_rest_parameter):1022&n.flags?Np(n.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_accessibility_modifier):n.questionToken?Np(n.questionToken,e.Diagnostics.An_index_signature_parameter_cannot_have_a_question_mark):n.initializer?Np(n.name,e.Diagnostics.An_index_signature_parameter_cannot_have_an_initializer):n.type?130!==n.type.kind&&128!==n.type.kind?Np(n.name,e.Diagnostics.An_index_signature_parameter_type_must_be_string_or_number):t.type?void 0:Np(t,e.Diagnostics.An_index_signature_must_have_a_type_annotation):Np(n.name,e.Diagnostics.An_index_signature_parameter_must_have_a_type_annotation)}function Ql(t){1022&t.flags&&Ep(t,e.Diagnostics.Modifiers_not_permitted_on_index_signature_members)}function Zl(e){return Wl(e)||ql(e)||$l(e)||Ql(e)}function ep(t,n){if(n&&0===n.length){var r=e.getSourceFileOfNode(t),i=n.pos-\"<\".length;return Cp(r,i,e.skipTrivia(r.text,n.end)+\">\".length-i,e.Diagnostics.Type_argument_list_cannot_be_empty)}}function tp(e,t){return Hl(t)||ep(e,t)}function np(t,n){if(n)for(var r=e.getSourceFileOfNode(t),i=0,a=n;i<a.length;i++){var o=a[i];if(190===o.kind)return Cp(r,o.pos,0,e.Diagnostics.Argument_expression_expected)}}function rp(e,t){return Hl(t)||np(e,t)}function ip(t){var n=t.types;if(Hl(n))return!0;if(n&&0===n.length){var r=e.tokenToString(t.token);return Cp(e.getSourceFileOfNode(t),n.pos,0,e.Diagnostics._0_list_cannot_be_empty,r)}}function ap(t){var n=!1,r=!1;if(!Wl(t)&&!ql(t)&&t.heritageClauses)for(var i=0,a=t.heritageClauses;i<a.length;i++){var o=a[i];if(83===o.token){if(n)return Ep(o,e.Diagnostics.extends_clause_already_seen);if(r)return Ep(o,e.Diagnostics.extends_clause_must_precede_implements_clause);if(o.types.length>1)return Ep(o.types[1],e.Diagnostics.Classes_can_only_extend_a_single_class);n=!0}else{if(e.Debug.assert(106===o.token),r)return Ep(o,e.Diagnostics.implements_clause_already_seen);r=!0}ip(o)}}function op(t){var n=!1;if(t.heritageClauses)for(var r=0,i=t.heritageClauses;r<i.length;r++){var a=i[r];if(83!==a.token)return e.Debug.assert(106===a.token),Ep(a,e.Diagnostics.Interface_declaration_cannot_have_implements_clause);if(n)return Ep(a,e.Diagnostics.extends_clause_already_seen);n=!0,ip(a)}return!1}function sp(t){if(137!==t.kind)return!1;var n=t;return 184===n.expression.kind&&24===n.expression.operatorToken.kind?Np(n.expression,e.Diagnostics.A_comma_expression_is_not_allowed_in_a_computed_property_name):void 0}function up(t){if(t.asteriskToken){if(e.Debug.assert(216===t.kind||176===t.kind||144===t.kind),e.isInAmbientContext(t))return Np(t.asteriskToken,e.Diagnostics.Generators_are_not_allowed_in_an_ambient_context);if(!t.body)return Np(t.asteriskToken,e.Diagnostics.An_overload_signature_cannot_be_declared_as_a_generator);if(zp<2)return Np(t.asteriskToken,e.Diagnostics.Generators_are_only_available_when_targeting_ECMAScript_6_or_higher)}}function cp(e,t,n){if(t)return Np(t,n)}function lp(t,n){for(var r={},i=0,a=t.properties;i<a.length;i++){var o=a[i],s=function(t){var i=t.name;if(190===t.kind||137===i.kind)return sp(i),\"continue\";if(249===t.kind&&!n&&t.objectAssignmentInitializer)return{value:Np(t.equalsToken,e.Diagnostics.can_only_be_used_in_an_object_literal_property_inside_a_destructuring_assignment)};e.forEach(t.modifiers,function(n){118===n.kind&&144===t.kind||Np(n,e.Diagnostics._0_modifier_cannot_be_used_here,e.getTextOfNode(n))});var a=void 0;if(248===t.kind||249===t.kind?(cp(t,t.questionToken,e.Diagnostics.An_object_member_cannot_be_declared_optional),8===i.kind&&Pp(i),a=1):144===t.kind?a=1:146===t.kind?a=2:147===t.kind?a=4:e.Debug.fail(\"Unexpected syntax kind:\"+t.kind),e.hasProperty(r,i.text)){var o=r[i.text];if(1===a&&1===o)return\"continue\";if(!(6&a&&6&o))return{value:Np(i,e.Diagnostics.An_object_literal_cannot_have_property_and_accessor_with_the_same_name)};if(6===o||a===o)return{value:Np(i,e.Diagnostics.An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name)};r[i.text]=a|o}else r[i.text]=a}(o);if(\"object\"==typeof s)return s.value}}function pp(t){for(var n={},r=0,i=t.attributes;r<i.length;r++){var a=i[r];if(242!==a.kind){var o=a,s=o.name;if(e.hasProperty(n,s.text))return Np(s,e.Diagnostics.JSX_elements_cannot_have_multiple_attributes_with_the_same_name);n[s.text]=!0;var u=o.initializer;if(u&&243===u.kind&&!u.expression)return Np(o.initializer,e.Diagnostics.JSX_attributes_must_only_be_assigned_a_non_empty_expression)}}}function fp(t){if(Mp(t))return!0;if(215===t.initializer.kind){var n=t.initializer;if(!bp(n)){var r=n.declarations;if(!r.length)return!1;if(r.length>1){var i=203===t.kind?e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement:e.Diagnostics.Only_a_single_variable_declaration_is_allowed_in_a_for_of_statement;return Ep(n.declarations[1],i)}var a=r[0];if(a.initializer){var i=203===t.kind?e.Diagnostics.The_variable_declaration_of_a_for_in_statement_cannot_have_an_initializer:e.Diagnostics.The_variable_declaration_of_a_for_of_statement_cannot_have_an_initializer;return Np(a.name,i)}if(a.type){var i=203===t.kind?e.Diagnostics.The_left_hand_side_of_a_for_in_statement_cannot_use_a_type_annotation:e.Diagnostics.The_left_hand_side_of_a_for_of_statement_cannot_use_a_type_annotation;return Np(a,i)}}}return!1}function dp(t){var n=t.kind;if(zp<1)return Np(t.name,e.Diagnostics.Accessors_are_only_available_when_targeting_ECMAScript_5_and_higher);if(e.isInAmbientContext(t))return Np(t.name,e.Diagnostics.An_accessor_cannot_be_declared_in_an_ambient_context);if(void 0===t.body)return Cp(e.getSourceFileOfNode(t),t.end-1,\";\".length,e.Diagnostics._0_expected,\"{\");if(t.typeParameters)return Np(t.name,e.Diagnostics.An_accessor_cannot_have_type_parameters);if(146===n&&t.parameters.length)return Np(t.name,e.Diagnostics.A_get_accessor_cannot_have_parameters);if(147===n){if(t.type)return Np(t.name,e.Diagnostics.A_set_accessor_cannot_have_a_return_type_annotation);if(1!==t.parameters.length)return Np(t.name,e.Diagnostics.A_set_accessor_must_have_exactly_one_parameter);var r=t.parameters[0];if(r.dotDotDotToken)return Np(r.dotDotDotToken,e.Diagnostics.A_set_accessor_cannot_have_rest_parameter);if(1022&r.flags)return Np(t.name,e.Diagnostics.A_parameter_property_is_only_allowed_in_a_constructor_implementation);if(r.questionToken)return Np(r.questionToken,e.Diagnostics.A_set_accessor_cannot_have_an_optional_parameter);if(r.initializer)return Np(t.name,e.Diagnostics.A_set_accessor_parameter_cannot_have_an_initializer)}}function mp(t,n){if(e.isDynamicName(t))return Np(t,n)}function hp(t){if(Vu(t)||Gl(t)||up(t))return!0;if(168===t.parent.kind){if(cp(t,t.questionToken,e.Diagnostics.A_class_member_cannot_be_declared_optional))return!0;if(void 0===t.body)return Cp(e.getSourceFileOfNode(t),t.end-1,\";\".length,e.Diagnostics._0_expected,\"{\")}if(e.isClassLike(t.parent)){if(cp(t,t.questionToken,e.Diagnostics.A_class_member_cannot_be_declared_optional))return!0;if(e.isInAmbientContext(t))return mp(t.name,e.Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol);if(!t.body)return mp(t.name,e.Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol)}else{if(218===t.parent.kind)return mp(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);if(156===t.parent.kind)return mp(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)}}function yp(t){for(var n=t;n;){if(e.isFunctionLike(n))return Np(t,e.Diagnostics.Jump_target_cannot_cross_function_boundary);switch(n.kind){case 210:if(t.label&&n.label.text===t.label.text){return!!(205===t.kind&&!e.isIterationStatement(n.statement,!0))&&Np(t,e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement)}break;case 209:if(206===t.kind&&!t.label)return!1;break;default:if(e.isIterationStatement(n,!1)&&!t.label)return!1}n=n.parent}if(t.label){var r=206===t.kind?e.Diagnostics.A_break_statement_can_only_jump_to_a_label_of_an_enclosing_statement:e.Diagnostics.A_continue_statement_can_only_jump_to_a_label_of_an_enclosing_iteration_statement;return Np(t,r)}var r=206===t.kind?e.Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement:e.Diagnostics.A_continue_statement_can_only_be_used_within_an_enclosing_iteration_statement;return Np(t,r)}function _p(t){if(t.dotDotDotToken){var n=t.parent.elements;if(t!==e.lastOrUndefined(n))return Np(t,e.Diagnostics.A_rest_element_must_be_last_in_an_array_destructuring_pattern);if(165===t.name.kind||164===t.name.kind)return Np(t.name,e.Diagnostics.A_rest_element_cannot_contain_a_binding_pattern);if(t.initializer)return Cp(e.getSourceFileOfNode(t),t.initializer.pos-1,1,e.Diagnostics.A_rest_element_cannot_have_an_initializer)}}function gp(t){if(203!==t.parent.parent.kind&&204!==t.parent.parent.kind)if(e.isInAmbientContext(t)){if(t.initializer){var n=\"=\".length;return Cp(e.getSourceFileOfNode(t),t.initializer.pos-n,n,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}}else if(!t.initializer){if(e.isBindingPattern(t.name)&&!e.isBindingPattern(t.parent))return Np(t,e.Diagnostics.A_destructuring_declaration_must_have_an_initializer);if(e.isConst(t))return Np(t,e.Diagnostics.const_declarations_must_be_initialized)}return(e.isLet(t)||e.isConst(t))&&vp(t.name)}function vp(t){if(69===t.kind){if(108===t.originalKeywordKind)return Np(t,e.Diagnostics.let_is_not_allowed_to_be_used_as_a_name_in_let_or_const_declarations)}else for(var n=t.elements,r=0,i=n;r<i.length;r++){var a=i[r];190!==a.kind&&vp(a.name)}}function bp(t){var n=t.declarations;return!!Hl(t.declarations)||(t.declarations.length?void 0:Cp(e.getSourceFileOfNode(t),n.pos,n.end-n.pos,e.Diagnostics.Variable_declaration_list_cannot_be_empty))}function Sp(e){switch(e.kind){case 199:case 200:case 201:case 208:case 202:case 203:case 204:return!1;case 210:return Sp(e.parent)}return!0}function Ap(t){if(!Sp(t.parent)){if(e.isLet(t.declarationList))return Np(t,e.Diagnostics.let_declarations_can_only_be_declared_inside_a_block);if(e.isConst(t.declarationList))return Np(t,e.Diagnostics.const_declarations_can_only_be_declared_inside_a_block)}}function Tp(e){return e.parseDiagnostics.length>0}function Ep(t,n,r,i,a){var o=e.getSourceFileOfNode(t);if(!Tp(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return sd.add(e.createFileDiagnostic(o,s.start,s.length,n,r,i,a)),!0}}function Cp(t,n,r,i,a,o,s){if(!Tp(t))return sd.add(e.createFileDiagnostic(t,n,r,i,a,o,s)),!0}function Np(t,n,r,i,a){if(!Tp(e.getSourceFileOfNode(t)))return sd.add(e.createDiagnosticForNode(t,n,r,i,a)),!0}function wp(t){if(t.typeParameters)return Cp(e.getSourceFileOfNode(t),t.typeParameters.pos,t.typeParameters.end-t.typeParameters.pos,e.Diagnostics.Type_parameters_cannot_appear_on_a_constructor_declaration)}function kp(t){if(t.type)return Np(t.type,e.Diagnostics.Type_annotation_cannot_appear_on_a_constructor_declaration)}function xp(t){if(e.isClassLike(t.parent)){if(cp(t,t.questionToken,e.Diagnostics.A_class_member_cannot_be_declared_optional)||mp(t.name,e.Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol))return!0}else if(218===t.parent.kind){if(mp(t.name,e.Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol))return!0;if(t.initializer)return Np(t.initializer,e.Diagnostics.An_interface_property_cannot_have_an_initializer)}else if(156===t.parent.kind){if(mp(t.name,e.Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol))return!0;if(t.initializer)return Np(t.initializer,e.Diagnostics.A_type_literal_property_cannot_have_an_initializer)}if(e.isInAmbientContext(t)&&t.initializer)return Ep(t.initializer,e.Diagnostics.Initializers_are_not_allowed_in_ambient_contexts)}function Rp(t){return!(218===t.kind||219===t.kind||225===t.kind||224===t.kind||231===t.kind||230===t.kind||4&t.flags||514&t.flags)&&Ep(t,e.Diagnostics.A_declare_modifier_is_required_for_a_top_level_declaration_in_a_d_ts_file)}function Ip(t){for(var n=0,r=t.statements;n<r.length;n++){var i=r[n];if((e.isDeclaration(i)||196===i.kind)&&Rp(i))return!0}}function Dp(t){return e.isInAmbientContext(t)&&Ip(t)}function Mp(t){if(e.isInAmbientContext(t)){if(Sc(t.parent.kind))return g(t).hasReportedStatementInAmbientContext=!0;if(!g(t).hasReportedStatementInAmbientContext&&e.isFunctionLike(t.parent))return g(t).hasReportedStatementInAmbientContext=Ep(t,e.Diagnostics.An_implementation_cannot_be_declared_in_ambient_contexts);if(195===t.parent.kind||222===t.parent.kind||251===t.parent.kind){var n=g(t.parent);if(!n.hasReportedStatementInAmbientContext)return n.hasReportedStatementInAmbientContext=Ep(t,e.Diagnostics.Statements_are_not_allowed_in_ambient_contexts)}}}function Pp(t){if(32768&t.flags&&zp>=1)return Np(t,e.Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher)}function Lp(t,n,r,i,a){var o=e.getSourceFileOfNode(t);if(!Tp(o)){var s=e.getSpanOfTokenAtPosition(o,t.pos);return sd.add(e.createFileDiagnostic(o,e.textSpanEnd(s),0,n,r,i,a)),!0}}var Op,Up=e.objectAllocator.getSymbolConstructor(),Fp=e.objectAllocator.getTypeConstructor(),Bp=e.objectAllocator.getSignatureConstructor(),Kp=0,Vp=0,jp=[],Wp={},qp=r.getCompilerOptions(),zp=qp.target||0,Hp=e.getEmitModuleKind(qp),Yp=void 0!==qp.allowSyntheticDefaultImports?qp.allowSyntheticDefaultImports:4===Hp,Jp=function(){return{getReferencedExportContainer:gl,getReferencedImportDeclaration:vl,getReferencedDeclarationWithCollidingName:Sl,isDeclarationWithCollidingName:Al,isValueAliasDeclaration:Tl,hasGlobalName:Ul,isReferencedAliasDeclaration:wl,getNodeCheckFlags:xl,isTopLevelValueImportEqualsWithEntityName:El,isDeclarationVisible:Pe,isImplementationOfOverload:kl,writeTypeOfDeclaration:Pl,writeReturnTypeOfSignatureDeclaration:Ll,writeTypeOfExpression:Ol,isSymbolAccessible:be,isEntityNameVisible:Te,getConstantValue:Il,collectLinkedAliases:Le,getReferencedValueDeclaration:Bl,getTypeReferenceSerializationKind:Ml,isOptionalParameter:Tn,moduleExportsSomeValue:_l,isArgumentsLocalBinding:yl,getExternalModuleFileFromDeclaration:Kl}}(),Gp=u(67108868,\"undefined\");Gp.declarations=[];var Xp=u(67108868,\"arguments\"),$p={getNodeCount:function(){return e.sum(r.getSourceFiles(),\"nodeCount\")},getIdentifierCount:function(){return e.sum(r.getSourceFiles(),\"identifierCount\")},getSymbolCount:function(){return e.sum(r.getSourceFiles(),\"symbolCount\")+Vp},getTypeCount:function(){return Kp},isUndefinedSymbol:function(e){return e===Gp},isArgumentsSymbol:function(e){return e===Xp},isUnknownSymbol:function(e){return e===Qp},getDiagnostics:Gc,getGlobalDiagnostics:$c,getTypeOfSymbolAtLocation:qi,getSymbolsOfParameterPropertyDeclaration:S,getDeclaredTypeOfSymbol:Dt,getPropertiesOfType:ln,getPropertyOfType:hn,getSignaturesOfType:_n,getIndexTypeOfType:vn,getBaseTypes:At,getReturnTypeOfSignature:kn,getSymbolsInScope:el,getSymbolAtLocation:ul,getShorthandAssignmentValueSymbol:cl,getExportSpecifierLocalTargetSymbol:ll,getTypeAtLocation:pl,typeToString:xe,getSymbolDisplayBuilder:Me,symbolToString:we,getAugmentedPropertiesOfType:ml,getRootSymbols:hl,getContextualType:Ca,getFullyQualifiedName:z,getResolvedSignature:Wo,getConstantValue:Il,isValidPropertyAccess:lo,getSignatureFromDeclaration:Cn,isImplementationOfOverload:kl,getAliasedSymbol:V,getEmitResolver:a,getExportsOfModule:Q,getJsxElementAttributesType:$a,getJsxIntrinsicTagNames:eo,isOptionalParameter:Tn},Qp=u(67108868,\"unknown\"),Zp=u(67108864,\"__resolving__\"),ef=le(1,\"any\"),tf=le(2,\"string\"),nf=le(4,\"number\"),rf=le(8,\"boolean\"),af=le(16777216,\"symbol\"),of=le(16,\"void\"),sf=le(2097184,\"undefined\"),uf=le(2097216,\"null\"),cf=le(1,\"unknown\"),lf=he(void 0,Wp,jp,jp,void 0,void 0),pf=lf,ff=he(void 0,Wp,jp,jp,void 0,void 0);ff.instantiations={};var df=he(void 0,Wp,jp,jp,void 0,void 0);df.flags|=8388608;var mf,hf,yf,_f,gf,vf,bf,Sf,Af,Tf,Ef,Cf,Nf,wf,kf,xf,Rf,If,Df,Mf,Pf,Lf,Of,Uf,Ff,Bf,Kf,Vf,jf,Wf,qf,zf=he(void 0,Wp,jp,jp,void 0,void 0),Hf=Ht(void 0,void 0,jp,ef,void 0,0,!1,!1),Yf=Ht(void 0,void 0,jp,cf,void 0,0,!1,!1),Jf={},Gf={},Xf={},$f={},Qf={},Zf=[],ed=[],td=[],nd=[],rd=[],id=[],ad=[],od=[],sd=e.createDiagnosticCollection(),ud={string:{type:tf,flags:258},number:{type:nf,flags:132},boolean:{type:rf,flags:8},symbol:{type:af,flags:16777216},undefined:{type:sf,flags:2097152}},cd={},ld={JSX:\"JSX\",IntrinsicElements:\"IntrinsicElements\",ElementClass:\"ElementClass\",ElementAttributesPropertyNameContainer:\"ElementAttributesProperty\",Element:\"Element\",IntrinsicAttributes:\"IntrinsicAttributes\",IntrinsicClassAttributes:\"IntrinsicClassAttributes\"},pd={},fd={},dd={};!function(e){e[e.Type=0]=\"Type\",e[e.ResolvedBaseConstructorType=1]=\"ResolvedBaseConstructorType\",e[e.DeclaredType=2]=\"DeclaredType\",e[e.ResolvedReturnType=3]=\"ResolvedReturnType\"}(qf||(qf={}));var md=(hd={},hd[Gp.name]=Gp,hd);return function(){e.forEach(r.getSourceFiles(),function(t){e.bindSourceFile(t,qp)});var t;if(e.forEach(r.getSourceFiles(),function(n){e.isExternalOrCommonJsModule(n)||m(Jf,n.locals),n.moduleAugmentations.length&&(t||(t=[])).push(n.moduleAugmentations)}),t)for(var n=0,i=t;n<i.length;n++)for(var a=i[n],o=0,s=a;o<s.length;o++){var u=s[o];h(u)}y(Jf,md,e.Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0),_(Gp).type=sf,_(Xp).type=tr(\"IArguments\"),_(Qp).type=cf,gf=tr(\"Array\",1),yf=tr(\"Object\"),_f=tr(\"Function\"),vf=tr(\"String\"),bf=tr(\"Number\"),Sf=tr(\"Boolean\"),Af=tr(\"RegExp\"),jf=nr(\"JSX\",ld.Element),xf=e.memoize(function(){return tr(\"ClassDecorator\")}),If=e.memoize(function(){return tr(\"PropertyDecorator\")}),Df=e.memoize(function(){return tr(\"MethodDecorator\")}),Rf=e.memoize(function(){return tr(\"ParameterDecorator\")}),Mf=e.memoize(function(){return tr(\"TypedPropertyDescriptor\",1)}),Pf=e.memoize(function(){return tr(\"Promise\",1)}),Lf=e.memoize(function(){return er(\"Promise\",793056,void 0)&&Pf()}),Of=e.memoize(function(){return tr(\"PromiseLike\",1)}),Uf=e.memoize(Vl),hf=e.memoize(function(){return Qn(\"Promise\")}),Ff=e.memoize(function(){return tr(\"PromiseConstructorLike\")}),Bf=e.memoize(jl),zp>=2?(Tf=tr(\"TemplateStringsArray\"),Ef=tr(\"Symbol\"),mf=Qn(\"Symbol\"),Cf=tr(\"Iterable\",1),Nf=tr(\"Iterator\",1),wf=tr(\"IterableIterator\",1)):(Tf=cf,Ef=he(void 0,Wp,jp,jp,void 0,void 0),mf=void 0,Cf=ff,Nf=ff,wf=ff),kf=ur(ef)}(),$p;var hd}var i=1,a=1,o=1;e.getNodeId=t,e.checkTime=0,e.getSymbolId=n,e.createTypeChecker=r}(o||(o={}));var o;!function(e){function t(){return void 0===a&&(a={getSourceMapData:function(){},setSourceFile:function(e){},emitStart:function(e){},emitEnd:function(e,t){},emitPos:function(e){},changeEmitSourcePos:function(){},getText:function(){},getSourceMappingURL:function(){},initialize:function(e,t,n,r){},reset:function(){}}),a}function n(t,n){function r(n,r,i,s){T&&a(),_=void 0,v=-1,b=void 0,S=o,A=0,T={sourceMapFilePath:r,jsSourceMappingURL:E.inlineSourceMap?void 0:e.getBaseFileName(e.normalizeSlashes(r)),sourceMapFile:e.getBaseFileName(e.normalizeSlashes(n)),sourceMapSourceRoot:E.sourceRoot||\"\",sourceMapSources:[],inputSourceFileNames:[],sourceMapNames:[],sourceMapMappings:\"\",sourceMapSourcesContent:E.inlineSources?[]:void 0,sourceMapDecodedMappings:[]},T.sourceMapSourceRoot=e.normalizeSlashes(T.sourceMapSourceRoot),T.sourceMapSourceRoot.length&&47!==T.sourceMapSourceRoot.charCodeAt(T.sourceMapSourceRoot.length-1)&&(T.sourceMapSourceRoot+=e.directorySeparator),E.mapRoot?(g=e.normalizeSlashes(E.mapRoot),s||(e.Debug.assert(1===i.length),g=e.getDirectoryPath(e.getSourceFilePathInNewDir(i[0],t,g))),e.isRootedDiskPath(g)||e.isUrl(g)?T.jsSourceMappingURL=e.combinePaths(g,T.jsSourceMappingURL):(g=e.combinePaths(t.getCommonSourceDirectory(),g),T.jsSourceMappingURL=e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizePath(n)),e.combinePaths(g,T.jsSourceMappingURL),t.getCurrentDirectory(),t.getCanonicalFileName,!0))):g=e.getDirectoryPath(e.normalizePath(n))}function a(){_=void 0,g=void 0,v=void 0,b=void 0,S=void 0,A=void 0,T=void 0}function s(){if(N){N=!1,b.emittedLine=S.emittedLine,b.emittedColumn=S.emittedColumn,T.sourceMapDecodedMappings.pop(),S=T.sourceMapDecodedMappings.length?T.sourceMapDecodedMappings[T.sourceMapDecodedMappings.length-1]:o;for(var e=T.sourceMapMappings,t=e.length-1;t>=0;t--){var n=e.charAt(t);if(\",\"===n)break;if(\";\"===n&&0!==t&&\";\"!==e.charAt(t-1))break}T.sourceMapMappings=e.substr(0,Math.max(0,t))}}function u(){if(b&&b!==S){var t=S.emittedColumn;if(S.emittedLine===b.emittedLine)T.sourceMapMappings&&(T.sourceMapMappings+=\",\");else{for(var n=S.emittedLine;n<b.emittedLine;n++)T.sourceMapMappings+=\";\";t=1}T.sourceMapMappings+=i(b.emittedColumn-t),T.sourceMapMappings+=i(b.sourceIndex-S.sourceIndex),T.sourceMapMappings+=i(b.sourceLine-S.sourceLine),T.sourceMapMappings+=i(b.sourceColumn-S.sourceColumn),b.nameIndex>=0&&(e.Debug.assert(!1,\"We do not support name index right now, Make sure to update updateLastEncodedAndRecordedSpans when we start using this\"),T.sourceMapMappings+=i(b.nameIndex-A),A=b.nameIndex),S=b,T.sourceMapDecodedMappings.push(S)}}function c(t){if(t!==-1){var r=e.getLineAndCharacterOfPosition(_,t);r.line++,r.character++;var i=n.getLine(),a=n.getColumn();!b||b.emittedLine!==i||b.emittedColumn!==a||b.sourceIndex===v&&(b.sourceLine>r.line||b.sourceLine===r.line&&b.sourceColumn>r.character)?(u(),b={emittedLine:i,emittedColumn:a,sourceLine:r.line,sourceColumn:r.character,sourceIndex:v},C=!1):C||(b.sourceLine=r.line,b.sourceColumn=r.character,b.sourceIndex=v),s()}}function l(t){var n=!!t.decorators;return t.pos!==-1?e.skipTrivia(_.text,n?t.decorators.end:t.pos):-1}function p(e){c(l(e))}function f(e,t){c(e.end),C=t}function d(){e.Debug.assert(!N),N=!0}function m(n){_=n;var r=E.sourceRoot?t.getCommonSourceDirectory():g,i=e.getRelativePathToDirectoryOrUrl(r,_.fileName,t.getCurrentDirectory(),t.getCanonicalFileName,!0);(v=e.indexOf(T.sourceMapSources,i))===-1&&(v=T.sourceMapSources.length,T.sourceMapSources.push(i),T.inputSourceFileNames.push(n.fileName),E.inlineSources&&T.sourceMapSourcesContent.push(n.text))}function h(){return u(),e.stringify({version:3,file:T.sourceMapFile,sourceRoot:T.sourceMapSourceRoot,sources:T.sourceMapSources,names:T.sourceMapNames,mappings:T.sourceMapMappings,sourcesContent:T.sourceMapSourcesContent})}function y(){if(E.inlineSourceMap){var t=e.convertToBase64(h());return T.jsSourceMappingURL=\"data:application/json;base64,\"+t}return T.jsSourceMappingURL}var _,g,v,b,S,A,T,E=t.getCompilerOptions(),C=!1,N=!1;return{getSourceMapData:function(){return T},setSourceFile:m,emitPos:c,emitStart:p,emitEnd:f,changeEmitSourcePos:d,getText:h,getSourceMappingURL:y,initialize:r,reset:a}}function r(e){if(e<64)return s.charAt(e);throw TypeError(e+\": not a 64 based value\")}function i(e){e<0?e=1+(-e<<1):e<<=1;var t=\"\";do{var n=31&e;e>>=5,e>0&&(n|=32),t+=r(n)}while(e>0);return t}var a,o={emittedLine:1,emittedColumn:1,sourceLine:1,sourceColumn:1,sourceIndex:0};e.getNullSourceMapWriter=t,e.createSourceMapWriter=n;var s=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"}(o||(o={}));var o;!function(e){function t(t,r,i){function a(e,i,a){n(t,r,o,e.declarationFilePath,i,a)}var o=e.createDiagnosticCollection();return e.forEachExpectedEmitFile(t,a,i),o.getDiagnostics(i?i.fileName:void 0)}function n(t,n,r,i,a,o){function s(e){return fe.substring(e.pos,e.end).indexOf(\"@internal\")>=0}function u(t){if(t){var n=e.getLeadingCommentRanges(fe,t.pos);if(e.forEach(n,s))return;re(t)}}function c(){var t=e.createTextWriter(ve);return t.trackSymbol=d,t.reportInaccessibleThisError=m,t.writeKeyword=t.write,t.writeOperator=t.write,t.writePunctuation=t.write,t.writeSpace=t.write,t.writeStringLiteral=t.writeLiteral,t.writeParameter=t.write,t.writeSymbol=t.write,l(t),t}function l(e){Se=e,ae=e.write,ce=e.writeTextOfNode,oe=e.writeLine,se=e.increaseIndent,ue=e.decreaseIndent}function p(t){var n=Se;e.forEach(t,function(t){var n;214===t.kind?n=t.parent.parent:228===t.kind||229===t.kind||226===t.kind?e.Debug.fail(\"We should be getting ImportDeclaration instead to write\"):n=t;var r=e.forEach(Ce,function(e){return e.node===n?e:void 0});if(!r&&ge&&(r=e.forEach(ge,function(e){return e.node===n?e:void 0})),r)if(225===r.node.kind)r.isVisible=!0;else{c();for(var i=r.indent;i;i--)se();221===n.kind&&(e.Debug.assert(void 0===ge),ge=[]),k(n),221===n.kind&&(r.subModuleElementDeclarationEmitInfo=ge,ge=void 0),r.asynchronousOutput=Se.getText()}}),l(n)}function f(t){if(0===t.accessibility)t&&t.aliasesToMakeVisible&&p(t.aliasesToMakeVisible);else{Ae=!0;var n=Se.getSymbolAccessibilityDiagnostic(t);n&&(n.typeName?r.add(e.createDiagnosticForNode(t.errorNode||n.errorNode,n.diagnosticMessage,e.getTextOfNodeFromSourceText(fe,n.typeName),t.errorSymbolName,t.errorModuleName)):r.add(e.createDiagnosticForNode(t.errorNode||n.errorNode,n.diagnosticMessage,t.errorSymbolName,t.errorModuleName)))}}function d(e,t,r){f(n.isSymbolAccessible(e,t,r))}function m(){ye&&(Ae=!0,r.add(e.createDiagnosticForNode(ye,e.Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary,e.declarationNameToString(ye))))}function h(e,t,r){Se.getSymbolAccessibilityDiagnostic=r,ae(\": \"),t?A(t):(ye=e.name,n.writeTypeOfDeclaration(e,le,2,Se),ye=void 0)}function y(e,t){Se.getSymbolAccessibilityDiagnostic=t,ae(\": \"),e.type?A(e.type):(ye=e.name,n.writeReturnTypeOfSignatureDeclaration(e,le,2,Se),ye=void 0)}function _(e){for(var t=0,n=e;t<n.length;t++){Ee(n[t])}}function g(e,t,n,r){for(var i=Se.getTextPos(),a=0,o=e;a<o.length;a++){var s=o[a];r&&!r(s)||(i!==Se.getTextPos()&&ae(t),i=Se.getTextPos(),n(s))}}function v(e,t,n){g(e,\", \",t,n)}function b(t){if(t){var n=e.getJsDocCommentsFromText(t,fe);e.emitNewLineBeforeLeadingComments(de,Se,t,n),e.emitComments(fe,de,Se,n,!0,ve,e.writeCommentRange)}}function S(e,t){Se.getSymbolAccessibilityDiagnostic=t,A(e)}function A(t){function r(e){if(69===e.kind)ce(fe,e);else{var t=136===e.kind?e.left:e.expression,n=136===e.kind?e.right:e.name;r(t),ae(\".\"),ce(fe,n)}}function i(e){f(n.isEntityNameVisible(e,224===e.parent.kind?e.parent:le)),r(e)}switch(t.kind){case 117:case 130:case 128:case 120:case 131:case 103:case 162:case 163:return ce(fe,t);case 191:return function(t){e.isSupportedExpressionWithTypeArguments(t)&&(e.Debug.assert(69===t.expression.kind||169===t.expression.kind),i(t.expression),t.typeArguments&&(ae(\"<\"),v(t.typeArguments,A),ae(\">\")))}(t);case 152:return function(e){i(e.typeName),e.typeArguments&&(ae(\"<\"),v(e.typeArguments,A),ae(\">\"))}(t);case 155:return function(e){ae(\"typeof \"),i(e.exprName)}(t);case 157:return function(e){A(e.elementType),ae(\"[]\")}(t);case 158:return function(e){ae(\"[\"),v(e.elementTypes,A),ae(\"]\")}(t);case 159:return function(e){g(e.types,\" | \",A)}(t);case 160:return function(e){g(e.types,\" & \",A)}(t);case 161:return function(e){ae(\"(\"),A(e.type),ae(\")\")}(t);case 153:case 154:return ee(t);case 156:return function(e){ae(\"{\"),e.members.length&&(oe(),se(),_(e.members),ue()),ae(\"}\")}(t);case 69:return i(t);case 136:return i(t);case 151:return function(e){ce(fe,e.parameterName),ae(\" is \"),A(e.type)}(t)}}function T(t){fe=t.text,de=e.getLineStarts(t),me=t.identifiers,he=e.isExternalModule(t),le=t,e.emitDetachedComments(fe,de,Se,e.writeCommentRange,t,ve,!0),_(t.statements)}function E(){if(!e.hasProperty(me,\"_default\"))return\"_default\";for(var t=0;;){t++;var n=\"_default_\"+t;if(!e.hasProperty(me,n))return n}}function C(t){function r(n){return{diagnosticMessage:e.Diagnostics.Default_export_of_the_module_has_or_is_using_private_name_0,errorNode:t}}if(69===t.expression.kind)ae(t.isExportEquals?\"export = \":\"export default \"),ce(fe,t.expression);else{var i=E();ae(\"declare var \"),ae(i),ae(\": \"),Se.getSymbolAccessibilityDiagnostic=r,n.writeTypeOfExpression(t.expression,le,2,Se),ae(\";\"),oe(),ae(t.isExportEquals?\"export = \":\"export default \"),ae(i)}if(ae(\";\"),oe(),69===t.expression.kind){p(n.collectLinkedAliases(t.expression))}}function N(e){return n.isDeclarationVisible(e)}function w(e,t){if(t)k(e);else if(224===e.kind||251===e.parent.kind&&he){var r=void 0;if(ge&&251!==e.parent.kind)ge.push({node:e,outputPos:Se.getTextPos(),indent:Se.getIndent(),isVisible:r});else{if(225===e.kind){var i=e;i.importClause&&(r=i.importClause.name&&n.isDeclarationVisible(i.importClause)||D(i.importClause.namedBindings))}Ce.push({node:e,outputPos:Se.getTextPos(),indent:Se.getIndent(),isVisible:r})}}}function k(t){switch(t.kind){case 216:return Z(t);case 196:return $(t);case 218:return H(t);case 217:return z(t);case 219:return B(t);case 220:return K(t);case 221:return F(t);case 224:return I(t);case 225:return M(t);default:e.Debug.fail(\"Unknown symbol kind\")}}function x(e){251===e.parent.kind&&(2&e.flags&&ae(\"export \"),512&e.flags?ae(\"default \"):218===e.kind||_e||ae(\"declare \"))}function R(e){16&e.flags?ae(\"private \"):32&e.flags&&ae(\"protected \"),64&e.flags&&ae(\"static \"),128&e.flags&&ae(\"abstract \")}function I(t){function n(n){return{diagnosticMessage:e.Diagnostics.Import_declaration_0_is_using_private_name_1,errorNode:t,typeName:t.name}}Te(t),2&t.flags&&ae(\"export \"),ae(\"import \"),ce(fe,t.name),ae(\" = \"),e.isInternalModuleImportEqualsDeclaration(t)?(S(t.moduleReference,n),ae(\";\")):(ae(\"require(\"),P(t),ae(\");\")),Se.writeLine()}function D(t){if(t)return 227===t.kind?n.isDeclarationVisible(t):e.forEach(t.elements,function(e){return n.isDeclarationVisible(e)})}function M(e){if(Te(e),2&e.flags&&ae(\"export \"),ae(\"import \"),e.importClause){var t=Se.getTextPos();e.importClause.name&&n.isDeclarationVisible(e.importClause)&&ce(fe,e.importClause.name),e.importClause.namedBindings&&D(e.importClause.namedBindings)&&(t!==Se.getTextPos()&&ae(\", \"),227===e.importClause.namedBindings.kind?(ae(\"* as \"),ce(fe,e.importClause.namedBindings.name)):(ae(\"{ \"),v(e.importClause.namedBindings.elements,L,n.isDeclarationVisible),ae(\" }\"))),ae(\" from \")}P(e),ae(\";\"),Se.writeLine()}function P(r){pe=pe||221!==r.kind;var i;if(224===r.kind){var a=r;i=e.getExternalModuleImportEqualsDeclarationExpression(a)}else if(221===r.kind)i=r.name;else{var a=r;i=a.moduleSpecifier}if(9===i.kind&&o&&(be.out||be.outFile)){var s=e.getExternalModuleNameFromDeclaration(t,n,r);if(s)return ae('\"'),ae(s),void ae('\"')}ce(fe,i)}function L(e){e.propertyName&&(ce(fe,e.propertyName),ae(\" as \")),ce(fe,e.name)}function O(e){L(e),p(n.collectLinkedAliases(e.propertyName||e.name))}function U(e){Te(e),ae(\"export \"),e.exportClause?(ae(\"{ \"),v(e.exportClause.elements,O),ae(\" }\")):ae(\"*\"),e.moduleSpecifier&&(ae(\" from \"),P(e)),ae(\";\"),Se.writeLine()}function F(t){for(Te(t),x(t),e.isGlobalScopeAugmentation(t)?ae(\"global \"):(ae(65536&t.flags?\"namespace \":\"module \"),e.isExternalModuleAugmentation(t)?P(t):ce(fe,t.name));222!==t.body.kind;)t=t.body,ae(\".\"),ce(fe,t.name);var n=le;le=t,ae(\" {\"),oe(),se(),_(t.body.statements),ue(),ae(\"}\"),oe(),le=n}function B(t){function n(n){return{diagnosticMessage:e.Diagnostics.Exported_type_alias_0_has_or_is_using_private_name_1,errorNode:t.type,typeName:t.name}}var r=le;le=t,Te(t),x(t),ae(\"type \"),ce(fe,t.name),W(t.typeParameters),ae(\" = \"),S(t.type,n),ae(\";\"),oe(),le=r}function K(t){Te(t),x(t),e.isConst(t)&&ae(\"const \"),ae(\"enum \"),ce(fe,t.name),ae(\" {\"),oe(),se(),_(t.members),ue(),ae(\"}\"),oe()}function V(e){Te(e),ce(fe,e.name);var t=n.getConstantValue(e);void 0!==t&&(ae(\" = \"),ae(t.toString())),ae(\",\"),oe()}function j(e){return 144===e.parent.kind&&16&e.parent.flags}function W(t){function n(t){function n(n){var r;switch(t.parent.kind){case 217:r=e.Diagnostics.Type_parameter_0_of_exported_class_has_or_is_using_private_name_1;break;case 218:r=e.Diagnostics.Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1;break;case 149:r=e.Diagnostics.Type_parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 148:r=e.Diagnostics.Type_parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;break;case 144:case 143:r=64&t.parent.flags?e.Diagnostics.Type_parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:217===t.parent.parent.kind?e.Diagnostics.Type_parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:e.Diagnostics.Type_parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;break;case 216:r=e.Diagnostics.Type_parameter_0_of_exported_function_has_or_is_using_private_name_1;break;default:e.Debug.fail(\"This is unknown parent for type parameter: \"+t.parent.kind)}return{diagnosticMessage:r,errorNode:t,typeName:t.name}}se(),Te(t),ue(),ce(fe,t.name),t.constraint&&!j(t)&&(ae(\" extends \"),153===t.parent.kind||154===t.parent.kind||t.parent.parent&&156===t.parent.parent.kind?(e.Debug.assert(144===t.parent.kind||143===t.parent.kind||153===t.parent.kind||154===t.parent.kind||148===t.parent.kind||149===t.parent.kind),A(t.constraint)):S(t.constraint,n))}t&&(ae(\"<\"),v(t,n),ae(\">\"))}function q(t,n){function r(t){function r(r){var i;return i=217===t.parent.parent.kind?n?e.Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.Extends_clause_of_exported_class_0_has_or_is_using_private_name_1:e.Diagnostics.Extends_clause_of_exported_interface_0_has_or_is_using_private_name_1,{diagnosticMessage:i,errorNode:t,typeName:t.parent.parent.name}}e.isSupportedExpressionWithTypeArguments(t)?S(t,r):n||93!==t.expression.kind||ae(\"null\")}t&&(ae(n?\" implements \":\" extends \"),v(t,r))}function z(t){Te(t),x(t),128&t.flags&&ae(\"abstract \"),ae(\"class \"),ce(fe,t.name);var n=le;le=t,W(t.typeParameters);var r=e.getClassExtendsHeritageClauseElement(t);r&&q([r],!1),q(e.getClassImplementsHeritageClauseElements(t),!0),ae(\" {\"),oe(),se(),function(t){t&&e.forEach(t.parameters,function(e){56&e.flags&&Y(e)})}(e.getFirstConstructorWithBody(t)),_(t.members),ue(),ae(\"}\"),oe(),le=n}function H(t){Te(t),x(t),ae(\"interface \"),ce(fe,t.name);var n=le;le=t,W(t.typeParameters),q(e.getInterfaceBaseTypeNodes(t),!1),ae(\" {\"),oe(),se(),_(t.members),ue(),ae(\"}\"),oe(),le=n}function Y(t){e.hasDynamicName(t)||(Te(t),R(t),J(t),ae(\";\"),oe())}function J(t){function r(n){return 214===t.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Exported_variable_0_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Exported_variable_0_has_or_is_using_private_name_1:142===t.kind||141===t.kind?64&t.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1:217===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1:void 0}function i(e){var n=r(e);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}function a(e){for(var t=[],n=0,r=e.elements;n<r.length;n++){var i=r[n];190!==i.kind&&t.push(i)}v(t,o)}function o(t){function n(e){var n=r(e);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}t.name&&(e.isBindingPattern(t.name)?a(t.name):(ce(fe,t.name),h(t,void 0,n)))}(214!==t.kind||n.isDeclarationVisible(t))&&(e.isBindingPattern(t.name)?a(t.name):(ce(fe,t.name),142!==t.kind&&141!==t.kind||!e.hasQuestionToken(t)||ae(\"?\"),142!==t.kind&&141!==t.kind||156!==t.parent.kind?16&t.flags||h(t,t.type,i):G(t)))}function G(e){e.type&&(ae(\": \"),A(e.type))}function X(t){return e.forEach(t.declarationList.declarations,function(e){return n.isDeclarationVisible(e)})}function $(t){Te(t),x(t),ae(e.isLet(t.declarationList)?\"let \":e.isConst(t.declarationList)?\"const \":\"var \"),v(t.declarationList.declarations,J,n.isDeclarationVisible),ae(\";\"),oe()}function Q(t){function n(e){if(e)return 146===e.kind?e.type:e.parameters.length>0?e.parameters[0].type:void 0}function r(t){var n;return 147===i.kind?(n=64&i.parent.flags?t.errorModuleName?e.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_property_setter_from_exported_class_has_or_is_using_private_name_1:t.errorModuleName?e.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_property_setter_from_exported_class_has_or_is_using_private_name_1,{diagnosticMessage:n,errorNode:i.parameters[0],typeName:i.name}):(n=64&i.flags?t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_property_getter_from_exported_class_has_or_is_using_private_name_0:t.errorModuleName?2===t.accessibility?e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_property_getter_from_exported_class_has_or_is_using_private_name_0,{diagnosticMessage:n,errorNode:i.name,typeName:void 0})}if(!e.hasDynamicName(t)){var i,a=e.getAllAccessorDeclarations(t.parent.members,t);if(t===a.firstAccessor){if(Te(a.getAccessor),Te(a.setAccessor),R(t),ce(fe,t.name),!(16&t.flags)){i=t;var o=n(t);if(!o){var s=146===t.kind?a.setAccessor:a.getAccessor;o=n(s),o&&(i=s)}h(t,o,r)}ae(\";\"),oe()}}}function Z(t){e.hasDynamicName(t)||n.isImplementationOfOverload(t)||(Te(t),216===t.kind?x(t):144===t.kind&&R(t),216===t.kind?(ae(\"function \"),ce(fe,t.name)):145===t.kind?ae(\"constructor\"):(ce(fe,t.name),e.hasQuestionToken(t)&&ae(\"?\")),te(t))}function ee(e){Te(e),te(e)}function te(t){function n(n){var r;switch(t.kind){case 149:r=n.errorModuleName?e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 148:r=n.errorModuleName?e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_call_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 150:r=n.errorModuleName?e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_index_signature_from_exported_interface_has_or_is_using_private_name_0;break;case 144:case 143:r=64&t.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_static_method_from_exported_class_has_or_is_using_private_name_0:217===t.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_public_method_from_exported_class_has_or_is_using_private_name_0:n.errorModuleName?e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_method_from_exported_interface_has_or_is_using_private_name_0;break;case 216:r=n.errorModuleName?2===n.accessibility?e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_external_module_1_but_cannot_be_named:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_name_0_from_private_module_1:e.Diagnostics.Return_type_of_exported_function_has_or_is_using_private_name_0;break;default:e.Debug.fail(\"This is unknown kind for signature: \"+t.kind)}return{diagnosticMessage:r,errorNode:t.name||t}}var r=le;le=t,149!==t.kind&&154!==t.kind||ae(\"new \"),W(t.typeParameters),ae(150===t.kind?\"[\":\"(\"),v(t.parameters,ne),ae(150===t.kind?\"]\":\")\");var i=153===t.kind||154===t.kind;i||156===t.parent.kind?t.type&&(ae(i?\" => \":\": \"),A(t.type)):145===t.kind||16&t.flags||y(t,n),le=r,i||(ae(\";\"),oe())}function ne(t){function r(e){var n=i(e);return void 0!==n?{diagnosticMessage:n,errorNode:t,typeName:t.name}:void 0}function i(n){switch(t.parent.kind){case 145:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_from_exported_class_has_or_is_using_private_name_1;case 149:return n.errorModuleName?e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_constructor_signature_from_exported_interface_has_or_is_using_private_name_1;case 148:return n.errorModuleName?e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_call_signature_from_exported_interface_has_or_is_using_private_name_1;case 144:case 143:return 64&t.parent.flags?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_static_method_from_exported_class_has_or_is_using_private_name_1:217===t.parent.parent.kind?n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_public_method_from_exported_class_has_or_is_using_private_name_1:n.errorModuleName?e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_method_from_exported_interface_has_or_is_using_private_name_1;case 216:return n.errorModuleName?2===n.accessibility?e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_name_1_from_private_module_2:e.Diagnostics.Parameter_0_of_exported_function_has_or_is_using_private_name_1;default:e.Debug.fail(\"This is unknown parent for parameter: \"+t.parent.kind)}}function a(e){if(164===e.kind)ae(\"{\"),v(e.elements,o),ae(\"}\");else if(165===e.kind){ae(\"[\");var t=e.elements;v(t,o),t&&t.hasTrailingComma&&ae(\", \"),ae(\"]\")}}function o(t){190===t.kind?ae(\" \"):166===t.kind&&(t.propertyName&&(ce(fe,t.propertyName),ae(\": \")),t.name&&(e.isBindingPattern(t.name)?a(t.name):(e.Debug.assert(69===t.name.kind),t.dotDotDotToken&&ae(\"...\"),ce(fe,t.name))))}se(),Te(t),t.dotDotDotToken&&ae(\"...\"),e.isBindingPattern(t.name)?a(t.name):ce(fe,t.name),n.isOptionalParameter(t)&&ae(\"?\"),ue(),153===t.parent.kind||154===t.parent.kind||156===t.parent.parent.kind?G(t):16&t.parent.flags||h(t,t.type,r)}function re(e){switch(e.kind){case 216:case 221:case 224:case 218:case 217:case 219:case 220:return w(e,N(e));case 196:return w(e,X(e));case 225:return w(e,!e.importClause);case 231:return U(e);case 145:case 144:case 143:return Z(e);case 149:case 148:case 150:return ee(e);case 146:case 147:return Q(e);case 142:case 141:return Y(e);case 250:return V(e);case 230:return C(e);case 251:return T(e)}}function ie(n,r){function a(t,i,a){a&&!r||(e.Debug.assert(!!t.declarationFilePath||e.isSourceFileJavaScript(n),\"Declaration file is not present only for javascript files\"),o=t.declarationFilePath||t.jsFilePath,s=a)}var o,s=!1;return e.isDeclarationFile(n)?o=n.fileName:e.forEachExpectedEmitFile(t,a,n),o&&(o=e.getRelativePathToDirectoryOrUrl(e.getDirectoryPath(e.normalizeSlashes(i)),o,t.getCurrentDirectory(),t.getCanonicalFileName,!1),Ne+='/// <reference path=\"'+o+'\" />'+ve),s}var ae,oe,se,ue,ce,le,pe,fe,de,me,he,ye,_e,ge,ve=t.getNewLine(),be=t.getCompilerOptions(),Se=c(),Ae=!1,Te=be.removeComments?function(e){}:b,Ee=be.stripInternal?u:re,Ce=[],Ne=\"\",we=[],ke=!1,xe=[];return e.forEach(a,function(n){if(!e.isSourceFileJavaScript(n)){if(be.noResolve||e.forEach(n.referencedFiles,function(r){var i=e.tryResolveScriptReference(t,n,r);i&&!e.contains(we,i)&&(ie(i,!o&&!ke)&&(ke=!0),we.push(i))}),pe=!1,o&&e.isExternalModule(n)?e.isExternalModule(n)&&(_e=!0,ae('declare module \"'+e.getResolvedExternalModuleName(t,n)+'\" {'),oe(),se(),T(n),ue(),ae(\"}\"),oe()):(_e=!1,T(n)),Ce.length){var r=Se;e.forEach(Ce,function(t){if(t.isVisible&&!t.asynchronousOutput){e.Debug.assert(225===t.node.kind),c(),e.Debug.assert(0===t.indent||1===t.indent&&o);for(var n=0;n<t.indent;n++)se();M(t.node),t.asynchronousOutput=Se.getText();for(var n=0;n<t.indent;n++)ue()}}),l(r),xe=xe.concat(Ce),Ce=[]}!o&&e.isExternalModule(n)&&n.moduleAugmentations.length&&!pe&&(ae(\"export {};\"),oe())}}),{reportedDeclarationError:Ae,moduleElementDeclarationEmitInfo:xe,synchronousDeclarationOutput:Se.getText(),referencePathsOutput:Ne}}function r(t,r,i,a,o,s){function u(t,n){var r=0,i=\"\";return e.forEach(n,function(e){e.asynchronousOutput&&(i+=t.substring(r,e.outputPos),i+=u(e.asynchronousOutput,e.subModuleElementDeclarationEmitInfo),r=e.outputPos)}),i+=t.substring(r)}var c=n(a,o,s,t,r,i),l=c.reportedDeclarationError||a.isEmitBlocked(t)||a.getCompilerOptions().noEmit;if(!l){var p=c.referencePathsOutput+u(c.synchronousDeclarationOutput,c.moduleElementDeclarationEmitInfo);e.writeFile(a,s,t,p,a.getCompilerOptions().emitBOM)}return l}e.getDeclarationDiagnostics=t,e.writeDeclarationFile=r}(o||(o={}));var o;!function(e){function t(t,n){return n.moduleName||e.getExternalModuleNameFromPath(t,n.fileName)}function n(n,r,i){var a=r.getExternalModuleFileFromDeclaration(i);if(a&&!e.isDeclarationFile(a))return t(n,a)}function r(r,i,a){function s(t,n){for(var r=n;e.isNodeDescendentOf(r,n);r=r.nextContainer)if(r.locals&&e.hasProperty(r.locals,t)&&9544639&r.locals[t].flags)return!1;return!0}function u(e,t,n,r){t?(e.labeledNonLocalBreaks||(e.labeledNonLocalBreaks={}),e.labeledNonLocalBreaks[n]=r):(e.labeledNonLocalContinues||(e.labeledNonLocalContinues={}),e.labeledNonLocalContinues[n]=r)}function c(e,t){function n(t){if(69===t.kind)e.hoistedLocalVariables.push(t);else for(var r=0,i=t.elements;r<i.length;r++){var a=i[r];n(a.name)}}e.hoistedLocalVariables||(e.hoistedLocalVariables=[]),n(t.name)}function l(t,n,a){var o=t.jsFilePath,s=t.sourceMapFilePath,u=t.declarationFilePath;i.isEmitBlocked(o)||y.noEmit?S=!0:T(o,s,n,a),u&&(S=e.writeDeclarationFile(u,n,a,i,r,b)||S)}var p=\"\\nvar __extends = (this && this.__extends) || function (d, b) {\\n    for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];\\n    function __() { this.constructor = d; }\\n    d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n};\",f='\\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\\n    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\\n    if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\\n    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\\n    return c > 3 && r && Object.defineProperty(target, key, r), r;\\n};',d='\\nvar __metadata = (this && this.__metadata) || function (k, v) {\\n    if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(k, v);\\n};',m=\"\\nvar __param = (this && this.__param) || function (paramIndex, decorator) {\\n    return function (target, key) { decorator(target, key, paramIndex); }\\n};\",h=\"\\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\\n    return new (P || (P = Promise))(function (resolve, reject) {\\n        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n        function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\\n        function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\\n        step((generator = generator.apply(thisArg, _arguments)).next());\\n    });\\n};\",y=i.getCompilerOptions(),_=e.getEmitScriptTarget(y),g=e.getEmitModuleKind(y),v=y.sourceMap||y.inlineSourceMap?[]:void 0,b=e.createDiagnosticCollection(),S=!1,A=i.getNewLine(),T=function(){function a(t,n,r,i){oa.initialize(t,n,r,i),Oi={},Ui=[],Bi=[],Zi=!i,i&&g&&e.forEach(r,ti),e.forEach(r,l),ra();var a=oa.getSourceMappingURL();a&&ta(\"//# sourceMappingURL=\"+a),I(ea.getText(),t,n,y.emitBOM),oa.reset(),ea.reset(),wi=void 0,ki=void 0,xi=void 0,Pi=void 0,Li=void 0,Oi=void 0,Ui=void 0,Bi=void 0,Fi=void 0,Ki=void 0,Vi=!1,ji=!1,Wi=!1,qi=!1,pa=0,zi=void 0,Hi=void 0,Yi=void 0,Ji=void 0,Gi=void 0,Xi=void 0,$i=void 0,Qi=void 0,Di=!1,Ii=void 0,Mi=!1}function l(t){wi=t,ki=t.text,xi=e.getLineStarts(t),Pi=void 0,Li=void 0,Di=t.symbol&&t.symbol.exports&&!!t.symbol.exports.___esModule,Ii=t.renamedDependencies,Ri=t.identifiers,Mi=e.isExternalModule(t),sa(t),ii(t)}function S(t){return!r.hasGlobalName(t)&&!e.hasProperty(Ri,t)&&!e.hasProperty(Oi,t)}function T(e){if(e&&!(pa&e)){var t=268435456===e?\"_i\":\"_n\";if(S(t))return pa|=e,t}for(;;){var n=268435455&pa;if(pa++,8!==n&&13!==n){var r=n<26?\"_\"+String.fromCharCode(97+n):\"_\"+(n-26);if(S(r))return r}}}function E(e){95!==e.charCodeAt(e.length-1)&&(e+=\"_\");for(var t=1;;){var n=e+t;if(S(n))return Oi[n]=n;t++}}function C(e){var t=e.name.text;return s(t,e)?t:E(t)}function N(t){var n=e.getExternalModuleName(t);return E(9===n.kind?e.escapeIdentifier(e.makeIdentifierFromModuleName(n.text)):\"module\")}function w(){return E(\"default\")}function k(){return E(\"class\")}function x(e){switch(e.kind){case 69:return E(e.text);case 221:case 220:return C(e);case 225:case 231:return N(e);case 216:case 217:case 230:return w();case 189:return k()}}function R(t){var n=e.getNodeId(t);return Ui[n]||(Ui[n]=e.unescapeIdentifier(x(t)))}function I(t,n,r,a){y.sourceMap&&!y.inlineSourceMap&&e.writeFile(i,b,r,oa.getText(),!1),v&&v.push(oa.getSourceMapData()),e.writeFile(i,b,n,t,a)}function D(t){var n=e.createSynthesizedNode(69);return n.text=T(t),n}function M(e){zi||(zi=[]),zi.push(e)}function P(e){var t=D(e);return M(t),t}function L(e){zi&&(e?ra():ta(\" \"),ta(\"var \"),V(zi),ta(\";\"))}function O(t,n,r){var i=e.skipTrivia(ki,n);la(i);var a=e.tokenToString(t);r?r():ta(a);var o=i+a.length;return la(o),o}function U(e,t){t&&(ta(e),ri(t))}function F(e,t){t&&ta(\"(\"),ri(e),t&&ta(\")\")}function B(t,n,r,i){e.Debug.assert(n.length>0),ia(),Lt(t,n[0])?i&&ta(\" \"):ra();for(var a=0,o=n.length;a<o;a++)a&&(Ut(n[a-1],n[a])?ta(\", \"):(ta(\",\"),ra())),ri(n[a]);n.hasTrailingComma&&r&&ta(\",\"),aa(),Ot(t,e.lastOrUndefined(n))?i&&ta(\" \"):ra()}function K(e,t,n,r,i,a,o,s){s||(s=ri);for(var u=0;u<n;u++){r?((u||a)&&ta(\",\"),ra()):(u||a)&&ta(\", \");var c=e[t+u];Ai(c.pos),s(c),a=!0}return i&&ta(\",\"),r&&!o&&ra(),n}function V(e){e&&K(e,0,e.length,!1,!1)}function j(e){W(e,0)}function W(e,t){for(var n=t;n<e.length;n++)ra(),ri(e[n])}function q(e,t){if(8===e.kind&&t.length>1)switch(t.charCodeAt(1)){case 98:case 66:case 111:case 79:return!0}return!1}function z(t){var n=H(t);!y.sourceMap&&!y.inlineSourceMap||9!==t.kind&&!e.isTemplateLiteralKind(t.kind)?ta(_<2&&q(t,n)?t.text:n):ea.writeLiteral(n)}function H(t){if(_<2&&(e.isTemplateLiteralKind(t.kind)||t.hasExtendedUnicodeEscape))return Y('\"',t.text,'\"');if(t.parent)return e.getTextOfNodeFromSourceText(ki,t);switch(t.kind){case 9:return Y('\"',t.text,'\"');case 11:return Y(\"`\",t.text,\"`\");case 12:return Y(\"`\",t.text,\"${\");case 13:return Y(\"}\",t.text,\"${\");case 14:return Y(\"}\",t.text,\"`\");case 8:return t.text}e.Debug.fail(\"Literal kind '\"+t.kind+\"' not accounted for.\")}function Y(t,n,r){return t+e.escapeNonAsciiCharacters(e.escapeString(n))+r}function J(t){var n=e.getTextOfNodeFromSourceText(ki,t),r=11===t.kind||14===t.kind;n=n.substring(1,n.length-(r?1:2)),n=n.replace(/\\r\\n?/g,\"\\n\"),n=e.escapeString(n),ta('\"'+n+'\"')}function G(t,n){ta(\"[\"),11===t.template.kind?n(t.template):(n(t.template.head),e.forEach(t.template.templateSpans,function(e){ta(\", \"),n(e.literal)})),ta(\"]\")}function X(t){var n=P(0);ta(\"(\"),ri(n),ta(\" = \"),G(t,ri),ta(\", \"),ri(n),ta(\".raw = \"),G(t,J),ta(\", \"),F(t.tag,he(t.tag)),ta(\"(\"),ri(n),186===t.template.kind&&e.forEach(t.template.templateSpans,function(e){ta(\", \");var t=184===e.expression.kind&&24===e.expression.operatorToken.kind;F(e.expression,t)}),ta(\"))\")}function $(t){function n(e){switch(e.kind){case 184:switch(e.operatorToken.kind){case 37:case 39:case 40:return 1;case 35:case 36:return 0;default:return-1}case 187:case 185:return-1;default:return 1}}if(_>=2)return void e.forEachChild(t,ri);var r=e.isExpression(t.parent)&&function(e,t){switch(t.kind){case 171:case 172:return t.expression===e;case 173:case 175:return!1;default:return n(t)!==-1}}(t,t.parent);r&&ta(\"(\");var i=!1;(function(){return e.Debug.assert(0!==t.templateSpans.length),0!==t.head.text.length||0===t.templateSpans[0].literal.text.length})()&&(z(t.head),i=!0);for(var a=0,o=t.templateSpans.length;a<o;a++){var s=t.templateSpans[a],u=175!==s.expression.kind&&1!==n(s.expression);(a>0||i)&&ta(\" + \"),F(s.expression,u),0!==s.literal.text.length&&(ta(\" + \"),z(s.literal))}r&&ta(\")\")}function Q(e){ri(e.expression),ri(e.literal)}function Z(t){function n(t){69===t.kind&&e.isIntrinsicJsxName(t.text)?(ta('\"'),ri(t),ta('\"')):ri(t)}function r(e){/^[A-Za-z_]\\w*$/.test(e.text)?ri(e):(ta('\"'),ri(e),ta('\"'))}function i(e){r(e.name),ta(\": \"),e.initializer?ri(e.initializer):ta(\"true\")}function a(t,r){var a=e.createSynthesizedNode(69);if(a.text=y.reactNamespace?y.reactNamespace:\"React\",a.parent=t,vi(t),re(a),ta(\".createElement(\"),n(t.tagName),ta(\", \"),0===t.attributes.length)ta(\"null\");else{var o=t.attributes;if(e.forEach(o,function(e){return 242===e.kind})){re(a),ta(\".__spread(\");for(var s=!1,u=0;u<o.length;u++)242===o[u].kind?(0===u&&ta(\"{}, \"),s&&(ta(\"}\"),s=!1),u>0&&ta(\", \"),ri(o[u].expression)):(e.Debug.assert(241===o[u].kind),s?ta(\", \"):(s=!0,u>0&&ta(\", \"),ta(\"{\")),i(o[u]));s&&ta(\"}\"),ta(\")\")}else{ta(\"{\");for(var u=0,c=o.length;u<c;u++)u>0&&ta(\", \"),i(o[u]);ta(\"}\")}}if(r)for(var u=0;u<r.length;u++)if(243!==r[u].kind||r[u].expression)if(239===r[u].kind){var l=Jr(r[u]);void 0!==l&&(ta(', \"'),ta(l),ta('\"'))}else ta(\", \"),ri(r[u]);ta(\")\"),Si(t)}236===t.kind?a(t.openingElement,t.children):(e.Debug.assert(237===t.kind),a(t))}function ee(t){function n(e){ri(e.name),e.initializer&&(ta(\"=\"),ri(e.initializer))}function r(e){ta(\"{...\"),ri(e.expression),ta(\"}\")}function i(t){for(var i=0,a=t.length;i<a;i++)i>0&&ta(\" \"),242===t[i].kind?r(t[i]):(e.Debug.assert(241===t[i].kind),n(t[i]))}function a(e){ta(\"<\"),ri(e.tagName),(e.attributes.length>0||237===e.kind)&&ta(\" \"),i(e.attributes),ta(237===e.kind?\"/>\":\">\")}function o(e){ta(\"</\"),ri(e.tagName),ta(\">\")}236===t.kind?function(e){a(e.openingElement);for(var t=0,n=e.children.length;t<n;t++)ri(e.children[t]);o(e.closingElement)}(t):(e.Debug.assert(237===t.kind),a(t))}function te(t){if(e.Debug.assert(166!==t.kind),9===t.kind)z(t);else if(137===t.kind){if(e.nodeIsDecorated(t.parent)){Fi||(Fi=[]);var n=Fi[e.getNodeId(t)];if(n)return void ta(n);n=P(0).text,Fi[e.getNodeId(t)]=n,ta(n),ta(\" = \")}ri(t.expression)}else ta('\"'),8===t.kind?ta(t.text):na(ki,t),ta('\"')}function ne(e){var t=e.parent;switch(t.kind){case 167:case 192:case 184:case 171:case 244:case 137:case 185:case 140:case 178:case 200:case 170:case 230:case 198:case 191:case 202:case 203:case 204:case 199:case 240:case 237:case 238:case 242:case 243:case 172:case 175:case 183:case 182:case 207:case 249:case 188:case 209:case 173:case 193:case 211:case 174:case 179:case 180:case 201:case 208:case 187:return!0;case 166:case 250:case 139:case 248:case 142:case 214:return t.initializer===e;case 169:return t.expression===e;case 177:case 176:return t.body===e;case 224:return t.moduleReference===e;case 136:return t.left===e}return!1}function re(t){var n=r.getReferencedExportContainer(t);if(n)251===n.kind?5!==g&&4!==g&&ta(\"exports.\"):(ta(R(n)),ta(\".\"));else{if(5!==g){var i=r.getReferencedImportDeclaration(t);if(i){if(226===i.kind)return ta(R(i.parent)),void ta(0===_?'[\"default\"]':\".default\");if(229===i.kind){ta(R(i.parent.parent.parent));var a=i.propertyName||i.name,o=e.getTextOfNodeFromSourceText(ki,a);return void(0===_&&\"default\"===o?ta('[\"default\"]'):(ta(\".\"),ta(o)))}}}if(_<2){var i=r.getReferencedDeclarationWithCollidingName(t);if(i)return void ta(R(i.name))}else if(1048576&r.getNodeCheckFlags(t)){var i=r.getReferencedValueDeclaration(t);if(i){var s=Bi[e.getNodeId(i)];if(void 0!==s)return void ta(s)}}}e.nodeIsSynthesized(t)?ta(t.text):na(ki,t)}function ie(e){if(_<2){var t=e.parent;switch(t.kind){case 166:case 217:case 220:case 214:return t.name===e&&r.isDeclarationWithCollidingName(t)}}return!1}function ae(t){if(Ki&&\"arguments\"==t.text&&r.isArgumentsLocalBinding(t)){return void ta(Ki.argumentsName||(Ki.argumentsName=E(\"arguments\")))}t.parent?ne(t)?re(t):ie(t)?ta(R(t)):e.nodeIsSynthesized(t)?ta(t.text):na(ki,t):ta(t.text)}function oe(e){ta(2&r.getNodeCheckFlags(e)?\"_this\":Ki?Ki.thisName||(Ki.thisName=E(\"this\")):\"this\")}function se(e){if(_>=2)ta(\"super\");else{ta(256&r.getNodeCheckFlags(e)?\"_super.prototype\":\"_super\")}}function ue(e){ta(\"{ \");var t=e.elements;K(t,0,t.length,!1,t.hasTrailingComma),ta(\" }\")}function ce(e){ta(\"[\");var t=e.elements;K(t,0,t.length,!1,t.hasTrailingComma),ta(\"]\")}function le(t){t.propertyName&&(ri(t.propertyName),ta(\": \")),t.dotDotDotToken&&ta(\"...\"),e.isBindingPattern(t.name)?ri(t.name):Yt(t),U(\" = \",t.initializer)}function pe(e){ta(\"...\"),ri(e.expression)}function fe(t){ta(e.tokenToString(114)),t.asteriskToken&&ta(\"*\"),t.expression&&(ta(\" \"),ri(t.expression))}function de(t){var n=me(t);n&&ta(\"(\"),ta(e.tokenToString(114)),ta(\" \"),ri(t.expression),n&&ta(\")\")}function me(t){return 184===t.parent.kind&&!e.isAssignmentOperator(t.parent.operatorToken.kind)||185===t.parent.kind&&t.parent.condition===t}function he(e){switch(e.kind){case 69:case 167:case 169:case 170:case 171:case 175:return!1}return!0}function ye(e,t,n,r,i){for(var a=0,o=0,s=e.length;a<s;){1===o&&i?ta(\".concat(\"):o>0&&ta(\", \");var u=e[a];if(188===u.kind)u=u.expression,F(u,0===o&&he(u)),++a===s&&0===o&&t&&167!==u.kind&&ta(\".slice()\");else{for(var c=a;c<s&&188!==e[c].kind;)c++;ta(\"[\"),n&&ia(),K(e,a,c-a,n,r&&c===s),n&&aa(),ta(\"]\"),a=c}o++}o>1&&i&&ta(\")\")}function _e(e){return 188===e.kind}function ge(t){var n=t.elements;0===n.length?ta(\"[]\"):_>=2||!e.forEach(n,_e)?(ta(\"[\"),B(t,t.elements,n.hasTrailingComma,!1),ta(\"]\")):ye(n,!0,0!=(1024&t.flags),n.hasTrailingComma,!0)}function ve(e,t){if(0===t)return void ta(\"{}\");if(ta(\"{\"),t>0){var n=e.properties;if(t===n.length)B(e,n,_>=1,!0);else{var r=0!=(1024&e.flags);r?ia():ta(\" \"),K(n,0,t,r,!1),r?aa():ta(\" \")}}ta(\"}\")}function be(t,n){function r(){i?(ta(\",\"),ra()):ta(\", \")}var i=0!=(1024&t.flags),a=t.properties;ta(\"(\"),i&&ia();var o=P(0);ri(o),ta(\" = \"),ve(t,n);for(var s=n,u=a.length;s<u;s++){r();var c=a[s];if(ua(c),146===c.kind||147===c.kind){var l=e.getAllAccessorDeclarations(t.properties,c);if(c!==l.firstAccessor)continue;ta(\"Object.defineProperty(\"),ri(o),ta(\", \"),ua(t.name),te(c.name),ca(c.name),ta(\", {\"),ia(),l.getAccessor&&(ra(),vi(l.getAccessor),ta(\"get: \"),ua(l.getAccessor),ta(\"function \"),An(l.getAccessor),ca(l.getAccessor),Si(l.getAccessor),ta(\",\")),l.setAccessor&&(ra(),vi(l.setAccessor),ta(\"set: \"),ua(l.setAccessor),ta(\"function \"),An(l.setAccessor),ca(l.setAccessor),Si(l.setAccessor),ta(\",\")),ra(),ta(\"enumerable: true,\"),ra(),ta(\"configurable: true\"),aa(),ra(),ta(\"})\"),ca(c)}else vi(c),ua(c.name),ri(o),xn(c.name),ca(c.name),ta(\" = \"),248===c.kind?ri(c.initializer):249===c.kind?re(c.name):144===c.kind?yn(c):e.Debug.fail(\"ObjectLiteralElement type not accounted for: \"+c.kind);ca(c)}r(),ri(o),i&&(aa(),ra()),ta(\")\")}function Se(e){var t=e.properties;if(_<2){for(var n=t.length,r=n,i=0,a=t.length;i<a;i++)if(137===t[i].name.kind){r=i;break}if(r!==t.length)return void be(e,r)}ve(e,t.length)}function Ae(t,n,r,i){var a=e.createSynthesizedNode(184,i);return a.operatorToken=e.createSynthesizedNode(n),a.left=t,a.right=r,a}function Te(t,n){var r=e.createSynthesizedNode(169);return r.expression=Ce(t),r.dotToken=e.createSynthesizedNode(21),r.name=n,r}function Ee(t,n){var r=e.createSynthesizedNode(170);return r.expression=Ce(t),r.argumentExpression=n,r}function Ce(t){for(;174===t.kind||192===t.kind;)t=t.expression;if(e.isLeftHandSideExpression(t)&&172!==t.kind&&8!==t.kind)return t;var n=e.createSynthesizedNode(175);return n.expression=t,n}function Ne(e){ta(\"[\"),te(e),ta(\"]\")}function we(e){_>=2&&e.asteriskToken&&ta(\"*\"),ri(e.name),_<2&&ta(\": function \"),An(e)}function ke(e){ri(e.name),ta(\": \"),Ai(e.initializer.pos),ri(e.initializer)}function xe(e){var t=r.getReferencedExportContainer(e);return t&&251!==t.kind}function Re(e){na(ki,e.name),(5!==g||xe(e.name))&&(ta(\": \"),ri(e.name)),_>=2&&e.objectAssignmentInitializer&&(ta(\" = \"),ri(e.objectAssignmentInitializer))}function Ie(t){var n=De(t);if(void 0!==n){if(ta(n.toString()),!y.removeComments){ta(\" /* \"+(169===t.kind?e.declarationNameToString(t.name):e.getTextOfNode(t.argumentExpression))+\" */\")}return!0}return!1}function De(e){if(!y.isolatedModules)return 169===e.kind||170===e.kind?r.getConstantValue(e):void 0}function Me(t,n,r,i){var a=!e.nodeIsSynthesized(t)&&!Ut(n,r),o=at(r);return a||o?(ia(),ra(),!0):(i&&ta(i),!1)}function Pe(t){if(!Ie(t)){if(2===_&&95===t.expression.kind&&We(t)){var n=e.createSynthesizedNode(9);return n.text=t.name.text,void qe(t.expression,n)}ri(t.expression);var r=Me(t,t.expression,t.dotToken),i=!1;if(!r)if(8===t.expression.kind){var a=e.getTextOfNodeFromSourceText(ki,t.expression);i=a.indexOf(e.tokenToString(21))<0}else{var o=De(t.expression);i=isFinite(o)&&Math.floor(o)===o}ta(i?\" .\":\".\");var s=Me(t,t.dotToken,t.name);ri(t.name),st(r,s)}}function Le(e){ri(e.left),ta(\".\"),ri(e.right)}function Oe(e,t){if(69===e.left.kind)Ue(e.left,t);else if(t){var n=P(0);ta(\"(\"),si(n),ta(\" = \"),Ue(e.left,!0),ta(\") && \"),si(n)}else Ue(e.left,!1);ta(\".\"),ri(e.right)}function Ue(e,t){switch(e.kind){case 69:t&&(ta(\"typeof \"),re(e),ta(\" !== 'undefined' && \")),re(e);break;case 136:Oe(e,t);break;default:si(e)}}function Fe(e){if(!Ie(e)){if(2===_&&95===e.expression.kind&&We(e))return void qe(e.expression,e.argumentExpression);ri(e.expression),ta(\"[\"),ri(e.argumentExpression),ta(\"]\")}}function Be(t){return e.forEach(t,function(e){return 188===e.kind})}function Ke(e){for(;175===e.kind||174===e.kind||192===e.kind;)e=e.expression;return e}function Ve(e){if(69===e.kind||97===e.kind||95===e.kind)return ri(e),e;var t=P(0);return ta(\"(\"),ri(t),ta(\" = \"),ri(e),ta(\")\"),t}function je(e){var t,n=Ke(e.expression);169===n.kind?(t=Ve(n.expression),ta(\".\"),ri(n.name)):170===n.kind?(t=Ve(n.expression),ta(\"[\"),ri(n.argumentExpression),ta(\"]\")):95===n.kind?(t=n,ta(\"_super\")):ri(e.expression),ta(\".apply(\"),t?95===t.kind?oe(t):ri(t):ta(\"void 0\"),ta(\", \"),ye(e.arguments,!1,!1,!1,!0),ta(\")\")}function We(t){if(2===_){var n=e.getSuperContainer(t,!1);if(n&&6144&r.getNodeCheckFlags(n))return!0}return!1}function qe(t,n){var i=e.getSuperContainer(t,!1),a=4096&r.getNodeCheckFlags(i);ta(\"_super(\"),ri(n),ta(a?\").value\":\")\")}function ze(t){if(_<2&&Be(t.arguments))return void je(t);var n=t.expression,r=!1,i=!1;95===n.kind?(se(n),r=!0):(r=e.isSuperPropertyOrElementAccess(n),i=r&&We(t),ri(n)),r&&(_<2||i)?(ta(\".call(\"),oe(n),t.arguments.length&&(ta(\", \"),V(t.arguments)),ta(\")\")):(ta(\"(\"),V(t.arguments),ta(\")\"))}function He(e){if(ta(\"new \"),1===_&&e.arguments&&Be(e.arguments)){ta(\"(\");var t=Ve(e.expression);ta(\".bind.apply(\"),ri(t),ta(\", [void 0].concat(\"),ye(e.arguments,!1,!1,!1,!1),ta(\")))\"),ta(\"()\")}else ri(e.expression),e.arguments&&(ta(\"(\"),V(e.arguments),ta(\")\"))}function Ye(e){_>=2?(ri(e.tag),ta(\" \"),ri(e.template)):X(e)}function Je(t){if(!e.nodeIsSynthesized(t)&&177!==t.parent.kind&&(174===t.expression.kind||192===t.expression.kind)){for(var n=t.expression.expression;174===n.kind||192===n.kind;)n=n.expression;if(!(182===n.kind||180===n.kind||179===n.kind||178===n.kind||183===n.kind||172===n.kind||171===n.kind&&172===t.parent.kind||176===n.kind&&171===t.parent.kind||8===n.kind&&169===t.parent.kind))return void ri(n)}ta(\"(\"),ri(t.expression),ta(\")\")}function Ge(t){ta(e.tokenToString(78)),ta(\" \"),ri(t.expression)}function Xe(t){ta(e.tokenToString(103)),ta(\" \"),ri(t.expression)}function $e(t){ta(e.tokenToString(101)),ta(\" \"),ri(t.expression)}function Qe(t){return!(!Ir()||69!==t.kind||e.nodeIsSynthesized(t))&&nt(!t.parent||214!==t.parent.kind&&166!==t.parent.kind?r.getReferencedValueDeclaration(t):t.parent,!0)}function Ze(t){var n=(41===t.operator||42===t.operator)&&Qe(t.operand);if(n&&(ta(Pi+'(\"'),si(t.operand),ta('\", ')),ta(e.tokenToString(t.operator)),182===t.operand.kind){var r=t.operand;35!==t.operator||35!==r.operator&&41!==r.operator?36!==t.operator||36!==r.operator&&42!==r.operator||ta(\" \"):ta(\" \")}ri(t.operand),n&&ta(\")\")}function et(t){Qe(t.operand)?(ta(\"(\"+Pi+'(\"'),si(t.operand),ta('\", '),ta(e.tokenToString(t.operator)),ri(t.operand),ta(41===t.operator?\") - 1)\":\") + 1)\")):(ri(t.operand),ta(e.tokenToString(t.operator)))}function tt(e){return nt(e,!1)}function nt(t,n){if(!t||!Ir())return!1;for(var r=e.getRootDeclaration(t).parent;r;){if(251===r.kind)return!n||0!=(2&e.getCombinedNodeFlags(t));if(e.isDeclaration(r))return!1;r=r.parent}}function rt(t){var n=t.left;if(60===t.operatorToken.kind){var r=void 0,i=!1;if(e.isElementAccessExpression(n)){i=!0,ta(\"(\"),r=e.createSynthesizedNode(170,!1);var a=en(n.expression,!1,!1);if(r.expression=a,8!==n.argumentExpression.kind&&9!==n.argumentExpression.kind){var o=P(268435456);r.argumentExpression=o,Zt(o,n.argumentExpression,!0,n.expression)}else r.argumentExpression=n.argumentExpression;ta(\", \")}else if(e.isPropertyAccessExpression(n)){i=!0,ta(\"(\"),r=e.createSynthesizedNode(169,!1);var a=en(n.expression,!1,!1);r.expression=a,r.dotToken=n.dotToken,r.name=n.name,ta(\", \")}ri(r||n),ta(\" = \"),ta(\"Math.pow(\"),ri(r||n),ta(\", \"),ri(t.right),ta(\")\"),i&&ta(\")\")}else ta(\"Math.pow(\"),ri(n),ta(\", \"),ri(t.right),ta(\")\")}function it(t){if(_<2&&56===t.operatorToken.kind&&(168===t.left.kind||167===t.left.kind))nn(t,198===t.parent.kind);else{var n=t.operatorToken.kind>=56&&t.operatorToken.kind<=68&&Qe(t.left);if(n&&(ta(Pi+'(\"'),si(t.left),ta('\", ')),38===t.operatorToken.kind||60===t.operatorToken.kind)rt(t);else{ri(t.left);var r=Me(t,t.left,t.operatorToken,24!==t.operatorToken.kind?\" \":void 0);ta(e.tokenToString(t.operatorToken.kind));var i=Me(t,t.operatorToken,t.right,\" \");ri(t.right),st(r,i)}n&&ta(\")\")}}function at(t){return e.nodeIsSynthesized(t)&&t.startsOnNewLine}function ot(e){ri(e.condition);var t=Me(e,e.condition,e.questionToken,\" \");ta(\"?\");var n=Me(e,e.questionToken,e.whenTrue,\" \");ri(e.whenTrue),st(t,n);var r=Me(e,e.whenTrue,e.colonToken,\" \");ta(\":\");var i=Me(e,e.colonToken,e.whenFalse,\" \");ri(e.whenFalse),st(r,i)}function st(e,t){e&&aa(),t&&aa()}function ut(e){if(e&&195===e.kind){var t=e;return 0===t.statements.length&&Ut(t,t)}}function ct(t){if(ut(t))return O(15,t.pos),ta(\" \"),void O(16,t.statements.end);O(15,t.pos),ia(),222===t.kind&&(e.Debug.assert(221===t.parent.kind),_n(t.parent)),j(t.statements),222===t.kind&&L(!0),aa(),ra(),O(16,t.statements.end)}function lt(e){195===e.kind?(ta(\" \"),ri(e)):(ia(),ra(),ri(e),aa())}function pt(e){F(e.expression,177===e.expression.kind),ta(\";\")}function ft(e){var t=O(88,e.pos);ta(\" \"),t=O(17,t),ri(e.expression),O(18,e.expression.end),lt(e.thenStatement),e.elseStatement&&(ra(),O(80,e.thenStatement.end),199===e.elseStatement.kind?(ta(\" \"),ri(e.elseStatement)):lt(e.elseStatement))}function dt(e){bt(e,mt)}function mt(e,t){ta(\"do\"),t?Et(t,!0):At(e,!0),195===e.statement.kind?ta(\" \"):ra(),ta(\"while (\"),ri(e.expression),ta(\");\")}function ht(e){bt(e,yt)}function yt(e,t){ta(\"while (\"),ri(e.expression),ta(\")\"),t?Et(t,!0):At(e,!0)}function _t(t){if(Rr(t,!0))return!1;if(Ki&&0==(24576&e.getCombinedNodeFlags(t))){for(var n=0,r=t.declarations;n<r.length;n++){c(Ki,r[n])}return!1}return ua(t),ta(t&&_>=2?e.isLet(t)?\"let \":e.isConst(t)?\"const \":\"var \":\"var \"),!0}function gt(e){for(var t=!1,n=0,r=e.declarations;n<r.length;n++){var i=r[n];i.initializer&&(t?ta(\", \"):t=!0,ri(i))}return t}function vt(e){return _<2&&0!=(65536&r.getNodeCheckFlags(e))}function bt(e,t){if(vt(e)){var n=St(e);210===e.parent.kind&&Wt(e.parent),t(e,n)}else t(e,void 0)}function St(t){function n(e){if(69===e.kind){var t=ie(e)?R(e):e.text;if(s.push(t),2097152&r.getNodeCheckFlags(e.parent)){var i={originalName:e,outParamName:E(\"out_\"+t)};(u||(u=[])).push(i)}}else for(var a=0,o=e.elements;a<o.length;a++){var c=o[a];n(c.name)}}var i,a=E(\"_loop\");switch(t.kind){case 202:case 203:case 204:var o=t.initializer;o&&215===o.kind&&(i=t.initializer)}var s,u;if(i&&24576&e.getCombinedNodeFlags(i)){s=[];for(var c=0,l=i.declarations;c<l.length;c++){n(l[c].name)}}var p=195===t.statement.kind,f=s?s.join(\", \"):\"\";ra(),ta(\"var \"+a+\" = function(\"+f+\")\");var d=Ki;if(Ki={loopOutParameters:u},d&&(d.argumentsName&&(Ki.argumentsName=d.argumentsName),d.thisName&&(Ki.thisName=d.thisName),d.hoistedLocalVariables&&(Ki.hoistedLocalVariables=d.hoistedLocalVariables)),ta(\" {\"),ra(),ia(),p?j(t.statement.statements):ri(t.statement),ra(),Tt(Ki,1,!0),aa(),ra(),ta(\"};\"),ra(),u){ta(\"var \");for(var m=0;m<u.length;m++)0!==m&&ta(\", \"),ta(u[m].outParamName);ta(\";\"),ra()}if(Ki.argumentsName&&(d?d.argumentsName=Ki.argumentsName:(ta(\"var \"+Ki.argumentsName+\" = arguments;\"),ra())),Ki.thisName&&(d?d.thisName=Ki.thisName:(ta(\"var \"+Ki.thisName+\" = this;\"),ra())),Ki.hoistedLocalVariables)if(d)d.hoistedLocalVariables=Ki.hoistedLocalVariables;else{ta(\"var \");for(var h=void 0,y=0,_=Ki.hoistedLocalVariables;y<_.length;y++){var g=_[y];h?ta(\", \"):h={},e.hasProperty(h,g.text)||(ri(g),h[g.text]=g.text)}ta(\";\"),ra()}var v=Ki;return Ki=d,{functionName:a,paramList:f,state:v}}function At(e,t){var n;Ki&&(n=Ki.allowedNonLabeledJumps,Ki.allowedNonLabeledJumps=6),t?lt(e.statement):195===e.statement.kind?j(e.statement.statements):(ra(),ri(e.statement)),Ki&&(Ki.allowedNonLabeledJumps=n)}function Tt(e,t,n){if(e.loopOutParameters)for(var r=0,i=e.loopOutParameters;r<i.length;r++){var a=i[r];0===t?(ae(a.originalName),ta(\" = \"+a.outParamName)):(ta(a.outParamName+\" = \"),ae(a.originalName)),n?(ta(\";\"),ra()):ta(\", \")}}function Et(e,t){function n(e,t,n,r){if(e)for(var i in e){var a=e[i];ra(),ta('case \"'+a+'\": '),!r||r.labels&&r.labels[i]?(ta(t?\"break \":\"continue \"),ta(i+\";\")):(u(r,t,i,a),ta(\"return \"+n+\";\"))}}t&&(ta(\" {\"),ra(),ia());var r=!e.state.nonLocalJumps&&!e.state.labeledNonLocalBreaks&&!e.state.labeledNonLocalContinues,i=E(\"state\");r||ta(\"var \"+i+\" = \"),ta(e.functionName+\"(\"+e.paramList+\");\"),ra(),Tt(e.state,0,!0),r||(ra(),8&e.state.nonLocalJumps&&(ta(\"if (typeof \"+i+' === \"object\") '),Ki?(ta(\"return \"+i+\";\"),Ki.nonLocalJumps|=8):ta(\"return \"+i+\".value;\"),ra()),2&e.state.nonLocalJumps&&(ta(\"if (\"+i+' === \"break\") break;'),ra()),4&e.state.nonLocalJumps&&(ta(\"if (\"+i+' === \"continue\") continue;'),ra()),function(e,t,r){(t.labeledNonLocalBreaks||t.labeledNonLocalContinues)&&(ta(\"switch(\"+e+\") {\"),ia(),n(t.labeledNonLocalBreaks,!0,e,r),n(t.labeledNonLocalContinues,!1,e,r),aa(),ra(),ta(\"}\"))}(i,e.state,Ki)),t&&(ra(),aa(),ta(\"}\"))}function Ct(e){bt(e,Nt)}function Nt(e,t){var n=O(86,e.pos);if(ta(\" \"),n=O(17,n),e.initializer&&215===e.initializer.kind){var r=e.initializer;_t(r)?V(r.declarations):gt(r)}else e.initializer&&ri(e.initializer);ta(\";\"),U(\" \",e.condition),ta(\";\"),U(\" \",e.incrementor),ta(\")\"),t?Et(t,!0):At(e,!0)}function wt(e){_<2&&204===e.kind?bt(e,xt):bt(e,kt)}function kt(e,t){var n=O(86,e.pos);if(ta(\" \"),n=O(17,n),215===e.initializer.kind){var r=e.initializer;r.declarations.length>=1&&(_t(r),ri(r.declarations[0]))}else ri(e.initializer);ta(203===e.kind?\" in \":\" of \"),ri(e.expression),O(18,e.expression.end),t?Et(t,!0):At(e,!0)}function xt(t,n){var r=O(86,t.pos);ta(\" \"),r=O(17,r);var i=D(268435456),a=e.createSynthesizedNode(69);a.text=69===t.expression.kind?E(t.expression.text):T(0),ua(t.expression),ta(\"var \"),si(i),ta(\" = 0\"),ca(t.expression),ta(\", \"),ua(t.expression),si(a),ta(\" = \"),si(t.expression),ca(t.expression),ta(\"; \"),ua(t.expression),si(i),ta(\" < \"),ii(a),ta(\".length\"),ca(t.expression),ta(\"; \"),ua(t.expression),si(i),ta(\"++\"),ca(t.expression),O(18,t.expression.end),ta(\" {\"),ra(),ia();var o=Ee(a,i);if(ua(t.initializer),215===t.initializer.kind){ta(\"var \");var s=t.initializer;if(s.declarations.length>0){var u=s.declarations[0];e.isBindingPattern(u.name)?nn(u,!1,o):(ii(u),ta(\" = \"),si(o))}else si(D(0)),ta(\" = \"),si(o)}else{var c=Ae(t.initializer,56,o,!1);167===t.initializer.kind||168===t.initializer.kind?nn(c,!0,void 0):ii(c)}ca(t.initializer),ta(\";\"),n?(ra(),Et(n,!1)):At(t,!1),ra(),aa(),ta(\"}\")}function Rt(e){if(Ki){var t=206===e.kind?2:4;if(!(e.label&&Ki.labels&&Ki.labels[e.label.text]||!e.label&&Ki.allowedNonLabeledJumps&t)){if(ta(\"return \"),Tt(Ki,1,!1),e.label){var n=void 0;206===e.kind?(n=\"break-\"+e.label.text,u(Ki,!0,e.label.text,n)):(n=\"continue-\"+e.label.text,u(Ki,!1,e.label.text,n)),ta('\"'+n+'\";')}else 206===e.kind?(Ki.nonLocalJumps|=2,ta('\"break\";')):(Ki.nonLocalJumps|=4,ta('\"continue\";'));return}}O(206===e.kind?70:75,e.pos),U(\" \",e.label),ta(\";\")}function It(e){if(Ki)return Ki.nonLocalJumps|=8,ta(\"return { value: \"),e.expression?ri(e.expression):ta(\"void 0\"),void ta(\" };\");O(94,e.pos),U(\" \",e.expression),ta(\";\")}function Dt(e){ta(\"with (\"),ri(e.expression),ta(\")\"),lt(e.statement)}function Mt(e){var t=O(96,e.pos);ta(\" \"),O(17,t),ri(e.expression),t=O(18,e.expression.end),ta(\" \");var n;Ki&&(n=Ki.allowedNonLabeledJumps,Ki.allowedNonLabeledJumps|=2),Pt(e.caseBlock,t),Ki&&(Ki.allowedNonLabeledJumps=n)}function Pt(e,t){O(15,t),ia(),j(e.clauses),aa(),ra(),O(16,e.clauses.end)}function Lt(t,n){return e.getLineOfLocalPositionFromLineMap(xi,e.skipTrivia(ki,t.pos))===e.getLineOfLocalPositionFromLineMap(xi,e.skipTrivia(ki,n.pos))}function Ot(t,n){return e.getLineOfLocalPositionFromLineMap(xi,t.end)===e.getLineOfLocalPositionFromLineMap(xi,n.end)}function Ut(t,n){return e.getLineOfLocalPositionFromLineMap(xi,t.end)===e.getLineOfLocalPositionFromLineMap(xi,e.skipTrivia(ki,n.pos))}function Ft(e){244===e.kind?(ta(\"case \"),ri(e.expression),ta(\":\")):ta(\"default:\"),1===e.statements.length&&Lt(e,e.statements[0])?(ta(\" \"),ri(e.statements[0])):(ia(),j(e.statements),aa())}function Bt(e){ta(\"throw \"),ri(e.expression),ta(\";\")}function Kt(e){ta(\"try \"),ri(e.tryBlock),ri(e.catchClause),e.finallyBlock&&(ra(),ta(\"finally \"),ri(e.finallyBlock))}function Vt(e){ra();var t=O(72,e.pos);ta(\" \"),O(17,t),ri(e.variableDeclaration),O(18,e.variableDeclaration?e.variableDeclaration.end:t),ta(\" \"),ct(e.block)}function jt(e){O(76,e.pos),ta(\";\")}function Wt(e){ri(e.label),ta(\": \")}function qt(t){e.isIterationStatement(t.statement,!1)&&vt(t.statement)||Wt(t),Ki&&(Ki.labels||(Ki.labels={}),Ki.labels[t.label.text]=t.label.text),ri(t.statement),Ki&&(Ki.labels[t.label.text]=void 0)}function zt(e){do{e=e.parent}while(e&&221!==e.kind);return e}function Ht(e){var t=zt(e);ta(t?R(t):\"exports\")}function Yt(t){if(ua(t.name),2&e.getCombinedNodeFlags(t)){var n=zt(t);n?(ta(R(n)),ta(\".\")):5!==g&&4!==g&&ta(\"exports.\")}ii(t.name),ca(t.name)}function Jt(){var t=e.createSynthesizedNode(8);t.text=\"0\";var n=e.createSynthesizedNode(180);return n.expression=t,n}function Gt(t){251===t.parent.kind&&(e.Debug.assert(!!(512&t.flags)||230===t.kind),1!==g&&2!==g&&3!==g||Di||(0!==_?(ta('Object.defineProperty(exports, \"__esModule\", { value: true });'),ra()):(ta(\"exports.__esModule = true;\"),ra())))}function Xt(e){2&e.flags&&(ra(),ua(e),4===g&&e.parent===wi?(ta(Pi+'(\"'),512&e.flags?ta(\"default\"):ii(e.name),ta('\", '),mn(e),ta(\")\")):(512&e.flags?(Gt(e),ta(0===_?'exports[\"default\"]':\"exports.default\")):Yt(e),ta(\" = \"),mn(e)),ca(e),ta(\";\"))}function $t(t){if(4!==g&&!Gi&&Ji&&e.hasProperty(Ji,t.text))for(var n=0,r=Ji[t.text];n<r.length;n++){var i=r[n];ra(),ua(i.name),Ht(i),ta(\".\"),ii(i.name),ca(i.name),ta(\" = \"),re(t),ta(\";\")}}function Qt(t){e.Debug.assert(4===g),(r.getReferencedValueDeclaration(t.propertyName||t.name)||r.isValueAliasDeclaration(t))&&(ra(),ua(t.name),ta(Pi+'(\"'),ii(t.name),ta('\", '),re(t.propertyName||t.name),ta(\")\"),ca(t.name),ta(\";\"))}function Zt(e,t,n,r){n&&ta(\", \");var i=Qe(e);i&&(ta(Pi+'(\"'),ii(e),ta('\", '));var a=e.parent&&(214===e.parent.kind||166===e.parent.kind);ua(tn(r)?r.parent:r),ci(function(){a?Yt(e.parent):ri(e),ta(\" = \"),ri(t)}),ca(r,!0),i&&ta(\")\")}function en(e,t,n,r){var i=D(0);return t||M(i),Zt(i,e,n,r||e.parent),i}function tn(e){return 214===e.kind&&215===e.parent.kind&&e.parent.declarations[0]===e}function nn(t,n,r){function i(e,t,n){if(69===e.kind&&t)return e;var r=en(e,h,m>0,n);return m++,r}function a(t,n,r){t=i(t,!0,r);var a=e.createSynthesizedNode(184);return a.left=t,a.operatorToken=e.createSynthesizedNode(32),a.right=Jt(),o(a,n,t)}function o(t,n,r){var i=e.createSynthesizedNode(185);return i.condition=t,i.questionToken=e.createSynthesizedNode(53),i.whenTrue=n,i.colonToken=e.createSynthesizedNode(54),i.whenFalse=r,i}function s(t){var n=e.createSynthesizedNode(8);return n.text=\"\"+t,n}function u(t,n){var r,a=137===n.kind;return a?r=i(n.expression,!1,n):(r=e.createSynthesizedNode(n.kind),r.text=e.unescapeIdentifier(n.text)),a||69!==r.kind?Ee(t,r):Te(t,r)}function c(t,n){var r=e.createSynthesizedNode(171),i=e.createSynthesizedNode(69);return i.text=\"slice\",r.expression=Te(t,i),r.arguments=e.createSynthesizedNodeArray(),r.arguments[0]=s(n),r}function l(e,t,n){var r=e.properties;1!==r.length&&(t=i(t,!0,n));for(var a=0,o=r;a<o.length;a++){var s=o[a];if(248===s.kind||249===s.kind){var c=s.name;f(249===s.kind?s:s.initializer||c,u(t,c),s)}}}function p(e,t,n){var r=e.elements;1!==r.length&&(t=i(t,!0,n));for(var a=0;a<r.length;a++){var o=r[a];190!==o.kind&&(188!==o.kind?f(o,Ee(t,s(a)),o):a===r.length-1&&f(o.expression,c(t,a),o))}}function f(e,t,n){249===e.kind?(e.objectAssignmentInitializer&&(t=a(t,e.objectAssignmentInitializer,n)),e=e.name):184===e.kind&&56===e.operatorToken.kind&&(t=a(t,e.right,n),e=e.left),168===e.kind?l(e,t,n):167===e.kind?p(e,t,n):(Zt(e,t,m>0,n),m++)}function d(t,n){if(t.initializer?n=n?a(n,t.initializer,t):t.initializer:n||(n=Jt()),e.isBindingPattern(t.name)){var r=t.name,o=r.elements,l=o.length;1!==l&&(n=i(n,0!==l,t));for(var p=0;p<l;p++){var f=o[p];if(164===r.kind){d(f,u(n,f.propertyName||f.name))}else 190!==f.kind&&(f.dotDotDotToken?p===l-1&&d(f,c(n,p)):d(f,Ee(n,s(p))))}}else Zt(t.name,n,m>0,t),m++}var m=0,h=!1;if(214===t.kind){var y=2&e.getCombinedNodeFlags(t),_=tt(t);h=!y&&!_}else 139===t.kind&&(h=!0);184===t.kind?function(t){var r=t.left,a=t.right;e.isEmptyObjectLiteralOrArrayLiteral(r)?ri(a):n?f(r,a,e.nodeIsSynthesized(t)?r:t):(175!==t.parent.kind&&ta(\"(\"),a=i(a,!0,t),f(r,a,t),ta(\", \"),ri(a),175!==t.parent.kind&&ta(\")\"))}(t):(e.Debug.assert(!n),tn(t)&&oa.changeEmitSourcePos(),d(t,r))}function rn(t){if(e.isBindingPattern(t.name))_<2?nn(t,!1):(ri(t.name),U(\" = \",t.initializer));else{var n=t.initializer;if(!n&&_<2&&69===t.name.kind){var i=e.getEnclosingBlockScopeContainer(t),a=r.getNodeCheckFlags(t),o=131072&a,s=262144&a,u=e.isBlockScopedContainerTopLevel(i)||o&&s&&195===i.kind&&e.isIterationStatement(i.parent,!1);8192&e.getCombinedNodeFlags(t)&&!u&&203!==i.kind&&204!==i.kind&&(!r.isDeclarationWithCollidingName(t)||s&&!o&&!e.isIterationStatement(i,!1))&&(n=Jt())}var c=Qe(t.name);c&&(ta(Pi+'(\"'),ii(t.name),ta('\", ')),Yt(t),U(\" = \",n),c&&ta(\")\")}}function an(t){if(190!==t.kind){var n=t.name;69===n.kind?$t(n):e.isBindingPattern(n)&&e.forEach(n.elements,an)}}function on(e){return!!(2&e.flags)&&5===g&&251===e.parent.kind}function sn(t){var n=!1;if(2&t.flags?on(t)&&(ta(\"export \"),n=_t(t.declarationList)):n=_t(t.declarationList),n)V(t.declarationList.declarations),ta(\";\");else{gt(t.declarationList)&&ta(\";\")}5!==g&&t.parent===wi&&e.forEach(t.declarationList.declarations,an)}function un(e){if(!(2&e.flags))return!0;if(on(e))return!0;for(var t=0,n=e.declarationList.declarations;t<n.length;t++){if(n[t].initializer)return!0}return!1}function cn(t){if(_<2)if(e.isBindingPattern(t.name)){var n=D(0);Hi||(Hi=[]),Hi.push(n),ri(n)}else ri(t.name);else t.dotDotDotToken&&ta(\"...\"),ri(t.name),U(\" = \",t.initializer)}function ln(t){if(_<2){var n=0;e.forEach(t.parameters,function(t){if(!t.dotDotDotToken){var r=t.name,i=t.initializer;if(e.isBindingPattern(r)){var a=r.elements.length>0;(a||i)&&(ra(),ta(\"var \"),a?nn(t,!1,Hi[n]):(ri(Hi[n]),ta(\" = \"),ri(i)),ta(\";\"),n++)}else i&&(ra(),ua(t),ta(\"if (\"),si(r),ta(\" === void 0)\"),ca(t),ta(\" { \"),ua(t),ii(r),ta(\" = \"),ii(i),ca(t),ta(\"; }\"))}})}}function pn(t){if(_<2&&e.hasRestParameter(t)){var n=t.parameters.length-1,r=t.parameters[n];if(e.isBindingPattern(r.name))return;var i=D(268435456).text;ra(),vi(r),ua(r),ta(\"var \"),ii(r.name),ta(\" = [];\"),ca(r),Si(r),ra(),ta(\"for (\"),ua(r),ta(\"var \"+i+\" = \"+n+\";\"),ca(r),ta(\" \"),ua(r),ta(i+\" < arguments.length;\"),ca(r),ta(\" \"),ua(r),ta(i+\"++\"),ca(r),ta(\") {\"),ia(),ra(),ua(r),ii(r.name),ta(\"[\"+i+\" - \"+n+\"] = arguments[\"+i+\"];\"),ca(r),aa(),ra(),ta(\"}\")}}function fn(e){ta(146===e.kind?\"get \":\"set \"),ri(e.name),An(e)}function dn(e){return 177===e.kind&&_>=2}function mn(e){e.name?ii(e.name):ta(R(e))}function hn(e){return 176===e.kind?!!e.name:216===e.kind?!!e.name||5!==g:void 0}function yn(t){if(e.nodeIsMissing(t.body))return gi(t);var n=t.kind,r=t.parent;144!==n&&143!==n&&r&&248!==r.kind&&171!==r.kind&&167!==r.kind&&vi(t),ua(t),dn(t)||(on(t)&&(ta(\"export \"),512&t.flags&&ta(\"default \")),ta(\"function\"),_>=2&&t.asteriskToken&&ta(\"*\"),ta(\" \")),hn(t)&&mn(t),An(t),5!==g&&216===n&&r===wi&&t.name&&$t(t.name),ca(t),144!==n&&143!==n&&Si(t)}function _n(e){4&r.getNodeCheckFlags(e)&&(ra(),ua(e),ta(\"var _this = this;\"),ca(e))}function gn(t){if(ia(),ta(\"(\"),t){var n=t.parameters,r=_<2&&e.hasRestParameter(t)?1:0;K(n,0,n.length-r,!1,!1)}ta(\")\"),aa()}function vn(e){if(1===e.parameters.length&&e.pos===e.parameters[0].pos)return void ri(e.parameters[0]);gn(e)}function bn(t){var n=e.getEntityNameFromTypeNode(t.type),i=177===t.kind,a=0!=(8192&r.getNodeCheckFlags(t));i||(ta(\" {\"),ia(),ra(),4096&r.getNodeCheckFlags(t)?(ei(\"\\nconst _super = (function (geti, seti) {\\n    const cache = Object.create(null);\\n    return name => cache[name] || (cache[name] = { get value() { return geti(name); }, set value(v) { seti(name, v); } });\\n})(name => super[name], (name, value) => super[name] = value);\"),ra()):2048&r.getNodeCheckFlags(t)&&(ta(\"const _super = name => super[name];\"),ra()),ta(\"return\")),ta(\" __awaiter(this\"),ta(a?\", arguments, \":\", void 0, \"),!n||y.noCustomAsyncPromise&&_>=2?ta(\"void 0\"):Ue(n,!1),ta(\", function* ()\"),Sn(t),ta(\")\"),i||(ta(\";\"),aa(),ra(),ta(\"}\"))}function Sn(e){e.body?195===e.body.kind?Nn(e,e.body):En(e,e.body):ta(\" { }\")}function An(t){var n=Ki,r=pa,i=zi,a=Hi;Ki=void 0,pa=0,zi=void 0,Hi=void 0,dn(t)?(vn(t),ta(\" =>\")):gn(t),e.isAsyncFunctionLike(t)?bn(t):Sn(t),on(t)||Xt(t),e.Debug.assert(void 0===Ki),Ki=n,pa=r,zi=i,Hi=a}function Tn(e){_n(e),ln(e),pn(e)}function En(e,t){if(_<2||256&e.flags)return void Cn(e,t);ta(\" \");for(var n=t;174===n.kind;)n=n.expression;F(t,168===n.kind)}function Cn(e,t){ta(\" {\"),ia();var n=ea.getTextPos();Ei(e.body),Tn(e);var r=ea.getTextPos()!==n;aa(),!r&&Lt(e,t)?(ta(\" \"),ua(t),ta(\"return \"),ri(t),ca(t),ta(\";\"),L(!1),ta(\" \")):(ia(),ra(),vi(e.body),ua(t),ta(\"return \"),ri(t),ca(t),ta(\";\"),Si(e.body),L(!0),aa(),ra()),ua(e.body),ta(\"}\"),ca(e.body)}function Nn(e,t){ta(\" {\");var n=ea.getTextPos();ia(),Ei(t.statements);var r=Zr(t.statements,!0);if(Tn(e),aa(),ea.getTextPos()!==n||!Ut(t,t))ia(),W(t.statements,r),L(!0),ra(),fa(t.statements.end),aa();else{for(var i=0,a=t.statements;i<a.length;i++){var o=a[i];ta(\" \"),ri(o)}L(!1),ta(\" \"),fa(t.statements.end)}O(16,t.statements.end)}function wn(t,n){if(t.body){var r=t.body.statements;if(r&&!(n>=r.length)){var i=r[n];return 198===i.kind&&e.isSuperCallExpression(i.expression)?i:void 0}}}function kn(t){e.forEach(t.parameters,function(e){56&e.flags&&(ra(),ua(e),ua(e.name),ta(\"this.\"),si(e.name),ca(e.name),ta(\" = \"),ri(e.name),ta(\";\"),ca(e))})}function xn(e){9===e.kind||8===e.kind?(ta(\"[\"),ii(e),ta(\"]\")):137===e.kind?Ne(e):(ta(\".\"),ii(e))}function Rn(e,t){for(var n=[],r=0,i=e.members;r<i.length;r++){var a=i[r];142===a.kind&&t===(0!=(64&a.flags))&&a.initializer&&n.push(a)}return n}function In(e,t){for(var n=0,r=t;n<r.length;n++){Dn(e,r[n])}}function Dn(e,t,n,r){ra(),vi(t),ua(t),ua(t.name),n?ri(n):64&t.flags?mn(e):ta(\"this\"),xn(t.name),ca(t.name),ta(\" = \"),ri(t.initializer),r||ta(\";\"),ca(t),Si(t)}function Mn(t){e.forEach(t.members,function(n){if(194===n.kind)ra(),ta(\";\");else if(144===n.kind||143===t.kind){if(!n.body)return gi(n);ra(),vi(n),ua(n),ua(n.name),jn(t,n),xn(n.name),ca(n.name),ta(\" = \"),yn(n),ca(n),ta(\";\"),Si(n)}else if(146===n.kind||147===n.kind){var r=e.getAllAccessorDeclarations(t.members,n);n===r.firstAccessor&&(ra(),ua(n),ta(\"Object.defineProperty(\"),ua(n.name),jn(t,n),ta(\", \"),te(n.name),ca(n.name),ta(\", {\"),ia(),r.getAccessor&&(ra(),vi(r.getAccessor),ta(\"get: \"),ua(r.getAccessor),ta(\"function \"),An(r.getAccessor),ca(r.getAccessor),Si(r.getAccessor),ta(\",\")),r.setAccessor&&(ra(),vi(r.setAccessor),ta(\"set: \"),ua(r.setAccessor),ta(\"function \"),An(r.setAccessor),ca(r.setAccessor),Si(r.setAccessor),ta(\",\")),ra(),ta(\"enumerable: true,\"),ra(),ta(\"configurable: true\"),aa(),ra(),ta(\"});\"),ca(n))}})}function Pn(e){for(var t=0,n=e.members;t<n.length;t++){var r=n[t];144!==r.kind&&143!==e.kind||r.body?144===r.kind||146===r.kind||147===r.kind?(ra(),vi(r),ua(r),64&r.flags&&ta(\"static \"),146===r.kind?ta(\"get \"):147===r.kind&&ta(\"set \"),r.asteriskToken&&ta(\"*\"),ri(r.name),An(r),ca(r),Si(r)):194===r.kind&&(ra(),ta(\";\")):gi(r)}}function Ln(t,n){var r=Ki,i=pa,a=zi,o=Hi;Ki=void 0,pa=0,zi=void 0,Hi=void 0,On(t,n),e.Debug.assert(void 0===Ki),Ki=r,pa=i,zi=a,Hi=o}function On(t,n){var r=!1;e.forEach(t.members,function(e){145!==e.kind||e.body||gi(e),142===e.kind&&e.initializer&&0==(64&e.flags)&&(r=!0)});var i=e.getFirstConstructorWithBody(t);if(!(_>=2)||i||r){i&&vi(i),ua(i||t),_<2?(ta(\"function \"),mn(t),gn(i)):(ta(\"constructor\"),i?gn(i):ta(n?\"(...args)\":\"()\"));var a=0;ta(\" {\"),ia(),i&&(a=Zr(i.body.statements,!0),Ei(i.body.statements)),_n(t);var o;if(i?(ln(i),pn(i),n&&(o=wn(i,a))&&(ra(),ri(o)),kn(i)):n&&(ra(),ua(n),ta(_<2?\"_super.apply(this, arguments);\":\"super(...args);\"),ca(n)),In(t,Rn(t,!1)),i){var s=i.body.statements;o&&(s=s.slice(1)),W(s,a)}L(!0),ra(),i&&fa(i.body.statements.end),aa(),O(16,i?i.body.statements.end:t.members.end),ca(i||t),i&&Si(i)}}function Un(e){return Bn(e)}function Fn(e){return Bn(e)}function Bn(e){_<2?Vn(e):Kn(e),5!==g&&e.parent===wi&&e.name&&$t(e.name)}function Kn(t){var n,i=e.nodeIsDecorated(t);217===t.kind&&(i?(524288&r.getNodeCheckFlags(t)&&(n=e.unescapeIdentifier(E(t.name?t.name.text:\"default\")),Bi[e.getNodeId(t)]=n,ta(\"let \"+n+\";\"),ra()),!on(t)||512&t.flags||ta(\"export \"),ta(\"let \"),mn(t),void 0!==n&&ta(\" = \"+n),ta(\" = \")):on(t)&&(ta(\"export \"),512&t.flags&&ta(\"default \")));var a,o=Rn(t,!0),s=o.length>0&&189===t.kind;s&&(a=P(0),ta(\"(\"),ia(),ri(a),ta(\" = \")),ta(\"class\"),(t.name||512&t.flags&&(o.length>0||5!==g)&&!i)&&(ta(\" \"),mn(t));var u=e.getClassExtendsHeritageClauseElement(t);if(u&&(ta(\" extends \"),ri(u.expression)),ta(\" {\"),ia(),ra(),Ln(t,u),Pn(t),aa(),ra(),O(16,t.members.end),i&&(Bi[e.getNodeId(t)]=void 0,ta(\";\")),s){for(var c=0,l=o;c<l.length;c++){var p=l[c];ta(\",\"),ra(),Dn(t,p,a,!0)}ta(\",\"),ra(),ri(a),aa(),ta(\")\")}else ra(),In(t,o),Wn(t,n);2&t.flags&&(5!==g?Xt(t):512&t.flags?i&&(ra(),ta(\"export default \"),mn(t),ta(\";\")):251!==t.parent.kind&&(ra(),ua(t),Yt(t),ta(\" = \"),mn(t),ca(t),ta(\";\")))}function Vn(t){217===t.kind&&(tt(t)||ta(\"var \"),mn(t),ta(\" = \")),ta(\"(function (\");var n=e.getClassExtendsHeritageClauseElement(t);n&&ta(\"_super\"),ta(\") {\");var r=pa,i=zi,a=Hi,o=Fi,s=Ki;Ki=void 0,pa=0,zi=void 0,Hi=void 0,Fi=void 0,ia(),n&&(ra(),ua(n),ta(\"__extends(\"),mn(t),ta(\", _super);\"),ca(n)),ra(),Ln(t,n),Mn(t),In(t,Rn(t,!0)),ra(),Wn(t,void 0),ra(),O(16,t.members.end,function(){ta(\"return \"),mn(t)}),ta(\";\"),L(!0),e.Debug.assert(void 0===Ki),Ki=s,pa=r,zi=i,Hi=a,Fi=o,aa(),ra(),O(16,t.members.end),ua(t),ta(\"(\"),n&&ri(n.expression),ta(\"))\"),217===t.kind&&ta(\";\"),ca(t),217===t.kind&&Xt(t)}function jn(e,t){mn(e),64&t.flags||ta(\".prototype\")}function Wn(e,t){zn(e,0),zn(e,64),qn(e,t)}function qn(t,n){var r=t.decorators,i=e.getFirstConstructorWithBody(t),a=i&&e.forEach(i.parameters,function(e){return e.decorators});if(r||a){ra(),ua(t.decorators||a),mn(t),void 0!==n&&ta(\" = \"+n),ta(\" = __decorate([\"),ia(),ra();var o=r?r.length:0,s=K(r,0,o,!0,!1,!1,!0,function(e){return ri(e.expression)});a&&(s+=Hn(i,s>0)),tr(t,s>=0),aa(),ra(),ta(\"], \"),mn(t),ta(\")\"),ca(t.decorators||a),ta(\";\"),ra()}}function zn(t,n){for(var r=0,i=t.members;r<i.length;r++){var a=i[r];if((64&a.flags)===n&&e.nodeCanBeDecorated(a)){var o=void 0,s=void 0;if(e.isAccessor(a)){var u=e.getAllAccessorDeclarations(t.members,a);if(a!==u.firstAccessor)continue;o=u.firstAccessor.decorators,!o&&u.secondAccessor&&(o=u.secondAccessor.decorators),s=u.setAccessor}else o=a.decorators,144===a.kind&&(s=a);var c=s&&e.forEach(s.parameters,function(e){return e.decorators});if(o||c){ra(),ua(o||c),ta(\"__decorate([\"),ia(),ra();var l=o?o.length:0,p=K(o,0,l,!0,!1,!1,!0,function(e){return ri(e.expression)});c&&(p+=Hn(s,p>0)),tr(a,p>0),aa(),ra(),ta(\"], \"),jn(t,a),ta(\", \"),te(a.name),_>0&&ta(142!==a.kind?\", null\":\", void 0\"),ta(\")\"),ca(o||c),ta(\";\"),ra()}}}}function Hn(t,n){var r=0;if(t)for(var i=0,a=0,o=t.parameters;a<o.length;a++){var s=o[a];if(e.nodeIsDecorated(s)){var u=s.decorators;r+=K(u,0,u.length,!0,!1,n,!0,function(e){ta(\"__param(\"+i+\", \"),ri(e.expression),ta(\")\")}),n=!0}i++}return r}function Yn(e){switch(e.kind){case 144:case 146:case 147:case 142:return!0}return!1}function Jn(e){switch(e.kind){case 144:return!0}return!1}function Gn(e){switch(e.kind){case 217:case 144:case 147:return!0}return!1}function Xn(t){switch(t.kind){case 217:return void ta(\"Function\");case 142:return void $n(t.type);case 139:return void $n(t.type);case 146:return void $n(t.type);case 147:return void $n(e.getSetAccessorTypeAnnotationNode(t))}if(e.isFunctionLike(t))return void ta(\"Function\");ta(\"void 0\")}function $n(t){if(t)switch(t.kind){case 103:return void ta(\"void 0\");case 161:return void $n(t.type);case 153:case 154:return void ta(\"Function\");case 157:case 158:return void ta(\"Array\");case 151:case 120:return void ta(\"Boolean\");case 130:case 163:return void ta(\"String\");case 128:return void ta(\"Number\");case 131:return void ta(\"Symbol\");case 152:return void Qn(t);case 155:case 156:case 159:case 160:case 117:case 162:break;default:e.Debug.fail(\"Cannot serialize unexpected type node.\")}ta(\"Object\")}function Qn(t){for(var n=t.parent;e.isDeclaration(n)||e.isTypeNode(n);)n=n.parent;var i=e.cloneEntityName(t.typeName,n);switch(r.getTypeReferenceSerializationKind(i)){case e.TypeReferenceSerializationKind.Unknown:var a=P(0);ta(\"(typeof (\"),si(a),ta(\" = \"),Ue(i,!0),ta(\") === 'function' && \"),si(a),ta(\") || Object\");break;case e.TypeReferenceSerializationKind.TypeWithConstructSignatureAndValue:Ue(i,!1);break;case e.TypeReferenceSerializationKind.VoidType:ta(\"void 0\");break;case e.TypeReferenceSerializationKind.BooleanType:ta(\"Boolean\");break;case e.TypeReferenceSerializationKind.NumberLikeType:ta(\"Number\");break;case e.TypeReferenceSerializationKind.StringLikeType:ta(\"String\");break;case e.TypeReferenceSerializationKind.ArrayLikeType:ta(\"Array\");break;case e.TypeReferenceSerializationKind.ESSymbolType:ta(_<2?\"typeof Symbol === 'function' ? Symbol : Object\":\"Symbol\");break;case e.TypeReferenceSerializationKind.TypeWithCallSignature:ta(\"Function\");break;case e.TypeReferenceSerializationKind.ObjectType:ta(\"Object\")}}function Zn(t){if(t){var n=void 0;if(217===t.kind?n=e.getFirstConstructorWithBody(t):e.isFunctionLike(t)&&e.nodeIsPresent(t.body)&&(n=t),n){var r=n.parameters,i=r.length;if(i>0)for(var a=0;a<i;a++)if(a>0&&ta(\", \"),r[a].dotDotDotToken){var o=r[a].type;o=157===o.kind?o.elementType:152===o.kind&&o.typeArguments&&1===o.typeArguments.length?o.typeArguments[0]:void 0,$n(o)}else Xn(r[a])}}}function er(t){if(t&&e.isFunctionLike(t)&&t.type)return void $n(t.type);ta(\"void 0\")}function tr(e,t){var n=0;return y.emitDecoratorMetadata&&(Yn(e)&&(t&&ta(\", \"),ra(),ta(\"__metadata('design:type', \"),Xn(e),ta(\")\"),n++),Gn(e)&&((t||n)&&ta(\", \"),ra(),ta(\"__metadata('design:paramtypes', [\"),Zn(e),ta(\"])\"),n++),Jn(e)&&((t||n)&&ta(\", \"),ra(),ta(\"__metadata('design:returntype', \"),er(e),ta(\")\"),n++)),n}function nr(e){gi(e)}function rr(t){return!e.isConst(t)||y.preserveConstEnums||y.isolatedModules}function ir(e){if(rr(e)){if(!tt(e)){var t=on(e);(!(2&e.flags)||t&&lr(e,e.symbol&&e.symbol.declarations,220))&&(ua(e),t&&ta(\"export \"),ta(\"var \"),ri(e.name),ca(e),ta(\";\"))}ra(),ua(e),ta(\"(function (\"),ua(e.name),ta(R(e)),ca(e.name),ta(\") {\"),ia(),j(e.members),aa(),ra(),O(16,e.members.end),ta(\")(\"),Yt(e),ta(\" || (\"),Yt(e),ta(\" = {}));\"),ca(e),!on(e)&&2&e.flags&&!tt(e)&&(ra(),ua(e),ta(\"var \"),ri(e.name),ta(\" = \"),Yt(e),ca(e),ta(\";\")),5!==g&&e.parent===wi&&(4===g&&2&e.flags&&(ra(),ta(Pi+'(\"'),mn(e),ta('\", '),mn(e),ta(\");\")),$t(e.name))}}function ar(e){var t=e.parent;ua(e),ta(R(t)),ta(\"[\"),ta(R(t)),ta(\"[\"),te(e.name),ta(\"] = \"),or(e),ta(\"] = \"),te(e.name),ca(e),ta(\";\")}function or(e){var t=r.getConstantValue(e);if(void 0!==t)return void ta(t.toString());e.initializer?ri(e.initializer):ta(\"undefined\")}function sr(e){if(221===e.body.kind){return sr(e.body)||e.body}}function ur(t){return e.isInstantiatedModule(t,y.preserveConstEnums||y.isolatedModules)}function cr(e){return 2===_&&!!(32768&r.getNodeCheckFlags(e))}function lr(t,n,r){return!e.forEach(n,function(e){return e.kind===r&&e.pos<t.pos})}function pr(t){if(!ur(t))return gi(t);if(!tt(t)&&!cr(t)){var n=on(t);n&&!lr(t,t.symbol&&t.symbol.declarations,221)||(ua(t),n&&ta(\"export \"),ta(\"var \"),ri(t.name),ta(\";\"),ca(t),ra())}if(ua(t),ta(\"(function (\"),ua(t.name),ta(R(t)),ca(t.name),ta(\") \"),222===t.body.kind){var r=Ki,i=pa,a=zi;Ki=void 0,pa=0,zi=void 0,ri(t.body),e.Debug.assert(void 0===Ki),Ki=r,pa=i,zi=a}else{ta(\"{\"),ia(),_n(t),ra(),ri(t.body),aa(),ra();O(16,sr(t).body.statements.end)}ta(\")(\"),2&t.flags&&!on(t)&&(ri(t.name),ta(\" = \")),Yt(t),ta(\" || (\"),Yt(t),ta(\" = {}));\"),ca(t),on(t)||69!==t.name.kind||t.parent!==wi||(4===g&&2&t.flags&&(ra(),ta(Pi+'(\"'),mn(t),ta('\", '),mn(t),ta(\");\")),$t(t.name))}function fr(t){if(Ii&&e.hasProperty(Ii,t.text))return'\"'+Ii[t.text]+'\"'}function dr(e){if(9===e.kind){ta(\"require(\");var t=fr(e);t?ta(t):(ua(e),z(e),ca(e)),O(18,e.end)}else ta(\"require()\")}function mr(e){if(224===e.kind)return e;var t=e.importClause;return t&&t.namedBindings&&227===t.namedBindings.kind?t.namedBindings:void 0}function hr(e){return 225===e.kind&&e.importClause&&!!e.importClause.name}function yr(t){e.isAliasSymbolDeclaration(t)&&r.isValueAliasDeclaration(t)&&$t(t.name),e.forEachChild(t,yr)}function _r(e){if(5!==g)return gr(e);if(e.importClause){var t=r.isReferencedAliasDeclaration(e.importClause),n=e.importClause.namedBindings&&r.isReferencedAliasDeclaration(e.importClause.namedBindings,!0);(t||n)&&(ta(\"import \"),ua(e.importClause),t&&(ri(e.importClause.name),n&&ta(\", \")),n&&(vi(e.importClause.namedBindings),ua(e.importClause.namedBindings),227===e.importClause.namedBindings.kind?(ta(\"* as \"),ri(e.importClause.namedBindings.name)):(ta(\"{ \"),Sr(e.importClause.namedBindings.elements,r.isReferencedAliasDeclaration),ta(\" }\")),ca(e.importClause.namedBindings),Si(e.importClause.namedBindings)),ca(e.importClause),ta(\" from \"),ri(e.moduleSpecifier),ta(\";\"))}else ta(\"import \"),ri(e.moduleSpecifier),ta(\";\")}function gr(t){if(e.contains(Yi,t)){var n=224===t.kind&&0!=(2&t.flags),r=mr(t),i=_<=1?\"var \":\"const \";if(2!==g){if(vi(t),ua(t),r&&!hr(t))n||ta(i),Yt(r),ta(\" = \");else{!t.importClause||(ta(i),ta(R(t)),ta(\" = \"))}dr(e.getExternalModuleName(t)),r&&hr(t)&&(ta(\", \"),Yt(r),ta(\" = \"),ta(R(t))),ta(\";\"),ca(t),yr(t),Si(t)}else n?(Yt(r),ta(\" = \"),ri(r.name),ta(\";\")):r&&hr(t)&&(ta(i),Yt(r),ta(\" = \"),ta(R(t)),ta(\";\")),yr(t)}}function vr(t){if(e.isExternalModuleImportEqualsDeclaration(t))return void gr(t);if(r.isReferencedAliasDeclaration(t)||!Mi&&r.isTopLevelValueImportEqualsWithEntityName(t)){vi(t),ua(t);var n=Rr(t,!0),i=nt(t,!0);n||(e.Debug.assert(!i),on(t)?(ta(\"export \"),ta(\"var \")):2&t.flags||ta(\"var \")),i&&(ta(Pi+'(\"'),si(t.name),ta('\", ')),Yt(t),ta(\" = \"),ri(t.moduleReference),i&&ta(\")\"),ta(\";\"),ca(t),yr(t),Si(t)}}function br(t){if(e.Debug.assert(4!==g),5!==g){if(t.moduleSpecifier&&(!t.exportClause||r.isValueAliasDeclaration(t))){ua(t);var n=R(t);if(t.exportClause){2!==g&&(ta(\"var \"),ta(n),ta(\" = \"),dr(e.getExternalModuleName(t)),ta(\";\"));for(var i=0,a=t.exportClause.elements;i<a.length;i++){var o=a[i];r.isValueAliasDeclaration(o)&&(ra(),ua(o),Ht(o),ta(\".\"),ii(o.name),ta(\" = \"),ta(n),ta(\".\"),ii(o.propertyName||o.name),ta(\";\"),ca(o))}}else Xi&&r.moduleExportsSomeValue(t.moduleSpecifier)&&(ra(),ta(\"__export(\"),2!==g?dr(e.getExternalModuleName(t)):ta(n),ta(\");\"));ca(t)}}else t.exportClause&&!r.isValueAliasDeclaration(t)||(ta(\"export \"),t.exportClause?(ta(\"{ \"),Sr(t.exportClause.elements,r.isValueAliasDeclaration),ta(\" }\")):ta(\"*\"),t.moduleSpecifier&&(ta(\" from \"),ri(t.moduleSpecifier)),ta(\";\"))}function Sr(t,n){e.Debug.assert(5===g);for(var r=!1,i=0,a=t;i<a.length;i++){var o=a[i];n(o)&&(r&&ta(\", \"),o.propertyName&&(ri(o.propertyName),ta(\" as \")),ri(o.name),r=!0)}}function Ar(e){if(!e.isExportEquals&&r.isValueAliasDeclaration(e))if(5===g){ra(),ua(e),ta(\"export default \");var t=e.expression;ri(t),216!==t.kind&&217!==t.kind&&ta(\";\"),ca(e)}else ra(),ua(e),4===g?(ta(Pi+'(\"default\",'),ri(e.expression),ta(\")\")):(Gt(e),Ht(e),ta(0===_?'[\"default\"] = ':\".default = \"),ri(e.expression)),ta(\";\"),ca(e)}function Tr(e){Yi=[],Ji={},Gi=void 0,Xi=!1;for(var t=0,n=e.statements;t<n.length;t++){var i=n[t];switch(i.kind){case 225:i.importClause&&!r.isReferencedAliasDeclaration(i.importClause,!0)||Yi.push(i);break;case 224:235===i.moduleReference.kind&&r.isReferencedAliasDeclaration(i)&&Yi.push(i);break;case 231:if(i.moduleSpecifier)i.exportClause?r.isValueAliasDeclaration(i)&&Yi.push(i):r.moduleExportsSomeValue(i.moduleSpecifier)&&(Yi.push(i),Xi=!0);else for(var a=0,o=i.exportClause.elements;a<o.length;a++){var s=o[a],u=(s.propertyName||s.name).text;(Ji[u]||(Ji[u]=[])).push(s)}break;case 230:i.isExportEquals&&!Gi&&(Gi=i)}}}function Er(){Xi&&(ra(),ta(\"function __export(m) {\"),ia(),ra(),ta(\"for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\"),aa(),ra(),ta(\"}\"))}function Cr(t){var n=mr(t);return n&&!hr(t)?e.getTextOfNodeFromSourceText(ki,n.name):225===t.kind&&t.importClause?R(t):231===t.kind&&t.moduleSpecifier?R(t):void 0}function Nr(t,a){if(a){var o=n(i,r,t);if(o)return'\"'+o+'\"'}var s=e.getExternalModuleName(t);if(9===s.kind)return fr(s)||H(s)}function wr(){if(0!==Yi.length){ra();for(var e=!1,t=0,n=Yi;t<n.length;t++){var r=n[t];231===r.kind||225===r.kind&&!r.importClause||(e?ta(\", \"):(ta(\"var \"),e=!0),ta(Cr(r)))}e&&ta(\";\")}}function kr(t){function n(e){var t=E(\"exportStar\");return ra(),ta(\"function \"+t+\"(m) {\"),ia(),ra(),ta(\"var exports = {};\"),ra(),ta(\"for(var n in m) {\"),ia(),ra(),ta('if (n !== \"default\"'),e&&ta(\"&& !\"+e+\".hasOwnProperty(n)\"),ta(\") exports[n] = m[n];\"),aa(),ra(),ta(\"}\"),ra(),ta(Pi+\"(exports);\"),aa(),ra(),ta(\"}\"),t}function r(e){69!==e.kind&&512&e.flags||(c?ta(\",\"):c=!0,ra(),ta(\"'\"),69===e.kind?ii(e):mn(e),ta(\"': true\"))}if(Xi){if(!t&&e.isEmpty(Ji)){for(var i=!1,a=0,o=Yi;a<o.length;a++){var s=o[a];if(231===s.kind&&s.exportClause){i=!0;break}}if(!i)return n(void 0)}var u=E(\"exportedNames\");ra(),ta(\"var \"+u+\" = {\"),ia();var c=!1;if(t)for(var l=0;l<t.length;l++)r(t[l]);if(Ji)for(var p in Ji)for(var f=0,d=Ji[p];f<d.length;f++){var m=d[f];r(m.name)}for(var h=0,y=Yi;h<y.length;h++){var s=y[h];if(231===s.kind){var _=s;if(_.exportClause)for(var g=0,v=_.exportClause.elements;g<v.length;g++){var b=v[g];r(b.name||b.propertyName)}}}return aa(),ra(),ta(\"};\"),n(u)}}function xr(t){function n(t){if(!(4&t.flags)){if(216===t.kind)return a||(a=[]),void a.push(t);if(217===t.kind)return i||(i=[]),void i.push(t);if(220===t.kind)return void(rr(t)&&(i||(i=[]),i.push(t)));if(221===t.kind)return void(ur(t)&&(i||(i=[]),i.push(t)));if(214!==t.kind&&166!==t.kind)return e.isInternalModuleImportEqualsDeclaration(t)&&r.isValueAliasDeclaration(t)?(i||(i=[]),void i.push(t.name)):e.isBindingPattern(t)?void e.forEach(t.elements,n):void(e.isDeclaration(t)||e.forEachChild(t,n));if(Rr(t,!1)){var o=t.name;69===o.kind?(i||(i=[]),i.push(o)):e.forEachChild(o,n)}}}var i,a,o;if(n(t),i){ra(),ta(\"var \");for(var s={},u=0;u<i.length;u++){var c=i[u],l=69===c.kind?c:c.name;if(l){var p=e.unescapeIdentifier(l.text);if(e.hasProperty(s,p))continue;s[p]=p}0!==u&&ta(\", \"),217===c.kind||221===c.kind||220===c.kind?mn(c):ri(c);2&e.getCombinedNodeFlags(69===c.kind?c.parent:c)&&(o||(o=[]),o.push(c))}ta(\";\")}if(a)for(var f=0,d=a;f<d.length;f++){var m=d[f];ra(),ri(m),2&m.flags&&(o||(o=[]),o.push(m))}return o}function Rr(t,n){return!(n&&!tt(t))&&(0==(24576&e.getCombinedNodeFlags(t))||251===e.getEnclosingBlockScopeContainer(t).kind)}function Ir(){return 4===g&&Mi}function Dr(e,t,n){wr(),ra();var r=xr(e),i=kr(r);ra(),ta(\"return {\"),ia(),ra(),Mr(i,t),ra(),Pr(e,n),aa(),ra(),ta(\"}\"),L(!0)}function Mr(t,n){ta(\"setters:[\");for(var r=0;r<n.length;r++){0!==r&&ta(\",\"),ra(),ia();var i=n[r],a=E(e.forEach(i,Cr)||\"\");ta(\"function (\"+a+\") {\"),ia();for(var o=0,s=i;o<s.length;o++){var u=s[o],c=Cr(u)||\"\";switch(u.kind){case 225:if(!u.importClause)break;case 224:e.Debug.assert(\"\"!==c),ra(),ta(c+\" = \"+a+\";\"),ra();break;case 231:if(e.Debug.assert(\"\"!==c),u.exportClause){ra(),ta(Pi+\"({\"),ra(),ia();for(var l=0,p=u.exportClause.elements.length;l<p;l++){0!==l&&(ta(\",\"),ra());var f=u.exportClause.elements[l];ta('\"'),ii(f.name),ta('\": '+a+'[\"'),ii(f.propertyName||f.name),ta('\"]')}aa(),ra(),ta(\"});\")}else ra(),ta(t+\"(\"+a+\");\");ra()}}aa(),ta(\"}\"),aa()}ta(\"],\")}function Pr(t,n){ta(\"execute: function() {\"),ia(),ra();for(var r=n;r<t.statements.length;r++){var i=t.statements[r];switch(i.kind){case 216:case 225:continue;case 231:if(!i.moduleSpecifier)for(var a=0,o=i.exportClause.elements;a<o.length;a++){var s=o[a];Qt(s)}continue;case 224:if(!e.isInternalModuleImportEqualsDeclaration(i))continue;default:ra(),ri(i)}}aa(),ra(),ta(\"}\")}function Lr(e,n){var r=e.moduleName;(r||n&&(r=t(i,e)))&&ta('\"'+r+'\", ')}function Or(t,n){Tr(t),e.Debug.assert(!Pi),Pi=E(\"exports\"),Li=E(\"context\"),ra(),ta(\"System.register(\"),Lr(t,n),ta(\"[\");for(var r={},i=[],a=0;a<Yi.length;a++){var o=Nr(Yi[a],n);if(void 0!==o){var s=o.substr(1,o.length-2);if(e.hasProperty(r,s)){i[r[s]].push(Yi[a])}else r[s]=i.length,i.push([Yi[a]]),0!==a&&ta(\", \"),ta(o)}}ta(\"], function(\"+Pi+\", \"+Li+\") {\"),ra(),ia();var u=Zr(t.statements,!0,!y.noImplicitUseStrict);ra(),ta(\"var __moduleName = \"+Li+\" && \"+Li+\".id;\"),ra(),ti(t),_n(t),Dr(t,i,u),aa(),ra(),ta(\"});\")}function Ur(e,t,n){for(var r=[],i=[],a=[],o=0,s=e.amdDependencies;o<s.length;o++){var u=s[o];u.name?(r.push('\"'+u.path+'\"'),a.push(u.name)):i.push('\"'+u.path+'\"')}for(var c=0,l=Yi;c<l.length;c++){var p=l[c],f=Nr(p,n),d=Cr(p);t&&d?(r.push(f),a.push(d)):i.push(f)}return{aliasedModuleNames:r,unaliasedModuleNames:i,importAliasNames:a}}function Fr(e,t,n){var r=Ur(e,t,n);Br(r),ta(\", \"),Kr(r)}function Br(e){var t=e.aliasedModuleNames,n=e.unaliasedModuleNames;ta('[\"require\", \"exports\"'),t.length&&(ta(\", \"),ta(t.join(\", \"))),n.length&&(ta(\", \"),ta(n.join(\", \"))),ta(\"]\")}function Kr(e){var t=e.importAliasNames;ta(\"function (require, exports\"),t.length&&(ta(\", \"),ta(t.join(\", \"))),ta(\") {\")}function Vr(e,t){ti(e),Tr(e),ra(),ta(\"define(\"),Lr(e,t),Fr(e,!0,t),ia();var n=Zr(e.statements,!0,!y.noImplicitUseStrict);Er(),_n(e),W(e.statements,n),L(!0),zr(!0),aa(),ra(),ta(\"});\")}function jr(e){var t=Zr(e.statements,!1,!y.noImplicitUseStrict);ti(e),Tr(e),Er(),_n(e),W(e.statements,t),L(!0),zr(!1)}function Wr(e){ti(e),Tr(e);var t=Ur(e,!1);ei(\"(function (factory) {\\n    if (typeof module === 'object' && typeof module.exports === 'object') {\\n        var v = factory(require, exports); if (v !== undefined) module.exports = v;\\n    }\\n    else if (typeof define === 'function' && define.amd) {\\n        define(\"),Br(t),ta(\", factory);\"),ei(\"    }\\n})(\"),Kr(t),ia();var n=Zr(e.statements,!0,!y.noImplicitUseStrict);Er(),_n(e),W(e.statements,n),L(!0),zr(!0),aa(),ra(),ta(\"});\")}function qr(e){Yi=void 0,Ji=void 0,Gi=void 0,Xi=!1;var t=Zr(e.statements,!1);ti(e),_n(e),W(e.statements,t),L(!0)}function zr(e){Gi&&r.isValueAliasDeclaration(Gi)&&(ra(),ua(Gi),ta(e?\"return \":\"module.exports = \"),ri(Gi.expression),ta(\";\"),ca(Gi))}function Hr(e){switch(y.jsx){case 2:Z(e);break;case 1:default:ee(e)}}function Yr(t){for(var n=void 0,r=e.getTextOfNode(t,!0),i=0,a=-1,s=0;s<r.length;s++){var u=r.charCodeAt(s);if(e.isLineBreak(u)){if(i!==-1&&a-i+1>0){var c=r.substr(i,a-i+1);n=(n?n+\"\\\" + ' ' + \\\"\":\"\")+e.escapeString(c)}i=-1}else e.isWhiteSpace(u)||(a=s,i===-1&&(i=s))}if(i!==-1){var c=r.substr(i);n=(n?n+\"\\\" + ' ' + \\\"\":\"\")+e.escapeString(c)}return n&&(n=n.replace(/&(\\w+);/g,function(e,t){if(void 0!==o[t]){var n=String.fromCharCode(o[t]);return'\"'===n?'\\\\\"':n}return e})),n}function Jr(t){switch(y.jsx){case 2:var n=Yr(t);return void 0===n||0===n.length?void 0:n;case 1:default:return e.getTextOfNode(t,!0)}}function Gr(t){switch(y.jsx){case 2:ta('\"'),ta(Yr(t)),ta('\"');break;case 1:default:ea.writeLiteral(e.getTextOfNode(t,!0))}}function Xr(e){if(e.expression)switch(y.jsx){case 1:default:ta(\"{\"),ri(e.expression),ta(\"}\");break;case 2:ri(e.expression)}}function $r(e){return!!e.expression.text.match(/use strict/)}function Qr(e,t){t&&(e&&ra(),ta('\"use strict\";'))}function Zr(t,n,r){for(var i=!1,a=0;a<t.length;a++){if(!e.isPrologueDirective(t[a]))return Qr(n||a>0,!i&&r),a;$r(t[a])&&(i=!0),(n||a>0)&&ra(),ri(t[a])}return Qr(n,!i&&r),t.length}function ei(e){for(var t=e.split(/\\r\\n|\\r|\\n/g),n=0;n<t.length;n++){var r=t[n];r.length&&(ra(),ta(r))}}function ti(e){y.noEmitHelpers||(_<2&&!Vi&&4194304&e.flags&&(ei(p),Vi=!0),!ji&&8388608&e.flags&&(ei(f),y.emitDecoratorMetadata&&ei(d),ji=!0),!Wi&&16777216&e.flags&&(ei(m),Wi=!0),!qi&&33554432&e.flags&&(ei(h),qi=!0))}function ni(t){if(ra(),Ni(),Ei(t),e.isExternalModule(t)||y.isolatedModules)if(Zi||!e.isExternalModule(t)&&y.isolatedModules){var n=ma[g]||ma[1];n(t)}else ha[g](t,!0);else{var r=Zr(t.statements,!1);Yi=void 0,Ji=void 0,Gi=void 0,Xi=!1,ti(t),_n(t),W(t.statements,r),L(!0)}vi(t.endOfFileToken)}function ri(e){ai(e,oi)}function ii(e){ai(e,si)}function ai(e,t){if(e){if(4&e.flags)return gi(e);if(li(e))return si(e);var n=pi(e);n&&vi(e),t(e),n&&Si(e)}}function oi(e){e&&(ua(e),si(e),ca(e))}function si(e){e&&fi(e)}function ui(e){oa=e,ua=e.emitStart,ca=e.emitEnd,la=e.emitPos,sa=e.setSourceFile}function ci(t){var n=oa;da(e.getNullSourceMapWriter()),t(),da(n)}function li(e){switch(e.kind){case 218:case 216:case 225:case 224:case 219:case 230:return!0}}function pi(t){switch(t.kind){case 196:return un(t);case 221:return ur(t);case 220:return rr(t)}return e.Debug.assert(!li(t)),!(195!==t.kind&&t.parent&&177===t.parent.kind&&t.parent.body===t&&y.target<=1)}function fi(e){switch(e.kind){case 69:return ae(e);case 139:return cn(e);case 144:case 143:return we(e);case 146:case 147:return fn(e);case 97:return oe(e);case 95:return se(e);case 93:return ta(\"null\");case 99:return ta(\"true\");case 84:return ta(\"false\");case 8:case 9:case 10:case 11:case 12:case 13:case 14:return z(e);case 186:return $(e);case 193:return Q(e);case 236:case 237:return Hr(e);case 239:return Gr(e);case 243:return Xr(e);case 136:return Le(e);case 164:return ue(e);case 165:return ce(e);case 166:return le(e);case 167:return ge(e);case 168:return Se(e);case 248:return ke(e);case 249:return Re(e);case 137:return Ne(e);case 169:return Pe(e);case 170:return Fe(e);case 171:return ze(e);case 172:return He(e);case 173:return Ye(e);case 174:return ri(e.expression);case 192:return ri(e.expression);case 175:return Je(e);case 216:case 176:case 177:return yn(e);case 178:return Ge(e);case 179:return $e(e);case 180:return Xe(e);case 181:return de(e);case 182:return Ze(e);case 183:return et(e);case 184:return it(e);case 185:return ot(e);case 188:return pe(e);case 187:return fe(e);case 190:return;case 195:case 222:return ct(e);case 196:return sn(e);case 197:return ta(\";\");case 198:return pt(e);case 199:return ft(e);case 200:return dt(e);case 201:return ht(e);case 202:return Ct(e);case 204:case 203:return wt(e);case 205:case 206:return Rt(e);case 207:return It(e);case 208:return Dt(e);case 209:return Mt(e);case 244:case 245:return Ft(e);case 210:return qt(e);case 211:return Bt(e);case 212:return Kt(e);case 247:return Vt(e);case 213:return jt(e);case 214:return rn(e);case 189:return Un(e);case 217:return Fn(e);case 218:return nr(e);case 220:return ir(e);case 250:return ar(e);case 221:return pr(e);case 225:return _r(e);case 224:return vr(e);case 231:return br(e);case 230:return Ar(e);case 251:return ni(e)}}function di(t){return void 0!==$i&&e.lastOrUndefined($i).nodePos===t}function mi(){var t=e.getLeadingCommentRanges(ki,e.lastOrUndefined($i).detachedCommentEndPos);return $i.length-1?$i.pop():$i=void 0,t}function hi(t){if(47===ki.charCodeAt(t.pos+1)&&t.pos+2<t.end&&47===ki.charCodeAt(t.pos+2)){var n=ki.substring(t.pos,t.end);return!(!n.match(e.fullTripleSlashReferencePathRegEx)&&!n.match(e.fullTripleSlashAMDReferencePathRegEx))}return!1}function yi(t){if(t.parent&&(251===t.parent.kind||t.pos!==t.parent.pos))return di(t.pos)?mi():e.getLeadingCommentRangesOfNodeFromText(t,ki)}function _i(t){if(t.parent&&(251===t.parent.kind||t.end!==t.parent.end))return e.getTrailingCommentRanges(ki,t.end)}function gi(e){bi(e,!1)}function vi(e){return bi(e,!0)}function bi(t,n){if(!y.removeComments){var r;n?r=yi(t):0===t.pos&&(r=e.filter(yi(t),hi)),e.emitNewLineBeforeLeadingComments(xi,ea,t,r),e.emitComments(ki,xi,ea,r,!0,A,Ci)}}function Si(t){if(!y.removeComments){var n=_i(t);e.emitComments(ki,xi,ea,n,!1,A,Ci)}}function Ai(t){if(!y.removeComments){var n=e.getTrailingCommentRanges(ki,t);e.emitComments(ki,xi,ea,n,!0,A,Ci)}}function Ti(t){if(!y.removeComments){var n;n=di(t)?mi():e.getLeadingCommentRanges(ki,t),e.emitNewLineBeforeLeadingComments(xi,ea,{pos:t,end:t},n),e.emitComments(ki,xi,ea,n,!0,A,Ci)}}function Ei(t){var n=e.emitDetachedComments(ki,xi,ea,Ci,t,A,y.removeComments);n&&($i?$i.push(n):$i=[n])}function Ci(t,n,r,i,a){la(i.pos),e.writeCommentRange(t,n,r,i,a),la(i.end)}function Ni(){var t=e.getShebang(ki);t&&(ta(t),ra())}var wi,ki,xi,Ri,Ii,Di,Mi,Pi,Li,Oi,Ui,Fi,Bi,Ki,Vi,ji,Wi,qi,zi,Hi,Yi,Ji,Gi,Xi,$i,Qi,Zi,ea=e.createTextWriter(A),ta=ea.write,na=ea.writeTextOfNode,ra=ea.writeLine,ia=ea.increaseIndent,aa=ea.decreaseIndent,oa=y.sourceMap||y.inlineSourceMap?e.createSourceMapWriter(i,ea):e.getNullSourceMapWriter(),sa=oa.setSourceFile,ua=oa.emitStart,ca=oa.emitEnd,la=oa.emitPos,pa=0,fa=y.removeComments?function(e){}:Ti,da=y.sourceMap||y.inlineSourceMap?ui:function(e){},ma=(ya={},ya[5]=qr,ya[2]=Vr,ya[4]=Or,ya[3]=Wr,ya[1]=jr,ya),ha=(_a={},_a[5]=function(){},_a[2]=Vr,_a[4]=Or,_a[3]=function(){},_a[1]=function(){},_a);return a;var ya,_a}();return e.forEachExpectedEmitFile(i,l,a),{emitSkipped:S,diagnostics:b.getDiagnostics(),sourceMaps:v}}e.getResolvedExternalModuleName=t,e.getExternalModuleNameFromDeclaration=n;var i;!function(e){e[e.Break=2]=\"Break\",e[e.Continue=4]=\"Continue\",e[e.Return=8]=\"Return\"}(i||(i={}));var a,o={quot:34,amp:38,apos:39,lt:60,gt:62,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,copy:169,ordf:170,laquo:171,not:172,shy:173,reg:174,macr:175,deg:176,plusmn:177,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,sup1:185,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,Agrave:192,Aacute:193,Acirc:194,Atilde:195,Auml:196,Aring:197,AElig:198,Ccedil:199,Egrave:200,Eacute:201,Ecirc:202,Euml:203,Igrave:204,Iacute:205,Icirc:206,Iuml:207,ETH:208,Ntilde:209,Ograve:210,Oacute:211,Ocirc:212,Otilde:213,Ouml:214,times:215,Oslash:216,Ugrave:217,Uacute:218,Ucirc:219,Uuml:220,Yacute:221,THORN:222,szlig:223,agrave:224,aacute:225,acirc:226,atilde:227,auml:228,aring:229,aelig:230,ccedil:231,egrave:232,eacute:233,ecirc:234,euml:235,igrave:236,iacute:237,icirc:238,iuml:239,eth:240,ntilde:241,ograve:242,oacute:243,ocirc:244,otilde:245,ouml:246,divide:247,oslash:248,ugrave:249,uacute:250,ucirc:251,uuml:252,yacute:253,thorn:254,yuml:255,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830};!function(e){e[e.Auto=0]=\"Auto\",e[e.CountMask=268435455]=\"CountMask\",e[e._i=268435456]=\"_i\"}(a||(a={}));var s;!function(e){e[e.ToOriginal=0]=\"ToOriginal\",e[e.ToOutParameter=1]=\"ToOutParameter\"}(s||(s={})),e.emitFiles=r}(o||(o={}));var o;!function(e){function t(t,n){for(var r=\"tsconfig.json\";;){if(n(r))return r;var i=e.getDirectoryPath(t);if(i===t)break;t=i,r=\"../\"+r}}function n(t,n){var r=e.getDirectoryPath(n),i=e.isRootedDiskPath(t)?t:e.combinePaths(r,t);return e.normalizePath(i)}function r(t,n,r,a){switch(void 0!==r.moduleResolution?r.moduleResolution:1===e.getEmitModuleKind(r)?2:1){case 2:return i(t,n,r,a);case 1:return l(t,n,r,a)}}function i(t,n,r,i){var a=e.getDirectoryPath(n),l=e.getSupportedExtensions(r);if(0!==e.getRootLength(t)||c(t)){var p=[],f=e.normalizePath(e.combinePaths(a,t)),d=o(l,f,p,!1,i);return d?{resolvedModule:{resolvedFileName:d},failedLookupLocations:p}:(d=s(l,f,p,!1,i),d?{resolvedModule:{resolvedFileName:d},failedLookupLocations:p}:{resolvedModule:void 0,failedLookupLocations:p})}return u(t,a,i)}function a(e,t){return!t.directoryExists||t.directoryExists(e)}function o(t,n,r,i,a){function o(t){var o=e.fileExtensionIs(n,t)?n:n+t;return!i&&a.fileExists(o)?o:void r.push(o)}return e.forEach(t,o)}function s(t,n,r,i,s){var u=e.combinePaths(n,\"package.json\"),c=!i&&a(n,s);if(c&&s.fileExists(u)){var l=void 0;try{var p=s.readFile(u);l=p?JSON.parse(p):{typings:void 0}}catch(e){l={typings:void 0}}if(\"string\"==typeof l.typings){var f=e.normalizePath(e.combinePaths(n,l.typings)),d=o(t,f,r,!a(e.getDirectoryPath(f),s),s);if(d)return d}}else r.push(u);return o(t,e.combinePaths(n,\"index\"),r,!c,s)}function u(t,n,r){var i=[];for(n=e.normalizeSlashes(n);;){if(\"node_modules\"!==e.getBaseFileName(n)){var u=e.combinePaths(n,\"node_modules\"),c=a(u,r),l=e.normalizePath(e.combinePaths(u,t)),p=o(e.supportedTypeScriptExtensions,l,i,!c,r);if(p)return{resolvedModule:{resolvedFileName:p,isExternalLibraryImport:!0},failedLookupLocations:i};if(p=s(e.supportedTypeScriptExtensions,l,i,!c,r))return{resolvedModule:{resolvedFileName:p,isExternalLibraryImport:!0},failedLookupLocations:i}}var f=e.getDirectoryPath(n);if(f===n)break;n=f}return{resolvedModule:void 0,failedLookupLocations:i}}function c(e){var t=e.lastIndexOf(\"./\",1);return 0===t||1===t&&46===e.charCodeAt(0)}function l(t,n,r,i){if(t.indexOf(\"!\")!=-1)return{resolvedModule:void 0,failedLookupLocations:[]};for(var a,o,s=e.getDirectoryPath(n),u=[],c=e.getSupportedExtensions(r);;){if(a=e.normalizePath(e.combinePaths(s,t)),o=e.forEach(c,function(e){if(\".tsx\"!==e||r.jsx){var t=a+e;if(i.fileExists(t))return t;u.push(t)}}))break;var l=e.getDirectoryPath(s);if(l===s)break;s=l}return o?{resolvedModule:{resolvedFileName:o},failedLookupLocations:u}:{resolvedModule:void 0,failedLookupLocations:u}}function p(t,n){function r(t){return e.sys.useCaseSensitiveFileNames?t:t.toLowerCase()}function i(r,i,a){var o;try{var s=(new Date).getTime();o=e.sys.readFile(r,t.charset),e.ioReadTime+=(new Date).getTime()-s}catch(t){a&&a(t.number===c?e.createCompilerDiagnostic(e.Diagnostics.Unsupported_file_encoding).messageText:t.message),o=\"\"}return void 0!==o?e.createSourceFile(r,o,i,n):void 0}function a(t){return!!e.hasProperty(u,t)||!!e.sys.directoryExists(t)&&(u[t]=!0,!0)}function o(t){if(t.length>e.getRootLength(t)&&!a(t)){o(e.getDirectoryPath(t)),e.sys.createDirectory(t)}}function s(t,n,r,i){try{var a=(new Date).getTime();o(e.getDirectoryPath(e.normalizePath(t))),e.sys.writeFile(t,n,r),e.ioWriteTime+=(new Date).getTime()-a}catch(e){i&&i(e.message)}}var u={},c=-2147024809,l=e.getNewLineCharacter(t);return{getSourceFile:i,getDefaultLibFileName:function(t){return e.combinePaths(e.getDirectoryPath(e.normalizePath(e.sys.getExecutingFilePath())),e.getDefaultLibFileName(t))},writeFile:s,getCurrentDirectory:e.memoize(function(){return e.sys.getCurrentDirectory()}),useCaseSensitiveFileNames:function(){return e.sys.useCaseSensitiveFileNames},getCanonicalFileName:r,getNewLine:function(){return l},fileExists:function(t){return e.sys.fileExists(t)},readFile:function(t){return e.sys.readFile(t)},directoryExists:function(t){return e.sys.directoryExists(t)}}}function f(t,n,r){var i=t.getOptionsDiagnostics(r).concat(t.getSyntacticDiagnostics(n,r),t.getGlobalDiagnostics(r),t.getSemanticDiagnostics(n,r));return t.getCompilerOptions().declaration&&(i=i.concat(t.getDeclarationDiagnostics(n,r))),e.sortAndDeduplicateDiagnostics(i)}function d(e,t){if(\"string\"==typeof e)return e;for(var n=e,r=\"\",i=0;n;){if(i){r+=t;for(var a=0;a<i;a++)r+=\"  \"}r+=n.messageText,i++,n=n.next}return r}function m(t,i,a,o){function s(){return void 0===H&&(H=i.rootDir&&W(X,i.rootDir)?e.getNormalizedAbsolutePath(i.rootDir,re):j(X))&&H[H.length-1]!==e.directorySeparator&&(H+=e.directorySeparator),H}function u(){if(!G){f(),G={};for(var t=0,n=X;t<n.length;t++){var r=n[t];e.copyMap(r.classifiableNames,G)}}return G}function c(e){return{getCanonicalFileName:K,getCommonSourceDirectory:z.getCommonSourceDirectory,getCompilerOptions:z.getCompilerOptions,getCurrentDirectory:function(){return re},getNewLine:function(){return a.getNewLine()},getSourceFile:z.getSourceFile,getSourceFiles:z.getSourceFiles,writeFile:e||function(e,t,n,r){return a.writeFile(e,t,n,r)},isEmitBlocked:m}}function l(){return Y||(Y=e.createTypeChecker(z,!0))}function f(){return J||(J=e.createTypeChecker(z,!1))}function d(e,t,n){var r=this;return T(function(){return y(r,e,t,n)})}function m(t){return ne.contains(e.toPath(t,re,K))}function y(t,n,r,a){if(i.noEmitOnError){var o=t.getOptionsDiagnostics(a).concat(t.getSyntacticDiagnostics(n,a),t.getGlobalDiagnostics(a),t.getSemanticDiagnostics(n,a)),s=[];if(0===o.length&&t.getCompilerOptions().declaration&&(s=t.getDeclarationDiagnostics(void 0,a)),o.length>0||s.length>0)return{diagnostics:s,sourceMaps:void 0,emitSkipped:!0}}var u=l().getEmitResolver(i.outFile||i.out?void 0:n),p=(new Date).getTime(),f=e.emitFiles(u,c(r),n);return e.emitTime+=(new Date).getTime()-p,f}function _(t){return ae.get(e.toPath(t,re,K))}function g(t,n,r){if(t)return n(t,r);var i=[];return e.forEach(z.getSourceFiles(),function(t){r&&r.throwIfCancellationRequested(),e.addRange(i,n(t,r))}),e.sortAndDeduplicateDiagnostics(i)}function v(e,t){return g(e,A,t)}function b(e,t){return g(e,E,t)}function S(e,t){var n=z.getCompilerOptions();return!e||n.out||n.outFile?N(e,t):g(e,w,t)}function A(e,t){return e.parseDiagnostics}function T(t){try{return t()}catch(t){throw t instanceof e.OperationCanceledException&&(J=void 0,Y=void 0),t}}function E(t,n){return T(function(){var r=l();e.Debug.assert(!!t.bindDiagnostics);var i=t.bindDiagnostics,a=e.isSourceFileJavaScript(t)?C(t,n):r.getDiagnostics(t,n),o=$.getDiagnostics(t.fileName),s=Q.getDiagnostics(t.fileName);return i.concat(a).concat(o).concat(s)})}function C(t,n){return T(function(){function n(u){if(!u)return!1;switch(u.kind){case 224:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.import_can_only_be_used_in_a_ts_file)),!0;case 230:if(u.isExportEquals)return s.push(e.createDiagnosticForNode(u,e.Diagnostics.export_can_only_be_used_in_a_ts_file)),!0;break;case 217:var c=u;if(o(c.modifiers)||r(c.typeParameters))return!0;break;case 246:if(106===u.token)return s.push(e.createDiagnosticForNode(u,e.Diagnostics.implements_clauses_can_only_be_used_in_a_ts_file)),!0;break;case 218:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.interface_declarations_can_only_be_used_in_a_ts_file)),!0;case 221:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.module_declarations_can_only_be_used_in_a_ts_file)),!0;case 219:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.type_aliases_can_only_be_used_in_a_ts_file)),!0;case 144:case 143:case 145:case 146:case 147:case 176:case 216:case 177:case 216:var l=u;if(o(l.modifiers)||r(l.typeParameters)||a(l.type))return!0;break;case 196:if(o(u.modifiers))return!0;break;case 214:if(a(u.type))return!0;break;case 171:case 172:var p=u;if(p.typeArguments&&p.typeArguments.length>0){var f=p.typeArguments.pos;return s.push(e.createFileDiagnostic(t,f,p.typeArguments.end-f,e.Diagnostics.type_arguments_can_only_be_used_in_a_ts_file)),!0}break;case 139:var d=u;if(d.modifiers){var m=d.modifiers.pos;return s.push(e.createFileDiagnostic(t,m,d.modifiers.end-m,e.Diagnostics.parameter_modifiers_can_only_be_used_in_a_ts_file)),!0}if(d.questionToken)return s.push(e.createDiagnosticForNode(d.questionToken,e.Diagnostics._0_can_only_be_used_in_a_ts_file,\"?\")),!0;if(d.type)return s.push(e.createDiagnosticForNode(d.type,e.Diagnostics.types_can_only_be_used_in_a_ts_file)),!0;break;case 142:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.property_declarations_can_only_be_used_in_a_ts_file)),!0;case 220:return s.push(e.createDiagnosticForNode(u,e.Diagnostics.enum_declarations_can_only_be_used_in_a_ts_file)),!0;case 174:var h=u;return s.push(e.createDiagnosticForNode(h.type,e.Diagnostics.type_assertion_expressions_can_only_be_used_in_a_ts_file)),!0;case 140:return i.experimentalDecorators||s.push(e.createDiagnosticForNode(u,e.Diagnostics.Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Set_the_experimentalDecorators_option_to_remove_this_warning)),!0}return e.forEachChild(u,n)}function r(n){if(n){var r=n.pos;return s.push(e.createFileDiagnostic(t,r,n.end-r,e.Diagnostics.type_parameter_declarations_can_only_be_used_in_a_ts_file)),!0}return!1}function a(t){return!!t&&(s.push(e.createDiagnosticForNode(t,e.Diagnostics.types_can_only_be_used_in_a_ts_file)),!0)}function o(t){if(t)for(var n=0,r=t;n<r.length;n++){var i=r[n];switch(i.kind){case 112:case 110:case 111:case 122:return s.push(e.createDiagnosticForNode(i,e.Diagnostics._0_can_only_be_used_in_a_ts_file,e.tokenToString(i.kind))),!0;case 113:case 82:case 74:case 77:case 115:}}return!1}var s=[];return n(t),s})}function N(t,n){return T(function(){var r=l().getEmitResolver(t,n),i=function(){};return e.getDeclarationDiagnostics(c(i),r,t)})}function w(t,n){return e.isDeclarationFile(t)?[]:N(t,n)}function k(){var t=[];return e.addRange(t,$.getGlobalDiagnostics()),e.addRange(t,Q.getGlobalDiagnostics()),e.sortAndDeduplicateDiagnostics(t)}function x(){var t=[];return e.addRange(t,l().getGlobalDiagnostics()),e.sortAndDeduplicateDiagnostics(t)}function R(t){return e.getBaseFileName(t).indexOf(\".\")>=0}function I(t,n){O(e.normalizePath(t),n)}function D(e,t){return e.fileName===t.fileName}function M(e,t){return e.text===t.text}function P(e){return e.text}function L(t){function n(r,o){switch(r.kind){case 225:case 224:case 231:var u=e.getExternalModuleName(r);if(!u||9!==u.kind)break;if(!u.text)break;o&&e.isExternalModuleNameRelative(u.text)||(i||(i=[])).push(u);break;case 221:if(e.isAmbientModule(r)&&(o||4&r.flags||e.isDeclarationFile(t))){var c=r.name;if(s||o&&!e.isExternalModuleNameRelative(c.text))(a||(a=[])).push(c);else if(!o)for(var l=0,p=r.body.statements;l<p.length;l++){var f=p[l];n(f,!0)}}}}function r(t){e.isRequireCall(t,!0)?(i||(i=[])).push(t.arguments[0]):e.forEachChild(t,r)}if(!t.imports){for(var i,a,o=e.isSourceFileJavaScript(t),s=e.isExternalModule(t),u=0,c=t.statements;u<c.length;u++){var l=c[u];n(l,!1),o&&r(l)}t.imports=i||h,t.moduleAugmentations=a||h}}function O(t,n,r,o,s){var u,c;if(R(t))i.allowNonTsExtensions||e.forEach(ee,function(n){return e.fileExtensionIs(a.getCanonicalFileName(t),n)})?F(t,e.toPath(t,re,K),n,r,o,s)?r&&a.getCanonicalFileName(t)===a.getCanonicalFileName(r.fileName)&&(c=e.Diagnostics.A_file_cannot_have_a_reference_to_itself,u=[t]):(c=e.Diagnostics.File_0_not_found,u=[t]):(c=e.Diagnostics.File_0_has_unsupported_extension_The_only_supported_extensions_are_1,u=[t,\"'\"+ee.join(\"', '\")+\"'\"]);else{i.allowNonTsExtensions&&F(t,e.toPath(t,re,K),n,r,o,s)||(i.allowNonTsExtensions?(c=e.Diagnostics.File_0_not_found,u=[t]):e.forEach(ee,function(i){return F(t+i,e.toPath(t+i,re,K),n,r,o,s)})||(c=e.Diagnostics.File_0_not_found,t+=\".ts\",u=[t]))}c&&(void 0!==r&&void 0!==s&&void 0!==o?$.add(e.createFileDiagnostic.apply(void 0,[r,o,s-o,c].concat(u))):$.add(e.createCompilerDiagnostic.apply(void 0,[c].concat(u))))}function U(t,n,r,i,a){void 0!==r&&void 0!==i&&void 0!==a?$.add(e.createFileDiagnostic(r,i,a-i,e.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing,t,n)):$.add(e.createCompilerDiagnostic(e.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing,t,n))}function F(t,n,r,o,s,u){if(ae.contains(n)){var c=ae.get(n);return c&&i.forceConsistentCasingInFileNames&&e.getNormalizedAbsolutePath(c.fileName,re)!==e.getNormalizedAbsolutePath(t,re)&&U(t,c.fileName,o,s,u),c}var l=a.getSourceFile(t,i.target,function(n){void 0!==o&&void 0!==s&&void 0!==u?$.add(e.createFileDiagnostic(o,s,u-s,e.Diagnostics.Cannot_read_file_0_Colon_1,t,n)):$.add(e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,n))});if(ae.set(n,l),l){if(l.path=n,a.useCaseSensitiveFileNames()){var p=oe.get(n);p?U(t,p.fileName,o,s,u):oe.set(n,l)}Z=Z||l.hasNoDefaultLib;var f=e.getDirectoryPath(t);i.noResolve||B(l,f),V(l,f),r?X.unshift(l):X.push(l)}return l}function B(t,r){e.forEach(t.referencedFiles,function(e){O(n(e.fileName,t.fileName),!1,t,e.pos,e.end)})}function K(e){return a.getCanonicalFileName(e)}function V(t,n){if(L(t),t.imports.length||t.moduleAugmentations.length){t.resolvedModules={};for(var r=e.map(e.concatenate(t.imports,t.moduleAugmentations),P),a=ie(r,e.getNormalizedAbsolutePath(t.fileName,re)),o=0;o<r.length;o++){var s=a[o];e.setResolvedModule(t,r[o],s);if(s&&!i.noResolve&&o<t.imports.length){var u=F(s.resolvedFileName,e.toPath(s.resolvedFileName,re,K),!1,t,e.skipTrivia(t.text,t.imports[o].pos),t.imports[o].end);if(u&&s.isExternalLibraryImport)if(!e.isExternalModule(u)&&u.statements.length){var c=e.getTokenPosOfNode(t.imports[o],t);$.add(e.createFileDiagnostic(t,c,t.imports[o].end-c,e.Diagnostics.Exported_external_package_typings_file_0_is_not_a_module_Please_contact_the_package_author_to_update_the_package_definition,u.fileName))}else if(u.referencedFiles.length){var l=u.referencedFiles[0];$.add(e.createFileDiagnostic(u,l.pos,l.end-l.pos,e.Diagnostics.Exported_external_package_typings_file_cannot_contain_tripleslash_references_Please_contact_the_package_author_to_update_the_package_definition))}}}}else t.resolvedModules=void 0}function j(t){var n;return e.forEach(X,function(t){if(!e.isDeclarationFile(t)){var r=e.getNormalizedPathComponents(t.fileName,re);if(r.pop(),!n)return void(n=r);for(var i=0,a=Math.min(n.length,r.length);i<a;i++)if(K(n[i])!==K(r[i])){if(0===i)return!0;n.length=i;break}r.length<n.length&&(n.length=r.length)}})?\"\":n?e.getNormalizedPathFromPathComponents(n):re}function W(t,n){var r=!0;if(t)for(var o=a.getCanonicalFileName(e.getNormalizedAbsolutePath(n,re)),s=0,u=t;s<u.length;s++){var c=u[s];if(!e.isDeclarationFile(c)){var l=a.getCanonicalFileName(e.getNormalizedAbsolutePath(c.fileName,re));0!==l.indexOf(o)&&(Q.add(e.createCompilerDiagnostic(e.Diagnostics.File_0_is_not_under_rootDir_1_rootDir_is_expected_to_contain_all_source_files,c.fileName,i.rootDir)),r=!1)}}return r}function q(t,n,r){ne.set(e.toPath(t,re,K),!0),Q.add(e.createCompilerDiagnostic(r,t))}var z,H,Y,J,G,X=[],$=e.createDiagnosticCollection(),Q=e.createDiagnosticCollection(),Z=i.noLib,ee=e.getSupportedExtensions(i),te=(new Date).getTime();a=a||p(i);var ne=e.createFileMap(K),re=a.getCurrentDirectory(),ie=a.resolveModuleNames?function(e,t){return a.resolveModuleNames(e,t)}:function(t,n){for(var o=[],s={},u=0,c=t;u<c.length;u++){var l=c[u],p=void 0;e.hasProperty(s,l)?p=s[l]:(p=r(l,n,i,a).resolvedModule,s[l]=p),o.push(p)}return o},ae=e.createFileMap(),oe=a.useCaseSensitiveFileNames()?e.createFileMap(function(e){return e.toLowerCase()}):void 0;if(o){var se=o.getCompilerOptions();se.module===i.module&&se.noResolve===i.noResolve&&se.target===i.target&&se.noLib===i.noLib&&se.jsx===i.jsx&&se.allowJs===i.allowJs||(o=void 0)}return function(){if(!o)return!1;e.Debug.assert(!o.structureIsReused);var n=o.getRootFileNames();if(!e.arrayIsEqualTo(n,t))return!1;for(var r=[],s=[],u=[],c=0,l=o.getSourceFiles();c<l.length;c++){var p=l[c],f=a.getSourceFile(p.fileName,i.target);if(!f)return!1;if(f.path=p.path,s.push(f.path),p!==f){if(p.hasNoDefaultLib!==f.hasNoDefaultLib)return!1;if(!e.arrayIsEqualTo(p.referencedFiles,f.referencedFiles,D))return!1;if(L(f),!e.arrayIsEqualTo(p.imports,f.imports,M))return!1;if(!e.arrayIsEqualTo(p.moduleAugmentations,f.moduleAugmentations,M))return!1;if(ie)for(var d=e.map(e.concatenate(f.imports,f.moduleAugmentations),P),m=ie(d,e.getNormalizedAbsolutePath(f.fileName,re)),h=0;h<d.length;h++){var y=m[h],_=e.getResolvedModule(p,d[h]),g=_?!y||_.resolvedFileName!==y.resolvedFileName||!!_.isExternalLibraryImport!=!!y.isExternalLibraryImport:y;if(g)return!1}f.resolvedModules=p.resolvedModules,u.push(f)}else f=p;r.push(f)}for(var h=0,v=r.length;h<v;h++)ae.set(s[h],r[h]);X=r,$=o.getFileProcessingDiagnostics();for(var b=0,S=u;b<S.length;b++){var A=S[b];$.reattachFileDiagnostics(A)}return o.structureIsReused=!0,!0}()||(e.forEach(t,function(e){return I(e,!1)}),Z||I(a.getDefaultLibFileName(i),!0)),o=void 0,z={getRootFileNames:function(){return t},getSourceFile:_,getSourceFiles:function(){return X},getCompilerOptions:function(){return i},getSyntacticDiagnostics:v,getOptionsDiagnostics:k,getGlobalDiagnostics:x,getSemanticDiagnostics:b,getDeclarationDiagnostics:S,getTypeChecker:f,getClassifiableNames:u,getDiagnosticsProducingTypeChecker:l,getCommonSourceDirectory:s,emit:d,getCurrentDirectory:function(){return re},getNodeCount:function(){return l().getNodeCount()},getIdentifierCount:function(){return l().getIdentifierCount()},getSymbolCount:function(){return l().getSymbolCount()},getTypeCount:function(){return l().getTypeCount()},getFileProcessingDiagnostics:function(){return $}},function(){function t(t,n){if(t){var r=e.toPath(t,re,K);ae.contains(r)&&q(t,r,e.Diagnostics.Cannot_write_file_0_because_it_would_overwrite_input_file),n.contains(r)?q(t,r,e.Diagnostics.Cannot_write_file_0_because_it_would_be_overwritten_by_multiple_input_files):n.set(r,!0)}}i.isolatedModules&&(i.declaration&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"declaration\",\"isolatedModules\")),i.noEmitOnError&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"noEmitOnError\",\"isolatedModules\")),i.out&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"out\",\"isolatedModules\")),i.outFile&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"outFile\",\"isolatedModules\"))),i.inlineSourceMap&&(i.sourceMap&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"sourceMap\",\"inlineSourceMap\")),i.mapRoot&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"mapRoot\",\"inlineSourceMap\"))),i.inlineSources&&(i.sourceMap||i.inlineSourceMap||Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_inlineSources_can_only_be_used_when_either_option_inlineSourceMap_or_option_sourceMap_is_provided)),i.sourceRoot&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"sourceRoot\",\"inlineSources\"))),i.out&&i.outFile&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"out\",\"outFile\")),i.sourceMap||!i.mapRoot&&!i.sourceRoot||(i.mapRoot&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,\"mapRoot\",\"sourceMap\")),i.sourceRoot&&!i.inlineSourceMap&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,\"sourceRoot\",\"sourceMap\")));var n=i.target||0,r=i.outFile||i.out,o=e.forEach(X,function(t){return e.isExternalModule(t)?t:void 0});if(i.isolatedModules){0===i.module&&n<2&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_isolatedModules_can_only_be_used_when_either_option_module_is_provided_or_option_target_is_ES2015_or_higher));var u=e.forEach(X,function(t){return e.isExternalModule(t)||e.isDeclarationFile(t)?void 0:t});if(u){var l=e.getErrorSpanForNode(u,u);Q.add(e.createFileDiagnostic(u,l.start,l.length,e.Diagnostics.Cannot_compile_namespaces_when_the_isolatedModules_flag_is_provided))}}else if(o&&n<2&&0===i.module){var l=e.getErrorSpanForNode(o,o.externalModuleIndicator);Q.add(e.createFileDiagnostic(o,l.start,l.length,e.Diagnostics.Cannot_compile_modules_unless_the_module_flag_is_provided_with_a_valid_module_type_Consider_setting_the_module_compiler_option_in_a_tsconfig_json_file))}if(5===i.module&&n<2&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Cannot_compile_modules_into_es2015_when_targeting_ES5_or_lower)),r&&i.module&&2!==i.module&&4!==i.module&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Only_amd_and_system_modules_are_supported_alongside_0,i.out?\"out\":\"outFile\")),i.outDir||i.sourceRoot||i.mapRoot){var p=s();i.outDir&&\"\"===p&&e.forEach(X,function(t){return e.getRootLength(t.fileName)>1})&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Cannot_find_the_common_subdirectory_path_for_the_input_files))}if(i.noEmit?(i.out&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"noEmit\",\"out\")),i.outFile&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"noEmit\",\"outFile\")),i.outDir&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"noEmit\",\"outDir\")),i.declaration&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"noEmit\",\"declaration\"))):i.allowJs&&i.declaration&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_with_option_1,\"allowJs\",\"declaration\")),i.emitDecoratorMetadata&&!i.experimentalDecorators&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1,\"emitDecoratorMetadata\",\"experimentalDecorators\")),i.reactNamespace&&!e.isIdentifier(i.reactNamespace,n)&&Q.add(e.createCompilerDiagnostic(e.Diagnostics.Invalide_value_for_reactNamespace_0_is_not_a_valid_identifier,i.reactNamespace)),!i.noEmit&&!i.suppressOutputPathCheck){var f=c(),d=e.createFileMap(a.useCaseSensitiveFileNames()?void 0:function(e){return e.toLocaleLowerCase()});e.forEachExpectedEmitFile(f,function(e,n,r){t(e.jsFilePath,d),t(e.declarationFilePath,d)})}}(),e.programTime+=(new Date).getTime()-te,z}e.programTime=0,e.emitTime=0,e.ioReadTime=0,e.ioWriteTime=0;var h=[];e.version=\"1.8.7\",e.findConfigFile=t,e.resolveTripleslashReference=n,e.resolveModuleName=r,e.nodeModuleNameResolver=i,e.directoryProbablyExists=a,e.classicNameResolver=l,e.defaultInitCompilerOptions={module:1,target:1,noImplicitAny:!1,sourceMap:!1},e.createCompilerHost=p,e.getPreEmitDiagnostics=f,e.flattenDiagnosticMessageText=d,e.createProgram=m}(o||(o={}));var o;!function(e){function t(){if(u)return u;var t={},n={};return e.forEach(e.optionDeclarations,function(e){t[e.name.toLowerCase()]=e,e.shortName&&(n[e.shortName]=e.name)}),u={optionNameMap:t,shortOptionNames:n}}function n(n,r){function i(t){for(var n=0;n<t.length;){var r=t[n];if(n++,64===r.charCodeAt(0))a(r.slice(1));else if(45===r.charCodeAt(0))if(r=r.slice(45===r.charCodeAt(1)?2:1).toLowerCase(),e.hasProperty(p,r)&&(r=p[r]),e.hasProperty(l,r)){var i=l[r];switch(t[n]||\"boolean\"===i.type||u.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_expects_an_argument,i.name)),i.type){case\"number\":o[i.name]=parseInt(t[n]),n++;break;case\"boolean\":o[i.name]=!0;break;case\"string\":o[i.name]=t[n]||\"\",n++;break;default:var c=i.type,f=(t[n]||\"\").toLowerCase();n++,e.hasProperty(c,f)?o[i.name]=c[f]:u.push(e.createCompilerDiagnostic(i.error))}}else u.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_compiler_option_0,r));else s.push(r)}}function a(t){var n=r?r(t):e.sys.readFile(t);if(!n)return void u.push(e.createCompilerDiagnostic(e.Diagnostics.File_0_not_found,t));for(var a=[],o=0;;){for(;o<n.length&&n.charCodeAt(o)<=32;)o++;if(o>=n.length)break;var s=o;if(34===n.charCodeAt(s)){for(o++;o<n.length&&34!==n.charCodeAt(o);)o++;o<n.length?(a.push(n.substring(s+1,o)),o++):u.push(e.createCompilerDiagnostic(e.Diagnostics.Unterminated_quoted_string_in_response_file_0,t))}else{for(;n.charCodeAt(o)>32;)o++;a.push(n.substring(s,o))}}i(a)}var o={},s=[],u=[],c=t(),l=c.optionNameMap,p=c.shortOptionNames;return i(n),{options:o,fileNames:s,errors:u}}function r(t,n){var r=\"\";try{r=n(t)}catch(n){return{error:e.createCompilerDiagnostic(e.Diagnostics.Cannot_read_file_0_Colon_1,t,n.message)}}return i(t,r)}function i(t,n){try{var r=a(n);return{config:/\\S/.test(r)?JSON.parse(r):{}}}catch(n){return{error:e.createCompilerDiagnostic(e.Diagnostics.Failed_to_parse_file_0_Colon_1,t,n.message)}}}function a(t){for(var n,r=\"\",i=e.createScanner(1,!1,0,t);1!==(n=i.scan());)switch(n){case 2:case 3:r+=i.getTokenText().replace(/\\S/g,\" \");break;default:r+=i.getTokenText()}return r}function o(t,n,r,i,a){void 0===i&&(i={});var o=s(t.compilerOptions,r,a),u=o.options,c=o.errors,l=e.extend(i,u);return{options:l,fileNames:function(){var i=[];if(e.hasProperty(t,\"files\"))t.files instanceof Array?i=e.map(t.files,function(t){return e.combinePaths(r,t)}):c.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,\"files\",\"Array\"));else{var a={},o=[];if(t.exclude instanceof Array)o=t.exclude;else{o=[\"node_modules\"];var s=t.compilerOptions&&t.compilerOptions.outDir;s&&o.push(s)}o=e.map(o,e.normalizeSlashes);var u=e.getSupportedExtensions(l);e.Debug.assert(e.indexOf(u,\".ts\")<e.indexOf(u,\".d.ts\"),\"Changed priority of extensions to pick\");for(var p=0,f=u;p<f.length;p++)for(var d=f[p],m=n.readDirectory(r,d,o),h=0,y=m;h<y.length;h++){var _=y[h];if((\".ts\"!==d||!e.fileExtensionIs(_,\".d.ts\"))&&!/\\.min\\.js$/.test(_)){if(\".d.ts\"===d||l.allowJs&&e.contains(e.supportedJavascriptExtensions,d)){var g=_.substr(0,_.length-d.length);if(e.hasProperty(a,g+\".ts\")||e.hasProperty(a,g+\".tsx\"))continue}a[_]=!0,i.push(_)}}}return i}(),errors:c}}function s(t,n,r){var i={},a=[];if(r&&\"jsconfig.json\"===e.getBaseFileName(r)&&(i.allowJs=!0),!t)return{options:i,errors:a};var o=e.arrayToMap(e.optionDeclarations,function(e){return e.name});for(var s in t)if(e.hasProperty(o,s)){var u=o[s],c=u.type,l=t[s],p=\"string\"==typeof c?c:\"string\";if(typeof l===p){if(\"string\"!=typeof c){var f=l.toLowerCase();e.hasProperty(c,f)?l=c[f]:(a.push(e.createCompilerDiagnostic(u.error)),l=0)}u.isFilePath&&\"\"===(l=e.normalizePath(e.combinePaths(n,l)))&&(l=\".\"),i[u.name]=l}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Compiler_option_0_requires_a_value_of_type_1,s,p))}else a.push(e.createCompilerDiagnostic(e.Diagnostics.Unknown_compiler_option_0,s));return{options:i,errors:a}}e.optionDeclarations=[{name:\"charset\",type:\"string\"},{name:\"declaration\",shortName:\"d\",type:\"boolean\",description:e.Diagnostics.Generates_corresponding_d_ts_file},{name:\"diagnostics\",type:\"boolean\"},{name:\"emitBOM\",type:\"boolean\"},{name:\"help\",shortName:\"h\",type:\"boolean\",description:e.Diagnostics.Print_this_message},{name:\"init\",type:\"boolean\",description:e.Diagnostics.Initializes_a_TypeScript_project_and_creates_a_tsconfig_json_file},{name:\"inlineSourceMap\",type:\"boolean\"},{name:\"inlineSources\",type:\"boolean\"},{name:\"jsx\",type:{preserve:1,react:2},paramType:e.Diagnostics.KIND,description:e.Diagnostics.Specify_JSX_code_generation_Colon_preserve_or_react,error:e.Diagnostics.Argument_for_jsx_must_be_preserve_or_react},{name:\"reactNamespace\",type:\"string\",description:e.Diagnostics.Specifies_the_object_invoked_for_createElement_and_spread_when_targeting_react_JSX_emit},{name:\"listFiles\",type:\"boolean\"},{name:\"locale\",type:\"string\"},{name:\"mapRoot\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Specifies_the_location_where_debugger_should_locate_map_files_instead_of_generated_locations,paramType:e.Diagnostics.LOCATION},{name:\"module\",shortName:\"m\",type:{none:0,commonjs:1,amd:2,system:4,umd:3,es6:5,es2015:5},description:e.Diagnostics.Specify_module_code_generation_Colon_commonjs_amd_system_umd_or_es2015,paramType:e.Diagnostics.KIND,error:e.Diagnostics.Argument_for_module_option_must_be_commonjs_amd_system_umd_es2015_or_none},{name:\"newLine\",type:{crlf:0,lf:1},description:e.Diagnostics.Specifies_the_end_of_line_sequence_to_be_used_when_emitting_files_Colon_CRLF_dos_or_LF_unix,paramType:e.Diagnostics.NEWLINE,error:e.Diagnostics.Argument_for_newLine_option_must_be_CRLF_or_LF},{name:\"noEmit\",type:\"boolean\",description:e.Diagnostics.Do_not_emit_outputs},{name:\"noEmitHelpers\",type:\"boolean\"},{name:\"noEmitOnError\",type:\"boolean\",description:e.Diagnostics.Do_not_emit_outputs_if_any_errors_were_reported},{name:\"noImplicitAny\",type:\"boolean\",description:e.Diagnostics.Raise_error_on_expressions_and_declarations_with_an_implied_any_type},{name:\"noLib\",type:\"boolean\"},{name:\"noResolve\",type:\"boolean\"},{name:\"skipDefaultLibCheck\",type:\"boolean\"},{name:\"out\",type:\"string\",isFilePath:!1,paramType:e.Diagnostics.FILE},{name:\"outFile\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Concatenate_and_emit_output_to_single_file,paramType:e.Diagnostics.FILE},{name:\"outDir\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Redirect_output_structure_to_the_directory,paramType:e.Diagnostics.DIRECTORY},{name:\"preserveConstEnums\",type:\"boolean\",description:e.Diagnostics.Do_not_erase_const_enum_declarations_in_generated_code},{name:\"pretty\",paramType:e.Diagnostics.KIND,description:e.Diagnostics.Stylize_errors_and_messages_using_color_and_context_experimental,type:\"boolean\"},{name:\"project\",shortName:\"p\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Compile_the_project_in_the_given_directory,paramType:e.Diagnostics.DIRECTORY},{name:\"removeComments\",type:\"boolean\",description:e.Diagnostics.Do_not_emit_comments_to_output},{name:\"rootDir\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Specifies_the_root_directory_of_input_files_Use_to_control_the_output_directory_structure_with_outDir,paramType:e.Diagnostics.LOCATION},{name:\"isolatedModules\",type:\"boolean\"},{name:\"sourceMap\",type:\"boolean\",description:e.Diagnostics.Generates_corresponding_map_file},{name:\"sourceRoot\",type:\"string\",isFilePath:!0,description:e.Diagnostics.Specifies_the_location_where_debugger_should_locate_TypeScript_files_instead_of_source_locations,paramType:e.Diagnostics.LOCATION},{name:\"suppressExcessPropertyErrors\",type:\"boolean\",description:e.Diagnostics.Suppress_excess_property_checks_for_object_literals,experimental:!0},{name:\"suppressImplicitAnyIndexErrors\",type:\"boolean\",description:e.Diagnostics.Suppress_noImplicitAny_errors_for_indexing_objects_lacking_index_signatures},{name:\"stripInternal\",type:\"boolean\",description:e.Diagnostics.Do_not_emit_declarations_for_code_that_has_an_internal_annotation,experimental:!0},{name:\"target\",shortName:\"t\",type:{es3:0,es5:1,es6:2,es2015:2},description:e.Diagnostics.Specify_ECMAScript_target_version_Colon_ES3_default_ES5_or_ES2015_experimental,paramType:e.Diagnostics.VERSION,error:e.Diagnostics.Argument_for_target_option_must_be_ES3_ES5_or_ES2015},{name:\"version\",shortName:\"v\",type:\"boolean\",description:e.Diagnostics.Print_the_compiler_s_version},{name:\"watch\",shortName:\"w\",type:\"boolean\",description:e.Diagnostics.Watch_input_files},{name:\"experimentalDecorators\",type:\"boolean\",description:e.Diagnostics.Enables_experimental_support_for_ES7_decorators},{name:\"emitDecoratorMetadata\",type:\"boolean\",experimental:!0,description:e.Diagnostics.Enables_experimental_support_for_emitting_type_metadata_for_decorators},{name:\"moduleResolution\",type:{node:2,classic:1},description:e.Diagnostics.Specifies_module_resolution_strategy_Colon_node_Node_js_or_classic_TypeScript_pre_1_6,error:e.Diagnostics.Argument_for_moduleResolution_option_must_be_node_or_classic},{name:\"allowUnusedLabels\",type:\"boolean\",description:e.Diagnostics.Do_not_report_errors_on_unused_labels},{name:\"noImplicitReturns\",type:\"boolean\",description:e.Diagnostics.Report_error_when_not_all_code_paths_in_function_return_a_value},{name:\"noFallthroughCasesInSwitch\",type:\"boolean\",description:e.Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement},{name:\"allowUnreachableCode\",type:\"boolean\",description:e.Diagnostics.Do_not_report_errors_on_unreachable_code},{name:\"forceConsistentCasingInFileNames\",type:\"boolean\",description:e.Diagnostics.Disallow_inconsistently_cased_references_to_the_same_file},{name:\"allowSyntheticDefaultImports\",type:\"boolean\",description:e.Diagnostics.Allow_default_imports_from_modules_with_no_default_export_This_does_not_affect_code_emit_just_typechecking},{name:\"allowJs\",type:\"boolean\",description:e.Diagnostics.Allow_javascript_files_to_be_compiled},{name:\"noImplicitUseStrict\",type:\"boolean\",description:e.Diagnostics.Do_not_emit_use_strict_directives_in_module_output},{name:\"noCustomAsyncPromise\",type:\"boolean\",experimental:!0}];var u;e.getOptionNameMap=t,e.parseCommandLine=n,e.readConfigFile=r,e.parseConfigFileTextToJson=i,e.parseJsonConfigFileContent=o,e.convertCompilerOptionsFromJson=s}(o||(o={}));var o;!function(e){!function(t){function n(t){function n(t,n,r,i){if(t&&n&&r){var a={textSpan:e.createTextSpanFromBounds(n.pos,r.end),hintSpan:e.createTextSpanFromBounds(t.getStart(),t.end),bannerText:c,autoCollapse:i};u.push(a)}}function r(t,n){if(t){var r={textSpan:e.createTextSpanFromBounds(t.pos,t.end),hintSpan:e.createTextSpanFromBounds(t.pos,t.end),bannerText:c,autoCollapse:n};u.push(r)}}function i(n){var i=e.getLeadingCommentRangesOfNode(n,t);if(i){for(var o=-1,s=-1,u=!0,c=0,l=0,p=i;l<p.length;l++){var f=p[l];2===f.kind?(u&&(o=f.pos),u=!1,s=f.end,c++):3===f.kind&&(a(c,o,s),r(f,!1),c=0,s=-1,u=!0)}a(c,o,s)}}function a(e,t,n){if(e>1){r({pos:t,end:n,kind:2},!1)}}function o(t){return e.isFunctionBlock(t)&&177!==t.parent.kind}function s(r){if(!(l>p)){switch(e.isDeclaration(r)&&i(r),r.kind){case 195:if(!e.isFunctionBlock(r)){var a=r.parent,f=e.findChildOfKind(r,15,t),d=e.findChildOfKind(r,16,t);if(200===a.kind||203===a.kind||204===a.kind||202===a.kind||199===a.kind||201===a.kind||208===a.kind||247===a.kind){n(a,f,d,o(r));break}if(212===a.kind){var m=a;if(m.tryBlock===r){n(a,f,d,o(r));break}if(m.finallyBlock===r){var h=e.findChildOfKind(m,85,t);if(h){n(h,f,d,o(r));break}}}var y=e.createTextSpanFromBounds(r.getStart(),r.end);u.push({textSpan:y,hintSpan:y,bannerText:c,autoCollapse:o(r)});break}case 222:var f=e.findChildOfKind(r,15,t),d=e.findChildOfKind(r,16,t);n(r.parent,f,d,o(r));break;case 217:case 218:case 220:case 168:case 223:var f=e.findChildOfKind(r,15,t),d=e.findChildOfKind(r,16,t);n(r,f,d,o(r));break;case 167:n(r,e.findChildOfKind(r,19,t),e.findChildOfKind(r,20,t),o(r))}l++,e.forEachChild(r,s),l--}}var u=[],c=\"...\",l=0,p=20;return s(t),u}t.collectElements=n}(e.OutliningElementsCollector||(e.OutliningElementsCollector={}))}(o||(o={}));var o;!function(e){!function(t){function n(t,n,r,i){function a(t){e.Debug.assert(t.length>0);for(var n=0,r=t;n<r.length;n++){if(!r[n].isCaseSensitive)return!1}return!0}function o(e){if(e&&(69===e.kind||9===e.kind||8===e.kind))return e.text}function s(e,t){if(e&&e.name){var n=o(e.name);if(void 0===n)return 137===e.name.kind&&u(e.name.expression,t,!0);t.unshift(n)}return!0}function u(e,t,n){var r=o(e);if(void 0!==r)return n&&t.unshift(r),!0;if(169===e.kind){var i=e;return n&&t.unshift(i.name.text),u(i.expression,t,!0)}return!1}function c(t){var n=[];if(137!==t.name.kind||u(t.name.expression,n,!1)){for(t=e.getContainerNode(t);t;){if(!s(t,n))return;t=e.getContainerNode(t)}return n}}function l(t){e.Debug.assert(t.length>0);for(var n=e.PatternMatchKind.camelCase,r=0,i=t;r<i.length;r++){var a=i[r],o=a.kind;o<n&&(n=o)}return n}function p(e,t){return e.matchKind-t.matchKind||e.name.localeCompare(t.name,void 0,h)||e.name.localeCompare(t.name)}function f(t){var n=t.declaration,r=e.getContainerNode(n);return{name:t.name,kind:e.getNodeKind(n),kindModifiers:e.getNodeModifiers(n),matchKind:e.PatternMatchKind[t.matchKind],isCaseSensitive:t.isCaseSensitive,fileName:t.fileName,textSpan:e.createTextSpanFromBounds(n.getStart(),n.getEnd()),containerName:r&&r.name?r.name.text:\"\",containerKind:r&&r.name?e.getNodeKind(r):\"\"}}var d=e.createPatternMatcher(r),m=[],h={sensitivity:\"base\"};return e.forEach(t.getSourceFiles(),function(t){n.throwIfCancellationRequested();var r=t.getNamedDeclarations();for(var i in r){var o=e.getProperty(r,i);if(o){var s=d.getMatchesForLastSegmentOfPattern(i);if(!s)continue;for(var u=0,p=o;u<p.length;u++){var f=p[u];if(d.patternContainsDots){var h=c(f);if(!h)return;if(!(s=d.getMatches(h,i)))continue}var y=t.fileName,_=l(s);m.push({name:i,fileName:y,matchKind:_,isCaseSensitive:a(s),declaration:f})}}}}),m.sort(p),void 0!==i&&(m=m.slice(0,i)),e.map(m,f)}t.getNavigateToItems=n}(e.NavigateTo||(e.NavigateTo={}))}(o||(o={}));var o;!function(e){!function(t){function n(t,n){function r(e){for(var t=v?1:0,n=e.parent;n;){switch(n.kind){case 221:do{n=n.parent}while(221===n.kind);case 217:case 220:case 218:case 216:t++}n=n.parent}return t}function i(t){function n(t){switch(t.kind){case 196:e.forEach(t.declarationList.declarations,n);break;case 164:case 165:e.forEach(t.elements,n);break;case 231:t.exportClause&&e.forEach(t.exportClause.elements,n);break;case 225:var i=t.importClause;i&&(i.name&&r.push(i),i.namedBindings&&(227===i.namedBindings.kind?r.push(i.namedBindings):e.forEach(i.namedBindings.elements,n)));break;case 166:case 214:if(e.isBindingPattern(t.name)){n(t.name);break}case 217:case 220:case 218:case 221:case 216:case 224:case 229:case 233:r.push(t)}}var r=[];return e.forEach(t,n),a(r)}function a(t){return t.slice(0).sort(function(t,n){return t.name&&n.name?e.getPropertyNameForPropertyNameNode(t.name).localeCompare(e.getPropertyNameForPropertyNameNode(n.name)):t.name?1:n.name?-1:t.kind-n.kind})}function o(e,t){e=a(e);for(var n=0,r=e;n<r.length;n++){var i=r[n];switch(i.kind){case 217:case 220:case 218:t.push(i);break;case 221:var u=i;t.push(i),o(y(u).body.statements,t);break;case 216:var c=i;s(c)&&(t.push(i),o(c.body.statements,t))}}}function s(t){if(216===t.kind&&t.body&&195===t.body.kind){if(e.forEach(t.body.statements,function(e){return 216===e.kind&&!p(e.name.text)}))return!0;if(!e.isFunctionBlock(t.parent))return!0}return!1}function u(e,t){for(var n=[],r={},i=0,a=e;i<a.length;i++){var o=a[i],s=t(o);if(void 0!==s&&s.text.length>0){var u=s.text+\"-\"+s.kind+\"-\"+s.indent,l=r[u];l?c(l,s):(r[u]=s,n.push(s))}}return n}function c(t,n){if(e.addRange(t.spans,n.spans),n.childItems){t.childItems||(t.childItems=[]);e:for(var r=0,i=n.childItems;r<i.length;r++){for(var a=i[r],o=0,s=t.childItems;o<s.length;o++){var u=s[o];if(u.text===a.text&&u.kind===a.kind){c(u,a);continue e}}t.childItems.push(a)}}}function l(t){function n(t,n,r){return f(n,r,e.getNodeModifiers(t),[_(t)])}switch(t.kind){case 139:if(e.isBindingPattern(t.name))break;if(0==(1022&t.flags))return;return n(t,g(t.name),e.ScriptElementKind.memberVariableElement);case 144:case 143:return n(t,g(t.name),e.ScriptElementKind.memberFunctionElement);case 146:return n(t,g(t.name),e.ScriptElementKind.memberGetAccessorElement);case 147:return n(t,g(t.name),e.ScriptElementKind.memberSetAccessorElement);case 150:return n(t,\"[]\",e.ScriptElementKind.indexSignatureElement);case 250:return n(t,g(t.name),e.ScriptElementKind.memberVariableElement);case 148:return n(t,\"()\",e.ScriptElementKind.callSignatureElement);case 149:return n(t,\"new()\",e.ScriptElementKind.constructSignatureElement);case 142:case 141:return n(t,g(t.name),e.ScriptElementKind.memberVariableElement);case 216:return n(t,g(t.name),e.ScriptElementKind.functionElement);case 214:case 166:var r,i=void 0;if(166===t.kind){for(r=t.name,i=t;i&&214!==i.kind;)i=i.parent;e.Debug.assert(void 0!==i)}else e.Debug.assert(!e.isBindingPattern(t.name)),i=t,r=t.name;return e.isConst(i)?n(t,g(r),e.ScriptElementKind.constElement):e.isLet(i)?n(t,g(r),e.ScriptElementKind.letElement):n(t,g(r),e.ScriptElementKind.variableElement);case 145:return n(t,\"constructor\",e.ScriptElementKind.constructorImplementationElement);case 233:case 229:case 224:case 226:case 227:return n(t,g(t.name),e.ScriptElementKind.alias)}}function p(e){return!e||\"\"===e.trim()}function f(e,t,n,r,i,a){if(void 0===i&&(i=[]),void 0===a&&(a=0),!p(e))return{text:e,kind:t,kindModifiers:n,spans:r,childItems:i,indent:a,bolded:!1,grayed:!1}}function d(t){function n(t){if(e.isAmbientModule(t))return g(t.name);var n=[];for(n.push(t.name.text);t.body&&221===t.body.kind;)t=t.body,n.push(t.name.text);return n.join(\".\")}switch(t.kind){case 251:return function(t){var n=u(i(t.statements),l);if(void 0!==n&&0!==n.length){v=!0;return f(e.isExternalModule(t)?'\"'+e.escapeString(e.getBaseFileName(e.removeFileExtension(e.normalizePath(t.fileName))))+'\"':\"<global>\",e.ScriptElementKind.moduleElement,e.ScriptElementKindModifier.none,[_(t)],n)}}(t);case 217:return function(t){var n;if(t.members){var i=e.forEach(t.members,function(e){return 145===e.kind&&e}),o=h(t);i&&e.addRange(o,e.filter(i.parameters,function(t){return!e.isBindingPattern(t.name)})),n=u(a(o),l)}return f(t.name?t.name.text:\"default\",e.ScriptElementKind.classElement,e.getNodeModifiers(t),[_(t)],n,r(t))}(t);case 220:return function(t){var n=u(a(m(t)),l);return f(t.name.text,e.ScriptElementKind.enumElement,e.getNodeModifiers(t),[_(t)],n,r(t))}(t);case 218:return function(t){var n=u(a(h(t)),l);return f(t.name.text,e.ScriptElementKind.interfaceElement,e.getNodeModifiers(t),[_(t)],n,r(t))}(t);case 221:return function(t){var a=n(t),o=u(i(y(t).body.statements),l);return f(a,e.ScriptElementKind.moduleElement,e.getNodeModifiers(t),[_(t)],o,r(t))}(t);case 216:return function(t){if(t.body&&195===t.body.kind){var n=u(a(t.body.statements),l);return f(t.name?t.name.text:\"default\",e.ScriptElementKind.functionElement,e.getNodeModifiers(t),[_(t)],n,r(t))}}(t)}}function m(t){return e.filter(t.members,function(e){return void 0===e.name||137!==e.name.kind})}function h(t){return e.filter(t.members,function(t){return!e.hasDynamicName(t)})}function y(e){for(;221===e.body.kind;)e=e.body;return e}function _(t){return 251===t.kind?e.createTextSpanFromBounds(t.getFullStart(),t.getEnd()):e.createTextSpanFromBounds(t.getStart(),t.getEnd())}function g(n){return e.getTextOfNodeFromSourceText(t.text,n)}var v=!1;return u(function(e){var t=[];return t.push(e),o(e.statements,t),t}(t),d)}t.getNavigationBarItems=n}(e.NavigationBar||(e.NavigationBar={}))}(o||(o={}));var o;!function(e){function t(e,t,n,r){return{kind:e,punctuationStripped:t,isCaseSensitive:n,camelCaseWeight:r}}function n(n){function o(e){return S||!e}function c(t){if(!o(t))return h(t,e.lastOrUndefined(b))}function p(t,n){if(!o(n)){var r=h(n,e.lastOrUndefined(b));if(r&&(t=t||[],!(b.length-1>t.length))){for(var i=r,a=b.length-2,s=t.length-1;a>=0;a-=1,s-=1){var u=b[a],c=t[s],l=h(c,u);if(!l)return;e.addRange(i,l)}return i}}}function f(t){return e.hasProperty(v,t)||(v[t]=y(t)),v[t]}function d(e,n,r){var i=u(e,n.textLowerCase);if(0===i)return n.text.length===e.length?t(A.exact,r,e===n.text):t(A.prefix,r,s(e,n.text));var o=n.isLowerCase;if(o){if(i>0)for(var c=f(e),l=0,p=c;l<p.length;l++){var d=p[l];if(_(e,d,n.text,!0))return t(A.substring,r,_(e,d,n.text,!1))}}else if(e.indexOf(n.text)>0)return t(A.substring,r,!0);if(!o&&n.characterSpans.length>0){var m=f(e),h=g(e,m,n,!1);if(void 0!==h)return t(A.camelCase,r,!0,h);if(void 0!==(h=g(e,m,n,!0)))return t(A.camelCase,r,!1,h)}return o&&n.text.length<e.length&&i>0&&a(e.charCodeAt(i))?t(A.substring,r,!1):void 0}function m(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(32===n||42===n)return!0}return!1}function h(e,t){if(!m(t.totalTextChunk.text)){var n=d(e,t.totalTextChunk,!1);if(n)return[n]}for(var r=t.subWordTextChunks,i=void 0,a=0,o=r;a<o.length;a++){var s=o[a],u=d(e,s,!0);if(!u)return;i=i||[],i.push(u)}return i}function _(e,t,n,r,i){var a=i?i.start:0,o=i?i.length:n.length;if(o>t.length)return!1;if(r)for(var s=0;s<o;s++){var u=n.charCodeAt(a+s),c=e.charCodeAt(t.start+s);if(l(u)!==l(c))return!1}else for(var s=0;s<o;s++){var u=n.charCodeAt(a+s),c=e.charCodeAt(t.start+s);if(u!==c)return!1}return!0}function g(t,n,r,i){for(var o=r.characterSpans,s=0,u=0,c=void 0,l=void 0;;){if(u===o.length){var p=0;return l&&(p+=1),0===c&&(p+=2),p}if(s===n.length)return;for(var f=n[s],d=!1;u<o.length;u++){var m=o[u];if(d&&(!a(r.text.charCodeAt(o[u-1].start))||!a(r.text.charCodeAt(o[u].start))))break;if(!_(t,f,r.text,i,m))break;d=!0,c=void 0===c?s:c,l=void 0===l||l,f=e.createTextSpan(f.start+m.length,f.length-m.length)}d||void 0===l||(l=!1),s++}}var v={};n=n.trim();var b=n.split(\".\").map(function(e){return r(e.trim())}),S=0===b.length||e.forEach(b,i);return{getMatches:p,getMatchesForLastSegmentOfPattern:c,patternContainsDots:b.length>1}}function r(e){return{totalTextChunk:m(e),subWordTextChunks:d(e)}}function i(e){return 0===e.subWordTextChunks.length}function a(t){if(t>=65&&t<=90)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,2))return!1;var n=String.fromCharCode(t);return n===n.toUpperCase()}function o(t){if(t>=97&&t<=122)return!0;if(t<127||!e.isUnicodeIdentifierStart(t,2))return!1;var n=String.fromCharCode(t);return n===n.toLowerCase()}function s(e,t){for(var n=0,r=t.length;n<r;n++)if(e.charCodeAt(n)!==t.charCodeAt(n))return!1;return!0}function u(e,t){for(var n=0,r=e.length-t.length;n<=r;n++)if(c(e,t,n))return n;return-1}function c(e,t,n){for(var r=0,i=t.length;r<i;r++){if(l(e.charCodeAt(r+n))!==t.charCodeAt(r))return!1}return!0}function l(e){return e>=65&&e<=90?e-65+97:e<127?e:String.fromCharCode(e).toLowerCase().charCodeAt(0)}function p(e){return e>=48&&e<=57}function f(e){return a(e)||o(e)||p(e)||95===e||36===e}function d(e){for(var t=[],n=0,r=0,i=0;i<e.length;i++){f(e.charCodeAt(i))?(0===r&&(n=i),r++):r>0&&(t.push(m(e.substr(n,r))),r=0)}return r>0&&t.push(m(e.substr(n,r))),t}function m(e){var t=e.toLowerCase();return{text:e,textLowerCase:t,isLowerCase:e===t,characterSpans:h(e)}}function h(e){return _(e,!1)}function y(e){return _(e,!0)}function _(t,n){for(var r=[],i=0,a=1,o=t.length;a<o;a++){var s=p(t.charCodeAt(a-1)),u=p(t.charCodeAt(a)),c=S(t,n,a),l=b(t,n,a,i);(g(t.charCodeAt(a-1))||g(t.charCodeAt(a))||s!==u||c||l)&&(v(t,i,a)||r.push(e.createTextSpan(i,a-i)),i=a)}return v(t,i,t.length)||r.push(e.createTextSpan(i,t.length-i)),r}function g(e){switch(e){case 33:case 34:case 35:case 37:case 38:case 39:case 40:case 41:case 42:case 44:case 45:case 46:case 47:case 58:case 59:case 63:case 64:case 91:case 92:case 93:case 95:case 123:case 125:return!0}return!1}function v(e,t,n){for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(!g(i)||95===i||36===i)return!1}return!0}function b(e,t,n,r){if(t&&n!==r&&n+1<e.length){var i=a(e.charCodeAt(n)),s=o(e.charCodeAt(n+1));if(i&&s){for(var u=r;u<n;u++)if(!a(e.charCodeAt(u)))return!1;return!0}}return!1}function S(e,t,n){var r=a(e.charCodeAt(n-1)),i=a(e.charCodeAt(n));return t?i&&!r:i}!function(e){e[e.exact=0]=\"exact\",e[e.prefix=1]=\"prefix\",e[e.substring=2]=\"substring\",e[e.camelCase=3]=\"camelCase\"}(e.PatternMatchKind||(e.PatternMatchKind={}));var A=e.PatternMatchKind;e.createPatternMatcher=n,e.breakIntoCharacterSpans=h,e.breakIntoWordSpans=y}(o||(o={}));var o;!function(e){!function(t){function n(t,n,r,a){function o(t){if(171===t.parent.kind||172===t.parent.kind){var i=t.parent;if(25===t.kind||17===t.kind){var a=d(i,t,n),o=i.typeArguments&&i.typeArguments.pos===a.pos;return e.Debug.assert(void 0!==a),{kind:o?0:1,invocation:i,argumentsSpan:p(a),argumentIndex:0,argumentCount:u(a)}}var f=e.findListItemInfo(t);if(f){var a=f.list,o=i.typeArguments&&i.typeArguments.pos===a.pos,m=s(a,t),h=u(a);return e.Debug.assert(0===m||m<h,\"argumentCount < argumentIndex, \"+h+\" < \"+m),{kind:o?0:1,invocation:i,argumentsSpan:p(a),argumentIndex:m,argumentCount:h}}}else if(11===t.kind&&173===t.parent.kind){if(e.isInsideTemplateLiteral(t,r))return l(t.parent,0)}else{if(12===t.kind&&173===t.parent.parent.kind){var y=t.parent,_=y.parent;e.Debug.assert(186===y.kind);var m=e.isInsideTemplateLiteral(t,r)?0:1;return l(_,m)}if(193===t.parent.kind&&173===t.parent.parent.parent.kind){var g=t.parent,y=g.parent,_=y.parent;if(e.Debug.assert(186===y.kind),14===t.kind&&!e.isInsideTemplateLiteral(t,r))return;var v=y.templateSpans.indexOf(g),m=c(v,t);return l(_,m)}}}function s(e,t){for(var n=0,r=e.getChildren(),i=0,a=r;i<a.length;i++){var o=a[i];if(o===t)break;24!==o.kind&&n++}return n}function u(t){var n=t.getChildren(),r=e.countWhere(n,function(e){return 24!==e.kind});return n.length>0&&24===e.lastOrUndefined(n).kind&&r++,r}function c(t,n){return e.Debug.assert(r>=n.getStart(),\"Assumed 'position' could not occur before node.\"),e.isTemplateLiteralKind(n.kind)?e.isInsideTemplateLiteral(n,r)?0:t+2:t+1}function l(t,n){var r=11===t.template.kind?1:t.template.templateSpans.length+1;return e.Debug.assert(0===n||n<r,\"argumentCount < argumentIndex, \"+r+\" < \"+n),{kind:2,invocation:t,argumentsSpan:f(t),argumentIndex:n,argumentCount:r}}function p(t){var r=t.getFullStart(),i=e.skipTrivia(n.text,t.getEnd(),!1);return e.createTextSpan(r,i-r)}function f(t){var r=t.template,i=r.getStart(),a=r.getEnd();if(186===r.kind){0===e.lastOrUndefined(r.templateSpans).literal.getFullWidth()&&(a=e.skipTrivia(n.text,a,!1))}return e.createTextSpan(i,a-i)}function d(t,n,r){var i=t.getChildren(r),a=i.indexOf(n);return e.Debug.assert(a>=0&&i.length>a+1),i[a+1]}function m(e,t){for(var n=-1,r=-1,i=0;i<e.length;i++){var a=e[i];if(a.hasRestParameter||a.parameters.length>=t)return i;a.parameters.length>r&&(r=a.parameters.length,n=i)}return n}function h(t,n,r){function a(t){var n=e.mapToDisplayParts(function(e){return y.getSymbolDisplayBuilder().buildParameterDisplay(t,e,c)});return{name:t.name,documentation:t.getDocumentationComment(),displayParts:n,isOptional:y.isOptionalParameter(t.valueDeclaration)}}function o(t){var n=e.mapToDisplayParts(function(e){return y.getSymbolDisplayBuilder().buildTypeParameterDisplay(t,e,c)});return{name:t.symbol.name,documentation:i,displayParts:n,isOptional:!1}}var s=r.argumentsSpan,u=0===r.kind,c=r.invocation,l=e.getInvokedExpression(c),p=y.getSymbolAtLocation(l),f=p&&e.symbolToDisplayParts(y,p,void 0,void 0),d=e.map(t,function(t){var n,r=[],s=[];if(f&&e.addRange(r,f),u){r.push(e.punctuationPart(25));var l=t.typeParameters;n=l&&l.length>0?e.map(l,o):i,s.push(e.punctuationPart(27));var p=e.mapToDisplayParts(function(e){return y.getSymbolDisplayBuilder().buildDisplayForParametersAndDelimiters(t.parameters,e,c)});e.addRange(s,p)}else{var d=e.mapToDisplayParts(function(e){return y.getSymbolDisplayBuilder().buildDisplayForTypeParametersAndDelimiters(t.typeParameters,e,c)});e.addRange(r,d),r.push(e.punctuationPart(17));var m=t.parameters;n=m.length>0?e.map(m,a):i,s.push(e.punctuationPart(18))}var h=e.mapToDisplayParts(function(e){return y.getSymbolDisplayBuilder().buildReturnTypeDisplay(t,e,c)});return e.addRange(s,h),{isVariadic:t.hasRestParameter,prefixDisplayParts:r,suffixDisplayParts:s,separatorDisplayParts:[e.punctuationPart(24),e.spacePart()],parameters:n,documentation:t.getDocumentationComment()}}),h=r.argumentIndex,_=r.argumentCount,g=t.indexOf(n);return g<0&&(g=m(t,_)),e.Debug.assert(0===h||h<_,\"argumentCount < argumentIndex, \"+_+\" < \"+h),{items:d,applicableSpan:s,selectedItemIndex:g,argumentIndex:h,argumentCount:_}}var y=t.getTypeChecker(),_=e.findTokenOnLeftOfPosition(n,r);if(_){var g=function(t){for(var n=t;251!==n.kind;n=n.parent){if(e.isFunctionBlock(n))return;(n.pos<n.parent.pos||n.end>n.parent.end)&&e.Debug.fail(\"Node of kind \"+n.kind+\" is not a subspan of its parent of kind \"+n.parent.kind);var r=o(n);if(r)return r}}(_);if(a.throwIfCancellationRequested(),g){var v=g.invocation,b=[],S=y.getResolvedSignature(v,b);if(a.throwIfCancellationRequested(),b.length)return h(b,S,g);if(e.isSourceFileJavaScript(n))return function(n){if(171===n.invocation.kind){var r=n.invocation,i=r.expression,a=69===i.kind?i:169===i.kind?i.name:void 0;if(a&&a.text)for(var o=t.getTypeChecker(),s=0,u=t.getSourceFiles();s<u.length;s++){var c=u[s],l=c.getNamedDeclarations(),p=e.getProperty(l,a.text);if(p)for(var f=0,d=p;f<d.length;f++){var m=d[f],y=m.symbol;if(y){var _=o.getTypeOfSymbolAtLocation(y,m);if(_){var g=_.getCallSignatures();if(g&&g.length)return h(g,g[0],n)}}}}}}(g)}}}var r,i=[];!function(e){e[e.TypeArguments=0]=\"TypeArguments\",e[e.CallArguments=1]=\"CallArguments\",e[e.TaggedTemplateArguments=2]=\"TaggedTemplateArguments\"}(r||(r={})),t.getSignatureHelpItems=n}(e.SignatureHelp||(e.SignatureHelp={}))}(o||(o={}));var o;!function(e){function t(t,n){e.Debug.assert(t>=0);var r=n.getLineStarts(),i=t;if(i+1===r.length)return n.text.length-1;var a=r[i],o=r[i+1]-1;for(e.Debug.assert(e.isLineBreak(n.text.charCodeAt(o)));a<=o&&e.isLineBreak(n.text.charCodeAt(o));)o--;return o}function n(e,t){return t.getLineStarts()[t.getLineAndCharacterOfPosition(e).line]}function r(e,t){return i(e.pos,e.end,t)}function i(e,t,n){return e<=n.pos&&t>=n.end}function a(e,t,n){return e.pos<=t&&e.end>=n}function o(e,t,n){return s(e.pos,e.end,t,n)}function s(e,t,n,r){return Math.max(e,n)<Math.min(t,r)}function u(e,t,n){return e.end>t||!c(e,n)}function c(t,n){if(e.nodeIsMissing(t))return!1;switch(t.kind){case 217:case 218:case 220:case 168:case 164:case 156:case 195:case 222:case 223:return l(t,16,n);case 247:return c(t.block,n);case 172:if(!t.arguments)return!0;case 171:case 175:case 161:return l(t,18,n);case 153:case 154:return c(t.type,n);case 145:case 146:case 147:case 216:case 176:case 144:case 143:case 149:case 148:case 177:return t.body?c(t.body,n):t.type?c(t.type,n):f(t,18,n);case 221:return t.body&&c(t.body,n);case 199:return t.elseStatement?c(t.elseStatement,n):c(t.thenStatement,n);case 198:return c(t.expression,n)||f(t,23);case 167:case 165:case 170:case 137:case 158:return l(t,20,n);case 150:return t.type?c(t.type,n):f(t,20,n);case 244:case 245:return!1;case 202:case 203:case 204:case 201:return c(t.statement,n);case 200:return d(t,104,n)?l(t,18,n):c(t.statement,n);case 155:return c(t.exprName,n);case 179:case 178:case 180:case 187:case 188:return c(t.expression,n);case 173:return c(t.template,n);case 186:return c(e.lastOrUndefined(t.templateSpans),n);case 193:return e.nodeIsPresent(t.literal);case 182:return c(t.operand,n);case 184:return c(t.right,n);case 185:return c(t.whenFalse,n);default:return!0}}function l(t,n,r){var i=t.getChildren(r);if(i.length){var a=e.lastOrUndefined(i);if(a.kind===n)return!0;if(23===a.kind&&1!==i.length)return i[i.length-2].kind===n}return!1}function p(t){var n=m(t);if(n){var r=n.getChildren();return{listItemIndex:e.indexOf(r,t),list:n}}}function f(e,t,n){return!!d(e,t,n)}function d(t,n,r){return e.forEach(t.getChildren(r),function(e){return e.kind===n&&e})}function m(t){var n=e.forEach(t.parent.getChildren(),function(e){if(274===e.kind&&e.pos<=t.pos&&e.end>=t.end)return e});return e.Debug.assert(!n||e.contains(n.getChildren(),t)),n}function h(e,t){return _(e,t,function(e){return D(e.kind)})}function y(e,t){return _(e,t,function(e){return M(e.kind)})}function _(e,t,n){return v(e,t,!1,n)}function g(e,t){return v(e,t,!0,void 0)}function v(e,t,n,r){var i=e;e:for(;;){if(I(i))return i;for(var a=0,o=i.getChildCount(e);a<o;a++){var s=i.getChildAt(a),u=n?s.getFullStart():s.getStart(e);if(u<=t){var c=s.getEnd();if(t<c||t===c&&1===s.kind){i=s;continue e}if(r&&c===t){var l=A(t,e,s);if(l&&r(l))return l}}}return i}}function b(e,t){var n=g(e,t);return I(n)&&t>n.getStart(e)&&t<n.getEnd()?n:A(t,e)}function S(e,t){function n(t){if(I(t)&&t.pos===e.end)return t;for(var r=t.getChildren(),i=0,a=r;i<a.length;i++){var o=a[i];if((o.pos<=e.pos&&o.end>e.end||o.pos===e.end)&&k(o))return n(o)}}return n(t)}function A(t,n,r){function i(e){if(I(e)||239===e.kind)return e;var t=e.getChildren(),n=o(t,t.length);return n&&i(n)}function a(s){if(I(s)||239===s.kind)return s;for(var u=s.getChildren(),c=0,l=u.length;c<l;c++){var p=u[c];if(t<p.end&&(k(p)||239===p.kind)){var f=p.getStart(n);if(f>=t||239===p.kind&&f===p.end){var d=o(u,c);return d&&i(d)}return a(p)}}if(e.Debug.assert(void 0!==r||251===s.kind),u.length){var d=o(u,u.length);return d&&i(d)}}function o(e,t){for(var n=t-1;n>=0;--n)if(k(e[n]))return e[n]}return a(r||n)}function T(e,t){var n=g(e,t);return n&&(9===n.kind||163===n.kind)&&t>n.getStart()}function E(e,t){return C(e,t,void 0)}function C(t,n,r){var i=g(t,n);if(i&&n<=i.getStart()){var a=e.getLeadingCommentRanges(t.text,i.pos);return r?e.forEach(a,function(e){return e.pos<n&&(2==e.kind?n<=e.end:n<e.end)&&r(e)}):e.forEach(a,function(e){return e.pos<n&&(2==e.kind?n<=e.end:n<e.end)})}return!1}function N(t,n){function r(e){var n=t.text;return n.length>=e.pos+3&&\"/\"===n[e.pos]&&\"*\"===n[e.pos+1]&&\"*\"===n[e.pos+2]}var i=g(t,n),a=e.getLeadingCommentRanges(t.text,i.pos);return e.forEach(a,r)}function w(t,n){var r=e.getTokenAtPosition(t,n);if(I(r))switch(r.kind){case 102:case 108:case 74:r=void 0===r.parent?void 0:r.parent.parent;break;default:r=r.parent}if(r){var i=r.jsDocComment;if(i)for(var a=0,o=i.tags;a<o.length;a++){var s=o[a];if(s.pos<=n&&n<=s.end)return s}}}function k(e){return 0!==e.getWidth()}function x(t){var n=e.getCombinedNodeFlags(t),r=[];return 16&n&&r.push(e.ScriptElementKindModifier.privateMemberModifier),32&n&&r.push(e.ScriptElementKindModifier.protectedMemberModifier),8&n&&r.push(e.ScriptElementKindModifier.publicMemberModifier),64&n&&r.push(e.ScriptElementKindModifier.staticModifier),128&n&&r.push(e.ScriptElementKindModifier.abstractModifier),2&n&&r.push(e.ScriptElementKindModifier.exportedModifier),e.isInAmbientContext(t)&&r.push(e.ScriptElementKindModifier.ambientModifier),r.length>0?r.join(\",\"):e.ScriptElementKindModifier.none}function R(t){return 152===t.kind||171===t.kind?t.typeArguments:e.isFunctionLike(t)||217===t.kind||218===t.kind?t.typeParameters:void 0}function I(e){return e.kind>=0&&e.kind<=135}function D(t){return 69===t||e.isKeyword(t)}function M(e){return 9===e||8===e||D(e)}function P(e){return 2===e||3===e}function L(t){return!(9!==t&&163!==t&&10!==t&&!e.isTemplateLiteralKind(t))}function O(e){return 15<=e&&e<=68}function U(t,n){return e.isTemplateLiteralKind(t.kind)&&t.getStart()<n&&n<t.getEnd()||!!t.isUnterminated&&n===t.getEnd()}function F(e){switch(e){case 112:case 110:case 111:return!0}return!1}function B(e,t){for(var n in e)if(\"object\"==typeof e[n]){if(!B(e[n],t[n]))return!1}else if(\"function\"!=typeof e[n]&&e[n]!==t[n])return!1;return!0}function K(e){if(167===e.kind||168===e.kind){if(184===e.parent.kind&&e.parent.left===e&&56===e.parent.operatorToken.kind)return!0;if(204===e.parent.kind&&e.parent.initializer===e)return!0;if(K(248===e.parent.kind?e.parent.parent:e.parent))return!0}return!1}e.getEndLinePosition=t,e.getLineStartPositionForPosition=n,e.rangeContainsRange=r,e.startEndContainsRange=i,e.rangeContainsStartEnd=a,e.rangeOverlapsWithStartEnd=o,e.startEndOverlapsWithStartEnd=s,e.positionBelongsToNode=u,e.isCompletedNode=c,e.findListItemInfo=p,e.hasChildOfKind=f,e.findChildOfKind=d,e.findContainingList=m,e.getTouchingWord=h,e.getTouchingPropertyName=y,e.getTouchingToken=_,e.getTokenAtPosition=g,e.findTokenOnLeftOfPosition=b,e.findNextToken=S,e.findPrecedingToken=A,e.isInString=T,e.isInComment=E,e.isInCommentHelper=C,e.hasDocComment=N,e.getJsDocTagAtPosition=w,e.getNodeModifiers=x,e.getTypeArgumentOrTypeParameterList=R,e.isToken=I,e.isWord=D,e.isComment=P,e.isStringOrRegularExpressionOrTemplateLiteral=L,e.isPunctuation=O,e.isInsideTemplateLiteral=U,e.isAccessibilityModifier=F,e.compareDataObjects=B,e.isArrayLiteralOrObjectLiteralDestructuringPattern=K}(o||(o={}));var o;!function(e){function t(e){return e.declarations&&e.declarations.length>0&&139===e.declarations[0].kind}function n(n,i){return r(n,function(n){var r=n.flags;return 3&r?t(n)?e.SymbolDisplayPartKind.parameterName:e.SymbolDisplayPartKind.localName:4&r?e.SymbolDisplayPartKind.propertyName:32768&r?e.SymbolDisplayPartKind.propertyName:65536&r?e.SymbolDisplayPartKind.propertyName:8&r?e.SymbolDisplayPartKind.enumMemberName:16&r?e.SymbolDisplayPartKind.functionName:32&r?e.SymbolDisplayPartKind.className:64&r?e.SymbolDisplayPartKind.interfaceName:384&r?e.SymbolDisplayPartKind.enumName:1536&r?e.SymbolDisplayPartKind.moduleName:8192&r?e.SymbolDisplayPartKind.methodName:262144&r?e.SymbolDisplayPartKind.typeParameterName:524288&r?e.SymbolDisplayPartKind.aliasName:8388608&r?e.SymbolDisplayPartKind.aliasName:e.SymbolDisplayPartKind.text}(i),i)}function r(t,n,r){return{text:t,kind:e.SymbolDisplayPartKind[n]}}function i(){return r(\" \",e.SymbolDisplayPartKind.space)}function a(t){return r(e.tokenToString(t),e.SymbolDisplayPartKind.keyword)}function o(t){return r(e.tokenToString(t),e.SymbolDisplayPartKind.punctuation)}function s(t){return r(e.tokenToString(t),e.SymbolDisplayPartKind.operator)}function u(t){var n=e.stringToToken(t);return void 0===n?c(t):a(n)}function c(t){return r(t,e.SymbolDisplayPartKind.text)}function l(e){return e.getNewLine?e.getNewLine():b}function p(){return r(\"\\n\",e.SymbolDisplayPartKind.lineBreak)}function f(e){e(v);var t=v.displayParts();return v.clear(),t}function d(e,t,n,r){return f(function(i){e.getSymbolDisplayBuilder().buildTypeDisplay(t,i,n,r)})}function m(e,t,n,r,i){return f(function(a){e.getSymbolDisplayBuilder().buildSymbolDisplay(t,a,n,r,i)})}function h(e,t,n,r){return f(function(i){e.getSymbolDisplayBuilder().buildSignatureDisplay(t,i,n,r)})}function y(t,n,r){if(_(r))return r.getText();var i=e.getLocalSymbolForExportDefault(n);return t.symbolToString(i||n)}function _(e){return e.parent&&(229===e.parent.kind||233===e.parent.kind)&&e.parent.propertyName===e}function g(e){var t=e.length;return t>=2&&e.charCodeAt(0)===e.charCodeAt(t-1)&&(34===e.charCodeAt(0)||39===e.charCodeAt(0))?e.substring(1,t-1):e}e.isFirstDeclarationOfSymbolParameter=t;var v=function(){function t(){if(c){var t=e.getIndentString(l);t&&u.push(r(t,e.SymbolDisplayPartKind.space)),c=!1}}function i(e,n){t(),u.push(r(e,n))}function a(e,r){t(),u.push(n(e,r))}function o(){u.push(p()),c=!0}function s(){u=[],c=!0,l=0}var u,c,l;return s(),{displayParts:function(){return u},writeKeyword:function(t){return i(t,e.SymbolDisplayPartKind.keyword)},writeOperator:function(t){return i(t,e.SymbolDisplayPartKind.operator)},writePunctuation:function(t){return i(t,e.SymbolDisplayPartKind.punctuation)},writeSpace:function(t){return i(t,e.SymbolDisplayPartKind.space)},writeStringLiteral:function(t){return i(t,e.SymbolDisplayPartKind.stringLiteral)},writeParameter:function(t){return i(t,e.SymbolDisplayPartKind.parameterName)},writeSymbol:a,writeLine:o,increaseIndent:function(){l++},decreaseIndent:function(){l--},clear:s,trackSymbol:function(){},reportInaccessibleThisError:function(){}}}();e.symbolPart=n,e.displayPart=r,e.spacePart=i,e.keywordPart=a,e.punctuationPart=o,e.operatorPart=s,e.textOrKeywordPart=u,e.textPart=c;var b=\"\\r\\n\";e.getNewLineOrDefaultFromHost=l,e.lineBreakPart=p,e.mapToDisplayParts=f,e.typeToDisplayParts=d,e.symbolToDisplayParts=m,e.signatureToDisplayParts=h,e.getDeclaredName=y,e.isImportOrExportSpecifierName=_,e.stripQuotes=g}(o||(o={}));var o;!function(e){!function(t){function n(t,n,i){function s(){e.Debug.assert(void 0!==r),b=void 0;var t=r.getStartPos()!==n;t&&(_?(e.Debug.assert(0!==_.length),S=4===e.lastOrUndefined(_).kind):S=!1),y=void 0,_=void 0,t||r.scan();for(var a=r.getStartPos();a<i;){var o=r.getToken();if(!e.isTrivia(o))break;r.scan();var s={pos:a,end:r.getStartPos(),kind:o};a=r.getStartPos(),y||(y=[]),y.push(s)}g=r.getStartPos()}function u(e){if(e)switch(e.kind){case 29:case 64:case 65:case 45:case 44:return!0}return!1}function c(e){if(e.parent)switch(e.parent.kind){case 241:case 238:case 240:case 237:return 69===e.kind}return!1}function l(e){return 10===e.kind}function p(e){return 13===e.kind||14===e.kind}function f(e){return 39===e||61===e}function d(t){if(e.Debug.assert(void 0!==r),!m())return{leadingTrivia:y,trailingTrivia:void 0,token:void 0};var n=u(t)?1:l(t)?2:p(t)?3:c(t)?4:0;if(b&&n===v)return h(b,t);r.getStartPos()!==g&&(e.Debug.assert(void 0!==b),r.setTextPos(g),r.scan());var a=r.getToken();1===n&&27===a?(a=r.reScanGreaterToken(),e.Debug.assert(t.kind===a),v=1):2===n&&f(a)?(a=r.reScanSlashToken(),e.Debug.assert(t.kind===a),v=2):3===n&&16===a?(a=r.reScanTemplateToken(),v=3):4===n&&69===a?(a=r.scanJsxIdentifier(),v=4):v=0;var o={pos:r.getStartPos(),end:r.getTextPos(),kind:a};for(_&&(_=void 0);r.getStartPos()<i&&(a=r.scan(),e.isTrivia(a));){var s={pos:r.getStartPos(),end:r.getTextPos(),kind:a};if(_||(_=[]),_.push(s),4===a){r.scan();break}}return b={leadingTrivia:y,trailingTrivia:_,token:o},h(b,t)}function m(){e.Debug.assert(void 0!==r);var t=b&&b.token.kind||r.getToken();return(b&&b.token.pos||r.getStartPos())<i&&1!==t&&!e.isTrivia(t)}function h(t,n){return e.isToken(n)&&t.token.kind!==n.kind&&(t.token.kind=n.kind),t}e.Debug.assert(void 0===r),r=1===t.languageVariant?o:a,r.setText(t.text),r.setTextPos(n);var y,_,g,v,b,S=!0;return{advance:s,readTokenInfo:d,isOnToken:m,getCurrentLeadingTrivia:function(){return y},lastTrailingTriviaWasNewLine:function(){return S},close:function(){e.Debug.assert(void 0!==r),b=void 0,r.setText(void 0),r=void 0}}}var r,i,a=e.createScanner(2,!1,0),o=e.createScanner(2,!1,1);!function(e){e[e.Scan=0]=\"Scan\",e[e.RescanGreaterThanToken=1]=\"RescanGreaterThanToken\",e[e.RescanSlashToken=2]=\"RescanSlashToken\",e[e.RescanTemplateToken=3]=\"RescanTemplateToken\",e[e.RescanJsxIdentifier=4]=\"RescanJsxIdentifier\"}(i||(i={})),t.getFormattingScanner=n}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){var n=function(){function t(e,t){this.sourceFile=e,this.formattingRequestKind=t}return t.prototype.updateContext=function(t,n,r,i,a){e.Debug.assert(void 0!==t,\"currentTokenSpan is null\"),e.Debug.assert(void 0!==n,\"currentTokenParent is null\"),e.Debug.assert(void 0!==r,\"nextTokenSpan is null\"),e.Debug.assert(void 0!==i,\"nextTokenParent is null\"),e.Debug.assert(void 0!==a,\"commonParent is null\"),this.currentTokenSpan=t,this.currentTokenParent=n,this.nextTokenSpan=r,this.nextTokenParent=i,this.contextNode=a,this.contextNodeAllOnSameLine=void 0,this.nextNodeAllOnSameLine=void 0,this.tokensAreOnSameLine=void 0,this.contextNodeBlockIsOnOneLine=void 0,this.nextNodeBlockIsOnOneLine=void 0},t.prototype.ContextNodeAllOnSameLine=function(){return void 0===this.contextNodeAllOnSameLine&&(this.contextNodeAllOnSameLine=this.NodeIsOnOneLine(this.contextNode)),this.contextNodeAllOnSameLine},t.prototype.NextNodeAllOnSameLine=function(){return void 0===this.nextNodeAllOnSameLine&&(this.nextNodeAllOnSameLine=this.NodeIsOnOneLine(this.nextTokenParent)),this.nextNodeAllOnSameLine},t.prototype.TokensAreOnSameLine=function(){if(void 0===this.tokensAreOnSameLine){var e=this.sourceFile.getLineAndCharacterOfPosition(this.currentTokenSpan.pos).line,t=this.sourceFile.getLineAndCharacterOfPosition(this.nextTokenSpan.pos).line;this.tokensAreOnSameLine=e===t}return this.tokensAreOnSameLine},t.prototype.ContextNodeBlockIsOnOneLine=function(){return void 0===this.contextNodeBlockIsOnOneLine&&(this.contextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.contextNode)),this.contextNodeBlockIsOnOneLine},t.prototype.NextNodeBlockIsOnOneLine=function(){return void 0===this.nextNodeBlockIsOnOneLine&&(this.nextNodeBlockIsOnOneLine=this.BlockIsOnOneLine(this.nextTokenParent)),this.nextNodeBlockIsOnOneLine},t.prototype.NodeIsOnOneLine=function(e){return this.sourceFile.getLineAndCharacterOfPosition(e.getStart(this.sourceFile)).line===this.sourceFile.getLineAndCharacterOfPosition(e.getEnd()).line},t.prototype.BlockIsOnOneLine=function(t){var n=e.findChildOfKind(t,15,this.sourceFile),r=e.findChildOfKind(t,16,this.sourceFile);if(n&&r){return this.sourceFile.getLineAndCharacterOfPosition(n.getEnd()).line===this.sourceFile.getLineAndCharacterOfPosition(r.getStart(this.sourceFile)).line}return!1},t}();t.FormattingContext=n}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){!function(e){e[e.FormatDocument=0]=\"FormatDocument\",e[e.FormatSelection=1]=\"FormatSelection\",e[e.FormatOnEnter=2]=\"FormatOnEnter\",e[e.FormatOnSemicolon=3]=\"FormatOnSemicolon\",e[e.FormatOnClosingCurlyBrace=4]=\"FormatOnClosingCurlyBrace\"}(e.FormattingRequestKind||(e.FormattingRequestKind={}));e.FormattingRequestKind}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){var t=function(){function e(e,t,n){void 0===n&&(n=0),this.Descriptor=e,this.Operation=t,this.Flag=n}return e.prototype.toString=function(){return\"[desc=\"+this.Descriptor+\",operation=\"+this.Operation+\",flag=\"+this.Flag+\"]\"},e}();e.Rule=t}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){!function(e){e[e.Ignore=1]=\"Ignore\",e[e.Space=2]=\"Space\",e[e.NewLine=4]=\"NewLine\",e[e.Delete=8]=\"Delete\"}(e.RuleAction||(e.RuleAction={}));e.RuleAction}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){var t=function(){function t(e,t){this.LeftTokenRange=e,this.RightTokenRange=t}return t.prototype.toString=function(){return\"[leftRange=\"+this.LeftTokenRange+\",rightRange=\"+this.RightTokenRange+\"]\"},t.create1=function(n,r){return t.create4(e.Shared.TokenRange.FromToken(n),e.Shared.TokenRange.FromToken(r))},t.create2=function(n,r){return t.create4(n,e.Shared.TokenRange.FromToken(r))},t.create3=function(n,r){return t.create4(e.Shared.TokenRange.FromToken(n),r)},t.create4=function(e,n){return new t(e,n)},t}();e.RuleDescriptor=t}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){!function(e){e[e.None=0]=\"None\",e[e.CanDeleteNewLines=1]=\"CanDeleteNewLines\"}(e.RuleFlags||(e.RuleFlags={}));e.RuleFlags}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){var t=function(){function t(){this.Context=null,this.Action=null}return t.prototype.toString=function(){return\"[context=\"+this.Context+\",action=\"+this.Action+\"]\"},t.create1=function(n){return t.create2(e.RuleOperationContext.Any,n)},t.create2=function(e,n){var r=new t;return r.Context=e,r.Action=n,r},t}();e.RuleOperation=t}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(e){var t=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t-0]=arguments[t];this.customContextChecks=e}return e.prototype.IsAny=function(){return this===e.Any},e.prototype.InContext=function(e){if(this.IsAny())return!0;for(var t=0,n=this.customContextChecks;t<n.length;t++){if(!(0,n[t])(e))return!1}return!0},e.Any=new e,e}();e.RuleOperationContext=t}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){var n=function(){function n(){this.IgnoreBeforeComment=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.Comments),t.RuleOperation.create1(1)),this.IgnoreAfterLineComment=new t.Rule(t.RuleDescriptor.create3(2,t.Shared.TokenRange.Any),t.RuleOperation.create1(1)),this.NoSpaceBeforeSemicolon=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,23),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeColon=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,54),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBinaryOpContext),8)),this.NoSpaceBeforeQuestionMark=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,53),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBinaryOpContext),8)),this.SpaceAfterColon=new t.Rule(t.RuleDescriptor.create3(54,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBinaryOpContext),2)),this.SpaceAfterQuestionMarkInConditionalOperator=new t.Rule(t.RuleDescriptor.create3(53,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsConditionalOperatorContext),2)),this.NoSpaceAfterQuestionMark=new t.Rule(t.RuleDescriptor.create3(53,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterSemicolon=new t.Rule(t.RuleDescriptor.create3(23,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterCloseBrace=new t.Rule(t.RuleDescriptor.create3(16,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsAfterCodeBlockContext),2)),this.SpaceBetweenCloseBraceAndElse=new t.Rule(t.RuleDescriptor.create1(16,80),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceBetweenCloseBraceAndWhile=new t.Rule(t.RuleDescriptor.create1(16,104),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceAfterCloseBrace=new t.Rule(t.RuleDescriptor.create3(16,t.Shared.TokenRange.FromTokens([18,20,24,23])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeDot=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,21),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterDot=new t.Rule(t.RuleDescriptor.create3(21,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeOpenBracket=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,19),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterCloseBracket=new t.Rule(t.RuleDescriptor.create3(20,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBeforeBlockInFunctionDeclarationContext),8)),this.FunctionOpenBraceLeftTokenRange=t.Shared.TokenRange.AnyIncludingMultilineComments,this.SpaceBeforeOpenBraceInFunction=new t.Rule(t.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext,n.IsBeforeBlockContext,n.IsNotFormatOnEnter,n.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.TypeScriptOpenBraceLeftTokenRange=t.Shared.TokenRange.FromTokens([69,3,73]),this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock=new t.Rule(t.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsTypeScriptDeclWithBlockContext,n.IsNotFormatOnEnter,n.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.ControlOpenBraceLeftTokenRange=t.Shared.TokenRange.FromTokens([18,3,79,100,85,80]),this.SpaceBeforeOpenBraceInControl=new t.Rule(t.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsControlDeclContext,n.IsNotFormatOnEnter,n.IsSameLineTokenOrBeforeMultilineBlockContext),2),1),this.SpaceAfterOpenBrace=new t.Rule(t.RuleDescriptor.create3(15,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSingleLineBlockContext),2)),this.SpaceBeforeCloseBrace=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,16),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSingleLineBlockContext),2)),this.NoSpaceBetweenEmptyBraceBrackets=new t.Rule(t.RuleDescriptor.create1(15,16),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsObjectContext),8)),this.NewLineAfterOpenBraceInBlockContext=new t.Rule(t.RuleDescriptor.create3(15,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsMultilineBlockContext),4)),this.NewLineBeforeCloseBraceInBlockContext=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.AnyIncludingMultilineComments,16),t.RuleOperation.create2(new t.RuleOperationContext(n.IsMultilineBlockContext),4)),this.NoSpaceAfterUnaryPrefixOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.UnaryPrefixOperators,t.Shared.TokenRange.UnaryPrefixExpressions),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBinaryOpContext),8)),this.NoSpaceAfterUnaryPreincrementOperator=new t.Rule(t.RuleDescriptor.create3(41,t.Shared.TokenRange.UnaryPreincrementExpressions),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterUnaryPredecrementOperator=new t.Rule(t.RuleDescriptor.create3(42,t.Shared.TokenRange.UnaryPredecrementExpressions),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeUnaryPostincrementOperator=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.UnaryPostincrementExpressions,41),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeUnaryPostdecrementOperator=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.UnaryPostdecrementExpressions,42),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterPostincrementWhenFollowedByAdd=new t.Rule(t.RuleDescriptor.create1(41,35),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterAddWhenFollowedByUnaryPlus=new t.Rule(t.RuleDescriptor.create1(35,35),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterAddWhenFollowedByPreincrement=new t.Rule(t.RuleDescriptor.create1(35,41),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterPostdecrementWhenFollowedBySubtract=new t.Rule(t.RuleDescriptor.create1(42,36),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterSubtractWhenFollowedByUnaryMinus=new t.Rule(t.RuleDescriptor.create1(36,36),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterSubtractWhenFollowedByPredecrement=new t.Rule(t.RuleDescriptor.create1(36,42),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.NoSpaceBeforeComma=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,24),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterCertainKeywords=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([102,98,92,78,94,101,119]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterLetConstInVariableDeclaration=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([108,74]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsStartOfVariableDeclarationList),2)),this.NoSpaceBeforeOpenParenInFuncCall=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsFunctionCallOrNewContext,n.IsPreviousTokenNotComma),8)),this.SpaceAfterFunctionInFuncDecl=new t.Rule(t.RuleDescriptor.create3(87,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext),2)),this.NoSpaceBeforeOpenParenInFuncDecl=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsFunctionDeclContext),8)),this.SpaceAfterVoidOperator=new t.Rule(t.RuleDescriptor.create3(103,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsVoidOpContext),2)),this.NoSpaceBetweenReturnAndSemicolon=new t.Rule(t.RuleDescriptor.create1(94,23),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceBetweenStatements=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([18,79,80,71]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotForContext),2)),this.SpaceAfterTryFinally=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.FromTokens([100,85]),15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterGetSetInMember=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.FromTokens([123,129]),69),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext),2)),this.SpaceBeforeBinaryKeywordOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.BinaryKeywordOperators),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterBinaryKeywordOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.BinaryKeywordOperators,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.NoSpaceAfterConstructor=new t.Rule(t.RuleDescriptor.create1(121,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterModuleImport=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.FromTokens([125,127]),17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterCertainTypeScriptKeywords=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([115,73,122,77,81,82,83,123,106,89,107,125,126,110,112,111,129,113,132]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceBeforeCertainTypeScriptKeywords=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.FromTokens([83,106])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterModuleName=new t.Rule(t.RuleDescriptor.create1(9,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsModuleDeclContext),2)),this.SpaceBeforeArrow=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,34),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterArrow=new t.Rule(t.RuleDescriptor.create3(34,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceAfterEllipsis=new t.Rule(t.RuleDescriptor.create1(22,69),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterOptionalParameters=new t.Rule(t.RuleDescriptor.create3(53,t.Shared.TokenRange.FromTokens([18,24])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNotBinaryOpContext),8)),this.NoSpaceBeforeOpenAngularBracket=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.TypeNames,25),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeArgumentOrParameterOrAssertionContext),8)),this.NoSpaceBetweenCloseParenAndAngularBracket=new t.Rule(t.RuleDescriptor.create1(18,25),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeArgumentOrParameterOrAssertionContext),8)),this.NoSpaceAfterOpenAngularBracket=new t.Rule(t.RuleDescriptor.create3(25,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeArgumentOrParameterOrAssertionContext),8)),this.NoSpaceBeforeCloseAngularBracket=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,27),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeArgumentOrParameterOrAssertionContext),8)),this.NoSpaceAfterCloseAngularBracket=new t.Rule(t.RuleDescriptor.create3(27,t.Shared.TokenRange.FromTokens([17,19,27,24])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeArgumentOrParameterOrAssertionContext),8)),this.NoSpaceAfterTypeAssertion=new t.Rule(t.RuleDescriptor.create3(27,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsTypeAssertionContext),8)),this.NoSpaceBetweenEmptyInterfaceBraceBrackets=new t.Rule(t.RuleDescriptor.create1(15,16),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsObjectTypeContext),8)),this.SpaceBeforeAt=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,55),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceAfterAt=new t.Rule(t.RuleDescriptor.create3(55,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterDecorator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.FromTokens([115,69,82,77,73,113,112,110,111,123,129,19,37])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsEndOfDecoratorContextOnSameLine),2)),this.NoSpaceBetweenFunctionKeywordAndStar=new t.Rule(t.RuleDescriptor.create1(87,37),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclarationOrFunctionExpressionContext),8)),this.SpaceAfterStarInGeneratorDeclaration=new t.Rule(t.RuleDescriptor.create3(37,t.Shared.TokenRange.FromTokens([69,17])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclarationOrFunctionExpressionContext),2)),this.NoSpaceBetweenYieldKeywordAndStar=new t.Rule(t.RuleDescriptor.create1(114,37),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsYieldOrYieldStarWithOperand),8)),this.SpaceBetweenYieldOrYieldStarAndOperand=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([114,37]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsYieldOrYieldStarWithOperand),2)),this.SpaceBetweenAsyncAndOpenParen=new t.Rule(t.RuleDescriptor.create1(118,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsArrowFunctionContext,n.IsSameLineTokenContext),2)),this.SpaceBetweenAsyncAndFunctionKeyword=new t.Rule(t.RuleDescriptor.create1(118,87),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceBetweenTagAndTemplateString=new t.Rule(t.RuleDescriptor.create3(69,t.Shared.TokenRange.FromTokens([11,12])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.HighPriorityCommonRules=[this.IgnoreBeforeComment,this.IgnoreAfterLineComment,this.NoSpaceBeforeColon,this.SpaceAfterColon,this.NoSpaceBeforeQuestionMark,this.SpaceAfterQuestionMarkInConditionalOperator,this.NoSpaceAfterQuestionMark,this.NoSpaceBeforeDot,this.NoSpaceAfterDot,this.NoSpaceAfterUnaryPrefixOperator,this.NoSpaceAfterUnaryPreincrementOperator,this.NoSpaceAfterUnaryPredecrementOperator,this.NoSpaceBeforeUnaryPostincrementOperator,this.NoSpaceBeforeUnaryPostdecrementOperator,this.SpaceAfterPostincrementWhenFollowedByAdd,this.SpaceAfterAddWhenFollowedByUnaryPlus,this.SpaceAfterAddWhenFollowedByPreincrement,this.SpaceAfterPostdecrementWhenFollowedBySubtract,this.SpaceAfterSubtractWhenFollowedByUnaryMinus,this.SpaceAfterSubtractWhenFollowedByPredecrement,this.NoSpaceAfterCloseBrace,this.SpaceAfterOpenBrace,this.SpaceBeforeCloseBrace,this.NewLineBeforeCloseBraceInBlockContext,this.SpaceAfterCloseBrace,this.SpaceBetweenCloseBraceAndElse,this.SpaceBetweenCloseBraceAndWhile,this.NoSpaceBetweenEmptyBraceBrackets,this.NoSpaceBetweenFunctionKeywordAndStar,this.SpaceAfterStarInGeneratorDeclaration,this.SpaceAfterFunctionInFuncDecl,this.NewLineAfterOpenBraceInBlockContext,this.SpaceAfterGetSetInMember,this.NoSpaceBetweenYieldKeywordAndStar,this.SpaceBetweenYieldOrYieldStarAndOperand,this.NoSpaceBetweenReturnAndSemicolon,this.SpaceAfterCertainKeywords,this.SpaceAfterLetConstInVariableDeclaration,this.NoSpaceBeforeOpenParenInFuncCall,this.SpaceBeforeBinaryKeywordOperator,this.SpaceAfterBinaryKeywordOperator,this.SpaceAfterVoidOperator,this.SpaceBetweenAsyncAndOpenParen,this.SpaceBetweenAsyncAndFunctionKeyword,this.NoSpaceBetweenTagAndTemplateString,this.NoSpaceAfterConstructor,this.NoSpaceAfterModuleImport,this.SpaceAfterCertainTypeScriptKeywords,this.SpaceBeforeCertainTypeScriptKeywords,this.SpaceAfterModuleName,this.SpaceBeforeArrow,this.SpaceAfterArrow,this.NoSpaceAfterEllipsis,this.NoSpaceAfterOptionalParameters,this.NoSpaceBetweenEmptyInterfaceBraceBrackets,this.NoSpaceBeforeOpenAngularBracket,this.NoSpaceBetweenCloseParenAndAngularBracket,this.NoSpaceAfterOpenAngularBracket,this.NoSpaceBeforeCloseAngularBracket,this.NoSpaceAfterCloseAngularBracket,this.NoSpaceAfterTypeAssertion,this.SpaceBeforeAt,this.NoSpaceAfterAt,this.SpaceAfterDecorator],this.LowPriorityCommonRules=[this.NoSpaceBeforeSemicolon,this.SpaceBeforeOpenBraceInControl,this.SpaceBeforeOpenBraceInFunction,this.SpaceBeforeOpenBraceInTypeScriptDeclWithBlock,this.NoSpaceBeforeComma,this.NoSpaceBeforeOpenBracket,this.NoSpaceAfterCloseBracket,this.SpaceAfterSemicolon,this.NoSpaceBeforeOpenParenInFuncDecl,this.SpaceBetweenStatements,this.SpaceAfterTryFinally],this.SpaceAfterComma=new t.Rule(t.RuleDescriptor.create3(24,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsNextTokenNotCloseBracket),2)),this.NoSpaceAfterComma=new t.Rule(t.RuleDescriptor.create3(24,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceBeforeBinaryOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.BinaryOperators),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.SpaceAfterBinaryOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.BinaryOperators,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),2)),this.NoSpaceBeforeBinaryOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.BinaryOperators),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),8)),this.NoSpaceAfterBinaryOperator=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.BinaryOperators,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsBinaryOpContext),8)),this.SpaceAfterKeywordInControl=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Keywords,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsControlDeclContext),2)),this.NoSpaceAfterKeywordInControl=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Keywords,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsControlDeclContext),8)),this.NewLineBeforeOpenBraceInFunction=new t.Rule(t.RuleDescriptor.create2(this.FunctionOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext,n.IsBeforeMultilineBlockContext),4),1),this.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock=new t.Rule(t.RuleDescriptor.create2(this.TypeScriptOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsTypeScriptDeclWithBlockContext,n.IsBeforeMultilineBlockContext),4),1),this.NewLineBeforeOpenBraceInControl=new t.Rule(t.RuleDescriptor.create2(this.ControlOpenBraceLeftTokenRange,15),t.RuleOperation.create2(new t.RuleOperationContext(n.IsControlDeclContext,n.IsBeforeMultilineBlockContext),4),1),this.SpaceAfterSemicolonInFor=new t.Rule(t.RuleDescriptor.create3(23,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsForContext),2)),this.NoSpaceAfterSemicolonInFor=new t.Rule(t.RuleDescriptor.create3(23,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext,n.IsForContext),8)),this.SpaceAfterOpenParen=new t.Rule(t.RuleDescriptor.create3(17,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceBeforeCloseParen=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,18),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceBetweenParens=new t.Rule(t.RuleDescriptor.create1(17,18),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterOpenParen=new t.Rule(t.RuleDescriptor.create3(17,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeCloseParen=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,18),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterOpenBracket=new t.Rule(t.RuleDescriptor.create3(19,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceBeforeCloseBracket=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,20),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceBetweenBrackets=new t.Rule(t.RuleDescriptor.create1(19,20),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterOpenBracket=new t.Rule(t.RuleDescriptor.create3(19,t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceBeforeCloseBracket=new t.Rule(t.RuleDescriptor.create2(t.Shared.TokenRange.Any,20),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.NoSpaceAfterTemplateHeadAndMiddle=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([12,13]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceAfterTemplateHeadAndMiddle=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.FromTokens([12,13]),t.Shared.TokenRange.Any),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.NoSpaceBeforeTemplateMiddleAndTail=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.FromTokens([13,14])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),8)),this.SpaceBeforeTemplateMiddleAndTail=new t.Rule(t.RuleDescriptor.create4(t.Shared.TokenRange.Any,t.Shared.TokenRange.FromTokens([13,14])),t.RuleOperation.create2(new t.RuleOperationContext(n.IsSameLineTokenContext),2)),this.SpaceAfterAnonymousFunctionKeyword=new t.Rule(t.RuleDescriptor.create1(87,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext),2)),this.NoSpaceAfterAnonymousFunctionKeyword=new t.Rule(t.RuleDescriptor.create1(87,17),t.RuleOperation.create2(new t.RuleOperationContext(n.IsFunctionDeclContext),8))}return n.prototype.getRuleName=function(e){var t=this;for(var n in t)if(t[n]===e)return n;throw new Error(\"Unknown rule\")},n.IsForContext=function(e){return 202===e.contextNode.kind},n.IsNotForContext=function(e){return!n.IsForContext(e)},n.IsBinaryOpContext=function(e){switch(e.contextNode.kind){case 184:case 185:case 192:case 151:case 159:case 160:return!0;case 166:case 219:case 224:case 214:case 139:case 250:case 142:case 141:return 56===e.currentTokenSpan.kind||56===e.nextTokenSpan.kind;case 203:return 90===e.currentTokenSpan.kind||90===e.nextTokenSpan.kind;case 204:return 135===e.currentTokenSpan.kind||135===e.nextTokenSpan.kind}return!1},n.IsNotBinaryOpContext=function(e){return!n.IsBinaryOpContext(e)},n.IsConditionalOperatorContext=function(e){return 185===e.contextNode.kind},n.IsSameLineTokenOrBeforeMultilineBlockContext=function(e){return e.TokensAreOnSameLine()||n.IsBeforeMultilineBlockContext(e)},n.IsBeforeMultilineBlockContext=function(e){return n.IsBeforeBlockContext(e)&&!(e.NextNodeAllOnSameLine()||e.NextNodeBlockIsOnOneLine())},n.IsMultilineBlockContext=function(e){return n.IsBlockContext(e)&&!(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())},n.IsSingleLineBlockContext=function(e){return n.IsBlockContext(e)&&(e.ContextNodeAllOnSameLine()||e.ContextNodeBlockIsOnOneLine())},n.IsBlockContext=function(e){return n.NodeIsBlockContext(e.contextNode)},n.IsBeforeBlockContext=function(e){return n.NodeIsBlockContext(e.nextTokenParent)},n.NodeIsBlockContext=function(e){if(n.NodeIsTypeScriptDeclWithBlockContext(e))return!0;switch(e.kind){case 195:case 223:case 168:case 222:return!0}return!1},n.IsFunctionDeclContext=function(e){switch(e.contextNode.kind){case 216:case 144:case 143:case 146:case 147:case 148:case 176:case 145:case 177:case 218:return!0}return!1},n.IsFunctionDeclarationOrFunctionExpressionContext=function(e){return 216===e.contextNode.kind||176===e.contextNode.kind},n.IsTypeScriptDeclWithBlockContext=function(e){return n.NodeIsTypeScriptDeclWithBlockContext(e.contextNode)},n.NodeIsTypeScriptDeclWithBlockContext=function(e){switch(e.kind){case 217:case 189:case 218:case 220:case 156:case 221:return!0}return!1},n.IsAfterCodeBlockContext=function(e){switch(e.currentTokenParent.kind){case 217:case 221:case 220:case 195:case 247:case 222:case 209:return!0}return!1},n.IsControlDeclContext=function(e){switch(e.contextNode.kind){case 199:case 209:case 202:case 203:case 204:case 201:case 212:case 200:case 208:case 247:return!0;default:return!1}},n.IsObjectContext=function(e){return 168===e.contextNode.kind},n.IsFunctionCallContext=function(e){return 171===e.contextNode.kind},n.IsNewContext=function(e){return 172===e.contextNode.kind},n.IsFunctionCallOrNewContext=function(e){return n.IsFunctionCallContext(e)||n.IsNewContext(e)},n.IsPreviousTokenNotComma=function(e){return 24!==e.currentTokenSpan.kind},n.IsNextTokenNotCloseBracket=function(e){return 20!==e.nextTokenSpan.kind},n.IsArrowFunctionContext=function(e){return 177===e.contextNode.kind},n.IsSameLineTokenContext=function(e){return e.TokensAreOnSameLine()},n.IsNotBeforeBlockInFunctionDeclarationContext=function(e){return!n.IsFunctionDeclContext(e)&&!n.IsBeforeBlockContext(e)},n.IsEndOfDecoratorContextOnSameLine=function(e){return e.TokensAreOnSameLine()&&e.contextNode.decorators&&n.NodeIsInDecoratorContext(e.currentTokenParent)&&!n.NodeIsInDecoratorContext(e.nextTokenParent)},n.NodeIsInDecoratorContext=function(t){for(;e.isExpression(t);)t=t.parent;return 140===t.kind},n.IsStartOfVariableDeclarationList=function(e){return 215===e.currentTokenParent.kind&&e.currentTokenParent.getStart(e.sourceFile)===e.currentTokenSpan.pos},n.IsNotFormatOnEnter=function(e){return 2!==e.formattingRequestKind},n.IsModuleDeclContext=function(e){return 221===e.contextNode.kind},n.IsObjectTypeContext=function(e){return 156===e.contextNode.kind},n.IsTypeArgumentOrParameterOrAssertion=function(e,t){if(25!==e.kind&&27!==e.kind)return!1;switch(t.kind){case 152:case 174:case 217:case 189:case 218:case 216:case 176:case 177:case 144:case 143:case 148:case 149:case 171:case 172:case 191:return!0;default:return!1}},n.IsTypeArgumentOrParameterOrAssertionContext=function(e){return n.IsTypeArgumentOrParameterOrAssertion(e.currentTokenSpan,e.currentTokenParent)||n.IsTypeArgumentOrParameterOrAssertion(e.nextTokenSpan,e.nextTokenParent)},n.IsTypeAssertionContext=function(e){return 174===e.contextNode.kind},n.IsVoidOpContext=function(e){return 103===e.currentTokenSpan.kind&&180===e.currentTokenParent.kind},n.IsYieldOrYieldStarWithOperand=function(e){return 187===e.contextNode.kind&&void 0!==e.contextNode.expression},n}();t.Rules=n}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){var n=function(){function e(){this.map=[],this.mapRowLength=0}return e.create=function(t){var n=new e;return n.Initialize(t),n},e.prototype.Initialize=function(e){this.mapRowLength=136,this.map=new Array(this.mapRowLength*this.mapRowLength);var t=new Array(this.map.length);return this.FillRules(e,t),this.map},e.prototype.FillRules=function(e,t){var n=this;e.forEach(function(e){n.FillRule(e,t)})},e.prototype.GetRuleBucketIndex=function(e,t){return e*this.mapRowLength+t},e.prototype.FillRule=function(e,n){var r=this,i=e.Descriptor.LeftTokenRange!==t.Shared.TokenRange.Any&&e.Descriptor.RightTokenRange!==t.Shared.TokenRange.Any;e.Descriptor.LeftTokenRange.GetTokens().forEach(function(t){e.Descriptor.RightTokenRange.GetTokens().forEach(function(o){var s=r.GetRuleBucketIndex(t,o),u=r.map[s];void 0===u&&(u=r.map[s]=new a),u.AddRule(e,i,n,s)})})},e.prototype.GetRule=function(e){var t=this.GetRuleBucketIndex(e.currentTokenSpan.kind,e.nextTokenSpan.kind),n=this.map[t];if(null!=n)for(var r=0,i=n.Rules();r<i.length;r++){var a=i[r];if(a.Operation.Context.InContext(e))return a}return null},e}();t.RulesMap=n;!function(e){e[e.IgnoreRulesSpecific=0]=\"IgnoreRulesSpecific\",e[e.IgnoreRulesAny=5]=\"IgnoreRulesAny\",e[e.ContextRulesSpecific=10]=\"ContextRulesSpecific\",e[e.ContextRulesAny=15]=\"ContextRulesAny\",e[e.NoContextRulesSpecific=20]=\"NoContextRulesSpecific\",e[e.NoContextRulesAny=25]=\"NoContextRulesAny\"}(t.RulesPosition||(t.RulesPosition={}));var r=t.RulesPosition,i=function(){function t(){this.rulesInsertionIndexBitmap=0}return t.prototype.GetInsertionIndex=function(e){for(var t=0,n=0,r=this.rulesInsertionIndexBitmap;n<=e;)t+=31&r,r>>=5,n+=5;return t},t.prototype.IncreaseInsertionIndex=function(t){var n=this.rulesInsertionIndexBitmap>>t&31;n++,e.Debug.assert((31&n)===n,\"Adding more rules into the sub-bucket than allowed. Maximum allowed is 32 rules.\");var r=this.rulesInsertionIndexBitmap&~(31<<t);r|=n<<t,this.rulesInsertionIndexBitmap=r},t}();t.RulesBucketConstructionState=i;var a=function(){function e(){this.rules=[]}return e.prototype.Rules=function(){return this.rules},e.prototype.AddRule=function(e,t,n,a){var o;o=1===e.Operation.Action?t?r.IgnoreRulesSpecific:r.IgnoreRulesAny:e.Operation.Context.IsAny()?t?r.NoContextRulesSpecific:r.NoContextRulesAny:t?r.ContextRulesSpecific:r.ContextRulesAny;var s=n[a];void 0===s&&(s=n[a]=new i);var u=s.GetInsertionIndex(o);this.rules.splice(u,0,e),s.IncreaseInsertionIndex(o)},e}();t.RulesBucket=a}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){!function(t){var n=function(){function t(t,n,r){this.tokens=[];for(var i=t;i<=n;i++)e.indexOf(r,i)<0&&this.tokens.push(i)}return t.prototype.GetTokens=function(){return this.tokens},t.prototype.Contains=function(e){return this.tokens.indexOf(e)>=0},t}();t.TokenRangeAccess=n;var r=function(){function e(e){this.tokens=e&&e.length?e:[]}return e.prototype.GetTokens=function(){return this.tokens},e.prototype.Contains=function(e){return this.tokens.indexOf(e)>=0},e}();t.TokenValuesAccess=r;var i=function(){function e(e){this.token=e}return e.prototype.GetTokens=function(){return[this.token]},e.prototype.Contains=function(e){return e===this.token},e}();t.TokenSingleValueAccess=i;var a=function(){function e(){}return e.prototype.GetTokens=function(){for(var e=[],t=0;t<=135;t++)e.push(t);return e},e.prototype.Contains=function(e){return!0},e.prototype.toString=function(){return\"[allTokens]\"},e}();t.TokenAllAccess=a;var o=function(){function e(e){this.tokenAccess=e}return e.FromToken=function(t){return new e(new i(t))},e.FromTokens=function(t){return new e(new r(t))},e.FromRange=function(t,r,i){return void 0===i&&(i=[]),new e(new n(t,r,i))},e.AllTokens=function(){return new e(new a)},e.prototype.GetTokens=function(){return this.tokenAccess.GetTokens()},e.prototype.Contains=function(e){return this.tokenAccess.Contains(e)},e.prototype.toString=function(){return this.tokenAccess.toString()},e.Any=e.AllTokens(),e.AnyIncludingMultilineComments=e.FromTokens(e.Any.GetTokens().concat([3])),e.Keywords=e.FromRange(70,135),e.BinaryOperators=e.FromRange(25,68),e.BinaryKeywordOperators=e.FromTokens([90,91,135,116,124]),e.UnaryPrefixOperators=e.FromTokens([41,42,50,49]),e.UnaryPrefixExpressions=e.FromTokens([8,69,17,19,15,97,92]),e.UnaryPreincrementExpressions=e.FromTokens([69,17,97,92]),e.UnaryPostincrementExpressions=e.FromTokens([69,18,20,92]),e.UnaryPredecrementExpressions=e.FromTokens([69,17,97,92]),e.UnaryPostdecrementExpressions=e.FromTokens([69,18,20,92]),e.Comments=e.FromTokens([2,3]),e.TypeNames=e.FromTokens([69,128,130,120,131,103,117]),e}();t.TokenRange=o}(t.Shared||(t.Shared={}))}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){var n=function(){function n(){this.globalRules=new t.Rules}return n.prototype.getRuleName=function(e){return this.globalRules.getRuleName(e)},n.prototype.getRuleByName=function(e){return this.globalRules[e]},n.prototype.getRulesMap=function(){return this.rulesMap},n.prototype.ensureUpToDate=function(n){if(null==this.options||!e.compareDataObjects(this.options,n)){var r=this.createActiveRules(n),i=t.RulesMap.create(r);this.activeRules=r,this.rulesMap=i,this.options=e.clone(n)}},n.prototype.createActiveRules=function(e){var t=this.globalRules.HighPriorityCommonRules.slice(0);return e.InsertSpaceAfterCommaDelimiter?t.push(this.globalRules.SpaceAfterComma):t.push(this.globalRules.NoSpaceAfterComma),e.InsertSpaceAfterFunctionKeywordForAnonymousFunctions?t.push(this.globalRules.SpaceAfterAnonymousFunctionKeyword):t.push(this.globalRules.NoSpaceAfterAnonymousFunctionKeyword),e.InsertSpaceAfterKeywordsInControlFlowStatements?t.push(this.globalRules.SpaceAfterKeywordInControl):t.push(this.globalRules.NoSpaceAfterKeywordInControl),e.InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?(t.push(this.globalRules.SpaceAfterOpenParen),t.push(this.globalRules.SpaceBeforeCloseParen),t.push(this.globalRules.NoSpaceBetweenParens)):(t.push(this.globalRules.NoSpaceAfterOpenParen),t.push(this.globalRules.NoSpaceBeforeCloseParen),t.push(this.globalRules.NoSpaceBetweenParens)),e.InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?(t.push(this.globalRules.SpaceAfterOpenBracket),t.push(this.globalRules.SpaceBeforeCloseBracket),t.push(this.globalRules.NoSpaceBetweenBrackets)):(t.push(this.globalRules.NoSpaceAfterOpenBracket),t.push(this.globalRules.NoSpaceBeforeCloseBracket),t.push(this.globalRules.NoSpaceBetweenBrackets)),e.InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?(t.push(this.globalRules.SpaceAfterTemplateHeadAndMiddle),t.push(this.globalRules.SpaceBeforeTemplateMiddleAndTail)):(t.push(this.globalRules.NoSpaceAfterTemplateHeadAndMiddle),t.push(this.globalRules.NoSpaceBeforeTemplateMiddleAndTail)),e.InsertSpaceAfterSemicolonInForStatements?t.push(this.globalRules.SpaceAfterSemicolonInFor):t.push(this.globalRules.NoSpaceAfterSemicolonInFor),e.InsertSpaceBeforeAndAfterBinaryOperators?(t.push(this.globalRules.SpaceBeforeBinaryOperator),t.push(this.globalRules.SpaceAfterBinaryOperator)):(t.push(this.globalRules.NoSpaceBeforeBinaryOperator),t.push(this.globalRules.NoSpaceAfterBinaryOperator)),e.PlaceOpenBraceOnNewLineForControlBlocks&&t.push(this.globalRules.NewLineBeforeOpenBraceInControl),e.PlaceOpenBraceOnNewLineForFunctions&&(t.push(this.globalRules.NewLineBeforeOpenBraceInFunction),t.push(this.globalRules.NewLineBeforeOpenBraceInTypeScriptDeclWithBlock)),t=t.concat(this.globalRules.LowPriorityCommonRules)},n}();t.RulesProvider=n}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){function n(t,n,r,i){var a=n.getLineAndCharacterOfPosition(t).line;return 0===a?[]:m({pos:e.getStartPositionOfLine(a-1,n),end:e.getEndLinePosition(a,n)+1},n,i,r,2)}function r(e,t,n,r){return s(e,23,t,r,n,3)}function i(e,t,n,r){return s(e,16,t,r,n,4)}function a(e,t,n){return m({pos:0,end:e.text.length},e,n,t,0)}function o(t,n,r,i,a){return m({pos:e.getLineStartPositionForPosition(t,r),end:n},r,a,i,1)}function s(t,n,r,i,a,o){var s=u(t,n,r);return s?m({pos:e.getLineStartPositionForPosition(s.getStart(r),r),end:s.end},r,i,a,o):[]}function u(t,n,r){var i=e.findPrecedingToken(t,r);if(i&&i.kind===n&&t===i.getEnd()){for(var a=i;a&&a.parent&&a.parent.end===i.end&&!c(a.parent,a);)a=a.parent;return a}}function c(t,n){switch(t.kind){case 217:case 218:return e.rangeContainsRange(t.members,n);case 221:var r=t.body;return r&&195===r.kind&&e.rangeContainsRange(r.statements,n);case 251:case 195:case 222:return e.rangeContainsRange(t.statements,n);case 247:return e.rangeContainsRange(t.block.statements,n)}return!1}function l(t,n){function r(i){var a=e.forEachChild(i,function(r){return e.startEndContainsRange(r.getStart(n),r.end,t)&&r});if(a){var o=r(a);if(o)return o}return i}return r(n)}function p(t,n){function r(e){return!1}if(!t.length)return r;var i=t.filter(function(t){return e.rangeOverlapsWithStartEnd(n,t.start,t.start+t.length)}).sort(function(e,t){return e.start-t.start});if(!i.length)return r;var a=0;return function(t){for(;;){if(a>=i.length)return!1;var n=i[a];if(t.end<=n.start)return!1;if(e.startEndOverlapsWithStartEnd(t.pos,t.end,n.start,n.start+n.length))return!0;a++}}}function f(t,n,r){var i=t.getStart(r);if(i===n.pos&&t.end===n.end)return i;var a=e.findPrecedingToken(n.pos,r);return a?a.end>=n.pos?t.pos:a.end:t.pos}function d(e,n,r){for(var i,a=-1;e;){var o=r.getLineAndCharacterOfPosition(e.getStart(r)).line;if(a!==-1&&o!==a)break;if(t.SmartIndenter.shouldIndentChildNode(e,i))return n.IndentSize;a=o,i=e,e=e.parent}return 0}function m(n,r,i,a,o){function s(n,a,o,s,u){if(e.rangeOverlapsWithStartEnd(s,n,a)||e.rangeContainsStartEnd(s,n,a)){if(u!==-1)return u}else{var c=r.getLineAndCharacterOfPosition(n).line,l=e.getLineStartPositionForPosition(n,r),p=t.SmartIndenter.findFirstNonWhitespaceColumn(l,n,r,i);if(c!==o||n===p)return p}return-1}function u(e,n,a,o,s,u){var c=a,l=t.SmartIndenter.shouldIndentChildNode(e)?i.IndentSize:0;return u===n?(c=n===P?L:s.getIndentation(),l=Math.min(i.IndentSize,s.getDelta(e)+l)):c===-1&&(c=t.SmartIndenter.childStartsOnTheSameLineWithElseInIfStatement(o,e,n,r)?s.getIndentation():s.getIndentation()+s.getDelta(e)),{indentation:c,delta:l}}function c(e){if(e.modifiers&&e.modifiers.length)return e.modifiers[0].kind;switch(e.kind){case 217:return 73;case 218:return 107;case 216:return 87;case 220:return 220;case 146:return 123;case 147:return 129;case 144:if(e.asteriskToken)return 37;case 142:case 139:return e.name.kind}}function m(e,n,r,a){function o(n,r){return t.SmartIndenter.nodeWillIndentChild(e,r,!0)?n:0}return{getIndentationForComment:function(e,t,n){switch(e){case 16:case 20:case 18:return r+o(a,n)}return t!==-1?t:r},getIndentationForToken:function(t,i,s){if(n!==t&&e.decorators&&i===c(e))return r;switch(i){case 15:case 16:case 19:case 20:case 17:case 18:case 80:case 104:case 55:return r;default:return n!==t?r+o(a,s):r}},getIndentation:function(){return r},getDelta:function(e){return o(a,e)},recomputeIndentation:function(n){e.parent&&t.SmartIndenter.shouldIndentChildNode(e.parent,e)&&(n?r+=i.IndentSize:r-=i.IndentSize,a=t.SmartIndenter.shouldIndentChildNode(e)?i.IndentSize:0)}}}function g(t,i,a,o,c,l){function p(i,a,o,c,l,p,f){var m=i.getStart(r),h=r.getLineAndCharacterOfPosition(m).line,y=h;i.decorators&&(y=r.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(i,r)).line);var _=-1;if(f&&(_=s(m,i.end,l,n,a))!==-1&&(a=_),!e.rangeOverlapsWithStartEnd(n,i.pos,i.end))return a;if(0===i.getFullWidth())return a;for(;B.isOnToken();){var v=B.readTokenInfo(t);if(v.token.end>m)break;d(v,t,c)}if(!B.isOnToken())return a;if(e.isToken(i)){var v=B.readTokenInfo(i);return e.Debug.assert(v.token.end===i.end),d(v,t,c,i),a}var b=140===i.kind?h:p,A=u(i,h,_,t,c,b);return g(i,S,h,y,A.indentation,A.delta),S=t,a}function f(n,i,a,o){var s=h(i,n),c=y(s),l=o,f=a;if(0!==s)for(;B.isOnToken();){var _=B.readTokenInfo(i);if(_.token.end>n.pos)break;if(_.token.kind===s){f=r.getLineAndCharacterOfPosition(_.token.pos).line;var g=u(_.token,f,-1,i,o,a);l=m(i,a,g.indentation,g.delta),d(_,i,l)}else d(_,i,o)}for(var v=-1,b=0,S=n;b<S.length;b++){v=p(S[b],v,t,l,f,f,!0)}if(0!==c&&B.isOnToken()){var _=B.readTokenInfo(i);_.token.kind===c&&e.rangeContainsRange(i,_.token)&&d(_,i,l)}}function d(t,i,a,o){e.Debug.assert(e.rangeContainsRange(i,t.token));var s=B.lastTrailingTriviaWasNewLine(),u=!1;t.leadingTrivia&&v(t.leadingTrivia,i,S,a);var c,l=e.rangeContainsRange(n,t.token),p=r.getLineAndCharacterOfPosition(t.token.pos);if(l){var f=O(t.token),d=I;if(c=b(t.token,p,i,S,a),f)u=!1;else if(void 0!==c)u=c;else{var m=d&&r.getLineAndCharacterOfPosition(d.end).line;u=s&&p.line!==m}}if(t.trailingTrivia&&v(t.trailingTrivia,i,S,a),u){var h=l&&!O(t.token)?a.getIndentationForToken(p.line,t.token.kind,o):-1;if(t.leadingTrivia)for(var y=a.getIndentationForComment(t.token.kind,h,o),_=!0,g=0,E=t.leadingTrivia;g<E.length;g++){var C=E[g];if(e.rangeContainsRange(n,C))switch(C.kind){case 3:T(C,y,!_),_=!1;break;case 2:_&&(A(C.pos,y,!1),_=!1);break;case 4:_=!0}}h!==-1&&(A(t.token.pos,h,c),P=p.line,L=h)}B.advance(),S=i}if(e.rangeOverlapsWithStartEnd(n,t.getStart(r),t.getEnd())){var _=m(t,a,c,l),S=i;for(e.forEachChild(t,function(e){p(e,-1,t,_,a,o,!1)},function(e){f(e,t,a,_)});B.isOnToken();){var E=B.readTokenInfo(t);if(E.token.end>t.end)break;d(E,t,_)}}}function v(t,i,a,o){for(var s=0,u=t;s<u.length;s++){var c=u[s];if(e.isComment(c.kind)&&e.rangeContainsRange(n,c)){b(c,r.getLineAndCharacterOfPosition(c.pos),i,a,o)}}}function b(e,t,i,a,o){var s,u=O(e);if(!u&&!R)if(I)s=S(e,t.line,i,I,M,D,a,o);else{var c=r.getLineAndCharacterOfPosition(n.pos);E(c.line,t.line)}return I=e,D=i,M=t.line,R=u,s}function S(e,t,n,i,o,s,u,c){U.updateContext(i,s,e,n,u);var l,p,f=a.getRulesMap().GetRule(U);return f?(x(f,i,o,e,t),10&f.Operation.Action&&t!==o?(p=!1,n.getStart(r)===e.pos&&c.recomputeIndentation(!1)):4&f.Operation.Action&&t===o&&(p=!0,n.getStart(r)===e.pos&&c.recomputeIndentation(!0)),l=!(8&f.Operation.Action)&&1!==f.Flag):l=!0,t!==o&&l&&E(o,t,i),p}function A(t,n,a){var o=_(n,i);if(a)k(t,0,o);else{var s=r.getLineAndCharacterOfPosition(t);if(n!==s.character){k(e.getStartPositionOfLine(s.line,r),s.character,o)}}}function T(n,a,o){var s,u=r.getLineAndCharacterOfPosition(n.pos).line,c=r.getLineAndCharacterOfPosition(n.end).line;if(u===c)return void(o||A(n.pos,a,!1));s=[];for(var l=n.pos,p=u;p<c;++p){var f=e.getEndLinePosition(p,r);s.push({pos:l,end:f}),l=e.getStartPositionOfLine(p+1,r)}s.push({pos:l,end:n.end});var d=e.getStartPositionOfLine(u,r),m=t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(d,s[0].pos,r,i);if(a!==m.column){var h=0;o&&(h=1,u++);for(var y=a-m.column,g=h,v=s.length;g<v;++g,++u){var b=e.getStartPositionOfLine(u,r),S=0===g?m:t.SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(s[g].pos,s[g].end,r,i),T=S.column+y;if(T>0){var E=_(T,i);k(b,S.character,E)}else w(b,S.character)}}}function E(t,n,i){for(var a=t;a<n;++a){var o=e.getStartPositionOfLine(a,r),s=e.getEndLinePosition(a,r);if(!(i&&(e.isComment(i.kind)||e.isStringOrRegularExpressionOrTemplateLiteral(i.kind))&&i.pos<=s&&i.end>s)){var u=C(o,s);u!==-1&&(e.Debug.assert(u===o||!e.isWhiteSpace(r.text.charCodeAt(u-1))),w(u,s+1-u))}}}function C(t,n){for(var i=n;i>=t&&e.isWhiteSpace(r.text.charCodeAt(i));)i--;return i!==n?i+1:-1}function N(t,n,r){return{span:e.createTextSpan(t,n),newText:r}}function w(e,t){t&&V.push(N(e,t,\"\"))}function k(e,t,n){(t||n)&&V.push(N(e,t,n))}function x(e,t,n,a,o){switch(e.Operation.Action){case 1:return;case 8:t.end!==a.pos&&w(t.end,a.pos-t.end);break;case 4:if(1!==e.Flag&&n!==o)return;1!==o-n&&k(t.end,a.pos-t.end,i.NewLineCharacter);break;case 2:if(1!==e.Flag&&n!==o)return;1===a.pos-t.end&&32===r.text.charCodeAt(t.end)||k(t.end,a.pos-t.end,\" \")}}var R,I,D,M,P,L,O=p(r.parseDiagnostics,n),U=new t.FormattingContext(r,o),F=l(n,r),B=t.getFormattingScanner(r,f(F,n,r),n.end),K=t.SmartIndenter.getIndentationForNode(F,n,r,i),V=[];if(B.advance(),B.isOnToken()){var j=r.getLineAndCharacterOfPosition(F.getStart(r)).line,W=j;F.decorators&&(W=r.getLineAndCharacterOfPosition(e.getNonDecoratorTokenPosOfNode(F,r)).line);g(F,F,j,W,K,d(F,i,r))}if(!B.isOnToken()){var q=B.getCurrentLeadingTrivia();q&&(v(q,F,F,void 0),function(){var e=I?I.end:n.pos;E(r.getLineAndCharacterOfPosition(e).line,r.getLineAndCharacterOfPosition(n.end).line+1,I)}())}return B.close(),V}function h(e,t){switch(e.kind){case 145:case 216:case 176:case 144:case 143:case 177:if(e.typeParameters===t)return 25;if(e.parameters===t)return 17;break;case 171:case 172:if(e.typeArguments===t)return 25;if(e.arguments===t)return 17;break;case 152:if(e.typeArguments===t)return 25}return 0}function y(e){switch(e){case 17:return 18;case 25:return 27}return 0}function _(e,t){function n(e,t){for(var n=\"\",r=0;r<t;++r)n+=e;return n}if((!v||v.tabSize!==t.TabSize||v.indentSize!==t.IndentSize)&&(v={tabSize:t.TabSize,indentSize:t.IndentSize},b=S=void 0),t.ConvertTabsToSpaces){var r=void 0,i=Math.floor(e/t.IndentSize),a=e%t.IndentSize;return S||(S=[]),void 0===S[i]?(r=n(\" \",t.IndentSize*i),S[i]=r):r=S[i],a?r+n(\" \",a):r}var o=Math.floor(e/t.TabSize),s=e-o*t.TabSize,u=void 0;return b||(b=[]),void 0===b[o]?b[o]=u=n(\"\\t\",o):u=b[o],s?u+n(\" \",s):u}var g;!function(e){e[e.Unknown=-1]=\"Unknown\"}(g||(g={})),t.formatOnEnter=n,t.formatOnSemicolon=r,t.formatOnClosingCurly=i,t.formatDocument=a,t.formatSelection=o;var v,b,S;t.getIndentationString=_}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){!function(t){!function(t){function n(n,r,a){if(n>r.text.length)return 0;if(a.IndentStyle===e.IndentStyle.None)return 0;var s=e.findPrecedingToken(n,r);if(!s)return 0;if(e.isStringOrRegularExpressionOrTemplateLiteral(s.kind)&&s.getStart(r)<=n&&s.end>n)return 0;var l=r.getLineAndCharacterOfPosition(n).line;if(a.IndentStyle===e.IndentStyle.Block){for(var p=n;p>0;){var m=r.text.charCodeAt(p);if(!e.isWhiteSpace(m)&&!e.isLineBreak(m))break;p--}var h=e.getLineStartPositionForPosition(p,r);return t.findFirstNonWhitespaceColumn(h,p,r,a)}if(24===s.kind&&184!==s.parent.kind){var y=o(s,r,a);if(y!==-1)return y}for(var _,g,v,S=s;S;){if(e.positionBelongsToNode(S,n,r)&&b(S,_)){g=c(S,r),v=u(s,S,l,r)?0:l!==g.line?a.IndentSize:0;break}var y=f(S,r,a);if(y!==-1)return y;if((y=d(S,r,a))!==-1)return y+a.IndentSize;_=S,S=S.parent}return S?i(S,g,void 0,v,r,a):0}function r(e,t,n,r){return i(e,n.getLineAndCharacterOfPosition(e.getStart(n)),t,0,n,r)}function i(e,t,n,r,i,o){for(var u,c=e.parent;c;){var p=!0;if(n){var m=e.getStart(i);p=m<n.pos||m>n.end}if(p){var h=f(e,i,o);if(h!==-1)return h+r}u=a(c,e,i);var y=u.line===t.line||l(c,e,t.line,i);if(p){var h=s(e,c,t,y,i,o);if(h!==-1)return h+r;if((h=d(e,i,o))!==-1)return h+r}b(c,e)&&!y&&(r+=o.IndentSize),e=c,t=u,c=e.parent}return r}function a(e,t,n){var r=p(t,n);return r?n.getLineAndCharacterOfPosition(r.pos):n.getLineAndCharacterOfPosition(e.getStart(n))}function o(t,n,r){var i=e.findListItemInfo(t);return i&&i.listItemIndex>0?m(i.list.getChildren(),i.listItemIndex-1,n,r):-1}function s(t,n,r,i,a,o){return!e.isDeclaration(t)&&!e.isStatement(t)||251!==n.kind&&i?-1:h(r,a,o)}function u(t,n,r,i){var a=e.findNextToken(t,n);if(!a)return!1;if(15===a.kind)return!0;if(16===a.kind){return r===c(a,i).line}return!1}function c(e,t){return t.getLineAndCharacterOfPosition(e.getStart(t))}function l(t,n,r,i){if(199===t.kind&&t.elseStatement===n){var a=e.findChildOfKind(t,80,i);e.Debug.assert(void 0!==a);return c(a,i).line===r}return!1}function p(t,n){if(t.parent)switch(t.parent.kind){case 152:if(t.parent.typeArguments&&e.rangeContainsStartEnd(t.parent.typeArguments,t.getStart(n),t.getEnd()))return t.parent.typeArguments;break;case 168:return t.parent.properties;case 167:return t.parent.elements;case 216:case 176:case 177:case 144:case 143:case 148:case 149:var r=t.getStart(n);if(t.parent.typeParameters&&e.rangeContainsStartEnd(t.parent.typeParameters,r,t.getEnd()))return t.parent.typeParameters;if(e.rangeContainsStartEnd(t.parent.parameters,r,t.getEnd()))return t.parent.parameters;break;case 172:case 171:var r=t.getStart(n);if(t.parent.typeArguments&&e.rangeContainsStartEnd(t.parent.typeArguments,r,t.getEnd()))return t.parent.typeArguments;if(t.parent.arguments&&e.rangeContainsStartEnd(t.parent.arguments,r,t.getEnd()))return t.parent.arguments}}function f(t,n,r){var i=p(t,n);return i?function(i){var a=e.indexOf(i,t);return a!==-1?m(i,a,n,r):-1}(i):-1}function d(e,t,n){if(18===e.kind)return-1;if(e.parent&&(171===e.parent.kind||172===e.parent.kind)&&e.parent.expression!==e){var r=e.parent.expression,i=function(e){for(;;)switch(e.kind){case 171:case 172:case 169:case 170:e=e.expression;break;default:return e}}(r);if(r===i)return-1;var a=t.getLineAndCharacterOfPosition(r.end),o=t.getLineAndCharacterOfPosition(i.end);return a.line===o.line?-1:h(a,t,n)}return-1}function m(t,n,r,i){e.Debug.assert(n>=0&&n<t.length);for(var a=t[n],o=c(a,r),s=n-1;s>=0;--s)if(24!==t[s].kind){var u=r.getLineAndCharacterOfPosition(t[s].end).line;if(u!==o.line)return h(o,r,i);o=c(t[s],r)}return-1}function h(e,t,n){var r=t.getPositionOfLineAndCharacter(e.line,0);return _(r,r+e.character,t,n)}function y(t,n,r,i){for(var a=0,o=0,s=t;s<n;++s){var u=r.text.charCodeAt(s);if(!e.isWhiteSpace(u))break;9===u?o+=i.TabSize+o%i.TabSize:o++,a++}return{column:o,character:a}}function _(e,t,n,r){return y(e,t,n,r).column}function g(e){switch(e){case 198:case 217:case 189:case 218:case 220:case 219:case 167:case 195:case 222:case 168:case 156:case 158:case 223:case 245:case 244:case 175:case 169:case 171:case 172:case 196:case 214:case 230:case 207:case 185:case 165:case 164:case 238:case 237:case 243:case 143:case 148:case 149:case 139:case 153:case 154:case 161:case 173:case 181:case 228:return!0}return!1}function v(e,t,n){var r=t?t.kind:0;switch(e.kind){case 200:case 201:case 203:case 204:case 202:case 199:case 216:case 176:case 144:case 177:case 145:case 146:case 147:return 195!==r;case 236:return 240!==r}return n}function b(e,t){return g(e.kind)||v(e,t,!1)}var S;!function(e){e[e.Unknown=-1]=\"Unknown\"}(S||(S={})),t.getIndentation=n,t.getIndentationForNode=r,t.childStartsOnTheSameLineWithElseInIfStatement=l,t.findFirstNonWhitespaceCharacterAndColumn=y,t.findFirstNonWhitespaceColumn=_,t.nodeWillIndentChild=v,t.shouldIndentChildNode=b}(t.SmartIndenter||(t.SmartIndenter={}))}(e.formatting||(e.formatting={}))}(o||(o={}));var o;!function(e){function t(e,t,n,r,i){var a=new j(e,t,n);return a.flags=r,a.parent=i,a}function n(t,n,r){var i=[],a=function(){function i(t,n){return e.map(e.getJsDocComments(t,n),function(e){return{pos:e.pos+\"/*\".length,end:e.end-\"*/\".length}})}function a(t,n,r,i){for(void 0!==i&&(n=Math.min(n,t+i));t<n;t++){var a=r.text.charCodeAt(t);if(!e.isWhiteSpace(a)||e.isLineBreak(a))return t}return n}function o(t,n,r){for(;t<n&&e.isLineBreak(r.text.charCodeAt(t));)t++;return t}function s(t,n,r,i){return t+i.length<n&&r.text.substr(t,i.length)===i&&(e.isWhiteSpace(r.text.charCodeAt(t+i.length))||e.isLineBreak(r.text.charCodeAt(t+i.length)))}function u(e,t,n){return s(e,t,n,f)}function c(t,n,r){for(;r;)r--,t.push(e.textPart(\"\"));t.push(e.textPart(n))}function l(t,n,r){for(var i,s=[],l=0,p=!1;t<n;){var d=\"\";if((t=a(t,n,r))<n&&42===r.text.charCodeAt(t)){var m=t+1;t=a(t+1,n,r,i),void 0===i&&t<n&&!e.isLineBreak(r.text.charCodeAt(t))&&(i=t-m)}else void 0===i&&(i=0);for(;t<n&&!e.isLineBreak(r.text.charCodeAt(t));){var h=r.text.charAt(t);if(\"@\"===h){if(u(t,n,r)){p=!0,t+=f.length;continue}p=!1}p||(d+=h),t++}t=o(t,n,r),d?(c(s,d,l),l=0):!p&&s.length&&l++}return s}function p(t,r,i){function l(t){for(;t<r&&e.isWhiteSpace(i.text.charCodeAt(t));)t++;return t}for(var p,d=[];t<r;){if(u(t,r,i)){var m=0,h=!1;if((t=l(t+f.length))>=r)break;if(123===i.text.charCodeAt(t)){t++;for(var y=1;t<r;t++){var _=i.text.charCodeAt(t);if(123!==_){if(125!==_){if(64===_)break}else if(0===--y){t++;break}}else y++}if((t=l(t))>=r)break}if(s(t,r,i,n)){if((t=l(t+n.length))>=r)break;for(var g=\"\",v=t;t<r;){var b=i.text.charCodeAt(t);if(e.isLineBreak(b))g?(c(d,g,m),g=\"\",m=0,h=!0):h&&m++,function(e){if(!((t=o(t,r,i))>=r)){void 0===p&&(p=i.getLineAndCharacterOfPosition(e).character);var n=t;if(!((t=a(t,r,i,p))>=r)){var s=t-n;s<p&&42===i.text.charCodeAt(t)&&(t=a(t+1,r,i,p-s-1))}}}(v);else{if(64===b)break;g+=i.text.charAt(t),t++}}g&&c(d,g,m),p=void 0}if(64===i.text.charCodeAt(t))continue}t++}return d}var f=\"@param\",d=[];return e.forEach(t,function(n,a){if(e.indexOf(t,n)===a){var o=e.getSourceFileOfNode(n);if(r&&139===n.kind&&e.forEach(i(n.parent,o),function(t){var n=p(t.pos,t.end,o);n&&e.addRange(d,n)}),221===n.kind&&221===n.body.kind)return;for(;221===n.kind&&221===n.parent.kind;)n=n.parent;e.forEach(i(214===n.kind?n.parent.parent:n,o),function(t){var n=l(t.pos,t.end,o);n&&e.addRange(d,n)})}}),d}();return e.forEach(a,function(t){i.length&&i.push(e.lineBreakPart()),i.push(t)}),i}function r(t){return t?e.map(t,function(e){return e.text}).join(\"\"):\"\"}function i(t){return!t.parent&&e.forEach(t.declarations,function(t){if(176===t.kind)return!0;if(214!==t.kind&&216!==t.kind)return!1;for(var n=t.parent;!e.isFunctionBlock(n);n=n.parent)if(251===n.kind||222===n.kind)return!1;return!0})}function o(){return{target:1,jsx:1}}function u(e,t,n){e.version=n,e.scriptSnapshot=t}function c(t,n){var r=n.compilerOptions?e.clone(n.compilerOptions):o();r.isolatedModules=!0,r.suppressOutputPathCheck=!0,r.allowNonTsExtensions=!0,r.noLib=!0,r.noResolve=!0;var i=n.fileName||(r.jsx?\"module.tsx\":\"module.ts\"),a=e.createSourceFile(i,t,r.target);n.moduleName&&(a.moduleName=n.moduleName),a.renamedDependencies=n.renamedDependencies;var s,u,c,l=e.getNewLineCharacter(r),p={getSourceFile:function(t,n){return t===e.normalizeSlashes(i)?a:void 0},writeFile:function(t,n,r){e.fileExtensionIs(t,\".map\")?(e.Debug.assert(void 0===u,\"Unexpected multiple source map outputs for the file '\"+t+\"'\"),u=n):(e.Debug.assert(void 0===s,\"Unexpected multiple outputs for the file: '\"+t+\"'\"),s=n)},getDefaultLibFileName:function(){return\"lib.d.ts\"},useCaseSensitiveFileNames:function(){return!1},getCanonicalFileName:function(e){return e},getCurrentDirectory:function(){return\"\"},getNewLine:function(){return l},fileExists:function(e){return e===i},readFile:function(e){return\"\"},directoryExists:function(e){return!0}},f=e.createProgram([i],r,p);return n.reportDiagnostics&&(c=[],e.addRange(c,f.getSyntacticDiagnostics(a)),e.addRange(c,f.getOptionsDiagnostics())),f.emit(),e.Debug.assert(void 0!==s,\"Output generation failed\"),{outputText:s,diagnostics:c,sourceMapText:u}}function l(t,n,r,i,a){var o=c(t,{compilerOptions:n,fileName:r,reportDiagnostics:!!i,moduleName:a});return e.addRange(i,o.diagnostics),o.outputText}function p(t,n,r,i,a){var o=n.getText(0,n.getLength()),s=e.createSourceFile(t,o,r,a);return u(s,n,i),s}function f(t,n,r,i,a){if(i&&r!==t.version&&!e.disableIncrementalParsing){var o=void 0,s=0!==i.span.start?t.text.substr(0,i.span.start):\"\",c=e.textSpanEnd(i.span)!==t.text.length?t.text.substr(e.textSpanEnd(i.span)):\"\";if(0===i.newLength)o=s&&c?s+c:s||c;else{var l=n.getText(i.span.start,i.span.start+i.newLength);o=s&&c?s+l+c:s?s+l:l+c}var f=e.updateSourceFile(t,o,i,a);return u(f,n,r),f.nameTable=void 0,t!==f&&t.scriptSnapshot&&(t.scriptSnapshot.dispose&&t.scriptSnapshot.dispose(),t.scriptSnapshot=void 0),f}return p(t.fileName,n,t.languageVersion,r,!0)}function d(t,n){function r(e){return\"_\"+e.target+\"|\"+e.module+\"|\"+e.noResolve+\"|\"+e.jsx+NaN+e.allowJs}function i(t,n){var i=r(t),a=e.lookUp(l,i);return!a&&n&&(l[i]=a=e.createFileMap()),a}function a(){var t=Object.keys(l).filter(function(e){return e&&\"_\"===e.charAt(0)}).map(function(t){var n=e.lookUp(l,t),r=[];return n.forEachValue(function(e,t){r.push({name:e,refCount:t.languageServiceRefCount,references:t.owners.slice(0)})}),r.sort(function(e,t){return t.refCount-e.refCount}),{bucket:t,sourceFiles:r}});return JSON.stringify(t,void 0,2)}function o(e,t,n,r){return u(e,t,n,r,!0)}function s(e,t,n,r){return u(e,t,n,r,!1)}function u(t,r,a,o,s){var u=i(r,!0),c=e.toPath(t,n,d),l=u.get(c);if(l)l.sourceFile.version!==o&&(l.sourceFile=f(l.sourceFile,a,o,a.getChangeRange(l.sourceFile.scriptSnapshot)));else{e.Debug.assert(s,\"How could we be trying to update a document that the registry doesn't have?\");l={sourceFile:p(t,a,r.target,o,!1),languageServiceRefCount:0,owners:[]},u.set(c,l)}return s&&l.languageServiceRefCount++,l.sourceFile}function c(t,r){var a=i(r,!1);e.Debug.assert(void 0!==a);var o=e.toPath(t,n,d),s=a.get(o);s.languageServiceRefCount--,e.Debug.assert(s.languageServiceRefCount>=0),0===s.languageServiceRefCount&&a.remove(o)}void 0===n&&(n=\"\");var l={},d=e.createGetCanonicalFileName(!!t);return{acquireDocument:o,updateDocument:s,releaseDocument:c,reportStats:a}}function m(t,n,r){function i(){p||(p=[]),p.push(B.getTokenValue())}function a(){var e=B.getTokenValue(),t=B.getTokenPos();d.push({fileName:e,pos:t,end:t+e.length})}function o(){var e=B.getToken();return 122===e&&(e=B.scan(),125===e&&9===(e=B.scan())&&i(),!0)}function s(){var t=B.getToken();if(89===t){if(9===(t=B.scan()))return a(),!0;if(69===t||e.isKeyword(t))if(133===(t=B.scan())){if(9===(t=B.scan()))return a(),!0}else if(56===t){if(c(!0))return!0}else{if(24!==t)return!0;t=B.scan()}if(15===t){for(t=B.scan();16!==t&&1!==t;)t=B.scan();16===t&&133===(t=B.scan())&&9===(t=B.scan())&&a()}else 37===t&&116===(t=B.scan())&&(69===(t=B.scan())||e.isKeyword(t))&&133===(t=B.scan())&&9===(t=B.scan())&&a();return!0}return!1}function u(){var t=B.getToken();if(82===t){if(15===(t=B.scan())){for(t=B.scan();16!==t&&1!==t;)t=B.scan();16===t&&133===(t=B.scan())&&9===(t=B.scan())&&a()}else if(37===t)133===(t=B.scan())&&9===(t=B.scan())&&a();else if(89===t&&(69===(t=B.scan())||e.isKeyword(t))&&56===(t=B.scan())&&c(!0))return!0;return!0}return!1}function c(e){var t=e?B.scan():B.getToken();return 127===t&&(t=B.scan(),17===t&&9===(t=B.scan())&&a(),!0)}function l(){var e=B.getToken();if(69===e&&\"define\"===B.getTokenValue()){if(17!==(e=B.scan()))return!0;if(9===(e=B.scan())){if(24!==(e=B.scan()))return!0;e=B.scan()}if(19!==e)return!0;e=B.scan();for(var t=0;20!==e&&1!==e;)9===e&&(a(),t++),e=B.scan();return!0}return!1}void 0===n&&(n=!0),void 0===r&&(r=!1);var p,f=[],d=[],m=!1;return n&&function(){for(B.setText(t),B.scan();1!==B.getToken();)o()||s()||u()||r&&(c(!1)||l())||B.scan();B.setText(void 0)}(),function(){var n=e.getLeadingCommentRanges(t,0);e.forEach(n,function(n){var r=t.substring(n.pos,n.end),i=e.getFileReferenceFromReferencePath(r,n);if(i){m=i.isNoDefaultLib;var a=i.fileReference;a&&f.push(a)}})}(),{referencedFiles:f,importedFiles:d,isLibFile:m,ambientExternalModules:p}}function h(e,t){for(;e;){if(210===e.kind&&e.label.text===t)return e.label;e=e.parent}}function y(e){return 69===e.kind&&(206===e.parent.kind||205===e.parent.kind)&&e.parent.label===e}function _(e){return 69===e.kind&&210===e.parent.kind&&e.parent.label===e}function g(e,t){for(var n=e.parent;210===n.kind;n=n.parent)if(n.label.text===t)return!0;return!1}function v(e){return _(e)||y(e)}function b(e){return 136===e.parent.kind&&e.parent.right===e}function S(e){return e&&e.parent&&169===e.parent.kind&&e.parent.name===e}function A(e){return S(e)&&(e=e.parent),e&&e.parent&&171===e.parent.kind&&e.parent.expression===e}function T(e){return S(e)&&(e=e.parent),e&&e.parent&&172===e.parent.kind&&e.parent.expression===e}function E(e){return 221===e.parent.kind&&e.parent.name===e}function C(t){return 69===t.kind&&e.isFunctionLike(t.parent)&&t.parent.name===t}function N(e){return!(69!==e.kind&&9!==e.kind&&8!==e.kind||248!==e.parent.kind&&249!==e.parent.kind||e.parent.name!==e)}function w(e){if(9===e.kind||8===e.kind)switch(e.parent.kind){case 142:case 141:case 248:case 250:case 144:case 143:case 146:case 147:case 221:return e.parent.name===e;case 170:return e.parent.argumentExpression===e}return!1}function k(t){return 9===t.kind&&(E(t)||e.isExternalModuleImportEqualsDeclaration(t.parent.parent)&&e.getExternalModuleImportEqualsDeclarationExpression(t.parent.parent)===t)}function x(t,n,r){function i(n){return e.forEach(n,function(e){if(e.pos<r&&r<e.end)return!0;if(r===e.end){var n=t.text;return e.end-e.pos<=2||47===n.charCodeAt(e.pos+1)||!(47===n.charCodeAt(e.end-1)&&42===n.charCodeAt(e.end-2))}return!1})}return r<=n.getStart(t)&&(i(e.getTrailingCommentRanges(t.text,n.getFullStart()))||i(e.getLeadingCommentRanges(t.text,n.getFullStart())))}function R(e){for(;;){if(!(e=e.parent))return;switch(e.kind){case 251:case 144:case 143:case 216:case 176:case 146:case 147:case 217:case 218:case 220:case 221:return e}}}function I(t){switch(t.kind){case 221:return X.moduleElement;case 217:return X.classElement;case 218:return X.interfaceElement;case 219:return X.typeElement;case 220:return X.enumElement;case 214:return e.isConst(t)?X.constElement:e.isLet(t)?X.letElement:X.variableElement;case 216:return X.functionElement;case 146:return X.memberGetAccessorElement;case 147:return X.memberSetAccessorElement;case 144:case 143:return X.memberFunctionElement;case 142:case 141:return X.memberVariableElement;case 150:return X.indexSignatureElement;case 149:return X.constructSignatureElement;case 148:return X.callSignatureElement;case 145:return X.constructorImplementationElement;case 138:return X.typeParameterElement;case 250:return X.variableElement;case 139:return 56&t.flags?X.memberVariableElement:X.parameterElement;case 224:case 229:case 226:case 233:case 227:return X.alias}return X.unknown}function D(t,n){function r(e){t.log&&t.log(e)}function a(e){var t=Je.getSourceFile(e);if(!t)throw new Error(\"Could not find file: '\"+e+\"'.\");return t}function o(t){return Ye||(Ye=new e.formatting.RulesProvider),Ye.ensureUpToDate(t),Ye}function s(){function r(t){e.Debug.assert(void 0!==o);var r=o.getOrCreateEntry(t);if(r){if(!c){if(Je&&Je.getSourceFile(t))return n.updateDocument(t,u,r.scriptSnapshot,r.version)}return n.acquireDocument(t,u,r.scriptSnapshot,r.version)}}function i(t){if(!t)return!1;var n=t.path||e.toPath(t.fileName,Ze,et);return t.version===o.getVersion(n)}if(t.getProjectVersion){var a=t.getProjectVersion();if(a){if(Ge===a)return;Ge=a}}var o=new ee(t,et);if(!function(){if(!Je)return!1;var t=o.getRootFileNames();if(Je.getSourceFiles().length!==t.length)return!1;for(var n=0,r=t;n<r.length;n++){var a=r[n];if(!i(Je.getSourceFile(a)))return!1}return e.compareDataObjects(Je.getCompilerOptions(),o.compilationSettings())}()){var s=Je&&Je.getCompilerOptions(),u=o.compilationSettings(),c=s&&(s.target!==u.target||s.module!==u.module||s.noResolve!==u.noResolve||s.jsx!==u.jsx||s.allowJs!==u.allowJs),l={getSourceFile:r,getCancellationToken:function(){return Qe},getCanonicalFileName:et,useCaseSensitiveFileNames:function(){return $e},getNewLine:function(){return e.getNewLineOrDefaultFromHost(t)},getDefaultLibFileName:function(e){return t.getDefaultLibFileName(e)},writeFile:function(e,t,n){},getCurrentDirectory:function(){return Ze},fileExists:function(n){return e.Debug.assert(!t.resolveModuleNames),void 0!==o.getOrCreateEntry(n)},readFile:function(e){var t=o.getOrCreateEntry(e);return t&&t.scriptSnapshot.getText(0,t.scriptSnapshot.getLength())},directoryExists:function(n){return e.Debug.assert(!t.resolveModuleNames),e.directoryProbablyExists(n,t)}};t.resolveModuleNames&&(l.resolveModuleNames=function(e,n){return t.resolveModuleNames(e,n)});var p=e.createProgram(o.getRootFileNames(),u,l,Je);if(Je)for(var f=Je.getSourceFiles(),d=0,m=f;d<m.length;d++){var h=m[d];p.getSourceFile(h.fileName)&&!c||n.releaseDocument(h.fileName,s)}o=void 0,Je=p,Je.getTypeChecker()}}function u(){return s(),Je}function c(){}function l(){Je&&e.forEach(Je.getSourceFiles(),function(e){return n.releaseDocument(e.fileName,Je.getCompilerOptions())})}function p(e){return s(),Je.getSyntacticDiagnostics(a(e),Qe)}function f(t){s();var n=a(t),r=Je.getSemanticDiagnostics(n,Qe);if(!Je.getCompilerOptions().declaration)return r;var i=Je.getDeclarationDiagnostics(n,Qe);return e.concatenate(r,i)}function m(){return s(),Je.getOptionsDiagnostics(Qe).concat(Je.getGlobalDiagnostics(Qe))}function _(t,n,r,i){var a=e.getDeclaredName(Je.getTypeChecker(),t,i);if(a){var o=a.charCodeAt(0);if(1536&t.flags&&(39===o||34===o))return}return I(a,n,r)}function I(t,n,r){if(t&&(t=e.stripQuotes(t))&&(!r||e.isIdentifier(t,n)))return t}function D(t,n){function i(e){if(e){for(var t=0,n=e.getApparentProperties();t<n.length;t++){var r=n[t];A.isValidPropertyAccess(O.parent,r.name)&&Y.push(r)}if(E&&16384&e.flags)for(var a=e,o=0,s=a.types;o<s.length;o++){var u=s[o];i(u)}}}function o(){var t,r,i;if(t=d(P))return p(t);if(r=m(P))return f(r);if(i=h(P)){var a=void 0;if((237===i.kind||238===i.kind)&&(a=A.getJsxElementAttributesType(i)))return Y=S(A.getPropertiesOfType(a),i.attributes),q=!0,z=!1,!0}q=!1,z=c(P),M!==P&&e.Debug.assert(!!M,\"Expected 'contextToken' to be defined when different from 'previousToken'.\");var o=M!==P?M.getStart():n,u=s(P,o,T)||T;return Y=A.getSymbolsInScope(u,9289727),!0}function s(t,n,r){for(var i=t;i&&!e.positionBelongsToNode(i,n,r);)i=i.parent;return i}function u(e){if(239===e.kind)return!0;if(27===e.kind&&e.parent){if(238===e.parent.kind)return!0;if(240===e.parent.kind||237===e.parent.kind)return e.parent.parent&&236===e.parent.parent.kind}return!1}function c(e){if(e){var t=e.parent.kind;switch(e.kind){case 24:return 171===t||145===t||172===t||167===t||184===t||153===t;case 17:return 171===t||145===t||172===t||175===t||161===t;case 19:return 167===t||150===t||137===t;case 125:case 126:return!0;case 21:return 221===t;case 15:return 217===t;case 56:return 214===t||184===t;case 12:return 186===t;case 13:return 193===t;case 112:case 110:case 111:return 142===t}switch(e.getText()){case\"public\":case\"protected\":case\"private\":return!0}}return!1}function l(t){if(9===t.kind||163===t.kind||10===t.kind||e.isTemplateLiteralKind(t.kind)){var r=t.getStart(),i=t.getEnd();if(r<n&&n<i)return!0;if(n===i)return!!t.isUnterminated||10===t.kind}return!1}function p(t){q=!0;var n,r;if(168===t.kind)z=!0,n=A.getContextualType(t),r=t.properties;else if(164===t.kind){z=!1;var i=e.getRootDeclaration(t.parent);e.isVariableLike(i)?(i.initializer||i.type)&&(n=A.getTypeAtLocation(t),r=t.elements):e.Debug.fail(\"Root declaration is not variable-like.\")}else e.Debug.fail(\"Expected object literal or binding pattern, got \"+t.kind);if(!n)return!1;var a=A.getPropertiesOfType(n);return a&&a.length>0&&(Y=b(a,r)),!0}function f(t){var n=228===t.kind?225:231,r=e.getAncestor(t,n);if(!r.moduleSpecifier)return!1;q=!0,z=!1;var i,a=A.getSymbolAtLocation(r.moduleSpecifier);return a&&(i=A.getExportsOfModule(a)),Y=i?v(i,t.elements):K,!0}function d(e){if(e)switch(e.kind){case 15:case 24:var t=e.parent;if(t&&(168===t.kind||164===t.kind))return t}}function m(e){if(e)switch(e.kind){case 15:case 24:switch(e.parent.kind){case 228:case 232:return e.parent}}}function h(e){if(e){var t=e.parent;switch(e.kind){case 26:case 39:case 69:case 241:case 242:if(t&&(237===t.kind||238===t.kind))return t;if(241===t.kind)return t.parent;break;case 9:if(t&&(241===t.kind||242===t.kind))return t.parent;break;case 16:if(t&&243===t.kind&&t.parent&&241===t.parent.kind)return t.parent.parent;if(t&&242===t.kind)return t.parent}}}function y(e){switch(e){case 176:case 177:case 216:case 144:case 143:case 146:case 147:case 148:case 149:case 150:return!0}return!1}function _(e){var t=e.parent.kind;switch(e.kind){case 24:return 214===t||215===t||196===t||220===t||y(t)||217===t||189===t||218===t||165===t||219===t;case 21:return 165===t;case 54:return 166===t;case 19:return 165===t;case 17:return 247===t||y(t);case 15:return 220===t||218===t||156===t;case 23:return 141===t&&e.parent&&e.parent.parent&&(218===e.parent.parent.kind||156===e.parent.parent.kind);case 25:return 217===t||189===t||218===t||219===t||y(t);case 113:return 142===t;case 22:return 139===t||e.parent&&e.parent.parent&&165===e.parent.parent.kind;case 112:case 110:case 111:return 139===t;case 116:return 229===t||233===t||227===t;case 73:case 81:case 107:case 87:case 102:case 123:case 129:case 89:case 108:case 74:case 114:case 132:return!0}switch(e.getText()){case\"abstract\":case\"async\":case\"class\":case\"const\":case\"declare\":case\"enum\":case\"function\":case\"interface\":case\"let\":case\"private\":case\"protected\":case\"public\":case\"static\":case\"var\":case\"yield\":return!0}return!1}function g(e){if(8===e.kind){var t=e.getFullText();return\".\"===t.charAt(t.length-1)}return!1}function v(t,r){for(var i={},a=0,o=r;a<o.length;a++){var s=o[a];if(!(s.getStart()<=n&&n<=s.getEnd())){i[(s.propertyName||s.name).text]=!0}}return e.isEmpty(i)?t:e.filter(t,function(t){return!e.lookUp(i,t.name)})}function b(t,r){if(!r||0===r.length)return t;for(var i={},a=0,o=r;a<o.length;a++){var s=o[a];if((248===s.kind||249===s.kind||166===s.kind||144===s.kind)&&!(s.getStart()<=n&&n<=s.getEnd())){var u=void 0;166===s.kind&&s.propertyName?69===s.propertyName.kind&&(u=s.propertyName.text):u=s.name.text,i[u]=!0}}return e.filter(t,function(t){return!e.lookUp(i,t.name)})}function S(t,r){for(var i={},a=0,o=r;a<o.length;a++){var s=o[a];s.getStart()<=n&&n<=s.getEnd()||241===s.kind&&(i[s.name.text]=!0)}return e.filter(t,function(t){return!e.lookUp(i,t.name)})}var A=Je.getTypeChecker(),T=a(t),E=e.isSourceFileJavaScript(T),C=!1,N=(new Date).getTime(),w=e.getTokenAtPosition(T,n);r(\"getCompletionData: Get current token: \"+((new Date).getTime()-N)),N=(new Date).getTime();var k=x(T,w,n);if(r(\"getCompletionData: Is inside comment: \"+((new Date).getTime()-N)),k){e.hasDocComment(T,n)&&64===T.text.charCodeAt(n-1)&&(C=!0);var R=!1,I=e.getJsDocTagAtPosition(T,n);if(I)switch(I.tagName.pos<=n&&n<=I.tagName.end&&(C=!0),I.kind){case 272:case 270:case 271:var D=I;D.typeExpression&&(R=D.typeExpression.pos<n&&n<D.typeExpression.end)}if(C)return{symbols:void 0,isMemberCompletion:!1,isNewIdentifierLocation:!1,location:void 0,isRightOfDot:!1,isJsDocTagName:C};if(!R)return void r(\"Returning an empty list because completion was inside a regular comment or plain text part of a JsDoc comment.\")}N=(new Date).getTime();var M=e.findPrecedingToken(n,T);r(\"getCompletionData: Get previous token 1: \"+((new Date).getTime()-N));var P=M;if(P&&n<=P.end&&e.isWord(P.kind)){var L=(new Date).getTime();P=e.findPrecedingToken(P.getFullStart(),T),r(\"getCompletionData: Get previous token 2: \"+((new Date).getTime()-L))}var O=w,U=!1,F=!1,B=!1,V=e.getTouchingPropertyName(T,n);if(P){if(function(e){var t=(new Date).getTime(),n=l(e)||_(e)||g(e)||u(e);return r(\"getCompletionsAtPosition: isCompletionListBlocker: \"+((new Date).getTime()-t)),n}(P))return void r(\"Returning an empty list because completion was requested in an invalid position.\");var j=P.parent,W=P.kind;if(21===W)if(169===j.kind)O=P.parent.expression,U=!0;else{if(136!==j.kind)return;O=P.parent.left,U=!0}else 1===T.languageVariant&&(25===W?(F=!0,V=P):39===W&&240===P.parent.kind&&(B=!0,V=P))}var q,z,H=(new Date).getTime(),Y=[];if(U)!function(){if(q=!0,z=!1,69===O.kind||136===O.kind||169===O.kind){var t=A.getSymbolAtLocation(O);if(t&&8388608&t.flags&&(t=A.getAliasedSymbol(t)),t&&1952&t.flags){var n=A.getExportsOfModule(t);e.forEach(n,function(e){A.isValidPropertyAccess(O.parent,e.name)&&Y.push(e)})}}i(A.getTypeAtLocation(O))}();else if(F){var J=A.getJsxIntrinsicTagNames();Y=o()?J.concat(Y.filter(function(e){return!!(107455&e.flags)})):J,q=!0,z=!1}else if(B){var G=P.parent.parent.openingElement.tagName,X=A.getSymbolAtLocation(G);A.isUnknownSymbol(X)||(Y=[X]),q=!0,z=!1}else if(!o())return;return r(\"getCompletionData: Semantic work: \"+((new Date).getTime()-H)),{symbols:Y,isMemberCompletion:q,isNewIdentifierLocation:z,location:V,isRightOfDot:U||F,isJsDocTagName:C}}function P(t,n){function i(e,t){var n=_(e,Je.getCompilerOptions().target,!0,t);if(n)return{name:n,kind:O(e,t),kindModifiers:B(e),sortText:\"0\"}}function o(t,n){var a=(new Date).getTime(),o={};if(t)for(var s=0,u=t;s<u.length;s++){var c=u[s],l=i(c,f);if(l){var p=e.escapeIdentifier(l.name);e.lookUp(o,p)||(n.push(l),o[p]=p)}}return r(\"getCompletionsAtPosition: getCompletionEntriesFromSymbols: \"+((new Date).getTime()-a)),o}s();var u=D(t,n);if(u){var c=u.symbols,l=u.isMemberCompletion,p=u.isNewIdentifierLocation,f=u.location,d=u.isJsDocTagName;if(d)return{isMemberCompletion:!1,isNewIdentifierLocation:!1,entries:function(){return F||(F=e.map(V,function(e){return{name:e,kind:X.keyword,kindModifiers:\"\",sortText:\"0\"}}))}()};var m=a(t),h=[];if(e.isSourceFileJavaScript(m)){var y=o(c,h);e.addRange(h,function(e,t,n){var r=[],i=Je.getCompilerOptions().target,a=M(e);for(var o in a)if(a[o]!==t&&!n[o]){n[o]=o;var s=I(o,i,!0);if(s){var u={name:s,kind:X.warning,kindModifiers:\"\",sortText:\"1\"};r.push(u)}}return r}(m,f.pos,y))}else{if(!c||0===c.length){if(1!==m.languageVariant||!f.parent||240!==f.parent.kind)return;var g=f.parent.parent.openingElement.tagName;h.push({name:g.text,kind:void 0,kindModifiers:void 0,sortText:\"0\"})}o(c,h)}return l||d||e.addRange(h,ie),{isMemberCompletion:l,isNewIdentifierLocation:p,entries:h}}}function L(t,n,r){s();var i=D(t,n);if(i){var o=i.symbols,u=i.location,c=Je.getCompilerOptions().target,l=e.forEach(o,function(e){return _(e,c,!1,u)===r?e:void 0});if(l){var p=j(l,a(t),u,u,7),f=p.displayParts,d=p.documentation,m=p.symbolKind;return{name:r,kindModifiers:B(l),kind:m,displayParts:f,documentation:d}}}if(e.forEach(ie,function(e){return e.name===r}))return{name:r,kind:X.keyword,kindModifiers:Q.none,displayParts:[e.displayPart(r,G.keyword)],documentation:void 0}}function O(t,n){var r=t.getFlags();if(32&r)return e.getDeclarationOfKind(t,189)?X.localClassElement:X.classElement;if(384&r)return X.enumElement;if(524288&r)return X.typeElement;if(64&r)return X.interfaceElement;if(262144&r)return X.typeParameterElement;var i=U(t,r,n);if(i===X.unknown){if(262144&r)return X.typeParameterElement;if(8&r)return X.variableElement;if(8388608&r)return X.alias;if(1536&r)return X.moduleElement}return i}function U(t,n,r){var a=Je.getTypeChecker();if(a.isUndefinedSymbol(t))return X.variableElement;if(a.isArgumentsSymbol(t))return X.localVariableElement;if(3&n)return e.isFirstDeclarationOfSymbolParameter(t)?X.parameterElement:t.valueDeclaration&&e.isConst(t.valueDeclaration)?X.constElement:e.forEach(t.declarations,e.isLet)?X.letElement:i(t)?X.localVariableElement:X.variableElement;if(16&n)return i(t)?X.localFunctionElement:X.functionElement;if(32768&n)return X.memberGetAccessorElement;if(65536&n)return X.memberSetAccessorElement;if(8192&n)return X.memberFunctionElement;if(16384&n)return X.constructorImplementationElement;if(4&n){if(268435456&n){var o=e.forEach(a.getRootSymbols(t),function(t){var n=t.getFlags();if(98311&n)return X.memberVariableElement;e.Debug.assert(!!(8192&n))});if(!o){return a.getTypeOfSymbolAtLocation(t,r).getCallSignatures().length?X.memberFunctionElement:X.memberVariableElement}return o}return X.memberVariableElement}return X.unknown}function B(t){return t&&t.declarations&&t.declarations.length>0?e.getNodeModifiers(t.declarations[0]):Q.none}function j(t,n,r,i,a){function o(){y.length&&y.push(e.lineBreakPart())}function s(t,r){var i=e.symbolToDisplayParts(h,t,r||n,void 0,3);e.addRange(y,i)}function u(t,n){o(),n&&(c(n),y.push(e.spacePart()),s(t))}function c(t){switch(t){case X.variableElement:case X.functionElement:case X.letElement:case X.constElement:case X.constructorImplementationElement:return void y.push(e.textOrKeywordPart(t));default:return y.push(e.punctuationPart(17)),y.push(e.textOrKeywordPart(t)),void y.push(e.punctuationPart(18))}}function l(t,n,i){e.addRange(y,e.signatureToDisplayParts(h,t,r,32|i)),n.length>1&&(y.push(e.spacePart()),y.push(e.punctuationPart(17)),y.push(e.operatorPart(35)),y.push(e.displayPart((n.length-1).toString(),G.numericLiteral)),y.push(e.spacePart()),y.push(e.textPart(2===n.length?\"overload\":\"overloads\")),y.push(e.punctuationPart(18))),f=t.getDocumentationComment()}function p(t,n){var r=e.mapToDisplayParts(function(e){h.getSymbolDisplayBuilder().buildTypeParameterDisplayFromSymbol(t,e,n)});e.addRange(y,r)}void 0===a&&(a=Te(i));var f,d,m,h=Je.getTypeChecker(),y=[],_=t.flags,g=U(t,_,i);if(g!==X.unknown||32&_||8388608&_){g!==X.memberGetAccessorElement&&g!==X.memberSetAccessorElement||(g=X.memberVariableElement);var v=void 0;if(m=h.getTypeOfSymbolAtLocation(t,i)){if(i.parent&&169===i.parent.kind){var b=i.parent.name;(b===i||b&&0===b.getFullWidth())&&(i=i.parent)}var S=void 0;if(171===i.kind||172===i.kind?S=i:(A(i)||T(i))&&(S=i.parent),S){var E=[];v=h.getResolvedSignature(S,E),!v&&E.length&&(v=E[0]);var N=172===S.kind||95===S.expression.kind,w=N?m.getConstructSignatures():m.getCallSignatures();if(e.contains(w,v.target)||e.contains(w,v)||(v=w.length?w[0]:void 0),v){switch(N&&32&_?(g=X.constructorImplementationElement,u(m.symbol,g)):8388608&_?(g=X.alias,c(g),y.push(e.spacePart()),N&&(y.push(e.keywordPart(92)),y.push(e.spacePart())),s(t)):u(t,g),g){case X.memberVariableElement:case X.variableElement:case X.constElement:case X.letElement:case X.parameterElement:case X.localVariableElement:y.push(e.punctuationPart(54)),y.push(e.spacePart()),N&&(y.push(e.keywordPart(92)),y.push(e.spacePart())),65536&m.flags||e.addRange(y,e.symbolToDisplayParts(h,m.symbol,r,void 0,1)),l(v,w,8);break;default:l(v,w)}d=!0}}else if(C(i)&&!(98304&t.flags)||121===i.kind&&145===i.parent.kind){var k=i.parent,w=145===k.kind?m.getConstructSignatures():m.getCallSignatures();v=h.isImplementationOfOverload(k)?w[0]:h.getSignatureFromDeclaration(k),145===k.kind?(g=X.constructorImplementationElement,u(m.symbol,g)):u(148!==k.kind||2048&m.symbol.flags||4096&m.symbol.flags?t:m.symbol,g),l(v,w),d=!0}}}if(32&_&&!d&&(e.getDeclarationOfKind(t,189)?c(X.localClassElement):y.push(e.keywordPart(73)),y.push(e.spacePart()),s(t),p(t,n)),64&_&&2&a&&(o(),y.push(e.keywordPart(107)),y.push(e.spacePart()),s(t),p(t,n)),524288&_&&(o(),y.push(e.keywordPart(132)),y.push(e.spacePart()),s(t),p(t,n),y.push(e.spacePart()),y.push(e.operatorPart(56)),y.push(e.spacePart()),e.addRange(y,e.typeToDisplayParts(h,h.getDeclaredTypeOfSymbol(t),r))),384&_&&(o(),e.forEach(t.declarations,e.isConstEnumDeclaration)&&(y.push(e.keywordPart(74)),y.push(e.spacePart())),y.push(e.keywordPart(81)),y.push(e.spacePart()),s(t)),1536&_){o();var x=e.getDeclarationOfKind(t,221),R=x&&x.name&&69===x.name.kind;y.push(e.keywordPart(R?126:125)),y.push(e.spacePart()),s(t)}if(262144&_&&2&a)if(o(),y.push(e.punctuationPart(17)),y.push(e.textPart(\"type parameter\")),y.push(e.punctuationPart(18)),y.push(e.spacePart()),s(t),y.push(e.spacePart()),y.push(e.keywordPart(90)),y.push(e.spacePart()),t.parent)s(t.parent,r),p(t.parent,r);else{var x=e.getDeclarationOfKind(t,138);if(e.Debug.assert(void 0!==x),x=x.parent)if(e.isFunctionLikeKind(x.kind)){var v=h.getSignatureFromDeclaration(x);149===x.kind?(y.push(e.keywordPart(92)),y.push(e.spacePart())):148!==x.kind&&x.name&&s(x.symbol),e.addRange(y,e.signatureToDisplayParts(h,v,n,32))}else y.push(e.keywordPart(132)),y.push(e.spacePart()),s(x.symbol),p(x.symbol,n)}if(8&_){u(t,\"enum member\");var x=t.declarations[0];if(250===x.kind){var I=h.getConstantValue(x);void 0!==I&&(y.push(e.spacePart()),y.push(e.operatorPart(56)),y.push(e.spacePart()),y.push(e.displayPart(I.toString(),G.numericLiteral)))}}if(8388608&_&&(o(),y.push(e.keywordPart(89)),y.push(e.spacePart()),s(t),e.forEach(t.declarations,function(t){if(224===t.kind){var n=t;if(e.isExternalModuleImportEqualsDeclaration(n))y.push(e.spacePart()),y.push(e.operatorPart(56)),y.push(e.spacePart()),y.push(e.keywordPart(127)),y.push(e.punctuationPart(17)),y.push(e.displayPart(e.getTextOfNode(e.getExternalModuleImportEqualsDeclarationExpression(n)),G.stringLiteral)),y.push(e.punctuationPart(18));else{var i=h.getSymbolAtLocation(n.moduleReference);i&&(y.push(e.spacePart()),y.push(e.operatorPart(56)),y.push(e.spacePart()),s(i,r))}return!0}})),!d)if(g!==X.unknown){if(m)if(u(t,g),g===X.memberVariableElement||3&_||g===X.localVariableElement)if(y.push(e.punctuationPart(54)),y.push(e.spacePart()),m.symbol&&262144&m.symbol.flags){var D=e.mapToDisplayParts(function(e){h.getSymbolDisplayBuilder().buildTypeParameterDisplay(m,e,r)});e.addRange(y,D)}else e.addRange(y,e.typeToDisplayParts(h,m,r));else if(16&_||8192&_||16384&_||131072&_||98304&_||g===X.memberFunctionElement){var w=m.getCallSignatures();l(w[0],w)}}else g=O(t,i);return f||(f=t.getDocumentationComment()),{displayParts:y,documentation:f,symbolKind:g}}function W(t,n){s();var r=a(t),i=e.getTouchingPropertyName(r,n);if(i&&!v(i)){var o=Je.getTypeChecker(),u=o.getSymbolAtLocation(i);if(u&&!o.isUnknownSymbol(u)){var c=j(u,r,R(i),i);return{kind:c.symbolKind,kindModifiers:B(u),textSpan:e.createTextSpan(i.getStart(),i.getWidth()),displayParts:c.displayParts,documentation:c.documentation}}switch(i.kind){case 69:case 169:case 136:case 97:case 162:case 95:var l=o.getTypeAtLocation(i);if(l)return{kind:X.unknown,kindModifiers:Q.none,textSpan:e.createTextSpan(i.getStart(),i.getWidth()),displayParts:e.typeToDisplayParts(o,l,R(i)),documentation:l.symbol?l.symbol.getDocumentationComment():void 0}}}}function q(t,n,r,i){return{fileName:t.getSourceFile().fileName,textSpan:e.createTextSpanFromBounds(t.getStart(),t.getEnd()),kind:n,name:r,containerKind:void 0,containerName:i}}function z(t,n){function r(t,n,r,i,a,o){var s,u=[];return e.forEach(t,function(e){(n&&145===e.kind||!n&&(216===e.kind||144===e.kind||143===e.kind))&&(u.push(e),e.body&&(s=e))}),s?(o.push(q(s,r,i,a)),!0):!!u.length&&(o.push(q(e.lastOrUndefined(u),r,i,a)),!0)}var i=Je.getTypeChecker(),a=[],o=t.getDeclarations(),s=i.symbolToString(t),u=O(t,n),c=t.parent,l=c?i.symbolToString(c,n):\"\";return function(t,n,i,a,o,s){if((T(n)||121===n.kind)&&32&t.flags){for(var u=0,c=t.getDeclarations();u<c.length;u++){var l=c[u];if(e.isClassLike(l))return r(l.members,!0,i,a,o,s)}e.Debug.fail(\"Expected declaration to have at least one class-like declaration\")}return!1}(t,n,u,s,l,a)||function(e,t,n,i,a,o){return!!(A(t)||T(t)||C(t))&&r(e.declarations,!1,n,i,a,o)}(t,n,u,s,l,a)||e.forEach(o,function(e){a.push(q(e,u,s,l))}),a}function H(t,n){s();var r=a(t),i=e.getTouchingPropertyName(r,n);if(i){if(y(i)){var o=i.text,u=h(i.parent,i.text);return u?[q(u,X.label,o,void 0)]:void 0}var c=e.forEach(r.referencedFiles,function(e){return e.pos<=n&&n<e.end?e:void 0});if(c){var l=e.tryResolveScriptReference(Je,r,c);if(l)return[{fileName:l.fileName,textSpan:e.createTextSpanFromBounds(0,0),kind:X.scriptElement,name:c.fileName,containerName:void 0,containerKind:void 0}]}else{var p=Je.getTypeChecker(),f=p.getSymbolAtLocation(i);if(f){if(8388608&f.flags){var d=f.declarations[0];69===i.kind&&i.parent===d&&(f=p.getAliasedSymbol(f))}if(249===i.parent.kind){var m=p.getShorthandAssignmentValueSymbol(f.valueDeclaration);if(!m)return[];var _=m.getDeclarations(),g=O(m,i),v=p.symbolToString(m),b=p.symbolToString(f.parent,i);return e.map(_,function(e){return q(e,g,v,b)})}return z(f,i)}}}}function Y(t,n){s();var r=a(t),i=e.getTouchingPropertyName(r,n);if(i){var o=Je.getTypeChecker(),u=o.getSymbolAtLocation(i);if(u){var c=o.getTypeOfSymbolAtLocation(u,i);if(c){if(16384&c.flags){var l=[];return e.forEach(c.types,function(t){t.symbol&&e.addRange(l,z(t.symbol,i))}),l}if(c.symbol)return z(c.symbol,i)}}}}function $(t,n){var r=re(t,n);if(r){var i=et(e.normalizeSlashes(t));r=e.filter(r,function(t){return et(e.normalizeSlashes(t.fileName))===i})}return r}function ne(t,n,r){function i(t){var n=t.getStart(),r=t.getEnd();return{fileName:u.fileName,textSpan:e.createTextSpanFromBounds(n,r),kind:J.none}}s(),r=e.map(r,e.normalizeSlashes);var o=e.filter(Je.getSourceFiles(),function(t){return e.contains(r,t.fileName)}),u=a(t),c=e.getTouchingWord(u,n);if(c)return function(t){if(69===t.kind||97===t.kind||162===t.kind||95===t.kind||w(t)||k(t)){var n=pe(t,o,!1,!1);return function(t){if(t){for(var n={},r=[],i=0,a=t;i<a.length;i++)for(var o=a[i],s=0,u=o.references;s<u.length;s++){var c=u[s],l=c.fileName,p=e.getProperty(n,l);p||(p={fileName:l,highlightSpans:[]},n[l]=p,r.push(p)),p.highlightSpans.push({textSpan:c.textSpan,kind:c.isWriteAccess?J.writtenReference:J.reference})}return r}}(n)}}(c)||function(t){function n(e,t){return void 0!==e&&e.kind===t}function r(e){return e&&e.parent}function a(t){function n(t){if(211===t.kind)r.push(t);else if(212===t.kind){var i=t;n(i.catchClause?i.catchClause:i.tryBlock),i.finallyBlock&&n(i.finallyBlock)}else e.isFunctionLike(t)||e.forEachChild(t,n)}var r=[];return n(t),r}function o(t){for(var n=t;n.parent;){var r=n.parent;if(e.isFunctionBlock(r)||251===r.kind)return r;if(212===r.kind){var i=r;if(i.tryBlock===n&&i.catchClause)return n}n=r}}function s(t){function n(t){206===t.kind||205===t.kind?r.push(t):e.isFunctionLike(t)||e.forEachChild(t,n)}var r=[];return n(t),r}function c(e,t){var n=l(t);return n&&n===e}function l(t){for(var n=t.parent;n;n=n.parent)switch(n.kind){case 209:if(205===t.kind)continue;case 202:case 203:case 204:case 201:case 200:if(!t.label||g(n,t.label.text))return n;break;default:if(e.isFunctionLike(n))return}}function p(t,r){var a=r.parent;if(e.isAccessibilityModifier(t)){if(!(217===a.kind||189===a.kind||139===r.kind&&n(a,145)))return}else if(113===t){if(217!==a.kind&&189!==a.kind)return}else if(82===t||122===t){if(222!==a.kind&&251!==a.kind)return}else{if(115!==t)return;if(217!==a.kind&&217!==r.kind)return}var o,s=[],u=function(t){switch(t){case 112:return 8;case 110:return 16;case 111:return 32;case 113:return 64;case 82:return 2;case 122:return 4;case 115:return 128;default:e.Debug.fail()}}(t);switch(a.kind){case 222:case 251:o=128&u?r.members.concat(r):a.statements;break;case 145:o=a.parameters.concat(a.parent.members);break;case 217:case 189:if(o=a.members,56&u){var c=e.forEach(a.members,function(e){return 145===e.kind&&e});c&&(o=o.concat(c.parameters))}else 128&u&&(o=o.concat(a));break;default:e.Debug.fail(\"Invalid container kind.\")}return e.forEach(o,function(n){n.modifiers&&n.flags&u&&e.forEach(n.modifiers,function(e){return f(s,e,t)})}),e.map(s,i)}function f(t,n){for(var r=[],i=2;i<arguments.length;i++)r[i-2]=arguments[i];return!(!n||!e.contains(r,n.kind))&&(t.push(n),!0)}function d(t){function n(t,n){var i=e.getDeclarationOfKind(t,n);i&&e.forEach(i.getChildren(),function(e){return f(r,e,123,129)})}var r=[];return n(t.symbol,146),n(t.symbol,147),e.map(r,i)}function m(t){var n=t.symbol.getDeclarations(),r=[];return e.forEach(n,function(t){e.forEach(t.getChildren(),function(e){return f(r,e,121)})}),e.map(r,i)}function h(t){var n=[];if(f(n,t.getFirstToken(),86,104,79)&&200===t.kind)for(var r=t.getChildren(),a=r.length-1;a>=0&&!f(n,r[a],104);a--);var o=s(t.statement);return e.forEach(o,function(e){c(t,e)&&f(n,e.getFirstToken(),70,75)}),e.map(n,i)}function y(e){var t=l(e);if(t)switch(t.kind){case 202:case 203:case 204:case 200:case 201:return h(t);case 209:return _(t)}}function _(t){var n=[];return f(n,t.getFirstToken(),96),e.forEach(t.caseBlock.clauses,function(r){f(n,r.getFirstToken(),71,77);var i=s(r);e.forEach(i,function(e){c(t,e)&&f(n,e.getFirstToken(),70)})}),e.map(n,i)}function v(t){var n=[];if(f(n,t.getFirstToken(),100),t.catchClause&&f(n,t.catchClause.getFirstToken(),72),t.finallyBlock){f(n,e.findChildOfKind(t,85,u),85)}return e.map(n,i)}function b(t){var n=o(t);if(n){var r=[];return e.forEach(a(n),function(e){f(r,e.getFirstToken(),98)}),e.isFunctionBlock(n)&&e.forEachReturnStatement(n,function(e){f(r,e.getFirstToken(),94)}),e.map(r,i)}}function S(t){var r=e.getContainingFunction(t);if(r&&n(r.body,195)){var o=[];return e.forEachReturnStatement(r.body,function(e){f(o,e.getFirstToken(),94)}),e.forEach(a(r.body),function(e){f(o,e.getFirstToken(),98)}),e.map(o,i)}}function A(t){for(var r=[];n(t.parent,199)&&t.parent.elseStatement===t;)t=t.parent;for(;t;){var a=t.getChildren();f(r,a[0],88);for(var o=a.length-1;o>=0&&!f(r,a[o],80);o--);if(!n(t.elseStatement,199))break;t=t.elseStatement}for(var s=[],o=0;o<r.length;o++){if(80===r[o].kind&&o<r.length-1){for(var c=r[o],l=r[o+1],p=!0,d=l.getStart()-1;d>=c.end;d--)if(!e.isWhiteSpace(u.text.charCodeAt(d))){p=!1;break}if(p){s.push({fileName:T,textSpan:e.createTextSpanFromBounds(c.getStart(),l.end),kind:J.reference}),o++;continue}}s.push(i(r[o]))}return s}var T=u.fileName,E=function(t){if(t)switch(t.kind){case 88:case 80:if(n(t.parent,199))return A(t.parent);break;case 94:if(n(t.parent,207))return S(t.parent);break;case 98:if(n(t.parent,211))return b(t.parent);break;case 72:if(n(r(r(t)),212))return v(t.parent.parent);break;case 100:case 85:if(n(r(t),212))return v(t.parent);break;case 96:if(n(t.parent,209))return _(t.parent);break;case 71:case 77:if(n(r(r(r(t))),209))return _(t.parent.parent.parent);break;case 70:case 75:if(n(t.parent,206)||n(t.parent,205))return y(t.parent);break;case 86:if(n(t.parent,202)||n(t.parent,203)||n(t.parent,204))return h(t.parent);break;case 104:case 79:if(n(t.parent,201)||n(t.parent,200))return h(t.parent);break;case 121:if(n(t.parent,145))return m(t.parent);break;case 123:case 129:if(n(t.parent,146)||n(t.parent,147))return d(t.parent);break;default:if(e.isModifierKind(t.kind)&&t.parent&&(e.isDeclaration(t.parent)||196===t.parent.kind))return p(t.kind,t.parent)}}(t);if(E&&0!==E.length)return[{fileName:T,highlightSpans:E}]}(c)}function re(e,t){return s(),function(e){if(e){for(var t=[],n=0,r=e;n<r.length;n++)for(var i=r[n],a=0,o=i.highlightSpans;a<o.length;a++){var s=o[a];t.push({fileName:i.fileName,textSpan:s.textSpan,isWriteAccess:s.kind===J.writtenReference})}return t}}(ne(e,t,[e]))}function ae(t){if(t){for(var n=[],r=0,i=t;r<i.length;r++){var a=i[r];e.addRange(n,a.references)}return n}}function se(e,t,n,r){return ae(le(e,t,n,r))}function ue(e,t){return ae(le(e,t,!1,!1))}function ce(t,n){var r=le(t,n,!1,!1);return e.filter(r,function(e){return!!e.definition})}function le(t,n,r,i){s();var o=a(t),u=e.getTouchingPropertyName(o,n);if(u&&(69===u.kind||w(u)||k(u)))return e.Debug.assert(69===u.kind||8===u.kind||9===u.kind),pe(u,Je.getSourceFiles(),r,i)}function pe(t,n,r,i){function a(n){var r=j(n,t.getSourceFile(),R(t),t),i=e.map(r.displayParts,function(e){return e.text}).join(\"\"),a=n.declarations;if(a&&0!==a.length)return{containerKind:\"\",containerName:\"\",name:i,kind:r.symbolKind,fileName:a[0].getSourceFile().fileName,textSpan:e.createTextSpan(a[0].getStart(),0)}}function o(t){return 8388608&t.flags&&!!e.getDeclarationOfKind(t,229)}function s(t,n,r,i){var a=[];if(!n||!n.length)return a;for(var o=t.text,s=o.length,u=n.length,c=o.indexOf(n,r);c>=0&&(Qe.throwIfCancellationRequested(),!(c>i));){var l=c+u;0!==c&&e.isIdentifierPart(o.charCodeAt(c-1),2)||l!==s&&e.isIdentifierPart(o.charCodeAt(l),2)||a.push(c),c=o.indexOf(n,c+u+1)}return a}function u(t,n){var r=[],i=t.getSourceFile(),a=n.text,o=s(i,a,t.getStart(),t.getEnd());return e.forEach(o,function(t){Qe.throwIfCancellationRequested();var o=e.getTouchingWord(i,t);o&&o.getWidth()===a.length&&(o===n||y(o)&&h(o,a)===n)&&r.push(fe(o))}),[{definition:{containerKind:\"\",containerName:\"\",fileName:n.getSourceFile().fileName,kind:X.label,name:a,textSpan:e.createTextSpanFromBounds(n.getStart(),n.getEnd())},references:r}]}function c(e,t){if(e)switch(e.kind){case 69:return e.getWidth()===t.length;case 9:if(w(e)||k(e))return e.getWidth()===t.length+2;break;case 8:if(w(e))return e.getWidth()===t.length}return!1}function l(t,n,r,i,o,u,l,f,m){function h(t){var n=e.getSymbolId(t),r=m[n];return void 0===r&&(r=f.length,m[n]=r,f.push({definition:a(t),references:[]})),f[r]}function y(t,n){function r(e){var n=t.text.substring(e.pos,e.end);return!v.test(n)}return e.isInCommentHelper(t,n,r)}var g=t.getSourceFile(),v=/^\\/\\/\\/\\s*</,b=s(g,r,t.getStart(),t.getEnd());if(b.length){var S=p(n,i);e.forEach(b,function(t){Qe.throwIfCancellationRequested();var n=e.getTouchingPropertyName(g,t);if(!c(n,r))return void((u&&e.isInString(g,t)||l&&y(g,t))&&f.push({definition:void 0,references:[{fileName:g.fileName,textSpan:e.createTextSpan(t,r.length),isWriteAccess:!1}]}));if(Te(n)&o){var i=_.getSymbolAtLocation(n);if(i){var a=i.valueDeclaration,s=_.getShorthandAssignmentValueSymbol(a),p=d(S,i,n);if(p){var m=h(p);m.references.push(fe(n))}else if(!(67108864&i.flags)&&S.indexOf(s)>=0){var m=h(s);m.references.push(fe(a.name))}}}})}}function p(t,n){var r=[t];if(o(t)&&r.push(_.getAliasedSymbol(t)),233===n.parent.kind&&r.push(_.getExportSpecifierLocalTargetSymbol(n.parent)),N(n)){e.forEach(m(n),function(t){e.addRange(r,_.getRootSymbols(t))});var i=_.getShorthandAssignmentValueSymbol(n.parent);i&&r.push(i)}return t.valueDeclaration&&139===t.valueDeclaration.kind&&e.isParameterPropertyDeclaration(t.valueDeclaration)&&(r=r.concat(_.getSymbolsOfParameterPropertyDeclaration(t.valueDeclaration,t.name))),e.forEach(_.getRootSymbols(t),function(e){e!==t&&r.push(e),e.parent&&96&e.parent.flags&&f(e.parent,e.getName(),r,{})}),r}function f(t,n,r,i){function a(e){if(e){var a=_.getTypeAtLocation(e);if(a){var o=_.getPropertyOfType(a,n);o&&r.push(o),i[t.name]=t,f(a.symbol,n,r,i)}}}t&&(e.hasProperty(i,t.name)||96&t.flags&&e.forEach(t.getDeclarations(),function(t){217===t.kind?(a(e.getClassExtendsHeritageClauseElement(t)),e.forEach(e.getClassImplementsHeritageClauseElements(t),a)):218===t.kind&&e.forEach(e.getInterfaceBaseTypeNodes(t),a)}))}function d(t,n,r){if(t.indexOf(n)>=0)return n;if(o(n)){var i=_.getAliasedSymbol(n);if(t.indexOf(i)>=0)return i}if(233===r.parent.kind){var i=_.getExportSpecifierLocalTargetSymbol(r.parent);if(t.indexOf(i)>=0)return i}return N(r)?e.forEach(m(r),function(n){return e.forEach(_.getRootSymbols(n),function(e){return t.indexOf(e)>=0?e:void 0})}):e.forEach(_.getRootSymbols(n),function(n){if(t.indexOf(n)>=0)return n;if(n.parent&&96&n.parent.flags){var r=[];return f(n.parent,n.getName(),r,{}),e.forEach(r,function(e){return t.indexOf(e)>=0?e:void 0})}})}function m(t){if(N(t)){var n=t.parent.parent,r=_.getContextualType(n),i=t.text;if(r){if(16384&r.flags){var a=r.getProperty(i);if(a)return[a];var o=[];return e.forEach(r.types,function(e){var t=e.getProperty(i);t&&o.push(t)}),o}var s=r.getProperty(i);if(s)return[s]}}}var _=Je.getTypeChecker();if(v(t)){if(y(t)){var g=h(t.parent,t.text);return g?u(g.parent,g):void 0}return u(t.parent,t)}if(97===t.kind||162===t.kind)return function(n,r){function i(t,n,r,i){e.forEach(r,function(r){Qe.throwIfCancellationRequested();var a=e.getTouchingWord(t,r);if(a&&(97===a.kind||162===a.kind)){var s=e.getThisContainer(a,!1);switch(n.kind){case 176:case 216:n.symbol===s.symbol&&i.push(fe(a));break;case 144:case 143:e.isObjectLiteralMethod(n)&&n.symbol===s.symbol&&i.push(fe(a));break;case 189:case 217:s.parent&&n.symbol===s.parent.symbol&&(64&s.flags)===o&&i.push(fe(a));break;case 251:251!==s.kind||e.isExternalModule(s)||i.push(fe(a))}}})}var a=e.getThisContainer(n,!1),o=64;switch(a.kind){case 144:case 143:if(e.isObjectLiteralMethod(a))break;case 142:case 141:case 145:case 146:case 147:o&=a.flags,a=a.parent;break;case 251:if(e.isExternalModule(a))return;case 216:case 176:break;default:return}var u,c=[];if(251===a.kind)e.forEach(r,function(e){u=s(e,\"this\",e.getStart(),e.getEnd()),i(e,e,u,c)});else{var l=a.getSourceFile();u=s(l,\"this\",a.getStart(),a.getEnd()),i(l,a,u,c)}return[{definition:{containerKind:\"\",containerName:\"\",fileName:t.getSourceFile().fileName,kind:X.variableElement,name:\"this\",textSpan:e.createTextSpanFromBounds(t.getStart(),t.getEnd())},references:c}]}(t,n);if(95===t.kind)return function(t){var n=e.getSuperContainer(t,!1);if(n){var r=64;switch(n.kind){case 142:case 141:case 144:case 143:case 145:case 146:case 147:r&=n.flags,n=n.parent;break;default:return}var i=[],o=n.getSourceFile(),u=s(o,\"super\",n.getStart(),n.getEnd());e.forEach(u,function(t){Qe.throwIfCancellationRequested();var a=e.getTouchingWord(o,t);if(a&&95===a.kind){var s=e.getSuperContainer(a,!1);s&&(64&s.flags)===r&&s.parent.symbol===n.symbol&&i.push(fe(a))}});return[{definition:a(n.symbol),references:i}]}}(t);var b=_.getSymbolAtLocation(t);if(b){var S=b.declarations;if(S&&S.length){var A,T=function(e,t){if(t){var n=void 0;do{n=e;for(var r=0,i=t;r<i.length;r++){var a=i[r],o=ye(a);o&e&&(e|=o)}}while(e!==n)}return e}(Te(t),S),E=e.stripQuotes(e.getDeclaredName(_,b,t)),C=function(t){var n=t.valueDeclaration;if(n&&(176===n.kind||189===n.kind))return n;if(8196&t.flags){var r=e.forEach(t.getDeclarations(),function(e){return 16&e.flags?e:void 0});if(r)return e.getAncestor(r,217)}if(!(8388608&t.flags||t.parent||268435456&t.flags)){var i,a=t.getDeclarations();if(a)for(var o=0,s=a;o<s.length;o++){var u=s[o],c=R(u);if(!c)return;if(i&&i!==c)return;if(251===c.kind&&!e.isExternalModule(c))return;i=c}return i}}(b),x=[];if(C)A=[],l(C,b,E,t,T,r,i,A,x);else for(var I=function(t,n,r){return e.isImportOrExportSpecifierName(n)?n.getText():(t=e.getLocalSymbolForExportDefault(t)||t,e.stripQuotes(t.name))}(b,t,S),D=0,P=n;D<P.length;D++){var L=P[D];Qe.throwIfCancellationRequested();var O=M(L);void 0!==e.lookUp(O,I)&&(A=A||[],l(L,b,E,t,T,r,i,A,x))}return A}}}function fe(t){var n=t.getStart(),r=t.getEnd();return 9===t.kind&&(n+=1,r-=1),{fileName:t.getSourceFile().fileName,textSpan:e.createTextSpanFromBounds(n,r),isWriteAccess:de(t)}}function de(t){if(69===t.kind&&e.isDeclarationName(t))return!0;var n=t.parent;if(n){if(183===n.kind||182===n.kind)return!0;if(184===n.kind&&n.left===t){var r=n.operatorToken.kind;return 56<=r&&r<=68}}return!1}function me(t,n){return s(),e.NavigateTo.getNavigateToItems(Je,Qe,t,n)}function he(e){function t(e,t,n){r.push({name:e,writeByteOrderMark:n,text:t})}s();var n=a(e),r=[];return{outputFiles:r,emitSkipped:Je.emit(n,t,Qe).emitSkipped}}function ye(t){switch(t.kind){case 139:case 214:case 166:case 142:case 141:case 248:case 249:case 250:case 144:case 143:case 145:case 146:case 147:case 216:case 176:case 177:case 247:return 1;case 138:case 218:case 219:case 156:return 2;case 217:case 220:return 3;case 221:return e.isAmbientModule(t)?5:1===e.getModuleInstanceState(t)?5:4;case 228:case 229:case 224:case 225:case 230:case 231:return 7;case 251:return 5}return 7}function _e(t){return e.isRightSideOfQualifiedNameOrPropertyAccess(t)&&(t=t.parent),152===t.parent.kind||191===t.parent.kind&&!e.isExpressionWithTypeArgumentsInClassExtendsClause(t.parent)||97===t.kind&&!e.isExpression(t)||162===t.kind}function ge(e){return be(e)||ve(e)}function ve(e){var t=e,n=!0;if(169===t.parent.kind){for(;t.parent&&169===t.parent.kind;)t=t.parent;n=t.name===e}if(!n&&191===t.parent.kind&&246===t.parent.parent.kind){var r=t.parent.parent.parent;return 217===r.kind&&106===t.parent.parent.token||218===r.kind&&83===t.parent.parent.token}return!1}function be(e){var t=e,n=!0;if(136===t.parent.kind){for(;t.parent&&136===t.parent.kind;)t=t.parent;n=t.right===e}return 152===t.parent.kind&&!n}function Se(t){for(;136===t.parent.kind;)t=t.parent;return e.isInternalModuleImportEqualsDeclaration(t.parent)&&t.parent.moduleReference===t}function Ae(t){return e.Debug.assert(69===t.kind),136===t.parent.kind&&t.parent.right===t&&224===t.parent.parent.kind?7:4}function Te(t){return 230===t.parent.kind?7:Se(t)?Ae(t):e.isDeclarationName(t)?ye(t.parent):_e(t)?2:ge(t)?4:1}function Ee(t,n){s();var r=a(t);return e.SignatureHelp.getSignatureHelpItems(Je,r,n,Qe)}function Ce(e){return Xe.getCurrentSourceFile(e)}function Ne(t,n,r){var i=Xe.getCurrentSourceFile(t),a=e.getTouchingPropertyName(i,n);if(a){switch(a.kind){case 169:case 136:case 9:case 163:case 84:case 99:case 93:case 95:case 97:case 162:case 69:break;default:return}for(var o=a;;)if(S(o)||b(o))o=o.parent;else{if(!E(o))break;if(221!==o.parent.parent.kind||o.parent.parent.body!==o.parent)break;o=o.parent.parent.name}return e.createTextSpanFromBounds(o.getStart(),a.getEnd())}}function we(t,n){var r=Xe.getCurrentSourceFile(t);return e.BreakpointResolver.spanInSourceFileAtLocation(r,n)}function ke(n){var r=Xe.getCurrentSourceFile(n);return e.NavigationBar.getNavigationBarItems(r,t.getCompilationSettings())}function xe(e,t){return Me(Ie(e,t))}function Re(e){switch(e){case 221:case 217:case 218:case 216:Qe.throwIfCancellationRequested()}}function Ie(t,n){function r(e,t,n){l.push(e),l.push(t),l.push(n)}function i(t,n){var r=t.getFlags();if(0!=(788448&r)){if(32&r)return 11;if(384&r)return 12;if(524288&r)return 16;if(2&n){if(64&r)return 13;if(262144&r)return 15}else if(1536&r&&(4&n||1&n&&function(t){return e.forEach(t.declarations,function(t){return 221===t.kind&&1===e.getModuleInstanceState(t)})}(t)))return 14}}function o(t){if(t&&e.textSpanIntersectsWith(n,t.getFullStart(),t.getFullWidth())){var a=t.kind;if(Re(a),69===a&&!e.nodeIsMissing(t)){if(p[t.text]){var s=c.getSymbolAtLocation(t);if(s){var u=i(s,Te(t));u&&r(t.getStart(),t.getWidth(),u)}}}e.forEachChild(t,o)}}s();var u=a(t),c=Je.getTypeChecker(),l=[],p=Je.getClassifiableNames();return o(u),{spans:l,endOfLineState:0}}function De(e){switch(e){case 1:return Z.comment;case 2:return Z.identifier;case 3:return Z.keyword;case 4:return Z.numericLiteral;case 5:return Z.operator;case 6:return Z.stringLiteral;case 8:return Z.whiteSpace;case 9:return Z.text;case 10:return Z.punctuation;case 11:return Z.className;case 12:return Z.enumName;case 13:return Z.interfaceName;case 14:return Z.moduleName;case 15:return Z.typeParameterName;case 16:return Z.typeAliasName;case 17:return Z.parameterName;case 18:return Z.docCommentTagName;case 19:return Z.jsxOpenTagName;case 20:return Z.jsxCloseTagName;case 21:return Z.jsxSelfClosingTagName;case 22:return Z.jsxAttribute;case 23:return Z.jsxText;case 24:return Z.jsxAttributeStringLiteralValue}}function Me(t){e.Debug.assert(t.spans.length%3==0);for(var n=t.spans,r=[],i=0,a=n.length;i<a;i+=3)r.push({textSpan:e.createTextSpan(n[i],n[i+1]),classificationType:De(n[i+2])});return r}function Pe(e,t){return Me(Le(e,t))}function Le(t,n){function r(e,t,n){b.push(e),b.push(t),b.push(n)}function i(t){for(g.setTextPos(t.pos);;){var n=g.getTextPos();if(!e.couldStartTrivia(h.text,n))return n;var i=g.scan(),o=g.getTextPos(),s=o-n;if(!e.isTrivia(i))return n;if(4!==i&&5!==i)if(e.isComment(i))a(t,i,n,s),g.setTextPos(o);else if(7===i){var u=h.text,l=u.charCodeAt(n);if(60===l||62===l){r(n,s,1);continue}e.Debug.assert(61===l),c(u,n,o)}}}function a(t,n,r,i){if(3===n){var a=e.parseIsolatedJSDocComment(h.text,r,i);if(a&&a.jsDocComment)return a.jsDocComment.parent=t,void s(a.jsDocComment)}o(r,i)}function o(e,t){r(e,t,1)}function s(e){for(var t=e.pos,n=0,i=e.tags;n<i.length;n++){var a=i[n];switch(a.pos!==t&&o(t,a.pos-t),r(a.atToken.pos,a.atToken.end-a.atToken.pos,10),r(a.tagName.pos,a.tagName.end-a.tagName.pos,18),t=a.tagName.end,a.kind){case 270:!function(e){e.preParameterName&&(o(t,e.preParameterName.pos-t),r(e.preParameterName.pos,e.preParameterName.end-e.preParameterName.pos,17),t=e.preParameterName.end),e.typeExpression&&(o(t,e.typeExpression.pos-t),m(e.typeExpression),t=e.typeExpression.end),e.postParameterName&&(o(t,e.postParameterName.pos-t),r(e.postParameterName.pos,e.postParameterName.end-e.postParameterName.pos,17),t=e.postParameterName.end)}(a);break;case 273:u(a);break;case 272:m(a.typeExpression);break;case 271:m(a.typeExpression)}t=a.end}t!==e.end&&o(t,e.end-t)}function u(e){for(var t=0,n=e.getChildren();t<n.length;t++){m(n[t])}}function c(t,n,i){var a;for(a=n;a<i&&!e.isLineBreak(t.charCodeAt(a));a++);for(r(n,a-n,1),v.setTextPos(a);v.getTextPos()<i;)l()}function l(){var e=v.getTextPos(),t=v.scan(),n=v.getTextPos(),i=d(t);i&&r(e,n-e,i)}function p(t){if(e.nodeIsMissing(t))return!0;var n=f(t);if(!e.isToken(t)&&239!==t.kind&&void 0===n)return!1;var a=239===t.kind?t.pos:i(t),o=t.end-a;if(e.Debug.assert(o>=0),o>0){var s=n||d(t.kind,t);s&&r(a,o,s)}return!0}function f(e){switch(e.parent&&e.parent.kind){case 238:if(e.parent.tagName===e)return 19;break;case 240:if(e.parent.tagName===e)return 20;break;case 237:if(e.parent.tagName===e)return 21;break;case 241:if(e.parent.name===e)return 22}}function d(t,n){if(e.isKeyword(t))return 3;if((25===t||27===t)&&n&&e.getTypeArgumentOrTypeParameterList(n.parent))return 10;if(e.isPunctuation(t)){if(n){if(56===t&&(214===n.parent.kind||142===n.parent.kind||139===n.parent.kind||241===n.parent.kind))return 5;if(184===n.parent.kind||182===n.parent.kind||183===n.parent.kind||185===n.parent.kind)return 5}return 10}if(8===t)return 4;if(9===t||163===t)return 241===n.parent.kind?24:6;if(10===t)return 6;if(e.isTemplateLiteralKind(t))return 6;if(239===t)return 23;if(69===t){if(n)switch(n.parent.kind){case 217:if(n.parent.name===n)return 11;return;case 138:if(n.parent.name===n)return 15;return;case 218:if(n.parent.name===n)return 13;return;case 220:if(n.parent.name===n)return 12;return;case 221:if(n.parent.name===n)return 14;return;case 139:if(n.parent.name===n)return 17;return}return 2}}function m(t){if(t&&e.decodedTextSpanIntersectsWith(y,_,t.pos,t.getFullWidth())){Re(t.kind);for(var n=t.getChildren(h),r=0,i=n.length;r<i;r++){var a=n[r];p(a)||m(a)}}}var h=Xe.getCurrentSourceFile(t),y=n.start,_=n.length,g=e.createScanner(2,!1,h.languageVariant,h.text),v=e.createScanner(2,!1,h.languageVariant,h.text),b=[];return m(h),{spans:b,endOfLineState:0}}function Oe(t){var n=Xe.getCurrentSourceFile(t);return e.OutliningElementsCollector.collectElements(n)}function Ue(t,n){var r=Xe.getCurrentSourceFile(t),i=[],a=e.getTouchingToken(r,n);if(a.getStart(r)===n){var o=function(e){switch(e.kind){case 15:return 16;case 17:return 18;case 19:return 20;case 25:return 27;case 16:return 15;case 18:return 17;case 20:return 19;case 27:return 25}}(a);if(o)for(var s=a.parent,u=s.getChildren(r),c=0,l=u;c<l.length;c++){var p=l[c];if(p.kind===o){var f=e.createTextSpan(a.getStart(r),a.getWidth(r)),d=e.createTextSpan(p.getStart(r),p.getWidth(r));f.start<d.start?i.push(f,d):i.push(d,f);break}}}return i}function Fe(t,n,i){var a=(new Date).getTime(),o=Xe.getCurrentSourceFile(t);r(\"getIndentationAtPosition: getCurrentSourceFile: \"+((new Date).getTime()-a)),a=(new Date).getTime();var s=e.formatting.SmartIndenter.getIndentation(n,o,i);return r(\"getIndentationAtPosition: computeIndentation  : \"+((new Date).getTime()-a)),s}function Be(t,n,r,i){var a=Xe.getCurrentSourceFile(t);return e.formatting.formatSelection(n,r,a,o(i),i)}function Ke(t,n){var r=Xe.getCurrentSourceFile(t);return e.formatting.formatDocument(r,o(n),n)}function Ve(t,n,r,i){var a=Xe.getCurrentSourceFile(t);return\"}\"===r?e.formatting.formatOnClosingCurly(n,a,o(i),i):\";\"===r?e.formatting.formatOnSemicolon(n,a,o(i),i):\"\\n\"===r?e.formatting.formatOnEnter(n,a,o(i),i):[]}function je(n,r){var i=Xe.getCurrentSourceFile(n);if(!(e.isInString(i,r)||e.isInComment(i,r)||e.hasDocComment(i,r))){var a=e.getTokenAtPosition(i,r),o=a.getStart();if(a&&!(o<r)){var s;e:for(s=a;s;s=s.parent)switch(s.kind){case 216:case 144:case 145:case 217:case 196:break e;case 251:return;case 221:if(221===s.parent.kind)return;break e}if(s&&!(s.getStart()<r)){for(var u=We(s),c=i.getLineAndCharacterOfPosition(r),l=i.getLineStarts()[c.line],p=i.text.substr(l,c.character),f=e.getNewLineOrDefaultFromHost(t),d=\"\",m=0,h=u.length;m<h;m++){var y=u[m].name;d+=p+\" * @param \"+(69===y.kind?y.text:\"param\"+m)+f}var _=\"/**\"+f+p+\" * \";return{newText:_+f+d+p+\" */\"+(o===r?f+p:\"\"),caretOffset:_.length}}}}}function We(t){if(e.isFunctionLike(t))return t.parameters;if(196===t.kind){var n=t,r=n.declarationList.declarations;if(1===r.length&&r[0].initializer)return qe(r[0].initializer)}return K}function qe(e){for(;175===e.kind;)e=e.expression;switch(e.kind){case 176:case 177:return e.parameters;case 189:for(var t=0,n=e.members;t<n.length;t++){var r=n[t];if(145===r.kind)return r.parameters}}return K}function ze(t,n){function r(e){return e.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g,\"\\\\$&\")}s();var i=a(t);Qe.throwIfCancellationRequested();var o=i.text,u=[];if(n.length>0)for(var c=function(){var t=/(?:\\/\\/+\\s*)/.source,i=/(?:\\/\\*+\\s*)/.source,a=/(?:^(?:\\s|\\*)*)/.source,o=\"(\"+a+\"|\"+t+\"|\"+i+\")\",s=\"(?:\"+e.map(n,function(e){return\"(\"+r(e.text)+\")\"}).join(\"|\")+\")\",u=/(?:$|\\*\\/)/.source,c=/(?:.*?)/.source,l=\"(\"+s+c+\")\",p=o+l+u;return new RegExp(p,\"gim\")}(),l=void 0;l=c.exec(o);){Qe.throwIfCancellationRequested();e.Debug.assert(l.length===n.length+3);var p=l[1],f=l.index+p.length,d=e.getTokenAtPosition(i,f);if(x(i,d,f)){for(var m=void 0,h=0,y=n.length;h<y;h++)l[h+3]&&(m=n[h]);if(e.Debug.assert(void 0!==m),!function(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57}(o.charCodeAt(f+m.text.length))){var _=l[2];u.push({descriptor:m,message:_,position:f})}}}return u}function He(n,r){function i(e){return{canRename:!1,localizedErrorMessage:e,displayName:void 0,fullDisplayName:void 0,kind:void 0,kindModifiers:void 0,triggerSpan:void 0}}s();var o=a(n),u=Je.getTypeChecker(),c=e.getTouchingWord(o,r);if(c&&69===c.kind){var l=u.getSymbolAtLocation(c);if(l){var p=l.getDeclarations();if(p&&p.length>0){var f=t.getDefaultLibFileName(t.getCompilationSettings()),d=et(e.normalizePath(f));if(f)for(var m=0,h=p;m<h.length;m++){var y=h[m],_=y.getSourceFile();if(_){var g=et(e.normalizePath(_.fileName));if(g===d)return i(e.getLocaleSpecificMessage(e.Diagnostics.You_cannot_rename_elements_that_are_defined_in_the_standard_TypeScript_library))}}var v=e.stripQuotes(e.getDeclaredName(u,l,c)),b=O(l,c);if(b)return{canRename:!0,kind:b,displayName:v,localizedErrorMessage:void 0,fullDisplayName:u.getFullyQualifiedName(l),kindModifiers:B(l),triggerSpan:e.createTextSpan(c.getStart(),c.getWidth())}}}}return i(e.getLocaleSpecificMessage(e.Diagnostics.You_cannot_rename_this_element))}void 0===n&&(n=d(t.useCaseSensitiveFileNames&&t.useCaseSensitiveFileNames(),t.getCurrentDirectory()));var Ye,Je,Ge,Xe=new te(t),$e=!1,Qe=new oe(t.getCancellationToken&&t.getCancellationToken()),Ze=t.getCurrentDirectory();!e.localizedDiagnosticMessages&&t.getLocalizedDiagnosticMessages&&(e.localizedDiagnosticMessages=t.getLocalizedDiagnosticMessages());var et=e.createGetCanonicalFileName($e);return{dispose:l,cleanupSemanticCache:c,getSyntacticDiagnostics:p,getSemanticDiagnostics:f,getCompilerOptionsDiagnostics:m,getSyntacticClassifications:Pe,getSemanticClassifications:xe,getEncodedSyntacticClassifications:Le,getEncodedSemanticClassifications:Ie,getCompletionsAtPosition:P,getCompletionEntryDetails:L,getSignatureHelpItems:Ee,getQuickInfoAtPosition:W,getDefinitionAtPosition:H,getTypeDefinitionAtPosition:Y,getReferencesAtPosition:ue,findReferences:ce,getOccurrencesAtPosition:$,getDocumentHighlights:ne,getNameOrDottedNameSpan:Ne,getBreakpointStatementAtPosition:we,getNavigateToItems:me,getRenameInfo:He,findRenameLocations:se,getNavigationBarItems:ke,getOutliningSpans:Oe,getTodoComments:ze,getBraceMatchingAtPosition:Ue,getIndentationAtPosition:Fe,getFormattingEditsForRange:Be,getFormattingEditsForDocument:Ke,getFormattingEditsAfterKeystroke:Ve,getDocCommentTemplateAtPosition:je,getEmitOutput:he,getSourceFile:Ce,getProgram:u}}function M(e){return e.nameTable||P(e),e.nameTable}function P(t){function n(t){switch(t.kind){case 69:r[t.text]=void 0===r[t.text]?t.pos:-1;break;case 9:case 8:(e.isDeclarationName(t)||235===t.parent.kind||L(t))&&(r[t.text]=void 0===r[t.text]?t.pos:-1);break;default:e.forEachChild(t,n)}}var r={};n(t),t.nameTable=r}function L(e){return e&&e.parent&&170===e.parent.kind&&e.parent.argumentExpression===e}function O(){function t(t,n){return!e.isAccessibilityModifier(t)||(123===n||129===n||121===n||113===n)}function n(e,t){for(var n=[],i=e.spans,a=0,o=0,s=i.length;o<s;o+=3){var u=i[o],c=i[o+1],l=i[o+2];if(a>=0){var p=u-a;p>0&&n.push({length:p,classification:$.Whitespace})}n.push({length:c,classification:r(l)}),a=u+c}var f=t.length-a;return f>0&&n.push({length:f,classification:$.Whitespace}),{entries:n,finalLexState:e.endOfLineState}}function r(e){switch(e){case 1:return $.Comment;case 3:return $.Keyword;case 4:return $.NumberLiteral;case 5:return $.Operator;case 6:return $.StringLiteral;case 8:return $.Whitespace;case 10:return $.Punctuation;case 2:case 11:case 12:case 13:case 14:case 15:case 16:case 9:case 17:default:return $.Identifier}}function i(e,t,r){return n(a(e,t,r),e)}function a(n,r,i){function a(e,t,n){if(8!==n){0===e&&o>0&&(e+=o),e-=o,t-=o;var r=t-e;r>0&&(m.spans.push(e),m.spans.push(r),m.spans.push(n))}}for(var o=0,s=0,d=0;f.length>0;)f.pop();switch(r){case 3:n='\"\\\\\\n'+n,o=3;break;case 2:n=\"'\\\\\\n\"+n,o=3;break;case 1:n=\"/*\\n\"+n,o=3;break;case 4:n=\"`\\n\"+n,o=2;break;case 5:n=\"}\\n\"+n,o=2;case 6:f.push(12)}l.setText(n);var m={endOfLineState:0,spans:[]},h=0;do{if(s=l.scan(),!e.isTrivia(s)){if(39!==s&&61!==s||p[d]){if(21===d&&u(s))s=69;else if(u(d)&&u(s)&&!t(d,s))s=69;else if(69===d&&25===s)h++;else if(27===s&&h>0)h--;else if(117===s||130===s||128===s||120===s||131===s)h>0&&!i&&(s=69);else if(12===s)f.push(s);else if(15===s)f.length>0&&f.push(s);else if(16===s&&f.length>0){var y=e.lastOrUndefined(f);12===y?(s=l.reScanTemplateToken(),14===s?f.pop():e.Debug.assert(13===s,\"Should have been a template middle. Was \"+s)):(e.Debug.assert(15===y,\"Should have been an open brace. Was: \"+s),f.pop())}}else 10===l.reScanSlashToken()&&(s=10);d=s}!function(){var t=l.getTokenPos(),r=l.getTextPos();if(a(t,r,c(s)),r>=n.length)if(9===s||163===s){var i=l.getTokenText();if(l.isUnterminated()){for(var o=i.length-1,u=0;92===i.charCodeAt(o-u);)u++;if(1&u){var p=i.charCodeAt(0);m.endOfLineState=34===p?3:2}}}else 3===s?l.isUnterminated()&&(m.endOfLineState=1):e.isTemplateLiteralKind(s)?l.isUnterminated()&&(14===s?m.endOfLineState=5:11===s?m.endOfLineState=4:e.Debug.fail(\"Only 'NoSubstitutionTemplateLiteral's and 'TemplateTail's can be unterminated; got SyntaxKind #\"+s)):f.length>0&&12===e.lastOrUndefined(f)&&(m.endOfLineState=6)}()}while(1!==s);return m}function o(e){switch(e){case 37:case 39:case 40:case 35:case 36:case 43:case 44:case 45:case 25:case 27:case 28:case 29:case 91:case 90:case 116:case 30:case 31:case 32:case 33:case 46:case 48:case 47:case 51:case 52:case 67:case 66:case 68:case 63:case 64:case 65:case 57:case 58:case 59:case 61:case 62:case 56:case 24:return!0;default:return!1}}function s(e){switch(e){case 35:case 36:case 50:case 49:case 41:case 42:return!0;default:return!1}}function u(e){return e>=70&&e<=135}function c(t){if(u(t))return 3;if(o(t)||s(t))return 5;if(t>=15&&t<=68)return 10;switch(t){case 8:return 4;case 9:case 163:return 6;case 10:return 7;case 7:case 3:case 2:return 1;case 5:case 4:return 8;case 69:default:return e.isTemplateLiteralKind(t)?6:2}}var l=e.createScanner(2,!1),p=[];p[69]=!0,p[9]=!0,p[8]=!0,p[10]=!0,p[97]=!0,p[41]=!0,p[42]=!0,p[18]=!0,p[20]=!0,p[16]=!0,p[99]=!0,p[84]=!0;var f=[];return{getClassificationsForLine:i,getEncodedLexicalClassifications:a}}function U(t){return a+e.directorySeparator+e.getDefaultLibFileName(t)}e.servicesVersion=\"0.4\";!function(e){function t(e){return new n(e)}var n=function(){function e(e){this.text=e}return e.prototype.getText=function(e,t){return this.text.substring(e,t)},e.prototype.getLength=function(){return this.text.length},e.prototype.getChangeRange=function(e){},e}();e.fromString=t}(e.ScriptSnapshot||(e.ScriptSnapshot={}));var F,B=e.createScanner(2,!0),K=[],V=[\"augments\",\"author\",\"argument\",\"borrows\",\"class\",\"constant\",\"constructor\",\"constructs\",\"default\",\"deprecated\",\"description\",\"event\",\"example\",\"extends\",\"field\",\"fileOverview\",\"function\",\"ignore\",\"inner\",\"lends\",\"link\",\"memberOf\",\"name\",\"namespace\",\"param\",\"private\",\"property\",\"public\",\"requires\",\"returns\",\"see\",\"since\",\"static\",\"throws\",\"type\",\"version\"],j=function(){function n(e,t,n){this.kind=e,this.pos=t,this.end=n,this.flags=0,this.parent=void 0}return n.prototype.getSourceFile=function(){return e.getSourceFileOfNode(this)},n.prototype.getStart=function(t){return e.getTokenPosOfNode(this,t)},n.prototype.getFullStart=function(){return this.pos},n.prototype.getEnd=function(){return this.end},n.prototype.getWidth=function(e){return this.getEnd()-this.getStart(e)},n.prototype.getFullWidth=function(){return this.end-this.pos},n.prototype.getLeadingTriviaWidth=function(e){return this.getStart(e)-this.pos},n.prototype.getFullText=function(e){return(e||this.getSourceFile()).text.substring(this.pos,this.end)},n.prototype.getText=function(e){return(e||this.getSourceFile()).text.substring(this.getStart(),this.getEnd())},n.prototype.addSyntheticNodes=function(e,n,r){for(B.setTextPos(n);n<r;){var i=B.scan(),a=B.getTextPos();e.push(t(i,n,a,2048,this)),n=a}return n},n.prototype.createSyntaxList=function(e){var n=t(274,e.pos,e.end,2048,this);n._children=[];for(var r=e.pos,i=0,a=e;i<a.length;i++){var o=a[i];r<o.pos&&(r=this.addSyntheticNodes(n._children,r,o.pos)),n._children.push(o),r=o.end}return r<e.end&&this.addSyntheticNodes(n._children,r,e.end),n},n.prototype.createChildren=function(t){var n,r=this;if(this.kind>=136){B.setText((t||this.getSourceFile()).text),n=[];var i=this.pos,a=function(e){i<e.pos&&(i=r.addSyntheticNodes(n,i,e.pos)),n.push(e),i=e.end},o=function(e){i<e.pos&&(i=r.addSyntheticNodes(n,i,e.pos)),n.push(r.createSyntaxList(e)),i=e.end};e.forEachChild(this,a,o),i<this.end&&this.addSyntheticNodes(n,i,this.end),B.setText(void 0)}this._children=n||K},n.prototype.getChildCount=function(e){return this._children||this.createChildren(e),this._children.length},n.prototype.getChildAt=function(e,t){return this._children||this.createChildren(t),this._children[e]},n.prototype.getChildren=function(e){return this._children||this.createChildren(e),this._children},n.prototype.getFirstToken=function(e){var t=this.getChildren(e);if(t.length){var n=t[0];return n.kind<136?n:n.getFirstToken(e)}},n.prototype.getLastToken=function(t){var n=this.getChildren(t),r=e.lastOrUndefined(n);if(r)return r.kind<136?r:r.getLastToken(t)},n}(),W=function(){function e(e,t){this.flags=e,this.name=t}return e.prototype.getFlags=function(){return this.flags},e.prototype.getName=function(){return this.name},e.prototype.getDeclarations=function(){return this.declarations},e.prototype.getDocumentationComment=function(){return void 0===this.documentationComment&&(this.documentationComment=n(this.declarations,this.name,!(4&this.flags))),this.documentationComment},e}(),q=function(){function e(e,t){this.checker=e,this.flags=t}return e.prototype.getFlags=function(){return this.flags},e.prototype.getSymbol=function(){return this.symbol},e.prototype.getProperties=function(){return this.checker.getPropertiesOfType(this)},e.prototype.getProperty=function(e){return this.checker.getPropertyOfType(this,e)},e.prototype.getApparentProperties=function(){return this.checker.getAugmentedPropertiesOfType(this)},e.prototype.getCallSignatures=function(){return this.checker.getSignaturesOfType(this,0)},e.prototype.getConstructSignatures=function(){return this.checker.getSignaturesOfType(this,1)},e.prototype.getStringIndexType=function(){return this.checker.getIndexTypeOfType(this,0)},e.prototype.getNumberIndexType=function(){return this.checker.getIndexTypeOfType(this,1)},e.prototype.getBaseTypes=function(){return 3072&this.flags?this.checker.getBaseTypes(this):void 0},e}(),z=function(){function e(e){this.checker=e}return e.prototype.getDeclaration=function(){return this.declaration},e.prototype.getTypeParameters=function(){return this.typeParameters},e.prototype.getParameters=function(){return this.parameters},e.prototype.getReturnType=function(){return this.checker.getReturnTypeOfSignature(this)},e.prototype.getDocumentationComment=function(){return void 0===this.documentationComment&&(this.documentationComment=this.declaration?n([this.declaration],void 0,!1):[]),this.documentationComment},e}(),H=function(t){function n(e,n,r){t.call(this,e,n,r)}return s(n,t),n.prototype.update=function(t,n){return e.updateSourceFile(this,t,n)},n.prototype.getLineAndCharacterOfPosition=function(t){return e.getLineAndCharacterOfPosition(this,t)},n.prototype.getLineStarts=function(){return e.getLineStarts(this)},n.prototype.getPositionOfLineAndCharacter=function(t,n){return e.getPositionOfLineAndCharacter(this,t,n)},n.prototype.getNamedDeclarations=function(){return this.namedDeclarations||(this.namedDeclarations=this.computeNamedDeclarations()),this.namedDeclarations},n.prototype.computeNamedDeclarations=function(){function t(e){var t=r(e);if(t){n(t).push(e)}}function n(t){return e.getProperty(o,t)||(o[t]=[])}function r(e){if(e.name){var t=i(e.name);if(void 0!==t)return t;if(137===e.name.kind){var n=e.name.expression;return 169===n.kind?n.name.text:i(n)}}}function i(e){if(e&&(69===e.kind||9===e.kind||8===e.kind))return e.text}function a(i){switch(i.kind){case 216:case 144:case 143:var o=i,s=r(o);if(s){var u=n(s),c=e.lastOrUndefined(u);c&&o.parent===c.parent&&o.symbol===c.symbol?o.body&&!c.body&&(u[u.length-1]=o):u.push(o),e.forEachChild(i,a)}break;case 217:case 218:case 219:case 220:case 221:case 224:case 233:case 229:case 224:case 226:case 227:case 146:case 147:case 156:t(i);case 145:case 196:case 215:case 164:case 165:case 222:e.forEachChild(i,a);break;case 195:e.isFunctionBlock(i)&&e.forEachChild(i,a);break;case 139:if(!(56&i.flags))break;case 214:case 166:if(e.isBindingPattern(i.name)){e.forEachChild(i.name,a);break}case 250:case 142:case 141:t(i);break;case 231:i.exportClause&&e.forEach(i.exportClause.elements,a);break;case 225:var l=i.importClause;l&&(l.name&&t(l),l.namedBindings&&(227===l.namedBindings.kind?t(l.namedBindings):e.forEach(l.namedBindings.elements,a)))}}var o={};return e.forEachChild(this,a),o},n}(j),Y=function(){function e(){}return e}();e.TextChange=Y;var J;!function(e){e.none=\"none\",e.definition=\"definition\",e.reference=\"reference\",e.writtenReference=\"writtenReference\"}(J=e.HighlightSpanKind||(e.HighlightSpanKind={})),function(e){e[e.None=0]=\"None\",e[e.Block=1]=\"Block\",e[e.Smart=2]=\"Smart\"}(e.IndentStyle||(e.IndentStyle={}));e.IndentStyle;!function(e){e[e.aliasName=0]=\"aliasName\",e[e.className=1]=\"className\",e[e.enumName=2]=\"enumName\",e[e.fieldName=3]=\"fieldName\",e[e.interfaceName=4]=\"interfaceName\",e[e.keyword=5]=\"keyword\",e[e.lineBreak=6]=\"lineBreak\",e[e.numericLiteral=7]=\"numericLiteral\",e[e.stringLiteral=8]=\"stringLiteral\",e[e.localName=9]=\"localName\",e[e.methodName=10]=\"methodName\",e[e.moduleName=11]=\"moduleName\",e[e.operator=12]=\"operator\",e[e.parameterName=13]=\"parameterName\",e[e.propertyName=14]=\"propertyName\",e[e.punctuation=15]=\"punctuation\",e[e.space=16]=\"space\",e[e.text=17]=\"text\",e[e.typeParameterName=18]=\"typeParameterName\",e[e.enumMemberName=19]=\"enumMemberName\",e[e.functionName=20]=\"functionName\",e[e.regularExpressionLiteral=21]=\"regularExpressionLiteral\"}(e.SymbolDisplayPartKind||(e.SymbolDisplayPartKind={}));var G=e.SymbolDisplayPartKind;!function(e){e[e.JavaScript=0]=\"JavaScript\",e[e.SourceMap=1]=\"SourceMap\",e[e.Declaration=2]=\"Declaration\"}(e.OutputFileType||(e.OutputFileType={}));e.OutputFileType;!function(e){e[e.None=0]=\"None\",e[e.InMultiLineCommentTrivia=1]=\"InMultiLineCommentTrivia\",e[e.InSingleQuoteStringLiteral=2]=\"InSingleQuoteStringLiteral\",e[e.InDoubleQuoteStringLiteral=3]=\"InDoubleQuoteStringLiteral\",e[e.InTemplateHeadOrNoSubstitutionTemplate=4]=\"InTemplateHeadOrNoSubstitutionTemplate\",e[e.InTemplateMiddleOrTail=5]=\"InTemplateMiddleOrTail\",e[e.InTemplateSubstitutionPosition=6]=\"InTemplateSubstitutionPosition\"}(e.EndOfLineState||(e.EndOfLineState={}));e.EndOfLineState;!function(e){e[e.Punctuation=0]=\"Punctuation\",e[e.Keyword=1]=\"Keyword\",e[e.Operator=2]=\"Operator\",e[e.Comment=3]=\"Comment\",e[e.Whitespace=4]=\"Whitespace\",e[e.Identifier=5]=\"Identifier\",e[e.NumberLiteral=6]=\"NumberLiteral\",e[e.StringLiteral=7]=\"StringLiteral\",e[e.RegExpLiteral=8]=\"RegExpLiteral\"}(e.TokenClass||(e.TokenClass={}));var X,$=e.TokenClass;!function(e){e.unknown=\"\",e.warning=\"warning\",e.keyword=\"keyword\",e.scriptElement=\"script\",e.moduleElement=\"module\",e.classElement=\"class\",e.localClassElement=\"local class\",e.interfaceElement=\"interface\",e.typeElement=\"type\",e.enumElement=\"enum\",e.variableElement=\"var\",e.localVariableElement=\"local var\",e.functionElement=\"function\",e.localFunctionElement=\"local function\",e.memberFunctionElement=\"method\",e.memberGetAccessorElement=\"getter\",e.memberSetAccessorElement=\"setter\",e.memberVariableElement=\"property\",e.constructorImplementationElement=\"constructor\",e.callSignatureElement=\"call\",e.indexSignatureElement=\"index\",e.constructSignatureElement=\"construct\",e.parameterElement=\"parameter\",e.typeParameterElement=\"type parameter\",e.primitiveType=\"primitive type\",e.label=\"label\",e.alias=\"alias\",e.constElement=\"const\",e.letElement=\"let\"}(X=e.ScriptElementKind||(e.ScriptElementKind={}));var Q;!function(e){e.none=\"\",e.publicMemberModifier=\"public\",e.privateMemberModifier=\"private\",e.protectedMemberModifier=\"protected\",e.exportedModifier=\"export\",e.ambientModifier=\"declare\",e.staticModifier=\"static\",e.abstractModifier=\"abstract\"}(Q=e.ScriptElementKindModifier||(e.ScriptElementKindModifier={}));var Z=function(){function e(){}return e.comment=\"comment\",e.identifier=\"identifier\",e.keyword=\"keyword\",e.numericLiteral=\"number\",e.operator=\"operator\",e.stringLiteral=\"string\",e.whiteSpace=\"whitespace\",e.text=\"text\",e.punctuation=\"punctuation\",e.className=\"class name\",e.enumName=\"enum name\",e.interfaceName=\"interface name\",e.moduleName=\"module name\",e.typeParameterName=\"type parameter name\",e.typeAliasName=\"type alias name\",e.parameterName=\"parameter name\",e.docCommentTagName=\"doc comment tag name\",e.jsxOpenTagName=\"jsx open tag name\",e.jsxCloseTagName=\"jsx close tag name\",e.jsxSelfClosingTagName=\"jsx self closing tag name\",e.jsxAttribute=\"jsx attribute\",e.jsxText=\"jsx text\",e.jsxAttributeStringLiteralValue=\"jsx attribute string literal value\",e}();e.ClassificationTypeNames=Z,function(e){e[e.comment=1]=\"comment\",e[e.identifier=2]=\"identifier\",e[e.keyword=3]=\"keyword\",e[e.numericLiteral=4]=\"numericLiteral\",e[e.operator=5]=\"operator\",e[e.stringLiteral=6]=\"stringLiteral\",e[e.regularExpressionLiteral=7]=\"regularExpressionLiteral\",e[e.whiteSpace=8]=\"whiteSpace\",e[e.text=9]=\"text\",e[e.punctuation=10]=\"punctuation\",e[e.className=11]=\"className\",e[e.enumName=12]=\"enumName\",e[e.interfaceName=13]=\"interfaceName\",e[e.moduleName=14]=\"moduleName\",e[e.typeParameterName=15]=\"typeParameterName\",e[e.typeAliasName=16]=\"typeAliasName\",e[e.parameterName=17]=\"parameterName\",e[e.docCommentTagName=18]=\"docCommentTagName\",e[e.jsxOpenTagName=19]=\"jsxOpenTagName\",e[e.jsxCloseTagName=20]=\"jsxCloseTagName\",e[e.jsxSelfClosingTagName=21]=\"jsxSelfClosingTagName\",e[e.jsxAttribute=22]=\"jsxAttribute\",e[e.jsxText=23]=\"jsxText\",e[e.jsxAttributeStringLiteralValue=24]=\"jsxAttributeStringLiteralValue\"}(e.ClassificationType||(e.ClassificationType={}));e.ClassificationType;e.displayPartsToString=r,e.getDefaultCompilerOptions=o;var ee=function(){function t(t,n){this.host=t,this.getCanonicalFileName=n,this.currentDirectory=t.getCurrentDirectory(),this.fileNameToEntry=e.createFileMap();for(var r=t.getScriptFileNames(),i=0,a=r;i<a.length;i++){var s=a[i];this.createEntry(s,e.toPath(s,this.currentDirectory,n))}this._compilationSettings=t.getCompilationSettings()||o()}return t.prototype.compilationSettings=function(){return this._compilationSettings},t.prototype.createEntry=function(e,t){var n,r=this.host.getScriptSnapshot(e);return r&&(n={hostFileName:e,version:this.host.getScriptVersion(e),scriptSnapshot:r}),this.fileNameToEntry.set(t,n),n},t.prototype.getEntry=function(e){return this.fileNameToEntry.get(e)},t.prototype.contains=function(e){return this.fileNameToEntry.contains(e)},t.prototype.getOrCreateEntry=function(t){var n=e.toPath(t,this.currentDirectory,this.getCanonicalFileName);return this.contains(n)?this.getEntry(n):this.createEntry(t,n)},t.prototype.getRootFileNames=function(){var e=[];return this.fileNameToEntry.forEachValue(function(t,n){n&&e.push(n.hostFileName)}),e},t.prototype.getVersion=function(e){var t=this.getEntry(e);return t&&t.version},t.prototype.getScriptSnapshot=function(e){var t=this.getEntry(e);return t&&t.scriptSnapshot},t}(),te=function(){function e(e){this.host=e}return e.prototype.getCurrentSourceFile=function(e){var t=this.host.getScriptSnapshot(e);if(!t)throw new Error(\"Could not find file: '\"+e+\"'.\");var n,r=this.host.getScriptVersion(e);if(this.currentFileName!==e)n=p(e,t,2,r,!0);else if(this.currentFileVersion!==r){var i=t.getChangeRange(this.currentFileScriptSnapshot);n=f(this.currentSourceFile,t,r,i)}return n&&(this.currentFileVersion=r,this.currentFileName=e,this.currentFileScriptSnapshot=t,this.currentSourceFile=n),this.currentSourceFile},e}();e.transpileModule=c,e.transpile=l,e.createLanguageServiceSourceFile=p,e.disableIncrementalParsing=!1,e.updateLanguageServiceSourceFile=f,e.createDocumentRegistry=d,e.preProcessFile=m;var ne;!function(e){e[e.None=0]=\"None\",e[e.Value=1]=\"Value\",e[e.Type=2]=\"Type\",e[e.Namespace=4]=\"Namespace\",e[e.All=7]=\"All\"}(ne||(ne={}));var re;!function(e){e[e.None=0]=\"None\",e[e.Unlabeled=1]=\"Unlabeled\",e[e.Labeled=2]=\"Labeled\",e[e.All=3]=\"All\"}(re||(re={}));for(var ie=[],ae=70;ae<=135;ae++)ie.push({name:e.tokenToString(ae),kind:X.keyword,kindModifiers:Q.none,sortText:\"0\"});e.getContainerNode=R,e.getNodeKind=I;var oe=function(){function t(e){this.cancellationToken=e}return t.prototype.isCancellationRequested=function(){return this.cancellationToken&&this.cancellationToken.isCancellationRequested()},t.prototype.throwIfCancellationRequested=function(){if(this.isCancellationRequested())throw new e.OperationCanceledException},t}();e.createLanguageService=D,e.getNameTable=M,e.createClassifier=O,e.getDefaultLibFilePath=U,function(){e.objectAllocator={getNodeConstructor:function(){return j},getSourceFileConstructor:function(){return H},getSymbolConstructor:function(){return W},getTypeConstructor:function(){return q},getSignatureConstructor:function(){return z}}}()}(o||(o={}));var o;!function(e){!function(t){function n(t,n){function r(n,r){var i=n.decorators?e.skipTrivia(t.text,n.decorators.end):n.getStart(t);return e.createTextSpanFromBounds(i,(r||n).getEnd())}function i(t,n){return r(t,e.findNextToken(n,n.parent))}function a(e,n){return c(e&&p===t.getLineAndCharacterOfPosition(e.getStart(t)).line?e:n)}function o(n){return e.createTextSpanFromBounds(e.skipTrivia(t.text,n.pos),n.end)}function s(n){return c(e.findPrecedingToken(n.pos,t))}function u(t){return c(e.findNextToken(t,t.parent))}function c(n){function l(n){var i=n.parent.declarations;return i&&i[0]===n?r(e.findPrecedingToken(n.pos,t,n.parent),n):r(n)}function p(n){if(203===n.parent.parent.kind)return c(n.parent.parent);if(e.isBindingPattern(n.name))return _(n.name);if(n.initializer||2&n.flags||204===n.parent.parent.kind)return l(n);var r=n.parent.declarations;return r&&r[0]!==n?c(e.findPrecedingToken(n.pos,t,n.parent)):void 0}function f(e){return!!e.initializer||void 0!==e.dotDotDotToken||!!(8&e.flags)||!!(16&e.flags)}function d(t){if(e.isBindingPattern(t.name))return _(t.name);if(f(t))return r(t);var n=t.parent,i=e.indexOf(n.parameters,t);return i?d(n.parameters[i-1]):c(n.body)}function m(e){return!!(2&e.flags)||217===e.parent.kind&&145!==e.kind}function h(n){switch(n.parent.kind){case 221:if(1!==e.getModuleInstanceState(n.parent))return;case 201:case 199:case 203:return a(n.parent,n.statements[0]);case 202:case 204:return a(e.findPrecedingToken(n.pos,t,n.parent),n.statements[0])}return c(n.statements[0])}function y(e){if(215!==e.initializer.kind)return c(e.initializer);var t=e.initializer;return t.declarations.length>0?c(t.declarations[0]):void 0}function _(t){var n=e.forEach(t.elements,function(e){return 190!==e.kind?e:void 0});return n?c(n):166===t.parent.kind?r(t.parent):l(t.parent)}function g(t){e.Debug.assert(165!==t.kind&&164!==t.kind);var n=167===t.kind?t.elements:t.properties,i=e.forEach(n,function(e){return 190!==e.kind?e:void 0});return i?c(i):r(184===t.parent.kind?t.parent:t)}if(n)switch(n.kind){case 196:return p(n.declarationList.declarations[0]);case 214:case 142:case 141:return p(n);case 139:return d(n);case 216:case 144:case 143:case 146:case 147:case 145:case 176:case 177:return function(e){if(e.body)return m(e)?r(e):c(e.body)}(n);case 195:if(e.isFunctionBlock(n))return function(e){var t=e.statements.length?e.statements[0]:e.getLastToken();return m(e.parent)?a(e.parent,t):c(t)}(n);case 222:return h(n);case 247:return h(n.block);case 198:return r(n.expression);case 207:return r(n.getChildAt(0),n.expression);case 201:return i(n,n.expression);case 200:return c(n.statement);case 213:return r(n.getChildAt(0));case 199:return i(n,n.expression);case 210:return c(n.statement);case 206:case 205:return r(n.getChildAt(0),n.label);case 202:return function(e){return e.initializer?y(e):e.condition?r(e.condition):e.incrementor?r(e.incrementor):void 0}(n);case 203:return i(n,n.expression);case 204:return y(n);case 209:return i(n,n.expression);case 244:case 245:return c(n.statements[0]);case 212:return h(n.tryBlock);case 211:return r(n,n.expression);case 230:return r(n,n.expression);case 224:return r(n,n.moduleReference);case 225:return r(n,n.moduleSpecifier);case 231:return r(n,n.moduleSpecifier);case 221:if(1!==e.getModuleInstanceState(n))return;case 217:case 220:case 250:case 166:return r(n);case 208:return c(n.statement);case 140:return o(n.parent.decorators);case 164:case 165:return _(n);case 218:case 219:return;case 23:case 1:return a(e.findPrecedingToken(n.pos,t));case 24:return s(n);case 15:return function(n){switch(n.parent.kind){case 220:var r=n.parent;return a(e.findPrecedingToken(n.pos,t,n.parent),r.members.length?r.members[0]:r.getLastToken(t));case 217:var i=n.parent;return a(e.findPrecedingToken(n.pos,t,n.parent),i.members.length?i.members[0]:i.getLastToken(t));case 223:return a(n.parent.parent,n.parent.clauses[0])}return c(n.parent)}(n);case 16:return function(t){switch(t.parent.kind){case 222:if(1!==e.getModuleInstanceState(t.parent.parent))return;case 220:case 217:return r(t);case 195:if(e.isFunctionBlock(t.parent))return r(t);case 247:return c(e.lastOrUndefined(t.parent.statements));case 223:var n=t.parent,i=e.lastOrUndefined(n.clauses);if(i)return c(e.lastOrUndefined(i.statements));return;case 164:var a=t.parent;return c(e.lastOrUndefined(a.elements)||a);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var o=t.parent;return r(e.lastOrUndefined(o.properties)||o)}return c(t.parent)}}(n);case 20:return function(t){switch(t.parent.kind){case 165:var n=t.parent;return r(e.lastOrUndefined(n.elements)||n);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(t.parent)){var i=t.parent;return r(e.lastOrUndefined(i.elements)||i)}return c(t.parent)}}(n);case 17:return function(e){return 200===e.parent.kind||171===e.parent.kind||172===e.parent.kind?s(e):175===e.parent.kind?u(e):c(e.parent)}(n);case 18:return function(e){switch(e.parent.kind){case 176:case 216:case 177:case 144:case 143:case 146:case 147:case 145:case 201:case 200:case 202:case 204:case 171:case 172:case 175:return s(e);default:return c(e.parent)}}(n);case 54:return function(t){return e.isFunctionLike(t.parent)||248===t.parent.kind||139===t.parent.kind?s(t):c(t.parent)}(n);case 27:case 25:return function(e){return 174===e.parent.kind?u(e):c(e.parent)}(n);case 104:return function(e){return 200===e.parent.kind?i(e,e.parent.expression):c(e.parent)}(n);case 80:case 72:case 85:return u(n);case 135:return function(e){return 204===e.parent.kind?u(e):c(e.parent)}(n);default:if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(n))return g(n);if((69===n.kind||188==n.kind||248===n.kind||249===n.kind)&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(n.parent))return r(n);if(184===n.kind){var v=n;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(v.left))return g(v.left);if(56===v.operatorToken.kind&&e.isArrayLiteralOrObjectLiteralDestructuringPattern(v.parent))return r(n);if(24===v.operatorToken.kind)return c(v.left)}if(e.isExpression(n))switch(n.parent.kind){case 200:return s(n);case 140:return c(n.parent);case 202:case 204:return r(n);case 184:if(24===n.parent.operatorToken.kind)return r(n);break;case 177:if(n.parent.body===n)return r(n)}if(248===n.parent.kind&&n.parent.name===n&&!e.isArrayLiteralOrObjectLiteralDestructuringPattern(n.parent.parent))return c(n.parent.initializer);if(174===n.parent.kind&&n.parent.type===n)return u(n.parent.type);if(e.isFunctionLike(n.parent)&&n.parent.type===n)return s(n);if(214===n.parent.kind||139===n.parent.kind){var b=n.parent;if(b.initializer===n||b.type===n||e.isAssignmentOperator(n.kind))return s(n)}if(184===n.parent.kind){var v=n.parent;if(e.isArrayLiteralOrObjectLiteralDestructuringPattern(v.left)&&(v.right===n||v.operatorToken===n))return s(n)}return c(n.parent)}}if(!(4096&t.flags)){var l=e.getTokenAtPosition(t,n),p=t.getLineAndCharacterOfPosition(n).line;if((!(t.getLineAndCharacterOfPosition(l.getStart(t)).line>p)||(l=e.findPrecedingToken(l.pos,t))&&t.getLineAndCharacterOfPosition(l.getEnd()).line===p)&&!e.isInAmbientContext(l))return c(l)}}t.spanInSourceFileAtLocation=n}(e.BreakpointResolver||(e.BreakpointResolver={}))}(o||(o={}));var o,u=this;!function(t){function n(e,t){e&&e.log(\"*INTERNAL ERROR* - Exception in typescript services: \"+t.message)}function r(e,t,n,r){var i;r&&(e.log(t),i=Date.now());var a=n();if(r){var o=Date.now();if(e.log(t+\" completed in \"+(o-i)+\" msec\"),\"string\"==typeof a){var s=a;s.length>128&&(s=s.substring(0,128)+\"...\"),e.log(\"  result.length=\"+s.length+\", result='\"+JSON.stringify(s)+\"'\")}}return a}function i(e,i,a,o){try{var s=r(e,i,a,o);return JSON.stringify({result:s})}catch(r){return r instanceof t.OperationCanceledException?JSON.stringify({canceled:!0}):(n(e,r),r.description=i,JSON.stringify({error:r}))}}function a(e,t){return e.map(function(e){return o(e,t)})}function o(e,n){return{message:t.flattenDiagnosticMessageText(e.messageText,n),start:e.start,length:e.length,category:t.DiagnosticCategory[e.category].toLowerCase(),code:e.code}}function c(e){return{spans:e.spans.join(\",\"),endOfLineState:e.endOfLineState}}var l=function(){function e(e){this.scriptSnapshotShim=e}return e.prototype.getText=function(e,t){return this.scriptSnapshotShim.getText(e,t)},e.prototype.getLength=function(){return this.scriptSnapshotShim.getLength()},e.prototype.getChangeRange=function(e){var n=e,r=this.scriptSnapshotShim.getChangeRange(n.scriptSnapshotShim);if(null==r)return null;var i=JSON.parse(r);return t.createTextChangeRange(t.createTextSpan(i.span.start,i.span.length),i.newLength)},e.prototype.dispose=function(){\"dispose\"in this.scriptSnapshotShim&&this.scriptSnapshotShim.dispose()},e}(),p=function(){function e(e){var n=this;this.shimHost=e,this.loggingEnabled=!1,this.tracingEnabled=!1,\"getModuleResolutionsForFile\"in this.shimHost&&(this.resolveModuleNames=function(e,r){var i=JSON.parse(n.shimHost.getModuleResolutionsForFile(r));return t.map(e,function(e){var n=t.lookUp(i,e);return n?{resolvedFileName:n}:void 0})}),\"directoryExists\"in this.shimHost&&(this.directoryExists=function(e){return n.shimHost.directoryExists(e)})}return e.prototype.log=function(e){this.loggingEnabled&&this.shimHost.log(e)},e.prototype.trace=function(e){this.tracingEnabled&&this.shimHost.trace(e)},e.prototype.error=function(e){this.shimHost.error(e)},e.prototype.getProjectVersion=function(){if(this.shimHost.getProjectVersion)return this.shimHost.getProjectVersion()},e.prototype.useCaseSensitiveFileNames=function(){return!!this.shimHost.useCaseSensitiveFileNames&&this.shimHost.useCaseSensitiveFileNames()},e.prototype.getCompilationSettings=function(){var e=this.shimHost.getCompilationSettings();if(null==e||\"\"==e)throw Error(\"LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings\");return JSON.parse(e)},e.prototype.getScriptFileNames=function(){var e=this.shimHost.getScriptFileNames();return this.files=JSON.parse(e)},e.prototype.getScriptSnapshot=function(e){var t=this.shimHost.getScriptSnapshot(e);return t&&new l(t)},e.prototype.getScriptVersion=function(e){return this.shimHost.getScriptVersion(e)},e.prototype.getLocalizedDiagnosticMessages=function(){var e=this.shimHost.getLocalizedDiagnosticMessages();if(null==e||\"\"==e)return null;try{return JSON.parse(e)}catch(e){return this.log(e.description||\"diagnosticMessages.generated.json has invalid JSON format\"),null}},e.prototype.getCancellationToken=function(){return new f(this.shimHost.getCancellationToken())},e.prototype.getCurrentDirectory=function(){return this.shimHost.getCurrentDirectory()},e.prototype.getDefaultLibFileName=function(e){return this.shimHost.getDefaultLibFileName(JSON.stringify(e))},e}();t.LanguageServiceShimHostAdapter=p;var f=function(){function e(e){this.hostCancellationToken=e,this.lastCancellationCheckTime=0}return e.prototype.isCancellationRequested=function(){var e=Date.now();return Math.abs(e-this.lastCancellationCheckTime)>10&&(this.lastCancellationCheckTime=e,this.hostCancellationToken.isCancellationRequested())},e}(),d=function(){function e(e){var t=this;this.shimHost=e,\"directoryExists\"in this.shimHost&&(this.directoryExists=function(e){return t.shimHost.directoryExists(e)})}return e.prototype.readDirectory=function(e,t,n){var r=this.shimHost.readDirectory(e,t,JSON.stringify(n));return JSON.parse(r)},e.prototype.fileExists=function(e){return this.shimHost.fileExists(e)},e.prototype.readFile=function(e){return this.shimHost.readFile(e)},e}();t.CoreServicesShimHostAdapter=d;var m=function(){function e(e){this.factory=e,e.registerShim(this)}return e.prototype.dispose=function(e){this.factory.unregisterShim(this)},e}();t.realizeDiagnostics=a;var h=function(e){function n(t,n,r){e.call(this,t),this.host=n,this.languageService=r,this.logPerformance=!1,this.logger=this.host}return s(n,e),n.prototype.forwardJSONCall=function(e,t){return i(this.logger,e,t,this.logPerformance)},n.prototype.dispose=function(t){this.logger.log(\"dispose()\"),this.languageService.dispose(),this.languageService=null,u&&u.CollectGarbage&&(u.CollectGarbage(),this.logger.log(\"CollectGarbage()\")),this.logger=null,e.prototype.dispose.call(this,t)},n.prototype.refresh=function(e){this.forwardJSONCall(\"refresh(\"+e+\")\",function(){return null})},n.prototype.cleanupSemanticCache=function(){var e=this;this.forwardJSONCall(\"cleanupSemanticCache()\",function(){return e.languageService.cleanupSemanticCache(),null})},n.prototype.realizeDiagnostics=function(e){var n=t.getNewLineOrDefaultFromHost(this.host);return t.realizeDiagnostics(e,n)},n.prototype.getSyntacticClassifications=function(e,n,r){var i=this;return this.forwardJSONCall(\"getSyntacticClassifications('\"+e+\"', \"+n+\", \"+r+\")\",function(){return i.languageService.getSyntacticClassifications(e,t.createTextSpan(n,r))})},n.prototype.getSemanticClassifications=function(e,n,r){var i=this;return this.forwardJSONCall(\"getSemanticClassifications('\"+e+\"', \"+n+\", \"+r+\")\",function(){return i.languageService.getSemanticClassifications(e,t.createTextSpan(n,r))})},n.prototype.getEncodedSyntacticClassifications=function(e,n,r){var i=this;return this.forwardJSONCall(\"getEncodedSyntacticClassifications('\"+e+\"', \"+n+\", \"+r+\")\",function(){return c(i.languageService.getEncodedSyntacticClassifications(e,t.createTextSpan(n,r)))})},n.prototype.getEncodedSemanticClassifications=function(e,n,r){var i=this;return this.forwardJSONCall(\"getEncodedSemanticClassifications('\"+e+\"', \"+n+\", \"+r+\")\",function(){return c(i.languageService.getEncodedSemanticClassifications(e,t.createTextSpan(n,r)))})},n.prototype.getSyntacticDiagnostics=function(e){var t=this;return this.forwardJSONCall(\"getSyntacticDiagnostics('\"+e+\"')\",function(){var n=t.languageService.getSyntacticDiagnostics(e);return t.realizeDiagnostics(n)})},n.prototype.getSemanticDiagnostics=function(e){var t=this;return this.forwardJSONCall(\"getSemanticDiagnostics('\"+e+\"')\",function(){var n=t.languageService.getSemanticDiagnostics(e);return t.realizeDiagnostics(n)})},n.prototype.getCompilerOptionsDiagnostics=function(){var e=this;return this.forwardJSONCall(\"getCompilerOptionsDiagnostics()\",function(){var t=e.languageService.getCompilerOptionsDiagnostics();return e.realizeDiagnostics(t)})},n.prototype.getQuickInfoAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getQuickInfoAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getQuickInfoAtPosition(e,t)})},n.prototype.getNameOrDottedNameSpan=function(e,t,n){var r=this;return this.forwardJSONCall(\"getNameOrDottedNameSpan('\"+e+\"', \"+t+\", \"+n+\")\",function(){return r.languageService.getNameOrDottedNameSpan(e,t,n)})},n.prototype.getBreakpointStatementAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getBreakpointStatementAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getBreakpointStatementAtPosition(e,t)})},n.prototype.getSignatureHelpItems=function(e,t){var n=this;return this.forwardJSONCall(\"getSignatureHelpItems('\"+e+\"', \"+t+\")\",function(){return n.languageService.getSignatureHelpItems(e,t)})},n.prototype.getDefinitionAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getDefinitionAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getDefinitionAtPosition(e,t)})},n.prototype.getTypeDefinitionAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getTypeDefinitionAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getTypeDefinitionAtPosition(e,t)})},n.prototype.getRenameInfo=function(e,t){var n=this;return this.forwardJSONCall(\"getRenameInfo('\"+e+\"', \"+t+\")\",function(){return n.languageService.getRenameInfo(e,t)})},n.prototype.findRenameLocations=function(e,t,n,r){var i=this;return this.forwardJSONCall(\"findRenameLocations('\"+e+\"', \"+t+\", \"+n+\", \"+r+\")\",function(){return i.languageService.findRenameLocations(e,t,n,r)})},n.prototype.getBraceMatchingAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getBraceMatchingAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getBraceMatchingAtPosition(e,t)})},n.prototype.getIndentationAtPosition=function(e,t,n){var r=this;return this.forwardJSONCall(\"getIndentationAtPosition('\"+e+\"', \"+t+\")\",function(){var i=JSON.parse(n);return r.languageService.getIndentationAtPosition(e,t,i)})},n.prototype.getReferencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getReferencesAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getReferencesAtPosition(e,t)})},n.prototype.findReferences=function(e,t){var n=this;return this.forwardJSONCall(\"findReferences('\"+e+\"', \"+t+\")\",function(){return n.languageService.findReferences(e,t)})},n.prototype.getOccurrencesAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getOccurrencesAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getOccurrencesAtPosition(e,t)})},n.prototype.getDocumentHighlights=function(e,n,r){var i=this;return this.forwardJSONCall(\"getDocumentHighlights('\"+e+\"', \"+n+\")\",function(){var a=i.languageService.getDocumentHighlights(e,n,JSON.parse(r)),o=t.normalizeSlashes(e).toLowerCase();return t.filter(a,function(e){return t.normalizeSlashes(e.fileName).toLowerCase()===o})})},n.prototype.getCompletionsAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getCompletionsAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getCompletionsAtPosition(e,t)})},n.prototype.getCompletionEntryDetails=function(e,t,n){var r=this;return this.forwardJSONCall(\"getCompletionEntryDetails('\"+e+\"', \"+t+\", '\"+n+\"')\",function(){return r.languageService.getCompletionEntryDetails(e,t,n)})},n.prototype.getFormattingEditsForRange=function(e,t,n,r){var i=this;return this.forwardJSONCall(\"getFormattingEditsForRange('\"+e+\"', \"+t+\", \"+n+\")\",function(){var a=JSON.parse(r);return i.languageService.getFormattingEditsForRange(e,t,n,a)})},n.prototype.getFormattingEditsForDocument=function(e,t){var n=this;return this.forwardJSONCall(\"getFormattingEditsForDocument('\"+e+\"')\",function(){var r=JSON.parse(t);return n.languageService.getFormattingEditsForDocument(e,r)})},n.prototype.getFormattingEditsAfterKeystroke=function(e,t,n,r){var i=this;return this.forwardJSONCall(\"getFormattingEditsAfterKeystroke('\"+e+\"', \"+t+\", '\"+n+\"')\",function(){var a=JSON.parse(r);return i.languageService.getFormattingEditsAfterKeystroke(e,t,n,a)})},n.prototype.getDocCommentTemplateAtPosition=function(e,t){var n=this;return this.forwardJSONCall(\"getDocCommentTemplateAtPosition('\"+e+\"', \"+t+\")\",function(){return n.languageService.getDocCommentTemplateAtPosition(e,t)})},n.prototype.getNavigateToItems=function(e,t){var n=this;return this.forwardJSONCall(\"getNavigateToItems('\"+e+\"', \"+t+\")\",function(){return n.languageService.getNavigateToItems(e,t)})},n.prototype.getNavigationBarItems=function(e){var t=this;return this.forwardJSONCall(\"getNavigationBarItems('\"+e+\"')\",function(){return t.languageService.getNavigationBarItems(e)})},n.prototype.getOutliningSpans=function(e){var t=this;return this.forwardJSONCall(\"getOutliningSpans('\"+e+\"')\",function(){return t.languageService.getOutliningSpans(e)})},n.prototype.getTodoComments=function(e,t){var n=this;return this.forwardJSONCall(\"getTodoComments('\"+e+\"')\",function(){return n.languageService.getTodoComments(e,JSON.parse(t))})},n.prototype.getEmitOutput=function(e){var t=this;return this.forwardJSONCall(\"getEmitOutput('\"+e+\"')\",function(){return t.languageService.getEmitOutput(e)})},n}(m),y=function(e){function n(n,r){e.call(this,n),this.logger=r,this.logPerformance=!1,this.classifier=t.createClassifier()}return s(n,e),n.prototype.getEncodedLexicalClassifications=function(e,t,n){var r=this;return i(this.logger,\"getEncodedLexicalClassifications\",function(){return c(r.classifier.getEncodedLexicalClassifications(e,t,n))},this.logPerformance)},n.prototype.getClassificationsForLine=function(e,t,n){for(var r=this.classifier.getClassificationsForLine(e,t,n),i=\"\",a=0,o=r.entries;a<o.length;a++){var s=o[a];i+=s.length+\"\\n\",i+=s.classification+\"\\n\"}return i+=r.finalLexState},n}(m),_=function(e){function n(t,n,r){e.call(this,t),this.logger=n,this.host=r,this.logPerformance=!1}return s(n,e),n.prototype.forwardJSONCall=function(e,t){return i(this.logger,e,t,this.logPerformance)},n.prototype.resolveModuleName=function(e,n,r){var i=this;return this.forwardJSONCall(\"resolveModuleName('\"+e+\"')\",function(){var a=JSON.parse(r),o=t.resolveModuleName(n,t.normalizeSlashes(e),a,i.host);return{resolvedFileName:o.resolvedModule?o.resolvedModule.resolvedFileName:void 0,failedLookupLocations:o.failedLookupLocations}})},n.prototype.getPreProcessedFileInfo=function(e,n){return this.forwardJSONCall(\"getPreProcessedFileInfo('\"+e+\"')\",function(){var e=t.preProcessFile(n.getText(0,n.getLength()),!0,!0),r={referencedFiles:[],importedFiles:[],ambientExternalModules:e.ambientExternalModules,isLibFile:e.isLibFile};return t.forEach(e.referencedFiles,function(e){r.referencedFiles.push({path:t.normalizePath(e.fileName),position:e.pos,length:e.end-e.pos})}),t.forEach(e.importedFiles,function(e){r.importedFiles.push({path:t.normalizeSlashes(e.fileName),position:e.pos,length:e.end-e.pos})}),r})},n.prototype.getTSConfigFileInfo=function(e,n){var r=this;return this.forwardJSONCall(\"getTSConfigFileInfo('\"+e+\"')\",function(){var i=n.getText(0,n.getLength()),s=t.parseConfigFileTextToJson(e,i);if(s.error)return{options:{},files:[],errors:[o(s.error,\"\\r\\n\")]};var u=t.normalizeSlashes(e),c=t.parseJsonConfigFileContent(s.config,r.host,t.getDirectoryPath(u),{},u);return{options:c.options,files:c.fileNames,errors:a(c.errors,\"\\r\\n\")}})},n.prototype.getDefaultCompilationSettings=function(){return this.forwardJSONCall(\"getDefaultCompilationSettings()\",function(){return t.getDefaultCompilerOptions()})},n}(m),g=function(){function e(){this._shims=[]}return e.prototype.getServicesVersion=function(){return t.servicesVersion},e.prototype.createLanguageServiceShim=function(e){try{void 0===this.documentRegistry&&(this.documentRegistry=t.createDocumentRegistry(e.useCaseSensitiveFileNames&&e.useCaseSensitiveFileNames(),e.getCurrentDirectory()));var r=new p(e);return new h(this,e,t.createLanguageService(r,this.documentRegistry))}catch(t){throw n(e,t),t}},e.prototype.createClassifierShim=function(e){try{return new y(this,e)}catch(t){throw n(e,t),t}},e.prototype.createCoreServicesShim=function(e){try{return new _(this,e,new d(e))}catch(t){throw n(e,t),t}},e.prototype.close=function(){this._shims=[],this.documentRegistry=void 0},e.prototype.registerShim=function(e){this._shims.push(e)},e.prototype.unregisterShim=function(e){for(var t=0,n=this._shims.length;t<n;t++)if(this._shims[t]===e)return void delete this._shims[t];throw new Error(\"Invalid operation\")},e}();t.TypeScriptServicesFactory=g,void 0!==e&&e.exports&&(e.exports=t)}(o||(o={}));var c;!function(e){!function(e){e.TypeScriptServicesFactory=o.TypeScriptServicesFactory}(e.Services||(e.Services={}))}(c||(c={}))}).call(t,n(23),\"node_modules/typescript/lib/typescript.js\",n(13),\"node_modules/typescript/lib\")},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(e,t,n){function r(t){var r=e[t];!r&&o&&(r=2==e.length?function(n){e(t,n)}:e),i[t]=r&&function(e){r(\"[xmldom \"+t+\"]\\t\"+e+s(n))}||function(){}}if(!e){if(t instanceof a)return t;e=t}var i={},o=e instanceof Function;return n=n||{},r(\"warning\"),r(\"error\"),r(\"fatalError\"),i}function a(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return\"\\n@\"+(e.systemId||\"\")+\"#[line:\"+e.lineNumber+\",col:\"+e.columnNumber+\"]\"}function u(e,t,n){return\"string\"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+\"\":e}function c(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new a,s=n.errorHandler,u=n.locator,c=n.xmlns||{},p={lt:\"<\",gt:\">\",amp:\"&\",quot:'\"',apos:\"'\"};return u&&o.setDocumentLocator(u),r.errorHandler=i(s,o,u),r.domBuilder=n.domBuilder||o,/\\/x?html?$/.test(t)&&(p.nbsp=\" \",p.copy=\"©\",c[\"\"]=\"http://www.w3.org/1999/xhtml\"),c.xml=c.xml||\"http://www.w3.org/XML/1998/namespace\",e?r.parse(e,c,p):r.errorHandler.error(\"invalid doc source\"),o.doc},a.prototype={startDocument:function(){this.doc=(new p).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,a=i.createElementNS(e,n||t),s=r.length;c(this,a),this.currentElement=a,this.locator&&o(this.locator,a);for(var u=0;u<s;u++){var e=r.getURI(u),l=r.getValue(u),n=r.getQName(u),p=i.createAttributeNS(e,n);this.locator&&o(r.getLocator(u),p),p.value=p.nodeValue=l,a.setAttributeNode(p)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=u.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else var r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=u.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),c(this,i)}},warning:function(e){console.warn(\"[xmldom warning]\\t\"+e,s(this.locator))},error:function(e){console.error(\"[xmldom error]\\t\"+e,s(this.locator))},fatalError:function(e){throw console.error(\"[xmldom fatalError]\\t\"+e,s(this.locator)),e}},\"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl\".replace(/\\w+/g,function(e){a.prototype[e]=function(){return null}});var l=n(377).XMLReader,p=t.DOMImplementation=n(169).DOMImplementation;t.XMLSerializer=n(169).XMLSerializer,t.DOMParser=r},function(e,t,n){\"use strict\";var r=n(49),i=new r({include:[n(381)],implicit:[n(398),n(391)],explicit:[n(384),n(393),n(394),n(396)]});e.exports=i},function(e,t,n){\"use strict\";(function(t){function n(e){o.length||(a(),s=!0),o[o.length]=e}function r(){for(;u<o.length;){var e=u;if(u+=1,o[e].call(),u>c){for(var t=0,n=o.length-u;t<n;t++)o[t]=o[t+u];o.length-=u,u=0}}o.length=0,u=0,s=!1}function i(e){return function(){function t(){clearTimeout(n),clearInterval(r),e()}var n=setTimeout(t,0),r=setInterval(t,50)}}e.exports=n;var a,o=[],s=!1,u=0,c=1024,l=void 0!==t?t:self,p=l.MutationObserver||l.WebKitMutationObserver;a=\"function\"==typeof p?function(e){var t=1,n=new p(e),r=document.createTextNode(\"\");return n.observe(r,{characterData:!0}),function(){t=-t,r.data=t}}(r):i(r),n.requestFlush=a,n.makeRequestCallFromTimer=i}).call(t,n(13))},function(e,t,n){var r=n(32),i=n(31);e.exports=function(e,t,n){var a=i(e,t);return n||(a=a.replace(/(\\d) (?=\\d)/g,\"$1_\")),a.replace(/ (.)/g,function(e,n){return r(n,t)})}},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Arabic (ar)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){var t=[\"٠\",\"١\",\"٢\",\"٣\",\"٤\",\"٥\",\"٦\",\"٧\",\"٨\",\"٩\"],n={\"٠\":0,\"١\":1,\"٢\":2,\"٣\":3,\"٤\":4,\"٥\":5,\"٦\":6,\"٧\":7,\"٨\":8,\"٩\":9};e.setLocales(\"ar\",{MMMM:[\"كانون الثاني يناير\",\"شباط فبراير\",\"آذار مارس\",\"نيسان أبريل\",\"أيار مايو\",\"حزيران يونيو\",\"تموز يوليو\",\"آب أغسطس\",\"أيلول سبتمبر\",\"تشرين الأول أكتوبر\",\"تشرين الثاني نوفمبر\",\"كانون الأول ديسمبر\"],MMM:[\"كانون الثاني يناير\",\"شباط فبراير\",\"آذار مارس\",\"نيسان أبريل\",\"أيار مايو\",\"حزيران يونيو\",\"تموز يوليو\",\"آب أغسطس\",\"أيلول سبتمبر\",\"تشرين الأول أكتوبر\",\"تشرين الثاني نوفمبر\",\"كانون الأول ديسمبر\"],dddd:[\"الأحد\",\"الإثنين\",\"الثلاثاء\",\"الأربعاء\",\"الخميس\",\"الجمعة\",\"السبت\"],ddd:[\"أحد\",\"إثنين\",\"ثلاثاء\",\"أربعاء\",\"خميس\",\"جمعة\",\"سبت\"],dd:[\"ح\",\"ن\",\"ث\",\"ر\",\"خ\",\"ج\",\"س\"],A:[\"ص\",\"م\"],formats:{post:function(e){return e.replace(/\\d/g,function(e){return t[0|e]})}},parsers:{pre:function(e){return e.replace(/[٠١٢٣٤٥٦٧٨٩]/g,function(e){return\"\"+n[e]})}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Bengali (bn)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"bn\",{MMMM:[\"জানুয়ারী\",\"ফেবুয়ারী\",\"মার্চ\",\"এপ্রিল\",\"মে\",\"জুন\",\"জুলাই\",\"অগাস্ট\",\"সেপ্টেম্বর\",\"অক্টোবর\",\"নভেম্বর\",\"ডিসেম্বর\"],MMM:[\"জানু\",\"ফেব\",\"মার্চ\",\"এপর\",\"মে\",\"জুন\",\"জুল\",\"অগ\",\"সেপ্ট\",\"অক্টো\",\"নভ\",\"ডিসেম্\"],dddd:[\"রবিবার\",\"সোমবার\",\"মঙ্গলবার\",\"বুধবার\",\"বৃহস্পত্তিবার\",\"শুক্রবার\",\"শনিবার\"],ddd:[\"রবি\",\"সোম\",\"মঙ্গল\",\"বুধ\",\"বৃহস্পত্তি\",\"শুক্র\",\"শনি\"],dd:[\"রব\",\"সম\",\"মঙ্গ\",\"বু\",\"ব্রিহ\",\"শু\",\"শনি\"],A:[\"রাত\",\"সকাল\",\"দুপুর\",\"বিকাল\"],formats:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parsers:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve German (de)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"de\",{MMMM:[\"Januar\",\"Februar\",\"März\",\"April\",\"Mai\",\"Juni\",\"Juli\",\"August\",\"September\",\"Oktober\",\"November\",\"Dezember\"],MMM:[\"Jan.\",\"Febr.\",\"Mrz.\",\"Apr.\",\"Mai\",\"Jun.\",\"Jul.\",\"Aug.\",\"Sept.\",\"Okt.\",\"Nov.\",\"Dez.\"],dddd:[\"Sonntag\",\"Montag\",\"Dienstag\",\"Mittwoch\",\"Donnerstag\",\"Freitag\",\"Samstag\"],ddd:[\"So.\",\"Mo.\",\"Di.\",\"Mi.\",\"Do.\",\"Fr.\",\"Sa.\"],dd:[\"So\",\"Mo\",\"Di\",\"Mi\",\"Do\",\"Fr\",\"Sa\"],A:[\"Uhr nachmittags\",\"Uhr morgens\"]})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Spanish (es)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"es\",{MMMM:[\"enero\",\"febrero\",\"marzo\",\"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\"],MMM:[\"ene.\",\"feb.\",\"mar.\",\"abr.\",\"may.\",\"jun.\",\"jul.\",\"ago.\",\"sep.\",\"oct.\",\"nov.\",\"dic.\"],dddd:[\"domingo\",\"lunes\",\"martes\",\"miércoles\",\"jueves\",\"viernes\",\"sábado\"],ddd:[\"dom.\",\"lun.\",\"mar.\",\"mié.\",\"jue.\",\"vie.\",\"sáb.\"],dd:[\"do\",\"lu\",\"ma\",\"mi\",\"ju\",\"vi\",\"sá\"],A:[\"de la mañana\",\"de la tarde\",\"de la noche\"],formats:{A:function(e){var t=e.getHours();return t<12?this.A[0]:t<19?this.A[1]:this.A[2]}},parsers:{h:function(e,t){return t<1?e:e>11?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve French (fr)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"fr\",{MMMM:[\"janvier\",\"février\",\"mars\",\"avril\",\"mai\",\"juin\",\"juillet\",\"août\",\"septembre\",\"octobre\",\"novembre\",\"décembre\"],MMM:[\"janv.\",\"févr.\",\"mars\",\"avr.\",\"mai\",\"juin\",\"juil.\",\"août\",\"sept.\",\"oct.\",\"nov.\",\"déc.\"],dddd:[\"dimanche\",\"lundi\",\"mardi\",\"mercredi\",\"jeudi\",\"vendredi\",\"samedi\"],ddd:[\"dim.\",\"lun.\",\"mar.\",\"mer.\",\"jeu.\",\"ven.\",\"sam.\"],dd:[\"Di\",\"Lu\",\"Ma\",\"Me\",\"Je\",\"Ve\",\"Sa\"],A:[\"matin\",\"l'après-midi\"]})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Hindi (hi)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"hi\",{MMMM:[\"जनवरी\",\"फ़रवरी\",\"मार्च\",\"अप्रैल\",\"मई\",\"जून\",\"जुलाई\",\"अगस्त\",\"सितम्बर\",\"अक्टूबर\",\"नवम्बर\",\"दिसम्बर\"],MMM:[\"जन.\",\"फ़र.\",\"मार्च\",\"अप्रै.\",\"मई\",\"जून\",\"जुल.\",\"अग.\",\"सित.\",\"अक्टू.\",\"नव.\",\"दिस.\"],dddd:[\"रविवार\",\"सोमवार\",\"मंगलवार\",\"बुधवार\",\"गुरूवार\",\"शुक्रवार\",\"शनिवार\"],ddd:[\"रवि\",\"सोम\",\"मंगल\",\"बुध\",\"गुरू\",\"शुक्र\",\"शनि\"],dd:[\"र\",\"सो\",\"मं\",\"बु\",\"गु\",\"शु\",\"श\"],A:[\"रात\",\"सुबह\",\"दोपहर\",\"शाम\"],formats:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<10?this.A[1]:t<17?this.A[2]:t<20?this.A[3]:this.A[0]}},parsers:{h:function(e,t){return t<1?e<4||e>11?e:e+12:t<2?e:t<3&&e>9?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Italian (it)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"it\",{MMMM:[\"gennaio\",\"febbraio\",\"marzo\",\"aprile\",\"maggio\",\"giugno\",\"luglio\",\"agosto\",\"settembre\",\"ottobre\",\"novembre\",\"dicembre\"],MMM:[\"gen\",\"feb\",\"mar\",\"apr\",\"mag\",\"giu\",\"lug\",\"ago\",\"set\",\"ott\",\"nov\",\"dic\"],dddd:[\"Domenica\",\"Lunedì\",\"Martedì\",\"Mercoledì\",\"Giovedì\",\"Venerdì\",\"Sabato\"],ddd:[\"Dom\",\"Lun\",\"Mar\",\"Mer\",\"Gio\",\"Ven\",\"Sab\"],dd:[\"Do\",\"Lu\",\"Ma\",\"Me\",\"Gi\",\"Ve\",\"Sa\"],A:[\"di mattina\",\"di pomerrigio\"]})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Japanese (ja)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"ja\",{MMMM:[\"1月\",\"2月\",\"3月\",\"4月\",\"5月\",\"6月\",\"7月\",\"8月\",\"9月\",\"10月\",\"11月\",\"12月\"],MMM:[\"1月\",\"2月\",\"3月\",\"4月\",\"5月\",\"6月\",\"7月\",\"8月\",\"9月\",\"10月\",\"11月\",\"12月\"],dddd:[\"日曜日\",\"月曜日\",\"火曜日\",\"水曜日\",\"木曜日\",\"金曜日\",\"土曜日\"],ddd:[\"日\",\"月\",\"火\",\"水\",\"木\",\"金\",\"土\"],dd:[\"日\",\"月\",\"火\",\"水\",\"木\",\"金\",\"土\"],A:[\"午前\",\"午後\"],formats:{hh:function(e){return(\"0\"+e.getHours()%12).slice(-2)},h:function(e){return e.getHours()%12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Korean (ko)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"ko\",{MMMM:[\"1월\",\"2월\",\"3월\",\"4월\",\"5월\",\"6월\",\"7월\",\"8월\",\"9월\",\"10월\",\"11월\",\"12월\"],MMM:[\"1월\",\"2월\",\"3월\",\"4월\",\"5월\",\"6월\",\"7월\",\"8월\",\"9월\",\"10월\",\"11월\",\"12월\"],dddd:[\"일요일\",\"월요일\",\"화요일\",\"수요일\",\"목요일\",\"금요일\",\"토요일\"],ddd:[\"일\",\"월\",\"화\",\"수\",\"목\",\"금\",\"토\"],dd:[\"일\",\"월\",\"화\",\"수\",\"목\",\"금\",\"토\"],A:[\"오전\",\"오후\"]})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Portuguese (pt)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"pt\",{MMMM:[\"Janeiro\",\"Fevereiro\",\"Março\",\"Abril\",\"Maio\",\"Junho\",\"Julho\",\"Agosto\",\"Setembro\",\"Outubro\",\"Novembro\",\"Dezembro\"],MMM:[\"Jan\",\"Fev\",\"Mar\",\"Abr\",\"Mai\",\"Jun\",\"Jul\",\"Ago\",\"Set\",\"Out\",\"Nov\",\"Dez\"],dddd:[\"Domingo\",\"Segunda-Feira\",\"Terça-Feira\",\"Quarta-Feira\",\"Quinta-Feira\",\"Sexta-Feira\",\"Sábado\"],ddd:[\"Dom\",\"Seg\",\"Ter\",\"Qua\",\"Qui\",\"Sex\",\"Sáb\"],dd:[\"Dom\",\"2ª\",\"3ª\",\"4ª\",\"5ª\",\"6ª\",\"Sáb\"],A:[\"da madrugada\",\"da manhã\",\"da tarde\",\"da noite\"],formats:{A:function(e){var t=e.getHours();return t<5?this.A[0]:t<12?this.A[1]:t<19?this.A[2]:this.A[3]}},parsers:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Russian (ru)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"ru\",{MMMM:[\"Января\",\"Февраля\",\"Марта\",\"Апреля\",\"Мая\",\"Июня\",\"Июля\",\"Августа\",\"Сентября\",\"Октября\",\"Ноября\",\"Декабря\"],MMM:[\"янв\",\"фев\",\"мар\",\"апр\",\"мая\",\"июня\",\"июля\",\"авг\",\"сен\",\"окт\",\"ноя\",\"дек\"],dddd:[\"Воскресенье\",\"Понедельник\",\"Вторник\",\"Среду\",\"Четверг\",\"Пятницу\",\"Субботу\"],ddd:[\"Вс\",\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\"],dd:[\"Вс\",\"Пн\",\"Вт\",\"Ср\",\"Чт\",\"Пт\",\"Сб\"],A:[\"ночи\",\"утра\",\"дня\",\"вечера\"],formats:{A:function(e){var t=e.getHours();return t<4?this.A[0]:t<12?this.A[1]:t<17?this.A[2]:this.A[3]}},parsers:{h:function(e,t){return t<2?e:e>11?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Chinese (zh-cn)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"zh-cn\",{MMMM:[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"],MMM:[\"1月\",\"2月\",\"3月\",\"4月\",\"5月\",\"6月\",\"7月\",\"8月\",\"9月\",\"10月\",\"11月\",\"12月\"],dddd:[\"星期日\",\"星期一\",\"星期二\",\"星期三\",\"星期四\",\"星期五\",\"星期六\"],ddd:[\"周日\",\"周一\",\"周二\",\"周三\",\"周四\",\"周五\",\"周六\"],dd:[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"],A:[\"凌晨\",\"早上\",\"上午\",\"中午\",\"下午\",\"晚上\"],formats:{A:function(e){var t=100*e.getHours()+e.getMinutes();return t<600?this.A[0]:t<900?this.A[1]:t<1130?this.A[2]:t<1230?this.A[3]:t<1800?this.A[4]:this.A[5]}},parsers:{h:function(e,t){return t<4?e:e>11?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){var r,i,a;/**\n * @preserve date-and-time.js locale configuration\n * @preserve Chinese (zh-tw)\n * @preserve It is using moment.js locale configuration as a reference.\n */\n!function(o){\"use strict\";var s=function(e){e.setLocales(\"zh-tw\",{MMMM:[\"一月\",\"二月\",\"三月\",\"四月\",\"五月\",\"六月\",\"七月\",\"八月\",\"九月\",\"十月\",\"十一月\",\"十二月\"],MMM:[\"1月\",\"2月\",\"3月\",\"4月\",\"5月\",\"6月\",\"7月\",\"8月\",\"9月\",\"10月\",\"11月\",\"12月\"],dddd:[\"星期日\",\"星期一\",\"星期二\",\"星期三\",\"星期四\",\"星期五\",\"星期六\"],ddd:[\"周日\",\"周一\",\"周二\",\"周三\",\"周四\",\"周五\",\"周六\"],dd:[\"日\",\"一\",\"二\",\"三\",\"四\",\"五\",\"六\"],A:[\"早上\",\"上午\",\"中午\",\"下午\",\"晚上\"],formats:{A:function(e){var t=100*e.getHours()+e.getMinutes();return t<900?this.A[0]:t<1130?this.A[1]:t<1230?this.A[2]:t<1800?this.A[3]:this.A[4]}},parsers:{h:function(e,t){return t<3?e:e>11?e:e+12}}})};\"object\"==typeof e&&\"object\"==typeof e.exports?s(n(2)):(i=[n(2)],r=s,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}()},function(e,t,n){\"use strict\";function r(e,t,n,r){if(\"number\"!=typeof e)throw new TypeError(\"statusCode must be a number but was \"+typeof e);if(null===t)throw new TypeError(\"headers cannot be null\");if(\"object\"!=typeof t)throw new TypeError(\"headers must be an object but was \"+typeof t);this.statusCode=e,this.headers={};for(var i in t)this.headers[i.toLowerCase()]=t[i];this.body=n,this.url=r}e.exports=r,r.prototype.getBody=function(e){if(this.statusCode>=300){var t=new Error(\"Server responded with status code \"+this.statusCode+\":\\n\"+this.body.toString());throw t.statusCode=this.statusCode,t.headers=this.headers,t.body=this.body,t.url=this.url,t}return e?this.body.toString(e):this.body}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return\"[object Array]\"==n.call(e)}},function(e,t,n){var r=\"undefined\"!=typeof JSON?JSON:n(185);e.exports=function(e,t){t||(t={}),\"function\"==typeof t&&(t={cmp:t});var n=t.space||\"\";\"number\"==typeof n&&(n=Array(n+1).join(\" \"));var o=\"boolean\"==typeof t.cycles&&t.cycles,s=t.replacer||function(e,t){return t},u=t.cmp&&function(e){return function(t){return function(n,r){return e({key:n,value:t[n]},{key:r,value:t[r]})}}}(t.cmp),c=[];return function e(t,l,p,f){var d=n?\"\\n\"+new Array(f+1).join(n):\"\",m=n?\": \":\":\";if(p&&p.toJSON&&\"function\"==typeof p.toJSON&&(p=p.toJSON()),void 0!==(p=s.call(t,l,p))){if(\"object\"!=typeof p||null===p)return r.stringify(p);if(i(p)){for(var h=[],y=0;y<p.length;y++){var _=e(p,y,p[y],f+1)||r.stringify(null);h.push(d+n+_)}return\"[\"+h.join(\",\")+d+\"]\"}if(c.indexOf(p)!==-1){if(o)return r.stringify(\"__cycle__\");throw new TypeError(\"Converting circular structure to JSON\")}c.push(p);for(var g=a(p).sort(u&&u(p)),h=[],y=0;y<g.length;y++){var l=g[y],v=e(p,l,p[l],f+1);if(v){var b=r.stringify(l)+m+v;h.push(d+n+b)}}return c.splice(c.indexOf(p),1),\"{\"+h.join(\",\")+d+\"}\"}}({\"\":e},\"\",e,0)};var i=Array.isArray||function(e){return\"[object Array]\"==={}.toString.call(e)},a=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},n=[];for(var r in e)t.call(e,r)&&n.push(r);return n}},function(e,t,n){function r(e){var t=this.__data__=new i(e);this.size=t.size}var i=n(51),a=n(272),o=n(273),s=n(274),u=n(275),c=n(276);r.prototype.clear=a,r.prototype.delete=o,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,e.exports=r},function(e,t,n){function r(e,t,n){var r=e[t];s.call(e,t)&&a(r,n)&&(void 0!==n||t in e)||i(e,t,n)}var i=n(121),a=n(57),o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n){\"__proto__\"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var i=n(127);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[a(t[n++])];return n&&n==r?e:void 0}var i=n(125),a=n(56);e.exports=r},function(e,t,n){function r(e,t,n,o,s){return e===t||(null==e||null==t||!a(e)&&!a(t)?e!==e&&t!==t:i(e,t,n,o,r,s))}var i=n(216),a=n(43);e.exports=r},function(e,t,n){function r(e){if(!i(e))return a(e);var t=[];for(var n in Object(e))s.call(e,n)&&\"constructor\"!=n&&t.push(n);return t}var i=n(75),a=n(262),o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){return i(e)?e:a(e,t)?[e]:o(s(e))}var i=n(18),a=n(74),o=n(277),s=n(288);e.exports=r},function(e,t,n){function r(e,t,n,r){var o=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=r?r(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),o?a(n,c,l):i(n,c,l)}return n}var i=n(120),a=n(121);e.exports=r},function(e,t,n){var r=n(27),i=function(){try{var e=r(Object,\"defineProperty\");return e({},\"\",{}),e}catch(e){}}();e.exports=i},function(e,t,n){function r(e,t,n,r,c,l){var p=n&s,f=e.length,d=t.length;if(f!=d&&!(p&&d>f))return!1;var m=l.get(e);if(m&&l.get(t))return m==t;var h=-1,y=!0,_=n&u?new i:void 0;for(l.set(e,t),l.set(t,e);++h<f;){var g=e[h],v=t[h];if(r)var b=p?r(v,g,h,t,e,l):r(g,v,h,e,t,l);if(void 0!==b){if(b)continue;y=!1;break}if(_){if(!a(t,function(e,t){if(!o(_,t)&&(g===e||c(g,e,n,r,l)))return _.push(t)})){y=!1;break}}else if(g!==v&&!c(g,v,n,r,l)){y=!1;break}}return l.delete(e),l.delete(t),y}var i=n(197),a=n(206),o=n(230),s=1,u=2;e.exports=r},function(e,t,n){(function(t){var n=\"object\"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(13))},function(e,t,n){var r=n(193),i=n(71),a=n(195),o=n(196),s=n(199),u=n(41),c=n(134),l=c(r),p=c(i),f=c(a),d=c(o),m=c(s),h=u;(r&&\"[object DataView]\"!=h(new r(new ArrayBuffer(1)))||i&&\"[object Map]\"!=h(new i)||a&&\"[object Promise]\"!=h(a.resolve())||o&&\"[object Set]\"!=h(new o)||s&&\"[object WeakMap]\"!=h(new s))&&(h=function(e){var t=u(e),n=\"[object Object]\"==t?e.constructor:void 0,r=n?c(n):\"\";if(r)switch(r){case l:return\"[object DataView]\";case p:return\"[object Map]\";case f:return\"[object Promise]\";case d:return\"[object Set]\";case m:return\"[object WeakMap]\"}return t}),e.exports=h},function(e,t,n){function r(e,t,n){if(!s(n))return!1;var r=typeof t;return!!(\"number\"==r?a(n)&&o(t,n.length):\"string\"==r&&t in n)&&i(n[t],e)}var i=n(57),a=n(42),o=n(73),s=n(19);e.exports=r},function(e,t,n){function r(e){return e===e&&!i(e)}var i=n(19);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t){function n(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}var r=Function.prototype,i=r.toString;e.exports=n},function(e,t){function n(e){if(!e||\"object\"!=typeof e)throw new TypeError(\"argument obj is required\");var t=e.parameters,n=e.subtype,r=e.suffix,i=e.type;if(!i||!d.test(i))throw new TypeError(\"invalid type\");if(!n||!f.test(n))throw new TypeError(\"invalid subtype\");var o=i+\"/\"+n;if(r){if(!d.test(r))throw new TypeError(\"invalid suffix\");o+=\"+\"+r}if(t&&\"object\"==typeof t)for(var s,u=Object.keys(t).sort(),l=0;l<u.length;l++){if(s=u[l],!c.test(s))throw new TypeError(\"invalid parameter name\");o+=\"; \"+s+\"=\"+a(t[s])}return o}function r(e){if(!e)throw new TypeError(\"argument string is required\");if(\"object\"==typeof e&&(e=i(e)),\"string\"!=typeof e)throw new TypeError(\"argument string is required to be a string\");var t,n,r,a=e.indexOf(\";\"),u=a!==-1?e.substr(0,a):e,c=o(u),p={};for(s.lastIndex=a;n=s.exec(e);){if(n.index!==a)throw new TypeError(\"invalid parameter format\");a+=n[0].length,t=n[1].toLowerCase(),r=n[2],'\"'===r[0]&&(r=r.substr(1,r.length-2).replace(l,\"$1\")),p[t]=r}if(a!==-1&&a!==e.length)throw new TypeError(\"invalid parameter format\");return c.parameters=p,c}function i(e){return\"function\"==typeof e.getHeader?e.getHeader(\"content-type\"):\"object\"==typeof e.headers?e.headers&&e.headers[\"content-type\"]:void 0}function a(e){var t=String(e);if(c.test(t))return t;if(t.length>0&&!u.test(t))throw new TypeError(\"invalid parameter value\");return'\"'+t.replace(p,\"\\\\$1\")+'\"'}function o(e){var t=m.exec(e.toLowerCase());if(!t)throw new TypeError(\"invalid media type\");var n,r=t[1],i=t[2],a=i.lastIndexOf(\"+\");return a!==-1&&(n=i.substr(a+1),i=i.substr(0,a)),{type:r,subtype:i,suffix:n}}/*!\n * media-typer\n * Copyright(c) 2014 Douglas Christopher Wilson\n * MIT Licensed\n */\nvar s=/; *([!#$%&'\\*\\+\\-\\.0-9A-Z\\^_`a-z\\|~]+) *= *(\"(?:[ !\\u0023-\\u005b\\u005d-\\u007e\\u0080-\\u00ff]|\\\\[\\u0020-\\u007e])*\"|[!#$%&'\\*\\+\\-\\.0-9A-Z\\^_`a-z\\|~]+) */g,u=/^[\\u0020-\\u007e\\u0080-\\u00ff]+$/,c=/^[!#$%&'\\*\\+\\-\\.0-9A-Z\\^_`a-z\\|~]+$/,l=/\\\\([\\u0000-\\u007f])/g,p=/([\\\\\"])/g,f=/^[A-Za-z0-9][A-Za-z0-9!#$&^_.-]{0,126}$/,d=/^[A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126}$/,m=/^ *([A-Za-z0-9][A-Za-z0-9!#$&^_-]{0,126})\\/([A-Za-z0-9][A-Za-z0-9!#$&^_.+-]{0,126}) *$/;t.format=n,t.parse=r},function(e,t,n){\"use strict\";var r=String.prototype.replace;e.exports={default:\"RFC3986\",formatters:{RFC1738:function(e){return r.call(e,/%20/g,\"+\")},RFC3986:function(e){return e}},RFC1738:\"RFC1738\",RFC3986:\"RFC3986\"}},function(e,t,n){\"use strict\";var r=n(305),i=n(304),a=n(136);e.exports={formats:a,parse:i,stringify:r}},function(e,t,n){\"use strict\";var r=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push(\"%\"+((t<16?\"0\":\"\")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)void 0!==e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,i){if(!n)return e;if(\"object\"!=typeof n){if(Array.isArray(e))e.push(n);else{if(\"object\"!=typeof e)return[e,n];(i.plainObjects||i.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if(\"object\"!=typeof e)return[e].concat(n);var a=e;return Array.isArray(e)&&!Array.isArray(n)&&(a=t.arrayToObject(e,i)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,a){r.call(e,a)?e[a]&&\"object\"==typeof e[a]?e[a]=t.merge(e[a],n,i):e.push(n):e[a]=n}),e):Object.keys(n).reduce(function(e,r){var a=n[r];return Object.prototype.hasOwnProperty.call(e,r)?e[r]=t.merge(e[r],a,i):e[r]=a,e},a)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\\+/g,\" \"))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t=\"string\"==typeof e?e:String(e),n=\"\",r=0;r<t.length;++r){var a=t.charCodeAt(r);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n+=t.charAt(r):a<128?n+=i[a]:a<2048?n+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?n+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(r+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(r)),n+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return n},t.compact=function(e,n){if(\"object\"!=typeof e||null===e)return e;var r=n||[],i=r.indexOf(e);if(i!==-1)return r[i];if(r.push(e),Array.isArray(e)){for(var a=[],o=0;o<e.length;++o)e[o]&&\"object\"==typeof e[o]?a.push(t.compact(e[o],r)):void 0!==e[o]&&a.push(e[o]);return a}return Object.keys(e).forEach(function(n){e[n]=t.compact(e[n],r)}),e},t.isRegExp=function(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&void 0!==e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){\"use strict\";function r(e){return e.isBuiltIn()?s[e.nameId()]:null}function i(e,t){void 0===t&&(t=!0);var n=e.definition(),i=(n.nameId(),r(n));if(!i){for(var o=a(n),u=n.allSuperTypes().sort(function(e,t){return o[e.nameId()]-o[t.nameId()]}),c=0;c<u.length;c++){var l=u[c].nameId();if(i=r(u[c]),\"DataElement\"!=l){if(\"hl.BasicNode\"!=l&&i)break}else l}i||l}return i||(i=s[\"hl.BasicNode\"]),i(e,t)}function a(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=e.nameId();if(!n[r]){n[r]=!0;var i=null!=t[r]&&t[r]+1||0;return e.superTypes().forEach(function(e){var r=e.nameId(),o=t[r];(null==o||i>o)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}var o=n(86);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BodyLike:function(e,t){return new o.BodyLikeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateTypeDeclaration:function(e,t){return new o.DateTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},ExampleString:function(e){return new o.ExampleStringImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUri:function(e){return new o.FixedUriImpl(e)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},GlobalSchema:function(e,t){return new o.GlobalSchemaImpl(e,t)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},JSONBody:function(e,t){return new o.JSONBodyImpl(e,t)},JSONExample:function(e){return new o.JSONExampleImpl(e)},JSonSchemaString:function(e){return new o.JSonSchemaStringImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},Parameter:function(e,t){return new o.ParameterImpl(e,t)},ParameterLocation:function(e){return new o.ParameterLocationImpl(e)},RAMLSimpleElement:function(e,t){return new o.RAMLSimpleElementImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLBody:function(e,t){return new o.XMLBodyImpl(e,t)},XMLExample:function(e){return new o.XMLExampleImpl(e)},XMLSchemaString:function(e){return new o.XMLSchemaStringImpl(e)}}},function(e,t,n){\"use strict\";function r(e){return e.isBuiltIn()?s[e.nameId()]:null}function i(e,t){void 0===t&&(t=!0);var n=e.definition(),i=(n.nameId(),r(n));if(!i){for(var o=a(n),u=n.allSuperTypes().sort(function(e,t){return o[e.nameId()]-o[t.nameId()]}),c=0;c<u.length;c++){var l=u[c].nameId();if(i=r(u[c]),\"DataElement\"!=l){if(\"hl.BasicNode\"!=l&&i)break}else l}i||l}return i||(i=s[\"hl.BasicNode\"]),i(e,t)}function a(e,t,n){void 0===t&&(t={}),void 0===n&&(n={});var r=e.nameId();if(!n[r]){n[r]=!0;var i=null!=t[r]&&t[r]+1||0;return e.superTypes().forEach(function(e){var r=e.nameId(),o=t[r];(null==o||i>o)&&(t[r]=i,a(e,t,n))}),delete n[r],t}}var o=n(34);t.buildWrapperNode=i;var s={AbstractSecurityScheme:function(e,t){return new o.AbstractSecuritySchemeImpl(e,t)},Annotable:function(e,t){return new o.AnnotableImpl(e,t)},AnnotationRef:function(e){return new o.AnnotationRefImpl(e)},AnnotationTarget:function(e){return new o.AnnotationTargetImpl(e)},AnyType:function(e){return new o.AnyTypeImpl(e)},Api:function(e,t){return new o.ApiImpl(e,t)},ArrayTypeDeclaration:function(e,t){return new o.ArrayTypeDeclarationImpl(e,t)},BasicSecurityScheme:function(e,t){return new o.BasicSecuritySchemeImpl(e,t)},BooleanType:function(e){return new o.BooleanTypeImpl(e)},BooleanTypeDeclaration:function(e,t){return new o.BooleanTypeDeclarationImpl(e,t)},ContentType:function(e){return new o.ContentTypeImpl(e)},CustomSecurityScheme:function(e,t){return new o.CustomSecuritySchemeImpl(e,t)},DateOnlyType:function(e){return new o.DateOnlyTypeImpl(e)},DateOnlyTypeDeclaration:function(e,t){return new o.DateOnlyTypeDeclarationImpl(e,t)},DateTimeOnlyType:function(e){return new o.DateTimeOnlyTypeImpl(e)},DateTimeOnlyTypeDeclaration:function(e,t){return new o.DateTimeOnlyTypeDeclarationImpl(e,t)},DateTimeType:function(e){return new o.DateTimeTypeImpl(e)},DateTimeTypeDeclaration:function(e,t){return new o.DateTimeTypeDeclarationImpl(e,t)},DigestSecurityScheme:function(e,t){return new o.DigestSecuritySchemeImpl(e,t)},DocumentationItem:function(e,t){return new o.DocumentationItemImpl(e,t)},Extension:function(e,t){return new o.ExtensionImpl(e,t)},FileType:function(e){return new o.FileTypeImpl(e)},FileTypeDeclaration:function(e,t){return new o.FileTypeDeclarationImpl(e,t)},FixedUriString:function(e){return new o.FixedUriStringImpl(e)},FragmentDeclaration:function(e,t){return new o.FragmentDeclarationImpl(e,t)},FullUriTemplateString:function(e){return new o.FullUriTemplateStringImpl(e)},IntegerType:function(e){return new o.IntegerTypeImpl(e)},IntegerTypeDeclaration:function(e,t){return new o.IntegerTypeDeclarationImpl(e,t)},Library:function(e,t){return new o.LibraryImpl(e,t)},LibraryBase:function(e,t){return new o.LibraryBaseImpl(e,t)},LocationKind:function(e){return new o.LocationKindImpl(e)},MarkdownString:function(e){return new o.MarkdownStringImpl(e)},Method:function(e,t){return new o.MethodImpl(e,t)},MethodBase:function(e,t){return new o.MethodBaseImpl(e,t)},MimeType:function(e){return new o.MimeTypeImpl(e)},ModelLocation:function(e){return new o.ModelLocationImpl(e)},NullType:function(e){return new o.NullTypeImpl(e)},NumberType:function(e){return new o.NumberTypeImpl(e)},NumberTypeDeclaration:function(e,t){return new o.NumberTypeDeclarationImpl(e,t)},OAuth1SecurityScheme:function(e,t){return new o.OAuth1SecuritySchemeImpl(e,t)},OAuth1SecuritySchemeSettings:function(e,t){return new o.OAuth1SecuritySchemeSettingsImpl(e,t)},OAuth2SecurityScheme:function(e,t){return new o.OAuth2SecuritySchemeImpl(e,t)},OAuth2SecuritySchemeSettings:function(e,t){return new o.OAuth2SecuritySchemeSettingsImpl(e,t)},ObjectTypeDeclaration:function(e,t){return new o.ObjectTypeDeclarationImpl(e,t)},Operation:function(e,t){return new o.OperationImpl(e,t)},Overlay:function(e,t){return new o.OverlayImpl(e,t)},PassThroughSecurityScheme:function(e,t){return new o.PassThroughSecuritySchemeImpl(e,t)},Reference:function(e){return new o.ReferenceImpl(e)},RelativeUriString:function(e){return new o.RelativeUriStringImpl(e)},Resource:function(e,t){return new o.ResourceImpl(e,t)},ResourceBase:function(e,t){return new o.ResourceBaseImpl(e,t)},ResourceType:function(e,t){return new o.ResourceTypeImpl(e,t)},ResourceTypeRef:function(e){return new o.ResourceTypeRefImpl(e)},Response:function(e,t){return new o.ResponseImpl(e,t)},SchemaString:function(e){return new o.SchemaStringImpl(e)},SecuritySchemePart:function(e,t){return new o.SecuritySchemePartImpl(e,t)},SecuritySchemeRef:function(e){return new o.SecuritySchemeRefImpl(e)},SecuritySchemeSettings:function(e,t){return new o.SecuritySchemeSettingsImpl(e,t)},StatusCodeString:function(e){return new o.StatusCodeStringImpl(e)},StringType:function(e){return new o.StringTypeImpl(e)},StringTypeDeclaration:function(e,t){return new o.StringTypeDeclarationImpl(e,t)},TimeOnlyType:function(e){return new o.TimeOnlyTypeImpl(e)},TimeOnlyTypeDeclaration:function(e,t){return new o.TimeOnlyTypeDeclarationImpl(e,t)},Trait:function(e,t){return new o.TraitImpl(e,t)},TraitRef:function(e){return new o.TraitRefImpl(e)},TypeDeclaration:function(e,t){return new o.TypeDeclarationImpl(e,t)},UnionTypeDeclaration:function(e,t){return new o.UnionTypeDeclarationImpl(e,t)},UriTemplate:function(e){return new o.UriTemplateImpl(e)},UsesDeclaration:function(e,t){return new o.UsesDeclarationImpl(e,t)},ValueType:function(e){return new o.ValueTypeImpl(e)},XMLFacetInfo:function(e,t){return new o.XMLFacetInfoImpl(e,t)}}},function(e,t,n){\"use strict\";var r=n(0);e.exports=r},function(e,t,n){\"use strict\";function r(e){if(!e)return e;var t=e.indexOf(\"#\");return t==-1?e:e.substring(0,t)}function i(e){if(!e)return null;\"string\"!=typeof e&&(e=\"\"+e);var t=e.indexOf(\"#\");if(t==-1)return null;var n=t==e.length-1?\"\":e.substring(t+1,e.length),i=n.split(\"/\");return 0==i.length?null:(\"\"==i[0].trim()&&i.splice(0,1),new m(n,r(e),i))}function a(){return[new h,new _]}function o(e,t){if(!e)return t;var n=i(e);return n?s(r(e),n,t).content:t}function s(e,t,n){var r=p.find(a(),function(t){return t.isApplicable(e,n)});return r?r.resolveReference(n,t):{content:n,validation:[]}}function u(e,t,n){if(!n)return[];var r=p.find(a(),function(t){return t.isApplicable(e,n)});return r?r.completeReference(n,t):[]}function c(e,t){return!!e&&(!!t&&e.lastIndexOf(t)===e.length-t.length)}function l(e,t){for(var n=e.getElementsByTagName(t),r=[],i=0;i<n.length;i++){var a=n[i];a.parentNode===e&&r.push(a)}return r}var p=n(1),f=n(99).DOMParser,d=n(175);t.getIncludePath=r,t.getIncludeReference=i,t.getIncludeReferenceResolvers=a,t.resolveContents=o,t.resolve=s,t.completeReference=u;var m=function(){function e(e,t,n){this.includePath=t,this.segments=n,this.originalString=e}return e.prototype.getIncludePath=function(){return this.includePath},e.prototype.getFragments=function(){return this.segments},e.prototype.asString=function(){return this.originalString},e.prototype.encodedName=function(e){return void 0===e&&(e=!0),d(this.includePath+\"/\"+this.asString())+(e?this.includePath.substring(this.includePath.lastIndexOf(\".\")):\"\")},e}(),h=function(){function e(){}return e.prototype.isApplicable=function(e,t){return e&&(c(e.trim(),\".js\")||c(e.trim(),\".json\"))},e.prototype.resolveReference=function(e,t){try{var n={};return n.$ref=t.getIncludePath()+\"#\"+t.getFragments().map(function(e){return\"/\"+e}).join(\"\"),{content:JSON.stringify(n,null,2),validation:[]}}catch(e){console.log(e)}return{content:e,validation:[]}},e.prototype.completeReference=function(e,t){try{var n=JSON.parse(e),r=t.getFragments();if(!r||0==r.length)return this.getChildren(n);for(var i=n,a=t.asString().lastIndexOf(\"/\")==t.asString().length-1,o=(a?r.length:r.length,0);o<r.length-1;o++){var s=r[o];if(!(i=this.findChild(i,s)))return[]}if(a)return this.getChildren(i);var u=r[r.length-1],c=[];return this.getChildren(i).forEach(function(e){0==e.indexOf(u)&&c.push(e)}),c}catch(e){console.log(e)}return[]},e.prototype.findChild=function(e,t){var n=t.replace(\"~1\",\"/\");return n=t.replace(\"~0\",\"~\"),e[n]},e.prototype.getChildren=function(e){return Object.keys(e)},e}(),y={errorHandler:{warning:function(){return null},error:function(){return null},fatalError:function(){return null}}},_=function(){function e(){}return e.prototype.isApplicable=function(e,t){return e&&(c(e.trim(),\".xml\")||c(e.trim(),\".xsd\"))},e.prototype.resolveReference=function(e,t){try{var n=new f(y).parseFromString(e),r=t.asString(),i=t.encodedName(!1),a=l(n,\"xs:schema\")[0],o=l(a,\"xs:element\"),s=l(a,\"xs:complexType\"),u=p.find(o,function(e){return e.getAttribute(\"name\")===r}),c=u?p.find(s,function(e){return e.getAttribute(\"name\")===u.getAttribute(\"type\")}):p.find(s,function(e){return e.getAttribute(\"name\")===r}),d=n.createElement(\"xs:element\");d.setAttribute(\"name\",i),c&&d.setAttribute(\"type\",c.getAttribute(\"name\")),u&&d.setAttribute(\"originalname\",u.getAttribute(\"name\")),d.setAttribute(\"requestedname\",r),d.setAttribute(\"extraelement\",\"true\"),a.appendChild(d);var m=n.toString(),h=m,_=m.indexOf(\"?>\");if(_>0&&m.length>_+2){\"\\n\"!=m.charAt(_+2)&&(h=m.slice(0,_+2)+\"\\n\"+m.slice(_+2))}return{content:h,validation:[]}}catch(e){console.log(e)}return{content:e,validation:[]}},e.prototype.completeReference=function(e,t){try{var n=new f(y).parseFromString(e),r=[],i=l(n,\"xs:schema\")[0],a=l(i,\"xs:element\"),o=l(i,\"xs:complexType\");a.forEach(function(e){return r.push(e.getAttribute(\"name\"))}),o.forEach(function(e){return r.push(e.getAttribute(\"name\"))});return 0===t.asString().trim().length?r:r.filter(function(e){return 0===e.indexOf(t.asString())})}catch(e){return[]}},e}()},function(e,t,n){\"use strict\";var r=n(0),i=n(3),a=n(5),o=r,s=n(21),u=function(){function e(e,t){void 0===t&&(t=!1),this.enabled=e,this.toHighLevel=t,this.unconditionalValueCalculators=[new _],this.valueCalculators=[new d,new f,new p,new l,new m(this.toHighLevel),new h,new y]}return e.prototype.attributeDefaultIfEnabled=function(e,t){return this.enabled?this.getAttributeDefault(e,t):this.getUnconditionalAttributeDefault(t,e)},e.prototype.getUnconditionalAttributeDefault=function(e,t){if(!t||!e)return null;for(var n=0;n<this.unconditionalValueCalculators.length;n++){var r=this.unconditionalValueCalculators[n];if(r.matches(e,t)){var i=r.calculate(e,t);if(null!=i)return i}}return null},e.prototype.getAttributeDefault=function(e,t){if(!e||!t)return null;try{return this.getAttributeDefault2(t,e)}catch(e){return console.log(e),null}},e.prototype.getWrapperAttributeDefault=function(e,t){var n=e.highLevel();if(null==n)return null;var r=n.definition().property(t);return null==r?null:this.getAttributeDefault(n,r)},e.prototype.getAttributeDefault2=function(e,t){for(var n=0;n<this.valueCalculators.length;n++){var r=this.valueCalculators[n];if(r.matches(e,t)){var i=r.calculate(e,t);if(null!=i)return i}}return null!=e.defaultValue()?e.defaultValue():null},e.prototype.isEnabled=function(){return this.enabled},e.prototype.insertionKind=function(e,t){for(var n=0;n<this.valueCalculators.length;n++){var r=this.valueCalculators[n];if(r.matches(t,e))return r.kind()}return null!=t.defaultValue()?c.BY_DEFAULT:null},e}();t.AttributeDefaultsCalculator=u,function(e){e[e.CALCULATED=0]=\"CALCULATED\",e[e.BY_DEFAULT=1]=\"BY_DEFAULT\"}(t.InsertionKind||(t.InsertionKind={}));var c=t.InsertionKind,l=function(){function e(){}return e.prototype.calculate=function(e,t){var n=s.declRoot(t);if(n&&a.isApiSibling(n.definition())){var r=n.attr(i.Universe10.Api.properties.mediaType.name);if(r)return r.value()}return null},e.prototype.matches=function(e,t){if(!a.isNameProperty(e))return!1;var n=t.definition();if(!n)return!1;if(!a.isBodyLikeType(n)&&!a.isTypeDeclarationSibling(n))return!1;var r=t.parent();if(null==r)return!1;var i=r.definition();if(null==i)return!1;if(!a.isResponseType(i)&&!a.isMethodBaseSibling(i))return!1;for(var o=r;o;){var s=o.definition();if(a.isTraitType(s))return!1;if(a.isResourceTypeType(s))return!1;o=o.parent()}return!0},e.prototype.kind=function(){return c.CALCULATED},e}(),p=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition();if(null==n)return null;var r=n.getAdapter(o.RAMLService),i=r.getKeyProp();if(null!=i){var a=t.attrValue(i.nameId());return null!=a?a:new u(!0).getAttributeDefault(t,i)}return null},e.prototype.matches=function(e,t){var n=t.definition();return null!=n&&((a.isTypeDeclarationSibling(n)||n.isAssignableFrom(i.Universe08.Parameter.name)||a.isResourceType(n))&&a.isDisplayNameProperty(e))},e.prototype.kind=function(){return c.CALCULATED},e}(),f=function(){function e(){}return e.prototype.calculate=function(e,t){return\"object\"},e.prototype.matches=function(e,t){return a.isTypeProperty(e)&&null!=t.definition()&&a.isObjectTypeDeclarationSibling(t.definition())},e.prototype.kind=function(){return c.BY_DEFAULT},e}(),d=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition(),r=t.property();if(null==n)return null;var i=n.getAdapter(o.RAMLService),s=i.getKeyProp();if(null!=s){var u=t.attr(s.nameId());if(null!=u&&u.optional())return!1}if(null!=r){if(a.isHeadersProperty(r)||a.isFormParametersProperty(r)||a.isQueryParametersProperty(r))return\"RAML08\"!=e.domain().universe().version();if(a.isUriParametersProperty(r)||a.isBaseUriParametersProperty(r))return!0}return null!=e.defaultValue()?e.defaultValue():null},e.prototype.matches=function(e,t){return a.isRequiredProperty(e)},e.prototype.kind=function(){return c.BY_DEFAULT},e}(),m=function(){function e(e){void 0===e&&(e=!1),this.toHighLevel=e}return e.prototype.calculate=function(e,t){if(a.isApiSibling(t.definition()))return null;var n,r=t.definition();if(a.isMethodType(r)){var i=t.parent();i&&(n=this.toHighLevel?i.attributes(\"securedBy\"):i.wrapperNode().securedBy())}if(!n||0==n.length){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();t&&(n=this.toHighLevel?t.attributes(\"securedBy\"):t.wrapperNode().securedBy())}return n&&n.length>0?n:null},e.prototype.matches=function(e,t){return null!=t.definition()&&a.isSecuredByProperty(e)},e.prototype.kind=function(){return c.CALCULATED},e}(),h=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n,r=t.attr(i.Universe10.Api.properties.baseUri.name);if(r){var o=r.value();if(o){var s=o.indexOf(\"://\");s>=0&&(n=[o.substring(0,s).toUpperCase()]),n||(n=[\"HTTP\"])}}return n},e.prototype.matches=function(e,t){if(!a.isProtocolsProperty(e))return!1;var n=t.definition(),r=!1;if(a.isApiSibling(n))r=!0;else if(a.isResourceType(n))r=!0;else if(a.isMethodType(n)){var i=t.parent();r=i&&a.isResourceType(i.definition())}return r},e.prototype.kind=function(){return c.CALCULATED},e}(),y=function(){function e(){}return e.prototype.calculate=function(e,t){for(;null!=t&&!a.isApiSibling(t.definition());)t=t.parent();var n=t.attr(i.Universe10.Api.properties.version.name);if(n){var r=n.value();if(r&&r.trim())return[r]}return null},e.prototype.matches=function(e,t){if(!a.isEnumProperty(e))return!1;var n=t.property();if(!n)return!1;if(!a.isBaseUriParametersProperty(n))return!1;var r=t.attr(i.Universe10.TypeDeclaration.properties.name.name);return\"version\"==(r&&r.value())},e.prototype.kind=function(){return c.CALCULATED},e}(),_=function(){function e(){}return e.prototype.calculate=function(e,t){var n=t.definition();if(null==n)return null;var r=n.getAdapter(o.RAMLService);if(null==r)return null;var i=r.getKeyProp();if(null==i)return null;var a=t.attr(i.nameId());return null==a?null:!a.optional()&&null},e.prototype.matches=function(e,t){return a.isRequiredProperty(e)},e.prototype.kind=function(){return c.BY_DEFAULT},e}()},function(e,t,n){\"use strict\";function r(e){var t=e.getExtra(l.SOURCE_EXTRA);return null==t?null:c.isSourceProvider(t)?t:f.isLowLevelNode(t)?{getSource:function(){return t.highLevelNode()}}:p.isParseResult(t)?{getSource:function(){return t}}:null}function i(e){return r(e)}function a(e){var t=e.getAdapters();return t?m.find(t,function(e){return c.rt.isParsedType(e)}):null}function o(e){if(!e)return null;if(e.getExtra(l.SOURCE_EXTRA))return r(e);var t=a(e);return t?i(t):null}function s(e,t){var n=o(e);return n?{getSource:function(){var e=n.getSource(),r=e.asElement();if(null==r)return null;var i=r.elementsOfKind(d.Universe10.ObjectTypeDeclaration.properties.properties.name);return null==i||0==i.length?null:m.find(i,function(e){return t==e.attrValue(d.Universe10.TypeDeclaration.properties.name.name)})}}:null}function u(e){return s(e.domain(),e.nameId())}var c=n(0),l=c.rt,p=n(24),f=n(20),d=n(3),m=n(1);t.getExtraProviderSource=r,t.getRTypeSource=i,t.findRTypeByNominal=a,t.getNominalTypeSource=o,t.getNominalPropertySource=s,t.getNominalPropertySource2=u},function(e,t,n){\"use strict\";function r(e,t,n){null==n&&(n=i(e)),n.length>0&&(n+=\":\");for(var r=e.getElementsByTagName(n+t),a=[],o=0;o<r.length;o++){var s=r[o];s.parentNode===e&&a.push(s)}return a}function i(e){var t=\"\";if(e){var n=e;if(e.ownerDocument&&(n=e.ownerDocument),n){var r=n.documentElement;r&&(t=r.prefix)}}return t}function a(e){try{var t=new l.DOMParser(p).parseFromString(e);return r(t,\"schema\",i(t)).length>0}catch(e){return!1}}function o(e){var t={};if(1==e.nodeType){if(e.attributes.length>0)for(var n=0;n<e.attributes.length;n++){var r=e.attributes.item(n);t[\"@\"+r.nodeName]=r.nodeValue}}else 3==e.nodeType&&(t=e.nodeValue);if(e.hasChildNodes())for(var i=0;i<e.childNodes.length;i++){var a=e.childNodes.item(i),s=a.nodeName;if(void 0!=s)if(void 0===t[s])t[s]=o(a);else{if(void 0===t[s].push){var u=t[s];t[s]=[],t[s].push(u)}t[s].push(o(a))}}return t}function s(e){if(\"object\"==typeof e)for(var t in e)if(\"object\"==typeof e[t]){for(var n in e[t])if(\"#text\"==n){var r=e[t][\"#text\"];\"string\"!=typeof r&&(r=r.join(\"\")),r=r.trim(),0==r.length&&delete e[t][\"#text\"]}s(e[t])}return e}function u(e){if(\"object\"==typeof e)for(var t in e)if(\"object\"==typeof e[t]){var n=Object.keys(e[t]);1==n.length&&\"#text\"==n[0]&&(e[t]=e[t][\"#text\"]),u(e[t])}return e}function c(e){var t=new l.DOMParser(p);return e&&0!=e.trim().indexOf(\"<<\")?u(s(o(t.parseFromString(e)))):null}var l=n(99),p={errorHandler:{warning:function(){return null},error:function(){return null},fatalError:function(){return null}}};t.isXmlScheme=a,t.parseXML=c},function(e,t,n){\"use strict\";function r(){return c.hasAsyncRequests()}function i(e){c.addLoadCallback(e)}function a(){return d.getTransformNames()}function o(e){return l.getFragmentDefenitionName(e)}function s(e,t,n){if(p.ReferenceType.isInstance(n.range())){var r=(n.range(),f.createNode(e));return new l.StructuredValue(r,t,n)}return e}function u(e){return(new m.UrlParameterNameValidator).parseUrl(e)}var c=n(28),l=n(4),p=n(0),f=n(9),d=n(25),m=n(35),h=n(46),y=n(3);t.hasAsyncRequests=r,t.addLoadCallback=i,t.getTransformerNames=a,t.updateType=function(e){var t=h.doDescrimination(e);null==t&&e.property()&&(t=e.property().range()),t&&e.patchType(t)},t.getFragmentDefenitionName=o,t.genStructuredValue=s,t.parseUrl=u;var _=function(){function e(e,t){this.node=e,this.targetUnitRoot=t}return e}();t.UnitLink=_;var g=function(){function e(e,t){this.errors=e,this.primaryUnitRoot=t}return e.prototype.accept=function(e){this.transformIssue(e),this.errors.push(e)},e.prototype.transformIssue=function(e){var t=this,n=null,r=this.findIssueTail(e);r.node&&(n=r.node.lowLevel().unit());var i=this.primaryUnitRoot.lowLevel().unit();if(n&&i&&n!=i){var a=this.findPathToNodeUnit(this.primaryUnitRoot,r.node);if(a&&a.length>0){var o=a.map(function(n){return t.convertConnectingNodeToError(n,e)});if(o&&o.length>0)for(var s=r,u=o.length-1;u>=0;u--){var c=o[u];s.extras=[],s.extras.push(c),s=c}}}},e.prototype.begin=function(){},e.prototype.end=function(){},e.prototype.acceptUnique=function(e){for(var t=0,n=this.errors;t<n.length;t++){var r=n[t];if(r.start==e.start&&r.message==e.message)return}this.accept(e)},e.prototype.findPathToNodeUnit=function(e,t){return t.lowLevel()&&t.lowLevel().unit()?this.findPathToNodeUnitRecursively(e,t.lowLevel().unit()):[]},e.prototype.findPathToNodeUnitRecursively=function(e,t){for(var n=this.findUnitLinks(e),r=0;r<n.length;r++){var i=n[r];if(i.targetUnitRoot&&i.targetUnitRoot.lowLevel()&&i.targetUnitRoot.lowLevel().unit()==t)return[i.node];var a=this.findPathToNodeUnitRecursively(i.targetUnitRoot,t);if(a)return a.unshift(i.node),a}return null},e.prototype.findUnitLinks=function(e){var t=[];return t=t.concat(this.findMasterLinks(e))},e.prototype.findMasterLinks=function(e){if(!e.getMaster)return[];var t=e.getMaster();if(!t)return[];var n=e.asElement().attr(y.Universe10.Extension.properties.extends.name);return n&&n.value()?[new _(n,t)]:[]},e.prototype.convertConnectingNodeToError=function(e,t){if(!e)return null;var n=e.lowLevel(),r=n.start(),i=n.end(),a=this.generateLinkMessageByNode(e,t);return{code:t.code,isWarning:t.isWarning,message:a,node:e,start:r,end:i,path:n.unit()?n.unit().path():\"\",extras:[],unit:n.unit()}},e.prototype.generateLinkMessageByNode=function(e,t){return e.property().nameId()==y.Universe10.Extension.properties.extends.name?\"Error in the master file: \"+t.message:t.message},e.prototype.findIssueTail=function(e){return e.extras&&0!=e.extras.length?this.findIssueTail(e.extras[0]):e},e}();t.PointOfViewValidationAcceptorImpl=g},function(e,t){\"undefined\"!=typeof XMLHttpRequest?t.XMLHttpRequest=XMLHttpRequest:t.XMLHttpRequest={}},function(e,t,n){\"use strict\";function r(e){var t=e.oneMeta(c.Example);if(t)return t.example();if(e.getExtra(f))return null;e.putExtra(f,!0);try{var n=e.oneMeta(c.Examples);if(n){var i=n.examples();if(i&&i.length>0)return i[0]}var a=e.oneMeta(c.Default);if(a)return a.value();if(e.isObject()){var o={};return e.meta().forEach(function(e){if(e instanceof p.PropertyIs){var t=e,n=r(t.value());o[t.propertyName()]=n}}),e.superTypes().forEach(function(e){if(e.oneMeta(c.Example)||e.oneMeta(c.Examples)){var t=r(e);t&&\"object\"==typeof t&&Object.keys(t).forEach(function(e){o[e]=t[e]})}}),o}if(e.isArray()){var s=e.oneMeta(l.ComponentShouldBeOfType),u=[];return s&&u.push(r(s.value())),u}return e.isUnion()?r(e.typeFamily()[0]):e.isNumber()?1:!!e.isBoolean()||\"some value\"}finally{e.putExtra(f,!1)}}function i(e,t){var n=e[t];return null!=n&&\"object\"==typeof n?n.value:n}function a(e){var t=[];if(!e||\"object\"!=typeof e)return t;for(var n=0,r=Object.keys(e).filter(function(e){return e.length>0&&\"(\"==e.charAt(0)&&\")\"==e.charAt(e.length-1)});n<r.length;n++){var i=r[n],a=i.substring(1,i.length-1),o=e[i],s=new c.Annotation(a,o);t.push(s)}return t}function o(e){var t=[],n=e.oneMeta(c.Examples);if(n){var r=n.value();if(r&&\"object\"==typeof r){var i;Object.keys(r).forEach(function(a){var o=Array.isArray(r)?null:a,s=r[a],u=m({asXMLString:function(){return i||(i=n.asXMLStrings()),i[a]},ownerType:function(){return e}},s,o);t.push(u)})}}var a=e.oneMeta(c.Example);if(a){null!=a.example()&&t.push(m(a,a.value(),void 0,!0))}return t}function s(e,t){var n=e.getAdapter(u.InheritedType);if(n){var r=o(n);if(r&&r.length>0)return r;if(t&&e.isUserDefined()&&!e.isGenuineUserDefinedType()&&e.genuineUserDefinedTypeInHierarchy()){var i=e.genuineUserDefinedTypeInHierarchy(),a=i.getAdapter(u.InheritedType);if(a){var s=o(a);if(s&&s.length>0)return s}}}if(n){var c=new d(null,void 0,void 0,void 0,!1,void 0,void 0,!0);return c.setOwnerType(n),[c]}return[]}var u=n(6),c=n(7),l=n(8),p=n(8),f=\"exampleCalculation\";t.example=r;var d=function(){function e(e,t,n,r,i,a,o,s){void 0===t&&(t=void 0),void 0===n&&(n=void 0),void 0===r&&(r=void 0),void 0===i&&(i=!0),void 0===o&&(o=!1),void 0===s&&(s=!1),this._value=e,this._name=t,this._displayName=n,this._description=r,this._strict=i,this._annotations=a,this._isSingle=o,this._empty=s,this.isExpanded=!1,this._scalarsAnnotations={},this._annotations?this._hasAnnotations=!0:this._annotations={}}return e.prototype.isEmpty=function(){return this._empty},e.prototype.isJSONString=function(){var e=this.firstCharacter();return\"{\"==e||\"[\"==e},e.prototype.isXMLString=function(){return\"<\"==this.firstCharacter()},e.prototype.firstCharacter=function(){if(null==this._value)return null;if(\"string\"!=typeof this._value)return null;var e=this._value.trim();return 0==e.length?null:e.charAt(0)},e.prototype.asXMLString=function(){return this.isXMLString()?this._value:this._owner?this._owner.asXMLString():null},e.prototype.isYAML=function(){return\"string\"!=typeof this._value||!(this.isJSONString()||this.isXMLString())},e.prototype.asString=function(){return\"string\"==typeof this._value?\"\"+this._value:JSON.stringify(this._value,null,2)},e.prototype.asJSON=function(){if(this.isJSONString())try{return JSON.parse(this._value)}catch(e){return null}return this.isYAML()?this._value:this.asString()},e.prototype.original=function(){return this._value},e.prototype.expandAsString=function(){return JSON.stringify(this.expandAsJSON(),null,2)},e.prototype.expandAsJSON=function(){return this.isEmpty()?this.isExpanded?this._expandedValue:(this._expandedValue=r(this._ownerType),this.isExpanded=!0,this._expandedValue):this._value},e.prototype.isSingle=function(){return this._isSingle},e.prototype.strict=function(){return this._strict},e.prototype.description=function(){return this._description},e.prototype.displayName=function(){return this._displayName},e.prototype.annotations=function(){return this._annotations},e.prototype.name=function(){return this._name},e.prototype.scalarsAnnotations=function(){return this._scalarsAnnotations},e.prototype.registerScalarAnnotatoion=function(e,t){this._hasScalarAnnotations=!0;var n=this._scalarsAnnotations[t];n||(n={},this._scalarsAnnotations[t]=n),n[e.facetName()]=e},e.prototype.setOwner=function(e){this._owner=e},e.prototype.owner=function(){return this._owner},e.prototype.setOwnerType=function(e){this._ownerType=e},e.prototype.ownerType=function(){return this._ownerType},e.prototype.hasAnnotations=function(){return this._hasAnnotations},e.prototype.hasScalarAnnotations=function(){return this._hasScalarAnnotations},e}(),m=function(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=!1);var o;if(null!=t){var s=t.value;if(s){var u=i(t,\"displayName\"),c=i(t,\"description\"),l=i(t,\"strict\"),p={};a(t).forEach(function(e){p[e.facetName()]=e}),o=new d(s,n,u,c,l,p,r);for(var f=0,m=a(t.displayName);f<m.length;f++){var h=m[f];o.registerScalarAnnotatoion(h,\"displayName\")}for(var y=0,_=a(t.description);y<_.length;y++){var h=_[y];o.registerScalarAnnotatoion(h,\"description\")}for(var g=0,v=a(t.strict);g<v.length;g++){var h=v[g];o.registerScalarAnnotatoion(h,\"strict\")}}else s=t,o=new d(s,n,void 0,void 0,!0,void 0,r)}return o&&o.setOwner(e),o};t.exampleFromNominal=s},function(e,t,n){\"use strict\";var r=function(){function e(e,t){this.name=e,this.value=t}return e}();t.ValueRequirement=r},function(e,t,n){\"use strict\";(function(e){function r(t){e.extraInjectors.push(t)}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(149),o=n(48),s=n(152);e.extraInjectors=[],t.registerInjector=r;var u=function(){function t(){var t=this;this.adapters=[],e.extraInjectors.forEach(function(e){return e.inject(t)})}return t.prototype.addAdapter=function(e){this.adapters.push(e)},t.prototype.getAdapter=function(e){var t=null;return this.adapters.forEach(function(n){n instanceof e&&(t=n)}),t},t.prototype.getAdapters=function(){return this.adapters},t}();t.Adaptable=u;var c=function(e){function t(t,n){void 0===n&&(n=\"\"),e.call(this),this._name=t,this._description=n,this._tags=[],this._annotations=[]}return i(t,e),t.prototype.nameId=function(){return this._name},t.prototype.description=function(){return this._description},t.prototype.addAnnotation=function(e){this._annotations.push(e)},t.prototype.removeAnnotation=function(e){this._annotations=this._annotations.filter(function(t){return t!=e})},t.prototype.annotations=function(){return[].concat(this._annotations)},t.prototype.tags=function(){return this._tags},t.prototype.withDescription=function(e){return this._description=e,this},t.prototype.setName=function(e){this._name=e},t}(u);t.Described=c;var l=function(e){function t(t,n){e.call(this,t.nameId()),this.type=t,this.parameters=n}return i(t,e),t.prototype.parameterNames=function(){return Object.keys(this.parameters)},t.prototype.parameter=function(e){return this.parameters[e]},t.prototype.getType=function(){return this.type},t}(c);t.Annotation=l;var p=function(){function e(){}return e}();t.Empty=p;var f=function(){function e(){}return e.prototype.type=function(e){return null},e.prototype.version=function(){return\"Empty\"},e.prototype.types=function(){return[]},e.prototype.matched=function(){return{}},e}(),d=new f,m=n(148),h=function(e){function t(t,n,r){void 0===n&&(n=d),void 0===r&&(r=\"\"),e.call(this,t),this._universe=n,this._path=r,this._customProperties=[],this._facets=[],this._superTypes=[],this._subTypes=[],this._requirements=[],this._fixedFacets={},this._fixedBuildInFacets={},this.uc=!1}return i(t,e),t.prototype.properties=function(){return[]},t.prototype.externalInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof S&&(t=e)}),t},t.prototype.addFacet=function(e){this._facets.push(e)},t.prototype.validate=function(e){if(!this._validator)throw new Error(\"Validate can be used only on runtime types instances\");return this._validator(e)},t.prototype.allFacets=function(e){if(void 0===e&&(e={}),this._allFacets)return this._allFacets;if(e[this.nameId()])return[];e[this.typeId()]=this;var n={};return this.superTypes().length>0&&this.superTypes().forEach(function(r){r instanceof t&&r.allFacets(e).forEach(function(e){return n[e.nameId()]=e})}),this._facets.forEach(function(e){return n[e.nameId()]=e}),this._allFacets=Object.keys(n).map(function(e){return n[e]}),this._allFacets},t.prototype.facets=function(){return[].concat(this._facets)},t.prototype.facet=function(e){return s.find(this.allFacets(),function(t){return t.nameId()==e})},t.prototype.typeId=function(){return this.nameId()},t.prototype.allProperties=function(e){if(void 0===e&&(e={}),this._props)return this._props;if(e[this.typeId()])return[];e[this.typeId()]=this;var n={};this.superTypes().length>0&&this.superTypes().forEach(function(r){r instanceof t?r.allProperties(e).forEach(function(e){return n[e.nameId()]=e}):r.allProperties().forEach(function(e){return n[e.nameId()]=e})});for(var r in this.fixedFacets())delete n[r];return this.properties().forEach(function(e){return n[e.nameId()]=e}),this._props=Object.keys(n).map(function(e){return n[e]}),this._props},t.prototype.property=function(e){return s.find(this.allProperties(),function(t){return t.nameId()==e})},t.prototype.hasValueTypeInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasValueTypeInHierarchy()}finally{t.uc=!1}})},t.prototype.isAnnotationType=function(){return!1},t.prototype.hasStructure=function(){return!1},t.prototype.key=function(){return this._key?this._key:this._universe&&(this._key=this.universe().matched()[this.nameId()],!this._key)?null:this._key},t.prototype.hasArrayInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){return e instanceof b})},t.prototype.arrayInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof b&&(t=e)}),t},t.prototype.unionInHierarchy=function(){var e=this.allSuperTypes(),t=null;return e.forEach(function(e){e instanceof v&&(t=e)}),t},t.prototype.hasExternalInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e instanceof S}finally{t.uc=!1}})},t.prototype.hasUnionInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.hasUnionInHierarchy()}finally{t.uc=!1}})},t.prototype.fixFacet=function(e,t,n){void 0===n&&(n=!1),n?this._fixedBuildInFacets[e]=t:this._fixedFacets[e]=t},t.prototype.getFixedFacets=function(){return this.fixedFacets()},t.prototype.fixedFacets=function(){return this.collectFixedFacets(!1)},t.prototype.fixedBuiltInFacets=function(){return this.collectFixedFacets(!0)},t.prototype.collectFixedFacets=function(e){for(var t=e?this._fixedBuildInFacets:this._fixedFacets,n={},r=0,i=Object.keys(t);r<i.length;r++){var a=i[r];n[a]=t[a]}return this.contributeFacets(n),n},t.prototype.allFixedFacets=function(){return this.collectAllFixedFacets(!1)},t.prototype.allFixedBuiltInFacets=function(){return this.collectAllFixedFacets(!0)},t.prototype.collectAllFixedFacets=function(e){if(e&&this._abf)return this._abf;if(!e&&this._af)return this._af;var t=this.allSuperTypes();t.push(this);var n={};return t.forEach(function(t){for(var r=e?t.fixedBuiltInFacets():t.fixedFacets(),i=0,a=Object.keys(r);i<a.length;i++){var o=a[i];n[o]=r[o]}}),this._af=n,n},t.prototype.contributeFacets=function(e){},t.prototype.getPath=function(){return this._path},t.prototype.setNameAtRuntime=function(e){this._nameAtRuntime=e},t.prototype.getNameAtRuntime=function(){return this._nameAtRuntime},t.prototype.universe=function(){return this._universe?this._universe:new f},t.prototype.superTypes=function(){return[].concat(this._superTypes)},t.prototype.isAssignableFrom=function(e){if(this.nameId()==e)return!this.isUserDefined();for(var t=this.allSuperTypes(),n=0;n<t.length;n++)if(t[n].nameId()==e)return!0;return!1},t.prototype.annotationType=function(){return null},t.prototype.subTypes=function(){return[].concat(this._subTypes)},t.prototype.allSubTypes=function(){var e=[];return this.subTypes().forEach(function(t){e.push(t),e=e.concat(t.allSubTypes())}),s.unique(e)},t.prototype.allSuperTypes=function(){if(this._allSupers)return this._allSupers;var e=[];return this.allSuperTypesRecurrent(this,{},e),this._allSupers=s.unique(e),this._allSupers},t.prototype.allSuperTypesRecurrent=function(e,t,n){var r=this;e.superTypes().forEach(function(e){t[e.typeId()]||(n.push(e),t[e.typeId()]=e,r.allSuperTypesRecurrent(e,t,n))})},t.prototype.addSuperType=function(e){e._subTypes.push(this),this._superTypes.push(e)},t.prototype.addRequirement=function(e,t){this._requirements.push(new a.ValueRequirement(e,t))},t.prototype.valueRequirements=function(){return this._requirements},t.prototype.requiredProperties=function(){return this.allProperties().filter(function(e){return e.isRequired()})},t.prototype.printDetails=function(e,n){var r=this;e||(e=\"\"),n||(n={hideProperties:!1,hideSuperTypeProperties:!1,printStandardSuperclasses:!1});var i=\"\",a=this.getTypeClassName();i+=e+this.nameId()+\"[\"+a+\"]\\n\";var o=this.properties();o&&o.length>0&&!n.hideProperties&&(i+=e+\"  Properties:\\n\",o.forEach(function(n){var r=\"\",a=n.range();a instanceof c&&(r+=a.nameId()),a instanceof t&&(r+=\"[\",r+=a.getTypeClassName(),r+=\"]\"),i+=e+\"    \"+n.nameId()+\" : \"+r+\"\\n\"}));var u=this.superTypes(),l=u;return u&&!n.printStandardSuperclasses&&(l=s.filter(u,function(e){var n=e instanceof c?e.nameId():\"\",i=e instanceof t?e.getTypeClassName():\"\";return!r.isStandardSuperclass(n,i)})),l&&l.length>0&&(i+=e+\"  Super types:\\n\",l.forEach(function(t){i+=t.printDetails(e+\"    \",{hideProperties:n.hideSuperTypeProperties,hideSuperTypeProperties:n.hideSuperTypeProperties,printStandardSuperclasses:n.printStandardSuperclasses})})),i},t.prototype.getTypeClassName=function(){return this.constructor.toString().match(/\\w+/g)[1]},t.prototype.isStandardSuperclass=function(e,t){return\"TypeDeclaration\"===e&&\"NodeClass\"===t||(\"ObjectTypeDeclaration\"===e&&\"NodeClass\"===t||\"RAMLLanguageElement\"===e&&\"NodeClass\"===t)},t.prototype.examples=function(e){return m.exampleFromNominal(this,e)},t.prototype.isGenuineUserDefinedType=function(){if(this.buildIn)return!1;if(this.properties()&&this.properties().length>0)return!0;var e=this.fixedFacets();if(e&&Object.keys(e).length>0)return!0;var t=this.fixedBuiltInFacets();return!!(t&&Object.keys(t).length>0)||this.isTopLevel()&&this.nameId()&&this.nameId().length>0},t.prototype.genuineUserDefinedTypeInHierarchy=function(){if(this.isGenuineUserDefinedType())return this;var e=null;return this.allSuperTypes().forEach(function(t){!e&&t.isGenuineUserDefinedType()&&(e=t)}),e},t.prototype.hasGenuineUserDefinedTypeInHierarchy=function(){return null!=s.find(this.allSuperTypes(),function(e){var t=e;if(t.uc)return!1;t.uc=!0;try{return e.isGenuineUserDefinedType()}finally{t.uc=!1}})},t.prototype.customProperties=function(){return[].concat(this._customProperties)},t.prototype.allCustomProperties=function(){var e=[];return this.superTypes().forEach(function(t){return e=e.concat(t.allCustomProperties())}),e=e.concat(this.customProperties())},t.prototype.registerCustomProperty=function(e){if(e.domain()!=this)throw new Error(\"Should be already owned by this\");if(this._customProperties.indexOf(e)!=-1)throw new Error(\"Already included\");this._customProperties.push(e)},t.prototype.setCustom=function(e){this._isCustom=e},t.prototype.isCustom=function(){return this._isCustom},t.prototype.isUnion=function(){return!1},t.prototype.union=function(){return null},t.prototype.isExternal=function(){return!1},t.prototype.external=function(){return null},t.prototype.isArray=function(){return!1},t.prototype.isObject=function(){if(\"object\"==this.nameId())return!0;for(var e=0,t=this.allSuperTypes();e<t.length;e++){if(t[e].isObject())return!0}return!1},t.prototype.array=function(){return null},t.prototype.isValueType=function(){return!1},t.prototype.kind=function(){var e=[];return this.isObject()&&e.push(\"object\"),this.isArray()&&e.push(\"array\"),this.isValueType()&&e.push(\"value\"),this.isUnion()&&e.push(\"union\"),this.isAnnotationType()&&e.push(\"annotation\"),this.isExternal()&&e.push(\"external\"),e},t.prototype.isBuiltIn=function(){return this.buildIn},t.prototype.setBuiltIn=function(e){this.buildIn=e},t.prototype.isTopLevel=function(){return!(!this.getExtra(o.DEFINED_IN_TYPES_EXTRA)&&!this.getExtra(o.TOP_LEVEL_EXTRA))},t.prototype.isUserDefined=function(){return this.getExtra(o.USER_DEFINED_EXTRA)&&!this.buildIn},t.prototype.putExtra=function(e,t){var n=this.getExtraAdapter();n&&n.putExtra(e,t)},t.prototype.getExtra=function(e){var t=this.getExtraAdapter();return t?t.getExtra(e):null},t.prototype.getExtraAdapter=function(){if(this.getAdapters()){return s.find(this.getAdapters(),function(e){if(e.getExtra&&\"function\"==typeof e.getExtra&&e.putExtra&&\"function\"==typeof e.putExtra)return!0})}return null},t}(c);t.AbstractType=h;var y=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=\"\"),void 0===i&&(i=\"\"),e.call(this,t,n,r)}return i(t,e),t.prototype.hasStructure=function(){return!1},t.prototype.hasValueTypeInHierarchy=function(){return!0},t.prototype.isValueType=function(){return!0},t.prototype.isUnionType=function(){return!1},t.prototype.isObject=function(){return!1},t}(h);t.ValueType=y;var _=function(e){function t(){e.apply(this,arguments),this._properties=[]}return i(t,e),t.prototype.hasStructure=function(){return!0},t.prototype.propertyIndex=function(e){for(var t=this.properties(),n=0;n<t.length;n++)if(t[n].nameId()==e)return n;return-1},t.prototype.addProperty=function(e,t){return new g(e).withDomain(this).withRange(t)},t.prototype.allPropertyIndex=function(e){for(var t=this.allProperties(),n=0;n<t.length;n++)if(t[n].nameId()==e)return n;return-1},t.prototype.properties=function(){return[].concat(this._properties)},t.prototype.registerProperty=function(e){if(e.domain()!=this)throw new Error(\"Should be already owned by this\");if(this._properties.indexOf(e)!=-1)throw new Error(\"Already included\");this._properties.push(e)},t}(h);t.StructuredType=_;var g=function(e){function t(){e.apply(this,arguments),this._keyShouldStartFrom=null,this._isRequired=!1,this._isMultiValue=!1,this._descriminates=!1,this._defaultBooleanValue=null,this._defaultIntegerValue=null}return i(t,e),t.prototype.withMultiValue=function(e){return void 0===e&&(e=!0),this._isMultiValue=e,this},t.prototype.withDescriminating=function(e){return this._descriminates=e,this},t.prototype.withRequired=function(e){return this._isRequired=e,this},t.prototype.isRequired=function(){return this._isRequired},t.prototype.withKeyRestriction=function(e){return this._keyShouldStartFrom=e,this},t.prototype.withDomain=function(e,t){return void 0===t&&(t=!1),this._ownerClass=e,t?e.registerCustomProperty(this):e.registerProperty(this),this},t.prototype.setDefaultVal=function(e){return this._defaultValue=e,this},t.prototype.setDefaultBooleanVal=function(e){return this._defaultBooleanValue=e,this},t.prototype.setDefaultIntegerVal=function(e){return this._defaultIntegerValue=e,this},t.prototype.defaultValue=function(){return null!=this._defaultValue?this._defaultValue:null!=this._defaultBooleanValue?this._defaultBooleanValue:null!=this._defaultIntegerValue?this._defaultIntegerValue:null},t.prototype.isPrimitive=function(){return!1},t.prototype.withRange=function(e){return this._nodeRange=e,this},t.prototype.isValueProperty=function(){return this._nodeRange.hasValueTypeInHierarchy()},t.prototype.enumOptions=function(){return this._enumOptions&&\"string\"==typeof this._enumOptions?[this._enumOptions+\"\"]:this._enumOptions},t.prototype.keyPrefix=function(){return this._keyShouldStartFrom},t.prototype.withEnumOptions=function(e){return this._enumOptions=e,this},t.prototype.withKeyRegexp=function(e){return this._keyRegexp=e,this},t.prototype.getKeyRegexp=function(){return this._keyRegexp},t.prototype.matchKey=function(e){if(null==e)return!1;if(null!=this._groupName)return this._groupName==e;if(null!=this._keyShouldStartFrom&&0==e.indexOf(this._keyShouldStartFrom))return!0;if(this._enumOptions&&this._enumOptions.indexOf(e)!=-1)return!0;if(this.getKeyRegexp())try{if(new RegExp(this.getKeyRegexp()).test(e))return!0}catch(e){}return!1},t.prototype.getFacetValidator=function(){return this.facetValidator},t.prototype.setFacetValidator=function(e){this.facetValidator=e},t.prototype.domain=function(){return this._ownerClass},t.prototype.range=function(){return this._nodeRange},t.prototype.isMultiValue=function(){return!(!this.range()||!this.range().hasArrayInHierarchy())||this._isMultiValue},t.prototype.isDescriminator=function(){return this._descriminates},t}(c);t.Property=g;var v=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.key=function(){return null},t.prototype.leftType=function(){return this.left},t.prototype.rightType=function(){return this.right},t.prototype.isUserDefined=function(){return!0},t.prototype.unionInHierarchy=function(){return this},t.prototype.union=function(){return this},t.prototype.hasUnionInHierarchy=function(){return!0},t.prototype.isUnion=function(){return!0},t.prototype.isObject=function(){return this.leftType().isObject()&&this.rightType().isObject()},t.prototype.hasArrayInHierarchy=function(){return this.left&&this.right?this.left.hasArrayInHierarchy()||this.right.hasArrayInHierarchy():this.left?this.left.hasArrayInHierarchy():this.right?this.right.hasArrayInHierarchy():void 0},t}(h);t.Union=v;var b=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.hasArrayInHierarchy=function(){return!0},t.prototype.isArray=function(){return!0},t.prototype.isObject=function(){return!1},t.prototype.arrayInHierarchy=function(){return this},t.prototype.array=function(){return this},t.prototype.isUserDefined=function(){return!0},t.prototype.componentType=function(){return this.component},t.prototype.setComponent=function(e){this.component=e},t.prototype.key=function(){return null},t}(h);t.Array=b;var S=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.externalInHierarchy=function(){return this},t.prototype.typeId=function(){return this.schemaString},t.prototype.schema=function(){return this.schemaString},t.prototype.isUserDefined=function(){return!0},t.prototype.hasExternalInHierarchy=function(){return!0},t.prototype.isExternal=function(){return!0},t.prototype.external=function(){return this},t}(_);t.ExternalType=S}).call(t,n(13))},function(e,t,n){\"use strict\";function r(e,t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);try{var i=e.trim();if(i.length>0){var o=\"{\"==i.charAt(0);if(o||\"<\"==i.charAt(0)&&i.length>1&&\"<\"!=i.charAt(1))return new p.ExternalType(\"\",i,o,n,r);return a(l.parse(e),t)}return p.derive(e,[p.STRING])}catch(t){return p.derive(e,[p.UNKNOWN])}}function i(e,t){for(;e>0;){var n=p.derive(\"\",[p.ARRAY]);n.addMeta(new f.ComponentShouldBeOfType(t)),t=n,e--}return t}function a(e,t){if(\"union\"==e.type){var n=e;return p.union(\"\",[a(n.first,t),a(n.rest,t)])}if(\"parens\"==e.type){var r=e,o=a(r.expr,t);return i(r.arr,o)}var s=e;if(\"?\"==s.value.charAt(s.value.length-1)){var u=t.get(s.value.substr(0,s.value.length-1));u||(u=p.derive(s.value,[p.UNKNOWN])),u=p.union(s.value,[u,p.NIL]);var c=s.arr;return i(c,u)}var u=t.get(s.value);u||(u=p.derive(s.value,[p.UNKNOWN]));var c=s.arr;return i(c,u)}function o(e){if(e.isSubTypeOf(p.ARRAY)){var t=e.oneMeta(f.ComponentShouldBeOfType);return t?t.value().isUnion()?\"(\"+o(t.value())+\")[]\":o(t.value())+\"[]\":\"array\"}if(e instanceof p.UnionType){return e.options().map(function(e){return o(e)}).join(\" | \")}return e.isAnonymous()&&e.isEmpty()?e.superTypes().map(function(e){return o(e)}).join(\" , \"):e.name()}function s(e,t){if(t(e),\"union\"==e.type){var n=e;s(n.first,t),s(n.rest,t)}else if(\"parens\"==e.type){var r=e;s(r.expr,t)}}function u(e){var t,n=0;if(\"name\"==e.type){var r=e;t=r.value,n=r.arr}else if(\"union\"==e.type){var i=e;t=u(i.first)+\" | \"+u(i.rest)}else if(\"parens\"==e.type){var a=e;t=\"(\"+u(a.expr)+\")\",n=a.arr}for(;--n>=0;)t+=\"[]\";return t}function c(e){return l.parse(e)}var l=n(340),p=n(6),f=n(8);t.parseToType=r,t.storeToString=o,t.visit=s,t.serializeToString=u,t.parse=c},function(e,t,n){\"use strict\";function r(e,t){return o.find(e,t)}function i(e,t){return o.filter(e,t)}function a(e){return o.unique(e)}var o=n(1);t.find=r,t.filter=i,t.unique=a},function(e,t,n){\"use strict\";function r(e){if(!(this instanceof r))return new r(e);i.call(this,e)}e.exports=r;var i=n(93),a=n(39);a.inherits=n(26),a.inherits(r,i),r.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){\"use strict\";(function(t){function r(e,t,n){if(\"function\"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?I(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}function i(e,t){x=x||n(30),e=e||{},this.objectMode=!!e.objectMode,t instanceof x&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var r=e.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new K,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=e.defaultEncoding||\"utf8\",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(B||(B=n(95).StringDecoder),this.decoder=new B(e.encoding),this.encoding=e.encoding)}function a(e){if(x=x||n(30),!(this instanceof a))return new a(e);this._readableState=new i(e,this),this.readable=!0,e&&\"function\"==typeof e.read&&(this._read=e.read),D.call(this)}function o(e,t,n,r,i){var a=l(t,n);if(a)e.emit(\"error\",a);else if(null===n)t.reading=!1,p(e,t);else if(t.objectMode||n&&n.length>0)if(t.ended&&!i){var o=new Error(\"stream.push() after EOF\");e.emit(\"error\",o)}else if(t.endEmitted&&i){var u=new Error(\"stream.unshift() after end event\");e.emit(\"error\",u)}else{var c;!t.decoder||i||r||(n=t.decoder.write(n),c=!t.objectMode&&0===n.length),i||(t.reading=!1),c||(t.flowing&&0===t.length&&!t.sync?(e.emit(\"data\",n),e.read(0)):(t.length+=t.objectMode?1:n.length,i?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&f(e))),m(e,t)}else i||(t.reading=!1);return s(t)}function s(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}function u(e){return e>=V?e=V:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function c(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=u(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function l(e,t){var n=null;return P.isBuffer(t)||\"string\"==typeof t||null===t||void 0===t||e.objectMode||(n=new TypeError(\"Invalid non-string/buffer chunk\")),n}function p(e,t){if(!t.ended){if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,f(e)}}function f(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(F(\"emitReadable\",t.flowing),t.emittedReadable=!0,t.sync?R(d,e):d(e))}function d(e){F(\"emit readable\"),e.emit(\"readable\"),b(e)}function m(e,t){t.readingMore||(t.readingMore=!0,R(h,e,t))}function h(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(F(\"maybeReadMore read 0\"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function y(e){return function(){var t=e._readableState;F(\"pipeOnDrain\",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&M(e,\"data\")&&(t.flowing=!0,b(e))}}function _(e){F(\"readable nexttick read 0\"),e.read(0)}function g(e,t){t.resumeScheduled||(t.resumeScheduled=!0,R(v,e,t))}function v(e,t){t.reading||(F(\"resume read 0\"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit(\"resume\"),b(e),t.flowing&&!t.reading&&e.read(0)}function b(e){var t=e._readableState;for(F(\"flow\",t.flowing);t.flowing&&null!==e.read(););}function S(e,t){if(0===t.length)return null;var n;return t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(\"\"):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=A(e,t.buffer,t.decoder),n}function A(e,t,n){var r;return e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?T(e,t):E(e,t),r}function T(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var a=n.data,o=e>a.length?a.length:e;if(i+=o===a.length?a:a.slice(0,e),0===(e-=o)){o===a.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=a.slice(o));break}++r}return t.length-=r,i}function E(e,t){var n=L.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(n,n.length-e,0,o),0===(e-=o)){o===a.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=a.slice(o));break}++i}return t.length-=i,n}function C(e){var t=e._readableState;if(t.length>0)throw new Error('\"endReadable()\" called on non-empty stream');t.endEmitted||(t.ended=!0,R(N,t,e))}function N(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit(\"end\"))}function w(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)}function k(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}e.exports=a;var x,R=n(83),I=n(117);a.ReadableState=i;var D,M=(n(40).EventEmitter,function(e,t){return e.listeners(t).length});!function(){try{D=n(66)}catch(e){}finally{D||(D=n(40).EventEmitter)}}();var P=n(16).Buffer,L=n(69),O=n(39);O.inherits=n(26);var U=n(402),F=void 0;F=U&&U.debuglog?U.debuglog(\"stream\"):function(){};var B,K=n(346);O.inherits(a,D),a.prototype.push=function(e,t){var n=this._readableState;return n.objectMode||\"string\"!=typeof e||(t=t||n.defaultEncoding)!==n.encoding&&(e=L.from(e,t),t=\"\"),o(this,n,e,t,!1)},a.prototype.unshift=function(e){return o(this,this._readableState,e,\"\",!0)},a.prototype.isPaused=function(){return this._readableState.flowing===!1},a.prototype.setEncoding=function(e){return B||(B=n(95).StringDecoder),this._readableState.decoder=new B(e),this._readableState.encoding=e,this};var V=8388608;a.prototype.read=function(e){F(\"read\",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return F(\"read: emitReadable\",t.length,t.ended),0===t.length&&t.ended?C(this):f(this),null;if(0===(e=c(e,t))&&t.ended)return 0===t.length&&C(this),null;var r=t.needReadable;F(\"need readable\",r),(0===t.length||t.length-e<t.highWaterMark)&&(r=!0,F(\"length less than watermark\",r)),t.ended||t.reading?(r=!1,F(\"reading or ended\",r)):r&&(F(\"do read\"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=c(n,t)));var i;return i=e>0?S(e,t):null,null===i?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&C(this)),null!==i&&this.emit(\"data\",i),i},a.prototype._read=function(e){this.emit(\"error\",new Error(\"_read() is not implemented\"))},a.prototype.pipe=function(e,n){function i(e){F(\"onunpipe\"),e===f&&o()}function a(){F(\"onend\"),e.end()}function o(){F(\"cleanup\"),e.removeListener(\"close\",c),e.removeListener(\"finish\",l),e.removeListener(\"drain\",_),e.removeListener(\"error\",u),e.removeListener(\"unpipe\",i),f.removeListener(\"end\",a),f.removeListener(\"end\",o),f.removeListener(\"data\",s),g=!0,!d.awaitDrain||e._writableState&&!e._writableState.needDrain||_()}function s(t){F(\"ondata\"),v=!1,!1!==e.write(t)||v||((1===d.pipesCount&&d.pipes===e||d.pipesCount>1&&k(d.pipes,e)!==-1)&&!g&&(F(\"false write response, pause\",f._readableState.awaitDrain),f._readableState.awaitDrain++,v=!0),f.pause())}function u(t){F(\"onerror\",t),p(),e.removeListener(\"error\",u),0===M(e,\"error\")&&e.emit(\"error\",t)}function c(){e.removeListener(\"finish\",l),p()}function l(){F(\"onfinish\"),e.removeListener(\"close\",c),p()}function p(){F(\"unpipe\"),f.unpipe(e)}var f=this,d=this._readableState;switch(d.pipesCount){case 0:d.pipes=e;break;case 1:d.pipes=[d.pipes,e];break;default:d.pipes.push(e)}d.pipesCount+=1,F(\"pipe count=%d opts=%j\",d.pipesCount,n);var m=(!n||n.end!==!1)&&e!==t.stdout&&e!==t.stderr,h=m?a:o;d.endEmitted?R(h):f.once(\"end\",h),e.on(\"unpipe\",i);var _=y(f);e.on(\"drain\",_);var g=!1,v=!1;return f.on(\"data\",s),r(e,\"error\",u),e.once(\"close\",c),e.once(\"finish\",l),e.emit(\"pipe\",f),d.flowing||(F(\"pipe resume\"),f.resume()),e},a.prototype.unpipe=function(e){var t=this._readableState;if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit(\"unpipe\",this),this);if(!e){var n=t.pipes,r=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<r;i++)n[i].emit(\"unpipe\",this);return this}var a=k(t.pipes,e);return a===-1?this:(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit(\"unpipe\",this),this)},a.prototype.on=function(e,t){var n=D.prototype.on.call(this,e,t);if(\"data\"===e)this._readableState.flowing!==!1&&this.resume();else if(\"readable\"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&f(this):R(_,this))}return n},a.prototype.addListener=a.prototype.on,a.prototype.resume=function(){var e=this._readableState;return e.flowing||(F(\"resume\"),e.flowing=!0,g(this,e)),this},a.prototype.pause=function(){return F(\"call pause flowing=%j\",this._readableState.flowing),!1!==this._readableState.flowing&&(F(\"pause\"),this._readableState.flowing=!1,this.emit(\"pause\")),this},a.prototype.wrap=function(e){var t=this._readableState,n=!1,r=this;e.on(\"end\",function(){if(F(\"wrapped end\"),t.decoder&&!t.ended){var e=t.decoder.end();e&&e.length&&r.push(e)}r.push(null)}),e.on(\"data\",function(i){if(F(\"wrapped data\"),t.decoder&&(i=t.decoder.write(i)),(!t.objectMode||null!==i&&void 0!==i)&&(t.objectMode||i&&i.length)){r.push(i)||(n=!0,e.pause())}});for(var i in e)void 0===this[i]&&\"function\"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));return w([\"error\",\"close\",\"destroy\",\"pause\",\"resume\"],function(t){e.on(t,r.emit.bind(r,t))}),r._read=function(t){F(\"wrapped _read\",t),n&&(n=!1,e.resume())},r},a._fromList=S}).call(t,n(23))},function(e,t,n){(function(r){var i=function(){try{return n(66)}catch(e){}}();t=e.exports=n(154),t.Stream=i||t,t.Readable=t,t.Writable=n(94),t.Duplex=n(30),t.Transform=n(93),t.PassThrough=n(153),!r.browser&&\"disable\"===r.env.READABLE_STREAM&&i&&(e.exports=i)}).call(t,n(23))},function(e,t,n){var r=n(31);e.exports=function(e,t){return r(e,t,\"_\")}},function(e,t,n){\"use strict\";function r(e){var t=[],n=c.readFileSync(u.resolve(e)).toString(),r=o.createSourceFile(\"sample.ts\",n,o.ScriptTarget.ES3,!0);return s.Matching.visit(r,function(r){var s=r;if(s.kind==o.SyntaxKind.FunctionDeclaration){var u=i(s,n);if(!u)return;var c=s.name.text,f=c;u.name?f=u.name:u.name=c;var f=u.name?u.name:c,d=s.parameters?s.parameters.map(function(t){return a(t,e)}):[],m=(!!u.override&&u.override,l.buildType(s.type,e));t.push(new p.HelperMethod(c,f,m,d,u))}}),t}function i(e,t){var n=o.getLeadingCommentRanges(t,e.pos);if(!n)return null;var r=n.map(function(e){return t.substring(e.pos,e.end)}).join(\"\\n\"),i=r.indexOf(\"__$helperMethod__\");if(i<0)return null;i+=\"__$helperMethod__\".length;var a=r.indexOf(\"__$meta__\");if(a<0)return{comment:f(r.substring(i))};var s=f(r.substring(i,a)),u=r.indexOf(\"{\",a);if(u<0)return{comment:s};try{var c=JSON.parse(f(r.substring(u)));return c.comment=s.trim().length>0?s:null,c.override=c.override||!1,c.primary=c.primary||!1,c.deprecated=c.deprecated||!1,c}catch(e){console.log(e)}return{}}function a(e,t){var n,r=e.name.text,i=l.buildType(e.type,t),a=null!=e.questionToken;return null!=e.initializer&&(n=l.parseArg(e.initializer),a=!0),{name:r,type:i,defaultValue:n,optional:a}}var o=n(97),s=n(159),u=n(11),c=n(47),l=n(160),p=n(158);t.getHelperMethods=r;var f=function(e){return e.replace(/^\\s*\\/\\*+/g,\"\").replace(/\\*+\\/\\s*$/g,\"\").split(\"\\n\").map(function(e){return e.replace(/^\\s*\\/\\//g,\"\").replace(/^\\s*\\* {0,1}/g,\"\")}).join(\"\\n\").trim()}},function(e,t,n){\"use strict\";function r(e,t){if(e.typeKind==a.TypeKind.ARRAY)return t?[]:[r(e.base)[0]+\"[]\"];if(e.typeKind==a.TypeKind.BASIC){var n=e,i=n.basicName,o=n.nameSpace&&n.nameSpace.trim();return null!=o&&o.length>0&&\"RamlWrapper\"!=o&&(i=o+\".\"+i),n.typeArguments&&0!=n.typeArguments.length&&(i+=\"<\"+n.typeArguments.map(function(e){return r(e)}).join(\", \")+\">\"),t?n.nameSpace&&t[n.nameSpace]?[i]:[]:[i]}if(e.typeKind==a.TypeKind.UNION){var s=e,u=[];return s.options.forEach(function(e){return u=u.concat(r(e,t))}),u}return[]}function i(e){return o.getHelperMethods(e)}var a=n(67),o=n(157),s={RamlWrapper:!0},u=function(){function e(e,t,n,r,i){this.originalName=e,this.wrapperMethodName=t,this.returnType=n,this.args=r,this.meta=i}return e.prototype.targetWrappers=function(){var e=!0,t=[];return this.args.forEach(function(n){var i=r(n.type,s);if(0!=i.length)return e&&0==t.length?void(t=t.concat(i)):(t=[],void(e=!1))}),t},e.prototype.callArgs=function(){return this.args.map(function(e){return 0==r(e.type,s).length?e:{name:\"this\",type:null,optional:!1,defaultValue:void 0}})},e}();t.HelperMethod=u,t.flatten=r,t.getHelperMethods=i},function(e,t,n){\"use strict\";var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(97);!function(e){function t(n,r){var a=r(n);return a?a==e.SKIP?null:a:i.forEachChild(n,function(e){var n=t(e,r);if(n)return n})}function n(e,t){void 0===t&&(t=function(e){return!0});for(var n=e.split(\".\"),r=null,i=0;i<n.length;i++){var s=n[i],u=s.indexOf(\"(*)\"),c=!1;u!=-1&&(s=s.substr(0,u),c=!0),r=null==r?\"*\"==s?o():a(s):new E(r,\"*\"==s?o():a(s),t),c&&(r=new S(r,t))}return r}function a(e){return new v(e)}function o(){return new b}function s(e,t){return void 0===t&&(t=function(e){return!0}),new S(e,t)}function u(e,t){return void 0===t&&(t=function(e){return!0}),new g(e,t)}function c(e,t,n){return void 0===n&&(n=function(e){return!0}),new y(e,t,n)}function l(e,t,n){return void 0===n&&(n=function(e){return!0}),new _(e,t,n)}function p(){return new h}function f(){return new m}var d=function(){function e(){}return e.prototype.match=function(e){throw new Error},e.prototype.nodeType=function(){throw new Error},e.prototype.doMatch=function(e){return e?this.nodeType()==e.kind?this.match(e):void 0:null},e}();e.BasicMatcher=d;var m=function(e){function t(){e.call(this)}return r(t,e),t.prototype.match=function(e){return e},t.prototype.nodeType=function(){return i.SyntaxKind.ClassDeclaration},t}(d);e.ClassDeclarationMatcher=m;var h=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.match=function(e){return e},t.prototype.nodeType=function(){return i.SyntaxKind.PropertyDeclaration},t}(d);e.FieldMatcher=h;var y=function(e){function t(t,n,r){e.call(this),this.left=t,this.right=n,this.tr=r}return r(t,e),t.prototype.match=function(e){return e.operatorToken.kind==i.SyntaxKind.EqualsToken&&this.left.doMatch(e.left)&&this.right.doMatch(e.right)?this.tr(e):null},t.prototype.nodeType=function(){return i.SyntaxKind.BinaryExpression},t}(d);e.AssignmentExpressionMatcher=y;var _=function(e){function t(t,n,r){e.call(this),this.left=t,this.right=n,this.tr=r}return r(t,e),t.prototype.match=function(e){if(this.left.doMatch(e.name)&&this.right.doMatch(e.initializer))return this.tr(e)},t.prototype.nodeType=function(){return i.SyntaxKind.VariableDeclaration},t}(d);e.VariableDeclarationMatcher=_;var g=function(e){function t(t,n){e.call(this),this.expression=t,this.tr=n}return r(t,e),t.prototype.match=function(e){var t=this.expression.doMatch(e.expression);if(t){var n=this.tr(e.expression);return 1==n?t:n}return null},t.prototype.nodeType=function(){return i.SyntaxKind.ExpressionStatement},t}(d),v=function(e){function t(t){e.call(this),this.val=t}return r(t,e),t.prototype.match=function(e){return e.text==this.val||null},t.prototype.nodeType=function(){return i.SyntaxKind.Identifier},t}(d),b=function(){function e(){}return e.prototype.doMatch=function(e){return!0},e.prototype.nodeType=function(){return null},e}(),S=function(e){function t(t,n){e.call(this),this.calleeMatcher=t,this.tr=n}return r(t,e),t.prototype.match=function(e){return this.calleeMatcher.doMatch(e.expression)?this.tr(e):null},t.prototype.nodeType=function(){return i.SyntaxKind.CallExpression},t}(d);e.SKIP={},e.visit=t;var A=function(){function e(e,t){this._base=t,this.arguments=null,this.name=e}return e}();e.PathNode=A;var T=function(){function e(e,t){this._baseNode=t,this.path=[],this.base=e}return e.prototype.start=function(){return this._baseNode.pos},e.prototype.startLocation=function(){return this._baseNode.getSourceFile().getLineAndCharacterOfPosition(this.start())},e.prototype.endLocation=function(){return this._baseNode.getSourceFile().getLineAndCharacterOfPosition(this.end())},e.prototype.end=function(){var e=this.path[this.path.length-1]._callExpression;return e?e.end:this.start()},e.prototype.toString=function(){return this.path.map(function(e){return e.name}).join(\".\")},e}();e.CallPath=T;var E=function(e){function t(t,n,r){e.call(this),this.objectMatcher=t,this.propertyMatcher=n,this.tr=r}return r(t,e),t.prototype.match=function(e){return this.objectMatcher.doMatch(e.expression)&&this.propertyMatcher.doMatch(e.name)?this.tr(e):null},t.prototype.nodeType=function(){return i.SyntaxKind.PropertyAccessExpression},t}(d);e.memberFromExp=n;var C=function(){function e(e){this.rootMatcher=e}return e.prototype.doMatch=function(e){if(e.kind==i.SyntaxKind.CallExpression){var t=e,n=this.doMatch(t.expression);if(n)return n.path.length>0&&null==n.path[n.path.length-1].arguments?(n.path[n.path.length-1].arguments=t.arguments,n.path[n.path.length-1]._callExpression=t,n):null}else if(e.kind==i.SyntaxKind.PropertyAccessExpression){var r=e,a=this.doMatch(r.expression);if(a)return r.name.kind==i.SyntaxKind.Identifier?(a.path.push(new A(r.name.text,r.name)),a):null}else if(e.kind==i.SyntaxKind.Identifier){var o=e;if(this.rootMatcher.doMatch(o))return new T(o.text,o)}return null},e.prototype.nodeType=function(){return null},e}();e.CallBaseMatcher=C,e.ident=a,e.anyNode=o,e.call=s,e.exprStmt=u,e.assign=c,e.varDecl=l,e.field=p,e.classDeclaration=f}(t.Matching||(t.Matching={}))},function(e,t,n){\"use strict\";function r(e){return v.createSourceFile(\"sample.ts\",e,v.ScriptTarget.ES3,!0)}function i(e,n,s){var u=r(e),c={classes:[],aliases:[],enumDeclarations:[],imports:{},name:s};n[s]=c;var l=null;return t.tsm.Matching.visit(u,function(r){if(r.kind==v.SyntaxKind.ModuleDeclaration){l=r.name.text}if(r.kind==v.SyntaxKind.ImportEqualsDeclaration){var u=r,p=u.name.text;if(\"RamlWrapper\"==p)return;var f=u.moduleReference,d=f.expression,m=d.text,h=b.resolve(b.dirname(s)+\"/\",m)+\".ts\";if(!b.existsSync(h))throw new Error(\"Path \"+m+\" resolve to \"+h+\"do not exists\");if(!n[h]){var _=b.readFileSync(h);i(_,n,h)}c.imports[p]=n[h]}if(r.kind==v.SyntaxKind.TypeAliasDeclaration){var g=r;if(g.name){var S=g.name.text,E=y(g.type,s);c.aliases.push({name:S,type:E})}}if(r.kind==v.SyntaxKind.EnumDeclaration){var C=r,N=[];C.members&&C.members.forEach(function(e){N.push(e.name.text)}),C.name&&c.enumDeclarations.push({name:C.name.text,members:N})}var w=r.kind==v.SyntaxKind.InterfaceDeclaration,k=r.kind==v.SyntaxKind.ClassDeclaration;if(w||k){var x=r;if(x){var R={},I=A.classDecl(x.name.text,w);return I.moduleName=l,c.classes.push(I),x.members.forEach(function(t){if(t.kind==v.SyntaxKind.MethodDeclaration){var n=t,r=o(n,e,s);I.methods.push(r)}var i=T.doMatch(t);if(i){var u=a(i,s);if(\"$\"==u.name)I.annotations=u.annotations;else if(\"$\"!=u.name.charAt(0)||\"$ref\"==u.name)R[u.name]=u,I.fields.push(u);else{var c=u.name.substr(1),l=R[c];if(l)l.annotations=u.annotations;else if(\"$$\"!=u.name){var p=I.annotationOverridings[c];p||(p=[]),I.annotationOverridings[c]=p.concat(u.annotations)}}}}),x.typeParameters&&x.typeParameters.forEach(function(e){I.typeParameters.push(e.name.text),null==e.constraint?I.typeParameterConstraint.push(null):I.typeParameterConstraint.push(e.constraint.typeName.text)}),x.heritageClauses&&x.heritageClauses.forEach(function(e){e.types.forEach(function(t){if(e.token==v.SyntaxKind.ExtendsKeyword)I.extends.push(y(t,s));else{if(e.token!=v.SyntaxKind.ImplementsKeyword)throw new Error(\"Unknown token class heritage\");I.implements.push(y(t,s))}})}),t.tsm.Matching.SKIP}}}),c}function a(e,t){return{name:e.name.text,type:y(e.type,t),annotations:\"$\"==e.name.text.charAt(0)?c(e.initializer):[],valueConstraint:\"$\"!=e.name.text.charAt(0)?u(e.initializer):null,optional:null!=e.questionToken}}function o(e,t,n){var r=e.name.text,i=t.substring(e.pos,e.end),a=[];return e.parameters.forEach(function(e){a.push(s(e,t,n))}),{returnType:y(e.type,n),name:r,start:e.pos,end:e.end,text:i,arguments:a}}function s(e,t,n){var r=t.substring(e.pos,e.end);return{name:e.name.text,start:e.pos,end:e.end,text:r,type:y(e.type,n)}}function u(e){return null==e?null:e.kind==v.SyntaxKind.CallExpression?{isCallConstraint:!0,value:l(e)}:{isCallConstraint:!1,value:p(e)}}function c(e){if(null==e)return[];if(e.kind==v.SyntaxKind.ArrayLiteralExpression){var t=e,n=[];return t.elements.forEach(function(e){n.push(l(e))}),n}throw new Error(\"Only Array Literals supported now\")}function l(e){if(e.kind==v.SyntaxKind.CallExpression){var t=e,n=f(t.expression),r={name:n,arguments:[]};return t.arguments.forEach(function(e){r.arguments.push(p(e))}),r}throw new Error(\"Only call expressions may be annotations\")}function p(e){if(e.kind==v.SyntaxKind.StringLiteral){return e.text}if(e.kind==v.SyntaxKind.NoSubstitutionTemplateLiteral){return e.text}if(e.kind==v.SyntaxKind.ArrayLiteralExpression){var t=e,n=[];return t.elements.forEach(function(e){n.push(p(e))}),n}if(e.kind==v.SyntaxKind.TrueKeyword)return!0;if(e.kind==v.SyntaxKind.PropertyAccessExpression){var r=e;return p(r.expression)+\".\"+p(r.name)}if(e.kind==v.SyntaxKind.Identifier){return e.text}if(e.kind==v.SyntaxKind.FalseKeyword)return!1;if(e.kind==v.SyntaxKind.NumericLiteral){var i=e;return Number(i.text)}if(e.kind==v.SyntaxKind.BinaryExpression){var a=e;if(a.operatorToken.kind=v.SyntaxKind.PlusToken)return p(a.left)+p(a.right)}throw new Error(\"Unknown value in annotation\")}function f(e){if(e.kind==v.SyntaxKind.Identifier)return e.text;if(e.kind==v.SyntaxKind.PropertyAccessExpression){var t=e;return f(t.expression)+\".\"+f(t.name)}throw new Error(\"Only simple identifiers are supported now\")}function d(e,t){var n=e.indexOf(\".\");return{typeName:e,nameSpace:n!=-1?e.substring(0,n):\"\",basicName:n!=-1?e.substring(n+1):e,typeKind:S.TypeKind.BASIC,typeArguments:[],modulePath:t}}function m(e){return{base:e,typeKind:S.TypeKind.ARRAY}}function h(e){return{options:e,typeKind:S.TypeKind.UNION}}function y(e,t){if(null==e)return null;if(e.kind==v.SyntaxKind.StringKeyword)return d(\"string\",null);if(e.kind==v.SyntaxKind.NumberKeyword)return d(\"number\",null);if(e.kind==v.SyntaxKind.BooleanKeyword)return d(\"boolean\",null);if(e.kind==v.SyntaxKind.AnyKeyword)return d(\"any\",null);if(e.kind==v.SyntaxKind.VoidKeyword)return d(\"void\",null);if(e.kind==v.SyntaxKind.TypeReference){var n=e,r=d(g(n.typeName),t);return n.typeArguments&&n.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}if(e.kind==v.SyntaxKind.ArrayType){return m(y(e.elementType,t))}if(e.kind==v.SyntaxKind.UnionType){return h(e.types.map(function(e){return y(e,t)}))}if(e.kind==v.SyntaxKind.ExpressionWithTypeArguments){var i=e,r=d(_(i.expression),t);return i.typeArguments&&i.typeArguments.forEach(function(e){r.typeArguments.push(y(e,t))}),r}throw new Error(\"Case not supported: \"+e.kind)}function _(e){return e.name?e.name.text:e.text}function g(e){if(e.kind==v.SyntaxKind.Identifier)return e.text;var t=e;return g(t.left)+\".\"+g(t.right)}var v=n(97);t.tsm=n(159),t.helperMethodExtractor=n(157);var b=n(359),S=n(67),A=n(67),T=t.tsm.Matching.field();t.parseStruct=i,t.parseArg=p,t.buildType=y},function(e,t,n){var r=n(32);e.exports=function(e,t){return null==e?\"\":(e=String(e),r(e.charAt(0),t)+e.substr(1))}},function(e,t,n){\"use strict\";function r(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function i(e,t,n){if(e&&c.isObject(e)&&e instanceof r)return e;var i=new r;return i.parse(e,t,n),i}function a(e){return c.isString(e)&&(e=i(e)),e instanceof r?e.format():r.prototype.format.call(e)}function o(e,t){return i(e,!1,!0).resolve(t)}function s(e,t){return e?i(e,!1,!0).resolveObject(t):t}var u=n(303),c=n(361);t.parse=i,t.resolve=o,t.resolveObject=s,t.format=a,t.Url=r;var l=/^([a-z0-9.+-]+:)/i,p=/:[0-9]*$/,f=/^(\\/\\/?(?!\\/)[^\\?\\s]*)(\\?[^\\s]*)?$/,d=[\"<\",\">\",'\"',\"`\",\" \",\"\\r\",\"\\n\",\"\\t\"],m=[\"{\",\"}\",\"|\",\"\\\\\",\"^\",\"`\"].concat(d),h=[\"'\"].concat(m),y=[\"%\",\"/\",\"?\",\";\",\"#\"].concat(h),_=[\"/\",\"?\",\"#\"],g={javascript:!0,\"javascript:\":!0},v={javascript:!0,\"javascript:\":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,\"http:\":!0,\"https:\":!0,\"ftp:\":!0,\"gopher:\":!0,\"file:\":!0},S=n(308);r.prototype.parse=function(e,t,n){if(!c.isString(e))throw new TypeError(\"Parameter 'url' must be a string, not \"+typeof e);var r=e.indexOf(\"?\"),i=r!==-1&&r<e.indexOf(\"#\")?\"?\":\"#\",a=e.split(i);a[0]=a[0].replace(/\\\\/g,\"/\"),e=a.join(i);var o=e;if(o=o.trim(),!n&&1===e.split(\"#\").length){var s=f.exec(o);if(s)return this.path=o,this.href=o,this.pathname=s[1],s[2]?(this.search=s[2],this.query=t?S.parse(this.search.substr(1)):this.search.substr(1)):t&&(this.search=\"\",this.query={}),this}var p=l.exec(o);if(p){p=p[0];var d=p.toLowerCase();this.protocol=d,o=o.substr(p.length)}if(n||p||o.match(/^\\/\\/[^@\\/]+@[^@\\/]+/)){var m=\"//\"===o.substr(0,2);!m||p&&v[p]||(o=o.substr(2),this.slashes=!0)}if(!v[p]&&(m||p&&!b[p])){for(var A=-1,T=0;T<_.length;T++){var E=o.indexOf(_[T]);E!==-1&&(A===-1||E<A)&&(A=E)}var C,N;N=A===-1?o.lastIndexOf(\"@\"):o.lastIndexOf(\"@\",A),N!==-1&&(C=o.slice(0,N),o=o.slice(N+1),this.auth=decodeURIComponent(C)),A=-1;for(var T=0;T<y.length;T++){var E=o.indexOf(y[T]);E!==-1&&(A===-1||E<A)&&(A=E)}A===-1&&(A=o.length),this.host=o.slice(0,A),o=o.slice(A),this.parseHost(),this.hostname=this.hostname||\"\";var w=\"[\"===this.hostname[0]&&\"]\"===this.hostname[this.hostname.length-1];if(!w)for(var k=this.hostname.split(/\\./),T=0,x=k.length;T<x;T++){var R=k[T];if(R&&!R.match(/^[+a-z0-9A-Z_-]{0,63}$/)){for(var I=\"\",D=0,M=R.length;D<M;D++)I+=R.charCodeAt(D)>127?\"x\":R[D];if(!I.match(/^[+a-z0-9A-Z_-]{0,63}$/)){var P=k.slice(0,T),L=k.slice(T+1),O=R.match(/^([+a-z0-9A-Z_-]{0,63})(.*)$/);O&&(P.push(O[1]),L.unshift(O[2])),L.length&&(o=\"/\"+L.join(\".\")+o),this.hostname=P.join(\".\");break}}}this.hostname.length>255?this.hostname=\"\":this.hostname=this.hostname.toLowerCase(),w||(this.hostname=u.toASCII(this.hostname));var U=this.port?\":\"+this.port:\"\",F=this.hostname||\"\";this.host=F+U,this.href+=this.host,w&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),\"/\"!==o[0]&&(o=\"/\"+o))}if(!g[d])for(var T=0,x=h.length;T<x;T++){var B=h[T];if(o.indexOf(B)!==-1){var K=encodeURIComponent(B);K===B&&(K=escape(B)),o=o.split(B).join(K)}}var V=o.indexOf(\"#\");V!==-1&&(this.hash=o.substr(V),o=o.slice(0,V));var j=o.indexOf(\"?\");if(j!==-1?(this.search=o.substr(j),this.query=o.substr(j+1),t&&(this.query=S.parse(this.query)),o=o.slice(0,j)):t&&(this.search=\"\",this.query={}),o&&(this.pathname=o),b[d]&&this.hostname&&!this.pathname&&(this.pathname=\"/\"),this.pathname||this.search){var U=this.pathname||\"\",W=this.search||\"\";this.path=U+W}return this.href=this.format(),this},r.prototype.format=function(){var e=this.auth||\"\";e&&(e=encodeURIComponent(e),e=e.replace(/%3A/i,\":\"),e+=\"@\");var t=this.protocol||\"\",n=this.pathname||\"\",r=this.hash||\"\",i=!1,a=\"\";this.host?i=e+this.host:this.hostname&&(i=e+(this.hostname.indexOf(\":\")===-1?this.hostname:\"[\"+this.hostname+\"]\"),this.port&&(i+=\":\"+this.port)),this.query&&c.isObject(this.query)&&Object.keys(this.query).length&&(a=S.stringify(this.query));var o=this.search||a&&\"?\"+a||\"\";return t&&\":\"!==t.substr(-1)&&(t+=\":\"),this.slashes||(!t||b[t])&&i!==!1?(i=\"//\"+(i||\"\"),n&&\"/\"!==n.charAt(0)&&(n=\"/\"+n)):i||(i=\"\"),r&&\"#\"!==r.charAt(0)&&(r=\"#\"+r),o&&\"?\"!==o.charAt(0)&&(o=\"?\"+o),n=n.replace(/[?#]/g,function(e){return encodeURIComponent(e)}),o=o.replace(\"#\",\"%23\"),t+i+n+o+r},r.prototype.resolve=function(e){return this.resolveObject(i(e,!1,!0)).format()},r.prototype.resolveObject=function(e){if(c.isString(e)){var t=new r;t.parse(e,!1,!0),e=t}for(var n=new r,i=Object.keys(this),a=0;a<i.length;a++){var o=i[a];n[o]=this[o]}if(n.hash=e.hash,\"\"===e.href)return n.href=n.format(),n;if(e.slashes&&!e.protocol){for(var s=Object.keys(e),u=0;u<s.length;u++){var l=s[u];\"protocol\"!==l&&(n[l]=e[l])}return b[n.protocol]&&n.hostname&&!n.pathname&&(n.path=n.pathname=\"/\"),n.href=n.format(),n}if(e.protocol&&e.protocol!==n.protocol){if(!b[e.protocol]){for(var p=Object.keys(e),f=0;f<p.length;f++){var d=p[f];n[d]=e[d]}return n.href=n.format(),n}if(n.protocol=e.protocol,e.host||v[e.protocol])n.pathname=e.pathname;else{for(var m=(e.pathname||\"\").split(\"/\");m.length&&!(e.host=m.shift()););e.host||(e.host=\"\"),e.hostname||(e.hostname=\"\"),\"\"!==m[0]&&m.unshift(\"\"),m.length<2&&m.unshift(\"\"),n.pathname=m.join(\"/\")}if(n.search=e.search,n.query=e.query,n.host=e.host||\"\",n.auth=e.auth,n.hostname=e.hostname||e.host,n.port=e.port,n.pathname||n.search){var h=n.pathname||\"\",y=n.search||\"\";n.path=h+y}return n.slashes=n.slashes||e.slashes,n.href=n.format(),n}var _=n.pathname&&\"/\"===n.pathname.charAt(0),g=e.host||e.pathname&&\"/\"===e.pathname.charAt(0),S=g||_||n.host&&e.pathname,A=S,T=n.pathname&&n.pathname.split(\"/\")||[],m=e.pathname&&e.pathname.split(\"/\")||[],E=n.protocol&&!b[n.protocol];if(E&&(n.hostname=\"\",n.port=null,n.host&&(\"\"===T[0]?T[0]=n.host:T.unshift(n.host)),n.host=\"\",e.protocol&&(e.hostname=null,e.port=null,e.host&&(\"\"===m[0]?m[0]=e.host:m.unshift(e.host)),e.host=null),S=S&&(\"\"===m[0]||\"\"===T[0])),g)n.host=e.host||\"\"===e.host?e.host:n.host,n.hostname=e.hostname||\"\"===e.hostname?e.hostname:n.hostname,n.search=e.search,n.query=e.query,T=m;else if(m.length)T||(T=[]),T.pop(),T=T.concat(m),n.search=e.search,n.query=e.query;else if(!c.isNullOrUndefined(e.search)){if(E){n.hostname=n.host=T.shift();var C=!!(n.host&&n.host.indexOf(\"@\")>0)&&n.host.split(\"@\");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return n.search=e.search,n.query=e.query,c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:\"\")+(n.search?n.search:\"\")),n.href=n.format(),n}if(!T.length)return n.pathname=null,n.search?n.path=\"/\"+n.search:n.path=null,n.href=n.format(),n;for(var N=T.slice(-1)[0],w=(n.host||e.host||T.length>1)&&(\".\"===N||\"..\"===N)||\"\"===N,k=0,x=T.length;x>=0;x--)N=T[x],\".\"===N?T.splice(x,1):\"..\"===N?(T.splice(x,1),k++):k&&(T.splice(x,1),k--);if(!S&&!A)for(;k--;k)T.unshift(\"..\");!S||\"\"===T[0]||T[0]&&\"/\"===T[0].charAt(0)||T.unshift(\"\"),w&&\"/\"!==T.join(\"/\").substr(-1)&&T.push(\"\");var R=\"\"===T[0]||T[0]&&\"/\"===T[0].charAt(0);if(E){n.hostname=n.host=R?\"\":T.length?T.shift():\"\";var C=!!(n.host&&n.host.indexOf(\"@\")>0)&&n.host.split(\"@\");C&&(n.auth=C.shift(),n.host=n.hostname=C.shift())}return S=S||n.host&&T.length,S&&!R&&T.unshift(\"\"),T.length?n.pathname=T.join(\"/\"):(n.pathname=null,n.path=null),c.isNull(n.pathname)&&c.isNull(n.search)||(n.path=(n.pathname?n.pathname:\"\")+(n.search?n.search:\"\")),n.auth=e.auth||n.auth,n.slashes=n.slashes||e.slashes,n.href=n.format(),n},r.prototype.parseHost=function(){var e=this.host,t=p.exec(e);t&&(t=t[0],\":\"!==t&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)}},function(e,t,n){(function(){var t,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;r=n(12),t=n(37),e.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error(\"Missing CDATA text\");this.text=this.stringify.cdata(n)}return i(t,e),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<![CDATA[\"+this.text+\"]]>\",a&&(o+=r),o},t}(t)}).call(this)},function(e,t,n){(function(){var t,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;r=n(12),t=n(37),e.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error(\"Missing comment text\");this.text=this.stringify.comment(n)}return i(t,e),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<!-- \"+this.text+\" -->\",a&&(o+=r),o},t}(t)}).call(this)},function(e,t,n){(function(){var t,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;n(12),r=n(19),t=n(37),e.exports=function(e){function t(e,n,i,a){var o;t.__super__.constructor.call(this,e),r(n)&&(o=n,n=o.version,i=o.encoding,a=o.standalone),n||(n=\"1.0\"),this.version=this.stringify.xmlVersion(n),null!=i&&(this.encoding=this.stringify.xmlEncoding(i)),null!=a&&(this.standalone=this.stringify.xmlStandalone(a))}return i(t,e),t.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<?xml\",o+=' version=\"'+this.version+'\"',null!=this.encoding&&(o+=' encoding=\"'+this.encoding+'\"'),null!=this.standalone&&(o+=' standalone=\"'+this.standalone+'\"'),o+=\"?>\",a&&(o+=r),o},t}(t)}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,c;n(12),c=n(19),t=n(163),r=n(164),i=n(369),o=n(371),a=n(370),s=n(372),u=n(168),e.exports=function(){function e(e,t,n){var r,i;this.documentObject=e,this.stringify=this.documentObject.stringify,this.children=[],c(t)&&(r=t,t=r.pubID,n=r.sysID),null==n&&(i=[t,n],n=i[0],t=i[1]),null!=t&&(this.pubID=this.stringify.dtdPubID(t)),null!=n&&(this.sysID=this.stringify.dtdSysID(n))}return e.prototype.element=function(e,t){var n;return n=new a(this,e,t),this.children.push(n),this},e.prototype.attList=function(e,t,n,r,a){var o;return o=new i(this,e,t,n,r,a),this.children.push(o),this},e.prototype.entity=function(e,t){var n;return n=new o(this,!1,e,t),this.children.push(n),this},e.prototype.pEntity=function(e,t){var n;return n=new o(this,!0,e,t),this.children.push(n),this},e.prototype.notation=function(e,t){var n;return n=new s(this,e,t),this.children.push(n),this},e.prototype.cdata=function(e){var n;return n=new t(this,e),this.children.push(n),this},e.prototype.comment=function(e){var t;return t=new r(this,e),this.children.push(t),this},e.prototype.instruction=function(e,t){var n;return n=new u(this,e,t),this.children.push(n),this},e.prototype.root=function(){return this.documentObject.root()},e.prototype.document=function(){return this.documentObject},e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l,p,f,d,m;if(u=(null!=e?e.pretty:void 0)||!1,i=null!=(l=null!=e?e.indent:void 0)?l:\"  \",s=null!=(p=null!=e?e.offset:void 0)?p:0,o=null!=(f=null!=e?e.newline:void 0)?f:\"\\n\",t||(t=0),m=new Array(t+s+1).join(i),c=\"\",u&&(c+=m),c+=\"<!DOCTYPE \"+this.root().name,this.pubID&&this.sysID?c+=' PUBLIC \"'+this.pubID+'\" \"'+this.sysID+'\"':this.sysID&&(c+=' SYSTEM \"'+this.sysID+'\"'),this.children.length>0){for(c+=\" [\",u&&(c+=o),d=this.children,r=0,a=d.length;r<a;r++)n=d[r],c+=n.toString(e,t+1);c+=\"]\"}return c+=\">\",u&&(c+=o),c},e.prototype.ele=function(e,t){return this.element(e,t)},e.prototype.att=function(e,t,n,r,i){return this.attList(e,t,n,r,i)},e.prototype.ent=function(e,t){return this.entity(e,t)},e.prototype.pent=function(e,t){return this.pEntity(e,t)},e.prototype.not=function(e,t){return this.notation(e,t)},e.prototype.dat=function(e){return this.cdata(e)},e.prototype.com=function(e){return this.comment(e)},e.prototype.ins=function(e,t){return this.instruction(e,t)},e.prototype.up=function(){return this.root()},e.prototype.doc=function(){return this.document()},e}()}).call(this)},function(e,t,n){(function(){var t,r,i,a,o,s,u,c=function(e,t){function n(){this.constructor=e}for(var r in t)l.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},l={}.hasOwnProperty;a=n(12),u=n(19),s=n(58),o=n(280),r=n(37),t=n(367),i=n(168),e.exports=function(e){function n(e,t,r){if(n.__super__.constructor.call(this,e),null==t)throw new Error(\"Missing element name\");this.name=this.stringify.eleName(t),this.children=[],this.instructions=[],this.attributes={},null!=r&&this.attribute(r)}return c(n,e),n.prototype.clone=function(){var e,t,r,i,o,s,u,c;r=a(n.prototype,this),r.isRoot&&(r.documentObject=null),r.attributes={},u=this.attributes;for(t in u)l.call(u,t)&&(e=u[t],r.attributes[t]=e.clone());for(r.instructions=[],c=this.instructions,i=0,o=c.length;i<o;i++)s=c[i],r.instructions.push(s.clone());return r.children=[],this.children.forEach(function(e){var t;return t=e.clone(),t.parent=r,r.children.push(t)}),r},n.prototype.attribute=function(e,n){var r,i;if(null!=e&&(e=e.valueOf()),u(e))for(r in e)l.call(e,r)&&(i=e[r],this.attribute(r,i));else s(n)&&(n=n.apply()),this.options.skipNullAttributes&&null==n||(this.attributes[e]=new t(this,e,n));return this},n.prototype.removeAttribute=function(e){var t,n,r;if(null==e)throw new Error(\"Missing attribute name\");if(e=e.valueOf(),Array.isArray(e))for(n=0,r=e.length;n<r;n++)t=e[n],delete this.attributes[t];else delete this.attributes[e];return this},n.prototype.instruction=function(e,t){var n,r,a,o,c;if(null!=e&&(e=e.valueOf()),null!=t&&(t=t.valueOf()),Array.isArray(e))for(n=0,c=e.length;n<c;n++)r=e[n],this.instruction(r);else if(u(e))for(r in e)l.call(e,r)&&(a=e[r],this.instruction(r,a));else s(t)&&(t=t.apply()),o=new i(this,e,t),this.instructions.push(o);return this},n.prototype.toString=function(e,t){var n,r,i,a,s,u,c,p,f,d,m,h,y,_,g,v,b,S,A,T;for(h=(null!=e?e.pretty:void 0)||!1,a=null!=(_=null!=e?e.indent:void 0)?_:\"  \",m=null!=(g=null!=e?e.offset:void 0)?g:0,d=null!=(v=null!=e?e.newline:void 0)?v:\"\\n\",t||(t=0),T=new Array(t+m+1).join(a),y=\"\",b=this.instructions,i=0,c=b.length;i<c;i++)s=b[i],y+=s.toString(e,t);h&&(y+=T),y+=\"<\"+this.name,S=this.attributes;for(f in S)l.call(S,f)&&(n=S[f],y+=n.toString(e));if(0===this.children.length||o(this.children,function(e){return\"\"===e.value}))y+=\"/>\",h&&(y+=d);else if(h&&1===this.children.length&&null!=this.children[0].value)y+=\">\",y+=this.children[0].value,y+=\"</\"+this.name+\">\",y+=d;else{for(y+=\">\",h&&(y+=d),A=this.children,u=0,p=A.length;u<p;u++)r=A[u],y+=r.toString(e,t+1);h&&(y+=T),y+=\"</\"+this.name+\">\",h&&(y+=d)}return y},n.prototype.att=function(e,t){return this.attribute(e,t)},n.prototype.ins=function(e,t){return this.instruction(e,t)},n.prototype.a=function(e,t){return this.attribute(e,t)},n.prototype.i=function(e,t){return this.instruction(e,t)},n}(r)}).call(this)},function(e,t,n){(function(){var t;t=n(12),e.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error(\"Missing instruction target\");this.target=this.stringify.insTarget(t),n&&(this.value=this.stringify.insValue(n))}return e.prototype.clone=function(){return t(e.prototype,this)},e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<?\",o+=this.target,this.value&&(o+=\" \"+this.value),o+=\"?>\",a&&(o+=r),o},e}()}).call(this)},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){function r(){}var i=e.prototype;if(Object.create){var a=Object.create(t.prototype);i.__proto__=a}i instanceof t||(r.prototype=t.prototype,r=new r,n(i,r),e.prototype=i=r),i.constructor!=e&&(\"function\"!=typeof e&&console.error(\"unknow Class:\"+e),i.constructor=e)}function i(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,ie[e]),this.message=ie[e],Error.captureStackTrace&&Error.captureStackTrace(this,i);return n.code=e,t&&(this.message=this.message+\": \"+t),n}function a(){}function o(e,t){this._node=e,this._refresh=t,s(this)}function s(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);V(e,\"length\",r.length),n(r,e),e._inc=t}}function u(){}function c(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function l(e,t,n,r){if(r?t[c(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&g(i,e,r),_(i,e,n))}}function p(e,t,n){var r=c(t,n);if(!(r>=0))throw i(oe,new Error(e.tagName+\"@\"+n));for(var a=t.length-1;r<a;)t[r]=t[++r];if(t.length=a,e){var o=e.ownerDocument;o&&(g(o,e,n),n.ownerElement=null)}}function f(e){if(this._features={},e)for(var t in e)this._features=e[t]}function d(){}function m(e){return\"<\"==e&&\"&lt;\"||\">\"==e&&\"&gt;\"||\"&\"==e&&\"&amp;\"||'\"'==e&&\"&quot;\"||\"&#\"+e.charCodeAt()+\";\"}function h(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(h(e,t))return!0}while(e=e.nextSibling)}function y(){}function _(e,t,n){e&&e._inc++,\"http://www.w3.org/2000/xmlns/\"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:\"\"]=n.value)}function g(e,t,n,r){e&&e._inc++,\"http://www.w3.org/2000/xmlns/\"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:\"\"]}function v(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,a=0;i;)r[a++]=i,i=i.nextSibling;r.length=a}}}function b(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,v(e.ownerDocument,e),t}function S(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var i=t.firstChild;if(null==i)return t;var a=t.lastChild}else i=a=t;var o=n?n.previousSibling:e.lastChild;i.previousSibling=o,a.nextSibling=n,o?o.nextSibling=i:e.firstChild=i,null==n?e.lastChild=a:n.previousSibling=a;do{i.parentNode=e}while(i!==a&&(i=i.nextSibling));return v(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function A(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,v(e.ownerDocument,e,t),t}function T(){this._nsMap={}}function E(){}function C(){}function N(){}function w(){}function k(){}function x(){}function R(){}function I(){}function D(){}function M(){}function P(){}function L(){}function O(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,a=r.namespaceURI;if(a&&null==i){var i=r.lookupPrefix(a);if(null==i)var o=[{namespace:a,prefix:null}]}return F(this,n,e,t,o),n.join(\"\")}function U(e,t,n){var r=e.prefix||\"\",i=e.namespaceURI;if(!r&&!i)return!1;if(\"xml\"===r&&\"http://www.w3.org/XML/1998/namespace\"===i||\"http://www.w3.org/2000/xmlns/\"==i)return!1;for(var a=n.length;a--;){var o=n[a];if(o.prefix==r)return o.namespace!=i}return!0}function F(e,t,n,r,i){if(r){if(!(e=r(e)))return;if(\"string\"==typeof e)return void t.push(e)}switch(e.nodeType){case z:i||(i=[]);var a=(i.length,e.attributes),o=a.length,s=e.firstChild,u=e.tagName;n=W===e.namespaceURI||n,t.push(\"<\",u);for(var c=0;c<o;c++){var l=a.item(c);\"xmlns\"==l.prefix?i.push({prefix:l.localName,namespace:l.value}):\"xmlns\"==l.nodeName&&i.push({prefix:\"\",namespace:l.value})}for(var c=0;c<o;c++){var l=a.item(c);if(U(l,n,i)){var p=l.prefix||\"\",f=l.namespaceURI,d=p?\" xmlns:\"+p:\" xmlns\";t.push(d,'=\"',f,'\"'),i.push({prefix:p,namespace:f})}F(l,t,n,r,i)}if(U(e,n,i)){var p=e.prefix||\"\",f=e.namespaceURI,d=p?\" xmlns:\"+p:\" xmlns\";t.push(d,'=\"',f,'\"'),i.push({prefix:p,namespace:f})}if(s||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(u)){if(t.push(\">\"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,i),s=s.nextSibling;else for(;s;)F(s,t,n,r,i),s=s.nextSibling;t.push(\"</\",u,\">\")}else t.push(\"/>\");return;case Z:case te:for(var s=e.firstChild;s;)F(s,t,n,r,i),s=s.nextSibling;return;case H:return t.push(\" \",e.name,'=\"',e.value.replace(/[<&\"]/g,m),'\"');case Y:return t.push(e.data.replace(/[<&]/g,m));case J:return t.push(\"<![CDATA[\",e.data,\"]]>\");case Q:return t.push(\"<!--\",e.data,\"-->\");case ee:var h=e.publicId,y=e.systemId;if(t.push(\"<!DOCTYPE \",e.name),h)t.push(' PUBLIC \"',h),y&&\".\"!=y&&t.push('\" \"',y),t.push('\">');else if(y&&\".\"!=y)t.push(' SYSTEM \"',y,'\">');else{var _=e.internalSubset;_&&t.push(\" [\",_,\"]\"),t.push(\">\")}return;case $:return t.push(\"<?\",e.target,\" \",e.data,\"?>\");case G:return t.push(\"&\",e.nodeName,\";\");default:t.push(\"??\",e.nodeName)}}function B(e,t,n){var r;switch(t.nodeType){case z:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case H:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var i=t.firstChild;i;)r.appendChild(B(e,i,n)),i=i.nextSibling;return r}function K(e,t,n){var r=new t.constructor;for(var i in t){var o=t[i];\"object\"!=typeof o&&o!=r[i]&&(r[i]=o)}switch(t.childNodes&&(r.childNodes=new a),r.ownerDocument=e,r.nodeType){case z:var s=t.attributes,c=r.attributes=new u,l=s.length;c._ownerElement=r;for(var p=0;p<l;p++)r.setAttributeNode(K(e,s.item(p),!0));break;case H:n=!0}if(n)for(var f=t.firstChild;f;)r.appendChild(K(e,f,n)),f=f.nextSibling;return r}function V(e,t,n){e[t]=n}function j(e){switch(e.nodeType){case z:case te:var t=[];for(e=e.firstChild;e;)7!==e.nodeType&&8!==e.nodeType&&t.push(j(e)),e=e.nextSibling;return t.join(\"\");default:return e.nodeValue}}var W=\"http://www.w3.org/1999/xhtml\",q={},z=q.ELEMENT_NODE=1,H=q.ATTRIBUTE_NODE=2,Y=q.TEXT_NODE=3,J=q.CDATA_SECTION_NODE=4,G=q.ENTITY_REFERENCE_NODE=5,X=q.ENTITY_NODE=6,$=q.PROCESSING_INSTRUCTION_NODE=7,Q=q.COMMENT_NODE=8,Z=q.DOCUMENT_NODE=9,ee=q.DOCUMENT_TYPE_NODE=10,te=q.DOCUMENT_FRAGMENT_NODE=11,ne=q.NOTATION_NODE=12,re={},ie={},ae=(re.INDEX_SIZE_ERR=(ie[1]=\"Index size error\",1),re.DOMSTRING_SIZE_ERR=(ie[2]=\"DOMString size error\",2),re.HIERARCHY_REQUEST_ERR=(ie[3]=\"Hierarchy request error\",3)),oe=(re.WRONG_DOCUMENT_ERR=(ie[4]=\"Wrong document\",4),re.INVALID_CHARACTER_ERR=(ie[5]=\"Invalid character\",5),re.NO_DATA_ALLOWED_ERR=(ie[6]=\"No data allowed\",6),re.NO_MODIFICATION_ALLOWED_ERR=(ie[7]=\"No modification allowed\",7),re.NOT_FOUND_ERR=(ie[8]=\"Not found\",8)),se=(re.NOT_SUPPORTED_ERR=(ie[9]=\"Not supported\",9),re.INUSE_ATTRIBUTE_ERR=(ie[10]=\"Attribute in use\",10));re.INVALID_STATE_ERR=(ie[11]=\"Invalid state\",11),re.SYNTAX_ERR=(ie[12]=\"Syntax error\",12),re.INVALID_MODIFICATION_ERR=(ie[13]=\"Invalid modification\",13),re.NAMESPACE_ERR=(ie[14]=\"Invalid namespace\",14),re.INVALID_ACCESS_ERR=(ie[15]=\"Invalid access\",15);i.prototype=Error.prototype,n(re,i),a.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)F(this[r],n,e,t);return n.join(\"\")}},o.prototype.item=function(e){return s(this),this[e]},r(o,a),u.prototype={length:0,item:a.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new i(se);var n=this.getNamedItem(e.nodeName);return l(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new i(se);return t=this.getNamedItemNS(e.namespaceURI,e.localName),l(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return p(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return p(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},f.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new y;if(r.implementation=this,r.childNodes=new a,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new x;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},d.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return S(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return b(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return K(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==Y&&e.nodeType==Y?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==H?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==H?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(q,d),n(q,d.prototype),y.prototype={nodeName:\"#document\",nodeType:Z,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==z&&(this.documentElement=e),S(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),b(this,e)},importNode:function(e,t){return B(this,e,t)},getElementById:function(e){var t=null;return h(this.documentElement,function(n){if(n.nodeType==z&&n.getAttribute(\"id\")==e)return t=n,!0}),t},createElement:function(e){var t=new T;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new a,(t.attributes=new u)._ownerElement=t,t},createDocumentFragment:function(){var e=new M;return e.ownerDocument=this,e.childNodes=new a,e},createTextNode:function(e){var t=new N;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new w;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new k;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new P;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new E;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new D;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new T,r=t.split(\":\"),i=n.attributes=new u;return n.childNodes=new a,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new E,r=t.split(\":\");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(y,d),T.prototype={nodeType:z,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||\"\"},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=\"\"+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):A(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||\"\"},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=\"\"+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new o(this,function(t){var n=[];return h(t,function(r){r===t||r.nodeType!=z||\"*\"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new o(this,function(n){var r=[];return h(n,function(i){i===n||i.nodeType!==z||\"*\"!==e&&i.namespaceURI!==e||\"*\"!==t&&i.localName!=t||r.push(i)}),r})}},y.prototype.getElementsByTagName=T.prototype.getElementsByTagName,y.prototype.getElementsByTagNameNS=T.prototype.getElementsByTagNameNS,r(T,d),E.prototype.nodeType=H,r(E,d),C.prototype={data:\"\",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(ie[ae])},deleteData:function(e,t){this.replaceData(e,t,\"\")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(C,d),N.prototype={nodeName:\"#text\",nodeType:Y,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(N,C),w.prototype={nodeName:\"#comment\",nodeType:Q},r(w,C),k.prototype={nodeName:\"#cdata-section\",nodeType:J},r(k,C),x.prototype.nodeType=ee,r(x,d),R.prototype.nodeType=ne,r(R,d),I.prototype.nodeType=X,r(I,d),D.prototype.nodeType=G,r(D,d),M.prototype.nodeName=\"#document-fragment\",M.prototype.nodeType=te,r(M,d),P.prototype.nodeType=$,r(P,d),L.prototype.serializeToString=function(e,t,n){return O.call(e,t,n)},d.prototype.toString=O;try{Object.defineProperty&&(Object.defineProperty(o.prototype,\"length\",{get:function(){return s(this),this.$$length}}),Object.defineProperty(d.prototype,\"textContent\",{get:function(){return j(this)},set:function(e){switch(this.nodeType){case z:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),V=function(e,t,n){e[\"$$\"+t]=n})}catch(e){}t.DOMImplementation=f,t.XMLSerializer=L},function(e,t,n){\"use strict\";var r=n(49),i=new r({include:[n(100)],explicit:[n(389),n(388)]});r.DEFAULT=i,e.exports=i},function(e,t,n){\"use strict\";function r(e,t){return h.load(e,t)}function i(e,t){return h.loadSync(e,t)}function a(e,t,n){return h.loadApi(e,t,n).getOrElse(null)}function o(e,t,n){return h.loadApi(e,t,n).getOrElse(null)}function s(e,t,n){return{fsResolver:{content:function(r){return r===(n||y.resolve(\"/\",\"#local.raml\")).replace(/\\\\/,\"/\")?e:t&&t.fsResolver?t.fsResolver.content(r):void 0},contentAsync:function(r){return r===(n||y.resolve(\"/\",\"#local.raml\")).replace(/\\\\/,\"/\")?Promise.resolve(e):t&&t.fsResolver?t.fsResolver.contentAsync(r):void 0}},httpResolver:t?t.httpResolver:null,rejectOnErrors:!!t&&t.rejectOnErrors,attributeDefaults:!t||t.attributeDefaults}}function u(e,t){var n=null;return t&&t.filePath&&(n=t.filePath),h.loadApi(n||\"/#local.raml\",[],s(e,t,n)).getOrElse(null)}function c(e,t){var n=null;return t&&t.filePath&&(n=t.filePath),h.loadApiAsync(n||\"/#local.raml\",[],s(e,t,n))}function l(e,t,n){return h.loadApiAsync(e,t,n)}function p(e,t,n){return h.loadRAMLAsync(e,t,n)}function f(e){return h.getLanguageElementByRuntimeType(e)}function d(e){return t.api10.isFragment(e)}function m(e){return t.api10.asFragment(e)}var h=n(85),y=n(11),_=n(295);t.api10=n(87),t.api08=n(313),t.load=r,t.loadSync=i,t.loadApiSync=a,t.loadRAMLSync=o,t.parseRAMLSync=u,t.parseRAML=c,t.loadApi=l,t.loadRAML=p,t.getLanguageElementByRuntimeType=f,t.isFragment=d,t.asFragment=m,t.hl=n(24),t.ll=n(20),t.search=n(21),t.stubs=n(322),t.utils=n(146),t.project=n(312),t.universeHelpers=n(5),t.ds=n(0),t.schema=n(320),t.universes=t.ds.universesInfo,t.parser=n(310),t.expander=n(309),t.wrapperHelper=n(329),\"undefined\"==typeof Promise&&\"undefined\"!=typeof window&&(window.Promise=_)},function(e,t){var n=function(){function e(e){}return e.prototype.validate=function(e,t){return[]},e}();t.XMLValidator=n},function(e,t,n){\"use strict\";function r(){if(u.length)throw u.shift()}function i(e){var t;t=s.length?s.pop():new a,t.task=e,o(t)}function a(){this.task=null}var o=n(101),s=[],u=[],c=o.makeRequestCallFromTimer(r);e.exports=i,a.prototype.call=function(){try{this.task.call()}catch(e){i.onerror?i.onerror(e):(u.push(e),c())}finally{this.task=null,s[s.length]=this}}},function(e,t,n){\"use strict\";function r(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");return\"=\"===e[t-2]?2:\"=\"===e[t-1]?1:0}function i(e){return 3*e.length/4-r(e)}function a(e){var t,n,i,a,o,s,u=e.length;o=r(e),s=new p(3*u/4-o),i=o>0?u-4:u;var c=0;for(t=0,n=0;t<i;t+=4,n+=3)a=l[e.charCodeAt(t)]<<18|l[e.charCodeAt(t+1)]<<12|l[e.charCodeAt(t+2)]<<6|l[e.charCodeAt(t+3)],s[c++]=a>>16&255,s[c++]=a>>8&255,s[c++]=255&a;return 2===o?(a=l[e.charCodeAt(t)]<<2|l[e.charCodeAt(t+1)]>>4,s[c++]=255&a):1===o&&(a=l[e.charCodeAt(t)]<<10|l[e.charCodeAt(t+1)]<<4|l[e.charCodeAt(t+2)]>>2,s[c++]=a>>8&255,s[c++]=255&a),s}function o(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function s(e,t,n){for(var r,i=[],a=t;a<n;a+=3)r=(e[a]<<16)+(e[a+1]<<8)+e[a+2],i.push(o(r));return i.join(\"\")}function u(e){for(var t,n=e.length,r=n%3,i=\"\",a=[],o=0,u=n-r;o<u;o+=16383)a.push(s(e,o,o+16383>u?u:o+16383));return 1===r?(t=e[n-1],i+=c[t>>2],i+=c[t<<4&63],i+=\"==\"):2===r&&(t=(e[n-2]<<8)+e[n-1],i+=c[t>>10],i+=c[t>>4&63],i+=c[t<<2&63],i+=\"=\"),a.push(i),a.join(\"\")}t.byteLength=i,t.toByteArray=a,t.fromByteArray=u;for(var c=[],l=[],p=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,f=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",d=0,m=f.length;d<m;++d)c[d]=f[d],l[f.charCodeAt(d)]=d;l[\"-\".charCodeAt(0)]=62,l[\"_\".charCodeAt(0)]=63},function(e,t,n){(function(t){function n(e){return e.replace(/=/g,\"\").replace(/\\+/g,\"-\").replace(/\\//g,\"_\")}function r(e){return t.isBuffer(e)&&(e=e.toString()),i(e).replace(/\\-/g,\"+\").replace(/_/g,\"/\")}function i(e){var n=e.length,r=e.length%4;if(!r)return e;var i=n,a=4-r,o=n+a,s=t(o);for(s.write(e);a--;)s.write(\"=\",i++);return s.toString()}function a(e,n){return t(r(e),\"base64\").toString(n)}function o(e,r){return n(t(e,r).toString(\"base64\"))}function s(e){return t(r(e),\"base64\")}o.toBase64=r,o.fromBase64=n,o.decode=a,o.encode=o,o.toBuffer=s,e.exports=o}).call(t,n(16).Buffer)},function(e,t,n){(function(t){function r(e,t){if(!(this instanceof r))return new r(e,t);\"function\"==typeof e&&(t=e,e={}),e||(e={});var n=e.encoding,i=!1;n?\"u8\"!==(n=String(n).toLowerCase())&&\"uint8\"!==n||(n=\"uint8array\"):i=!0,l.call(this,{objectMode:!0}),this.encoding=n,this.shouldInferEncoding=i,t&&this.on(\"finish\",function(){t(this.getBody())}),this.body=[]}function i(e){return/Array\\]$/.test(Object.prototype.toString.call(e))}function a(e){return\"string\"==typeof e||i(e)||e&&\"function\"==typeof e.subarray}function o(e){for(var n=[],r=0;r<e.length;r++){var i=e[r];\"string\"==typeof i?n.push(i):t.isBuffer(i)?n.push(i):a(i)?n.push(new t(i)):n.push(new t(String(i)))}return t.isBuffer(e[0])?(n=t.concat(n),n=n.toString(\"utf8\")):n=n.join(\"\"),n}function s(e){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.isBuffer(i)?n.push(i):a(i)?n.push(new t(i)):n.push(new t(String(i)))}return t.concat(n)}function u(e){for(var t=[],n=0;n<e.length;n++)t.push.apply(t,e[n]);return t}function c(e){for(var n=0,r=0;r<e.length;r++)\"string\"==typeof e[r]&&(e[r]=new t(e[r])),n+=e[r].length;for(var i=new f(n),r=0,a=0;r<e.length;r++)for(var o=e[r],s=0;s<o.length;s++)i[a++]=o[s];return i}var l=n(155).Writable,p=n(26);if(\"undefined\"==typeof Uint8Array)var f=n(360).Uint8Array;else var f=Uint8Array;e.exports=r,p(r,l),r.prototype._write=function(e,t,n){this.body.push(e),n()},r.prototype.inferEncoding=function(e){var n=void 0===e?this.body[0]:e;return t.isBuffer(n)?\"buffer\":\"undefined\"!=typeof Uint8Array&&n instanceof Uint8Array?\"uint8array\":Array.isArray(n)?\"array\":\"string\"==typeof n?\"string\":\"[object Object]\"===Object.prototype.toString.call(n)?\"object\":\"buffer\"},r.prototype.getBody=function(){return this.encoding||0!==this.body.length?(this.shouldInferEncoding&&(this.encoding=this.inferEncoding()),\"array\"===this.encoding?u(this.body):\"string\"===this.encoding?o(this.body):\"buffer\"===this.encoding?s(this.body):\"uint8array\"===this.encoding?c(this.body):this.body):[]};Array.isArray}).call(t,n(16).Buffer)},function(e,t,n){var r=n(32),i=n(156);e.exports=function(e,t){return r(i(e,t),t)}},function(e,t,n){function r(e){return n(i(e))}function i(e){var t=a[e];if(!(t+1))throw new Error(\"Cannot find module '\"+e+\"'.\");return t}var a={\"./ar\":103,\"./ar.js\":103,\"./bn\":104,\"./bn.js\":104,\"./de\":105,\"./de.js\":105,\"./es\":106,\"./es.js\":106,\"./fr\":107,\"./fr.js\":107,\"./hi\":108,\"./hi.js\":108,\"./it\":109,\"./it.js\":109,\"./ja\":110,\"./ja.js\":110,\"./ko\":111,\"./ko.js\":111,\"./pt\":112,\"./pt.js\":112,\"./ru\":113,\"./ru.js\":113,\"./zh-cn\":114,\"./zh-cn.js\":114,\"./zh-tw\":115,\"./zh-tw.js\":115};r.keys=function(){return Object.keys(a)},r.resolve=i,e.exports=r,r.id=178},function(e,t,n){var r=n(31);e.exports=function(e,t){return r(e,t,\".\")}},function(e,t){t.read=function(e,t,n,r,i){var a,o,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,p=n?i-1:0,f=n?-1:1,d=e[t+p];for(p+=f,a=d&(1<<-l)-1,d>>=-l,l+=s;l>0;a=256*a+e[t+p],p+=f,l-=8);for(o=a&(1<<-l)-1,a>>=-l,l+=r;l>0;o=256*o+e[t+p],p+=f,l-=8);if(0===a)a=1-c;else{if(a===u)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),a-=c}return(d?-1:1)*o*Math.pow(2,a-r)},t.write=function(e,t,n,r,i,a){var o,s,u,c=8*a-i-1,l=(1<<c)-1,p=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:a-1,m=r?1:-1,h=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),t+=o+p>=1?f/u:f*Math.pow(2,1-p),t*u>=2&&(o++,u/=2),o+p>=l?(s=0,o=l):o+p>=1?(s=(t*u-1)*Math.pow(2,i),o+=p):(s=t*Math.pow(2,p-1)*Math.pow(2,i),o=0));i>=8;e[n+d]=255&s,d+=m,s/=256,i-=8);for(o=o<<i|s,c+=i;c>0;e[n+d]=255&o,d+=m,o/=256,c-=8);e[n+d-m]|=128*h}},function(e,t){var n=[].indexOf;e.exports=function(e,t){if(n)return e.indexOf(t);for(var r=0;r<e.length;++r)if(e[r]===t)return r;return-1}},function(e,t,n){\"use strict\";(function(t){var n=function(e,n,r,i,a,o,s,u){if(\"production\"!==t.env.NODE_ENV&&void 0===n)throw new Error(\"invariant requires an error message argument\");if(!e){var c;if(void 0===n)c=new Error(\"Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.\");else{var l=[r,i,a,o,s,u],p=0;c=new Error(n.replace(/%s/g,function(){return l[p++]})),c.name=\"Invariant Violation\"}throw c.framesToPop=1,c}};e.exports=n}).call(t,n(23))},function(e,t,n){var r=n(45);e.exports=function(e,t){return r(e,t)===e}},function(e,t,n){var r=n(32);e.exports=function(e,t){return r(e,t)===e}},function(e,t,n){t.parse=n(186),t.stringify=n(187)},function(e,t){var n,r,i,a,o={'\"':'\"',\"\\\\\":\"\\\\\",\"/\":\"/\",b:\"\\b\",f:\"\\f\",n:\"\\n\",r:\"\\r\",t:\"\\t\"},s=function(e){throw{name:\"SyntaxError\",message:e,at:n,text:i}},u=function(e){return e&&e!==r&&s(\"Expected '\"+e+\"' instead of '\"+r+\"'\"),r=i.charAt(n),n+=1,r},c=function(){var e,t=\"\";for(\"-\"===r&&(t=\"-\",u(\"-\"));r>=\"0\"&&r<=\"9\";)t+=r,u();if(\".\"===r)for(t+=\".\";u()&&r>=\"0\"&&r<=\"9\";)t+=r;if(\"e\"===r||\"E\"===r)for(t+=r,u(),\"-\"!==r&&\"+\"!==r||(t+=r,u());r>=\"0\"&&r<=\"9\";)t+=r,u();if(e=+t,isFinite(e))return e;s(\"Bad number\")},l=function(){var e,t,n,i=\"\";if('\"'===r)for(;u();){if('\"'===r)return u(),i;if(\"\\\\\"===r)if(u(),\"u\"===r){for(n=0,t=0;t<4&&(e=parseInt(u(),16),isFinite(e));t+=1)n=16*n+e;i+=String.fromCharCode(n)}else{if(\"string\"!=typeof o[r])break;i+=o[r]}else i+=r}s(\"Bad string\")},p=function(){for(;r&&r<=\" \";)u()},f=function(){switch(r){case\"t\":return u(\"t\"),u(\"r\"),u(\"u\"),u(\"e\"),!0;case\"f\":return u(\"f\"),u(\"a\"),u(\"l\"),u(\"s\"),u(\"e\"),!1;case\"n\":return u(\"n\"),u(\"u\"),u(\"l\"),u(\"l\"),null}s(\"Unexpected '\"+r+\"'\")},d=function(){var e=[];if(\"[\"===r){if(u(\"[\"),p(),\"]\"===r)return u(\"]\"),e;for(;r;){if(e.push(a()),p(),\"]\"===r)return u(\"]\"),e;u(\",\"),p()}}s(\"Bad array\")},m=function(){var e,t={};if(\"{\"===r){if(u(\"{\"),p(),\"}\"===r)return u(\"}\"),t;for(;r;){if(e=l(),p(),u(\":\"),Object.hasOwnProperty.call(t,e)&&s('Duplicate key \"'+e+'\"'),t[e]=a(),p(),\"}\"===r)return u(\"}\"),t;u(\",\"),p()}}s(\"Bad object\")};a=function(){switch(p(),r){case\"{\":return m();case\"[\":return d();case'\"':return l();case\"-\":return c();default:return r>=\"0\"&&r<=\"9\"?c():f()}},e.exports=function(e,t){var o;return i=e,n=0,r=\" \",o=a(),p(),r&&s(\"Syntax error\"),\"function\"==typeof t?function e(n,r){var i,a,o=n[r];if(o&&\"object\"==typeof o)for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(a=e(o,i),void 0!==a?o[i]=a:delete o[i]);return t.call(n,r,o)}({\"\":o},\"\"):o}},function(e,t){function n(e){return s.lastIndex=0,s.test(e)?'\"'+e.replace(s,function(e){var t=u[e];return\"string\"==typeof t?t:\"\\\\u\"+(\"0000\"+e.charCodeAt(0).toString(16)).slice(-4)})+'\"':'\"'+e+'\"'}function r(e,t){var s,u,c,l,p,f=i,d=t[e];switch(d&&\"object\"==typeof d&&\"function\"==typeof d.toJSON&&(d=d.toJSON(e)),\"function\"==typeof o&&(d=o.call(t,e,d)),typeof d){case\"string\":return n(d);case\"number\":return isFinite(d)?String(d):\"null\";case\"boolean\":case\"null\":return String(d);case\"object\":if(!d)return\"null\";if(i+=a,p=[],\"[object Array]\"===Object.prototype.toString.apply(d)){for(l=d.length,s=0;s<l;s+=1)p[s]=r(s,d)||\"null\";return c=0===p.length?\"[]\":i?\"[\\n\"+i+p.join(\",\\n\"+i)+\"\\n\"+f+\"]\":\"[\"+p.join(\",\")+\"]\",i=f,c}if(o&&\"object\"==typeof o)for(l=o.length,s=0;s<l;s+=1)\"string\"==typeof(u=o[s])&&(c=r(u,d))&&p.push(n(u)+(i?\": \":\":\")+c);else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=r(u,d))&&p.push(n(u)+(i?\": \":\":\")+c);return c=0===p.length?\"{}\":i?\"{\\n\"+i+p.join(\",\\n\"+i)+\"\\n\"+f+\"}\":\"{\"+p.join(\",\")+\"}\",i=f,c}}var i,a,o,s=/[\\\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g,u={\"\\b\":\"\\\\b\",\"\\t\":\"\\\\t\",\"\\n\":\"\\\\n\",\"\\f\":\"\\\\f\",\"\\r\":\"\\\\r\",'\"':'\\\\\"',\"\\\\\":\"\\\\\\\\\"};e.exports=function(e,t,n){var s;if(i=\"\",a=\"\",\"number\"==typeof n)for(s=0;s<n;s+=1)a+=\" \";else\"string\"==typeof n&&(a=n);if(o=t,t&&\"function\"!=typeof t&&(\"object\"!=typeof t||\"number\"!=typeof t.length))throw new Error(\"JSON.stringify\");return r(\"\",{\"\":e})}},function(e,t,n){var r;void 0!==(r=function(){\"use strict\";var e=n(192),t={},r={},i=n(190),a=n(189),o=n(191);return e.forEach(function(e){var n,i=parseInt(e.code,10);i.toString()===e.code&&(n=e.phrase.toUpperCase().replace(/[^A-Z]/g,\"_\"),t[i]=e.phrase,r[n]=e.code)}),{statusCodes:e,statusCodesToPhrases:t,statusPhrasesToCodes:r,methods:i,headers:a,relations:o}}.call(t,n,t,e))&&(e.exports=r)},function(e,t){e.exports=[{header:\"Content-Encoding\",description:'\"indicates what content codings have been applied to the representation, beyond those inherent in the media type, and thus what decoding mechanisms have to be applied in order to obtain data in the media type referenced by the Content-Type header field.\"',spec_title:\"RFC7231#3.1.2.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-3.1.2.2\"},{header:\"Content-Language\",description:'\"describes the natural language(s) of the intended audience for the representation.\"',spec_title:\"RFC7231#3.1.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-3.1.3.2\"},{header:\"Content-Location\",description:'\"references a URI that can be used as an identifier for a specific resource corresponding to the representation in this message\\'s payload.\"',spec_title:\"RFC7231#3.1.4.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-3.1.4.2\"},{header:\"Content-Type\",description:'\"indicates the media type of the associated representation: either the representation enclosed in the message payload or the selected representation, as determined by the message semantics.\"',spec_title:\"RFC7231#3.1.1.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-3.1.1.5\"},{header:\"Content-Length\",description:'\"can provide the anticipated size, as a decimal number of octets, for a potential payload body.\"',spec_title:\"RFC7230#3.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7230#section-3.3.2\"},{header:\"Content-Range\",description:'\"is sent in a single part 206 (Partial Content) response to indicate the partial range of the selected representation enclosed as the message payload, sent in each part of a multipart 206 response to indicate the range enclosed within each body part, and sent in 416 (Range Not Satisfiable) responses to provide information about the selected representation.\"',spec_title:\"RFC7233#4.2\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-4.2\"},{header:\"Transfer-Encoding\",description:'\"lists the transfer coding names corresponding to the sequence of transfer codings that have been (or will be) applied to the payload body in order to form the message body.\"',spec_title:\"RFC7230#3.3.1\",spec_href:\"http://tools.ietf.org/html/rfc7230#section-3.3.1\"},{header:\"Cache-Control\",description:'\"is used to specify directives for caches along the request/response chain.\"',spec_title:\"RFC7234#7.2\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-7.2\"},{header:\"Expect\",description:'\"is used to indicate that particular server behaviors are required by the client.\"',spec_title:\"RFC7231#5.1.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.1.1\"},{header:\"Host\",description:'\"provides the host and port information from the target URI, enabling the origin server to distinguish among resources while servicing requests for multiple host names on a single IP address.\"',spec_title:\"RFC7230#5.4\",spec_href:\"http://tools.ietf.org/html/rfc7230#section-5.4\"},{header:\"Max-Forwards\",description:'\"provides a mechanism with the TRACE and OPTIONS methods to limit the number of times that the request is forwarded by proxies.\"',spec_title:\"RFC7231#5.1.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.1.2\"},{header:\"Pragma\",description:'\"allows backwards compatibility with HTTP/1.0 caches, so that clients can specify a \"no-cache\" request that they will understand (as Cache-Control was not defined until HTTP/1.1).\"',spec_title:\"RFC7234#7.4\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-7.4\"},{header:\"Range\",description:'\"modifies the method semantics to request transfer of only one or more subranges of the selected representation data, rather than the entire selected representation data.\"',spec_title:\"RFC7233#3.1\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-3.1\"},{header:\"TE\",description:'\"indicates what transfer codings, besides chunked, the client is willing to accept in response, and whether or not the client is willing to accept trailer fields in a chunked transfer coding.\"',spec_title:\"RFC7230#4.3\",spec_href:\"http://tools.ietf.org/html/rfc7230#section-4.3\"},{header:\"If-Match\",description:'\"can be used to make a request method conditional on the current existence or value of an entity-tag for one or more representations of the target resource.\"',spec_title:\"RFC7232#3.1\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-3.1\"},{header:\"If-Modified-Since\",description:'\"can be used with GET or HEAD to make the method conditional by modification date: if the selected representation has not been modified since the time specified in this field, then do not perform the request method; instead, respond as detailed below.\"',spec_title:\"RFC7232#3.3\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-3.3\"},{header:\"If-None-Match\",description:'\"can be used to make a request method conditional on not matching any of the current entity-tag values for representations of the target resource.\"',spec_title:\"RFC7232#3.2\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-3.2\"},{header:\"If-Range\",description:'\"Informally, its meaning is: if the representation is unchanged, send me the part(s) that I am requesting in Range; otherwise, send me the entire representation.\"',spec_title:\"RFC7233#3.2\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-3.2\"},{header:\"If-Unmodified-Since\",description:'\"can be used to make a request method conditional by modification date: if the selected representation has been modified since the time specified in this field, then the server MUST NOT perform the requested operation and MUST instead respond with the 412 (Precondition Failed) status code.\"',spec_title:\"RFC7232#3.4\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-3.4\"},{header:\"Accept\",description:'\"can be used to specify certain media types which are acceptable for the response.\"',spec_title:\"RFC7231#5.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.3.2\"},{header:\"Accept-Charset\",description:'\"can be sent by a user agent to indicate what charsets are acceptable in textual response content.\"',spec_title:\"RFC7231#5.3.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.3.3\"},{header:\"Accept-Encoding\",description:'\"can be used by user agents to indicate what response content-codings are acceptable in the response.\"',spec_title:\"RFC7231#5.3.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.3.4\"},{header:\"Accept-Language\",description:'\"can be used by user agents to indicate the set of natural languages that are preferred in the response.\"',spec_title:\"RFC7231#5.3.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.3.5\"},{header:\"Authorization\",description:'\"allows a user agent to authenticate itself with a server -- usually, but not necessarily, after receiving a 401 (Unauthorized) response.\"',spec_title:\"RFC7235#4.1\",spec_href:\"http://tools.ietf.org/html/rfc7235#section-4.1\"},{header:\"Proxy-Authorization\",description:'\"allows the client to identify itself (or its user) to a proxy that requires authentication.\"',spec_title:\"RFC7235#4.3\",spec_href:\"http://tools.ietf.org/html/rfc7235#section-4.3\"},{header:\"DNT\",description:'\"defined as the means for expressing a user\\'s tracking preference via HTTP.\"',spec_title:\"Tracking Preference Expression (DNT)\",spec_href:\"http://www.w3.org/TR/tracking-dnt/#dnt-header-field\"},{header:\"From\",description:'\"contains an Internet email address for a human user who controls the requesting user agent.\"',spec_title:\"RFC7231#5.5.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.5.1\"},{header:\"Referer\",description:'\"allows the user agent to specify a URI reference for the resource from which the target URI was obtained (i.e., the \"referrer\", though the field name is misspelled).\"',spec_title:\"RFC7231#5.5.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.5.2\"},{header:\"User-Agent\",description:'\"contains information about the user agent originating the request, which is often used by servers to help identify the scope of reported interoperability problems, to work around or tailor responses to avoid particular user agent limitations, and for analytics regarding browser or operating system use.\"',spec_title:\"RFC7231#5.5.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-5.5.3\"},{header:\"Age\",description:'\"conveys the sender\\'s estimate of the amount of time since the response was generated or successfully validated at the origin server.\"',spec_title:\"RFC7234#5.1\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-5.1\"},{header:\"Cache-Control\",description:'\"is used to specify directives for caches along the request/response chain.\"',spec_title:\"RFC7234#7.2\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-7.2\"},{header:\"Expires\",description:'\"gives the date/time after which the response is considered stale.\"',spec_title:\"RFC7234#7.3\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-7.3\"},{header:\"Date\",description:'\"represents the date and time at which the message was originated\"',spec_title:\"RFC7231#7.1.1.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.1.1.2\"},{header:\"Location\",description:'\"is used in some responses to refer to a specific resource in relation to the response.\"',spec_title:\"RFC7231#7.1.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.1.2\"},{header:\"Retry-After\",description:'\"indicates how long the user agent ought to wait before making a follow-up request.\"',spec_title:\"RFC7231#7.1.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.1.3\"},{header:\"Tk\",description:'\"defined as an OPTIONAL means for indicating the tracking status that applied to the corresponding request and as a REQUIRED means for indicating that a state-changing request has resulted in an interactive change to the tracking status. \"',spec_title:\"Tracking Preference Expression (DNT)\",spec_href:\"http://www.w3.org/TR/tracking-dnt/#response-header-field\"},{header:\"Vary\",description:'\"describes what parts of a request message, aside from the method and request target, might influence the origin server\\'s process for selecting and representing the response.\"',spec_title:\"RFC7231#7.1.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.1.4\"},{header:\"Warning\",description:'\"is used to carry additional information about the status or transformation of a message that might not be reflected in the message.\"',spec_title:\"RFC7234#7.6\",spec_href:\"http://tools.ietf.org/html/rfc7234#section-7.6\"},{header:\"ETag\",description:'\"provides the current entity-tag for the selected representation, as determined at the conclusion of handling the request.\"',spec_title:\"RFC7232#2.3\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-2.3\"},{header:\"Last-Modified\",description:'\"provides a timestamp indicating the date and time at which the origin server believes the selected representation was last modified, as determined at the conclusion of handling the request.\"',spec_title:\"RFC7232#2.2\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-2.2\"},{header:\"WWW-Authenticate\",description:'\"consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the effective request URI.\"',spec_title:\"RFC7235#4.4\",spec_href:\"http://tools.ietf.org/html/rfc7235#section-4.4\"},{header:\"Proxy-Authenticate\",description:'\"consists of at least one challenge that indicates the authentication scheme(s) and parameters applicable to the proxy for this effective request URI.\"',spec_title:\"RFC7235#4.2\",spec_href:\"http://tools.ietf.org/html/rfc7235#section-4.2\"},{header:\"Accept-Ranges\",description:'\"allows a server to indicate that it supports range requests for the target resource.\"',spec_title:\"RFC7233#2.3\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-2.3\"},{header:\"Allow\",description:'\"lists the set of methods advertised as supported by the target resource.\"',spec_title:\"RFC7231#7.4.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.4.1\"},{header:\"Server\",description:'\"contains information about the software used by the origin server to handle the request, which is often used by clients to help identify the scope of reported interoperability problems, to work around or tailor requests to avoid particular server limitations, and for analytics regarding server or operating system use.\"',spec_title:\"RFC7231#7.4.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-7.4.2\"},{header:\"Accept-Patch\",description:'\"used to specify the patch document formats accepted by the server.\"',spec_title:\"RFC5789#3.1\",spec_href:\"http://tools.ietf.org/html/rfc5789#section-3.1\"},{header:\"Accept-Post\",description:'\"indicates server support for specific media types for entity bodies in HTTP POST requests.\"',spec_title:\"draft-wilde-accept-post\",spec_href:\"http://tools.ietf.org/html/draft-wilde-accept-post\"},{header:\"Access-Control-Allow-Credentials\",description:'\"indicates whether the response to request can be exposed when the omit credentials flag is unset\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-allow-credentials-response-header\"},{header:\"Access-Control-Allow-Headers\",description:'\"indicates, as part of the response to a preflight request, which header field names can be used during the actual request\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-allow-headers-response-header\"},{header:\"Access-Control-Allow-Methods\",description:'\"indicates, as part of the response to a preflight request, which methods can be used during the actual request\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-allow-methods-response-header\"},{header:\"Access-Control-Allow-Origin\",description:'\"indicates whether a resource can be shared\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-allow-origin-response-header\"},{header:\"Access-Control-Expose-Headers\",description:'\"indicates which headers are safe to expose to the API of a CORS API specification\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-expose-headers-response-header\"},{header:\"Access-Control-Max-Age\",description:'\"indicates how long the results of a preflight request can be cached in a preflight result cache\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-max-age-response-header\"},{header:\"Access-Control-Request-Headers\",description:'\"indicates which headers will be used in the actual request as part of the preflight request\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-request-headers-request-header\"},{header:\"Access-Control-Request-Method\",description:'\"indicates which method will be used in the actual request as part of the preflight request\"',spec_title:\"CORS\",spec_href:\"http://www.w3.org/TR/cors/#access-control-request-method-request-header\"},{header:\"Content-Disposition\",description:'\"standard\"',spec_title:\"RFC6266\",spec_href:\"http://tools.ietf.org/html/rfc6266\"},{header:\"Content-Security-Policy\",description:'\"is the preferred mechanism for delivering a CSP policy\"',spec_title:\"CSP\",spec_href:\"http://www.w3.org/TR/CSP/#content-security-policy-header-field\"},{header:\"Content-Security-Policy-Report-Only\",description:'\"lets servers experiment with policies by monitoring (rather than enforcing) a policy\"',spec_title:\"CSP\",spec_href:\"http://www.w3.org/TR/CSP/#content-security-policy-report-only-header-field\"},{header:\"Cookie\",description:'\"standard\"',spec_title:\"RFC6265\",spec_href:\"http://tools.ietf.org/html/rfc6265\"},{header:\"Forwarded\",description:'\"standard\"',spec_title:\"RFC7239\",spec_href:\"http://tools.ietf.org/html/rfc7239\"},{header:\"Link\",description:'\"provides a means for serialising one or more links in HTTP headers.\"',spec_title:\"RFC5988#5\",spec_href:\"http://tools.ietf.org/html/rfc5988#section-5\"},{header:\"Origin\",description:'\"standard\"',spec_title:\"RFC6454\",spec_href:\"http://tools.ietf.org/html/rfc6454\"},{header:\"Prefer\",description:'\"is used to indicate that particular server behaviors are preferred by the client, but not required for successful completion of the request.\"',spec_title:\"draft-snell-http-prefer#2\",spec_href:\"http://tools.ietf.org/html/draft-snell-http-prefer#section-2\"},{header:\"Preference-Applied\",description:'\"MAY be included within a response message as an indication as to which Prefer tokens were honored by the server and applied to the processing of a request.\"',spec_title:\"draft-snell-http-prefer#3\",spec_href:\"http://tools.ietf.org/html/draft-snell-http-prefer#section-3\"},{header:\"Set-Cookie\",description:'\"standard\"',spec_title:\"RFC6265\",spec_href:\"http://tools.ietf.org/html/rfc6265\"},{header:\"Strict-Transport-Security\",description:'\"standard\"',spec_title:\"RFC6797\",spec_href:\"http://tools.ietf.org/html/rfc6797\"},{header:\"Via\",description:'\"\"',spec_title:\"RFC7230#5.7.1\",spec_href:\"http://tools.ietf.org/html/rfc7230#section-5.7.1\"},{header:\"A-IM\",description:'\"\"',spec_title:\"RFC3229#10.5.3\",spec_href:\"http://tools.ietf.org/html/rfc3229#section-10.5.3\"},{header:\"Accept-Features\",description:'\"can be used by a user agent to give information about the presence or absence of certain features in the feature set of the current request.\"',spec_title:\"RFC2295#8.2\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.2\"},{header:\"Alt-Svc\",description:'\"is advertising the availability of alternate services to HTTP/1.1 and HTTP/2.0 clients by adding an Alt-Svc header field to responses.\"',spec_title:\"draft-nottingham-httpbis-alt-svc\",spec_href:\"http://tools.ietf.org/html/draft-nottingham-httpbis-alt-svc\"},{header:\"Alternates\",description:'\"is used to convey the list of variants bound to a negotiable resource.\"',spec_title:\"RFC2295#8.3\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.3\"},{header:\"Apply-To-Redirect-Ref\",description:'\"\"',spec_title:\"RFC4437\",spec_href:\"http://tools.ietf.org/html/rfc4437\"},{header:\"CH\",description:'\"describes an example list of client preferences that the server can use to adapt and optimize the resource to satisfy a given request.\"',spec_title:\"draft-grigorik-http-client-hints\",spec_href:\"http://tools.ietf.org/html/draft-grigorik-http-client-hints\"},{header:\"Content-Base\",description:'\"obsoleted\"',spec_title:\"RFC2068\",spec_href:\"http://tools.ietf.org/html/rfc2068\"},{header:\"Cookie2\",description:'\"obsoleted\"',spec_title:\"RFC2965\",spec_href:\"http://tools.ietf.org/html/rfc2965\"},{header:\"DASL\",description:'\"standard\"',spec_title:\"RFC5323\",spec_href:\"http://tools.ietf.org/html/rfc5323\"},{header:\"DAV\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"Delta-Base\",description:'\"\"',spec_title:\"RFC3229#10.5.1\",spec_href:\"http://tools.ietf.org/html/rfc3229#section-10.5.1\"},{header:\"Depth\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"Destination\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"IM\",description:'\"\"',spec_title:\"RFC3229#10.5.2\",spec_href:\"http://tools.ietf.org/html/rfc3229#section-10.5.2\"},{header:\"If\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"If-Schedule-Tag-Match\",description:'\"standard\"',spec_title:\"RFC6638\",spec_href:\"http://tools.ietf.org/html/rfc6638\"},{header:\"Last-Event-ID\",description:'\"The value of the event source\\'s last event ID string, encoded as UTF-8.\"',spec_title:\"Server-Sent Events\",spec_href:\"http://www.w3.org/TR/eventsource/#last-event-id\"},{header:\"Link-Template\",description:'\"provides a means for serialising one or more links into HTTP headers.\"',spec_title:\"draft-nottingham-link-template\",spec_href:\"http://tools.ietf.org/html/draft-nottingham-link-template\"},{header:\"Lock-Token\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"Negotiate\",description:'\"can contain directives for any content negotiation process initiated by the request.\"',spec_title:\"RFC2295#8.4\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.4\"},{header:\"Nice\",description:'\"indicates that a request is less important than a request that doesn\\'t bear this header.\"',spec_title:\"draft-thomson-http-nice\",spec_href:\"http://tools.ietf.org/html/draft-thomson-http-nice\"},{header:\"Overwrite\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"Redirect-Ref\",description:'\"\"',spec_title:\"RFC4437\",spec_href:\"http://tools.ietf.org/html/rfc4437\"},{header:\"Schedule-Reply\",description:'\"standard\"',spec_title:\"RFC6638\",spec_href:\"http://tools.ietf.org/html/rfc6638\"},{header:\"Schedule-Tag\",description:'\"standard\"',spec_title:\"RFC6638\",spec_href:\"http://tools.ietf.org/html/rfc6638\"},{header:\"Sec-WebSocket-Accept\",description:'\"standard\"',spec_title:\"RFC6455\",spec_href:\"http://tools.ietf.org/html/rfc6455\"},{header:\"Sec-WebSocket-Extensions\",description:'\"standard\"',spec_title:\"RFC6455\",spec_href:\"http://tools.ietf.org/html/rfc6455\"},{header:\"Sec-WebSocket-Key\",description:'\"standard\"',spec_title:\"RFC6455\",spec_href:\"http://tools.ietf.org/html/rfc6455\"},{header:\"Sec-WebSocket-Protocol\",description:'\"standard\"',spec_title:\"RFC6455\",spec_href:\"http://tools.ietf.org/html/rfc6455\"},{header:\"Sec-WebSocket-Version\",description:'\"standard\"',spec_title:\"RFC6455\",spec_href:\"http://tools.ietf.org/html/rfc6455\"},{header:\"Set-Cookie2\",description:'\"obsoleted\"',spec_title:\"RFC2965\",spec_href:\"http://tools.ietf.org/html/rfc2965\"},{header:\"SLUG\",description:'\"standard\"',spec_title:\"RFC5023\",spec_href:\"http://tools.ietf.org/html/rfc5023\"},{header:\"TCN\",description:'\"is used by a server to signal that the resource is transparently negotiated.\"',spec_title:\"RFC2295#8.5\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.5\"},{header:\"Timeout\",description:'\"standard\"',spec_title:\"RFC4918\",spec_href:\"http://tools.ietf.org/html/rfc4918\"},{header:\"Variant-Vary\",description:'\"can be used in a choice response to record any vary information which applies to the variant data (the entity body combined with some of the entity headers) contained in the response, rather than to the response as a whole.\"',spec_title:\"RFC2295#8.6\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.6\"},{header:\"X-Frame-Options\",description:'\"indicates a policy that specifies whether the browser should render the transmitted resource within a <frame> or an <iframe>. Servers can declare this policy in the header of their HTTP responses to prevent clickjacking attacks, which ensures that their content is not embedded into other pages or frames.\"',spec_title:\"RFC7034\",spec_href:\"http://tools.ietf.org/html/rfc7034\"}]},function(e,t){e.exports=[{method:\"CONNECT\",description:'\"requests that the recipient establish a tunnel to the destination origin server identified by the request-target and, if successful, thereafter restrict its behavior to blind forwarding of packets, in both directions, until the connection is closed.\"',safe:!0,idempotent:!0,cacheable:!1,spec_title:\"RFC7231#4.3.6\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.6\"},{method:\"DELETE\",description:'\"requests that the origin server remove the association between the target resource and its current functionality.\"',safe:!1,idempotent:!0,cacheable:!1,spec_title:\"RFC7231#4.3.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.5\"},{method:\"GET\",description:'\"requests transfer of a current selected representation for the target resource.\"',safe:!0,idempotent:!0,cacheable:!0,spec_title:\"RFC7231#4.3.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.1\"},{method:\"HEAD\",description:'\"is identical to GET except that the server MUST NOT send a message body in the response (i.e., the response terminates at the end of the header block).\"',safe:!0,idempotent:!0,cacheable:!0,spec_title:\"RFC7231#4.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.2\"},{method:\"OPTIONS\",description:'\"requests information about the communication options available on the request/response chain identified by the effective request URI.\"',safe:!0,idempotent:!0,cacheable:!1,spec_title:\"RFC7231#4.3.7\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.7\"},{method:\"POST\",description:'\"requests that the target resource process the representation enclosed in the request according to the resource\\'s own specific semantics.\"',safe:!1,idempotent:!1,cacheable:!1,spec_title:\"RFC7231#4.3.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.3\"},{method:\"PUT\",description:'\"requests that the state of the target resource be created or replaced with the state defined by the representation enclosed in the request message payload.\"',safe:!1,idempotent:!0,cacheable:!1,spec_title:\"RFC7231#4.3.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.4\"},{method:\"TRACE\",description:'\"is used to invoke a remote, application-layer loopback of the request message.\"',safe:!0,idempotent:!0,cacheable:!1,spec_title:\"RFC7231#4.3.8\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-4.3.8\"},{method:\"ACL\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3744#8.1\",spec_href:\"http://tools.ietf.org/html/rfc3744#section-8.1\"},{method:\"BASELINE-CONTROL\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#12.6\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-12.6\"},{method:\"BIND\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC5842#4\",spec_href:\"http://tools.ietf.org/html/rfc5842#section-4\"},{method:\"CHECKIN\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#4.4\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-4.4\"},{method:\"CHECKOUT\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#4.3\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-4.3\"},{method:\"COPY\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.8\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.8\"},{method:\"LABEL\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#8.2\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-8.2\"},{method:\"LINK\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC2068#19.6.1.2\",spec_href:\"http://tools.ietf.org/html/rfc2068#section-19.6.1.2\"},{method:\"LOCK\",description:\"\",safe:!1,idempotent:!1,cacheable:\"\",spec_title:\"RFC4918#9.10\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.10\"},{method:\"MERGE\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#11.2\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-11.2\"},{method:\"MKACTIVITY\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#13.5\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-13.5\"},{method:\"MKCALENDAR\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4791#5.3.1\",spec_href:\"http://tools.ietf.org/html/rfc4791#section-5.3.1\"},{method:\"MKCOL\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.3\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.3\"},{method:\"MKREDIRECTREF\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4437#6\",spec_href:\"http://tools.ietf.org/html/rfc4437#section-6\"},{method:\"MKWORKSPACE\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#6.3\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-6.3\"},{method:\"MOVE\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.9\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.9\"},{method:\"ORDERPATCH\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3648#7\",spec_href:\"http://tools.ietf.org/html/rfc3648#section-7\"},{method:\"PATCH\",description:'\"requests that a set of changes described in the request entity be applied to the resource identified by the Request-URI.\"',safe:!1,idempotent:!1,cacheable:!1,spec_title:\"RFC5789\",spec_href:\"http://tools.ietf.org/html/rfc5789#section-2\"},{method:\"PROPFIND\",description:\"\",safe:!0,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.1\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.1\"},{method:\"PROPPATCH\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.2\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.2\"},{method:\"REBIND\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC5842#6\",spec_href:\"http://tools.ietf.org/html/rfc5842#section-6\"},{method:\"REPORT\",description:\"\",safe:!0,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#3.6\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-3.6\"},{method:\"SEARCH\",description:\"\",safe:!0,idempotent:!0,cacheable:\"\",spec_title:\"RFC5323#2\",spec_href:\"http://tools.ietf.org/html/rfc5323#section-2\"},{method:\"UNBIND\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC5842#5\",spec_href:\"http://tools.ietf.org/html/rfc5842#section-5\"},{method:\"UNCHECKOUT\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#4.5\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-4.5\"},{method:\"UNLINK\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC2068#19.6.1.3\",spec_href:\"http://tools.ietf.org/html/rfc2068#section-19.6.1.3\"},{method:\"UNLOCK\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4918#9.11\",spec_href:\"http://tools.ietf.org/html/rfc4918#section-9.11\"},{method:\"UPDATE\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#7.1\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-7.1\"},{method:\"UPDATEREDIRECTREF\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC4437#7\",spec_href:\"http://tools.ietf.org/html/rfc4437#section-7\"},{method:\"VERSION-CONTROL\",description:\"\",safe:!1,idempotent:!0,cacheable:\"\",spec_title:\"RFC3253#3.5\",spec_href:\"http://tools.ietf.org/html/rfc3253#section-3.5\"}]},function(e,t){e.exports=[{relation:\"about\",description:'\"Refers to a resource that is the subject of the link\\'s context.\"',spec_title:\"RFC6903\",spec_href:\"http://tools.ietf.org/html/rfc6903\"},{relation:\"alternate\",description:'\"Refers to a substitute for this context\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-alternate\"},{relation:\"appendix\",description:'\"Refers to an appendix.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"archives\",description:'\"Refers to a collection of records, documents, or other materials of historical interest.\"',spec_title:\"HTML5linksWD\",spec_href:\"http://www.w3.org/TR/2011/WD-html5-20110113/links.html#rel-archives\"},{relation:\"author\",description:'\"Refers to the context\\'s author.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-author\"},{relation:\"bookmark\",description:'\"Gives a permanent link to use for bookmarking purposes.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-bookmark\"},{relation:\"canonical\",description:'\"Designates the preferred version of a resource (the IRI and its contents).\"',spec_title:\"RFC6596\",spec_href:\"http://tools.ietf.org/html/rfc6596\"},{relation:\"chapter\",description:'\"Refers to a chapter in a collection of resources.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"collection\",description:'\"The target IRI points to a resource which represents the collection resource for the context IRI.\"',spec_title:\"RFC6573\",spec_href:\"http://tools.ietf.org/html/rfc6573\"},{relation:\"contents\",description:'\"Refers to a table of contents.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"copyright\",description:'\"Refers to a copyright statement that applies to the link\\'s context.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"create-form\",description:'\"The target IRI points to a resource where a submission form can be obtained.\"',spec_title:\"RFC6861\",spec_href:\"http://tools.ietf.org/html/rfc6861\"},{relation:\"current\",description:'\"Refers to a resource containing the most recent item(s) in a collection of resources.\"',spec_title:\"RFC5005\",spec_href:\"http://tools.ietf.org/html/rfc5005\"},{relation:\"describedby\",description:'\"Refers to a resource providing information about the link\\'s context.\"',spec_title:\"POWDER\",spec_href:\"http://www.w3.org/TR/powder-dr/#assoc-linking\"},{relation:\"describes\",description:\"\\\"The relationship A 'describes' B asserts that resource A provides a description of resource B. There are no constraints on the format or representation of either A or B, neither are there any further constraints on either resource.\\\"\",spec_title:\"RFC6892\",spec_href:\"http://tools.ietf.org/html/rfc6892\"},{relation:\"disclosure\",description:'\"Refers to a list of patent disclosures made with respect to material for which `disclosure` relation is specified.\"',spec_title:\"RFC6579\",spec_href:\"http://tools.ietf.org/html/rfc6579\"},{relation:\"duplicate\",description:'\"Refers to a resource whose available representations are byte-for-byte identical with the corresponding representations of the context IRI.\"',spec_title:\"RFC6249\",spec_href:\"http://tools.ietf.org/html/rfc6249\"},{relation:\"edit\",description:'\"Refers to a resource that can be used to edit the link\\'s context.\"',spec_title:\"RFC5023\",spec_href:\"http://tools.ietf.org/html/rfc5023\"},{relation:\"edit-form\",description:'\"The target IRI points to a resource where a submission form for editing associated resource can be obtained.\"',spec_title:\"RFC6861\",spec_href:\"http://tools.ietf.org/html/rfc6861\"},{relation:\"edit-media\",description:'\"Refers to a resource that can be used to edit media associated with the link\\'s context.\"',spec_title:\"RFC5023\",spec_href:\"http://tools.ietf.org/html/rfc5023\"},{relation:\"enclosure\",description:'\"Identifies a related resource that is potentially large and might require special handling.\"',spec_title:\"RFC4287\",spec_href:\"http://tools.ietf.org/html/rfc4287\"},{relation:\"first\",description:'\"An IRI that refers to the furthest preceding resource in a series of resources.\"',spec_title:\"RFC5988\",spec_href:\"http://tools.ietf.org/html/rfc5988\"},{relation:\"glossary\",description:'\"Refers to a glossary of terms.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"help\",description:'\"Refers to context-sensitive help.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-help\"},{relation:\"hosts\",description:'\"Refers to a resource hosted by the server indicated by the link context.\"',spec_title:\"RFC6690\",spec_href:\"http://tools.ietf.org/html/rfc6690\"},{relation:\"hub\",description:'\"Refers to a hub that enables registration for notification of updates to the context.\"',spec_title:\"pubsubhubbub\",spec_href:\"http://pubsubhubbub.googlecode.com\"},{relation:\"icon\",description:'\"Refers to an icon representing the link\\'s context.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-icon\"},{relation:\"index\",description:'\"Refers to an index.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"item\",description:'\"The target IRI points to a resource that is a member of the collection represented by the context IRI.\"',spec_title:\"RFC6573\",spec_href:\"http://tools.ietf.org/html/rfc6573\"},{relation:\"last\",description:'\"An IRI that refers to the furthest following resource in a series of resources.\"',spec_title:\"RFC5988\",spec_href:\"http://tools.ietf.org/html/rfc5988\"},{relation:\"latest-version\",description:'\"Points to a resource containing the latest (e.g., current) version of the context.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"},{relation:\"license\",description:'\"Refers to a license associated with this context.\"',spec_title:\"RFC4946\",spec_href:\"http://tools.ietf.org/html/rfc4946\"},{relation:\"lrdd\",description:'\"Refers to further information about the link\\'s context, expressed as a LRDD (Link-based Resource Descriptor Document) resource. See [RFC6415](http://tools.ietf.org/html/rfc6415) for information about processing this relation type in host-meta documents. When used elsewhere, it refers to additional links and other metadata. Multiple instances indicate additional LRDD resources. LRDD resources MUST have an \"application/xrd+xml\" representation, and MAY have others.\"',spec_title:\"RFC6415\",spec_href:\"http://tools.ietf.org/html/rfc6415\"},{relation:\"monitor\",description:'\"Refers to a resource that can be used to monitor changes in an HTTP resource.\"',spec_title:\"RFC5989\",spec_href:\"http://tools.ietf.org/html/rfc5989\"},{relation:\"monitor-group\",description:'\"Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.\"',spec_title:\"RFC5989\",spec_href:\"http://tools.ietf.org/html/rfc5989\"},{relation:\"next\",description:'\"Indicates that the link\\'s context is a part of a series, and that the next in the series is the link target.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-next\"},{relation:\"next-archive\",description:'\"Refers to the immediately following archive resource.\"',spec_title:\"RFC5005\",spec_href:\"http://tools.ietf.org/html/rfc5005\"},{relation:\"nofollow\",description:'\"Indicates that the context’s original author or publisher does not endorse the link target.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-nofollow\"},{relation:\"noreferrer\",description:'\"Indicates that no referrer information is to be leaked when following the link.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-noreferrer\"},{relation:\"payment\",description:'\"Indicates a resource where payment is accepted.\"',spec_title:\"RFC5988\",spec_href:\"http://tools.ietf.org/html/rfc5988\"},{relation:\"predecessor-version\",description:'\"Points to a resource containing the predecessor version in the version history.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"},{relation:\"prefetch\",description:'\"Indicates that the link target should be preemptively cached.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-prefetch\"},{relation:\"prev\",description:'\"Indicates that the link\\'s context is a part of a series, and that the previous in the series is the link target.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-prev\"},{relation:\"preview\",description:'\"Refers to a resource that provides a preview of the link\\'s context.\"',spec_title:\"RFC6903\",spec_href:\"http://tools.ietf.org/html/rfc6903\"},{relation:\"previous\",description:'\"Refers to the previous resource in an ordered series of resources. Synonym for `prev`.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"prev-archive\",description:'\"Refers to the immediately preceding archive resource.\"',spec_title:\"RFC5005\",spec_href:\"http://tools.ietf.org/html/rfc5005\"},{relation:\"privacy-policy\",description:'\"Refers to a privacy policy associated with the link\\'s context.\"',spec_title:\"RFC6903\",spec_href:\"http://tools.ietf.org/html/rfc6903\"},{relation:\"profile\",description:\"Identifying that a resource representation conforms to a certain profile, without affecting the non-profile semantics of the resource representation\",spec_title:\"RFC6906\",spec_href:\"http://tools.ietf.org/html/rfc6906\"},{relation:\"related\",description:'\"Identifies a related resource.\"',spec_title:\"RFC4287\",spec_href:\"http://tools.ietf.org/html/rfc4287\"},{relation:\"replies\",description:'\"Identifies a resource that is a reply to the context of the link.\"',spec_title:\"RFC4685\",spec_href:\"http://tools.ietf.org/html/rfc4685\"},{relation:\"search\",description:'\"Refers to a resource that can be used to search through the link\\'s context and related resources.\"',spec_title:\"OpenSearch\",spec_href:\"http://www.opensearch.org/Specifications/OpenSearch/1.1\"},{relation:\"section\",description:'\"Refers to a section in a collection of resources.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"self\",description:'\"Conveys an identifier for the link\\'s context.\"',spec_title:\"RFC4287\",spec_href:\"http://tools.ietf.org/html/rfc4287\"},{relation:\"service\",description:'\"Indicates a URI that can be used to retrieve a service document.\"',spec_title:\"RFC5023\",spec_href:\"http://tools.ietf.org/html/rfc5023\"},{relation:\"start\",description:'\"Refers to the first resource in a collection of resources.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"stylesheet\",description:'\"Refers to a stylesheet.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-stylesheet\"},{relation:\"subsection\",description:'\"Refers to a resource serving as a subsection in a collection of resources.\"',spec_title:\"HTML401\",spec_href:\"http://www.w3.org/TR/1999/REC-html401-19991224\"},{relation:\"successor-version\",description:'\"Points to a resource containing the successor version in the version history.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"},{relation:\"tag\",description:'\"Gives a tag (identified by the given address) that applies to the current document.\"',spec_title:\"HTML5links\",spec_href:\"http://www.w3.org/TR/html5/links.html#link-type-tag\"},{relation:\"terms-of-service\",description:'\"Refers to the terms of service associated with the link\\'s context.\"',spec_title:\"RFC6903\",spec_href:\"http://tools.ietf.org/html/rfc6903\"},{relation:\"type\",description:'\"Refers to a resource identifying the abstract semantic type of which the link\\'s context is considered to be an instance.\"',spec_title:\"RFC6903\",spec_href:\"http://tools.ietf.org/html/rfc6903\"},{relation:\"up\",description:'\"Refers to a parent document in a hierarchy of documents.\"',spec_title:\"RFC5988\",spec_href:\"http://tools.ietf.org/html/rfc5988\"},{relation:\"version-history\",description:'\"Points to a resource containing the version history for the context.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"},{relation:\"via\",description:'\"Identifies a resource that is the source of the information in the link\\'s context.\"',spec_title:\"RFC4287\",spec_href:\"http://tools.ietf.org/html/rfc4287\"},{relation:\"working-copy\",description:'\"Points to a working copy for this resource.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"},{relation:\"working-copy-of\",description:'\"Points to the versioned resource from which this working copy was obtained.\"',spec_title:\"RFC5829\",spec_href:\"http://tools.ietf.org/html/rfc5829\"}]},function(e,t){e.exports=[{code:\"1xx\",phrase:\"**Informational**\",description:'\"indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.\" ~ [sure](http://www.urbandictionary.com/define.php?term=sure)',spec_title:\"RFC7231#6.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.2\"},{code:\"100\",phrase:\"Continue\",description:'\"indicates that the initial part of a request has been received and has not yet been rejected by the server.\"',spec_title:\"RFC7231#6.2.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.2.1\"},{code:\"101\",phrase:\"Switching Protocols\",description:'\"indicates that the server understands and is willing to comply with the client\\'s request, via the Upgrade header field, for a change in the application protocol being used on this connection.\"',spec_title:\"RFC7231#6.2.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.2.2\"},{code:\"2xx\",phrase:\"**Successful**\",description:'\"indicates that the client\\'s request was successfully received, understood, and accepted.\" ~ [cool](https://twitter.com/DanaDanger/status/183316183494311936)',spec_title:\"RFC7231#6.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3\"},{code:\"200\",phrase:\"OK\",description:'\"indicates that the request has succeeded.\"',spec_title:\"RFC7231#6.3.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.1\"},{code:\"201\",phrase:\"Created\",description:'\"indicates that the request has been fulfilled and has resulted in one or more new resources being created.\"',spec_title:\"RFC7231#6.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.2\"},{code:\"202\",phrase:\"Accepted\",description:'\"indicates that the request has been accepted for processing, but the processing has not been completed.\"',spec_title:\"RFC7231#6.3.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.3\"},{code:\"203\",phrase:\"Non-Authoritative Information\",description:'\"indicates that the request was successful but the enclosed payload has been modified from that of the origin server\\'s 200 (OK) response by a transforming proxy.\"',spec_title:\"RFC7231#6.3.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.4\"},{code:\"204\",phrase:\"No Content\",description:'\"indicates that the server has successfully fulfilled the request and that there is no additional content to send in the response payload body.\"',spec_title:\"RFC7231#6.3.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.5\"},{code:\"205\",phrase:\"Reset Content\",description:'\"indicates that the server has fulfilled the request and desires that the user agent reset the \"document view\", which caused the request to be sent, to its original state as received from the origin server.\"',spec_title:\"RFC7231#6.3.6\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.6\"},{code:\"206\",phrase:\"Partial Content\",description:'\"indicates that the server is successfully fulfilling a range request for the target resource by transferring one or more parts of the selected representation that correspond to the satisfiable ranges found in the requests\\'s Range header field.\"',spec_title:\"RFC7233#4.1\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-4.1\"},{code:\"3xx\",phrase:\"**Redirection**\",description:'\"indicates that further action needs to be taken by the user agent in order to fulfill the request.\" ~ [ask that dude over there](https://twitter.com/DanaDanger/status/183316183494311936)',spec_title:\"RFC7231#6.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4\"},{code:\"300\",phrase:\"Multiple Choices\",description:'\"indicates that the target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.\"',spec_title:\"RFC7231#6.4.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.1\"},{code:\"301\",phrase:\"Moved Permanently\",description:'\"indicates that the target resource has been assigned a new permanent URI and any future references to this resource ought to use one of the enclosed URIs.\"',spec_title:\"RFC7231#6.4.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.2\"},{code:\"302\",phrase:\"Found\",description:'\"indicates that the target resource resides temporarily under a different URI.\"',spec_title:\"RFC7231#6.4.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.3\"},{code:\"303\",phrase:\"See Other\",description:'\"indicates that the server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, that is intended to provide an indirect response to the original request.\"',spec_title:\"RFC7231#6.4.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.4\"},{code:\"304\",phrase:\"Not Modified\",description:'\"indicates that a conditional GET request has been received and would have resulted in a 200 (OK) response if it were not for the fact that the condition has evaluated to false.\"',spec_title:\"RFC7232#4.1\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-4.1\"},{code:\"305\",phrase:\"Use Proxy\",description:\"*deprecated*\",spec_title:\"RFC7231#6.4.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.5\"},{code:\"307\",phrase:\"Temporary Redirect\",description:'\"indicates that the target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI.\"',spec_title:\"RFC7231#6.4.7\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.4.7\"},{code:\"4xx\",phrase:\"**Client Error**\",description:'\"indicates that the client seems to have erred.\" ~ [*you* fucked up](https://twitter.com/DanaDanger/status/183316183494311936)',spec_title:\"RFC7231#6.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5\"},{code:\"400\",phrase:\"Bad Request\",description:'\"indicates that the server cannot or will not process the request because the received syntax is invalid, nonsensical, or exceeds some limitation on what the server is willing to process.\"',spec_title:\"RFC7231#6.5.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.1\"},{code:\"401\",phrase:\"Unauthorized\",description:'\"indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.\"',spec_title:\"RFC7235#6.3.1\",spec_href:\"http://tools.ietf.org/html/rfc7235#section-3.1\"},{code:\"402\",phrase:\"Payment Required\",description:\"*reserved*\",spec_title:\"RFC7231#6.5.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.2\"},{code:\"403\",phrase:\"Forbidden\",description:'\"indicates that the server understood the request but refuses to authorize it.\"',spec_title:\"RFC7231#6.5.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.3\"},{code:\"404\",phrase:\"Not Found\",description:'\"indicates that the origin server did not find a current representation for the target resource or is not willing to disclose that one exists.\"',spec_title:\"RFC7231#6.5.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.4\"},{code:\"405\",phrase:\"Method Not Allowed\",description:'\"indicates that the method specified in the request-line is known by the origin server but not supported by the target resource.\"',spec_title:\"RFC7231#6.5.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.5\"},{code:\"406\",phrase:\"Not Acceptable\",description:'\"indicates that the target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request, and the server is unwilling to supply a default representation.\"',spec_title:\"RFC7231#6.5.6\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.6\"},{code:\"407\",phrase:\"Proxy Authentication Required\",description:'\"is similar to 401 (Unauthorized), but indicates that the client needs to authenticate itself in order to use a proxy.\"',spec_title:\"RFC7231#6.3.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.3.2\"},{code:\"408\",phrase:\"Request Timeout\",description:'\"indicates that the server did not receive a complete request message within the time that it was prepared to wait.\"',spec_title:\"RFC7231#6.5.7\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.7\"},{code:\"409\",phrase:\"Conflict\",description:'\"indicates that the request could not be completed due to a conflict with the current state of the resource.\"',spec_title:\"RFC7231#6.5.8\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.8\"},{code:\"410\",phrase:\"Gone\",description:'\"indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.\"',spec_title:\"RFC7231#6.5.9\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.9\"},{code:\"411\",phrase:\"Length Required\",description:'\"indicates that the server refuses to accept the request without a defined Content-Length.\"',spec_title:\"RFC7231#6.5.10\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.10\"},{code:\"412\",phrase:\"Precondition Failed\",description:'\"indicates that one or more preconditions given in the request header fields evaluated to false when tested on the server.\"',spec_title:\"RFC7232#4.2\",spec_href:\"http://tools.ietf.org/html/rfc7232#section-4.2\"},{code:\"413\",phrase:\"Payload Too Large\",description:'\"indicates that the server is refusing to process a request because the request payload is larger than the server is willing or able to process.\"',spec_title:\"RFC7231#6.5.11\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.11\"},{code:\"414\",phrase:\"URI Too Long\",description:'\"indicates that the server is refusing to service the request because the request-target is longer than the server is willing to interpret.\"',spec_title:\"RFC7231#6.5.12\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.12\"},{code:\"415\",phrase:\"Unsupported Media Type\",description:'\"indicates that the origin server is refusing to service the request because the payload is in a format not supported by the target resource for this method.\"',spec_title:\"RFC7231#6.5.13\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.13\"},{code:\"416\",phrase:\"Range Not Satisfiable\",description:'\"indicates that none of the ranges in the request\\'s Range header field overlap the current extent of the selected resource or that the set of ranges requested has been rejected due to invalid ranges or an excessive request of small or overlapping ranges.\"',spec_title:\"RFC7233#4.4\",spec_href:\"http://tools.ietf.org/html/rfc7233#section-4.4\"},{code:\"417\",phrase:\"Expectation Failed\",description:'\"indicates that the expectation given in the request\\'s Expect header field could not be met by at least one of the inbound servers.\"',spec_title:\"RFC7231#6.5.14\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.14\"},{code:\"426\",phrase:\"Upgrade Required\",description:'\"indicates that the server refuses to perform the request using the current protocol but might be willing to do so after the client upgrades to a different protocol.\"',spec_title:\"RFC7231#6.5.15\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.5.15\"},{code:\"5xx\",phrase:\"**Server Error**\",description:'\"indicates that the server is aware that it has erred or is incapable of performing the requested method.\" ~ [*we* fucked up](https://twitter.com/DanaDanger/status/183316183494311936)',spec_title:\"RFC7231#6.6\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6\"},{code:\"500\",phrase:\"Internal Server Error\",description:'\"indicates that the server encountered an unexpected condition that prevented it from fulfilling the request.\"',spec_title:\"RFC7231#6.6.1\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.1\"},{code:\"501\",phrase:\"Not Implemented\",description:'\"indicates that the server does not support the functionality required to fulfill the request.\"',spec_title:\"RFC7231#6.6.2\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.2\"},{code:\"502\",phrase:\"Bad Gateway\",description:'\"indicates that the server, while acting as a gateway or proxy, received an invalid response from an inbound server it accessed while attempting to fulfill the request.\"',spec_title:\"RFC7231#6.6.3\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.3\"},{code:\"503\",phrase:\"Service Unavailable\",description:'\"indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.\"',spec_title:\"RFC7231#6.6.4\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.4\"},{code:\"504\",phrase:\"Gateway Time-out\",description:'\"indicates that the server, while acting as a gateway or proxy, did not receive a timely response from an upstream server it needed to access in order to complete the request.\"',spec_title:\"RFC7231#6.6.5\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.5\"},{code:\"505\",phrase:\"HTTP Version Not Supported\",description:'\"indicates that the server does not support, or refuses to support, the protocol version that was used in the request message.\"',spec_title:\"RFC7231#6.6.6\",spec_href:\"http://tools.ietf.org/html/rfc7231#section-6.6.6\"},{code:\"102\",phrase:\"Processing\",description:'\"is an interim response used to inform the client that the server has accepted the complete request, but has not yet completed it.\"',spec_title:\"RFC5218#10.1\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.1\"},{code:\"207\",phrase:\"Multi-Status\",description:'\"provides status for multiple independent operations.\"',spec_title:\"RFC5218#10.2\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.2\"},{code:\"226\",phrase:\"IM Used\",description:'\"The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\"',spec_title:\"RFC3229#10.4.1\",spec_href:\"http://tools.ietf.org/html/rfc3229#section-10.4.1\"},{code:\"308\",phrase:\"Permanent Redirect\",description:'\"The target resource has been assigned a new permanent URI and any future references to this resource SHOULD use one of the returned URIs. [...] This status code is similar to 301 Moved Permanently (Section 7.3.2 of rfc7231), except that it does not allow rewriting the request method from POST to GET.\"',spec_title:\"RFC7238\",spec_href:\"http://tools.ietf.org/html/rfc7238\"},{code:\"422\",phrase:\"Unprocessable Entity\",description:'\"means the server understands the content type of the request entity (hence a 415(Unsupported Media Type) status code is inappropriate), and the syntax of the request entity is correct (thus a 400 (Bad Request) status code is inappropriate) but was unable to process the contained instructions.\"',spec_title:\"RFC5218#10.3\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.3\"},{code:\"423\",phrase:\"Locked\",description:'\"means the source or destination resource of a method is locked.\"',spec_title:\"RFC5218#10.4\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.4\"},{code:\"424\",phrase:\"Failed Dependency\",description:'\"means that the method could not be performed on the resource because the requested action depended on another action and that action failed.\"',spec_title:\"RFC5218#10.5\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.5\"},{code:\"428\",phrase:\"Precondition Required\",description:'\"indicates that the origin server requires the request to be conditional.\"',spec_title:\"RFC6585#3\",spec_href:\"http://tools.ietf.org/html/rfc6585#section-3\"},{code:\"429\",phrase:\"Too Many Requests\",description:'\"indicates that the user has sent too many requests in a given amount of time (\"rate limiting\").\"',spec_title:\"RFC6585#4\",spec_href:\"http://tools.ietf.org/html/rfc6585#section-4\"},{code:\"431\",phrase:\"Request Header Fields Too Large\",description:'\"indicates that the server is unwilling to process the request because its header fields are too large.\"',spec_title:\"RFC6585#5\",spec_href:\"http://tools.ietf.org/html/rfc6585#section-5\"},{code:\"451\",phrase:\"Unavailable For Legal Reasons\",description:'\"This status code indicates that the server is denying access to the resource in response to a legal demand.\"',spec_title:\"draft-tbray-http-legally-restricted-status\",spec_href:\"http://tools.ietf.org/html/draft-tbray-http-legally-restricted-status\"},{code:\"506\",phrase:\"Variant Also Negotiates\",description:'\"indicates that the server has an internal configuration error: the chosen variant resource is configured to engage in transparent content negotiation itself, and is therefore not a proper end point in the negotiation process.\"',spec_title:\"RFC2295#8.1\",spec_href:\"http://tools.ietf.org/html/rfc2295#section-8.1\"},{code:\"507\",phrase:\"Insufficient Storage\",description:'\"means the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.\"',spec_title:\"RFC5218#10.6\",spec_href:\"http://tools.ietf.org/html/rfc2518#section-10.6\"},{code:\"511\",phrase:\"Network Authentication Required\",description:'\"indicates that the client needs to authenticate to gain network access.\"',spec_title:\"RFC6585#6\",spec_href:\"http://tools.ietf.org/html/rfc6585#section-6\"},{code:\"7xx\",phrase:\"**Developer Error**\",description:\"[err](http://www.urbandictionary.com/define.php?term=err)\",spec_title:\"7xx-rfc\",spec_href:\"http://documentup.com/joho/7XX-rfc\"}]},function(e,t,n){var r=n(27),i=n(22),a=r(i,\"DataView\");e.exports=a},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(243),a=n(244),o=n(245),s=n(246),u=n(247);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){var r=n(27),i=n(22),a=r(i,\"Promise\");e.exports=a},function(e,t,n){var r=n(27),i=n(22),a=r(i,\"Set\");e.exports=a},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}var i=n(72),a=n(267),o=n(268);r.prototype.add=r.prototype.push=a,r.prototype.has=o,e.exports=r},function(e,t,n){var r=n(22),i=r.Uint8Array;e.exports=i},function(e,t,n){var r=n(27),i=n(22),a=r(i,\"WeakMap\");e.exports=a},function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}e.exports=n},function(e,t,n){function r(e,t){var n=o(e),r=!n&&a(e),l=!n&&!r&&s(e),f=!n&&!r&&!l&&c(e),d=n||r||l||f,m=d?i(e.length,String):[],h=m.length;for(var y in e)!t&&!p.call(e,y)||d&&(\"length\"==y||l&&(\"offset\"==y||\"parent\"==y)||f&&(\"buffer\"==y||\"byteLength\"==y||\"byteOffset\"==y)||u(y,h))||m.push(y);return m}var i=n(227),a=n(77),o=n(18),s=n(78),u=n(73),c=n(81),l=Object.prototype,p=l.hasOwnProperty;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e.exports=n},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t){return e&&i(t,a(t),e)}var i=n(126),a=n(44);e.exports=r},function(e,t,n){var r=n(19),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},function(e,t,n){var r=n(212),i=n(233),a=i(r);e.exports=a},function(e,t,n){function r(e,t){var n=!0;return i(e,function(e,r,i){return n=!!t(e,r,i)}),n}var i=n(209);e.exports=r},function(e,t,n){var r=n(234),i=r();e.exports=i},function(e,t,n){function r(e,t){return e&&i(e,t,a)}var i=n(211),a=n(44);e.exports=r},function(e,t,n){function r(e,t,n){var r=t(e);return a(e)?r:i(r,n(e))}var i=n(205),a=n(18);e.exports=r},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e){return a(e)&&i(e)==o}var i=n(41),a=n(43),o=\"[object Arguments]\";e.exports=r},function(e,t,n){function r(e,t,n,r,y,g){var v=c(e),b=c(t),S=v?m:u(e),A=b?m:u(t);S=S==d?h:S,A=A==d?h:A;var T=S==h,E=A==h,C=S==A;if(C&&l(e)){if(!l(t))return!1;v=!0,T=!1}if(C&&!T)return g||(g=new i),v||p(e)?a(e,t,n,r,y,g):o(e,t,S,n,r,y,g);if(!(n&f)){var N=T&&_.call(e,\"__wrapped__\"),w=E&&_.call(t,\"__wrapped__\");if(N||w){var k=N?e.value():e,x=w?t.value():t;return g||(g=new i),y(k,x,n,r,g)}}return!!C&&(g||(g=new i),s(e,t,n,r,y,g))}var i=n(119),a=n(128),o=n(235),s=n(236),u=n(130),c=n(18),l=n(78),p=n(81),f=1,d=\"[object Arguments]\",m=\"[object Array]\",h=\"[object Object]\",y=Object.prototype,_=y.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r){var u=n.length,c=u,l=!r;if(null==e)return!c;for(e=Object(e);u--;){var p=n[u];if(l&&p[2]?p[1]!==e[p[0]]:!(p[0]in e))return!1}for(;++u<c;){p=n[u];var f=p[0],d=e[f],m=p[1];if(l&&p[2]){if(void 0===d&&!(f in e))return!1}else{var h=new i;if(r)var y=r(d,m,f,e,t,h);if(!(void 0===y?a(m,d,o|s,r,h):y))return!1}}return!0}var i=n(119),a=n(123),o=1,s=2;e.exports=r},function(e,t,n){function r(e){return!(!o(e)||a(e))&&(i(e)?d:u).test(s(e))}var i=n(58),a=n(249),o=n(19),s=n(134),u=/^\\[object .+?Constructor\\]$/,c=Function.prototype,l=Object.prototype,p=c.toString,f=l.hasOwnProperty,d=RegExp(\"^\"+p.call(f).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\");e.exports=r},function(e,t,n){function r(e){return o(e)&&a(e.length)&&!!s[i(e)]}var i=n(41),a=n(79),o=n(43),s={};s[\"[object Float32Array]\"]=s[\"[object Float64Array]\"]=s[\"[object Int8Array]\"]=s[\"[object Int16Array]\"]=s[\"[object Int32Array]\"]=s[\"[object Uint8Array]\"]=s[\"[object Uint8ClampedArray]\"]=s[\"[object Uint16Array]\"]=s[\"[object Uint32Array]\"]=!0,s[\"[object Arguments]\"]=s[\"[object Array]\"]=s[\"[object ArrayBuffer]\"]=s[\"[object Boolean]\"]=s[\"[object DataView]\"]=s[\"[object Date]\"]=s[\"[object Error]\"]=s[\"[object Function]\"]=s[\"[object Map]\"]=s[\"[object Number]\"]=s[\"[object Object]\"]=s[\"[object RegExp]\"]=s[\"[object Set]\"]=s[\"[object String]\"]=s[\"[object WeakMap]\"]=!1,e.exports=r},function(e,t,n){function r(e){return\"function\"==typeof e?e:null==e?o:\"object\"==typeof e?s(e)?a(e[0],e[1]):i(e):u(e)}var i=n(221),a=n(222),o=n(76),s=n(18),u=n(285);e.exports=r},function(e,t,n){function r(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}var i=n(217),a=n(238),o=n(133);e.exports=r},function(e,t,n){function r(e,t){return s(e)&&u(t)?c(l(e),t):function(n){var r=a(n,e);return void 0===r&&r===t?o(n,e):i(t,r,p|f)}}var i=n(123),a=n(281),o=n(282),s=n(74),u=n(132),c=n(133),l=n(56),p=1,f=2;e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return function(t){return i(t,e)}}var i=n(122);e.exports=r},function(e,t,n){function r(e,t){return o(a(e,t,i),e+\"\")}var i=n(76),a=n(266),o=n(270);e.exports=r},function(e,t,n){var r=n(279),i=n(127),a=n(76),o=i?function(e,t){return i(e,\"toString\",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=o},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){function r(e){if(\"string\"==typeof e)return e;if(o(e))return a(e,r)+\"\";if(s(e))return l?l.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-u?\"-0\":t}var i=n(52),a=n(204),o=n(18),s=n(80),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;e.exports=r},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){var r=n(22),i=r[\"__core-js_shared__\"];e.exports=i},function(e,t,n){function r(e){return i(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&\"function\"==typeof o?(i--,o):void 0,s&&a(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,o)}return t})}var i=n(225),a=n(131);e.exports=r},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&r(s[o],o,s)!==!1;);return n}}var i=n(42);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(n(a[u],u,a)===!1)break}return t}}e.exports=n},function(e,t,n){function r(e,t,n,r,i,T,C){switch(n){case A:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case S:return!(e.byteLength!=t.byteLength||!T(new a(e),new a(t)));case f:case d:case y:return o(+e,+t);case m:return e.name==t.name&&e.message==t.message;case _:case v:return e==t+\"\";case h:var N=u;case g:var w=r&l;if(N||(N=c),e.size!=t.size&&!w)return!1;var k=C.get(e);if(k)return k==t;r|=p,C.set(e,t);var x=s(N(e),N(t),r,i,T,C);return C.delete(e),x;case b:if(E)return E.call(e)==E.call(t)}return!1}var i=n(52),a=n(198),o=n(57),s=n(128),u=n(260),c=n(269),l=1,p=2,f=\"[object Boolean]\",d=\"[object Date]\",m=\"[object Error]\",h=\"[object Map]\",y=\"[object Number]\",_=\"[object RegExp]\",g=\"[object Set]\",v=\"[object String]\",b=\"[object Symbol]\",S=\"[object ArrayBuffer]\",A=\"[object DataView]\",T=i?i.prototype:void 0,E=T?T.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,o,u){var c=n&a,l=i(e),p=l.length;if(p!=i(t).length&&!c)return!1;for(var f=p;f--;){var d=l[f];if(!(c?d in t:s.call(t,d)))return!1}var m=u.get(e);if(m&&u.get(t))return m==t;var h=!0;u.set(e,t),u.set(t,e);for(var y=c;++f<p;){d=l[f];var _=e[d],g=t[d];if(r)var v=c?r(g,_,d,t,e,u):r(_,g,d,e,t,u);if(!(void 0===v?_===g||o(_,g,n,r,u):v)){h=!1;break}y||(y=\"constructor\"==d)}if(h&&!y){var b=e.constructor,S=t.constructor;b!=S&&\"constructor\"in e&&\"constructor\"in t&&!(\"function\"==typeof b&&b instanceof b&&\"function\"==typeof S&&S instanceof S)&&(h=!1)}return u.delete(e),u.delete(t),h}var i=n(237),a=1,o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){return i(e,o,a)}var i=n(213),a=n(240),o=n(44);e.exports=r},function(e,t,n){function r(e){for(var t=a(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,i(o)]}return t}var i=n(132),a=n(44);e.exports=r},function(e,t,n){function r(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0}catch(e){}var r=s.call(e);return t?e[u]=n:delete e[u],r}var i=n(52),a=Object.prototype,o=a.hasOwnProperty,s=a.toString,u=i?i.toStringTag:void 0;e.exports=r},function(e,t,n){var r=n(202),i=n(286),a=Object.prototype,o=a.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(e){return null==e?[]:(e=Object(e),r(s(e),function(t){return o.call(e,t)}))}:i;e.exports=u},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t,n){function r(e,t,n){t=i(t,e);for(var r=-1,l=t.length,p=!1;++r<l;){var f=c(t[r]);if(!(p=null!=e&&n(e,f)))break;e=e[f]}return p||++r!=l?p:!!(l=null==e?0:e.length)&&u(l)&&s(f,l)&&(o(e)||a(e))}var i=n(125),a=n(77),o=n(18),s=n(73),u=n(79),c=n(56);e.exports=r},function(e,t,n){function r(){this.__data__=i?i(null):{},this.size=0}var i=n(55);e.exports=r},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(i){var n=t[e];return n===a?void 0:n}return s.call(t,e)?t[e]:void 0}var i=n(55),a=\"__lodash_hash_undefined__\",o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}var i=n(55),a=Object.prototype,o=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?a:t,this}var i=n(55),a=\"__lodash_hash_undefined__\";e.exports=r},function(e,t){function n(e){var t=typeof e;return\"string\"==t||\"number\"==t||\"symbol\"==t||\"boolean\"==t?\"__proto__\"!==e:null===e}e.exports=n},function(e,t,n){function r(e){return!!a&&a in e}var i=n(231),a=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||\"\");return e?\"Symbol(src)_1.\"+e:\"\"}();e.exports=r},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}var i=n(53),a=Array.prototype,o=a.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}var i=n(53);e.exports=r},function(e,t,n){function r(e){return i(this.__data__,e)>-1}var i=n(53);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var i=n(53);e.exports=r},function(e,t,n){function r(){this.size=0,this.__data__={hash:new i,map:new(o||a),string:new i}}var i=n(194),a=n(51),o=n(71);e.exports=r},function(e,t,n){function r(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=n(54);e.exports=r},function(e,t,n){function r(e){return i(this,e).get(e)}var i=n(54);e.exports=r},function(e,t,n){function r(e){return i(this,e).has(e)}var i=n(54);e.exports=r},function(e,t,n){function r(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var i=n(54);e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){function r(e){var t=i(e,function(e){return n.size===a&&n.clear(),e}),n=t.cache;return t}var i=n(284),a=500;e.exports=r},function(e,t,n){var r=n(265),i=r(Object.keys,Object);e.exports=i},function(e,t,n){(function(e){var r=n(129),i=\"object\"==typeof t&&t&&!t.nodeType&&t,a=i&&\"object\"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o&&r.process,u=function(){try{return s&&s.binding&&s.binding(\"util\")}catch(e){}}();e.exports=u}).call(t,n(98)(e))},function(e,t){function n(e){return i.call(e)}var r=Object.prototype,i=r.toString;e.exports=n},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t,n){function r(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=a(r.length-t,0),u=Array(s);++o<s;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),i(e,this,c)}}var i=n(200),a=Math.max;e.exports=r},function(e,t){function n(e){return this.__data__.set(e,r),this}var r=\"__lodash_hash_undefined__\";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){var r=n(226),i=n(271),a=i(r);e.exports=a},function(e,t){function n(e){var t=0,n=0;return function(){var o=a(),s=i-(o-n);if(n=o,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,i=16,a=Date.now;e.exports=n},function(e,t,n){function r(){this.__data__=new i,this.size=0}var i=n(51);e.exports=r},function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;if(n instanceof i){var r=n.__data__;if(!a||r.length<s-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(r)}return n.set(e,t),this.size=n.size,this}var i=n(51),a=n(71),o=n(72),s=200;e.exports=r},function(e,t,n){var r=n(261),i=/^\\./,a=r(function(e){var t=[];return i.test(e)&&t.push(\"\"),e.replace(/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,function(e,n,r,i){t.push(r?i.replace(/\\\\(\\\\)?/g,\"$1\"):n||e)}),t});e.exports=a},function(e,t,n){var r=n(120),i=n(126),a=n(232),o=n(42),s=n(75),u=n(44),c=Object.prototype,l=c.hasOwnProperty,p=a(function(e,t){if(s(t)||o(t))return void i(t,u(t),e);for(var n in t)l.call(t,n)&&r(e,n,t[n])});e.exports=p},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){function r(e,t,n){var r=s(e)?i:a;return n&&u(e,t,n)&&(t=void 0),r(e,o(t,3))}var i=n(201),a=n(210),o=n(220),s=n(18),u=n(131);e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}var i=n(122);e.exports=r},function(e,t,n){function r(e,t){return null!=e&&a(e,t,i)}var i=n(214),a=n(242);e.exports=r},function(e,t,n){function r(e){if(null==e)return!0;if(u(e)&&(s(e)||\"string\"==typeof e||\"function\"==typeof e.splice||c(e)||p(e)||o(e)))return!e.length;var t=a(e);if(t==f||t==d)return!e.size;if(l(e))return!i(e).length;for(var n in e)if(h.call(e,n))return!1;return!0}var i=n(124),a=n(130),o=n(77),s=n(18),u=n(42),c=n(78),l=n(75),p=n(81),f=\"[object Map]\",d=\"[object Set]\",m=Object.prototype,h=m.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){if(\"function\"!=typeof e||null!=t&&\"function\"!=typeof t)throw new TypeError(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(r.Cache||i),n}var i=n(72),a=\"Expected a function\";r.Cache=i,e.exports=r},function(e,t,n){function r(e){return o(e)?i(s(e)):a(e)}var i=n(223),a=n(224),o=n(74),s=n(56);e.exports=r},function(e,t){function n(){return[]}e.exports=n},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){function r(e){return null==e?\"\":i(e)}var i=n(228);e.exports=r},function(e,t,n){(function(e){(function(){var r,i=[].slice;r=n(363),t.allowUnsafeEval=function(t){var n;n=e.eval;try{return e.eval=function(e){return r.runInThisContext(e)},t()}finally{e.eval=n}},t.allowUnsafeNewFunction=function(n){var r;r=e.Function;try{return e.Function=t.Function,n()}finally{e.Function=r}},t.Function=function(){var e,t,n,a,o,s,u;for(n=2<=arguments.length?i.call(arguments,0,o=arguments.length-1):(o=0,[]),e=arguments[o++],a=[],s=0,u=n.length;s<u;s++)t=n[s],\"string\"==typeof t&&(t=t.split(/\\s*,\\s*/)),a.push.apply(a,t);return r.runInThisContext(\"(function(\"+a.join(\", \")+\") {\\n  \"+e+\"\\n})\")},t.Function.prototype=e.Function.prototype}).call(this)}).call(t,n(13))},function(e,t,n){var r=n(45);e.exports=function(e,t){return null==e?\"\":(e=String(e),r(e.charAt(0),t)+e.substr(1))}},function(e,t,n){var r,i,a;!function(n,o){\"use strict\";\"object\"==typeof e&&\"object\"==typeof e.exports?e.exports=o():(i=[],r=o,void 0!==(a=\"function\"==typeof r?r.apply(t,i):r)&&(e.exports=a))}(\"object\"==typeof window&&window,function(){\"use strict\";function e(e){this.capacity=e>0?+e:Number.MAX_VALUE,this.data=Object.create?Object.create(null):{},this.hash=Object.create?Object.create(null):{},this.linkedList={length:0,head:null,end:null}}function t(n){if(!(this instanceof t))return new t(n);this._LRUCacheState=new e(n)}function n(e,t){t!==e.head&&(e.end?e.end===t&&(e.end=t.n):e.end=t,r(t.n,t.p),r(t,e.head),e.head=t,e.head.n=null)}function r(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}var i=t.prototype;return i.get=function(e){var t=this._LRUCacheState,r=t.hash[e];if(r)return n(t.linkedList,r),t.data[e]},i.set=function(e,t){var r=this._LRUCacheState,i=r.hash[e];return void 0===t?this:(i||(r.hash[e]={key:e},r.linkedList.length+=1,i=r.hash[e]),n(r.linkedList,i),r.data[e]=t,r.linkedList.length>r.capacity&&this.remove(r.linkedList.end.key),this)},i.update=function(e,t){this._LRUCacheState;if(this.has(e)){var n=this.get(e);this.set(e,t(n))}return this},i.remove=function(e){var t=this._LRUCacheState,n=t.hash[e];return n?(n===t.linkedList.head&&(t.linkedList.head=n.p),n===t.linkedList.end&&(t.linkedList.end=n.n),r(n.n,n.p),delete t.hash[e],delete t.data[e],t.linkedList.length-=1,this):this},i.removeAll=function(){return this._LRUCacheState=new e(this._LRUCacheState.capacity),this},i.info=function(){var e=this._LRUCacheState;return{capacity:e.capacity,length:e.linkedList.length}},i.keys=function(){for(var e=this._LRUCacheState,t=[],n=e.linkedList.head;n;)t.push(n.key),n=n.p;return t},i.has=function(e){return!!this._LRUCacheState.hash[e]},i.staleKey=function(){return this._LRUCacheState.linkedList.end&&this._LRUCacheState.linkedList.end.key},i.popStale=function(){var e=this.staleKey();if(!e)return null;var t=[e,this._LRUCacheState.data[e]];return this.remove(e),t},t.NAME=\"LRUCache\",t.VERSION=\"v0.2.0\",t})},function(e,t,n){var r=n(31);e.exports=function(e,t){return r(e,t,\"-\")}},function(e,t,n){var r=n(102),i=n(161);e.exports=function(e,t){return i(r(e,t),t)}},function(e,t,n){var r=n(31);e.exports=function(e,t){return r(e,t,\"/\")}},function(e,t,n){(function(t){!function(n){function r(){}function i(e,t){return function(){e.apply(t,arguments)}}function a(e){if(\"object\"!=typeof this)throw new TypeError(\"Promises must be constructed via new\");if(\"function\"!=typeof e)throw new TypeError(\"not a function\");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],p(e,this)}function o(e,t){for(;3===e._state;)e=e._value;if(0===e._state)return void e._deferreds.push(t);e._handled=!0,d(function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null===n)return void(1===e._state?s:u)(t.promise,e._value);var r;try{r=n(e._value)}catch(e){return void u(t.promise,e)}s(t.promise,r)})}function s(e,t){try{if(t===e)throw new TypeError(\"A promise cannot be resolved with itself.\");if(t&&(\"object\"==typeof t||\"function\"==typeof t)){var n=t.then;if(t instanceof a)return e._state=3,e._value=t,void c(e);if(\"function\"==typeof n)return void p(i(n,t),e)}e._state=1,e._value=t,c(e)}catch(t){u(e,t)}}function u(e,t){e._state=2,e._value=t,c(e)}function c(e){2===e._state&&0===e._deferreds.length&&d(function(){e._handled||m(e._value)});for(var t=0,n=e._deferreds.length;t<n;t++)o(e,e._deferreds[t]);e._deferreds=null}function l(e,t,n){this.onFulfilled=\"function\"==typeof e?e:null,this.onRejected=\"function\"==typeof t?t:null,this.promise=n}function p(e,t){var n=!1;try{e(function(e){n||(n=!0,s(t,e))},function(e){n||(n=!0,u(t,e))})}catch(e){if(n)return;n=!0,u(t,e)}}var f=setTimeout,d=\"function\"==typeof t&&t||function(e){f(e,0)},m=function(e){\"undefined\"!=typeof console&&console&&console.warn(\"Possible Unhandled Promise Rejection:\",e)};a.prototype.catch=function(e){return this.then(null,e)},a.prototype.then=function(e,t){var n=new this.constructor(r);return o(this,new l(e,t,n)),n},a.all=function(e){var t=Array.prototype.slice.call(e);return new a(function(e,n){function r(a,o){try{if(o&&(\"object\"==typeof o||\"function\"==typeof o)){var s=o.then;if(\"function\"==typeof s)return void s.call(o,function(e){r(a,e)},n)}t[a]=o,0==--i&&e(t)}catch(e){n(e)}}if(0===t.length)return e([]);for(var i=t.length,a=0;a<t.length;a++)r(a,t[a])})},a.resolve=function(e){return e&&\"object\"==typeof e&&e.constructor===a?e:new a(function(t){t(e)})},a.reject=function(e){return new a(function(t,n){n(e)})},a.race=function(e){return new a(function(t,n){for(var r=0,i=e.length;r<i;r++)e[r].then(t,n)})},a._setImmediateFn=function(e){d=e},a._setUnhandledRejectionFn=function(e){m=e},void 0!==e&&e.exports?e.exports=a:n.Promise||(n.Promise=a)}(this)}).call(t,n(96).setImmediate)},function(e,t,n){\"use strict\";e.exports=n(300)},function(e,t,n){\"use strict\";var r=n(33);e.exports=r,r.prototype.done=function(e,t){(arguments.length?this.then.apply(this,arguments):this).then(null,function(e){setTimeout(function(){throw e},0)})}},function(e,t,n){\"use strict\";function r(e){var t=new i(i._61);return t._81=1,t._65=e,t}var i=n(33);e.exports=i;var a=r(!0),o=r(!1),s=r(null),u=r(void 0),c=r(0),l=r(\"\");i.resolve=function(e){if(e instanceof i)return e;if(null===e)return s;if(void 0===e)return u;if(e===!0)return a;if(e===!1)return o;if(0===e)return c;if(\"\"===e)return l;if(\"object\"==typeof e||\"function\"==typeof e)try{var t=e.then;if(\"function\"==typeof t)return new i(t.bind(e))}catch(e){return new i(function(t,n){n(e)})}return r(e)},i.all=function(e){var t=Array.prototype.slice.call(e);return new i(function(e,n){function r(o,s){if(s&&(\"object\"==typeof s||\"function\"==typeof s)){if(s instanceof i&&s.then===i.prototype.then){for(;3===s._81;)s=s._65;return 1===s._81?r(o,s._65):(2===s._81&&n(s._65),void s.then(function(e){r(o,e)},n))}var u=s.then;if(\"function\"==typeof u){return void new i(u.bind(s)).then(function(e){r(o,e)},n)}}t[o]=s,0==--a&&e(t)}if(0===t.length)return e([]);for(var a=t.length,o=0;o<t.length;o++)r(o,t[o])})},i.reject=function(e){return new i(function(t,n){n(e)})},i.race=function(e){return new i(function(t,n){e.forEach(function(e){i.resolve(e).then(t,n)})})},i.prototype.catch=function(e){return this.then(null,e)}},function(e,t,n){\"use strict\";var r=n(33);e.exports=r,r.prototype.finally=function(e){return this.then(function(t){return r.resolve(e()).then(function(){return t})},function(t){return r.resolve(e()).then(function(){throw t})})}},function(e,t,n){\"use strict\";e.exports=n(33),n(297),n(299),n(298),n(301),n(302)},function(e,t,n){\"use strict\";function r(e,t){for(var n=[],r=0;r<t;r++)n.push(\"a\"+r);var i=[\"return function (\"+n.join(\",\")+\") {\",\"var self = this;\",\"return new Promise(function (rs, rj) {\",\"var res = fn.call(\",[\"self\"].concat(n).concat([s]).join(\",\"),\");\",\"if (res &&\",'(typeof res === \"object\" || typeof res === \"function\") &&','typeof res.then === \"function\"',\") {rs(res);}\",\"});\",\"};\"].join(\"\");return Function([\"Promise\",\"fn\"],i)(a,e)}function i(e){for(var t=Math.max(e.length-1,3),n=[],r=0;r<t;r++)n.push(\"a\"+r);var i=[\"return function (\"+n.join(\",\")+\") {\",\"var self = this;\",\"var args;\",\"var argLength = arguments.length;\",\"if (arguments.length > \"+t+\") {\",\"args = new Array(arguments.length + 1);\",\"for (var i = 0; i < arguments.length; i++) {\",\"args[i] = arguments[i];\",\"}\",\"}\",\"return new Promise(function (rs, rj) {\",\"var cb = \"+s+\";\",\"var res;\",\"switch (argLength) {\",n.concat([\"extra\"]).map(function(e,t){return\"case \"+t+\":res = fn.call(\"+[\"self\"].concat(n.slice(0,t)).concat(\"cb\").join(\",\")+\");break;\"}).join(\"\"),\"default:\",\"args[argLength] = cb;\",\"res = fn.apply(self, args);\",\"}\",\"if (res &&\",'(typeof res === \"object\" || typeof res === \"function\") &&','typeof res.then === \"function\"',\") {rs(res);}\",\"});\",\"};\"].join(\"\");return Function([\"Promise\",\"fn\"],i)(a,e)}var a=n(33),o=n(173);e.exports=a,a.denodeify=function(e,t){return\"number\"==typeof t&&t!==1/0?r(e,t):i(e)};var s=\"function (err, res) {if (err) { rj(err); } else { rs(res); }}\";a.nodeify=function(e){return function(){var t=Array.prototype.slice.call(arguments),n=\"function\"==typeof t[t.length-1]?t.pop():null,r=this;try{return e.apply(this,arguments).nodeify(n,r)}catch(e){if(null===n||void 0===n)return new a(function(t,n){n(e)});o(function(){n.call(r,e)})}}},a.prototype.nodeify=function(e,t){if(\"function\"!=typeof e)return this;this.then(function(n){o(function(){e.call(t,null,n)})},function(n){o(function(){e.call(t,n)})})}},function(e,t,n){\"use strict\";var r=n(33);e.exports=r,r.enableSynchronous=function(){r.prototype.isPending=function(){return 0==this.getState()},r.prototype.isFulfilled=function(){return 1==this.getState()},r.prototype.isRejected=function(){return 2==this.getState()},r.prototype.getValue=function(){if(3===this._81)return this._65.getValue();if(!this.isFulfilled())throw new Error(\"Cannot get a value of an unfulfilled promise.\");return this._65},r.prototype.getReason=function(){if(3===this._81)return this._65.getReason();if(!this.isRejected())throw new Error(\"Cannot get a rejection reason of a non-rejected promise.\");return this._65},r.prototype.getState=function(){return 3===this._81?this._65.getState():this._81===-1||this._81===-2?0:this._81}},r.disableSynchronous=function(){r.prototype.isPending=void 0,r.prototype.isFulfilled=void 0,r.prototype.isRejected=void 0,r.prototype.getValue=void 0,r.prototype.getReason=void 0,r.prototype.getState=void 0}},function(e,t,n){(function(e,r){var i;!function(a){function o(e){throw new RangeError(D[e])}function s(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function u(e,t){var n=e.split(\"@\"),r=\"\";return n.length>1&&(r=n[0]+\"@\",e=n[1]),e=e.replace(I,\".\"),r+s(e.split(\".\"),t).join(\".\")}function c(e){for(var t,n,r=[],i=0,a=e.length;i<a;)t=e.charCodeAt(i++),t>=55296&&t<=56319&&i<a?(n=e.charCodeAt(i++),56320==(64512&n)?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--)):r.push(t);return r}function l(e){return s(e,function(e){var t=\"\";return e>65535&&(e-=65536,t+=L(e>>>10&1023|55296),e=56320|1023&e),t+=L(e)}).join(\"\")}function p(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:S}function f(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function d(e,t,n){var r=0;for(e=n?P(e/C):e>>1,e+=P(e/t);e>M*T>>1;r+=S)e=P(e/M);return P(r+(M+1)*e/(e+E))}function m(e){var t,n,r,i,a,s,u,c,f,m,h=[],y=e.length,_=0,g=w,v=N;for(n=e.lastIndexOf(k),n<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&o(\"not-basic\"),h.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<y;){for(a=_,s=1,u=S;i>=y&&o(\"invalid-input\"),c=p(e.charCodeAt(i++)),(c>=S||c>P((b-_)/s))&&o(\"overflow\"),_+=c*s,f=u<=v?A:u>=v+T?T:u-v,!(c<f);u+=S)m=S-f,s>P(b/m)&&o(\"overflow\"),s*=m;t=h.length+1,v=d(_-a,t,0==a),P(_/t)>b-g&&o(\"overflow\"),g+=P(_/t),_%=t,h.splice(_++,0,g)}return l(h)}function h(e){var t,n,r,i,a,s,u,l,p,m,h,y,_,g,v,E=[];for(e=c(e),y=e.length,t=w,n=0,a=N,s=0;s<y;++s)(h=e[s])<128&&E.push(L(h));for(r=i=E.length,i&&E.push(k);r<y;){for(u=b,s=0;s<y;++s)(h=e[s])>=t&&h<u&&(u=h);for(_=r+1,u-t>P((b-n)/_)&&o(\"overflow\"),n+=(u-t)*_,t=u,s=0;s<y;++s)if(h=e[s],h<t&&++n>b&&o(\"overflow\"),h==t){for(l=n,p=S;m=p<=a?A:p>=a+T?T:p-a,!(l<m);p+=S)v=l-m,g=S-m,E.push(L(f(m+v%g,0))),l=P(v/g);E.push(L(f(l,0))),a=d(n,_,r==i),n=0,++r}++n,++t}return E.join(\"\")}function y(e){return u(e,function(e){return x.test(e)?m(e.slice(4).toLowerCase()):e})}function _(e){return u(e,function(e){return R.test(e)?\"xn--\"+h(e):e})}var g=(\"object\"==typeof t&&t&&t.nodeType,\"object\"==typeof e&&e&&e.nodeType,\"object\"==typeof r&&r);g.global!==g&&g.window!==g&&g.self;var v,b=2147483647,S=36,A=1,T=26,E=38,C=700,N=72,w=128,k=\"-\",x=/^xn--/,R=/[^\\x20-\\x7E]/,I=/[\\x2E\\u3002\\uFF0E\\uFF61]/g,D={overflow:\"Overflow: input needs wider integers to process\",\"not-basic\":\"Illegal input >= 0x80 (not a basic code point)\",\"invalid-input\":\"Invalid input\"},M=S-A,P=Math.floor,L=String.fromCharCode;v={version:\"1.4.1\",ucs2:{decode:c,encode:l},decode:m,encode:h,toASCII:_,toUnicode:y},void 0!==(i=function(){return v}.call(t,n,t,e))&&(e.exports=i)}()}).call(t,n(98)(e),n(13))},function(e,t,n){\"use strict\";var r=n(138),i=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:\"&\",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},o=function(e,t){for(var n={},r=e.split(t.delimiter,t.parameterLimit===1/0?void 0:t.parameterLimit),a=0;a<r.length;++a){var o,s,u=r[a],c=u.indexOf(\"]=\")===-1?u.indexOf(\"=\"):u.indexOf(\"]=\")+1;c===-1?(o=t.decoder(u),s=t.strictNullHandling?null:\"\"):(o=t.decoder(u.slice(0,c)),s=t.decoder(u.slice(c+1))),i.call(n,o)?n[o]=[].concat(n[o]).concat(s):n[o]=s}return n},s=function(e,t,n){if(!e.length)return t;var r,i=e.shift();if(\"[]\"===i)r=[],r=r.concat(s(e,t,n));else{r=n.plainObjects?Object.create(null):{};var a=\"[\"===i.charAt(0)&&\"]\"===i.charAt(i.length-1)?i.slice(1,-1):i,o=parseInt(a,10);!isNaN(o)&&i!==a&&String(o)===a&&o>=0&&n.parseArrays&&o<=n.arrayLimit?(r=[],r[o]=s(e,t,n)):r[a]=s(e,t,n)}return r},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\\.([^.[]+)/g,\"[$1]\"):e,a=/(\\[[^[\\]]*])/,o=/(\\[[^[\\]]*])/g,u=a.exec(r),c=u?r.slice(0,u.index):r,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var p=0;null!==(u=o.exec(r))&&p<n.depth;){if(p+=1,!n.plainObjects&&i.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(u[1])}return u&&l.push(\"[\"+r.slice(u.index)+\"]\"),s(l,t,n)}};e.exports=function(e,t){var n=t||{};if(null!==n.decoder&&void 0!==n.decoder&&\"function\"!=typeof n.decoder)throw new TypeError(\"Decoder has to be a function.\");if(n.delimiter=\"string\"==typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:a.delimiter,n.depth=\"number\"==typeof n.depth?n.depth:a.depth,n.arrayLimit=\"number\"==typeof n.arrayLimit?n.arrayLimit:a.arrayLimit,n.parseArrays=n.parseArrays!==!1,n.decoder=\"function\"==typeof n.decoder?n.decoder:a.decoder,n.allowDots=\"boolean\"==typeof n.allowDots?n.allowDots:a.allowDots,n.plainObjects=\"boolean\"==typeof n.plainObjects?n.plainObjects:a.plainObjects,n.allowPrototypes=\"boolean\"==typeof n.allowPrototypes?n.allowPrototypes:a.allowPrototypes,n.parameterLimit=\"number\"==typeof n.parameterLimit?n.parameterLimit:a.parameterLimit,n.strictNullHandling=\"boolean\"==typeof n.strictNullHandling?n.strictNullHandling:a.strictNullHandling,\"\"===e||null===e||void 0===e)return n.plainObjects?Object.create(null):{};for(var i=\"string\"==typeof e?o(e,n):e,s=n.plainObjects?Object.create(null):{},c=Object.keys(i),l=0;l<c.length;++l){var p=c[l],f=u(p,i[p],n);s=r.merge(s,f,n)}return r.compact(s)}},function(e,t,n){\"use strict\";var r=n(138),i=n(136),a={brackets:function(e){return e+\"[]\"},indices:function(e,t){return e+\"[\"+t+\"]\"},repeat:function(e){return e}},o=Date.prototype.toISOString,s={delimiter:\"&\",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,n,i,a,o,s,u,c,l,p,f,d){var m=t;if(\"function\"==typeof u)m=u(n,m);else if(m instanceof Date)m=p(m);else if(null===m){if(a)return s&&!d?s(n):n;m=\"\"}if(\"string\"==typeof m||\"number\"==typeof m||\"boolean\"==typeof m||r.isBuffer(m)){if(s){return[f(d?n:s(n))+\"=\"+f(s(m))]}return[f(n)+\"=\"+f(String(m))]}var h=[];if(void 0===m)return h;var y;if(Array.isArray(u))y=u;else{var _=Object.keys(m);y=c?_.sort(c):_}for(var g=0;g<y.length;++g){var v=y[g];o&&null===m[v]||(h=Array.isArray(m)?h.concat(e(m[v],i(n,v),i,a,o,s,u,c,l,p,f,d)):h.concat(e(m[v],n+(l?\".\"+v:\"[\"+v+\"]\"),i,a,o,s,u,c,l,p,f,d)))}return h};e.exports=function(e,t){var n=e,r=t||{};if(null!==r.encoder&&void 0!==r.encoder&&\"function\"!=typeof r.encoder)throw new TypeError(\"Encoder has to be a function.\");var o=void 0===r.delimiter?s.delimiter:r.delimiter,c=\"boolean\"==typeof r.strictNullHandling?r.strictNullHandling:s.strictNullHandling,l=\"boolean\"==typeof r.skipNulls?r.skipNulls:s.skipNulls,p=\"boolean\"==typeof r.encode?r.encode:s.encode,f=\"function\"==typeof r.encoder?r.encoder:s.encoder,d=\"function\"==typeof r.sort?r.sort:null,m=void 0!==r.allowDots&&r.allowDots,h=\"function\"==typeof r.serializeDate?r.serializeDate:s.serializeDate,y=\"boolean\"==typeof r.encodeValuesOnly?r.encodeValuesOnly:s.encodeValuesOnly;if(void 0===r.format)r.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,r.format))throw new TypeError(\"Unknown format option provided.\");var _,g,v=i.formatters[r.format];\"function\"==typeof r.filter?(g=r.filter,n=g(\"\",n)):Array.isArray(r.filter)&&(g=r.filter,_=g);var b=[];if(\"object\"!=typeof n||null===n)return\"\";var S;S=r.arrayFormat in a?r.arrayFormat:\"indices\"in r?r.indices?\"indices\":\"repeat\":\"indices\";var A=a[S];_||(_=Object.keys(n)),d&&_.sort(d);for(var T=0;T<_.length;++T){var E=_[T];l&&null===n[E]||(b=b.concat(u(n[E],E,A,c,l,p?f:null,g,d,m,h,v,y)))}return b.join(o)}},function(e,t,n){\"use strict\";function r(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,t,n,a){t=t||\"&\",n=n||\"=\";var o={};if(\"string\"!=typeof e||0===e.length)return o;e=e.split(t);var s=1e3;a&&\"number\"==typeof a.maxKeys&&(s=a.maxKeys);var u=e.length;s>0&&u>s&&(u=s);for(var c=0;c<u;++c){var l,p,f,d,m=e[c].replace(/\\+/g,\"%20\"),h=m.indexOf(n);h>=0?(l=m.substr(0,h),p=m.substr(h+1)):(l=m,p=\"\"),f=decodeURIComponent(l),d=decodeURIComponent(p),r(o,f)?i(o[f])?o[f].push(d):o[f]=[o[f],d]:o[f]=d}return o};var i=Array.isArray||function(e){return\"[object Array]\"===Object.prototype.toString.call(e)}},function(e,t,n){\"use strict\";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case\"string\":return e;case\"boolean\":return e?\"true\":\"false\";case\"number\":return isFinite(e)?e:\"\";default:return\"\"}};e.exports=function(e,t,n,s){return t=t||\"&\",n=n||\"=\",null===e&&(e=void 0),\"object\"==typeof e?r(o(e),function(o){var s=encodeURIComponent(i(o))+n;return a(e[o])?r(e[o],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[o]))}).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):\"\"};var a=Array.isArray||function(e){return\"[object Array]\"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){\"use strict\";t.decode=t.parse=n(306),t.encode=t.stringify=n(307)},function(e,t,n){\"use strict\";function r(e){return i.expandTraitsAndResourceTypes(e)}var i=n(25);t.expandTraitsAndResourceTypes=r},function(e,t,n){\"use strict\";t.modify=n(311)},function(e,t,n){\"use strict\";function r(e){return new u.TypeDeclarationImpl(e)}function i(e){return new u.ObjectTypeDeclarationImpl(e)}function a(e,t){e.setSchema(t)}function o(e,t){var n=(c.getUniverse(\"RAML10\").type(c.universesInfo.Universe10.ExampleSpec.name),c.universesInfo.Universe10.TypeDeclaration.properties.example.name),r=e.highLevel(),i=r.lowLevel(),a=r.children().filter(function(e){return e.lowLevel().key()==n}),o=l.createNode(n);p.setAttr(o,t),a.length>0&&(p.removeNode(i,a[0].lowLevel()),a[0]._node=o,p.insertNode(i,o)),r.createAttr&&r.createAttr(n,t)}function s(e,t){e.add(t)}var u=n(34),c=n(0),l=n(9),p=n(20);t.createTypeDeclaration=r,t.createObjectTypeDeclaration=i,t.setTypeDeclarationSchema=a,t.setTypeDeclarationExample=o,t.addChild=s},function(e,t,n){\"use strict\";function r(e,t,n){return new i.Project(e,t,n)}var i=n(9);t.createProject=r},function(e,t,n){\"use strict\";function r(e){return\"Api\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function i(e){return\"FullUriTemplateString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function a(e){return\"UriTemplate\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function o(e){return\"StringType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function s(e){return\"ValueType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function u(e){return\"AnyType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function c(e){return\"NumberType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function l(e){return\"BooleanType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function p(e){return\"Reference\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function f(e){return\"ResourceTypeRef\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function d(e){return\"ResourceType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function m(e){return\"Method\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function h(e){return\"MethodBase\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function y(e){return\"Response\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function _(e){return\"StatusCodeString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function g(e){return\"Parameter\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function v(e){return\"ParameterLocation\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function b(e){return\"MarkdownString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function S(e){return\"StringTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function A(e){return\"BooleanTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function T(e){return\"NumberTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function E(e){return\"IntegerTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function C(e){return\"DateTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function N(e){return\"FileTypeDeclaration\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function w(e){return\"BodyLike\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function k(e){return\"SchemaString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function x(e){return\"JSonSchemaString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function R(e){return\"XMLSchemaString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function I(e){return\"ExampleString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function D(e){return\"JSONExample\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function M(e){return\"XMLExample\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function P(e){return\"XMLBody\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function L(e){return\"JSONBody\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function O(e){return\"SecuritySchemeRef\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function U(e){return\"AbstractSecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function F(e){return\"SecuritySchemePart\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function B(e){return\"TraitRef\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function K(e){return\"Trait\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function V(e){return\"SecuritySchemeSettings\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function j(e){return\"OAuth1SecuritySchemeSettings\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function W(e){return\"FixedUri\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function q(e){return\"OAuth2SecuritySchemeSettings\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function z(e){return\"OAuth2SecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function H(e){return\"OAuth1SecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function Y(e){return\"BasicSecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function J(e){return\"DigestSecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function G(e){return\"CustomSecurityScheme\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function X(e){return\"MimeType\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function $(e){return\"RelativeUriString\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function Q(e){return\"GlobalSchema\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function Z(e){return\"RAMLSimpleElement\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function ee(e){return\"DocumentationItem\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}function te(e){return\"Resource\"==e.kind()&&\"RAML08\"==e.RAMLVersion()}t.isApi=r,t.isFullUriTemplateString=i,t.isUriTemplate=a,t.isStringType=o,t.isValueType=s,t.isAnyType=u,t.isNumberType=c,t.isBooleanType=l,t.isReference=p,t.isResourceTypeRef=f,t.isResourceType=d,t.isMethod=m,t.isMethodBase=h,t.isResponse=y,t.isStatusCodeString=_,t.isParameter=g,t.isParameterLocation=v,t.isMarkdownString=b,t.isStringTypeDeclaration=S,t.isBooleanTypeDeclaration=A,t.isNumberTypeDeclaration=T,t.isIntegerTypeDeclaration=E,t.isDateTypeDeclaration=C,t.isFileTypeDeclaration=N,t.isBodyLike=w,t.isSchemaString=k,t.isJSonSchemaString=x,t.isXMLSchemaString=R,t.isExampleString=I,t.isJSONExample=D,t.isXMLExample=M,t.isXMLBody=P,t.isJSONBody=L,t.isSecuritySchemeRef=O,t.isAbstractSecurityScheme=U,t.isSecuritySchemePart=F,t.isTraitRef=B,t.isTrait=K,t.isSecuritySchemeSettings=V,t.isOAuth1SecuritySchemeSettings=j,t.isFixedUri=W,t.isOAuth2SecuritySchemeSettings=q,t.isOAuth2SecurityScheme=z,t.isOAuth1SecurityScheme=H,t.isBasicSecurityScheme=Y,t.isDigestSecurityScheme=J,t.isCustomSecurityScheme=G,t.isMimeType=X,t.isRelativeUriString=$,t.isGlobalSchema=Q,t.isRAMLSimpleElement=Z,t.isDocumentationItem=ee,t.isResource=te},function(e,t,n){\"use strict\";function r(e){for(var t=-1,n=e.lowLevel().children(),r=0;r<n.length;r++){var i=n[r];if(i.isMapping()){var a=i.asMapping().key.value,o=e.definition().property(a);o&&(o.isFromParentValue()||o.range().hasValueTypeInHierarchy())&&(t=r)}}return t}function i(e,t,n,r){var i=null,a=n&&n.getAdapter(w.RAMLPropertyService).isEmbedMap();if(a&&A.find(e.lowLevel().children(),function(e){return e.key()==n.nameId()})&&(a=!1),r||a){var o=_(e);i=o?o:v.InsertionPoint.atStart()}return i}function a(e){for(var t=e;t.originalNode&&t.originalNode();)t=t.originalNode();return t.asMapping()}function o(e,t){e.isStub()||e.clearChildrenCache();var n=e.children(),r=t.property()&&t.property().getAdapter(w.RAMLPropertyService).isEmbedMap();r&&A.find(e.lowLevel().children(),function(e){return e.key()==t.property().nameId()})&&(r=!1);if(!t.isAttr()&&!r||N.isMethodType(e.definition())&&t.property&&N.isIsProperty(t.property())){var i=t.property().nameId(),o=e.definition(),s=(o.allProperties(),e.lowLevel().children()),u=t.property();if(N.isTraitsProperty(u)||N.isResourceTypesProperty(u))return A.find(s,function(e){return!!e.isMapping()&&a(e).key.value===t.property().nameId()});var c=o.propertyIndex(i);if(c<0)return null;for(var l=0;l<s.length;l++){var p=s[l];if(p.isMapping()){var f=a(p).key.value;if(o.propertyIndex(f)>c){var d=l-1;return d<0?null:(console.log(\"insert to node: \"+d),s[d])}}}return null}for(var m=null,l=0;l<n.length&&n[l].isAttr();l++)n[l].property&&n[l].property()&&N.isIsProperty(n[l].property())||(m=n[l].lowLevel());return null==m&&(m=e.lowLevel()),m}function s(e,t){if(e.isStub()){if(E.ASTNodeImpl.isInstance(t)){if(t.isInEdit)return}if(!e._children)return;return void(e._children=e._children.filter(function(e){return e!=t}))}var n=new S.CompositeCommand;if(E.ASTNodeImpl.isInstance(t)){var r=t;r.property().getAdapter(w.RAMLPropertyService).isMerged()?n.commands.push(S.removeNode(e.lowLevel(),r.lowLevel())):1==e.elementsOfKind(r.property().nameId()).length?n.commands.push(S.removeNode(e.lowLevel(),r.lowLevel().parent().parent())):n.commands.push(S.removeNode(e.lowLevel(),r.lowLevel()))}else n.commands.push(S.removeNode(e.lowLevel(),t.lowLevel()));e.lowLevel().execute(n)}function u(e){var t=(e.lowLevel().root(),new S.CompositeCommand),n=v.createMap([]);t.commands.push(S.initRamlFile(e.lowLevel(),n)),e.lowLevel().execute(t);var r=e.root();r._node=n,r.clearChildrenCache()}function c(e,t){if(t!=e.value()){var n=new S.CompositeCommand;if(\"string\"==typeof t){var r=t;e.property().isFromParentKey()||e.property().isAnnotation()?(e.property().isAnnotation()&&(r=\"(\"+r+\")\"),n.commands.push(S.setKey(e.lowLevel(),r))):r&&0!=r.length||e.isEmbedded()?(r||(r=\"\"),n.commands.push(S.setAttr(e.lowLevel(),r))):(n.commands.push(S.removeNode(e.lowLevel().parent(),e.lowLevel())),e.parent().clearChildrenCache())}else{if(e.property().isFromParentKey())throw new Error(\"couldn't set structured value to a key: \"+e.property().nameId());var i=t;n.commands.push(S.setAttrStructured(e.lowLevel(),i))}e.lowLevel().execute(n)}}function l(e,t){var n=v.createScalar(t),r=e.lowLevel();r.isScalar()?r=r.parent():r.isMapping();var i=new S.CompositeCommand;i.commands.push(S.insertNode(r,n,null,!0)),e.lowLevel().execute(i),e.parent().clearChildrenCache()}function p(e,t){var n=e.lowLevel();if(n.isScalar())n=n.parent();else if(n.isMapping()){e.lowLevel()}var r=new S.CompositeCommand;r.commands.push(S.insertNode(n,t.lowLevel(),null,!0)),e.lowLevel().execute(r),e.parent().clearChildrenCache()}function f(e){var t=e.lowLevel().parent();if(!e.property().isMultiValue()&&e.isEmbedded())e.setValue(\"\");else{var n=new S.CompositeCommand;n.commands.push(S.removeNode(t,e.lowLevel())),e.lowLevel().execute(n),e.parent().clearChildrenCache()}}function d(e,t){if(!e.property().isMultiValue())throw new Error(\"setValue(string[]) only apply to multi-values properties\");var n=e.parent();if(n&&h(n)){var r=new S.CompositeCommand;return r.commands.push(S.setAttr(n.lowLevel(),t[0])),void n.lowLevel().execute(r)}if(e.isEmpty());else{n.lowLevel();n.attributes(e.name()).forEach(function(e){return e.remove()})}1==t.length&&e.property().isDescriminator()?n.attrOrCreate(e.name()).setValue(t[0]):t.forEach(function(t){return n.attrOrCreate(e.name()).addValue(t)})}function m(e,t){if(t!=e.name()){var n=new S.CompositeCommand;n.commands.push(S.setKey(e.lowLevel(),t)),e.lowLevel().execute(n)}}function h(e){return!!(e.definition()&&e.definition().isAssignableFrom(C.Universe10.TypeDeclaration.name)&&e.lowLevel()&&e.lowLevel().valueKind()===T.Kind.SCALAR)}function y(e,t,n){var a=v.createMapping(t,n);if(e.definition()&&e.definition().isAssignableFrom(C.Universe10.TypeDeclaration.name)&&e.lowLevel()&&(e.lowLevel().valueKind()===T.Kind.SCALAR||!e.lowLevel()._node.value)){var o=t,s=v.createMapping(o,e.lowLevel().value()),u=new S.CompositeCommand;u.commands.push(S.setAttr(e.lowLevel(),\"\")),e.lowLevel().execute(u),u=new S.CompositeCommand;var c=i(e,s,e.definition().property(o),!0);u.commands.push(S.insertNode(e.lowLevel(),s,c)),e.lowLevel().execute(u),e.resetChildren();var l=e.attr(o)&&e.attr(o).lowLevel();if(l)return u=new S.CompositeCommand,u.commands.push(S.setAttr(l,n)),l.execute(u),void e.clearChildrenCache()}if(e.isStub()){var p=r(e);e.lowLevel().addChild(a,p+1)}else{e.isEmptyRamlFile()&&e.initRamlFile();var u=new S.CompositeCommand,c=i(e,a,e.definition().property(t),!0);u.commands.push(S.insertNode(e.lowLevel(),a,c)),e.lowLevel().execute(u)}e.clearChildrenCache()}function _(e){var t=e.lowLevel().children(),n=r(e);return n<0?null:t[n]}function g(e,t){!e.isStub()&&e.isEmptyRamlFile()&&e.initRamlFile();var n=t.lowLevel();if(e._children||(e._children=[]),!t.property()){var i=t,a=e.definition().allProperties(),s=null;if(a.forEach(function(e){var t=e.range();t==i.definition()&&(s=e),A.find(i.definition().allSuperTypes(),function(e){return e==t})&&(s=e)}),!s)throw new Error(\"Unable to find correct child\");i.patchProp(s)}var u=o(e,t),c=new S.CompositeCommand,l=null;if(t.property().getAdapter(w.RAMLPropertyService).isMerged()||t.property().range().hasValueTypeInHierarchy())c.commands.push(S.insertNode(e.lowLevel(),t.lowLevel(),u)),l=e.lowLevel();else{var p=t.property().nameId(),f=e.lowLevel(),d=e.lowLevel().find(p);if(l=d,d){var m=null===d.value()&&d.key&&d.key()===C.Universe10.Api.properties.types.name,h=!m&&t.property().getAdapter(w.RAMLPropertyService).isEmbedMap();c.commands.push(S.insertNode(d,t.lowLevel(),u,h))}else{var y=null;if(t.property().getAdapter(w.RAMLPropertyService).isEmbedMap()){var _=\"RAML10\"==e.definition().universe().version();y=n.isValueMap()&&_?v.createMapNode(p):v.createSeqNode(p),y.addChild(t.lowLevel())}else y=v.createNode(p),y.addChild(t.lowLevel());c.commands.push(S.insertNode(f,y,u)),l=f}}if(e.isStub()){var g=r(e);return g<0?e._children.push(t):e._children.splice(g,0,t),void c.commands.forEach(function(e){return l.addChild(e.value)})}e.lowLevel().execute(c),e._children.push(t),t.setParent(e)}var v=n(9),b=n(0),S=n(20),A=n(1),T=n(14),E=n(4),C=n(3),N=n(5),w=b;t.removeNodeFrom=s,t.initEmptyRAMLFile=u,t.setValue=c,t.addStringValue=l,t.addStructuredValue=p,t.removeAttr=f,t.setValues=d,t.setKey=m,t.createAttr=y,t.addToNode=g},function(e,t,n){\"use strict\";var r=n(35),i=n(90),a=function(){function e(){this.uriToResources={},this.conflictingUriToResources={}}return e.prototype.validateApi=function(e,t){var n=this,a=e.resources();a.forEach(function(e){n.acceptResource(e),e.resources().forEach(function(e){return n.acceptResource(e)})});for(var o in this.conflictingUriToResources){var a=this.conflictingUriToResources[o];if(a.length>1){var s={};a.forEach(function(e){var t=e.highLevel(),n=\"\";null!=t.parent()&&(n+=t.parent().id()+\".\"),n+=t.localId();var r=s[n];null==r&&(r=[],s[n]=r),r.push(e)});Object.keys(s).length>1&&a.forEach(function(e){t.accept(r.createIssue1(i.RESOURCES_SHARE_SAME_URI,{},e.highLevel(),!1))})}}},e.prototype.acceptResource=function(e){var t=e.absoluteUri(),n=this.uriToResources[t];n||(n=[],this.uriToResources[t]=n),n.push(e),n.length>1&&(this.conflictingUriToResources[t]=n)},e}();e.exports=a},function(e,t,n){\"use strict\";function r(e,t){var n=e.root().definition().universe(),i=e.lowLevel().key();if(i&&S(i,t,null,!0,n),e.children().forEach(function(e){return r(e,t)}),y.ASTPropImpl.isInstance(e)){var a=e,o=a.value();if(\"string\"==typeof o){var s=o;S(s,t,a,!1,n)}else e.lowLevel().visit(function(e){if(e.value()){S(e.value()+\"\",t,a,!0,n)}return!0})}else if(y.BasicASTNode.isInstance(e)){var o=e.lowLevel().value();if(\"string\"==typeof o){var s=o;S(s,t,null,!1,n)}else e.lowLevel().visit(function(e){if(e.value()){S(e.value()+\"\",t,null,!0,n)}return!0})}}function i(e,t,n){void 0===n&&(n=[]),e.optional()&&(n=n.concat(\"/\"));var r=e.value();if(\"string\"==typeof r)for(var a=r,o=b(a),s=o.parameterUsages,u=0,c=s;u<c.length;u++){var l=c[u],p=t[l];null==p&&(p=[],t[l]=p),p.push(n)}else for(var f=0,d=e.children();f<d.length;f++){var m=d[f];i(m,t,n.concat(m.key()))}}function a(e,t){var n={},a={};r(t,n),i(t.lowLevel(),a);for(var o=0,s=Object.keys(a);o<s.length;o++){var u=s[o];a[u]=m.unique(a[u])}e.getAdapter(_.RAMLService).setInlinedTemplates(!0),Object.keys(n).forEach(function(r){var i=null;n[r].length>0&&(i=n[r][0].attr);var o=new f.UserDefinedProp(r,i);o.withDomain(e);var s=a[r];o.getAdapter(_.RAMLPropertyService).putMeta(\"templatePaths\",s);var u;if(\"RAML10\"==t.definition().universe().version()){u=n[r].filter(function(e){return v.isStringTypeType(e.tp)}).length>0?h.Universe10.StringType.name:h.Universe10.AnyType.name}else u=h.Universe08.StringType.name;var c=m.unique(n[r].map(function(e){return e.tp})).filter(function(e){return e&&e.nameId()!=u});o.withRange(1==c.length?c[0]:t.definition().universe().type(u)),o.withRequired(!0),1==c.length&&\"RAML10\"==t.definition().universe().version()&&c[0].key()==h.Universe10.SchemaString&&o.getAdapter(_.RAMLPropertyService).setTypeExpression(!0),o.unmerge()});var c=new f.UserDefinedProp(\"____key\",t);return c.withDomain(e),c.withKey(!0),c.withFromParentKey(!0),c.withRange(t.definition().universe().type(h.Universe08.StringType.name)),e}function o(e,t){\"RAML08\"==t.universe().version()&&e.getAdapter(_.RAMLService).withAllowAny();var n=t.property(t.getAdapter(_.RAMLService).getReferenceIs());return n&&n.range().properties().forEach(function(t){var n=new f.Property(t.nameId());n.unmerge(),n.withDomain(e),n.withRange(t.range()),n.withMultiValue(t.isMultiValue())}),e}function s(e){if(!e)return null;if(e.associatedType())return e.associatedType();var t=e.lowLevel().unit(),n=t?t.path():\"\";d.setPropertyConstructor(function(t){var n=null,r=e.elementsOfKind(\"properties\").filter(function(e){return e.name()==t});r&&(n=r[0]);var i=new f.UserDefinedProp(t,n);return i.unmerge(),i});try{var r=e.definition();if(e.property()&&e.property().nameId()==h.Universe10.LibraryBase.properties.annotationTypes.name){var i=new A(e.name(),e.definition().universe(),e,n,\"\"),s=u(e);i._superTypes.push(s),0==e.elementsOfKind(h.Universe10.ObjectTypeDeclaration.properties.properties.name).length&&i.getAdapter(_.RAMLService).withAllowAny();var c=r.getAdapter(_.RAMLService).getExtendedType();return c&&i._superTypes.push(c),i}var i=new f.UserDefinedClass(e.name(),e.definition().universe(),e,n,\"\");if(e.setAssociatedType(i),r.getAdapter(_.RAMLService).isInlinedTemplates())return a(i,e);if(r.getAdapter(_.RAMLService).getReferenceIs())return o(i,r);var l=u(e);l.getAdapter(_.RAMLService).setDeclaringNode(e),e.setAssociatedType(l)}finally{d.setPropertyConstructor(null)}return l}function u(e){return d.toNominal(e.parsedType(),function(t){var n=e.definition().universe().type(t);if(!n){new f.UserDefinedClass(\"\",e.definition().universe(),e,\"\",\"\")}return n})}function c(e){return function(t){var n=e.type(t);if(!n){new f.UserDefinedClass(\"\",e,null,\"\",\"\")}return n}}function l(e,t){var n=m.find(e.elementsOfKind(\"types\"),function(e){return e.name()==t.name()});n&&d.setPropertyConstructor(function(e){var t=n.elementsOfKind(\"properties\").filter(function(t){return t.name()==e}),r=null;if(t&&t.length>0)r=t[0];else{var t=n.elementsOfKind(\"facets\").filter(function(t){return t.name()==e});t&&t.length>0&&(r=t[0])}var i=new f.UserDefinedProp(e,r);return i.unmerge(),i});var r=c(e.definition().universe());return d.toNominal(t,r)}var p=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},f=n(0),d=f.rt,m=n(1),h=n(3),y=n(4),_=f,g=n(35),v=n(5);d.setPropertyConstructor(function(e){var t=new f.Property(e);return t.unmerge(),t});var b=function(e){for(var t=[],n=0;;){var r=e.indexOf(\"<<\",n);if(r==-1)break;var i=e.indexOf(\">>\",r),a=0==r&&i==e.length-2,o=e.substring(r+2,i);n=r+2;var s=o.indexOf(\"|\");s!=-1&&(o=o.substring(0,s)),o=o.trim(),t.push(o)}return{parameterUsages:t,isFull:a}},S=function(e,t,n,r,i){var a=b(e),o=a.parameterUsages,s=a.isFull,u=n?n.property().range():null;n&&(n.property().nameId()!=h.Universe10.TypeDeclaration.properties.type.name&&n.property().nameId()!=h.Universe10.TypeDeclaration.properties.schema.name||n.property().domain().key()==h.Universe10.TypeDeclaration&&(u=i.type(h.Universe10.SchemaString.name))),!s||r?u=i.type(h.Universe10.StringType.name):null==u&&\"RAML10\"==i.version()&&(u=i.type(h.Universe10.AnyType.name));for(var c=0,l=o;c<l.length;c++){var p=l[c];if(null==g.RESERVED_TEMPLATE_PARAMETERS[p]){var f=t[p];f?f.push({tp:u,attr:n}):t[p]=[{tp:u,attr:n}]}}},A=function(e){function t(){e.apply(this,arguments)}return p(t,e),t.prototype.allProperties=function(e){void 0===e&&(e={});var t=this.superTypes()[0].allProperties();if(1==t.length&&\"annotations\"==t[0].nameId()){var n=this.getAdapter(f.RAMLService).getDeclaringNode(),r=new f.UserDefinedProp(\"value\",n);r.withDomain(this),r.withCanBeValue(),r.withRequired(!1);this.superTypes()[0];t=[],r.withRange(r.node().asElement().definition().universe().type(\"string\")),t.push(r)}return t},t.prototype.isAnnotationType=function(){return!0},t}(f.UserDefinedClass);t.typeFromNode=s,t.convertType=l},function(e,t,n){\"use strict\";var r=n(1),i=n(64),a=n(34),o=function(){function e(){}return e.prototype.generateText=function(e){var t=this,n=JSON.parse(e),r=n.items;if(!r)return\"\";var i=\"\",a=r instanceof Array?r:[r];return i+=\"types:\\n\",a.forEach(function(e){i+=\"  - \"+e.title+\":\\n\",i+=t.generateObj(e,3)}),i},e.prototype.generateObj=function(e,t){var n=\"\";if(n+=i.indent(t,\"type: \"+e.type)+\"\\n\",e.properties){n+=i.indent(t,\"properties:\\n\");for(var r in e.properties){var a=e.properties[r];n+=i.indent(t+1,r+\":\\n\"),n+=\"object\"==a.type?this.generateObj(a,t+2):i.indent(t+2,\"type: \"+a.type)+\"\\n\"}return n}},e.prototype.generateTo=function(e,t,n){var r=this,i=JSON.parse(t),o=i.items;if(o){var s=o instanceof Array?o:[o],u=[];return s.forEach(function(t){var n=new a.ObjectTypeDeclarationImpl(t.title);r.generateObjTo(n,t),new a.BasicSecuritySchemeImpl(e).addToProp(n,\"types\"),u.push(t.title)}),u}i.title&&(n=i.title);var c=new a.ObjectTypeDeclarationImpl(n);return this.generateObjTo(c,i),new a.BasicSecuritySchemeImpl(e).addToProp(c,\"types\"),[n]},e.prototype.generateObjTo=function(e,t){if(e.setType(t.type),t.properties)for(var n in t.properties){var r=t.properties[n],i=this.makeTypeField(n,r);r.type,e.addToProp(i,\"properties\")}},e.prototype.makeTypeField=function(e,t){var n=this.makeType(e,t.type);if(t.type&&n.setType(t.type),\"number\"==t.type){var r=n;void 0!=t.minimum&&r.setMinimum(t.minimum),void 0!=t.maximum&&r.setMaximum(t.maximum)}if(\"array\"==t.type){var i=t.items.type;n.setType(i+\"[]\");var a=n;void 0!=t.minItems&&a.setMinItems(t.minItems),void 0!=t.maxItems&&a.setMaxItems(t.maxItems),void 0!=t.uniqueItems&&a.setUniqueItems(t.uniqueItems)}return\"object\"==t.type&&this.generateObjTo(n,t),n},e.prototype.makeType=function(e,t){return\"number\"==t?new a.NumberTypeDeclarationImpl(e):\"string\"==t?new a.StringTypeDeclarationImpl(e):\"array\"==t?new a.ArrayTypeDeclarationImpl(e):new a.ObjectTypeDeclarationImpl(e)},e.prototype.generateItemsTo=function(e,t){var n=t.items;if(n){(n instanceof Array?n:[n]).forEach(function(e){})}},e}();t.SchemaToModelGenerator=o;var s=function(){function e(){}return e.prototype.generateSchema=function(e){var t=this.generateType(e);return t.$schema=\"http://json-schema.org/draft-04/schema#\",t},e.prototype.isSimpleType=function(e){return\"string\"==e||\"number\"==e||\"boolean\"==e||\"object\"==e},e.prototype.generateType=function(e){var t=this.allTypes(e),n={};n.title=e.attrValue(\"name\");if(e.attrValue(\"type\")){var i=e.attributes(\"type\"),a=!1,o=!1;for(var s in i){var u=i[s].value(),c=i[s].lowLevel();if(n.type=\"\",c.isValueInclude()){var l=JSON.parse(u);n.type=\"object\",n.properties=l.properties}else if(this.isSimpleType(u)){if(n.type=u,o=!0,a)throw new Error(\"couldn't mix user defined and basic types in inheritance\")}else{var p=this.resolveType(e,u);if(p){var f=this.generateTypeExp(u,t);if(n.properties?r.extend(n.properties,f.properties):n.properties=f.properties,n.type=\"object\",a=!0,o)throw new Error(\"couldn't mix user defined and basic types in inheritance\")}else{var f=this.generateTypeExp(u,t);n.type=\"object\",a=!0,f.anyOf&&(n.anyOf=f.anyOf)}}}}else n.type=\"object\";var d=this.generateProperties(e);return n.properties?r.extend(n.properties,d):n.properties=d,n},e.prototype.makeUnion=function(e,t){var n=this,r=[];return e.forEach(function(e){e=e.trim(),t[e]?r.push({type:\"object\",properties:n.generateType(t[e]).properties}):r.push({type:e})}),r},e.prototype.generateTypeExp=function(e,t){var n={};if(i.endsWith(e,\"[]\"))n.type=\"array\",n.items={type:e.substring(0,e.length-2)};else if(e.indexOf(\"|\")>0){var r=e.split(\"|\");n.anyOf=this.makeUnion(r,t)}else if(t[e]){var a=this.generateType(t[e]);n.type=\"object\",n.properties=a.properties}else n.type=e;return n},e.prototype.allTypes=function(e){var t=e.root(),n=t.elementsOfKind(\"types\"),r={};return n.forEach(function(e){r[e.name()]=e}),r},e.prototype.resolveType=function(e,t){return this.allTypes(e)[t]},e.prototype.generateProperty=function(e,t){var n=this,i=this.allTypes(e),a={};e.definition().allProperties().forEach(function(t){if(\"name\"!=t.nameId()){var o=e.attrValue(t.nameId());if(null!=o&&void 0!=o&&\"undefined\"!=o)if(\"type\"==t.nameId()){var s=n.generateTypeExp(o,i);r.extend(a,s)}else if(\"enum\"==t.nameId()){var u=e.attributes(\"enum\"),c=u.map(function(e){return e.value()});a.enum=c}else a[t.nameId()]=o}}),t&&(a.required=!1);var o=(e.elements(),this.generateProperties(e));return Object.getOwnPropertyNames(o).length>0&&(a.properties=o),a},e.prototype.generateProperties=function(e){var t=this,n={},r=!0;return e.elements().forEach(function(e){var i=e.attrValue(\"name\");if(\"string\"==typeof i){i=i.trim();var a=e.optional();n[i]=t.generateProperty(e,a),r=!1}}),n},e}();t.ModelToSchemaGenerator=s},function(e,t,n){\"use strict\";function r(e,t){void 0===t&&(t=!1);var n=E.Universe10.ResourceBase.properties.uriParameters.name,r=e.elementsOfKind(n);return R.isResourceType(e.definition())?a(r,e.attr(E.Universe10.Resource.properties.relativeUri.name).value(),e,n,t):r}function i(e,t){void 0===t&&(t=!0);var n=e.attr(E.Universe10.Api.properties.baseUri.name),r=n?n.value():\"\",i=E.Universe10.Api.properties.baseUriParameters.name;return a(e.elementsOfKind(i),r,e,i,t)}function a(e,t,n,r,i){if(\"string\"!=typeof t)return[];var a=n.definition(),o=a.property(r);if(!t)return[];var s={};e.forEach(function(e){var t=s[e.name()];t||(t=[],s[e.name()]=t),t.push(e)});for(var u=[],c=0,l={},p=t.indexOf(\"{\");p>=0&&!((c=t.indexOf(\"}\",++p))<0);p=t.indexOf(\"{\",c)){var f=t.substring(p,c);if(l[f]=!0,s[f])s[f].forEach(function(e){return u.push(e)});else{var d=a.universe(),m=d.type(T.Universe10.StringTypeDeclaration.name),h=S.createStubNode(m,null,f,n.lowLevel().unit());h.setParent(n),i&&h.wrapperNode().meta().setCalculated(),h.attrOrCreate(\"name\").setValue(f),h.patchProp(o),u.push(h)}}return Object.keys(s).filter(function(e){return!l[e]}).forEach(function(e){return s[e].forEach(function(e){return u.push(e)})}),u}function o(e){var t=\"\",n=e;do{e=n,t=e.attr(T.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent()}while(R.isResourceType(n.definition()));return t}function s(e){if(!R.isResourceType(e.definition()))return null;var t=\"\",n=e;do{e=n,t=e.attr(T.Universe10.Resource.properties.relativeUri.name).value()+t,n=e.parent()}while(R.isResourceType(n.definition()));t=t.replace(/\\/\\//g,\"/\");var r=\"\",i=n.attr(T.Universe10.Api.properties.baseUri.name);return i&&(r=i?i.value():\"\"),r=r?r:\"\",C.stringEndsWith(r,\"/\")&&(t=t.substring(1)),t=r+t}function u(e,t){void 0===t&&(t=!1);var n=p(e,!0,t);return n.length>0?n[0]:null}function c(e,t){return void 0===t&&(t=!1),p(e,!1,t)}function l(e,t){void 0===t&&(t=!1);var n;n=e.isJSONString()||e.isYAML()?e.asJSON():e.original();var r={value:n,strict:e.strict(),name:e.name()};if(e.hasAnnotations()){var i=e.annotations(),a=f(i);Object.keys(a).length>0&&(r.annotations=a)}if(e.hasScalarAnnotations()){var o=e.scalarsAnnotations(),s={};Object.keys(o).forEach(function(e){var t=f(o[e]);Object.keys(t).length>0&&(s[e]=Object.keys(t).map(function(e){return t[e]}))}),Object.keys(s).length>0&&(r.scalarsAnnotations=s)}var u=e.displayName();u&&(r.displayName=u);var c=e.description();return null!=c&&(r.description=c),t&&(r.asXMLString=e.asXMLString()),r}function p(e,t,n){void 0===n&&(n=!1);var r=e.localType();return r.isAnnotationType()&&(r=A.find(r.superTypes(),function(e){return e.nameId()==r.nameId()})),r.examples().filter(function(e){return null!=e&&!e.isEmpty()&&e.isSingle()==t}).map(function(e){return l(e,n)})}function f(e){var t={};return e&&Object.keys(e).forEach(function(n){t[n]={structuredValue:e[n].value(),name:n}}),t}function d(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:h(e,function(e){return R.isTraitType(e)},t)}function m(e,t){return void 0===t&&(t=!0),e.lowLevel().actual().libExpanded?[]:h(e,function(e){return R.isResourceTypeType(e)},t)}function h(e,t,n){var r=x.globalDeclarations(e).filter(function(e){return t(e.definition())}),i=e.lowLevel(),a=i.includePath();a||(a=i.unit().path());for(var o=\"RAML10\"==e.definition().universe().version()&&!R.isOverlayType(e.definition()),s=o?new N.TraitsAndResourceTypesExpander:null,u=[],c=new k.ReferencePatcher,l=0,p=r;l<p.length;l++){var f=p[l],d=f.lowLevel().unit().path();o&&(w.LowLevelProxyNode.isInstance(f.lowLevel())||(f=s.createHighLevelNode(f,!1)),c.process(f,e,!0,!0)),n&&d!=a&&f.wrapperNode().meta().setCalculated(),u.push(f)}return u}function y(e){return _(e)}function _(e,t){var n=e.attr(E.Universe08.BodyLike.properties.schema.name);if(!n)return null;var r=n.value();if(!r)return null;if(C.stringStartsWith(r,\"{\")||C.stringStartsWith(r,\"[\")||C.stringStartsWith(r,\"<\"))return n;var i;if(t)i=t[r];else{var a=e.root(),o=a.elementsOfKind(E.Universe08.Api.properties.schemas.name);i=A.find(o,function(e){return e.name()==r})}if(!i)return n;if(!i)return n;if(!i.getKind||i.getKind()!=b.NodeKind.NODE)return n;if(i.definition().key()!=E.Universe08.GlobalSchema)return n;var s=i.attr(E.Universe08.GlobalSchema.properties.value.name);return null==s?null:s}function g(e){var t=e.definition();if(R.isMethodType(t)||R.isTypeDeclarationDescendant(t)){for(var n=!1,r=e.parent();null!=r;){var i=r.definition();if(R.isResourceTypeType(i)||R.isTraitType(i)){n=!0;break}r=r.parent()}if(!n)return null}if(null==e)return null;var a=e.lowLevel();if(null==a)return null;var o=a.children().filter(function(e){var t=e.key();return!!t&&((\"(\"!=t.charAt(0)||\")\"!=t.charAt(t.length-1))&&t.indexOf(\"<<\")>=0)});if(0==o.length)return null;var s={};return o.forEach(function(e){var t=e.dumpToObject();Object.keys(t).forEach(function(e){return s[e]=t[e]})}),s}function v(e){var t=e.localType(),n=t.fixedFacets(),r=Object.keys(n);if(!t.hasUnionInHierarchy())for(var i=0,a=r;i<a.length;i++){var o=a[i];null==t.facet(o)&&delete n[o]}return 0==Object.keys(n).length?null:n}var b=n(24),S=n(36),A=n(1),T=n(3),E=n(3),C=n(15),N=n(59),w=n(17),k=n(61),x=n(21),R=n(5);t.uriParameters=r,t.baseUriParameters=i,t.completeRelativeUri=o,t.absoluteUri=s,t.typeExample=u,t.typeExamples=c,t.dumpExpandableExample=l,t.allTraits=d,t.allResourceTypes=m,t.schemaContent08=y,t.schemaContent08Internal=_,t.getTemplateParametrizedProperties=g,t.typeFixedFacets=v},function(e,t,n){\"use strict\";function r(e){var t=new ie.Project(ae.dirname(e)),n=t.unit(ae.basename(e));return n&&n.isRAMLUnit()?G.fromUnit(n).wrapperNode():null}function i(e){var t=e.highLevel().lowLevel();return Z.LowLevelProxyNode.isInstance(t)?e:(null!=e.highLevel().reusedNode()?Q:$).expandTraitsAndResourceTypes(e)}function a(e){var t=\"\",n=e;do{e=n,t=e.relativeUri().value()+t,n=e.parent()}while(n.definition().key().name==X.Universe08.Resource.name);return t}function o(e){var t=\"\",n=e;do{e=n,t=e.relativeUri().value()+t,n=e.parent()}while(n.definition().key().name==X.Universe08.Resource.name);t=t.replace(/\\/\\//g,\"/\");var r=n.baseUri(),i=r?r.value():\"\";return i=i?i:\"\",te.stringEndsWith(i,\"/\")&&(t=t.substring(1)),t=i+t}function s(e){return G.qName(e.highLevel(),e.highLevel().root())}function u(e){return c(e)}function c(e){return f(e,function(e){return re.isTraitType(e)})}function l(e){return p(e)}function p(e){return f(e,function(e){return re.isResourceTypeType(e)})}function f(e,t){var n=ne.globalDeclarations(e.highLevel()).filter(function(e){return t(e.definition())}),r=e.highLevel().lowLevel();if(!r)return[];var i=r.includePath();return i||(i=r.unit().path()),n.map(function(e){var t;return e.lowLevel().unit().path()!=i?(t=H.buildWrapperNode(e,!1),t.meta().setCalculated()):t=e.wrapperNode(),t})}function d(e){var t=[],n=e;do{e=n,t.push(e.relativeUri().value()),n=e.parent()}while(n.definition().key().name==X.Universe08.Resource.name);return t.reverse()}function m(e){return z.ResourceImpl.isInstance(e.parent())?e.parent():null}function h(e){var t=e.parent();return t.definition().key().name,X.Universe08.Resource.name,null}function y(e,t){if(null==e)return null;var n=e.resources();return n?(n=n.filter(function(e){return e.relativeUri().value()==t}),0==n.length?null:n[0]):null}function _(e,t){if(!e)return null;for(var n=null,r=0;r<t.length;r++){if(!(n=y(e,t[r])))return null;e=n}return n}function g(e,t){return e?e.methods().filter(function(e){return e.method()==t}):null}function v(e,t,n){var r=_(e,t);return null==r?null:g(r,n)}function b(e){return e.definition().key().name==X.Universe08.Api.name}function S(e){for(var t=e;!b(t);)t=t.parent();return t}function A(e){var t=e.parent();if(z.ResourceImpl.isInstance(t))return a(t)+\" \"+e.method().toLowerCase();if(z.ResourceTypeImpl.isInstance(t))return t.name()+\" \"+e.method().toLowerCase();throw new Error(\"Method is supposed to be owned by Resource or ResourceType.\\nHere the method is owned by \"+e.definition().key().name)}function T(e){var t=e.code().value();if(null!=ee.validateResponseString(t))return!1;try{if(parseInt(t.charAt(0))<4)return!0}catch(e){}return!1}function E(e){var t=[],n=function(e){t.push(e),e.resources().forEach(function(e){return n(e)})};return e.resources().forEach(function(e){return n(e)}),t}function C(e){return N(e)}function N(e){var t=e.relativeUri().value();return j(e.uriParameters_original(),t,e,X.Universe08.Resource.properties.uriParameters.name)}function w(e){return k(e)}function k(e){var t=e.baseUri()?e.baseUri().value():\"\";return j(e.baseUriParameters_original(),t,e,X.Universe08.Api.properties.baseUriParameters.name)}function x(e){var t=[],n=e;do{e=n,t=N(e).concat(t),n=e.parent()}while(n.definition().key().name==X.Universe10.Resource.name);var r=n;r.baseUriParameters();return t=k(r).concat(t)}function R(e){return I(e)}function I(e){return e.protocols().map(function(e){return e.toUpperCase()})}function D(e){return M(e)}function M(e){return e.securedBy()}function P(e){var t=e.highLevel();if(!t)return\"\";var n=t.value();return n?n.toString():\"\"}function L(e){var t=e.highLevel();if(!t)return null;var n=ne.findDeclarationByNode(t,ne.LocationKind.VALUE_COMPLETION);if(!n)return null;if(!n.getKind||n.getKind()!=J.NodeKind.NODE)return null;var r=n.wrapperNode();return z.AbstractSecuritySchemeImpl.isInstance(r)?r:null}function O(e){return e.highLevel().definition().universe().version()}function U(e){var t=e.value().lowLevel();return new Y.TypeInstanceImpl(t)}function F(e){var t=e.highLevel().value();return\"string\"==typeof t||null==t?t:t.valueName()}function B(e){return V(e)}function K(e){return V(e)}function V(e){var t=e.highLevel(),n=t.parent(),r=e.name(),i=ne.referenceTargets(t.property(),n).filter(function(e){return G.qName(e,n)==r});return 0==i.length?null:i[0].wrapperNode()}function j(e,t,n,r){var i=n.highLevel(),a=i.definition().property(r);if(!t)return[];var o={};e.forEach(function(e){var t=o[e.name()];t||(t=[],o[e.name()]=t),t.push(e)});for(var s=[],u=0,c={},l=t.indexOf(\"{\");l>=0&&!((u=t.indexOf(\"}\",++l))<0);l=t.indexOf(\"{\",u)){var p=t.substring(l,u);if(c[p]=!0,o[p])o[p].forEach(function(e){return s.push(e)});else{var f=new z.StringTypeDeclarationImpl(p);f.setName(p);var d=f.highLevel();d.setParent(i),f.meta().setCalculated(),d.patchProp(a),s.push(f)}}return Object.keys(o).filter(function(e){return!c[e]}).forEach(function(e){return o[e].forEach(function(e){return s.push(e)})}),s}function W(e){var t=e.schema();if(null==t)return null;var n=t.value();if(!n)return null;if(te.stringStartsWith(n,\"{\")||te.stringStartsWith(n,\"[\")||te.stringStartsWith(n,\"<\"))return n;var r=e.highLevel(),i=r.root(),a=i.elementsOfKind(X.Universe08.Api.properties.schemas.name),o=oe.find(a,function(e){return e.name()==n});if(!o)return n;if(!o.getKind||o.getKind()!=J.NodeKind.NODE)return n;if(o.definition().key()!=X.Universe08.GlobalSchema)return n;var s=o.attr(X.Universe08.GlobalSchema.properties.value.name);return null==s?null:s.value()}function q(e){var t=e.highLevel();if(null==t)return null;var n=t.lowLevel();if(null==n)return null;var r=n.children().filter(function(e){return e.key().indexOf(\"<<\")>=0});return 0==r.length?null:new Y.TypeInstanceImpl(r)}var z=n(86),H=n(139),Y=n(29),J=n(24),G=n(4),X=n(3),$=n(25),Q=n(59),Z=n(17),ee=n(35),te=n(15),ne=n(21),re=n(5),ie=n(9),ae=n(11),oe=n(1);t.load=r,t.expandTraitsAndResourceTypes=i,t.completeRelativeUri=a,t.absoluteUri=o,t.qName=s,t.traitsPrimary=u,t.allTraits=c,t.resourceTypesPrimary=l,t.allResourceTypes=p,t.relativeUriSegments=d,t.parentResource=m,t.parent=h,t.childResource=y,t.getResource=_,t.childMethod=g,t.getMethod=v,t.ownerApi=S,t.methodId=A,t.isOkRange=T,t.allResources=E;t.uriParametersPrimary=C,t.uriParameters=N,t.baseUriParametersPrimary=w,t.baseUriParameters=k,t.absoluteUriParameters=x,t.protocolsPrimary=R,t.allProtocols=I,t.securedByPrimary=D,t.allSecuredBy=M,t.securitySchemeName=P,t.securityScheme=L,t.RAMLVersion=O,t.structuredValue=U,t.referenceName=F,t.referencedTrait=B,t.referencedResourceType=K,t.schemaContent=W,t.getTemplateParametrizedProperties=q},function(e,t,n){\"use strict\";function r(e,t){var n=n.createProject(h.dirname(e)),r={$ref:t},i=JSON.stringify(r);return o(i,n.setCachedUnitContent(h.basename(e),i)).jsonSchema.$ref}function i(e,t){return _.createSchema(e,new y.ContentProvider(t))}function a(e){return _.getXMLSchema(e)}function o(e,t){return _.getJSONSchema(e,new y.ContentProvider(t))}function s(e,t,n){return d.completeReference(e,t,n)}function u(e){return d.getIncludePath(e)}function c(e){return d.getIncludeReference(e)}function l(){return new m.SchemaToModelGenerator}function p(){return new m.ModelToSchemaGenerator}var f=n(0),d=n(142),m=n(317),h=n(11),y=n(63),_=f.getSchemaUtils();t.dereference=r,t.createSchema=i,t.getXMLSchema=a,t.getJSONSchema=o,t.completeReference=s,t.getIncludePath=u,t.getIncludeReference=c,t.createSchemaModelGenerator=l,t.createModelToSchemaGenerator=p},function(e,t,n){\"use strict\";function r(e){for(var t=[],n={};null!=e.parent();)e.lowLevel().includePath()&&(t=t.concat(a(e,n))),e=e.parent();return t=t.concat(a(e,n))}function i(e){var t=e.node();if(t&&L.isParseResult(t))return t;var n=V.getNominalPropertySource2(e);return n?n.getSource():null}function a(e,t,n){if(void 0===t&&(t={}),void 0===n&&(n=[]),!e.lowLevel())return[];if(t[e.lowLevel().unit().absolutePath()]=!0,!F.ASTNodeImpl.isInstance(e))return n;var r=!1;return e.elements().forEach(function(e){if(e.definition().key()==B.Universe10.UsesDeclaration){if(r)return;var i=e.attr(\"value\");if(i){var o=e.root().lowLevel().unit().resolve(i.value());if(o&&j.isWaitingFor(o.absolutePath()))return void(r=!0);null!=o&&o.isRAMLUnit()&&!t[o.absolutePath()]&&o.highLevel().isElement()&&a(o.highLevel().asElement(),t,n)}}else n.push(e)}),n}function o(e,t){for(var n=\"\",r=e-1;r>=0;r--){var i=t.charAt(r);if(\" \"==i||\"\\t\"==i)n?n+=i:n=i;else if(\"\\r\"==i||\"\\n\"==i)return n}}function s(e,t,n,r,i){if(void 0===r&&(r=!0),void 0===i&&(i=!0),null==e)return null;if(e.lowLevel()&&e.lowLevel().start()<=t&&e.lowLevel().end()>=n){if(F.ASTNodeImpl.isInstance(e)){for(var a=e,o=r?a.children():a.directChildren(),u=0;u<o.length;u++)if(r||o[u].lowLevel().unit()==e.lowLevel().unit()){var c=s(o[u],t,n,r);if(c)return!i&&F.ASTPropImpl.isInstance(c)&&(c=c.parent()),c}return e}if(F.ASTPropImpl.isInstance(e)){var l=e;if(!l.property().isKey()){var p=l.value();if(F.StructuredValue.isInstance(p)){var f=p,d=f.toHighLevel2();if(d&&!r&&d.lowLevel().unit()!=e.lowLevel().unit())return null;var c=s(d,t,n,r);if(c)return!i&&F.ASTPropImpl.isInstance(c)&&(c=c.parent()),c}return i?l:l.parent()}return null}return null}return null}function u(e,t){for(var n=-1,r=t-1;r>=0;r--){var i=e.charAt(r);if(\"\\r\"==i||\"\\n\"==i||\" \"==i||\"\\t\"==i||'\"'==i||\"'\"==i||\":\"==i){n=r+1;break}}for(var a=-1,r=t;r<e.length;r++){var i=e.charAt(r);if(\"\\r\"==i||\"\\n\"==i||\" \"==i||\"\\t\"==i||'\"'==i||\"'\"==i||\":\"==i){a=r;break}}return n!=-1&&a!=-1?e.substring(n,a):\"\"}function c(e,t){for(var n=\"\",r=t;r>=0;r--){var i=e[r];if(\" \"==i||\"\\r\"==i||\"\\n\"==i||\"|\"==i||\"[\"==i||\"]\"==i||\":\"==i||\"(\"==i||\")\"==i)break;n=i+n}for(var r=t+1;r<e.length;r++){var i=e[r];if(\" \"==i||\"\\r\"==i||\"\\n\"==i||\"|\"==i||\"[\"==i||\"]\"==i||\":\"==i||\"(\"==i||\")\"==i||\",\"==i)break;n+=i}return n}function l(e,t){var n=h(e,t);if(n){if(F.ASTNodeImpl.isInstance(n)){var r=n;return{node:r,results:r.findReferences()}}F.ASTPropImpl.isInstance(n)}var i=s(F.fromUnit(e),t,t,!1);if(F.ASTNodeImpl.isInstance(i))return{node:i,results:i.findReferences()};if(F.ASTPropImpl.isInstance(i)){var a=i;if(a.property().canBeValue())return{node:a.parent(),results:a.parent().findReferences()}}return{node:null,results:[]}}function p(e,t){var n=e;if(n.getAdapter(K.RAMLPropertyService).isTypeExpr()){var i=r(t).filter(function(e){return e.definition().key()===B.Universe08.GlobalSchema||e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});return i}if(n.getAdapter(K.RAMLPropertyService).isDescriminating()){var a=N(n.range(),t);return a}if(n.isReference()){var o=n.referencesTo(),a=N(o,t);return a}if(n.range().hasValueTypeInHierarchy()){var s=n.range().getAdapter(K.RAMLService);if(s.globallyDeclaredBy().length>0){var i=r(t).filter(function(e){return null!=O.find(s.globallyDeclaredBy(),function(t){return t==e.definition()})});return i}}return[]}function f(e,t){if(t){var n=[];if(e.getAdapter(K.RAMLPropertyService).isTypeExpr()){var i=r(t).filter(function(e){return e.definition().key()===B.Universe08.GlobalSchema||e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)});var a=t.definition().universe().type(B.Universe10.TypeDeclaration.name);if(a){var o=a.allSubTypes();n=n.concat(o.map(function(e){return e.getAdapter(K.RAMLService).descriminatorValue()}))}return n}var s=e.range().key();if((s==B.Universe08.SchemaString||s==B.Universe10.SchemaString)&&\"RAML10\"==e.range().universe().version()&&e.range().hasValueTypeInHierarchy()){var i=r(t).filter(function(e){return e.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)});n=i.map(function(e){return F.qName(e,t)})}if(e.getAdapter(K.RAMLPropertyService).isDescriminating()){var o=T(e.domain(),t);n=n.concat(o.map(function(e){return e.getAdapter(K.RAMLService).descriminatorValue()}))}else if(e.isReference()){var u=N(e.referencesTo(),t);n=u.map(function(e){return F.qName(e,t)})}else if(e.range().hasValueTypeInHierarchy()){var c=e.range().getAdapter(K.RAMLService);if(c.globallyDeclaredBy().length>0){var i=r(t).filter(function(e){return null!=O.find(c.globallyDeclaredBy(),function(t){return t==e.definition()})});n=n.concat(i.map(function(e){return F.qName(e,t)}))}}return e.isAllowNull()&&n.push(\"null\"),e.enumOptions()&&(n=n.concat(e.enumOptions())),n}return e.enumOptions()&&\"string\"==typeof e.enumOptions()?[e.enumOptions()+\"\"]:e.enumOptions()}function d(e){return e.isElement()&&e.asElement().definition().key()!=B.Universe10.Library?null:e.asElement().attrValue(\"name\")}function m(e,t){var n=e.lowLevel().unit();if(!n)return null;var r=e.lowLevel().start(),i=e.lowLevel().end();return null!=t&&t==q.KEY_COMPLETION?(r=e.lowLevel().keyStart(),i=e.lowLevel().keyEnd()):null!=t&&t==q.VALUE_COMPLETION&&(r=e.lowLevel().valueStart(),i=e.lowLevel().valueEnd()),r==-1||i==-1?null:h(n,Math.floor((r+i)/2),t)}function h(e,t,n){var r=s(F.fromUnit(e),t,t,!1),a=null;if(r.isElement()&&r.asElement().definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)&&r.asElement().directChildren().forEach(function(e){if(e.isUnknown()&&e.getLowLevelStart()<t&&e.getLowLevelEnd()>t){r.asElement().localType().allFacets().forEach(function(t){if(t.nameId()==e.lowLevel().key()&&U.UserDefinedProp.isInstance(t)){a=i(t)}})}}),!r.property())return r;if(\"example\"==r.property().nameId()){r.parent().localType();r.lowLevel().children().forEach(function(e){\"example\"==e.key()&&e.children().forEach(function(e){if(e.start()<t&&e.end()>t){r.parent().asElement().localType().allProperties().forEach(function(t){if(t.nameId()==e.key()&&U.UserDefinedProp.isInstance(t)){a=i(t)}})}})})}if(a)return a;var o=null!=n?n:S(e.contents(),t);if(o==q.VALUE_COMPLETION){var c=r;if(F.ASTPropImpl.isInstance(r)){var l=r;if(l&&l.value()){if(!F.StructuredValue.isInstance(l.value()))return W(t,e.contents(),l,c);var p=l.value(),f=p.toHighLevel();if(f){var d=O.find(f.attrs(),function(e){return e.lowLevel().start()<t&&e.lowLevel().end()>=t});if(d)return W(t,e.contents(),d,f,l.property())}}}else{var m=c.property();if(m)return W(t,e.contents(),null,c,m)}}if(o==q.KEY_COMPLETION||o==q.SEQUENCE_KEY_COPLETION){var c=r,h=r.property();if(P.UserDefinedProp.isInstance(h)){var g=h;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&P.isUserDefinedClass(c.definition())){var v=c.definition();return v.isAssignableFrom(\"TypeDeclaration\")?r:v.getAdapter(K.RAMLService).getDeclaringNode()}if(F.ASTPropImpl.isInstance(r)){var A=r;if(b(A)){var T=y(A);if(T){var E=_(A,T);if(E){var r=s(E,t,t);if(h=r.property(),P.UserDefinedProp.isInstance(h)){var g=h;return i(g)}if(F.ASTNodeImpl.isInstance(r)&&P.isUserDefinedClass(c.definition())){var v=c.definition();return v.getAdapter(K.RAMLService).getDeclaringNode()}}}}}}if(o==q.PATH_COMPLETION){var C=u(e.contents(),t);if(C){return e.resolve(C)}}}function y(e){var t=null;if(e.isElement()?t=e:e.isAttr()&&(t=e.parent()),!t.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name)){var n=t.parent();if(!n)return null;if(n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))t=n;else{if(null==(n=n.parent()))return null;if(!n.definition().isAssignableFrom(B.Universe10.TypeDeclaration.name))return null;t=n}}return t.localType()}function _(e,t){return F.StructuredValue.isInstance(e.value())?new F.ASTNodeImpl(e.value().lowLevel(),e.parent(),t,e.property()):null}function g(e,t){return new F.ASTNodeImpl(e.lowLevel(),e,t,e.property())}function v(e){return e.definition().key()==B.Universe10.ExampleSpec}function b(e){var t=B.Universe10.TypeDeclaration.properties.example.name,n=B.Universe10.ObjectTypeDeclaration.name;if(!F.ASTPropImpl.isInstance(e))return!1;var r=e,i=r.parent(),a=i&&i.property();a&&a.nameId();return!!(t===r.name()&&r.isString()&&F.ASTNodeImpl.isInstance(i)&&i.definition().isAssignableFrom(n))}function S(e,t){for(var n=!1,r=!1,i=!1,a=t-1;a>=0;a--){var s=e.charAt(a);if(\"(\"==s)i=!0;else{if(i){if(\"\\r\"==s||\"\\n\"==s){for(var u=!1,c=t-1;c<e.length;c++){var l=e[c];if(\")\"==l&&(u=!0),\"\\r\"==l||\"\\n\"==l)break;if(\":\"==l){i=!1;break}}if(i&&u)return q.ANNOTATION_COMPLETION;break}if(\" \"==s||\"\\t\"==s)continue;break}if(\"\\r\"==s||\"\\n\"==s)break;if(\":\"==s)break}}for(var a=t-1;a>=0;a--){var s=e.charAt(a);if(\"#\"==s){if(0==a)return q.VERSION_COMPLETION;for(var c=a-1;c>=0;c--){var p=e.charAt(c);if(\"\\r\"==p||\"\\n\"==p)break;if(\"!\"==p&&e.indexOf(\"!include\",c)==c)return q.PATH_COMPLETION}return q.INCOMMENT}if(\":\"==s)return n?q.DIRECTIVE_COMPLETION:q.VALUE_COMPLETION;if(\"\\r\"==s||\"\\n\"==s){for(var f=!1,d=o(t,e),m=a;m>0;m--){if(\":\"==(s=e.charAt(m))){if(f){if(o(m,e).length<d.length)return q.VALUE_COMPLETION}break}\"|\"!=s?(\"\\r\"!=s&&\"\\n\"!=s||(f=!1),\" \"!=s&&\"\\t\"!=s&&(f=!1)):f=!0}return r?q.SEQUENCE_KEY_COPLETION:q.KEY_COMPLETION}if(\"-\"==s&&(r=!0),\"!\"==s){if(e.indexOf(\"!include\",a)==a)return q.PATH_COMPLETION;e.indexOf(\"!i\",a)==a&&(n=!0)}}}function A(e,t){if(!t)return null;for(var n=t.split(\"/\"),r=e,i=0;i<n.length;i++)if(\"#\"!=n[i]){if(!(r=O.find(r.children(),function(e){return e.key()==n[i]})))return null}else r=e.unit().ast();return r}function T(e,n){if(null==e)return[];var i=e.nameId();n=t.declRoot(n);var a=n;if(a._subTypesCache){var o=a._subTypesCache[i];if(o)return o}else a._subTypesCache={};var s=e.allSubTypes();if(e.getAdapter(K.RAMLService).getRuntimeExtenders().length>0&&n){var u=r(n),c=e.getAdapter(K.RAMLService).getRuntimeExtenders();n.root();c.forEach(function(t){var n=u.filter(function(n){var r=n.definition().allSuperTypes();return r.push(n.definition()),n.definition()==t||null!=O.find(r,function(e){return e==t})||null!=O.find(r,function(t){return t==e})});s=s.concat(n.map(function(e){return e.localType()}))})}return s=O.unique(s),a._subTypesCache[i]=s,s}function E(e,n,i){n=t.declRoot(n);var a=r(n);return O.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.types.name}).localType()}function C(e,n,i){n=t.declRoot(n);var a=r(n);return O.find(a,function(t){return F.qName(t,n)==e&&t.property()&&t.property().nameId()==B.Universe10.LibraryBase.properties.schemas.name}).localType()}function N(e,t){var n=[],i=[e].concat(e.getAdapter(K.RAMLService).getRuntimeExtenders());if(t){var a=t;i.forEach(function(e){var t=r(a),i=t.filter(function(t){return t.definition().isAssignableFrom(e.nameId())});n=n.concat(i)})}if(!e.hasValueTypeInHierarchy()&&e.getAdapter(K.RAMLService).isInlinedTemplates()&&t){var a=t,o=r(a).filter(function(t){return t.definition()==e});n=n.concat(o)}else{var a=t,s={};e.allSubTypes().forEach(function(e){return s[e.nameId()]=!0}),s[e.nameId()]=!0;var o=r(a).filter(function(e){return s[e.definition().nameId()]});n=n.concat(o)}return n}function w(e,t){return T(e.range(),t)}function k(e,t){if(t){if(e.isDescriminator()){var n=e.range(),i=n.getAdapter(K.RAMLService).getRuntimeExtenders();if(i.length>0&&t){var a=[];return i.forEach(function(e){var n=r(t).filter(function(t){return t.definition()==e});a=a.concat(n)}),a}return[]}if(e.isReference())return N(e.referencesTo(),t);if(e.range().hasValueTypeInHierarchy()){var o=e.range().getAdapter(K.RAMLService);if(o.globallyDeclaredBy&&o.globallyDeclaredBy().length>0){return r(t).filter(function(e){return null!=O.find(o.globallyDeclaredBy(),function(t){return t==e.definition()})})}}}return[]}function x(e){var t=[];return R(e,t),t}function R(e,t){e.children().forEach(function(e){t.push(e),R(e,t)})}function I(e,t,n){e.elements().forEach(function(e){I(e,t,n);e.definition()}),e.attrs().forEach(function(r){var i=r.property(),a=r.value();if(P.UserDefinedProp.isInstance(i)){var o=i.node();o==t?n.push(r):o.lowLevel().start()==t.lowLevel().start()&&o.lowLevel().unit()==t.lowLevel().unit()&&n.push(r)}if(b(r)){var s=y(r);if(s){var u=_(r,s);u&&I(u,t,n)}}else if(i.getAdapter(K.RAMLPropertyService).isTypeExpr()&&\"string\"==typeof a){var c=e.localType();z(c,r,t,n);var l=d(t);if(l&&a.indexOf(l)!=-1){var p=D(r);p&&p.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}if(i.isReference()||i.isDescriminator())if(\"string\"==typeof a){var f=k(i,e);O.find(f,function(e){return e.name()==a&&e==t})&&n.push(r);var l=d(t);if(l&&a.indexOf(l)!=-1){var p=D(r);p&&p.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}else{var m=a;if(m){var h=m.valueName(),f=k(i,e);O.find(f,function(e){return e.name()==h&&e==t})&&n.push(r);var g=m.toHighLevel();g&&I(g,t,n);var l=d(t);if(l&&h.indexOf(l)!=-1){var p=D(g);p&&p.lowLevel().start()==t.lowLevel().start()&&n.push(r)}}}else{var f=k(i,e);O.find(f,function(e){return e.name()==a&&e==t})&&n.push(r)}})}function D(e){if(!e.lowLevel)return null;var t=e.lowLevel();if(!t)return null;if(t.key()){var n=Math.floor((t.keyEnd()+t.keyStart())/2),r=M(t.unit(),n);if(r)return r}if(t.value()){var n=Math.floor((t.valueEnd()+t.valueStart())/2),r=M(t.unit(),n);if(r)return r}return null}function M(e,t){var n=h(e,t);if(n&&n.isElement&&n.isElement())for(var r=n.asElement(),i=r;i;){if(i.definition().key()==B.Universe10.Library)return i;i=i.parent()}return null}var P=n(0),L=n(24),O=n(1),U=n(0),F=n(4),B=n(3),K=U,V=n(144),j=n(28);t.declRoot=function(e){for(var t=e;;){if(t.definition().key()==B.Universe10.Library)break;var n=t.parent();if(!n)break;t=n}return t},t.globalDeclarations=r,t.findDeclarations=a,t.deepFindNode=s,t.extractName=c;var W=function(e,t,n,r,a){void 0===a&&(a=n.property());var o=p(a,r),s=c(t,e),u=O.find(o,function(e){return F.qName(e,r)==s});if(u)return u;if(P.UserDefinedProp.isInstance(a)){return i(a)}return null};t.findUsages=l,t.referenceTargets=p,t.enumValues=f,t.findDeclarationByNode=m,t.findDeclaration=h,t.findExampleContentType=y,t.parseDocumentationContent=_,t.parseStructuredExample=g,t.isExampleNode=v,t.isExampleNodeContent=b,t.determineCompletionKind=S,function(e){e[e.VALUE_COMPLETION=0]=\"VALUE_COMPLETION\",e[e.KEY_COMPLETION=1]=\"KEY_COMPLETION\",e[e.PATH_COMPLETION=2]=\"PATH_COMPLETION\",e[e.DIRECTIVE_COMPLETION=3]=\"DIRECTIVE_COMPLETION\",e[e.VERSION_COMPLETION=4]=\"VERSION_COMPLETION\",e[e.ANNOTATION_COMPLETION=5]=\"ANNOTATION_COMPLETION\",e[e.SEQUENCE_KEY_COPLETION=6]=\"SEQUENCE_KEY_COPLETION\",e[e.INCOMMENT=7]=\"INCOMMENT\"}(t.LocationKind||(t.LocationKind={}));var q=t.LocationKind;t.resolveReference=A,t.subTypesWithLocals=T,t.subTypesWithName=E,t.schemasWithName=C,t.nodesDeclaringType=N,t.findAllSubTypes=w,t.allChildren=x;var z=function(e,t,n,r){var i=e.getAdapter(K.RAMLService).getDeclaringNode();if(i&&n.isSameNode(i))return void r.push(t);if(e.isArray()&&z(e.array().componentType(),t,n,r),e.isUnion()){var a=e.union();z(a.leftType(),t,n,r),z(a.rightType(),t,n,r)}e.superTypes().some(function(e){return e.nameId()==n.name()})&&r.push(t)};t.refFinder=I},function(e,t,n){\"use strict\";function r(e,t,n,r){return void 0===n&&(n=null),A.createStubNode(e,t,n,r)}function i(e,t,n){return A.createStub(e,t,n)}function a(e,t,n){return A.createStub0(e,t,n)}function o(e,t){return A.createResourceStub(e,t)}function s(e,t){return A.createMethodStub(e,t)}function u(e,t){return A.createResponseStub(e,t)}function c(e,t){return A.createBodyStub(e,t)}function l(e,t){return A.createUriParameterStub(e,t)}function p(e,t){return A.createQueryParameterStub(e,t)}function f(e,t,n,r,i){return void 0===i&&(i=!1),new b.ASTPropImpl(e,t,n,r,i)}function d(e,t,n,r){return new b.ASTNodeImpl(e,t,n,r)}function m(e,t,n,r){return new T(e,t,n,r)}function h(e,t,n,r){return new E(e,t,n,r)}function y(e,t){return S.createMapping(e,t)}function _(){return S.createMap([])}function g(e,t){return A.createAttr(e,t)}var v=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},b=n(4),S=n(9),A=n(36);t.createStubNode=r,t.createStub=i,t.createStubNoParentPatch=a,t.createResourceStub=o,t.createMethodStub=s,t.createResponseStub=u,t.createBodyStub=c,t.createUriParameterStub=l,t.createQueryParameterStub=p,t.createASTPropImpl=f,t.createASTNodeImpl=d,t.createVirtualASTPropImpl=m,t.createVirtualNodeImpl=h;var T=function(e){function t(){e.apply(this,arguments)}return v(t,e),t.prototype.value=function(){return\"\"},t}(b.ASTPropImpl),E=function(e){function t(){e.apply(this,arguments)}return v(t,e),t.prototype.value=function(){return\"\"},t}(b.ASTNodeImpl);t.createMapping=y,t.createMap=_,t.createAttr=g},function(e,t,n){\"use strict\";function r(e,t){return void 0===t&&(t=!0),new _({rootNodeDetails:!0,serializeMetadata:t}).dump(e)}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(3),o=n(29),s=n(17),u=n(0),c=n(4),l=n(46),p=n(5),f=n(3),d=n(15),m=n(1),h=n(87),y=n(11);t.dump=r;var _=function(){function e(e){this.options=e,this.nodeTransformers=[new K,new O,new q,new T,new I,new D,new j,new k,new x,new U,new F,new M,new W,new V],this.nodePropertyTransformers=[new A,new E,new C,new w,new N,new R,new B],this.ignore=new v([new g(p.isResponseType,p.isDisplayNameProperty),new g(p.isApiSibling,p.isDisplayNameProperty),new g(p.isAnnotationRefTypeOrDescendant,p.isAnnotationProperty),new g(p.isSecuritySchemeRefType,p.isSecuritySchemeProperty),new g(p.isTraitRefType,p.isTraitProperty),new g(p.isResourceTypeRefType,p.isResourceTypeProperty),new g(p.isApiSibling,p.isRAMLVersionProperty),new g(p.isTypeDeclarationDescendant,p.isStructuredItemsProperty)]),this.missingProperties=new z,this.options=this.options||{},null==this.options.serializeMetadata&&(this.options.serializeMetadata=!0)}return e.prototype.printMissingProperties=function(){return this.missingProperties.print()},e.prototype.dump=function(e){var t=e.highLevel(),n=t&&t.parent(),r=!n&&this.options.rootNodeDetails;return this.dumpInternal(e,r)},e.prototype.dumpInternal=function(e,t,n){var r=this;if(void 0===t&&(t=!1),null==e)return null;if(o.BasicNodeImpl.isInstance(e)){var i={},a=e,s=a.highLevel().definition();s.allProperties().filter(function(e){return!r.ignore.match(a.definition(),e)}).forEach(function(e){i[e.nameId()]=e}),s.allCustomProperties().filter(function(e){return!r.ignore.match(a.definition(),e)}).forEach(function(e){i[e.nameId()]=e});var u=this.dumpProperties(i,e);if(i.schema&&this.options.dumpSchemaContents&&i.schema.range().key()==f.Universe08.SchemaString){a.highLevel().root().elementsOfKind(\"schemas\").forEach(function(e){if(e.name()==u.schema){var t=e.attr(\"value\");t&&(u.schema=t.value(),u.schemaContent=t.value())}})}if(this.serializeScalarsAnnotations(u,a,i),this.serializeMeta(u,a),this.canBeFragment(e)&&h.isFragment(e)){var c=h.asFragment(e),l=c.uses();l.length>0&&(u.uses=l.map(function(e){return e.toJSON()}))}if(p.isTypeDeclarationDescendant(s)){var d=a.highLevel().property();if(d&&!(p.isHeadersProperty(d)||p.isQueryParametersProperty(d)||p.isUriParametersProperty(d)||p.isPropertiesProperty(d)||p.isBaseUriParametersProperty(d))){delete u.required;var m=u.__METADATA__;if(m){var y=m.primitiveValuesMeta;y&&delete y.required}}}this.nodeTransformers.forEach(function(t){t.match(e,n||e.highLevel().property())&&(u=t.transform(u,e))});var _={};if(t){if(s){var g=s.universe().version();_.ramlVersion=g,_.type=s.nameId()}_.specification=u,_.errors=this.dumpErrors(a.errors())}else _=u;return _}if(o.AttributeNodeImpl.isInstance(e)){var i={},v=e,s=v.highLevel().definition(),b=v.highLevel().property().range();b.isArray()&&(b=b.array().componentType()),s.allCustomProperties().filter(function(e){return!r.ignore.match(b,e)}).forEach(function(e){i[e.nameId()]=e});if(b.isValueType()&&v.value){var S=v.value();if(\"number\"==typeof S||\"string\"==typeof S||\"boolean\"==typeof S)return S}var u=this.dumpProperties(i,e);return this.nodeTransformers.forEach(function(t){t.match(e,e.highLevel().property())&&(u=t.transform(u,e))}),this.serializeScalarsAnnotations(u,e,i),this.serializeMeta(u,v),u}return o.TypeInstanceImpl.isInstance(e)?this.serializeTypeInstance(e):o.TypeInstancePropertyImpl.isInstance(e)?this.serializeTypeInstanceProperty(e):e},e.prototype.canBeFragment=function(e){var t=e.definition();return[t].concat(t.allSubTypes()).filter(function(e){return e.getAdapter(u.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==u.universesInfo.Universe10.FragmentDeclaration.name}).length>0}).length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.stringLooksLikeXML=function(e){return\"<\"===e[0]&&\">\"===e[e.length-1]},e.prototype.stringLooksLikeJSON=function(e){return\"{\"===e[0]&&\"}\"===e[e.length-1]},e.prototype.dumpProperties=function(e,t){var n,r=this,i={};return t.highLevel().isElement()&&(n=t.highLevel().definition()),Object.keys(e).forEach(function(s){var u;if(n&&((u=n.property(s))||(u=m.find(n.allCustomProperties(),function(e){return e.nameId()==s}))),!t[s])return void r.missingProperties.addProperty(e[s],t.kind());var f=e[s],d=t[s]();if(d&&\"structuredType\"==s&&\"object\"==typeof d){d=null;var h=t.highLevel(),_=h.lowLevel();_.children().forEach(function(e){if(\"type\"==e.key()||\"schema\"==e.key()){var t=h.definition().universe().type(a.Universe10.TypeDeclaration.name),n=h.definition().universe().type(a.Universe10.LibraryBase.name),i=new c.ASTNodeImpl(e,h,t,n.property(a.Universe10.LibraryBase.properties.types.name));i.patchType(l.doDescrimination(i)),d=r.dumpInternal(i.wrapperNode(),!1,u),s=e.key()}})}else if(\"items\"==s&&\"object\"==typeof d){var g=Array.isArray(d),v=!g;if(g&&(v=null!=m.find(d,function(e){return\"object\"==typeof e})),v){d=null;var h=t.highLevel(),_=h.lowLevel();_.children().forEach(function(e){if(\"items\"==e.key()){var t=h.definition().universe().type(a.Universe10.TypeDeclaration.name),n=h.definition().universe().type(a.Universe10.LibraryBase.name),i=new c.ASTNodeImpl(e,h,t,n.property(a.Universe10.LibraryBase.properties.types.name));i.patchType(l.doDescrimination(i)),d=r.dumpInternal(i.wrapperNode(),!1,u),s=e.key()}})}}if(n&&n.isAssignableFrom(\"TypeDeclaration\")&&(\"type\"===s||\"schema\"==s)&&d)if(d.forEach&&\"string\"==typeof d[0]){var h=t.highLevel(),b=h.localType();if(b&&b.hasExternalInHierarchy()){var S=d[0].trim(),A=\"{\"===S[0]&&\"}\"===S[S.length-1],T=\"<\"===S[0]&&\">\"===S[S.length-1];A?i.typePropertyKind=\"JSON\":T&&(i.typePropertyKind=\"XML\")}else i.typePropertyKind=\"TYPE_EXPRESSION\"}else\"object\"==typeof d&&(i.typePropertyKind=\"INPLACE\");if((\"type\"===s||\"schema\"==s)&&d&&d.forEach&&\"string\"==typeof d[0]){var S=d[0].trim(),A=r.stringLooksLikeJSON(S),T=r.stringLooksLikeXML(S);if(A||T){var E=t.highLevel().lowLevel().includePath&&t.highLevel().lowLevel().includePath();if(!E&&t.highLevel().isElement()){var C=t.highLevel().asElement().attr(\"type\");C||(C=t.highLevel().asElement().attr(\"schema\")),C&&(E=C.lowLevel().includePath&&C.lowLevel().includePath())}if(E){var N=E.indexOf(\"#\"),w=\"\";N>=0&&(w=E.substring(N),E=E.substring(0,N));var k,x=t.highLevel().lowLevel().unit().resolve(E).absolutePath();k=0===x.indexOf(\"http://\")||0===x.indexOf(\"https://\")?x:y.relative(t.highLevel().lowLevel().unit().project().getRootPath(),x),k=k.replace(/\\\\/g,\"/\"),i.schemaPath=k+w}}}if((d||\"type\"!=s)&&(d||\"schema\"!=s)&&(d||\"items\"!=s)){if(t.definition&&p.isTypeDeclarationSibling(t.definition())&&p.isTypeProperty(f)){var R=t[a.Universe10.TypeDeclaration.properties.schema.name]();if(null!=R&&(!Array.isArray(R)||0!=R.length))return;var h=t.highLevel(),_=h.lowLevel(),I=!1;if(_.children().forEach(function(e){if(\"schema\"==e.key())return void(I=!0)}),I)return}if(Array.isArray(d)){for(var D=[],M=0,P=d;M<P.length;M++){var L=P[M],O=r.dumpInternal(L);\"examples\"===s&&r.options&&r.options.dumpXMLRepresentationOfExamples&&L.expandable&&L.expandable._owner&&(O.asXMLString=L.expandable.asXMLString()),D.push(O)}if(0==D.length&&o.BasicNodeImpl.isInstance(t)&&!r.isDefined(t,s))return;for(var U=0,F=r.nodePropertyTransformers;U<F.length;U++){var B=F[U];B.match(t,f)&&(D=B.transform(D,t))}i[s]=D}else{var L=r.dumpInternal(d);if(null==L&&o.BasicNodeImpl.isInstance(t)&&!r.isDefined(t,s))return;o.BasicNodeImpl.isInstance(t)&&r.nodePropertyTransformers.forEach(function(e){e.match(t,f)&&(L=e.transform(L,t))}),i[s]=L,\"example\"===s&&r.options&&r.options.dumpXMLRepresentationOfExamples&&d.expandable&&d.expandable._owner&&(L.asXMLString=d.expandable.asXMLString())}}}),i},e.prototype.serializeScalarsAnnotations=function(e,t,n){var r=this;if(t.scalarsAnnotations){for(var i={},a=t.scalarsAnnotations(),o=0,s=Object.keys(n);o<s.length;o++){var u=s[o];if(a[u]){var c=a[u]();if(c.length>0)if(Array.isArray(c[0])){var l=[];c.forEach(function(e,t){l.push(e.map(function(e){return r.dumpInternal(e)}))}),l.filter(function(e){return e.length>0}).length>0&&(i[u]=l)}else i[u]=c.map(function(e){return r.dumpInternal(e)})}}Object.keys(i).length>0&&(e.scalarsAnnotations=i)}},e.prototype.serializeMeta=function(e,t){if(this.options.serializeMetadata){var n=t.meta();n.isDefault()||(e.__METADATA__=n.toJSON())}},e.prototype.serializeTypeInstance=function(e){var t=this;if(e.isScalar())return e.value();if(e.isArray())return e.items().map(function(e){return t.serializeTypeInstance(e)});var n=e.properties();if(0==n.length)return null;var r={};return n.forEach(function(e){return r[e.name()]=t.serializeTypeInstanceProperty(e)}),r},e.prototype.serializeTypeInstanceProperty=function(e){var t=this;if(e.isArray()){var n=e.values(),r=[];return n.forEach(function(e){return r.push(t.serializeTypeInstance(e))}),r}return this.serializeTypeInstance(e.value())},e.prototype.isDefined=function(e,t){var n=e.highLevel();return n.elementsOfKind(t).length>0||n.attributes(t).length>0},e}();t.TCKDumper=_;var g=function(){function e(e,t){this.typeMatcher=e,this.propMatcher=t}return e.prototype.match=function(e,t){return(null==e||this.typeMatcher(e))&&(null==t||this.propMatcher(t))},e}(),v=function(){function e(e){this.matchers=e}return e.prototype.match=function(e,t){for(var n=this.matchers.length,r=0;r<n;r++)if(this.matchers[r].match(e,t))return!0;return!1},e}(),b=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition(),t)},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0&&e[0][this.propName]){var n={};return e.forEach(function(e){var r=e[t.propName],i=n[r];i?Array.isArray(i)?i.push(e):n[r]=[i,e]:n[r]=e}),n}return e},e}(),S=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return this.matcher.match(e.definition?e.definition():null,t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e[this.propName]]=e,t},e}(),A=function(e){function t(){e.call(this,new v([new g(p.isApiSibling,p.isBaseUriParametersProperty),new g(p.isResourceBaseSibling,p.isUriParametersProperty),new g(p.isResourceBaseSibling,p.isQueryParametersProperty),new g(p.isTraitType,p.isQueryParametersProperty),new g(p.isMethodType,p.isQueryParametersProperty),new g(p.isSecuritySchemePartType,p.isQueryParametersProperty),new g(p.isTraitType,p.isHeadersProperty),new g(p.isMethodType,p.isHeadersProperty),new g(p.isSecuritySchemePartType,p.isHeadersProperty),new g(p.isBodyLikeType,p.isFormParametersProperty)]),\"name\")}return i(t,e),t}(b),T=function(e){function t(){e.call(this,new v([new g(p.isLibraryBaseSibling,p.isTypesProperty),new g(function(e){return p.isLibraryBaseSibling(e)&&p.isRAML10Type(e)},p.isSchemasProperty)]),\"name\")}return i(t,e),t.prototype.match=function(e,t){return!(null==e.parent()||!this.matcher.match(e.parent().definition(),t))},t}(S),E=(function(e){function t(){e.call(this,new v([new g(p.isLibraryBaseSibling,p.isUsesProperty)]),\"name\")}i(t,e),t}(b),function(e){function t(){e.call(this,new v([new g(p.isObjectTypeDeclarationSibling,p.isPropertiesProperty)]),\"name\")}return i(t,e),t}(b)),C=function(e){function t(){e.call(this,new v([new g(p.isMethodBaseSibling,p.isResponsesProperty)]),\"code\")}return i(t,e),t}(b),N=function(e){function t(){e.call(this,new v([new g(function(e){return!0},p.isAnnotationsProperty)]),\"name\")}return i(t,e),t}(b),w=function(e){function t(){e.call(this,new v([new g(p.isResponseType,p.isBodyProperty),new g(p.isMethodBaseSibling,p.isBodyProperty)]),\"name\")}return i(t,e),t}(b),k=function(e){function t(){e.call(this,new v([new g(p.isTraitType,p.isTraitsProperty)]),\"name\")}return i(t,e),t}(S),x=function(e){function t(){e.call(this,new v([new g(p.isResourceTypeType,p.isResourceTypesProperty)]),\"name\")}return i(t,e),t.prototype.transform=function(t){var n=f.Universe10.ResourceBase.properties.methods.name;if(Array.isArray(t))return t;var r=t[n];return r&&r.forEach(function(e){var n=Object.keys(e);if(n.length>0){var r=n[0];t[r]=e[r]}}),delete t[n],e.prototype.transform.call(this,t)},t}(S),R=function(e){function t(){e.call(this,new v([new g(p.isTypeDeclarationSibling,p.isFacetsProperty)]),\"name\")}return i(t,e),t}(b),I=function(e){function t(){e.call(this,null,\"name\")}return i(t,e),t.prototype.match=function(e,t){return null!=t&&p.isSecuritySchemesProperty(t)},t}(S),D=function(e){function t(){e.call(this,new v([new g(p.isLibraryBaseSibling,p.isAnnotationTypesProperty)]),\"name\")}return i(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},t}(S),M=function(e){function t(){e.call(this,null,\"method\")}return i(t,e),t.prototype.match=function(e,t){return null!=e.parent()&&p.isResourceTypeType(e.parent().definition())&&p.isMethodsProperty(t)},t}(S),P=a.Universe10.ExampleSpec.properties.name.name,L=a.Universe10.ExampleSpec.properties.value.name,O=(function(){function e(){}e.prototype.match=function(e,t){return p.isExampleSpecType(e.definition())},e.prototype.transform=function(e){var t=this;if(Array.isArray(e)&&e.length>0){if(e[0][P]){var n={};return e.forEach(function(e){return n[e[P]]=t.getActualExample(e)}),n}return e.map(function(e){return t.getActualExample(e)})}return e},e.prototype.getActualExample=function(e){return e.structuredContent?e.structuredContent:e[L]},e}(),function(){function e(){}return e.prototype.match=function(e,t){return e.definition&&p.isTypeDeclarationSibling(e.definition())},e.prototype.transform=function(e){var t=Array.isArray(e),n=t?e:[e];return n.forEach(function(e){var t=e.example;t&&(e.example=t.structuredValue,e.structuredExample=t)}),t?n:n[0]},e}()),U=function(){function e(){this.matcher=new g(function(e){return p.isApiType(e)&&p.isRAML08Type(e)},p.isSchemasProperty)}return e.prototype.match=function(e,t){return null!=e.parent()&&this.matcher.match(e.parent().definition(),t)},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,t},e.prototype.getActualExample=function(e){return e.structuredContent?e.structuredContent:e[L]},e}(),F=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&p.isProtocolsProperty(t)},e.prototype.transform=function(e){return\"string\"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},e}(),B=function(){function e(){this.usecases=new v([new g(p.isApiSibling,p.isMediaTypeProperty)])}return e.prototype.match=function(e,t){return this.usecases.match(e.definition(),t)},e.prototype.transform=function(e){return Array.isArray(e)&&1==e.length?e[0]:e},e}(),K=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&p.isResourcesProperty(t)},e.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[f.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split(\"/\");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=t.absoluteUri()}return e},e}(),V=function(){function e(){}return e.prototype.match=function(e,t){return!(!e.parent()||!e.parent().highLevel().lowLevel().libProcessed)&&(p.isAnnotationTypesProperty(t)||p.isTypesProperty(t)||p.isResourceTypesProperty(t)||p.isTraitsProperty(t)||p.isSecuritySchemesProperty(t))},e.prototype.transform=function(e,t){for(var n=t.highLevel().lowLevel(),r=n.key(),i=n;s.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e[Object.keys(e)[0]];return o.name=a,o.displayName==r&&(o.displayName=a),e},e}(),j=function(){function e(){}return e.prototype.match=function(e,t){var n=e.highLevel();if(!n)return!1;var r=n.definition();return!!r&&(p.isResourceTypeType(r)||p.isTraitType(r)||p.isMethodType(r)||p.isTypeDeclarationSibling(r))},e.prototype.transform=function(e){if(Array.isArray(e))return e;var t=a.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},e}(),W=function(){function e(){}return e.prototype.match=function(e,t){return null!=t&&(p.isSecuredByProperty(t)||p.isIsProperty(t)||null!=e.parent()&&(p.isResourceType(e.parent().highLevel().definition())||p.isResourceTypeType(e.parent().highLevel().definition()))&&p.isTypeProperty(t))},e.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},e.prototype.toSimpleValue=function(e){var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},e}(),q=function(){function e(){}return e.prototype.match=function(e,t){if(!o.BasicNodeImpl.isInstance(e))return!1;var n=e.highLevel(),r=n.definition();if(!p.isTypeDeclarationDescendant(r))return!1;var i=n.localType();return!(!i||!i.isArray())},e.prototype.transform=function(e){var t=f.Universe10.TypeDeclaration.properties.type.name,n=f.Universe10.TypeDeclaration.properties.schema.name,r=f.Universe10.ArrayTypeDeclaration.properties.items.name,i=e[t];return i||(i=e[n]),1==i.length&&d.stringEndsWith(i[0],\"[]\")&&(null==e[r]&&(e[r]=i[0].substring(0,i[0].length-2)),i[0]=\"array\"),e},e}(),z=function(){function e(){this.map={}}return e.prototype.addProperty=function(e,t){var n=this.map[t];n||(n=new H(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return Object.keys(this.map).map(function(t){return e.map[t].print()}).join(\"\\n\")+\"\\n\"},e}(),H=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.domain().nameId(),n=this.map[t];n||(n=new Y(t),this.map[t]=n),n.addProperty(e)},e.prototype.print=function(){var e=this;return this.typeName+\":\\n\"+Object.keys(this.map).map(function(t){return\"    \"+e.map[t].print()}).join(\"\\n\")},e}(),Y=function(){function e(e){this.typeName=e,this.map={}}return e.prototype.addProperty=function(e){var t=e.nameId();this.map[t]=e},e.prototype.print=function(){return this.typeName+\": \"+Object.keys(this.map).sort().join(\", \")},e}()},function(e,t,n){\"use strict\";function r(e,t,n,r){var i=r.end!==!1,a=r.strict,o=\"\";r.sensitive||(o+=\"i\");var s=e.replace(p,function(e,r,i,a){if(a)return\"\\\\\"+a;n.push({name:i,prefix:r||\"/\"}),r=r?\"\\\\\"+r:\"\";var o=t[i],s=o&&c[o.type]||\"[^\"+(r||\"\\\\/\")+\"]+\",u=o&&o.required===!1;return Array.isArray(o.enum)&&o.enum.length&&(s=\"(?:\"+o.enum.map(function(e){return String(e).replace(l,\"\\\\$1\")}).join(\"|\")+\")\"),r+\"(\"+s+\")\"+(u?\"?\":\"\")}),u=\"/\"===e.charAt(e.length-1);return a||(s=(u?s.slice(0,-2):s)+\"(?:\\\\/(?=$))?\"),s+=i?\"$\":a&&u?\"\":\"(?=\\\\/|$)\",new RegExp(\"^\"+s+(i?\"$\":\"\"),o)}function i(e){try{return decodeURIComponent(e)}catch(n){var t=new Error('Failed to decode param \"'+e+'\"');throw t.status=400,t}}function a(e,t,n){if(n=n||{},\"/\"===e&&n.end===!1)return o;t=t||{};var a=[],c=r(e,t,a,n),l=s.sanitize()(t),p=u.validate()(t);return function(e){var n=c.exec(e);if(!n)return!1;if(t.mediaTypeExtension&&n.length>1&&!n[n.length-1]){var r=n[n.length-2],o=r.lastIndexOf(\".\");o>=0&&(n[n.length-2]=r.substring(0,o),n[n.length-1]=r.substring(o))}for(var s=n[0],u={},f=1;f<n.length;f++){var d=a[f-1],m=n[f];u[d.name]=null==m?m:i(m)}return u=l(u),!!p(u).valid&&{path:s,params:u}}}function o(e){return{path:\"\",params:{}}}var s=n(325),u=n(326),c={number:\"[-+]?\\\\d+(?:\\\\.\\\\d+)?\",integer:\"[-+]?\\\\d+\",date:\"(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), \\\\d{2} (?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) \\\\d{4} (?:[0-1]\\\\d|2[0-3]):[0-5]\\\\d:[0-5]\\\\d GMT\",boolean:\"(?:true|false)\"},l=/([.*+?=^!:${}()|[\\]\\/\\\\])/g,p=new RegExp([\"([.\\\\/])?\\\\{([^}]+)\\\\}\",l.source].join(\"|\"),\"g\");t.ramlPathMatch=a},function(e,t,n){\"use strict\";function r(e){return null==e}function i(e){return r(e)?\"\":String(e)}function a(e){return[0,!1,\"\",\"0\",\"false\"].indexOf(e)===-1}function o(e){return isFinite(e)?Number(e):null}function s(e){return e%1==0?Number(e):null}function u(e){return isNaN(Date.parse(e))?null:new Date(e)}function c(e,t,n){var i=Array.isArray(e)?e:[e],a=i.map(function(e){function i(e,t,n){for(var r=0;r<a.length;r++){var i=a[r],e=i(e,t,n);if(null!=e)return e}return null}var a=[],o=n[e.type];return\"function\"==typeof o&&a.push(o),Object.keys(e).filter(function(e){return\"type\"!==e&&\"repeat\"!==e&&\"default\"!==e}).forEach(function(n){var r=t[n];\"function\"==typeof r&&a.push(r(e[n],n))}),function(t,n,a){if(r(t))return null!=e.default?i(e.default,n,a):e.repeat&&!e.required?[]:t;if(e.repeat){var o=Array.isArray(t)?t:[t];return o=o.map(function(e){return i(e,n,a)}),o.some(r)?null:t}if(Array.isArray(t)){if(t.length>1)return null;t=t[0]}return i(t,n,a)}});return function(e,t,n){for(var r=0;r<a.length;r++){var i=a[r],o=i(e,t,n);if(null!=o)return o}return e}}function l(){function e(e){return c(e,n,r)}var t,n={},r={string:i,number:o,integer:s,boolean:a,date:u},l=function(e){if(!e)return function(){return{}};var t={};return Object.keys(e).forEach(function(n){t[n]=l.rule(e[n])}),function(e){e=e||{};var n={};return Object.keys(t).forEach(function(r){var i=e[r],a=t[r];Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=a(i,r,e))}),n}};return t=l,t.rule=e,t.TYPES=r,t.RULES=n,t}t.sanitize=l},function(e,t,n){\"use strict\";(function(e){function n(e){return\"[object Date]\"===_.call(e)&&!isNaN(e.getTime())}function r(e){return\"boolean\"==typeof e}function i(e){return\"string\"==typeof e}function a(e){return\"number\"==typeof e&&e%1==0}function o(e){return\"number\"==typeof e&&isFinite(e)}function s(e){return function(t){return t>=e}}function u(e){return function(t){return t<=e}}function c(t){return function(n){return e.byteLength(n)>=t}}function l(t){return function(n){return e.byteLength(n)<=t}}function p(e){return e&&0!=e.length?function(t){return e.indexOf(t)>-1}:function(e){return!0}}function f(e){var t=\"string\"==typeof e?new RegExp(e):e;return t.test.bind(t)}function d(e,t,n,r,i){return{valid:e,rule:r,attr:i,value:n,key:t}}function m(e,t){var n=[];return Object.keys(e).forEach(function(r){var i=t[r];if(i){var a=e[r];n.push([r,i(a,r),a])}}),function(e,t,r){for(var i=0;i<n.length;i++){var a=n[i],o=a[0],s=a[1],u=a[2];if(!s(e,t,r))return d(!1,t,e,o,u)}return d(!0,t,e)}}function h(e,t,n){var r=Array.isArray(e)?e:[e],i=!r.length,a=[],o=[];return r.forEach(function(e){var n=[e.type||\"string\",m(e,t)];e.required||(i=!0),e.repeat?o.push(n):a.push(n)}),function(e,t,r){if(null==e)return d(i,t,e,\"required\",!i);var s=Array.isArray(e),u=s?e:[e],c=s?o:a;if(!c.length)return d(!1,t,e,\"repeat\",!s);var l=null,p=e;return c.some(function(e){return!!u.every(function(i){var a=e[0],o=n[a]&&n[a](i,t,r);return o||(l=d(!1,t,p,\"type\",a)),o})&&(u.every(function(n){return l=(0,e[1])(n,t),l.valid}),!0)}),l}}function y(){function e(e){return h(e,m,d)}var t,d={date:n,number:o,integer:a,boolean:r,string:i},m={minimum:s,maximum:u,minLength:c,maxLength:l,enum:p,pattern:f};return t=function(t){if(!t)return function(e){return{valid:!0,errors:[]}};var n={};return Object.keys(t).forEach(function(r){n[r]=e(t[r])}),function(e){e=e||{};var t=Object.keys(n).map(function(t){var r=e[t];return(0,n[t])(r,t,e)}).filter(function(e){return!e.valid});return{valid:0===t.length,errors:t}}},t.rule=e,t.TYPES=d,t.RULES=m,t}var _=Object.prototype.toString;t.validate=y}).call(t,n(16).Buffer)},function(e,t,n){\"use strict\";function r(e){try{return JSON.parse(e).$schema}catch(t){return s.isXmlScheme(e)}}function i(e,t){if(s.isXmlScheme(e))return l.getXMLSchema(e,new u.ContentProvider(t)).loadSchemaReferencesAsync().then(function(){return t});var n=l.getJSONSchema(e,new u.ContentProvider(t)),r=n.getMissingReferences([]).map(function(e){return n.contentAsync(e)});return 0===r.length?Promise.resolve(t):o(Promise.all(r),n).then(function(){return t})}function a(e,t){return l.createSchema(e,new u.ContentProvider(t)).getMissingReferences([],!0)}function o(e,t){return e.then(function(e){if(e.length>0){var n=t.getMissingReferences(e);if(0===n.length)return[];var r=[];return n.forEach(function(e){r.push(t.contentAsync(e))}),o(Promise.all(r.concat(e)),t)}return Promise.resolve([])})}var s=n(145),u=n(63),c=n(0),l=c.getSchemaUtils();t.isScheme=r,t.startDownloadingReferencesAsync=i,t.getReferences=a},function(e,t,n){\"use strict\";function r(e,t){return new C(t).dump(e)}function i(e,t,n,r,i){if(!t)return e;var a={};e&&e.arr.forEach(function(e){var t=a[e.name()];t||(t=[],a[e.name()]=t),t.push(e)});for(var o=new N(r),s=0,u={},c=!1,l=t.indexOf(\"{\");l>=0&&!((s=t.indexOf(\"}\",++l))<0);l=t.indexOf(\"{\",s)){var f=t.substring(l,s);if(u[f]=!0,a[f])a[f].forEach(function(e){o.registerValue(e),o.registerMeta(null)});else{c=!0;var d=n.definition().universe(),m=d.type(_.Universe10.StringTypeDeclaration.name),h=S.createStubNode(m,null,f,n.lowLevel().unit());if(h.setParent(n),h.attrOrCreate(\"name\").setValue(f),h.patchProp(r),o.registerValue(h),i){o.hasMeta=!0;var y=new p.NodeMetadataImpl;y.setCalculated(),o.registerMeta(y)}}}return c?(Object.keys(a).filter(function(e){return!u[e]}).forEach(function(e){return a[e].forEach(function(e){o.registerValue(e),o.hasMeta&&o.registerMeta(null)})}),o):e}function a(e,t,n,r){if(0==t.length)return null;var i=e.lowLevel().unit().absolutePath(),a=new N(n);return t.forEach(function(e){if(a.registerValue(e),r)if(e.lowLevel().unit().absolutePath()!=i){a.hasMeta=!0;var t=new p.NodeMetadataImpl;t.setCalculated(),a.mArr.push(t)}else a.mArr.push(null)}),a}function o(e,t,n,r){var i;if(e.isElement())i=e.asElement().definition();else if(e.isAttr()){var a=e.asAttr().property();a&&(i=a.range())}if((i instanceof d.UserDefinedClass||i.isUserDefined())&&(i=A.find(i.allSuperTypes(),function(e){return!e.isUserDefined()})),null==i)return n;var o=i.universe().version(),s=r[o];if(!s)return n;var u=s[i.nameId()];if(!u)return n;var c=t?t.nameId():\"__$$anyprop__\",l=u[c];if(l||(l=u.__$$anyprop__),!l)return n;for(var p=0,f=l;p<f.length;p++){n=f[p].transform(n,e)}return n}function s(e,t){for(var n=0,r=e;n<r.length;n++){var i=r[n],a=i.registrationInfo();if(a)for(var o=0,s=Object.keys(a);o<s.length;o++){var u=s[o],c=a[u],l=t[u];null==l&&(l={},t[u]=l);for(var p=0,f=Object.keys(c);p<f.length;p++){var d=f[p],m=c[d],h=l[d];null==h&&(h={},l[d]=h);for(var y=0,_=Object.keys(m);y<_.length;y++){var g=_[y],v=h[g];if(null==v){if(v=[],\"__$$anyprop__\"!=g){var b=h.__$$anyprop__;b&&(v=v.concat(b))}h[g]=v}if(\"__$$anyprop__\"==g)for(var S=0,A=Object.keys(h);S<A.length;S++){var T=A[S];h[T].push(i)}else v.push(i)}}}}}function u(e){if(0==e.length)return{};for(var t=e[0],n=1;n<e.length;n++){t=c(t,e[n])}return t}function c(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n],a=e[i],o=t[i];null==a?e[i]=o:\"object\"==typeof a&&\"object\"==typeof o&&(e[i]=c(a,o))}return e}var l=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},p=n(29),f=n(17),d=n(0),m=n(4),h=n(46),y=n(5),_=n(3),g=n(15),v=n(143),b=n(318),S=n(36),A=n(1),T=n(11);t.dump=r;var E=function(e){var t,n=e.root();if(n){var r=n.lowLevel();if(r){var i=r.unit();i&&(t=i.absolutePath())}}return t},C=function(){function e(e){this.options=e,this.nodePropertyTransformers=[new H,new Y,new J,new X,new G,new $,new V,new Q,new ee,new Z,new te],this.nodeTransformersMap={},this.nodePropertyTransformersMap={},this.options=this.options||{},null==this.options.serializeMetadata&&(this.options.serializeMetadata=!0),null==this.options.attributeDefaults&&(this.options.attributeDefaults=!0),this.defaultsCalculator=new v.AttributeDefaultsCalculator(!0,!0),this.nodeTransformers=[new U,new F(this.options.dumpXMLRepresentationOfExamples),new B,new K,new j,new W,new q,new ne,new z(this.options.allUriParameters)],s(this.nodeTransformers,this.nodeTransformersMap),s(this.nodePropertyTransformers,this.nodePropertyTransformersMap)}return e.prototype.init=function(e){if(this.helpersMap={baseUriParameters:w,uriParameters:k},e.isElement()){var t=e.asElement(),n=t.definition();if(\"RAML08\"==n.universe().version()&&y.isApiType(n)){var r={};t.elementsOfKind(_.Universe08.Api.properties.schemas.name).forEach(function(e){return r[e.name()]=e}),this.helpersMap.schemaContent=new R(r)}y.isApiSibling(n)&&(this.helpersMap.traits=new x(b.allTraits(t,!1)),this.helpersMap.resourceTypes=new x(b.allResourceTypes(t,!1)))}},e.prototype.dispose=function(){delete this.helpersMap},e.prototype.dump=function(e){this.init(e);var t=e.isElement(),n=e.parent(),r=!n&&this.options.rootNodeDetails,i=E(e),a=this.dumpInternal(e,null,i,null,!0);if(r){var o=a;if(a={},a.specification=o,t){var s=e.asElement(),u=s.definition();if(u){var c=u.universe().version();a.ramlVersion=c,a.type=u.nameId()}a.errors=this.dumpErrors(p.errors(s))}}return this.dispose(),a},e.prototype.dumpInternal=function(e,t,n,r,i){var a=this;if(void 0===i&&(i=!1),null==e)return null;if(e.isReused()){var s=e.getJSON();if(null!=s)return s}var u={};if(e.isElement()){var c={},l=e.asElement(),f=l.definition();if(y.isExampleSpecType(f))if(null!=l.parent())u=\"\";else{var S=m.auxiliaryTypeForExample(l),E=b.dumpExpandableExample(S.examples()[0],this.options.dumpXMLRepresentationOfExamples),C=l.elementsOfKind(\"uses\").map(function(e){return a.dumpInternal(e,e.property(),n)});C.length>0&&(E.uses=C),u=E}else{for(var w={},k=l.attrs().concat(l.children().filter(function(e){return!e.isAttr()})),x=0,R=k;x<R.length;x++){var I=R[x],D=I.property();if(null!=D){var M=D.nameId(),P=c[M];null==P&&(P=new N(D),c[M]=P),P.registerValue(I)}else var L=I.lowLevel(),O=L.key()}for(var U={},F=0,B=f.allProperties().concat(f.allCustomProperties());F<B.length;F++){var K=B[F];if(!d.UserDefinedProp.isInstance(K)){var M=K.nameId();if(i||\"uses\"!=M||!y.isApiSibling(l.root().definition())){var P=c[M];if(y.isTypeProperty(K)){if(c.schema){var V=null==P;!V&&1==P.arr.length&&P.arr[0].isAttr()&&(V=null==P.arr[0].asAttr().value()),V&&(r=r||new p.NodeMetadataImpl,r.registerInsertedAsDefaultValue(\"type\"));continue}if(y.isStringTypeDeclarationDescendant(f)){if(null==P){u.type=\"string\",r=r||new p.NodeMetadataImpl,r.registerInsertedAsDefaultValue(\"type\");continue}if(1==P.arr.length&&P.arr[0].isAttr()){var j=P.arr[0].asAttr().value();if(null==j){u.type=\"string\",r=r||new p.NodeMetadataImpl,r.registerInsertedAsDefaultValue(\"type\");continue}if(\"NULL\"===j||\"Null\"===j){u.type=\"string\";continue}}}}P=this.applyHelpers(P,l,K,this.options.serializeMetadata);var W=w[M],q=void 0;if(void 0!==P){if(P.isMultiValue){if(q=P.arr.map(function(e,t){var r=P.hasMeta?P.mArr[t]:null;return a.dumpInternal(e,P.prop,n,r)}),K.isValueProperty()){var z=[],H=!1;P.arr.filter(function(e){return e.isAttr()}).map(function(e){return e.asAttr()}).filter(function(e){return e.isAnnotatedScalar()}).forEach(function(e){var t=e.annotations().map(function(e){return a.dumpInternal(e,null,n)});H=H||t.length>0,z.push(t)}),H&&(U[M]=z)}y.isTypeDeclarationDescendant(f)&&y.isTypeProperty(K)&&P.arr.map(function(e){return e.value()}).filter(function(e){return m.isStructuredValue(e)}).length>0&&(q=q[0])}else if(q=this.dumpInternal(P.val,P.prop,n),K.isValueProperty()){var Y=P.val.asAttr();if(Y.isAnnotatedScalar()){var z=Y.annotations().map(function(e){return a.dumpInternal(e,null,n)});z.length>0&&(U[M]=z)}}}else if(void 0!==W)q=W;else if(this.options.attributeDefaults){var J=this.defaultsCalculator.attributeDefaultIfEnabled(l,K);if(null!=J){r=r||new p.NodeMetadataImpl,Array.isArray(J)?J=J.map(function(e){return m.isASTPropImpl(e)?a.dumpInternal(e,K,n):e}):m.isASTPropImpl(J)&&(J=this.dumpInternal(J,K,n)),q=J,null!=q&&K.isMultiValue()&&!Array.isArray(q)&&(q=[q]);var G=this.defaultsCalculator.insertionKind(l,K);G==v.InsertionKind.CALCULATED?r.registerCalculatedValue(M):G==v.InsertionKind.BY_DEFAULT&&r.registerInsertedAsDefaultValue(M)}}if(null!=(q=o(l,K,q,this.nodePropertyTransformersMap))){if((\"type\"===M||\"schema\"==M)&&q&&q.forEach&&\"string\"==typeof q[0]){var X=q[0].trim(),$=\"{\"===X[0]&&\"}\"===X[X.length-1],Q=\"<\"===X[0]&&\">\"===X[X.length-1];if($||Q){var Z=l.lowLevel().includePath&&l.lowLevel().includePath();if(!Z){var ee=l.attr(\"type\");ee||(ee=l.attr(\"schema\")),ee&&(Z=ee.lowLevel().includePath&&ee.lowLevel().includePath())}if(Z){var te=Z.indexOf(\"#\"),ne=\"\";te>=0&&(ne=Z.substring(te),Z=Z.substring(0,te));var re,ie=l.lowLevel().unit().resolve(Z).absolutePath();re=g.stringStartsWith(ie,\"http://\")||g.stringStartsWith(ie,\"https://\")?ie:T.relative(l.lowLevel().unit().project().getRootPath(),ie),re=re.replace(/\\\\/g,\"/\"),u.schemaPath=re+ne}}}u[M]=q}}}}if(this.options.dumpSchemaContents&&c.schema&&c.schema.prop.range().key()==_.Universe08.SchemaString){l.root().elementsOfKind(\"schemas\").forEach(function(e){if(e.name()==u.schema){var t=e.attr(\"value\");t&&(u.schema=t.value(),u.schemaContent=t.value())}})}this.options.serializeMetadata&&this.serializeMeta(u,l,r),Object.keys(U).length>0&&(u.scalarsAnnotations=U);var ae=b.getTemplateParametrizedProperties(l);if(ae&&(u.parametrizedProperties=ae),y.isTypeDeclarationDescendant(f)){var oe=b.typeFixedFacets(l);oe&&(u.fixedFacets=oe)}u=o(l,t||l.property(),u,this.nodeTransformersMap)}}else if(e.isAttr()){var se,ue=e.asAttr(),se=ue.value(),D=ue.property(),ce=D.range(),le=ce.isValueType();if(le&&ue.value&&(se=ue.value()),null==se||\"number\"!=typeof se&&\"string\"!=typeof se&&\"boolean\"!=typeof se){if(m.isStructuredValue(se)){var pe=se,L=pe.lowLevel();se=L?L.dumpToObject():null;var fe=D.nameId();if(ce.isAssignableFrom(\"Reference\")){var O=Object.keys(se)[0],de=pe.valueName(),me=se[O];void 0===me&&(me=null),se={name:de,structuredValue:me}}else if(\"type\"==fe){var L=ue.lowLevel(),he=d.getUniverse(\"RAML10\").type(_.Universe10.TypeDeclaration.name),ye=d.getUniverse(\"RAML10\").type(_.Universe10.LibraryBase.name),_e=new m.ASTNodeImpl(L,ue.parent(),he,ye.property(_.Universe10.LibraryBase.properties.types.name));_e.patchType(h.doDescrimination(_e)),se=this.dumpInternal(_e,t||ue.property(),n,null,!0)}else if(\"items\"==fe&&\"object\"==typeof se){var ge=Array.isArray(se),ve=!ge;if(ge&&(ve=null!=A.find(se,function(e){return\"object\"==typeof e})),ve){se=null;var be=e.parent().lowLevel();be.children().forEach(function(e){if(\"items\"==e.key()){var r=d.getUniverse(\"RAML10\").type(_.Universe10.TypeDeclaration.name),i=d.getUniverse(\"RAML10\").type(_.Universe10.LibraryBase.name),o=new m.ASTNodeImpl(e,ue.parent(),r,i.property(_.Universe10.LibraryBase.properties.types.name));o.patchType(h.doDescrimination(o)),se=a.dumpInternal(o,t||ue.property(),n,null,!0),fe=e.key()}})}}}se=o(ue,t||ue.property(),se,this.nodeTransformersMap),u=se}else u=se}else{var L=e.lowLevel();u=L?L.dumpToObject():null}return e.setJSON(u),u},e.prototype.getDefaultsCalculator=function(){return this.defaultsCalculator},e.prototype.canBeFragment=function(e){var t=e.definition();return[t].concat(t.allSubTypes()).filter(function(e){return e.getAdapter(d.RAMLService).possibleInterfaces().filter(function(e){return e.nameId()==d.universesInfo.Universe10.FragmentDeclaration.name}).length>0}).length>0},e.prototype.dumpErrors=function(e){var t=this;return e.map(function(e){var n=t.dumpErrorBasic(e);return e.trace&&e.trace.length>0&&(n.trace=t.dumpErrors(e.trace)),n}).sort(function(e,t){return e.path!=t.path?e.path.localeCompare(t.path):e.range.start.position!=t.range.start.position?e.range.start.position-t.range.start.position:e.code-t.code})},e.prototype.dumpErrorBasic=function(e){var t={code:e.code,message:e.message,path:e.path,line:e.line,column:e.column,position:e.start,range:e.range};return e.isWarning===!0&&(t.isWarning=!0),t},e.prototype.serializeMeta=function(e,t,n){if(this.options.serializeMetadata){var r=t.definition(),i=y.isMethodType(r)&&t.optional();if(n||i){var a=n||new p.NodeMetadataImpl(!1,!1);i&&a.setOptional(),e.__METADATA__=a.toJSON()}}},e.prototype.applyHelpers=function(e,t,n,r){var i=n.nameId(),a=this.helpersMap[i];if(!a)return e;var o=a.apply(t,e,n,r);return o?o:e},e}();t.TCKDumper=C;var N=function(){function e(e){this.prop=e,this.arr=[],this.mArr=[],this.isMultiValue=e.isMultiValue()}return e.prototype.registerValue=function(e){this.isMultiValue?this.arr.push(e):this.val=e},e.prototype.registerMeta=function(e){this.isMultiValue&&this.mArr.push(e)},e}(),w={apply:function(e,t,n,r){var a=e.attr(_.Universe10.Api.properties.baseUri.name);return i(t,a?a.value():\"\",e,n,r)}},k={apply:function(e,t,n,r){var a=e.attr(_.Universe10.Resource.properties.relativeUri.name);return a?i(t,a.value(),e,n,r):t}},x=function(){function e(e){this.arr=e}return e.prototype.apply=function(e,t,n,r){return a(e,this.arr,n,r)},e}(),R=function(){function e(e){this.schemasCache08=e}return e.prototype.apply=function(e,t,n,r){var i=null,a=b.schemaContent08Internal(e,this.schemasCache08);return a&&(i=new N(n),i.registerValue(a)),i},e}();t.applyTransformersMap=o;var I=function(){function e(){}return e.prototype.match=function(e,t){if(null==e)return!1;var n=this.registrationInfo(),r=e.universe().version();if((e instanceof d.UserDefinedClass||e.isUserDefined())&&null==(e=A.find(e.allSuperTypes(),function(e){return!e.isUserDefined()})))return null==t;var i=n[r];if(!i)return!1;var a=i[e.nameId()];return!!a&&(null==t||a[t.nameId()]===!0||a.__$$anyprop__===!0)},e}(),D=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=[\"RAML10\",\"RAML08\"]),e.call(this),this.typeName=t,this.propName=n,this.applyToDescendatns=r,this.restrictToUniverses=i}return l(t,e),t.prototype.registrationInfo=function(){var e=this;if(this.regInfo)return this.regInfo;for(var t={},n=[],r=0,i=this.restrictToUniverses;r<i.length;r++){var a=i[r],o={};t[a]=o,n.push(o)}for(var s=0,u=Object.keys(t);s<u.length;s++){var a=u[s],c=d.getUniverse(a).type(this.typeName);if(c){var l=t[a],p=[this.typeName];this.applyToDescendatns&&c.allSubTypes().forEach(function(e){return p.push(e.nameId())});for(var f=0,m=p;f<m.length;f++){var h=m[f],y={};null!=this.propName?y[this.propName]=!0:y.__$$anyprop__=!0,l[h]=y}}}return this.regInfo={},Object.keys(t).forEach(function(n){var r=t[n];Object.keys(r).length>0&&(e.regInfo[n]=r)}),this.regInfo},t}(I),M=function(){function e(e){this.matcher=e}return e.prototype.match=function(e,t){var n;if(e.isElement())n=e.asElement().definition();else if(e.isAttr()){var r=e.asAttr().property();r&&(n=r.range())}return!!n&&this.matcher.match(n,t)},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),P=function(e){function t(t,n,r,i){void 0===r&&(r=!1),void 0===i&&(i=[\"RAML10\",\"RAML08\"]),e.call(this,new D(t,n,r,i)),this.typeName=t,this.propName=n,this.applyToDescendatns=r,this.restrictToUniverses=i}return l(t,e),t}(M),L=function(e){function t(t){e.call(this),this.matchers=t}return l(t,e),t.prototype.registrationInfo=function(){return this.regInfo?this.regInfo:(this.regInfo=u(this.matchers.map(function(e){return e.registrationInfo()})),this.regInfo)},t}(I),O=function(){function e(e,t){this.matcher=e,this.propName=t}return e.prototype.match=function(e,t){return e.isElement()&&this.matcher.match(e.asElement().definition(),t)},e.prototype.transform=function(e,t){var n=this;if(Array.isArray(e)&&e.length>0&&e[0][this.propName]){var r={};return e.forEach(function(e){var t=e[\"$$\"+n.propName];null!=t?delete e[\"$$\"+n.propName]:t=e[n.propName];var i=r[t];i?Array.isArray(i)?i.push(e):r[t]=[i,e]:r[t]=e}),r}return e},e.prototype.registrationInfo=function(){return this.matcher.registrationInfo()},e}(),U=function(e){function t(){e.call(this,_.Universe10.Resource.name,null,!0)}return l(t,e),t.prototype.transform=function(e,t){if(Array.isArray(e))return e;var n=e[_.Universe10.Resource.properties.relativeUri.name];if(n){for(var r=n.trim().split(\"/\");r.length>0&&0==r[0].length;)r.shift();e.relativeUriPathSegments=r,e.absoluteUri=b.absoluteUri(t.asElement()),e.completeRelativeUri=b.completeRelativeUri(t.asElement()),y.isResourceType(t.parent().definition())?e.parentUri=b.completeRelativeUri(t.parent()):e.parentUri=\"\"}return e},t}(P),F=function(e){function t(t){void 0===t&&(t=!1),e.call(this,_.Universe10.TypeDeclaration.name,null,!0),this.dumpXMLRepresentationOfExamples=t}return l(t,e),t.prototype.transform=function(e,t){var n=Array.isArray(e);if(n&&0==e.length)return e;var r=n?e[0]:e,i=b.typeExample(t.asElement(),this.dumpXMLRepresentationOfExamples);if(i)r.examples=[i];else{var a=b.typeExamples(t.asElement(),this.dumpXMLRepresentationOfExamples);a.length>0&&(r.examples=a)}if(delete r.example,r.hasOwnProperty(\"schema\")){if(r.hasOwnProperty(\"type\")){var o=r.type;Array.isArray(o)||(o=[o],r.type=o);var s=r.schema;Array.isArray(s)?s.forEach(function(e){return o.push(e)}):o.push(s)}else r.type=r.schema;delete r.schema}if(Array.isArray(r.type)||(r.type=[r.type]),1==r.type.length){var u=r.type[0];if(\"string\"==typeof u){u=u.trim();if(g.stringEndsWith(u,\"[]\")){for(var c=u.substring(0,u.length-\"[]\".length).trim();c.length>0&&\"(\"==c.charAt(0)&&\")\"==c.charAt(c.length-1);)c=c.substring(1,c.length-1);r.type[0]=\"array\",r.items=c}}}if(r.mediaType=\"application/raml+yaml\",t&&t.isElement()){var l=t.asElement(),p=l.localType().isExternal()?l.localType():null;if(!p)for(var f=0,d=l.localType().allSuperTypes();f<d.length;f++){var m=d[f];m.isExternal()&&(p=m)}if(p){var h=p.external().schema().trim();g.stringStartsWith(h,\"<\")?r.mediaType=\"application/xml\":r.mediaType=\"application/json\"}}var _=t.property();if(_&&!(y.isHeadersProperty(_)||y.isQueryParametersProperty(_)||y.isUriParametersProperty(_)||y.isPropertiesProperty(_)||y.isBaseUriParametersProperty(_))){delete r.required;var v=r.__METADATA__;if(v){var S=v.primitiveValuesMeta;S&&delete S.required}}var o=r.type;if(o.forEach&&\"string\"==typeof o[0]){var A=t.asElement().localType();if(A&&A.hasExternalInHierarchy()){var T=o[0].trim(),E=\"{\"===T[0]&&\"}\"===T[T.length-1],C=\"<\"===T[0]&&\">\"===T[T.length-1];E?r.typePropertyKind=\"JSON\":C&&(r.typePropertyKind=\"XML\")}else r.typePropertyKind=\"TYPE_EXPRESSION\"}else\"object\"==typeof o&&(r.typePropertyKind=\"INPLACE\");return e},t}(P),B=function(e){function t(){e.call(this,new L([new D(_.Universe10.TypeDeclaration.name,_.Universe10.LibraryBase.properties.annotationTypes.name,!0,[\"RAML10\"]),new D(_.Universe10.TypeDeclaration.name,_.Universe10.LibraryBase.properties.types.name,!0,[\"RAML10\"]),new D(_.Universe10.Trait.name,_.Universe10.LibraryBase.properties.traits.name,!0,[\"RAML10\"]),new D(_.Universe10.AbstractSecurityScheme.name,_.Universe10.LibraryBase.properties.securitySchemes.name,!0,[\"RAML10\"]),new D(_.Universe10.ResourceType.name,_.Universe10.LibraryBase.properties.resourceTypes.name,!0,[\"RAML10\"])]))}return l(t,e),t.prototype.transform=function(e,t){if(!t.parent()||!t.parent().lowLevel().libProcessed)return e;var n=t.lowLevel(),r=n.key();e.$$name=r;for(var i=n;f.LowLevelProxyNode.isInstance(i);)i=i.originalNode();var a=i.key(),o=e;return o.name=a,o.displayName==r&&(o.displayName=a),e},t}(M),K=function(e){function t(){e.call(this,new L([new D(_.Universe10.ResourceType.name,null,!0),new D(_.Universe10.Trait.name,null,!0),new D(_.Universe10.Method.name,null,!0),new D(_.Universe10.TypeDeclaration.name,null,!0)]))}return l(t,e),t.prototype.transform=function(e){if(Array.isArray(e))return e;var t=d.universesInfo.Universe10.Trait.properties.parametrizedProperties.name,n=e[t];return n&&(Object.keys(n).forEach(function(t){e[t]=n[t]}),delete e[t]),e},t}(M),V=function(e){function t(){e.call(this,new L([new D(_.Universe10.ObjectTypeDeclaration.name,_.Universe10.ObjectTypeDeclaration.properties.properties.name,!0)]),\"name\")}return l(t,e),t}(O),j=function(e){function t(){e.call(this,_.Universe08.GlobalSchema.name,_.Universe08.Api.properties.schemas.name,!0,[\"RAML08\"])}return l(t,e),t.prototype.transform=function(e){if(Array.isArray(e))return e;var t={};return t[e.key]=e.value,t},t}(P),W=function(e){function t(){e.call(this,new L([new D(_.Universe10.Api.name,_.Universe10.Api.properties.protocols.name,!0),new D(_.Universe10.MethodBase.name,_.Universe10.MethodBase.properties.protocols.name,!0)]))}return l(t,e),t.prototype.transform=function(e){return\"string\"==typeof e?e.toUpperCase():Array.isArray(e)?e.map(function(e){return e.toUpperCase()}):e},t}(M),q=function(e){function t(){e.call(this,new L([new D(_.Universe10.SecuritySchemeRef.name,_.Universe10.Api.properties.securedBy.name,!0),new D(_.Universe10.TraitRef.name,_.Universe10.MethodBase.properties.is.name,!0),new D(_.Universe10.ResourceTypeRef.name,_.Universe10.ResourceBase.properties.type.name,!0)]))}return l(t,e),t.prototype.transform=function(e){return e?Array.isArray(e)?e:this.toSimpleValue(e):null},t.prototype.toSimpleValue=function(e){if(\"string\"==typeof e)return e;var t=e.name,n=e.structuredValue;if(n){var r={};return r[t]=n,r}return t},t}(M),z=function(e){function t(t){void 0===t&&(t=!1),e.call(this,new L([new D(_.Universe10.Api.name,null,!0)])),this.enabled=t}return l(t,e),t.prototype.match=function(t,n){return!!this.enabled&&e.prototype.match.call(this,t,n)},t.prototype.registrationInfo=function(){return this.enabled?e.prototype.registrationInfo.call(this):null},t.prototype.transform=function(e,n,r){var i=this,a=r,o=e[t.uriParamsPropName];if(o&&(a=[].concat(r||[]),Object.keys(o).forEach(function(e){var t=o[e];Array.isArray(t)?t.forEach(function(e){return a.push(e)}):a.push(t)})),a){e.allUriParameters=a;var s=e[t.methodsPropName];s&&Object.keys(s).forEach(function(e){return s[e].allUriParameters=a})}var u=e[t.resourcesPropName];return u&&u.forEach(function(e){return i.transform(e,null,a)}),e},t.uriParamsPropName=_.Universe10.ResourceBase.properties.uriParameters.name,t.methodsPropName=_.Universe10.ResourceBase.properties.methods.name,t.resourcesPropName=_.Universe10.Api.properties.resources.name,t}(M),H=function(e){function t(){e.call(this,new L([new D(_.Universe10.ResourceBase.name,_.Universe10.ResourceBase.properties.methods.name,!0),new D(_.Universe08.Resource.name,_.Universe08.Resource.properties.methods.name,!0),new D(_.Universe08.ResourceType.name,_.Universe08.ResourceType.properties.methods.name,!0)]),\"method\")}return l(t,e),t}(O),Y=function(e){function t(){e.call(this,new L([new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.types.name,!0),new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.schemas.name,!0),new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.annotationTypes.name,!0)]),\"name\")}return l(t,e),t}(O),J=function(e){function t(){e.call(this,new L([new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.traits.name,!0),new D(_.Universe08.Api.name,_.Universe08.Api.properties.traits.name,!0)]),\"name\")}return l(t,e),t}(O),G=function(e){function t(){e.call(this,new L([new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.resourceTypes.name,!0),new D(_.Universe08.Api.name,_.Universe10.Api.properties.resourceTypes.name,!0,[\"RAML08\"])]),\"name\")}return l(t,e),t}(O),X=function(e){function t(){e.call(this,new L([new D(_.Universe10.LibraryBase.name,_.Universe10.LibraryBase.properties.securitySchemes.name,!0),new D(_.Universe08.Api.name,_.Universe08.Api.properties.securitySchemes.name,!0,[\"RAML08\"])]),\"name\")}return l(t,e),t}(O),$=function(e){function t(){e.call(this,new L([new D(_.Universe10.Api.name,_.Universe10.Api.properties.baseUriParameters.name,!0),new D(_.Universe10.ResourceBase.name,_.Universe10.ResourceBase.properties.uriParameters.name,!0),new D(_.Universe08.Resource.name,_.Universe08.Resource.properties.uriParameters.name,!0,[\"RAML08\"]),new D(_.Universe10.ResourceBase.name,_.Universe10.MethodBase.properties.queryParameters.name,!0),new D(_.Universe10.MethodBase.name,_.Universe10.MethodBase.properties.queryParameters.name,!0),new D(_.Universe10.Operation.name,_.Universe10.MethodBase.properties.queryParameters.name,!0),new D(_.Universe10.Operation.name,_.Universe10.MethodBase.properties.headers.name,!0),new D(_.Universe10.MethodBase.name,_.Universe10.MethodBase.properties.headers.name,!0),new D(_.Universe08.BodyLike.name,_.Universe08.BodyLike.properties.formParameters.name)]),\"name\")}return l(t,e),t}(O),Q=function(e){function t(){e.call(this,new L([new D(_.Universe10.MethodBase.name,_.Universe10.MethodBase.properties.responses.name,!0)]),\"code\")}return l(t,e),t}(O),Z=function(e){function t(){e.call(this,new L([new D(_.Universe10.Annotable.name,_.Universe10.Annotable.properties.annotations.name,!0)]),\"name\")}return l(t,e),t}(O),ee=function(e){function t(){e.call(this,new L([new D(_.Universe10.Response.name,_.Universe10.Response.properties.body.name),new D(_.Universe10.MethodBase.name,_.Universe10.MethodBase.properties.body.name,!0)]),\"name\")}return l(t,e),t}(O),te=function(e){function t(){e.call(this,new L([new D(_.Universe10.TypeDeclaration.name,_.Universe10.TypeDeclaration.properties.facets.name,!0)]),\"name\")}return l(t,e),t}(O),ne=function(e){function t(){e.call(this,new L([new D(_.Universe10.LibraryBase.name,null,!0,[\"RAML10\"])]))}return l(t,e),t.prototype.transform=function(e,t){if(!e)return e;if(!e.hasOwnProperty(\"schemas\"))return e;var n=e.schemas;if(e.hasOwnProperty(\"types\")){var r=e.types;Object.keys(n).forEach(function(e){r.hasOwnProperty(e)||(r[e]=n[e])})}else e.types=n;return delete e.schemas,e},t}(M);t.mergeRegInfos=u},function(e,t,n){\"use strict\";function r(e){return i.completeRelativeUri(e)}var i=n(89);t.completeRelativeUri=r},function(e,t){e.exports=[{classes:[{name:\"GlobalSchema\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[{typeName:\"Referencable\",nameSpace:\"\",basicName:\"Referencable\",typeKind:0,typeArguments:[{typeName:\"Sys.SchemaString\",nameSpace:\"Sys\",basicName:\"SchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"}],fields:[{name:\"key\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the global schema, used to refer on schema content\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"Sys.SchemaString\",nameSpace:\"Sys\",basicName:\"SchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Content of the schema\"]},{name:\"MetaModel.value\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.actuallyExports\",arguments:[\"value\"]},{name:\"MetaModel.description\",arguments:[\"Content of the schema\"]}],extends:[{typeName:\"RAMLSimpleElement\",nameSpace:\"\",basicName:\"RAMLSimpleElement\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"}],moduleName:\"RAMLSpec\",annotationOverridings:{}},{name:\"Api\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The title property is a short plain text description of the RESTful API. The value SHOULD be suitable for use as a title for the contained user documentation.\"]}],valueConstraint:null,optional:!1},{name:\"version\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"If the RAML API definition is targeted to a specific API version, the API definition MUST contain a version property. The version property is OPTIONAL and should not be used if: The API itself is not versioned. The API definition does not change between versions. The API architect can decide whether a change to user documentation elements, but no change to the API's resources, constitutes a version change. The API architect MAY use any versioning scheme so long as version numbers retain the same format. For example, 'v3', 'v3.0', and 'V3' are all allowed, but are not considered to be equal.\"]}],valueConstraint:null,optional:!1},{name:\"baseUri\",type:{typeName:\"Sys.FullUriTemplateString\",nameSpace:\"Sys\",basicName:\"FullUriTemplateString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional during development; Required after implementation) A RESTful API's resources are defined relative to the API's base URI. The use of the baseUri field is OPTIONAL to allow describing APIs that have not yet been implemented. After the API is implemented (even a mock implementation) and can be accessed at a service endpoint, the API definition MUST contain a baseUri property. The baseUri property's value MUST conform to the URI specification RFC2396 or a Level 1 Template URI as defined in RFC6570. The baseUri property SHOULD only be used as a reference value.\"]}],valueConstraint:null,optional:!1},{name:\"baseUriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.BURI\"]},{name:\"MetaModel.description\",arguments:[\"Base uri parameters are named parameters which described template parameters in the base uri\"]}],valueConstraint:null,optional:!1},{name:\"uriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.BURI\"]},{name:\"MetaModel.description\",arguments:[\"URI parameters can be further defined by using the uriParameters property. The use of uriParameters is OPTIONAL. The uriParameters property MUST be a map in which each key MUST be the name of the URI parameter as defined in the baseUri property. The uriParameters CANNOT contain a key named version because it is a reserved URI parameter name. The value of the uriParameters property is itself a map that specifies  the property's attributes as named parameters\"]}],valueConstraint:null,optional:!1},{name:\"protocols\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"HTTP\",\"HTTPS\"]]},{name:\"MetaModel.description\",arguments:[\"A RESTful API can be reached HTTP, HTTPS, or both. The protocols property MAY be used to specify the protocols that an API supports. If the protocols property is not specified, the protocol specified at the baseUri property is used. The protocols property MUST be an array of strings, of values `HTTP` and/or `HTTPS`.\"]}],valueConstraint:null,optional:!1},{name:\"mediaType\",type:{typeName:\"Bodies.MimeType\",nameSpace:\"Bodies\",basicName:\"MimeType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},annotations:[{name:\"MetaModel.oftenKeys\",arguments:[[\"application/json\",\"application/xml\",\"application/x-www-form-urlencoded\",\"multipart/formdata\"]]},{name:\"MetaModel.description\",arguments:[\"(Optional) The media types returned by API responses, and expected from API requests that accept a body, MAY be defaulted by specifying the mediaType property. This property is specified at the root level of the API definition. The property's value MAY be a single string with a valid media type described in the specification.\"]},{name:\"MetaModel.inherited\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"schemas\",type:{base:{typeName:\"GlobalSchema\",nameSpace:\"\",basicName:\"GlobalSchema\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"To better achieve consistency and simplicity, the API definition SHOULD include an OPTIONAL schemas property in the root section. The schemas property specifies collections of schemas that could be used anywhere in the API definition. The value of the schemas property is an array of maps; in each map, the keys are the schema name, and the values are schema definitions. The schema definitions MAY be included inline or by using the RAML !include user-defined data type.\"]}],valueConstraint:null,optional:!1},{name:\"traits\",type:{base:{typeName:\"Methods.Trait\",nameSpace:\"Methods\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Declarations of traits used in this API\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"Security.SecuritySchemeRef\",nameSpace:\"Security\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"A list of the security schemes to apply to all methods, these must be defined in the securitySchemes declaration.\"]}],valueConstraint:null,optional:!1},{name:\"securitySchemes\",type:{base:{typeName:\"Security.AbstractSecurityScheme\",nameSpace:\"Security\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Security schemes that can be applied using securedBy\"]}],valueConstraint:null,optional:!1},{name:\"resourceTypes\",type:{base:{typeName:\"Resources.ResourceType\",nameSpace:\"Resources\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Declaration of resource types used in this API\"]}],valueConstraint:null,optional:!1},{name:\"resources\",type:{base:{typeName:\"Resources.Resource\",nameSpace:\"Resources\",basicName:\"Resource\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Resource\"]},{name:\"MetaModel.description\",arguments:[\"Resources are identified by their relative URI, which MUST begin with a slash (/). A resource defined as a root-level property is called a top-level resource. Its property's key is the resource's URI relative to the baseUri. A resource defined as a child property of another resource is called a nested resource, and its property's key is its URI relative to its parent resource's URI. Every property whose key begins with a slash (/), and is either at the root of the API definition or is the child property of a resource property, is a resource property. The key of a resource, i.e. its relative URI, MAY consist of multiple URI path fragments separated by slashes; e.g. `/bom/items` may indicate the collection of items in a bill of materials as a single resource. However, if the individual URI path fragments are themselves resources, the API definition SHOULD use nested resources to describe this structure; e.g. if `/bom` is itself a resource then `/items` should be a nested resource of `/bom`, while `/bom/items` should not be used.\"]}],valueConstraint:null,optional:!1},{name:\"documentation\",type:{base:{typeName:\"DocumentationItem\",nameSpace:\"\",basicName:\"DocumentationItem\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"The API definition can include a variety of documents that serve as a user guides and reference documentation for the API. Such documents can clarify how the API works or provide business context. Documentation-generators MUST include all the sections in an API definition's documentation property in the documentation output, and they MUST preserve the order in which the documentation is declared. To add user documentation to the API, include the documentation property at the root of the API definition. The documentation property MUST be an array of documents. Each document MUST contain title and content attributes, both of which are REQUIRED. If the documentation property is specified, it MUST include at least one document. Documentation-generators MUST process the content field as if it was defined using Markdown.\"]}],valueConstraint:null,optional:!1},{name:\"RAMLVersion\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns AST node of security scheme, this reference refers to, or null.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:\"RAMLSpec\",annotationOverridings:{}},{name:\"DocumentationItem\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"title of documentation section\"]},{name:\"MetaModel.required\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"content\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Content of documentation section\"]},{name:\"MetaModel.required\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"RAMLSimpleElement\",nameSpace:\"\",basicName:\"RAMLSimpleElement\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"}],moduleName:\"RAMLSpec\",annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\",Resources:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/api.ts\"},{classes:[{name:\"SpecPartMetaData\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!0,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\"},{classes:[{name:\"ValueType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}},{name:\"StringType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"string\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"AnyType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"any\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"NumberType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"number\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BooleanType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"boolean\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Referencable\",methods:[],typeParameters:[\"T\"],typeParameterConstraint:[null],implements:[],fields:[],isInterface:!0,annotations:[],extends:[],moduleName:null,annotationOverridings:{}},{name:\"Reference\",methods:[],typeParameters:[\"T\"],typeParameterConstraint:[null],implements:[],fields:[{name:\"structuredValue\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns a structured object if the reference point to one.\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns name of referenced object\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DeclaresDynamicType\",methods:[],typeParameters:[\"T\"],typeParameterConstraint:[null],implements:[],fields:[],isInterface:!0,annotations:[],extends:[{typeName:\"Referencable\",nameSpace:\"\",basicName:\"Referencable\",typeKind:0,typeArguments:[{typeName:\"T\",nameSpace:\"\",basicName:\"T\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"UriTemplate\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This type currently serves both for absolute and relative urls\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"RelativeUriString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes relative uri templates\"]}],extends:[{typeName:\"UriTemplate\",nameSpace:\"\",basicName:\"UriTemplate\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FullUriTemplateString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes absolute uri templates\"]}],extends:[{typeName:\"UriTemplate\",nameSpace:\"\",basicName:\"UriTemplate\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FixedUri\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes fixed uris\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"MarkdownString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.innerType\",arguments:[\"markdown\"]},{name:\"MetaModel.description\",arguments:[\"Mardown string is a string which can contain markdown as an extension this markdown should support links with RAML Pointers since 1.0\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"SchemaString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Schema at this moment only two subtypes are supported (json schema and xsd)\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"JSonSchemaString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.functionalDescriminator\",arguments:[\"this.mediaType&&this.mediaType.isJSON()\"]},{name:\"MetaModel.description\",arguments:[\"JSON schema\"]}],extends:[{typeName:\"SchemaString\",nameSpace:\"\",basicName:\"SchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"XMLSchemaString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.innerType\",arguments:[\"xml\"]},{name:\"MetaModel.description\",arguments:[\"XSD schema\"]}],extends:[{typeName:\"SchemaString\",nameSpace:\"\",basicName:\"SchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ExampleString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"StatusCodeString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"JSONExample\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.functionalDescriminator\",arguments:[\"this.mediaType.isJSON()\"]}],extends:[{typeName:\"ExampleString\",nameSpace:\"\",basicName:\"ExampleString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"XMLExample\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.functionalDescriminator\",arguments:[\"this.mediaType.isXML()\"]}],extends:[{typeName:\"ExampleString\",nameSpace:\"\",basicName:\"ExampleString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"TypeInstance\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"properties\",type:{base:{typeName:\"TypeInstanceProperty\",nameSpace:\"\",basicName:\"TypeInstanceProperty\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Array of instance properties\"]}],valueConstraint:null,optional:!1},{name:\"isScalar\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Whether the type is scalar\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"any\",nameSpace:\"\",basicName:\"any\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"For instances of scalar types returns scalar value\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.customHandling\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"TypeInstanceProperty\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Property name\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Property value\"]}],valueConstraint:null,optional:!1},{name:\"values\",type:{base:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Array of values if property value is array\"]}],valueConstraint:null,optional:!1},{name:\"isArray\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Whether property has array as value\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.customHandling\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},{classes:[{name:\"RAMLSimpleElement\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\"},{classes:[{name:\"Parameter\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"name of the parameter\"]},{name:\"MetaModel.extraMetaKey\",arguments:[\"headers\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the parameter\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.defaultValue\",arguments:[\"string\"]},{name:\"MetaModel.descriminatingProperty\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The type attribute specifies the primitive type of the parameter's resolved value. API clients MUST return/throw an error if the parameter's resolved value does not match the specified type. If type is not specified, it defaults to string.\"]},{name:\"MetaModel.canBeDuplicator\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"location\",type:{typeName:\"ParameterLocation\",nameSpace:\"\",basicName:\"ParameterLocation\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"},annotations:[{name:\"MetaModel.system\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Location of the parameter (can not be edited by user)\"]}],valueConstraint:null,optional:!1},{name:\"required\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Set to true if parameter is required\"]},{name:\"MetaModel.defaultBooleanValue\",arguments:[!0]}],valueConstraint:null,optional:!1},{name:\"default\",type:{typeName:\"any\",nameSpace:\"\",basicName:\"any\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The default attribute specifies the default value to use for the property if the property is omitted or its value is not specified. This SHOULD NOT be interpreted as a requirement for the client to send the default attribute's value if there is no other value to send. Instead, the default attribute's value is the value the server uses if the client does not send a value.\"]}],valueConstraint:null,optional:!1},{name:\"example\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional) The example attribute shows an example value for the property. This can be used, e.g., by documentation generators to generate sample values for the property.\"]}],valueConstraint:null,optional:!1},{name:\"repeat\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The repeat attribute specifies that the parameter can be repeated. If the parameter can be used multiple times, the repeat parameter value MUST be set to 'true'. Otherwise, the default value is 'false' and the parameter may not be repeated.\"]},{name:\"MetaModel.defaultBooleanValue\",arguments:[!1]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}},{name:\"StringTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"string\"},optional:!1},{name:\"pattern\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The pattern attribute is a regular expression that a parameter of type string MUST match. Regular expressions MUST follow the regular expression specification from ECMA 262/Perl 5. The pattern MAY be enclosed in double quotes for readability and clarity.\"]}],valueConstraint:null,optional:!1},{name:\"enum\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error.\"]}],valueConstraint:null,optional:!1},{name:\"minLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The minLength attribute specifies the parameter value's minimum number of characters.\"]}],valueConstraint:null,optional:!1},{name:\"maxLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The maxLength attribute specifies the parameter value's maximum number of characters.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value must be a string\"]}],extends:[{typeName:\"Parameter\",nameSpace:\"\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BooleanTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"boolean\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value must be a boolean\"]}],extends:[{typeName:\"Parameter\",nameSpace:\"\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"NumberTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"number\"},optional:!1},{name:\"minimum\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type number or integer) The minimum attribute specifies the parameter's minimum value.\"]}],valueConstraint:null,optional:!1},{name:\"maximum\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type number or integer) The maximum attribute specifies the parameter's maximum value.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value MUST be a number. Indicate floating point numbers as defined by YAML.\"]}],extends:[{typeName:\"Parameter\",nameSpace:\"\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"IntegerTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"integer\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value MUST be a integer.\"]}],extends:[{typeName:\"NumberTypeDeclaration\",nameSpace:\"\",basicName:\"NumberTypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"date\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value MUST be a string representation of a date as defined in RFC2616 Section 3.3. \"]}],extends:[{typeName:\"Parameter\",nameSpace:\"\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FileTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"file\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.requireValue\",arguments:[\"location\",\"ParameterLocation.FORM\"]},{name:\"MetaModel.description\",arguments:[\"(Applicable only to Form properties) Value is a file. Client generators SHOULD use this type to handle file uploads correctly.\"]}],extends:[{typeName:\"Parameter\",nameSpace:\"\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[{name:\"ParameterLocation\",members:[\"QUERY\",\"HEADERS\",\"URI\",\"FORM\",\"BURI\"]}],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\"},{classes:[{name:\"MimeType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This sub type of the string represents mime types\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BodyLike\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Mime type of the request or response body\"]},{name:\"MetaModel.canInherit\",arguments:[\"mediaType\"]},{name:\"MetaModel.oftenKeys\",arguments:[[\"application/json\",\"application/xml\",\"application/x-www-form-urlencoded\",\"multipart/form-data\"]]}],valueConstraint:null,optional:!1},{name:\"schema\",type:{typeName:\"Sys.SchemaString\",nameSpace:\"Sys\",basicName:\"SchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.requireValue\",arguments:[\"this.name.isForm()\",\"false\"]},{name:\"MetaModel.description\",arguments:[\"The structure of a request or response body MAY be further specified by the schema property under the appropriate media type. The schema key CANNOT be specified if a body's media type is application/x-www-form-urlencoded or multipart/form-data. All parsers of RAML MUST be able to interpret JSON Schema and XML Schema. Schema MAY be declared inline or in an external file. However, if the schema is sufficiently large so as to make it difficult for a person to read the API definition, or the schema is reused across multiple APIs or across multiple miles in the same API, the !include user-defined data type SHOULD be used instead of including the content inline. Alternatively, the value of the schema field MAY be the name of a schema specified in the root-level schemas property, or it MAY be declared in an external file and included by using the by using the RAML !include user-defined data type.\"]}],valueConstraint:null,optional:!1},{name:\"example\",type:{typeName:\"Sys.ExampleString\",nameSpace:\"Sys\",basicName:\"ExampleString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Documentation generators MUST use body properties' example attributes to generate example invocations.\"]}],valueConstraint:null,optional:!1},{name:\"formParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.FORM\"]},{name:\"MetaModel.description\",arguments:[\"Web forms REQUIRE special encoding and custom declaration. If the API's media type is either application/x-www-form-urlencoded or multipart/form-data, the formParameters property MUST specify the name-value pairs that the API is expecting. The formParameters property is a map in which the key is the name of the web form parameter, and the value is itself a map the specifies the web form parameter's attributes.\"]}],valueConstraint:null,optional:!1},{name:\"schemaContent\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns schema content for the cases when schema is inlined, when schema is included, and when schema is a reference.\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Human readable description of the body\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.canInherit\",arguments:[\"mediaType\"]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"XMLBody\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"schema\",type:{typeName:\"Sys.XMLSchemaString\",nameSpace:\"Sys\",basicName:\"XMLSchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"XSD Schema\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.functionalDescriminator\",arguments:[\"this.mime.isXML()\"]},{name:\"MetaModel.description\",arguments:[\"Needed to set connection between xml related mime types and xsd schema\"]}],extends:[{typeName:\"BodyLike\",nameSpace:\"\",basicName:\"BodyLike\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"JSONBody\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"schema\",type:{typeName:\"Sys.JSonSchemaString\",nameSpace:\"Sys\",basicName:\"JSonSchemaString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"JSON Schema\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.functionalDescriminator\",arguments:[\"this.mime.isJSON()\"]},{name:\"MetaModel.description\",arguments:[\"Needed to set connection between json related mime types and json schema\"]}],extends:[{typeName:\"BodyLike\",nameSpace:\"\",basicName:\"BodyLike\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Response\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"code\",type:{typeName:\"Sys.StatusCodeString\",nameSpace:\"Sys\",basicName:\"StatusCodeString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.extraMetaKey\",arguments:[\"statusCodes\"]},{name:\"MetaModel.description\",arguments:[\"Responses MUST be a map of one or more HTTP status codes, where each status code itself is a map that describes that status code.\"]}],valueConstraint:null,optional:!1},{name:\"headers\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.HEADERS\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Header\"]},{name:\"MetaModel.description\",arguments:[\"An API's methods may support custom header values in responses. The custom, non-standard HTTP headers MUST be specified by the headers property. API's may include the the placeholder token {?} in a header name to indicate that any number of headers that conform to the specified format can be sent in responses. This is particularly useful for APIs that allow HTTP headers that conform to some naming convention to send arbitrary, custom data.\"]}],valueConstraint:null,optional:!1},{name:\"body\",type:{base:{typeName:\"BodyLike\",nameSpace:\"\",basicName:\"BodyLike\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Body\"]},{name:\"MetaModel.description\",arguments:[\"Each response MAY contain a body property, which conforms to the same structure as request body properties (see Body). Responses that can return more than one response code MAY therefore have multiple bodies defined. For APIs without a priori knowledge of the response types for their responses, `*/*` MAY be used to indicate that responses that do not matching other defined data types MUST be accepted. Processing applications MUST match the most descriptive media type first if `*/*` is used.\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\"},{classes:[{name:\"Resource\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"relativeUri\",type:{typeName:\"Sys.RelativeUriString\",nameSpace:\"Sys\",basicName:\"RelativeUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.startFrom\",arguments:[\"/\"]},{name:\"MetaModel.description\",arguments:[\"Relative URL of this resource from the parent resource\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"ResourceTypeRef\",nameSpace:\"\",basicName:\"ResourceTypeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed resource type\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"TraitRef\",nameSpace:\"\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed traits\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"SecuritySchemeRef\",nameSpace:\"\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme.\"]}],valueConstraint:null,optional:!1},{name:\"uriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.URI\"]},{name:\"MetaModel.description\",arguments:[\"Uri parameters of this resource\"]}],valueConstraint:null,optional:!1},{name:\"methods\",type:{base:{typeName:\"Methods.Method\",nameSpace:\"Methods\",basicName:\"Method\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Method\"]},{name:\"MetaModel.description\",arguments:[\"Methods that can be called on this resource\"]}],valueConstraint:null,optional:!1},{name:\"resources\",type:{base:{typeName:\"Resource\",nameSpace:\"\",basicName:\"Resource\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Resource\"]},{name:\"MetaModel.description\",arguments:[\"Children resources\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the resource\"]}],valueConstraint:null,optional:!1},{name:\"baseUriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.BURI\"]},{name:\"MetaModel.description\",arguments:[\"A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level.\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}},{name:\"ResourceTypeRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"resourceType\",type:{typeName:\"ResourceType\",nameSpace:\"\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns referenced resource type\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"ResourceType\",nameSpace:\"\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ResourceType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[{typeName:\"DeclaresDynamicType\",nameSpace:\"\",basicName:\"DeclaresDynamicType\",typeKind:0,typeArguments:[{typeName:\"ResourceType\",nameSpace:\"\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"}],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the resource type\"]}],valueConstraint:null,optional:!1},{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Instructions on how and when the resource type should be used.\"]}],valueConstraint:null,optional:!1},{name:\"methods\",type:{base:{typeName:\"Methods.Method\",nameSpace:\"Methods\",basicName:\"Method\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Methods that are part of this resource type definition\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"Security.TraitRef\",nameSpace:\"Security\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed traits\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"ResourceTypeRef\",nameSpace:\"\",basicName:\"ResourceTypeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed resource type\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"Security.SecuritySchemeRef\",nameSpace:\"Security\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme.\"]}],valueConstraint:null,optional:!1},{name:\"uriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.URI\"]},{name:\"MetaModel.description\",arguments:[\"Uri parameters of this resource\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the resource type\"]}],valueConstraint:null,optional:!1},{name:\"baseUriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.BURI\"]},{name:\"MetaModel.description\",arguments:[\"A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level.\"]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"Sys.TypeInstance\",nameSpace:\"Sys\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns object representation of parametrized properties of the resource type\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute describes the intended use or meaning of the $self. This value MAY be formatted using Markdown.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.inlinedTemplates\",arguments:[]},{name:\"MetaModel.allowQuestion\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/resources.ts\"},{classes:[{name:\"MethodBase\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"responses\",type:{base:{typeName:\"Bodies.Response\",nameSpace:\"Bodies\",basicName:\"Response\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Response\"]},{name:\"MetaModel.description\",arguments:[\"Resource methods MAY have one or more responses. Responses MAY be described using the description property, and MAY include example attributes or schema properties.\"]}],valueConstraint:null,optional:!1},{name:\"body\",type:{base:{typeName:\"Bodies.BodyLike\",nameSpace:\"Bodies\",basicName:\"BodyLike\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Body\"]},{name:\"MetaModel.description\",arguments:[\"Some method verbs expect the resource to be sent as a request body. For example, to create a resource, the request must include the details of the resource to create. Resources CAN have alternate representations. For example, an API might support both JSON and XML representations. A method's body is defined in the body property as a hashmap, in which the key MUST be a valid media type.\"]}],valueConstraint:null,optional:!1},{name:\"protocols\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"HTTP\",\"HTTPS\"]]},{name:\"MetaModel.description\",arguments:[\"A method can override an API's protocols value for that single method by setting a different value for the fields.\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"SecuritySchemeRef\",nameSpace:\"\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"A list of the security schemas to apply, these must be defined in the securitySchemes declaration. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme. Security schemas may also be applied to a resource with securedBy, which is equivalent to applying the security schemas to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource.\"]}],valueConstraint:null,optional:!1},{name:\"baseUriParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"Params.ParameterLocation.BURI\"]},{name:\"MetaModel.description\",arguments:[\"A resource or a method can override a base URI template's values. This is useful to restrict or change the default or parameter selection in the base URI. The baseUriParameters property MAY be used to override any or all parameters defined at the root level baseUriParameters property, as well as base URI parameters not specified at the root level.\"]}],valueConstraint:null,optional:!1},{name:\"queryParameters\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"ParameterLocation.QUERY\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New query parameter\"]},{name:\"MetaModel.description\",arguments:[\"An APIs resources MAY be filtered (to return a subset of results) or altered (such as transforming a response body from JSON to XML format) by the use of query strings. If the resource or its method supports a query string, the query string MUST be defined by the queryParameters property\"]}],valueConstraint:null,optional:!1},{name:\"headers\",type:{base:{typeName:\"Params.Parameter\",nameSpace:\"Params\",basicName:\"Parameter\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"ParameterLocation.HEADERS\"]},{name:\"MetaModel.description\",arguments:[\"Headers that allowed at this position\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Header\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Method object allows description of http methods\"]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"Method\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"method\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.extraMetaKey\",arguments:[\"methods\"]},{name:\"MetaModel.oneOf\",arguments:[[\"get\",\"put\",\"post\",\"delete\",\"patch\",\"options\",\"head\",\"trace\",\"connect\"]]},{name:\"MetaModel.description\",arguments:[\"Method that can be called\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"TraitRef\",nameSpace:\"\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed traits\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"MethodBase\",nameSpace:\"\",basicName:\"MethodBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Trait\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[{typeName:\"DeclaresDynamicType\",nameSpace:\"\",basicName:\"DeclaresDynamicType\",typeKind:0,typeArguments:[{typeName:\"Trait\",nameSpace:\"\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the trait\"]}],valueConstraint:null,optional:!1},{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Instructions on how and when the trait should be used.\"]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"Sys.TypeInstance\",nameSpace:\"Sys\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns object representation of parametrized properties of the trait\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the trait\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.inlinedTemplates\",arguments:[]},{name:\"MetaModel.allowQuestion\",arguments:[]}],extends:[{typeName:\"MethodBase\",nameSpace:\"\",basicName:\"MethodBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"TraitRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"trait\",type:{typeName:\"Trait\",nameSpace:\"\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns referenced trait\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"Trait\",nameSpace:\"\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},{classes:[{name:\"SecuritySchemePart\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the security scheme part\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"TraitRef\",nameSpace:\"\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed traits\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"MethodBase\",nameSpace:\"\",basicName:\"MethodBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{headers:[{name:\"MetaModel.markdownDescription\",arguments:[\"Optional array of headers, documenting the possible headers that could be accepted.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Object whose property names are the request header names and whose values describe the values.\"]}],queryParameters:[{name:\"MetaModel.markdownDescription\",arguments:[\"Query parameters, used by the schema in order to authorize the request. Mutually exclusive with queryString.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Object whose property names are the query parameter names and whose values describe the values.\"]}],queryString:[{name:\"MetaModel.description\",arguments:[\"Specifies the query string, used by the schema in order to authorize the request. Mutually exclusive with queryParameters.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Type name or type declaration\"]}],responses:[{name:\"MetaModel.description\",arguments:[\"Optional array of responses, describing the possible responses that could be sent.\"]}],description:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the security scheme part\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Markdown string\"]}]}},{name:\"SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"AbstractSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[{typeName:\"Referencable\",nameSpace:\"\",basicName:\"Referencable\",typeKind:0,typeArguments:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.startFrom\",arguments:[\"\"]},{name:\"MetaModel.hide\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the security scheme\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.oneOf\",arguments:[[\"OAuth 1.0\",\"OAuth 2.0\",\"Basic Authentication\",\"DigestSecurityScheme Authentication\",\"x-{other}\"]]},{name:\"MetaModel.descriminatingProperty\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The securitySchemes property MUST be used to specify an API's security mechanisms, including the required settings and the authentication methods that the API supports. one authentication method is allowed if the API supports them.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"string<br><br>The value MUST be one of<br>* OAuth 1.0,<br>* OAuth 2.0, <br>* BasicSecurityScheme Authentication<br>* DigestSecurityScheme Authentication<br>* x-&lt;other&gt;\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute MAY be used to describe a security schemes property.\"]}],valueConstraint:null,optional:!1},{name:\"describedBy\",type:{typeName:\"SecuritySchemePart\",nameSpace:\"\",basicName:\"SecuritySchemePart\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation.\"]}],valueConstraint:null,optional:!1},{name:\"settings\",type:{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"SecuritySchemeRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"securitySchemeName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns the name of security scheme, this reference refers to.\"]}],valueConstraint:null,optional:!1},{name:\"securityScheme\",type:{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns AST node of security scheme, this reference refers to, or null.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]}],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth1SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"requestTokenUri\",type:{typeName:\"Sys.FixedUri\",nameSpace:\"Sys\",basicName:\"FixedUri\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationUri\",type:{typeName:\"Sys.FixedUri\",nameSpace:\"Sys\",basicName:\"FixedUri\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"tokenCredentialsUri\",type:{typeName:\"Sys.FixedUri\",nameSpace:\"Sys\",basicName:\"FixedUri\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Token Request endpoint as defined in RFC5849 Section 2.3\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]},{name:\"MetaModel.functionalDescriminator\",arguments:[\"$parent.type=='OAuth 1.0'\"]}],extends:[{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth2SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"accessTokenUri\",type:{typeName:\"Sys.FixedUri\",nameSpace:\"Sys\",basicName:\"FixedUri\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationUri\",type:{typeName:\"Sys.FixedUri\",nameSpace:\"Sys\",basicName:\"FixedUri\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationGrants\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or refresh_token.\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:<br>* authorization_code<br>* password<br>* client_credentials <br>* implicit<br>* refresh_token.\"]}],valueConstraint:null,optional:!1},{name:\"scopes\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]}],extends:[{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth2SecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"OAuth 2.0\"},optional:!1},{name:\"settings\",type:{typeName:\"OAuth2SecuritySchemeSettings\",nameSpace:\"\",basicName:\"OAuth2SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth1SecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"OAuth 1.0\"},optional:!1},{name:\"settings\",type:{typeName:\"OAuth1SecuritySchemeSettings\",nameSpace:\"\",basicName:\"OAuth1SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BasicSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"Basic Authentication\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DigestSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"Digest Authentication\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"CustomSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"x-{other}\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security schema definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/systemTypes.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/parameters.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/bodies.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/common.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/methods.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-0.8/security.ts\"}]},function(e,t){e.exports=[{classes:[{name:\"Library\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"contains description of why library exist\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Namespace which the library is imported under\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"LibraryBase\",nameSpace:\"\",basicName:\"LibraryBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"LibraryBase\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"schemas\",type:{base:{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:['Alias for the equivalent \"types\" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the \"types\" property, as the \"schemas\" alias for that property name may be removed in a future RAML version. The \"types\" property allows for XML and JSON schemas.']}],valueConstraint:null,optional:!1},{name:\"types\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.MODELS\"]},{name:\"MetaModel.description\",arguments:[\"Declarations of (data) types for use within this API\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"Declarations of (data) types for use within this API.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose properties map type names to type declarations; or an array of such objects\"]}],valueConstraint:null,optional:!1},{name:\"traits\",type:{base:{typeName:\"Methods.Trait\",nameSpace:\"Methods\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Declarations of traits used in this API\"]},{name:\"MetaModel.description\",arguments:[\"Declarations of traits for use within this API\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"Declarations of traits for use within this API.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose properties map trait names to trait declarations; or an array of such objects\"]}],valueConstraint:null,optional:!1},{name:\"resourceTypes\",type:{base:{typeName:\"Resources.ResourceType\",nameSpace:\"Resources\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Declaration of resource types used in this API\"]},{name:\"MetaModel.description\",arguments:[\"Declarations of resource types for use within this API\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"Declarations of resource types for use within this API.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose properties map resource type names to resource type declarations; or an array of such objects\"]}],valueConstraint:null,optional:!1},{name:\"annotationTypes\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"decls\",\"true\"]},{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Declarations of annotation types for use by annotations\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"Declarations of annotation types for use by annotations.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose properties map annotation type names to annotation type declarations; or an array of such objects\"]}],valueConstraint:null,optional:!1},{name:\"securitySchemes\",type:{base:{typeName:\"Security.AbstractSecurityScheme\",nameSpace:\"Security\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Security schemas declarations\"]},{name:\"MetaModel.description\",arguments:[\"Declarations of security schemes for use within this API.\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"Declarations of security schemes for use within this API.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose properties map security scheme names to security scheme declarations; or an array of such objects\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.internalClass\",arguments:[]}],extends:[{typeName:\"FragmentDeclaration\",nameSpace:\"\",basicName:\"FragmentDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Api\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Short plain-text label for the API\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the API\"]}],valueConstraint:null,optional:!1},{name:\"version\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The version of the API, e.g. 'v1'\"]}],valueConstraint:null,optional:!1},{name:\"baseUri\",type:{typeName:\"Sys.FullUriTemplateString\",nameSpace:\"Sys\",basicName:\"FullUriTemplateString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A URI that's to be used as the base of all the resources' URIs. Often used as the base of the URL of each resource, containing the location of the API. Can be a template URI.\"]}],valueConstraint:null,optional:!1},{name:\"baseUriParameters\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"DataModel.ModelLocation.BURI\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.description\",arguments:[\"Named parameters used in the baseUri (template)\"]}],valueConstraint:null,optional:!1},{name:\"protocols\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"HTTP\",\"HTTPS\"]]},{name:\"MetaModel.description\",arguments:[\"The protocols supported by the API\"]},{name:\"MetaModel.valueDescription\",arguments:['Array of strings, with each being \"HTTP\" or \"HTTPS\", case-insensitive']}],valueConstraint:null,optional:!1},{name:\"mediaType\",type:{base:{typeName:\"Bodies.MimeType\",nameSpace:\"Bodies\",basicName:\"MimeType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.oftenKeys\",arguments:[[\"application/json\",\"application/xml\",\"application/x-www-form-urlencoded\",\"multipart/form-data\"]]},{name:\"MetaModel.description\",arguments:['The default media type to use for request and response bodies (payloads), e.g. \"application/json\"']},{name:\"MetaModel.inherited\",arguments:[]},{name:\"MetaModel.valueDescription\",arguments:[\"Media type string\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"Security.SecuritySchemeRef\",nameSpace:\"Security\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"The security schemes that apply to every resource and method in the API\"]}],valueConstraint:null,optional:!1},{name:\"resources\",type:{base:{typeName:\"Resources.Resource\",nameSpace:\"Resources\",basicName:\"Resource\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.documentationTableLabel\",arguments:[\"/&lt;relativeUri&gt;\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Resource\"]},{name:\"MetaModel.description\",arguments:[\"The resources of the API, identified as relative URIs that begin with a slash (/). Every property whose key begins with a slash (/), and is either at the root of the API definition or is the child property of a resource property, is a resource property, e.g.: /users, /{groupId}, etc\"]}],valueConstraint:null,optional:!1},{name:\"documentation\",type:{base:{typeName:\"DocumentationItem\",nameSpace:\"\",basicName:\"DocumentationItem\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Additional overall documentation for the API\"]}],valueConstraint:null,optional:!1},{name:\"RAMLVersion\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:['Returns RAML version. \"RAML10\" string is returned for RAML 1.0. \"RAML08\" string is returned for RAML 0.8.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"LibraryBase\",nameSpace:\"\",basicName:\"LibraryBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{annotations:[{name:\"MetaModel.markdownDescription\",arguments:['Annotations to be applied to this API. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:\"Overlay\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"contains description of why overlay exist\"]}],valueConstraint:null,optional:!1},{name:\"extends\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Location of a valid RAML API definition (or overlay or extension), the overlay is applied to.\"]}],valueConstraint:null,optional:!1},{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Short plain-text label for the API\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Api\",nameSpace:\"\",basicName:\"Api\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Extension\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"contains description of why extension exist\"]}],valueConstraint:null,optional:!1},{name:\"extends\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Location of a valid RAML API definition (or overlay or extension), the extension is applied to\"]}],valueConstraint:null,optional:!1},{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Short plain-text label for the API\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Api\",nameSpace:\"\",basicName:\"Api\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"UsesDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"key\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name prefix (without dot) used to refer imported declarations\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Content of the schema\"]},{name:\"MetaModel.canBeValue\",arguments:[]},{name:\"MetaModel.value\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FragmentDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"uses\",type:{base:{typeName:\"UsesDeclaration\",nameSpace:\"\",basicName:\"UsesDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},typeKind:1},annotations:[{name:\"MetaModel.embeddedInMaps\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DocumentationItem\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"title\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Title of documentation section\"]},{name:\"MetaModel.required\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"content\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Content of documentation section\"]},{name:\"MetaModel.required\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.possibleInterfaces\",arguments:[[\"FragmentDeclaration\"]]}],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\",Resources:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\",Decls:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\",Params:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/api.ts\"},{classes:[{name:\"SpecPartMetaData\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!0,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\"},{classes:[{name:\"ValueType\",methods:[{returnType:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},name:\"value\",start:170,end:210,text:\"\\n\\n  value():string {\\n    return null\\n  }\",arguments:[]}],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"StringType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"string\"]},{name:\"MetaModel.alias\",arguments:[\"string\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"AnyType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"any\"]},{name:\"MetaModel.alias\",arguments:[\"any\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"NumberType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"number\"]},{name:\"MetaModel.alias\",arguments:[\"number\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"IntegerType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"integer\"]},{name:\"MetaModel.alias\",arguments:[\"integer\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"NullType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"null\"]},{name:\"MetaModel.alias\",arguments:[\"null\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"TimeOnlyType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"time-only\"]},{name:\"MetaModel.alias\",arguments:[\"time-only\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateOnlyType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"date-only\"]},{name:\"MetaModel.alias\",arguments:[\"date-only\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateTimeOnlyType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"datetime-only\"]},{name:\"MetaModel.alias\",arguments:[\"datetime-only\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateTimeType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"datetime\"]},{name:\"MetaModel.alias\",arguments:[\"datetime\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FileType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"file\"]},{name:\"MetaModel.alias\",arguments:[\"file\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BooleanType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.nameAtRuntime\",arguments:[\"boolean\"]},{name:\"MetaModel.alias\",arguments:[\"boolean\"]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Reference\",methods:[],typeParameters:[\"T\"],typeParameterConstraint:[null],implements:[],fields:[{name:\"structuredValue\",type:{typeName:\"DataModel.TypeInstance\",nameSpace:\"DataModel\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns a structured object if the reference point to one.\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns name of referenced object\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"UriTemplate\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This type currently serves both for absolute and relative urls\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"StatusCodeString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"RelativeUriString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes relative uri templates\"]}],extends:[{typeName:\"UriTemplate\",nameSpace:\"\",basicName:\"UriTemplate\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FullUriTemplateString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes absolute uri templates\"]}],extends:[{typeName:\"UriTemplate\",nameSpace:\"\",basicName:\"UriTemplate\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"FixedUriString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This  type describes fixed uris\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ContentType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"MarkdownString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.innerType\",arguments:[\"markdown\"]},{name:\"MetaModel.description\",arguments:[\"[GitHub Flavored Markdown](https://help.github.com/articles/github-flavored-markdown/)\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"SchemaString\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Schema at this moment only two subtypes are supported (json schema and xsd)\"]},{name:\"MetaModel.alias\",arguments:[\"schema\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\"},{classes:[{name:\"ExampleSpec\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"value\",type:{typeName:\"any\",nameSpace:\"\",basicName:\"any\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.example\",arguments:[]},{name:\"MetaModel.selfNode\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"String representation of example\"]},{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.valueDescription\",arguments:[\"* Valid value for this type<br>* String representing the serialized version of a valid value\"]}],valueConstraint:null,optional:!1},{name:\"structuredValue\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns object representation of example, if possible\"]}],valueConstraint:null,optional:!1},{name:\"strict\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"By default, examples are validated against any type declaration. Set this to false to allow examples that need not validate.\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.hide\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Example identifier, if specified\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the example\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the example\"]},{name:\"MetaModel.valueDescription\",arguments:[\"markdown string\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.possibleInterfaces\",arguments:[[\"FragmentDeclaration\"]]}],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{annotations:[{name:\"MetaModel.markdownDescription\",arguments:['Annotations to be applied to this example. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:\"TypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"name of the parameter\"]},{name:\"MetaModel.extraMetaKey\",arguments:[\"headers\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the type display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}],valueConstraint:null,optional:!1},{name:\"facets\",type:{base:{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.declaringFields\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"When extending from a type you can define new facets (which can then be set to concrete values by subtypes).\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"fixedFacets\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns facets fixed by the type. Value is an object with properties named after facets fixed. Value of each property is a value of the corresponding facet.\"]}],valueConstraint:null,optional:!1},{name:\"schema\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.typeExpression\",arguments:[]},{name:\"MetaModel.allowMultiple\",arguments:[]},{name:\"MetaModel.description\",arguments:['Alias for the equivalent \"type\" property, for compatibility with RAML 0.8. Deprecated - API definitions should use the \"type\" property, as the \"schema\" alias for that property name may be removed in a future RAML version. The \"type\" property allows for XML and JSON schemas.']},{name:\"MetaModel.valueDescription\",arguments:[\"Single string denoting the base type or type expression\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.typeExpression\",arguments:[]},{name:\"MetaModel.allowMultiple\",arguments:[]},{name:\"MetaModel.canBeValue\",arguments:[]},{name:\"MetaModel.defaultValue\",arguments:[\"string\"]},{name:\"MetaModel.descriminatingProperty\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"A base type which the current type extends, or more generally a type expression.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"string denoting the base type or type expression\"]}],valueConstraint:null,optional:!1},{name:\"structuredType\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.typeExpression\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Inlined supertype definition.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Inlined supertype definition\"]}],valueConstraint:null,optional:!1},{name:\"location\",type:{typeName:\"ModelLocation\",nameSpace:\"\",basicName:\"ModelLocation\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.system\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Location of the parameter (can not be edited by user)\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"locationKind\",type:{typeName:\"LocationKind\",nameSpace:\"\",basicName:\"LocationKind\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.system\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Kind of location\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"default\",type:{typeName:\"any\",nameSpace:\"\",basicName:\"any\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Provides default value for a property\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"example\",type:{typeName:\"ExampleSpec\",nameSpace:\"\",basicName:\"ExampleSpec\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.example\",arguments:[]},{name:\"MetaModel.selfNode\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"An example of this type instance represented as string or yaml map/sequence. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the examples property is present.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"* Valid value for this type<br>* String representing the serialized version of a valid value\"]}],valueConstraint:null,optional:!1},{name:\"examples\",type:{base:{typeName:\"ExampleSpec\",nameSpace:\"\",basicName:\"ExampleSpec\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.example\",arguments:[]},{name:\"MetaModel.selfNode\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"An example of this type instance represented as string. This can be used, e.g., by documentation generators to generate sample values for an object of this type. Cannot be present if the example property is present.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"* Valid value for this type<br>* String representing the serialized version of a valid value\"]}],valueConstraint:null,optional:!1},{name:\"required\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.requireValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.description\",arguments:[\"Sets if property is optional or not\"]},{name:\"MetaModel.describesAnnotation\",arguments:[\"required\"]},{name:\"MetaModel.hide\",arguments:[]},{name:\"MetaModel.defaultBooleanValue\",arguments:[!0]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the type\"]},{name:\"MetaModel.valueDescription\",arguments:[\"markdown string\"]}],valueConstraint:null,optional:!1},{name:\"xml\",type:{typeName:\"XMLFacetInfo\",nameSpace:\"\",basicName:\"XMLFacetInfo\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[],valueConstraint:null,optional:!1},{name:\"allowedTargets\",type:{base:{typeName:\"AnnotationTarget\",nameSpace:\"\",basicName:\"AnnotationTarget\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"API\",\"DocumentationItem\",\"Resource\",\"Method\",\"Response\",\"RequestBody\",\"ResponseBody\",\"TypeDeclaration\",\"NamedExample\",\"ResourceType\",\"Trait\",\"SecurityScheme\",\"SecuritySchemeSettings\",\"AnnotationTypeDeclaration\",\"Library\",\"Overlay\",\"Extension\",\"Scalar\"]]},{name:\"MetaModel.description\",arguments:[\"Restrictions on where annotations of this type can be applied. If this property is specified, annotations of this type may only be applied on a property corresponding to one of the target names specified as the value of this property.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An array, or single, of names allowed target nodes.\"]}],valueConstraint:null,optional:!1},{name:\"isAnnotation\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Whether the type represents annotation\"]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"For types defined in traits or resource types returns object representation of parametrized properties\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.convertsToGlobalOfType\",arguments:[\"SchemaString\"]},{name:\"MetaModel.canInherit\",arguments:[\"mediaType\"]},{name:\"MetaModel.possibleInterfaces\",arguments:[[\"FragmentDeclaration\"]]}],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{annotations:[{name:\"MetaModel.markdownDescription\",arguments:['Annotations to be applied to this type. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:\"XMLFacetInfo\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"attribute\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"If attribute is set to true, a type instance should be serialized as an XML attribute. It can only be true for scalar types.\"]}],valueConstraint:null,optional:!1},{name:\"wrapped\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"If wrapped is set to true, a type instance should be wrapped in its own XML element. It can not be true for scalar types and it can not be true at the same moment when attribute is true.\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Allows to override the name of the XML element or XML attribute in it's XML representation.\"]}],valueConstraint:null,optional:!1},{name:\"namespace\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Allows to configure the name of the XML namespace.\"]}],valueConstraint:null,optional:!1},{name:\"prefix\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Allows to configure the prefix which will be used during serialization to XML.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ArrayTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"array\"},optional:!1},{name:\"uniqueItems\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"uniqueItems\"]},{name:\"MetaModel.description\",arguments:[\"Should items in array be unique\"]}],valueConstraint:null,optional:!1},{name:\"items\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.typeExpression\",arguments:[]},{name:\"MetaModel.allowMultiple\",arguments:[]},{name:\"MetaModel.canBeValue\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Array component type.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Inline type declaration or type name.\"]}],valueConstraint:null,optional:!1},{name:\"structuredItems\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.typeExpression\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Inlined component type definition\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Inlined component type definition\"]}],valueConstraint:null,optional:!1},{name:\"minItems\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"minItems\"]},{name:\"MetaModel.description\",arguments:[\"Minimum amount of items in array\"]},{name:\"MetaModel.valueDescription\",arguments:[\"integer ( >= 0 ). Defaults to 0\"]}],valueConstraint:null,optional:!1},{name:\"maxItems\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"maxItems\"]},{name:\"MetaModel.description\",arguments:[\"Maximum amount of items in array\"]},{name:\"MetaModel.valueDescription\",arguments:[\"integer ( >= 0 ). Defaults to undefined.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.convertsToGlobalOfType\",arguments:[\"SchemaString\"]},{name:\"MetaModel.alias\",arguments:[\"array\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"UnionTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"union\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.convertsToGlobalOfType\",arguments:[\"SchemaString\"]},{name:\"MetaModel.requireValue\",arguments:[\"locationKind\",\"LocationKind.MODELS\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ObjectTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:{isCallConstraint:!1,value:\"object\"},optional:!1},{name:\"properties\",type:{base:{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.description\",arguments:[\"The properties that instances of this type may or must have.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose keys are the properties' names and whose values are property declarations.\"]}],valueConstraint:null,optional:!1},{name:\"minProperties\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"minProperties\"]},{name:\"MetaModel.description\",arguments:[\"The minimum number of properties allowed for instances of this type.\"]}],valueConstraint:null,optional:!1},{name:\"maxProperties\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"maxProperties\"]},{name:\"MetaModel.description\",arguments:[\"The maximum number of properties allowed for instances of this type.\"]}],valueConstraint:null,optional:!1},{name:\"additionalProperties\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"A Boolean that indicates if an object instance has additional properties.\"]}],valueConstraint:null,optional:!1},{name:\"discriminator\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Type property name to be used as discriminator, or boolean\"]}],valueConstraint:null,optional:!1},{name:\"discriminatorValue\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The value of discriminator for the type.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.definingPropertyIsEnough\",arguments:[\"properties\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"field\",\"true\"]},{name:\"MetaModel.convertsToGlobalOfType\",arguments:[\"SchemaString\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"StringTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"string\"},optional:!1},{name:\"pattern\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"pattern\"]},{name:\"MetaModel.description\",arguments:[\"Regular expression that this string should path\"]},{name:\"MetaModel.valueDescription\",arguments:[\"regexp\"]}],valueConstraint:null,optional:!1},{name:\"minLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"minLength\"]},{name:\"MetaModel.description\",arguments:[\"Minimum length of the string\"]}],valueConstraint:null,optional:!1},{name:\"maxLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"maxLength\"]},{name:\"MetaModel.description\",arguments:[\"Maximum length of the string\"]}],valueConstraint:null,optional:!1},{name:\"enum\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.facetId\",arguments:[\"enum\"]},{name:\"MetaModel.describesAnnotation\",arguments:[\"oneOf\"]},{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error.\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value must be a string\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BooleanTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"boolean\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value must be a boolean\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"NumberTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"number\"},optional:!1},{name:\"minimum\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"minimum\"]},{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type number or integer) The minimum attribute specifies the parameter's minimum value.\"]}],valueConstraint:null,optional:!1},{name:\"maximum\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.facetId\",arguments:[\"maximum\"]},{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type number or integer) The maximum attribute specifies the parameter's maximum value.\"]}],valueConstraint:null,optional:!1},{name:\"enum\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.facetId\",arguments:[\"enum\"]},{name:\"MetaModel.describesAnnotation\",arguments:[\"oneOf\"]},{name:\"MetaModel.description\",arguments:[\"(Optional, applicable only for parameters of type string) The enum attribute provides an enumeration of the parameter's valid values. This MUST be an array. If the enum attribute is defined, API clients and servers MUST verify that a parameter's value matches a value in the enum array. If there is no matching value, the clients and servers MUST treat this as an error.\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"format\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"int32\",\"int64\",\"int\",\"long\",\"float\",\"double\",\"int16\",\"int8\"]]},{name:\"MetaModel.description\",arguments:[\"Value format\"]}],valueConstraint:null,optional:!1},{name:\"multipleOf\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:['A numeric instance is valid against \"multipleOf\" if the result of the division of the instance by this keyword\\'s value is an integer.']}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value MUST be a number. Indicate floating point numbers as defined by YAML.\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"IntegerTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"integer\"},optional:!1},{name:\"format\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"int32\",\"int64\",\"int\",\"long\",\"int16\",\"int8\"]]},{name:\"MetaModel.description\",arguments:[\"Value format\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Value MUST be a integer.\"]},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"NumberTypeDeclaration\",nameSpace:\"\",basicName:\"NumberTypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateOnlyTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"date-only\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:['the \"full-date\" notation of RFC3339, namely yyyy-mm-dd (no implications about time or timezone-offset)']},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"TimeOnlyTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"time-only\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:['the \"partial-time\" notation of RFC3339, namely hh:mm:ss[.ff...] (no implications about date or timezone-offset)']},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateTimeOnlyTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"datetime-only\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:['combined date-only and time-only with a separator of \"T\", namely yyyy-mm-ddThh:mm:ss[.ff...] (no implications about timezone-offset)']},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DateTimeTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"datetime\"},optional:!1},{name:\"format\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"rfc3339\",\"rfc2616\"]]},{name:\"MetaModel.description\",arguments:[\"Format used for this date time rfc3339 or rfc2616\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:['a timestamp, either in the \"date-time\" notation of RFC3339, if format is omitted or is set to rfc3339, or in the format defined in RFC2616, if format is set to rfc2616.']},{name:\"MetaModel.declaresSubTypeOf\",arguments:[\"TypeDeclaration\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"TypeInstance\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"properties\",type:{base:{typeName:\"TypeInstanceProperty\",nameSpace:\"\",basicName:\"TypeInstanceProperty\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Array of instance properties\"]}],valueConstraint:null,optional:!1},{name:\"isScalar\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Whether the type is scalar\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"any\",nameSpace:\"\",basicName:\"any\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"For instances of scalar types returns scalar value\"]}],valueConstraint:null,optional:!1},{name:\"isArray\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Indicates whether the instance is array\"]}],valueConstraint:null,optional:!1},{name:\"items\",type:{base:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Returns components of array instances\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.customHandling\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}},{name:\"TypeInstanceProperty\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Property name\"]}],valueConstraint:null,optional:!1},{name:\"value\",type:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Property value\"]}],valueConstraint:null,optional:!1},{name:\"values\",type:{base:{typeName:\"TypeInstance\",nameSpace:\"\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Array of values if property value is array\"]}],valueConstraint:null,optional:!1},{name:\"isArray\",type:{typeName:\"boolean\",nameSpace:\"\",basicName:\"boolean\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Whether property has array as value\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.customHandling\",arguments:[]}],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[{name:\"ModelLocation\",members:[\"QUERY\",\"HEADERS\",\"URI\",\"FORM\",\"BURI\",\"ANNOTATION\",\"MODEL\",\"SECURITYSCHEMATYPE\"]},{name:\"LocationKind\",members:[\"APISTRUCTURE\",\"DECLARATIONS\",\"MODELS\"]}],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\",Declarations:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},{classes:[{name:\"MimeType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"This sub type of the string represents mime types\"]}],extends:[{typeName:\"StringType\",nameSpace:\"\",basicName:\"StringType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Response\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"code\",type:{typeName:\"Sys.StatusCodeString\",nameSpace:\"Sys\",basicName:\"StatusCodeString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.extraMetaKey\",arguments:[\"statusCodes\"]},{name:\"MetaModel.description\",arguments:[\"Responses MUST be a map of one or more HTTP status codes, where each status code itself is a map that describes that status code.\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"headers\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"DataModel.ModelLocation.HEADERS\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Header\"]},{name:\"MetaModel.description\",arguments:[\"Detailed information about any response headers returned by this method\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Object whose property names are the response header names and whose values describe the values.\"]}],valueConstraint:null,optional:!1},{name:\"body\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Body\"]},{name:\"MetaModel.description\",arguments:[\"The body of the response: a body declaration\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Object whose properties are either<br>* Media types and whose values are type objects describing the request body for that media type, or<br>* a type object describing the request body for the default media type specified in the root mediaType property.\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the response\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Markdown string\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"}],moduleName:null,annotationOverridings:{displayName:[{name:\"MetaModel.description\",arguments:[\"An alternate, human-friendly name for the response\"]}],annotations:[{name:\"MetaModel.markdownDescription\",arguments:['Annotations to be applied to this response. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\"},{classes:[{name:\"Annotable\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"annotations\",type:{base:{typeName:\"Decls.AnnotationRef\",nameSpace:\"Decls\",basicName:\"AnnotationRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\"},typeKind:1},annotations:[{name:\"MetaModel.noDirectParse\",arguments:[]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"datamodel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"datamodel.ModelLocation.ANNOTATION\"]},{name:\"MetaModel.description\",arguments:[\"Most of RAML model elements may have attached annotations decribing additional meta data about this element\"]},{name:\"MetaModel.documentationTableLabel\",arguments:[\"(&lt;annotationName&gt;)\"]},{name:\"MetaModel.valueDescription\",arguments:[\"A value corresponding to the declared type of this annotation.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",Decls:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\"},{classes:[{name:\"AnnotationRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"annotation\",type:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns referenced annotation\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Annotations allow you to attach information to your API\"]},{name:\"MetaModel.tags\",arguments:[[\"annotations\"]]}],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"AnnotationTarget\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Elements to which this Annotation can be applied (enum)\"]},{name:\"MetaModel.tags\",arguments:[[\"annotations\"]]}],extends:[{typeName:\"ValueType\",nameSpace:\"\",basicName:\"ValueType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Common:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/common.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/declarations.ts\"},{classes:[{name:\"TraitRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"trait\",type:{typeName:\"Trait\",nameSpace:\"\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns referenced trait\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"Trait\",nameSpace:\"\",basicName:\"Trait\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Trait\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the trait\"]}],valueConstraint:null,optional:!1},{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Instructions on how and when the trait should be used.\"]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"DataModel.TypeInstance\",nameSpace:\"DataModel\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns object representation of parametrized properties of the trait\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.inlinedTemplates\",arguments:[]},{name:\"MetaModel.allowQuestion\",arguments:[]},{name:\"MetaModel.possibleInterfaces\",arguments:[[\"FragmentDeclaration\"]]}],extends:[{typeName:\"MethodBase\",nameSpace:\"\",basicName:\"MethodBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],moduleName:null,annotationOverridings:{displayName:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the trait display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}]}},{name:\"MethodBase\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"body\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Body\"]},{name:\"MetaModel.description\",arguments:[\"Some method verbs expect the resource to be sent as a request body. For example, to create a resource, the request must include the details of the resource to create. Resources CAN have alternate representations. For example, an API might support both JSON and XML representations. A method's body is defined in the body property as a hashmap, in which the key MUST be a valid media type.\"]}],valueConstraint:null,optional:!1},{name:\"protocols\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"HTTP\",\"HTTPS\"]]},{name:\"MetaModel.description\",arguments:[\"A method can override the protocols specified in the resource or at the API root, by employing this property.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"array of strings of value HTTP or HTTPS, or a single string of such kind, case-insensitive\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"TraitRef\",nameSpace:\"\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Instantiation of applyed traits\"]}],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"Security.SecuritySchemeRef\",nameSpace:\"Security\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"securityScheme may also be applied to a resource by using the securedBy key, which is equivalent to applying the securityScheme to all methods that may be declared, explicitly or implicitly, by defining the resourceTypes or traits property for that resource. To indicate that the method may be called without applying any securityScheme, the method may be annotated with the null securityScheme.\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},annotations:[],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Operation\",nameSpace:\"\",basicName:\"Operation\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Method\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"method\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.extraMetaKey\",arguments:[\"methods\"]},{name:\"MetaModel.oneOf\",arguments:[[\"get\",\"put\",\"post\",\"delete\",\"options\",\"head\",\"patch\"]]},{name:\"MetaModel.description\",arguments:[\"Method that can be called\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"DataModel.TypeInstance\",nameSpace:\"DataModel\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"For types defined in resource types returns object representation of parametrized properties\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"MethodBase\",nameSpace:\"\",basicName:\"MethodBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],moduleName:null,annotationOverridings:{displayName:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the method display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}]}},{name:\"Operation\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"queryParameters\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"DataModel.ModelLocation.QUERY\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New query parameter\"]},{name:\"MetaModel.description\",arguments:[\"An APIs resources MAY be filtered (to return a subset of results) or altered (such as transforming  a response body from JSON to XML format) by the use of query strings. If the resource or its method supports a query string, the query string MUST be defined by the queryParameters property\"]}],valueConstraint:null,optional:!1},{name:\"headers\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"DataModel.ModelLocation.HEADERS\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.description\",arguments:[\"Headers that allowed at this position\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Header\"]}],valueConstraint:null,optional:!1},{name:\"queryString\",type:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"Specifies the query string needed by this method. Mutually exclusive with queryParameters.\"]}],valueConstraint:null,optional:!1},{name:\"responses\",type:{base:{typeName:\"Bodies.Response\",nameSpace:\"Bodies\",basicName:\"Response\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"response\",\"true\"]},{name:\"MetaModel.newInstanceName\",arguments:[\"New Response\"]},{name:\"MetaModel.description\",arguments:[\"Information about the expected responses to a request\"]},{name:\"MetaModel.valueDescription\",arguments:[\"An object whose keys are the HTTP status codes of the responses and whose values describe the responses.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",Bodies:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/bodies.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},{classes:[{name:\"SecuritySchemePart\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[],extends:[{typeName:\"Operation\",nameSpace:\"\",basicName:\"Operation\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{annotations:[{name:\"MetaModel.description\",arguments:['Annotations to be applied to this security scheme part. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}},{name:\"SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]}],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth1SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"requestTokenUri\",type:{typeName:\"Sys.FixedUriString\",nameSpace:\"Sys\",basicName:\"FixedUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Temporary Credential Request endpoint as defined in RFC5849 Section 2.1\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationUri\",type:{typeName:\"Sys.FixedUriString\",nameSpace:\"Sys\",basicName:\"FixedUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Resource Owner Authorization endpoint as defined in RFC5849 Section 2.2\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"tokenCredentialsUri\",type:{typeName:\"Sys.FixedUriString\",nameSpace:\"Sys\",basicName:\"FixedUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Token Request endpoint as defined in RFC5849 Section 2.3\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"signatures\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.oneOf\",arguments:[[\"HMAC-SHA1\",\"RSA-SHA1\",\"PLAINTEXT\"]]},{name:\"MetaModel.hide\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"List of the signature methods used by the server. Available methods: HMAC-SHA1, RSA-SHA1, PLAINTEXT\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]},{name:\"MetaModel.functionalDescriminator\",arguments:[\"$parent.type=='OAuth 1.0'\"]}],extends:[{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth2SecuritySchemeSettings\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"accessTokenUri\",type:{typeName:\"Sys.FixedUriString\",nameSpace:\"Sys\",basicName:\"FixedUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The URI of the Token Endpoint as defined in RFC6749 Section 3.2. Not required forby implicit grant type.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationUri\",type:{typeName:\"Sys.FixedUriString\",nameSpace:\"Sys\",basicName:\"FixedUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The URI of the Authorization Endpoint as defined in RFC6749 Section 3.1. Required forby authorization_code and implicit grant types.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"FixedUriString\"]}],valueConstraint:null,optional:!1},{name:\"authorizationGrants\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.oftenKeys\",arguments:[[\"authorization_code\",\"password\",\"client_credentials\",\"implicit\"]]},{name:\"MetaModel.description\",arguments:[\"A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of: authorization_code, password, client_credentials, implicit, or any absolute url.\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"A list of the Authorization grants supported by the API as defined in RFC6749 Sections 4.1, 4.2, 4.3 and 4.4, can be any of:<br>* authorization_code<br>* password<br>* client_credentials<br>* implicit <br>*  or any absolute url.\"]}],valueConstraint:null,optional:!1},{name:\"scopes\",type:{base:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"A list of scopes supported by the security scheme as defined in RFC6749 Section 3.3\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.allowAny\",arguments:[]}],extends:[{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"SecuritySchemeRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"securitySchemeName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns the name of security scheme, this reference refers to.\"]}],valueConstraint:null,optional:!1},{name:\"securityScheme\",type:{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns AST node of security scheme, this reference refers to, or null.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"AbstractSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.startFrom\",arguments:[\"\"]},{name:\"MetaModel.hide\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the security scheme\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.required\",arguments:[]},{name:\"MetaModel.oneOf\",arguments:[[\"OAuth 1.0\",\"OAuth 2.0\",\"Basic Authentication\",\"Digest Authentication\",\"Pass Through\",\"x-{other}\"]]},{name:\"MetaModel.descriminatingProperty\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The securitySchemes property MUST be used to specify an API's security mechanisms, including the required settings and the authentication methods that the API supports. one authentication method is allowed if the API supports them.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"string<br><br>The value MUST be one of<br>* OAuth 1.0,<br>* OAuth 2.0,<br>* BasicSecurityScheme Authentication<br>* DigestSecurityScheme Authentication<br>* Pass Through<br>* x-&lt;other&gt;\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The description attribute MAY be used to describe a security schemes property.\"]},{name:\"MetaModel.description\",arguments:[\"The description MAY be used to describe a securityScheme.\"]}],valueConstraint:null,optional:!1},{name:\"describedBy\",type:{typeName:\"SecuritySchemePart\",nameSpace:\"\",basicName:\"SecuritySchemePart\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"A description of the request components related to Security that are determined by the scheme: the headers, query parameters or responses. As a best practice, even for standard security schemes, API designers SHOULD describe these properties of security schemes. Including the security scheme description completes an API documentation.\"]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the security scheme display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}],valueConstraint:null,optional:!1},{name:\"settings\",type:{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The settings attribute MAY be used to provide security scheme-specific information. The required attributes vary depending on the type of security scheme is being declared. It describes the minimum set of properties which any processing application MUST provide and validate if it chooses to implement the security scheme. Processing applications MAY choose to recognize other properties for things such as token lifetime, preferred cryptographic algorithms, and more.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth2SecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"OAuth 2.0\"},optional:!1},{name:\"settings\",type:{typeName:\"OAuth2SecuritySchemeSettings\",nameSpace:\"\",basicName:\"OAuth2SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"OAuth1SecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"OAuth 1.0\"},optional:!1},{name:\"settings\",type:{typeName:\"OAuth1SecuritySchemeSettings\",nameSpace:\"\",basicName:\"OAuth1SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"PassThroughSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"Pass Through\"},optional:!1},{name:\"settings\",type:{typeName:\"SecuritySchemeSettings\",nameSpace:\"\",basicName:\"SecuritySchemeSettings\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},annotations:[],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"BasicSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"Basic Authentication\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"DigestSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"Digest Authentication\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"CustomSecurityScheme\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"x-{other}\"},optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"Declares globally referable security scheme definition\"]},{name:\"MetaModel.actuallyExports\",arguments:[\"$self\"]},{name:\"MetaModel.referenceIs\",arguments:[\"settings\"]}],extends:[{typeName:\"AbstractSecurityScheme\",nameSpace:\"\",basicName:\"AbstractSecurityScheme\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\"},{classes:[{name:\"ResourceTypeRef\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"resourceType\",type:{typeName:\"ResourceType\",nameSpace:\"\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns referenced resource type\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Reference\",nameSpace:\"\",basicName:\"Reference\",typeKind:0,typeArguments:[{typeName:\"ResourceType\",nameSpace:\"\",basicName:\"ResourceType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"}],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ResourceType\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the resource type display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}],valueConstraint:null,optional:!1},{name:\"name\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Name of the resource type\"]}],valueConstraint:null,optional:!1},{name:\"usage\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"Instructions on how and when the resource type should be used.\"]}],valueConstraint:null,optional:!1},{name:\"parametrizedProperties\",type:{typeName:\"DataModel.TypeInstance\",nameSpace:\"DataModel\",basicName:\"TypeInstance\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},annotations:[{name:\"MetaModel.customHandling\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"Returns object representation of parametrized properties of the resource type\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.inlinedTemplates\",arguments:[]},{name:\"MetaModel.allowQuestion\",arguments:[]},{name:\"MetaModel.possibleInterfaces\",arguments:[[\"FragmentDeclaration\"]]}],extends:[{typeName:\"ResourceBase\",nameSpace:\"\",basicName:\"ResourceBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"ResourceBase\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"methods\",type:{base:{typeName:\"Methods.Method\",nameSpace:\"Methods\",basicName:\"Method\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"Methods that are part of this resource type definition\"]},{name:\"MetaModel.markdownDescription\",arguments:[\"The methods available on this resource.\"]},{name:\"MetaModel.documentationTableLabel\",arguments:[\"get?<br>patch?<br>put?<br>post?<br>delete?<br>options?<br>head?\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Object describing the method\"]}],valueConstraint:null,optional:!1},{name:\"is\",type:{base:{typeName:\"Methods.TraitRef\",nameSpace:\"Methods\",basicName:\"TraitRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"A list of the traits to apply to all methods declared (implicitly or explicitly) for this resource. Individual methods may override this declaration\"]},{name:\"MetaModel.valueDescription\",arguments:[\"array, which can contain each of the following elements:<br>* name of unparametrized trait <br>* a key-value pair with trait name as key and a map of trait parameters as value<br>* inline trait declaration <br><br>(or a single element of any above kind)\"]}],valueConstraint:null,optional:!1},{name:\"type\",type:{typeName:\"ResourceTypeRef\",nameSpace:\"\",basicName:\"ResourceTypeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},annotations:[{name:\"MetaModel.description\",arguments:[\"The resource type which this resource inherits.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"one of the following elements:<br>* name of unparametrized resource type<br>* a key-value pair with resource type name as key and a map of its parameters as value<br>* inline resource type declaration\"]}],valueConstraint:null,optional:!1},{name:\"description\",type:{typeName:\"Sys.MarkdownString\",nameSpace:\"Sys\",basicName:\"MarkdownString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},annotations:[],valueConstraint:null,optional:!1},{name:\"securedBy\",type:{base:{typeName:\"Security.SecuritySchemeRef\",nameSpace:\"Security\",basicName:\"SecuritySchemeRef\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.allowNull\",arguments:[]},{name:\"MetaModel.description\",arguments:[\"The security schemes that apply to all methods declared (implicitly or explicitly) for this resource.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"array of security scheme names or a single security scheme name\"]}],valueConstraint:null,optional:!1},{name:\"uriParameters\",type:{base:{typeName:\"DataModel.TypeDeclaration\",nameSpace:\"DataModel\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.setsContextValue\",arguments:[\"location\",\"DataModel.ModelLocation.URI\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"locationKind\",\"DataModel.LocationKind.APISTRUCTURE\"]},{name:\"MetaModel.setsContextValue\",arguments:[\"fieldOrParam\",!0]},{name:\"MetaModel.description\",arguments:[\"Detailed information about any URI parameters of this resource\"]},{name:\"MetaModel.valueDescription\",arguments:[\"object whose property names are the URI parameter names and whose values describe the values\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"Annotable\",nameSpace:\"\",basicName:\"Annotable\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"}],moduleName:null,annotationOverridings:{}},{name:\"Resource\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"relativeUri\",type:{typeName:\"Sys.RelativeUriString\",nameSpace:\"Sys\",basicName:\"RelativeUriString\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},annotations:[{name:\"MetaModel.key\",arguments:[]},{name:\"MetaModel.startFrom\",arguments:[\"/\"]},{name:\"MetaModel.description\",arguments:[\"Relative URL of this resource from the parent resource\"]},{name:\"MetaModel.hide\",arguments:[]}],valueConstraint:null,optional:!1},{name:\"displayName\",type:{typeName:\"string\",nameSpace:\"\",basicName:\"string\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The displayName attribute specifies the resource display name. It is a friendly name used only for  display or documentation purposes. If displayName is not specified, it defaults to the element's key (the name of the property itself).\"]}],valueConstraint:null,optional:!1},{name:\"resources\",type:{base:{typeName:\"Resource\",nameSpace:\"\",basicName:\"Resource\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},typeKind:1},annotations:[{name:\"MetaModel.newInstanceName\",arguments:[\"New Resource\"]},{name:\"MetaModel.description\",arguments:['A nested resource is identified as any property whose name begins with a slash (\"/\") and is therefore treated as a relative URI.']},{name:\"MetaModel.documentationTableLabel\",arguments:[\"/&lt;relativeUri&gt;\"]},{name:\"MetaModel.valueDescription\",arguments:[\"object describing the nested resource\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[],extends:[{typeName:\"ResourceBase\",nameSpace:\"\",basicName:\"ResourceBase\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"}],moduleName:null,annotationOverridings:{description:[{name:\"MetaModel.description\",arguments:[\"A longer, human-friendly description of the resource.\"]},{name:\"MetaModel.valueDescription\",arguments:[\"Markdown string\"]}],annotations:[{name:\"MetaModel.markdownDescription\",arguments:['Annotations to be applied to this resource. Annotations are any property whose key begins with \"(\" and ends with \")\" and whose name (the part between the beginning and ending parentheses) is a declared annotation name.']}]}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\",Security:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/security.ts\",Methods:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/methods.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/resources.ts\"},{classes:[{name:\"FileTypeDeclaration\",methods:[],typeParameters:[],typeParameterConstraint:[],implements:[],fields:[{name:\"type\",type:null,annotations:[],valueConstraint:{isCallConstraint:!1,value:\"file\"},optional:!1},{name:\"fileTypes\",type:{base:{typeName:\"Sys.ContentType\",nameSpace:\"Sys\",basicName:\"ContentType\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts\"},typeKind:1},annotations:[{name:\"MetaModel.description\",arguments:[\"It should also include a new property: fileTypes, which should be a list of valid content-type strings for the file. The file type */* should be a valid value.\"]}],valueConstraint:null,optional:!1},{name:\"minLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The minLength attribute specifies the parameter value's minimum number of bytes.\"]}],valueConstraint:null,optional:!1},{name:\"maxLength\",type:{typeName:\"number\",nameSpace:\"\",basicName:\"number\",typeKind:0,typeArguments:[],modulePath:null},annotations:[{name:\"MetaModel.description\",arguments:[\"The maxLength attribute specifies the parameter value's maximum number of bytes.\"]}],valueConstraint:null,optional:!1}],isInterface:!1,annotations:[{name:\"MetaModel.description\",arguments:[\"(Applicable only to Form properties) Value is a file. Client generators SHOULD use this type to handle file uploads correctly.\"]}],extends:[{typeName:\"TypeDeclaration\",nameSpace:\"\",basicName:\"TypeDeclaration\",typeKind:0,typeArguments:[],modulePath:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts\"}],moduleName:null,annotationOverridings:{}}],aliases:[],enumDeclarations:[],imports:{MetaModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/metamodel.ts\",Sys:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/systemTypes.ts\",DataModel:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/datamodel.ts\"},name:\"/Users/munch/work/repositories_official/raml-definition-system/raml-definition/spec-1.0/parameters.ts\"}]},function(e,t,n){\"use strict\";function r(e,t){\"MetaModel.declaresSubTypeOf\"==e.name&&t.getAdapter(u.RAMLService).setExtendedTypeName(e.arguments[0]),\"MetaModel.nameAtRuntime\"==e.name&&t.setNameAtRuntime(e.arguments[0]),\"MetaModel.description\"==e.name&&t.withDescription(e.arguments[0]),\"MetaModel.inlinedTemplates\"==e.name&&t.getAdapter(u.RAMLService).setInlinedTemplates(!0),\"MetaModel.requireValue\"==e.name&&t.getAdapter(u.RAMLService).withContextRequirement(\"\"+e.arguments[0],\"\"+e.arguments[1]),\"MetaModel.referenceIs\"==e.name&&t.getAdapter(u.RAMLService).withReferenceIs(\"\"+e.arguments[0]),\"MetaModel.actuallyExports\"==e.name&&t.getAdapter(u.RAMLService).withActuallyExports(\"\"+e.arguments[0]),\"MetaModel.convertsToGlobalOfType\"==e.name&&t.getAdapter(u.RAMLService).withConvertsToGlobal(\"\"+e.arguments[0]),\"MetaModel.allowAny\"==e.name&&t.getAdapter(u.RAMLService).withAllowAny(),\"MetaModel.allowQuestion\"==e.name&&t.getAdapter(u.RAMLService).withAllowQuestion(),\"MetaModel.alias\"==e.name&&t.getAdapter(u.RAMLService).addAlias(\"\"+e.arguments[0]),\"MetaModel.consumesRefs\"==e.name&&t.getAdapter(u.RAMLService).setConsumesRefs(!0),\"MetaModel.canInherit\"==e.name&&t.getAdapter(u.RAMLService).withCanInherit(\"\"+e.arguments[0]),\"MetaModel.definingPropertyIsEnough\"==e.name&&t.getAdapter(u.RAMLService).definingPropertyIsEnough(\"\"+e.arguments[0]),\"MetaModel.customHandling\"==e.name&&t.setCustom(!0),\"MetaModel.superclasses\"==e.name&&t.getAdapter(u.RAMLService).registerSupertypes(e.arguments[0]),\"MetaModel.possibleInterfaces\"==e.name&&t.getAdapter(u.RAMLService).registerPossibleInterfaces(e.arguments[0])}function i(e,n){t.annotationHandlers[n.name](n,e)}var a=n(0),o=n(188),s=n(1),u=a;t.handleTypeAnnotation=r,t.annotationHandlers={key:function(e,t){t.withFromParentKey(),t.withKey(!0)},value:function(e,t){t.withFromParentValue()},canBeValue:function(e,t){t.withCanBeValue()},unmerged:function(e,t){t.unmerge()},startFrom:function(e,t){t.withKeyRestriction(e.arguments[0]),t.merge()},oneOf:function(e,t){t.withEnumOptions(e.arguments[0])},oftenKeys:function(e,t){t.withOftenKeys(e.arguments[0])},embeddedInMaps:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withEmbedMap()},system:function(e,t){t.getAdapter(u.RAMLPropertyParserService).withSystem(!0)},required:function(e,t){\"false\"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withRequired(!0)},noDirectParse:function(e,t){\"false\"!=e.arguments[0]&&e.arguments[0]!==!1&&t.withNoDirectParse()},setsContextValue:function(e,t){t.addChildValueConstraint(new a.ChildValueConstraint(\"\"+e.arguments[0],\"\"+e.arguments[1]))},defaultValue:function(e,t){t.setDefaultVal(\"\"+e.arguments[0])},defaultIntegerValue:function(e,t){t.setDefaultIntegerVal(e.arguments[0])},defaultBooleanValue:function(e,t){t.setDefaultBooleanVal(e.arguments[0])},facetId:function(e,t){\"minItems\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){if(Number.parseInt(\"\"+t.value())>e.length)return\"array should contain at least \"+t.value()+\" items\"}return null}),\"enum\"==e.arguments[0]&&t.setFacetValidator(function(e,t){var n=e+\"\",r=t;try{if(!r.some(function(e){return e==n}))return\"value should be one of :\"+r.join(\",\")}catch(e){return}return null}),\"maxItems\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Array){if(Number.parseInt(\"\"+t)<e.length)return\"array should contain not more then \"+t.value()+\" items\"}return null}),\"minProperties\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Object){if(Number.parseInt(\"\"+t)>Object.keys(e).length)return\"object should contain at least \"+t.value()+\" properties\"}return null}),\"maxProperties\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(e instanceof Object){if(Number.parseInt(\"\"+t)<Object.keys(e).length)return\"object should contain not more then \"+t.value()+\" properties\"}return null}),\"uniqueItems\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(t instanceof Array){if(s.unique(t).length<t.length)return\"array should contain only unique items\"}return null}),\"minLength\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(\"number\"!=typeof e&&\"boolean\"!=typeof e||(e=\"\"+e),\"string\"==typeof e){var n=Number.parseInt(\"\"+t);if(n>e.length)return\"string length should be at least \"+n}return null}),\"maxLength\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(\"number\"!=typeof e&&\"boolean\"!=typeof e||(e=\"\"+e),\"string\"==typeof e){var n=Number.parseInt(\"\"+t);if(n<e.length)return\"string length should be not more then \"+n}return null}),\"minimum\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(\"string\"==typeof e&&(e=parseFloat(e)),\"number\"==typeof e){var n=parseFloat(t);if(n>e)return\"value should be not less then \"+n}return null}),\"maximum\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(\"string\"==typeof e&&(e=parseFloat(e)),\"number\"==typeof e){var n=parseFloat(t);if(n<e)return\"value should be not more then \"+n}return null}),\"pattern\"==e.arguments[0]&&t.setFacetValidator(function(e,t){if(\"number\"!=typeof e&&\"boolean\"!=typeof e||(e=\"\"+e),\"string\"==typeof e){if(!new RegExp(t).test(e))return\"string should match to \"+t}return null})},extraMetaKey:function(e,t){\"statusCodes\"==e.arguments[0]&&(t.withOftenKeys(o.statusCodes.filter(function(e){return e.code.indexOf(\"x\")<0}).map(function(e){return e.code})),t.setValueDocProvider(function(e){var t=s.find(o.statusCodes,function(t){return t.code==e});return t?e+\":\"+t.description:null})),\"headers\"==e.arguments[0]&&(t.setValueSuggester(function(e){if(e.property()){var t=e.property().getChildValueConstraints();if(s.find(t,function(e){return\"location\"==e.name&&\"Params.ParameterLocation.HEADERS\"==e.value}))return o.headers.map(function(e){return e.header});if(e.property()&&\"headers\"==e.property().nameId())return o.headers.map(function(e){return e.header})}return null}),t.setValueDocProvider(function(e){var t=s.find(o.headers,function(t){return t.header==e});return t?e+\":\"+t.description:null})),\"methods\"==e.arguments[0]&&t.setValueDocProvider(function(e){var t=s.find(o.methods,function(t){return t.method==e.toUpperCase()});return t?e+\":\"+t.description:null})},requireValue:function(e,t){t.withContextRequirement(\"\"+e.arguments[0],\"\"+e.arguments[1])},allowMultiple:function(e,t){t.withMultiValue(!0)},constraint:function(e,t){},newInstanceName:function(e,t){t.withNewInstanceName(\"\"+e.arguments[0])},declaringFields:function(e,t){t.withThisPropertyDeclaresFields()},describesAnnotation:function(e,t){t.withDescribes(e.arguments[0])},allowNull:function(e,t){t.withAllowNull()},descriminatingProperty:function(e,t){t.withDescriminating(!0)},description:function(e,t){t.withDescription(\"\"+e.arguments[0])},inherited:function(e,t){t.withInherited(!0)},selfNode:function(e,t){t.withSelfNode()},grammarTokenKind:function(e,t){t.getAdapter(u.RAMLPropertyService).withPropertyGrammarType(\"\"+e.arguments[0])},canInherit:function(e,t){t.withInheritedContextValue(\"\"+e.arguments[0])},canBeDuplicator:function(e,t){t.setCanBeDuplicator()},example:function(e,t){t.getAdapter(u.RAMLPropertyService).setExample(!0)},typeExpression:function(e,t){t.getAdapter(u.RAMLPropertyService).setTypeExpression(!0)},hide:function(e,t){0==e.arguments.length?t.getAdapter(u.RAMLPropertyDocumentationService).setHidden(!0):t.getAdapter(u.RAMLPropertyDocumentationService).setHidden(e.arguments[0])},documentationTableLabel:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setDocTableName(\"\"+e.arguments[0])},markdownDescription:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setMarkdownDescription(\"\"+e.arguments[0])},valueDescription:function(e,t){t.getAdapter(u.RAMLPropertyDocumentationService).setValueDescription(null!=e.arguments[0]?\"\"+e.arguments[0]:null)},customHandling:function(e,t){}},t.recordAnnotation=i},function(e,t,n){\"use strict\";function r(e){var t=e[0],n={};return e.forEach(function(e){return n[e.name]=e}),e.forEach(function(e){var t=e.imports;Object.keys(t).forEach(function(e){var r=t[e];t[e]=n[r]})}),t}t.universeDumps={RAML08:r(n(330)),RAML10:r(n(331))}},function(e,t,n){\"use strict\";function r(e,t){var n=new s.Universe(t,\"\"),r={};return A(e,n,{},r),Object.keys(r).forEach(function(e){v(r[e],n)}),Object.keys(r).forEach(function(e){b(r[e],n)}),Object.keys(r).forEach(function(e){S(r[e],n)}),n.types().forEach(function(e){if(e instanceof s.NodeClass){var t=e;if(t.properties().forEach(function(e){var t=e.range(),n=e;t.hasValueTypeInHierarchy()||t.properties().forEach(function(e){if(e.getAdapter(l.RAMLPropertyService).isKey()){var t=e.keyPrefix();t&&(n.withKeyRestriction(t),n.merge());var r=e.enumOptions();r&&(n.withEnumOptions(r),n.merge())}})}),t.getAdapter(l.RAMLService).isGlobalDeclaration()){if(t.getAdapter(l.RAMLService).getActuallyExports()&&\"$self\"!=t.getAdapter(l.RAMLService).getActuallyExports()){var r=t.property(t.getAdapter(l.RAMLService).getActuallyExports()).range();if(r.hasValueTypeInHierarchy()){var i=r.getAdapter(l.RAMLService);i.setGloballyDeclaredBy(t)}}if(t.getAdapter(l.RAMLService).getConvertsToGlobal()){var r=n.type(t.getAdapter(l.RAMLService).getConvertsToGlobal());if(r.hasValueTypeInHierarchy()){var i=r.getAdapter(l.RAMLService);i.setGloballyDeclaredBy(t)}}}}}),n}function i(e,t,n,r,i){var a=s.prop(e.name(),\"\",t,n,r);e.isMultiValue()&&a.withMultiValue(!0),a.unmerge(),n||console.log(e.name()+\":\"+t.nameId()+\" has undefined type\"),n.hasValueTypeInHierarchy()||n.properties().forEach(function(e){if(e.getAdapter(l.RAMLPropertyService).isKey()){var t=e.keyPrefix();t&&(a.withKeyRestriction(t),a.merge());var n=e.enumOptions();n&&(a.withEnumOptions(n),a.merge())}}),T(e,a,i)}var a=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=n(67),s=n(0),u=n(1),c=n(332),l=s,p=function(){function e(e,t){this._field=e,this._clazz=t}return e.prototype.name=function(){return this._field.name},e.prototype.range=function(){return this._clazz.getModule().typeFor(this._field.type,this._clazz)},e.prototype.isMultiValue=function(){return this._field.type.typeKind==o.TypeKind.ARRAY},e.prototype.isKey=function(){return null!=u.find(this._field.annotations,function(e){return\"MetaModel.key\"==e.name})},e.prototype.isSimpleValue=function(){return null!=u.find(this._field.annotations,function(e){return\"MetaModel.value\"==e.name})},e.prototype.annotations=function(){return this._field.annotations},e}(),f=function(){function e(e,t){this._field=e,this._clazz=t}return e.prototype.name=function(){return this._field.name},e.prototype.value=function(){return this._field.valueConstraint},e}(),d=function(){function e(e,t){this._clazz=e,this.mw=t}return e.prototype.typeMeta=function(){return this._clazz.annotations},e.prototype.path=function(){return this.mw.path()},e.prototype.getModule=function(){return this.mw},e.prototype.typeArgs=function(){return this._clazz.typeParameters},e.prototype.typConstraints=function(){var e=this;return this._clazz.typeParameterConstraint.map(function(t){return t?e.mw.classForName(t):null})},e.prototype.methods=function(){return this._clazz.methods},e.prototype.name=function(){return this._clazz.name},e.prototype.members=function(){var e=this;return this._clazz.fields.filter(function(e){return null==e.valueConstraint}).map(function(t){return new p(t,e)})},e.prototype.constraints=function(){var e=this;return this._clazz.fields.filter(function(e){return null!=e.valueConstraint}).map(function(t){return new f(t,e)})},e.prototype.isSubTypeOf=function(e){if(this==e)return!0;var t=!1;return this.getAllSuperTypes().forEach(function(n){t||(t=t||n.isSubTypeOf(e))}),t},e.prototype.getExtendsClauses=function(){return this._clazz.extends},e.prototype.getSuperTypes=function(){var e=this,t=[];return this._clazz.extends.forEach(function(n){var r=e.mw.classForName(n.typeName);r&&t.push(r)}),t},e.prototype.getAllSuperTypes=function(){var e=this,t=[];return this._clazz.extends.forEach(function(n){var r=e.mw.classForName(n.typeName);if(r){var i=r.getAllSuperTypes();t.push(r),t.concat(i)}}),u.unique(t)},e.prototype.annotationOverridings=function(){return this._clazz.annotationOverridings},e}(),m=function(){function e(){}return e.prototype.members=function(){return[]},e.prototype.methods=function(){return[]},e.prototype.isSubTypeOf=function(e){return!1},e.prototype.getSuperTypes=function(){return[]},e.prototype.getAllSuperTypes=function(){return[]},e.prototype.name=function(){return null},e.prototype.constraints=function(){return[]},e.prototype.typeMeta=function(){return[]},e.prototype.getModule=function(){throw new Error(\"Not implemented\")},e.prototype.annotationOverridings=function(){return{}},e}(),h=function(e){function t(t,n){e.call(this),this._clazz=t,this.mw=n}return a(t,e),t.prototype.getModule=function(){return this.mw},t.prototype.values=function(){return this._clazz.members},t.prototype.name=function(){return this._clazz.name},t}(m),y=function(e){function t(t,n){e.call(this),this._clazz=t,this.mw=n}return a(t,e),t.prototype.elements=function(){return this._clazz},t.prototype.name=function(){return this._clazz.map(function(e){return e.name()}).join(\"|\")},t}(m),_=function(){function e(e){var t=this;this._univers=e,this.name2Class={},this.namespaceToMod={},this._classes=[],e.classes.forEach(function(e){var n=new d(e,t);t._classes.push(n),t.name2Class[e.name]=n,e.moduleName&&(t.name2Class[e.moduleName+\".\"+e.name]=n)}),e.enumDeclarations.forEach(function(e){var n=new h(e,t);t._classes.push(n),t.name2Class[e.name]=n})}return e.prototype.typeFor=function(e,t){var n=this;switch(e.typeKind){case o.TypeKind.BASIC:var r=e,i=r.typeName;\"string\"==i&&(i=\"StringType\"),\"number\"==i&&(i=\"NumberType\"),\"boolean\"==i&&(i=\"BooleanType\"),\"any\"==i&&(i=\"AnyType\");var a=u.indexOf(t.typeArgs(),i);if(a!=-1){var s=t.typConstraints()[a];return s?s:this.classForName(\"ValueType\")}return this.classForName(i);case o.TypeKind.UNION:return new y(e.options.map(function(e){return n.typeFor(e,t)}),this);case o.TypeKind.ARRAY:var c=e;return this.typeFor(c.base,t)}return null},e.prototype.path=function(){return this._univers.name},e.prototype.classForName=function(e,t){var n=this;if(void 0===t&&(t={}),!e)return null;var r=this.name2Class[e];if(!r&&!t[this.path()]){t[this.path()]=this;var i=e.indexOf(\".\");if(i!=-1){var a=this.namespaceToMod[e.substring(0,i)];if(!a)throw new Error;return a.classForName(e.substring(i+1),t)}Object.keys(this.namespaceToMod).forEach(function(i){if(\"MetaModel\"!=i){var a=n.namespaceToMod[i].classForName(e,t);a&&(r=a)}})}return r},e.prototype.classes=function(){return this._classes},e}(),g=function(e,t){if(e){if(e instanceof y){throw new Error(\"Union type support was removed from definition system\")}return t.type(e.name())}},v=function(e,t){var n=e.classForName(\"ValueType\");e.classes().forEach(function(e){if(e instanceof h){var r=new s.EnumType(e.name(),t,e.getModule().path());return r.values=e.values(),void t.register(r)}if(e.isSubTypeOf(n)){var i=e.getAllSuperTypes();i.push(e);var a=null;if(i.forEach(function(e){e.getExtendsClauses().forEach(function(e){if(e.typeKind==o.TypeKind.BASIC){var t=e;if(\"Reference\"==t.basicName){a=t.typeArguments[0].typeName;var n=a.indexOf(\".\");n!=-1&&(a=a.substring(n+1))}}})}),a){var u=new s.ReferenceType(e.name(),e.getModule().path(),a,t);u.setBuiltIn(!0),t.register(u)}else{var c=new s.ValueType(e.name(),t,e.getModule().path());c.setBuiltIn(!0),t.register(c)}}else{var l=new s.NodeClass(e.name(),t,e.getModule().path());l.setBuiltIn(!0),t.register(l)}})},b=function(e,t){e.classes().forEach(function(e){e.getSuperTypes().forEach(function(n){var r=t.type(e.name()),i=t.type(n.name());if(!r||!i){var r=t.type(e.name()),i=t.type(n.name());throw new Error}t.registerSuperClass(r,i)})})},S=function(e,t){e.classes().forEach(function(e){var n=t.type(e.name());e.typeMeta().forEach(function(n){var r=g(e,t);c.handleTypeAnnotation(n,r)}),e.members().forEach(function(e){var r=e.range(),a=g(r,t);null==a&&console.log(r+\":\"+e.name()),i(e,n,a,e.annotations().map(function(e){return e.name}).indexOf(\"MetaModel.customHandling\")>=0)}),Object.keys(e.annotationOverridings()).forEach(function(r){var a=[].concat(e.annotationOverridings()[r]),o={};a.forEach(function(e){return o[e.name]=!0});for(var s,u=e.getSuperTypes(),c={},l=0;l<u.length;l++){var p=u[l];if(!c[p.name()]){c[p.name()]=!0,p.getSuperTypes().forEach(function(e){return u.push(e)});var f=p.annotationOverridings()[r];if(f)f.filter(function(e){return!o[e.name]}).forEach(function(e){o[e.name]=!0,a.push(e)});else for(var d=p.members(),m=0;m<d.length;m++){var h=d[m];if(h.name()==r){s=h;break}}if(s){s.annotations().filter(function(e){return!o[e.name]}).forEach(function(e){o[e.name]=!0,a.push(e)});break}}}if(s){var y=s.range(),_=g(y,t);null==_&&console.log(y+\":\"+e.name()),i(s,n,_,!1,a)}}),e.methods().forEach(function(e){}),e.constraints().forEach(function(e){if(e.value().isCallConstraint)throw new Error;var t=e.value();n.addRequirement(e.name(),\"\"+t.value)})}),t.types().forEach(function(e){var n=e;n.getAdapter(l.RAMLService).getAliases().forEach(function(e){return t.registerAlias(e,n)})})},A=function(e,t,n,r){if(e.name.indexOf(\"metamodel.ts\")==-1){if(r[e.name])return r[e.name];var i=new _(e);return n[e.name]=i,r[e.name]=i,Object.keys(e.imports).forEach(function(a){var o=e.imports[a];if(n[o.name])return void(i.namespaceToMod[a]=n[o.name]);var s=A(o,t,n,r);i.namespaceToMod[a]=s}),n[e.name]=null,i}};t.toDefSystem=r;var T=function(e,t,n){n||(n=e.annotations()),n.forEach(function(e){var n=e.name.substring(e.name.lastIndexOf(\".\")+1);c.annotationHandlers[n]||console.log(\"Can not find handler for:\"),c.annotationHandlers[n](e,t)})}},function(e,t,n){\"use strict\";var r={Universe08:{GlobalSchema:{name:\"GlobalSchema\",properties:{key:{name:\"key\",range:\"StringType\",domain:\"GlobalSchema\"},value:{name:\"value\",range:\"SchemaString\",domain:\"GlobalSchema\"}}},Api:{name:\"Api\",properties:{title:{name:\"title\",range:\"StringType\",domain:\"Api\"},version:{name:\"version\",range:\"StringType\",domain:\"Api\"},baseUri:{name:\"baseUri\",range:\"FullUriTemplateString\",domain:\"Api\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"Api\"},uriParameters:{name:\"uriParameters\",range:\"Parameter\",domain:\"Api\"},protocols:{name:\"protocols\",range:\"StringType\",domain:\"Api\"},mediaType:{name:\"mediaType\",range:\"MimeType\",domain:\"Api\"},schemas:{name:\"schemas\",range:\"GlobalSchema\",domain:\"Api\"},traits:{name:\"traits\",range:\"Trait\",domain:\"Api\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"Api\"},securitySchemes:{name:\"securitySchemes\",range:\"AbstractSecurityScheme\",domain:\"Api\"},resourceTypes:{name:\"resourceTypes\",range:\"ResourceType\",domain:\"Api\"},resources:{name:\"resources\",range:\"Resource\",domain:\"Api\"},documentation:{name:\"documentation\",range:\"DocumentationItem\",domain:\"Api\"},RAMLVersion:{name:\"RAMLVersion\"}}},DocumentationItem:{name:\"DocumentationItem\",properties:{title:{name:\"title\",range:\"StringType\",domain:\"DocumentationItem\"},content:{name:\"content\",range:\"MarkdownString\",domain:\"DocumentationItem\"}}},ValueType:{name:\"ValueType\",properties:{}},StringType:{name:\"StringType\",properties:{}},AnyType:{name:\"AnyType\",properties:{}},NumberType:{name:\"NumberType\",properties:{}},BooleanType:{name:\"BooleanType\",properties:{}},Referencable:{name:\"Referencable\",properties:{}},Reference:{name:\"Reference\",properties:{structuredValue:{name:\"structuredValue\"},name:{name:\"name\"}}},DeclaresDynamicType:{name:\"DeclaresDynamicType\",properties:{}},UriTemplate:{name:\"UriTemplate\",properties:{}},RelativeUriString:{name:\"RelativeUriString\",properties:{}},FullUriTemplateString:{name:\"FullUriTemplateString\",properties:{}},FixedUri:{name:\"FixedUri\",properties:{}},MarkdownString:{name:\"MarkdownString\",properties:{}},SchemaString:{name:\"SchemaString\",properties:{}},JSonSchemaString:{name:\"JSonSchemaString\",properties:{}},XMLSchemaString:{name:\"XMLSchemaString\",properties:{}},ExampleString:{name:\"ExampleString\",properties:{}},StatusCodeString:{name:\"StatusCodeString\",properties:{}},JSONExample:{name:\"JSONExample\",properties:{}},XMLExample:{name:\"XMLExample\",properties:{}},TypeInstance:{name:\"TypeInstance\",properties:{properties:{name:\"properties\",range:\"TypeInstanceProperty\",domain:\"TypeInstance\"},isScalar:{name:\"isScalar\",range:\"BooleanType\",domain:\"TypeInstance\"},value:{name:\"value\",range:\"AnyType\",domain:\"TypeInstance\"}}},TypeInstanceProperty:{name:\"TypeInstanceProperty\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"TypeInstanceProperty\"},value:{name:\"value\",range:\"TypeInstance\",domain:\"TypeInstanceProperty\"},values:{name:\"values\",range:\"TypeInstance\",domain:\"TypeInstanceProperty\"},isArray:{name:\"isArray\",range:\"BooleanType\",domain:\"TypeInstanceProperty\"}}},RAMLSimpleElement:{name:\"RAMLSimpleElement\",properties:{}},Parameter:{name:\"Parameter\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"}}},StringTypeDeclaration:{name:\"StringTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"},pattern:{name:\"pattern\",range:\"StringType\",domain:\"StringTypeDeclaration\"},enum:{name:\"enum\",range:\"StringType\",domain:\"StringTypeDeclaration\"},minLength:{name:\"minLength\",range:\"NumberType\",domain:\"StringTypeDeclaration\"},maxLength:{name:\"maxLength\",range:\"NumberType\",domain:\"StringTypeDeclaration\"}}},BooleanTypeDeclaration:{name:\"BooleanTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"}}},NumberTypeDeclaration:{name:\"NumberTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"},minimum:{name:\"minimum\",range:\"NumberType\",domain:\"NumberTypeDeclaration\"},maximum:{name:\"maximum\",range:\"NumberType\",domain:\"NumberTypeDeclaration\"}}},IntegerTypeDeclaration:{name:\"IntegerTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"},minimum:{name:\"minimum\",range:\"NumberType\",domain:\"NumberTypeDeclaration\"},maximum:{name:\"maximum\",range:\"NumberType\",domain:\"NumberTypeDeclaration\"}}},DateTypeDeclaration:{name:\"DateTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"}}},FileTypeDeclaration:{name:\"FileTypeDeclaration\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"Parameter\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Parameter\"},type:{name:\"type\",range:\"StringType\",domain:\"Parameter\"},location:{name:\"location\",range:\"ParameterLocation\",domain:\"Parameter\"},required:{name:\"required\",range:\"BooleanType\",domain:\"Parameter\"},default:{name:\"default\",range:\"AnyType\",domain:\"Parameter\"},example:{name:\"example\",range:\"StringType\",domain:\"Parameter\"},repeat:{name:\"repeat\",range:\"BooleanType\",domain:\"Parameter\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Parameter\"}}},ParameterLocation:{name:\"ParameterLocation\",properties:{}},MimeType:{name:\"MimeType\",properties:{}},BodyLike:{name:\"BodyLike\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"BodyLike\"},schema:{name:\"schema\",range:\"SchemaString\",domain:\"BodyLike\"},example:{name:\"example\",range:\"ExampleString\",domain:\"BodyLike\"},formParameters:{name:\"formParameters\",range:\"Parameter\",domain:\"BodyLike\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"BodyLike\"},schemaContent:{name:\"schemaContent\"}}},XMLBody:{name:\"XMLBody\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"BodyLike\"},schema:{name:\"schema\",range:\"XMLSchemaString\",domain:\"XMLBody\"},example:{name:\"example\",range:\"ExampleString\",domain:\"BodyLike\"},formParameters:{name:\"formParameters\",range:\"Parameter\",domain:\"BodyLike\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"BodyLike\"}}},JSONBody:{name:\"JSONBody\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"BodyLike\"},schema:{name:\"schema\",range:\"JSonSchemaString\",domain:\"JSONBody\"},example:{name:\"example\",range:\"ExampleString\",domain:\"BodyLike\"},formParameters:{name:\"formParameters\",range:\"Parameter\",domain:\"BodyLike\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"BodyLike\"}}},Response:{name:\"Response\",properties:{code:{name:\"code\",range:\"StatusCodeString\",domain:\"Response\"},headers:{name:\"headers\",range:\"Parameter\",domain:\"Response\"},body:{name:\"body\",range:\"BodyLike\",domain:\"Response\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Response\"}}},Resource:{name:\"Resource\",properties:{relativeUri:{name:\"relativeUri\",range:\"RelativeUriString\",domain:\"Resource\"},type:{name:\"type\",range:\"ResourceTypeRef\",domain:\"Resource\"},is:{name:\"is\",range:\"TraitRef\",domain:\"Resource\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"Resource\"},uriParameters:{name:\"uriParameters\",range:\"Parameter\",domain:\"Resource\"},methods:{name:\"methods\",range:\"Method\",domain:\"Resource\"},resources:{name:\"resources\",range:\"Resource\",domain:\"Resource\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Resource\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"Resource\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"Resource\"}}},ResourceTypeRef:{name:\"ResourceTypeRef\",properties:{resourceType:{name:\"resourceType\"}}},ResourceType:{name:\"ResourceType\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"ResourceType\"},usage:{name:\"usage\",range:\"StringType\",domain:\"ResourceType\"},methods:{name:\"methods\",range:\"Method\",domain:\"ResourceType\"},is:{name:\"is\",range:\"TraitRef\",domain:\"ResourceType\"},type:{name:\"type\",range:\"ResourceTypeRef\",domain:\"ResourceType\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"ResourceType\"},uriParameters:{name:\"uriParameters\",range:\"Parameter\",domain:\"ResourceType\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"ResourceType\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"ResourceType\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"ResourceType\"},parametrizedProperties:{name:\"parametrizedProperties\"}}},MethodBase:{name:\"MethodBase\",properties:{responses:{name:\"responses\",range:\"Response\",domain:\"MethodBase\"},body:{name:\"body\",range:\"BodyLike\",domain:\"MethodBase\"},protocols:{name:\"protocols\",range:\"StringType\",domain:\"MethodBase\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"MethodBase\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"MethodBase\"},queryParameters:{name:\"queryParameters\",range:\"Parameter\",domain:\"MethodBase\"},headers:{name:\"headers\",range:\"Parameter\",domain:\"MethodBase\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"MethodBase\"}}},Method:{name:\"Method\",properties:{responses:{name:\"responses\",range:\"Response\",domain:\"MethodBase\"},body:{name:\"body\",range:\"BodyLike\",domain:\"MethodBase\"},protocols:{name:\"protocols\",range:\"StringType\",domain:\"MethodBase\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"MethodBase\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"MethodBase\"},queryParameters:{name:\"queryParameters\",range:\"Parameter\",domain:\"MethodBase\"},headers:{name:\"headers\",range:\"Parameter\",domain:\"MethodBase\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"MethodBase\"},method:{name:\"method\",range:\"StringType\",domain:\"Method\"},is:{name:\"is\",range:\"TraitRef\",domain:\"Method\"}}},Trait:{name:\"Trait\",properties:{responses:{name:\"responses\",range:\"Response\",domain:\"MethodBase\"},body:{name:\"body\",range:\"BodyLike\",domain:\"MethodBase\"},protocols:{name:\"protocols\",range:\"StringType\",domain:\"MethodBase\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"MethodBase\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"MethodBase\"},queryParameters:{name:\"queryParameters\",range:\"Parameter\",domain:\"MethodBase\"},headers:{name:\"headers\",range:\"Parameter\",domain:\"MethodBase\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"MethodBase\"},name:{name:\"name\",range:\"StringType\",domain:\"Trait\"},usage:{name:\"usage\",range:\"StringType\",domain:\"Trait\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"Trait\"},parametrizedProperties:{name:\"parametrizedProperties\"}}},TraitRef:{name:\"TraitRef\",properties:{trait:{name:\"trait\"}}},SecuritySchemePart:{name:\"SecuritySchemePart\",properties:{responses:{name:\"responses\",range:\"Response\",domain:\"SecuritySchemePart\"},body:{name:\"body\",range:\"BodyLike\",domain:\"MethodBase\"},protocols:{name:\"protocols\",range:\"StringType\",domain:\"MethodBase\"},securedBy:{name:\"securedBy\",range:\"SecuritySchemeRef\",domain:\"MethodBase\"},baseUriParameters:{name:\"baseUriParameters\",range:\"Parameter\",domain:\"MethodBase\"},queryParameters:{name:\"queryParameters\",range:\"Parameter\",domain:\"SecuritySchemePart\"},headers:{name:\"headers\",range:\"Parameter\",domain:\"SecuritySchemePart\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"SecuritySchemePart\"},displayName:{name:\"displayName\",range:\"StringType\",domain:\"SecuritySchemePart\"},is:{name:\"is\",range:\"TraitRef\",domain:\"SecuritySchemePart\"}}},SecuritySchemeSettings:{name:\"SecuritySchemeSettings\",properties:{}},AbstractSecurityScheme:{name:\"AbstractSecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"SecuritySchemeSettings\",domain:\"AbstractSecurityScheme\"}}},SecuritySchemeRef:{name:\"SecuritySchemeRef\",properties:{securitySchemeName:{name:\"securitySchemeName\"},securityScheme:{name:\"securityScheme\"}}},OAuth1SecuritySchemeSettings:{name:\"OAuth1SecuritySchemeSettings\",properties:{requestTokenUri:{name:\"requestTokenUri\",range:\"FixedUri\",domain:\"OAuth1SecuritySchemeSettings\"},authorizationUri:{name:\"authorizationUri\",range:\"FixedUri\",domain:\"OAuth1SecuritySchemeSettings\"},tokenCredentialsUri:{name:\"tokenCredentialsUri\",range:\"FixedUri\",domain:\"OAuth1SecuritySchemeSettings\"}}},OAuth2SecuritySchemeSettings:{name:\"OAuth2SecuritySchemeSettings\",properties:{accessTokenUri:{name:\"accessTokenUri\",range:\"FixedUri\",domain:\"OAuth2SecuritySchemeSettings\"},authorizationUri:{name:\"authorizationUri\",range:\"FixedUri\",domain:\"OAuth2SecuritySchemeSettings\"},authorizationGrants:{name:\"authorizationGrants\",range:\"StringType\",domain:\"OAuth2SecuritySchemeSettings\"},scopes:{name:\"scopes\",range:\"StringType\",domain:\"OAuth2SecuritySchemeSettings\"}}},OAuth2SecurityScheme:{name:\"OAuth2SecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"OAuth2SecuritySchemeSettings\",domain:\"OAuth2SecurityScheme\"}}},OAuth1SecurityScheme:{name:\"OAuth1SecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"OAuth1SecuritySchemeSettings\",domain:\"OAuth1SecurityScheme\"}}},BasicSecurityScheme:{name:\"BasicSecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"SecuritySchemeSettings\",domain:\"AbstractSecurityScheme\"}}},DigestSecurityScheme:{name:\"DigestSecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"SecuritySchemeSettings\",domain:\"AbstractSecurityScheme\"}}},CustomSecurityScheme:{name:\"CustomSecurityScheme\",properties:{name:{name:\"name\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},type:{name:\"type\",range:\"StringType\",domain:\"AbstractSecurityScheme\"},description:{name:\"description\",range:\"MarkdownString\",domain:\"AbstractSecurityScheme\"},describedBy:{name:\"describedBy\",range:\"SecuritySchemePart\",domain:\"AbstractSecurityScheme\"},settings:{name:\"settings\",range:\"SecuritySchemeSettings\",domain:\"AbstractSecurityScheme\"}}}},Universe10:{Library:{name:\"Library\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"},schemas:{name:\"schemas\"},types:{name:\"types\"},traits:{name:\"traits\"},resourceTypes:{name:\"resourceTypes\"},annotationTypes:{name:\"annotationTypes\"},securitySchemes:{name:\"securitySchemes\"},usage:{name:\"usage\"},name:{name:\"name\"}}},LibraryBase:{name:\"LibraryBase\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"},schemas:{name:\"schemas\"},types:{name:\"types\"},traits:{name:\"traits\"},resourceTypes:{name:\"resourceTypes\"},annotationTypes:{name:\"annotationTypes\"},securitySchemes:{name:\"securitySchemes\"}}},Api:{name:\"Api\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"},schemas:{name:\"schemas\"},types:{name:\"types\"},traits:{name:\"traits\"},resourceTypes:{name:\"resourceTypes\"},annotationTypes:{name:\"annotationTypes\"},securitySchemes:{name:\"securitySchemes\"},title:{name:\"title\"},description:{name:\"description\"},version:{name:\"version\"},baseUri:{name:\"baseUri\"},baseUriParameters:{name:\"baseUriParameters\"},protocols:{name:\"protocols\"},mediaType:{name:\"mediaType\"},securedBy:{name:\"securedBy\"},resources:{name:\"resources\"},documentation:{name:\"documentation\"},RAMLVersion:{name:\"RAMLVersion\",range:\"StringType\",domain:\"Api\"}}},Overlay:{name:\"Overlay\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"},schemas:{name:\"schemas\"},types:{name:\"types\"},traits:{name:\"traits\"},resourceTypes:{name:\"resourceTypes\"},annotationTypes:{name:\"annotationTypes\"},securitySchemes:{name:\"securitySchemes\"},title:{name:\"title\"},description:{name:\"description\"},version:{name:\"version\"},baseUri:{name:\"baseUri\"},baseUriParameters:{name:\"baseUriParameters\"},protocols:{name:\"protocols\"},mediaType:{name:\"mediaType\"},securedBy:{name:\"securedBy\"},resources:{name:\"resources\"},documentation:{name:\"documentation\"},usage:{name:\"usage\"},extends:{name:\"extends\"}}},Extension:{name:\"Extension\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"},schemas:{name:\"schemas\"},types:{name:\"types\"},traits:{name:\"traits\"},resourceTypes:{name:\"resourceTypes\"},annotationTypes:{name:\"annotationTypes\"},securitySchemes:{name:\"securitySchemes\"},title:{name:\"title\"},description:{name:\"description\"},version:{name:\"version\"},baseUri:{name:\"baseUri\"},baseUriParameters:{name:\"baseUriParameters\"},protocols:{name:\"protocols\"},mediaType:{name:\"mediaType\"},securedBy:{name:\"securedBy\"},resources:{name:\"resources\"},documentation:{name:\"documentation\"},usage:{name:\"usage\"},extends:{name:\"extends\"}}},UsesDeclaration:{name:\"UsesDeclaration\",properties:{annotations:{name:\"annotations\"},key:{name:\"key\"},value:{name:\"value\"}}},FragmentDeclaration:{name:\"FragmentDeclaration\",properties:{annotations:{name:\"annotations\"},uses:{name:\"uses\"}}},DocumentationItem:{name:\"DocumentationItem\",properties:{annotations:{name:\"annotations\"},title:{name:\"title\"},content:{name:\"content\"}}},ValueType:{name:\"ValueType\",properties:{annotations:{name:\"annotations\"}}},StringType:{name:\"StringType\",properties:{annotations:{name:\"annotations\"}}},AnyType:{name:\"AnyType\",properties:{annotations:{name:\"annotations\"}}},NumberType:{name:\"NumberType\",properties:{annotations:{name:\"annotations\"}}},IntegerType:{name:\"IntegerType\",properties:{annotations:{name:\"annotations\"}}},NullType:{name:\"NullType\",properties:{annotations:{name:\"annotations\"}}},TimeOnlyType:{name:\"TimeOnlyType\",properties:{annotations:{name:\"annotations\"}}},DateOnlyType:{name:\"DateOnlyType\",properties:{annotations:{name:\"annotations\"}}},DateTimeOnlyType:{name:\"DateTimeOnlyType\",properties:{annotations:{name:\"annotations\"}}},DateTimeType:{name:\"DateTimeType\",properties:{annotations:{name:\"annotations\"}}},FileType:{name:\"FileType\",properties:{annotations:{name:\"annotations\"}}},BooleanType:{name:\"BooleanType\",properties:{annotations:{name:\"annotations\"}}},Reference:{name:\"Reference\",properties:{annotations:{name:\"annotations\"},structuredValue:{name:\"structuredValue\",range:\"TypeInstance\",domain:\"Reference\"},name:{name:\"name\",range:\"StringType\",domain:\"Reference\"}}},UriTemplate:{name:\"UriTemplate\",properties:{annotations:{name:\"annotations\"}}},StatusCodeString:{name:\"StatusCodeString\",properties:{annotations:{name:\"annotations\"}}},RelativeUriString:{name:\"RelativeUriString\",properties:{annotations:{name:\"annotations\"}}},FullUriTemplateString:{name:\"FullUriTemplateString\",properties:{annotations:{name:\"annotations\"}}},FixedUriString:{name:\"FixedUriString\",properties:{annotations:{name:\"annotations\"}}},ContentType:{name:\"ContentType\",properties:{annotations:{name:\"annotations\"}}},MarkdownString:{name:\"MarkdownString\",properties:{annotations:{name:\"annotations\"}}},SchemaString:{name:\"SchemaString\",properties:{annotations:{name:\"annotations\"}}},ExampleSpec:{name:\"ExampleSpec\",properties:{annotations:{name:\"annotations\"},value:{name:\"value\"},strict:{name:\"strict\"},name:{name:\"name\"},displayName:{name:\"displayName\"},description:{name:\"description\"},structuredValue:{name:\"structuredValue\",range:\"TypeInstance\",domain:\"ExampleSpec\"}}},TypeDeclaration:{name:\"TypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},fixedFacets:{name:\"fixedFacets\",range:\"TypeInstance\",domain:\"TypeDeclaration\"},structuredType:{name:\"structuredType\",range:\"TypeInstance\",domain:\"TypeDeclaration\"},parametrizedProperties:{name:\"parametrizedProperties\",range:\"TypeInstance\",domain:\"TypeDeclaration\"}}},XMLFacetInfo:{name:\"XMLFacetInfo\",properties:{annotations:{name:\"annotations\"},attribute:{name:\"attribute\"},wrapped:{name:\"wrapped\"},name:{name:\"name\"},namespace:{name:\"namespace\"},prefix:{name:\"prefix\"}}},ArrayTypeDeclaration:{name:\"ArrayTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},uniqueItems:{name:\"uniqueItems\"},items:{name:\"items\"},minItems:{name:\"minItems\"},maxItems:{name:\"maxItems\"},structuredItems:{name:\"structuredItems\",range:\"TypeInstance\",domain:\"ArrayTypeDeclaration\"}}},UnionTypeDeclaration:{name:\"UnionTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"}}},ObjectTypeDeclaration:{name:\"ObjectTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},properties:{name:\"properties\"},minProperties:{name:\"minProperties\"},maxProperties:{name:\"maxProperties\"},additionalProperties:{name:\"additionalProperties\"},discriminator:{name:\"discriminator\"},discriminatorValue:{name:\"discriminatorValue\"}}},StringTypeDeclaration:{name:\"StringTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},pattern:{name:\"pattern\"},minLength:{name:\"minLength\"},maxLength:{name:\"maxLength\"},enum:{name:\"enum\"}}},BooleanTypeDeclaration:{name:\"BooleanTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"}}},NumberTypeDeclaration:{name:\"NumberTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},minimum:{name:\"minimum\"},maximum:{name:\"maximum\"},enum:{name:\"enum\"},format:{name:\"format\"},multipleOf:{name:\"multipleOf\"}}},IntegerTypeDeclaration:{name:\"IntegerTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},minimum:{name:\"minimum\"},maximum:{name:\"maximum\"},enum:{name:\"enum\"},format:{name:\"format\"},multipleOf:{name:\"multipleOf\"}}},DateOnlyTypeDeclaration:{name:\"DateOnlyTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"}}},TimeOnlyTypeDeclaration:{name:\"TimeOnlyTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"}}},DateTimeOnlyTypeDeclaration:{name:\"DateTimeOnlyTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"}}},DateTimeTypeDeclaration:{name:\"DateTimeTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},format:{name:\"format\"}}},TypeInstance:{name:\"TypeInstance\",properties:{properties:{name:\"properties\"},isScalar:{name:\"isScalar\"},value:{name:\"value\"},isArray:{name:\"isArray\"},items:{name:\"items\"}}},TypeInstanceProperty:{name:\"TypeInstanceProperty\",properties:{name:{name:\"name\"},value:{name:\"value\"},values:{name:\"values\"},isArray:{name:\"isArray\"}}},ModelLocation:{name:\"ModelLocation\",properties:{}},LocationKind:{name:\"LocationKind\",properties:{}},MimeType:{name:\"MimeType\",properties:{annotations:{name:\"annotations\"}}},Response:{name:\"Response\",properties:{annotations:{name:\"annotations\"},code:{name:\"code\"},headers:{name:\"headers\"},body:{name:\"body\"},description:{name:\"description\"}}},Annotable:{name:\"Annotable\",properties:{annotations:{name:\"annotations\"}}},AnnotationRef:{name:\"AnnotationRef\",properties:{annotations:{name:\"annotations\"},annotation:{name:\"annotation\",range:\"TypeDeclaration\",domain:\"AnnotationRef\"}}},AnnotationTarget:{name:\"AnnotationTarget\",properties:{annotations:{name:\"annotations\"}}},TraitRef:{name:\"TraitRef\",properties:{annotations:{name:\"annotations\"},trait:{name:\"trait\",range:\"Trait\",domain:\"TraitRef\"}}},Trait:{name:\"Trait\",properties:{annotations:{name:\"annotations\"},queryParameters:{name:\"queryParameters\"},headers:{name:\"headers\"},queryString:{name:\"queryString\"},responses:{name:\"responses\"},body:{name:\"body\"},protocols:{name:\"protocols\"},is:{name:\"is\"},securedBy:{name:\"securedBy\"},description:{name:\"description\"},displayName:{name:\"displayName\"},name:{name:\"name\"},usage:{name:\"usage\"},parametrizedProperties:{name:\"parametrizedProperties\",range:\"TypeInstance\",domain:\"Trait\"}}},MethodBase:{name:\"MethodBase\",properties:{annotations:{name:\"annotations\"},queryParameters:{name:\"queryParameters\"},headers:{name:\"headers\"},queryString:{name:\"queryString\"},responses:{name:\"responses\"},body:{name:\"body\"},protocols:{name:\"protocols\"},is:{name:\"is\"},securedBy:{name:\"securedBy\"},description:{name:\"description\"},displayName:{name:\"displayName\"}}},Method:{name:\"Method\",properties:{annotations:{name:\"annotations\"},queryParameters:{name:\"queryParameters\"},headers:{name:\"headers\"},queryString:{name:\"queryString\"},responses:{name:\"responses\"},body:{name:\"body\"},protocols:{name:\"protocols\"},is:{name:\"is\"},securedBy:{name:\"securedBy\"},description:{name:\"description\"},displayName:{name:\"displayName\"},method:{name:\"method\"},parametrizedProperties:{name:\"parametrizedProperties\",range:\"TypeInstance\",domain:\"Method\"}}},Operation:{name:\"Operation\",properties:{annotations:{name:\"annotations\"},queryParameters:{name:\"queryParameters\"},headers:{name:\"headers\"},queryString:{name:\"queryString\"},responses:{name:\"responses\"}}},SecuritySchemePart:{name:\"SecuritySchemePart\",properties:{annotations:{name:\"annotations\"},queryParameters:{name:\"queryParameters\"},headers:{name:\"headers\"},queryString:{name:\"queryString\"},responses:{name:\"responses\"}}},SecuritySchemeSettings:{name:\"SecuritySchemeSettings\",properties:{annotations:{name:\"annotations\"}}},OAuth1SecuritySchemeSettings:{name:\"OAuth1SecuritySchemeSettings\",properties:{annotations:{name:\"annotations\"},requestTokenUri:{name:\"requestTokenUri\"},authorizationUri:{name:\"authorizationUri\"},tokenCredentialsUri:{name:\"tokenCredentialsUri\"},signatures:{name:\"signatures\"}}},OAuth2SecuritySchemeSettings:{name:\"OAuth2SecuritySchemeSettings\",properties:{annotations:{name:\"annotations\"},accessTokenUri:{name:\"accessTokenUri\"},authorizationUri:{name:\"authorizationUri\"},authorizationGrants:{name:\"authorizationGrants\"},scopes:{name:\"scopes\"}}},SecuritySchemeRef:{name:\"SecuritySchemeRef\",properties:{annotations:{name:\"annotations\"},securitySchemeName:{name:\"securitySchemeName\",range:\"StringType\",domain:\"SecuritySchemeRef\"},securityScheme:{name:\"securityScheme\",range:\"AbstractSecurityScheme\",domain:\"SecuritySchemeRef\"}}},AbstractSecurityScheme:{name:\"AbstractSecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},OAuth2SecurityScheme:{name:\"OAuth2SecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},OAuth1SecurityScheme:{name:\"OAuth1SecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},PassThroughSecurityScheme:{name:\"PassThroughSecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},BasicSecurityScheme:{name:\"BasicSecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},DigestSecurityScheme:{name:\"DigestSecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},CustomSecurityScheme:{name:\"CustomSecurityScheme\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},type:{name:\"type\"},description:{name:\"description\"},describedBy:{name:\"describedBy\"},displayName:{name:\"displayName\"},settings:{name:\"settings\"}}},ResourceTypeRef:{name:\"ResourceTypeRef\",properties:{annotations:{name:\"annotations\"},resourceType:{name:\"resourceType\",range:\"ResourceType\",domain:\"ResourceTypeRef\"}}},ResourceType:{name:\"ResourceType\",properties:{annotations:{name:\"annotations\"},methods:{name:\"methods\"},is:{name:\"is\"},type:{name:\"type\"},description:{name:\"description\"},securedBy:{name:\"securedBy\"},uriParameters:{name:\"uriParameters\"},displayName:{name:\"displayName\"},name:{name:\"name\"},usage:{name:\"usage\"},parametrizedProperties:{name:\"parametrizedProperties\",range:\"TypeInstance\",domain:\"ResourceType\"}}},ResourceBase:{name:\"ResourceBase\",properties:{annotations:{name:\"annotations\"},methods:{name:\"methods\"},is:{name:\"is\"},type:{name:\"type\"},description:{name:\"description\"},securedBy:{name:\"securedBy\"},uriParameters:{name:\"uriParameters\"}}},Resource:{name:\"Resource\",properties:{annotations:{name:\"annotations\"},methods:{name:\"methods\"},is:{name:\"is\"},type:{name:\"type\"},description:{name:\"description\"},securedBy:{name:\"securedBy\"},uriParameters:{name:\"uriParameters\"},relativeUri:{name:\"relativeUri\"},displayName:{name:\"displayName\"},resources:{name:\"resources\"}}},FileTypeDeclaration:{name:\"FileTypeDeclaration\",properties:{annotations:{name:\"annotations\"},name:{name:\"name\"},displayName:{name:\"displayName\"},facets:{name:\"facets\"},schema:{name:\"schema\"},type:{name:\"type\"},location:{name:\"location\"},locationKind:{name:\"locationKind\"},default:{name:\"default\"},example:{name:\"example\"},examples:{name:\"examples\"},required:{name:\"required\"},description:{name:\"description\"},xml:{name:\"xml\"},allowedTargets:{name:\"allowedTargets\"},isAnnotation:{name:\"isAnnotation\"},fileTypes:{name:\"fileTypes\"},minLength:{name:\"minLength\"},maxLength:{name:\"maxLength\"}}}}};e.exports=r},function(e,t,n){\"use strict\";function r(e){return a(e,\"YYYY-MM-DD\")}function i(e){var t=\"11 \"+e.trim();if(!s.isValid(t,\"YY HH:mm:ss\"))return!1;var n=s.parse(t,\"YY HH:mm:ss\",!1);return s.format(n,\"YY HH:mm:ss\",!1).trim()==t.trim()}function a(e,t){var n=e.match(/^(\\d{4})-\\d{2}-\\d{2}$/);if(!n||2!=n.length)return!1;var r=parseInt(n[1]);return!((r<70||r>99)&&!s.isValid(e,t))}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(2),u=n(6),c=u.messageRegistry,l=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){return\"string\"==typeof e&&r(e)?u.ok():u.error(c.INVALID_DATEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return\"should be date-only\"},t}(u.GenericTypeOf);t.DateOnlyR=l;var p=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){if(\"string\"==typeof e){var t=e.match(/^([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/);if(!t)return u.error(c.INVALID_TIMEONLY,this);return i(t[1])?u.ok():u.error(c.INVALID_TIMEONLY,this)}return u.error(c.INVALID_TIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return\"should be time-only\"},t}(u.GenericTypeOf);t.TimeOnlyR=p;var f=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){if(\"string\"==typeof e){var t=e.match(/^(\\d{4}-\\d{2}-\\d{2})T([0-9][0-9]:[0-9][0-9]:[0-9][0-9])(.[0-9]+)?$/);if(!t||t.length<3)return u.error(c.INVALID_DATETIMEONLY,this);var n=t[1],a=t[2];return r(n)&&i(a)?u.ok():u.error(c.INVALID_DATETIMEONLY,this)}return u.error(c.INVALID_DATETIMEONLY,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return\"should be datetime-only\"},t}(u.GenericTypeOf);t.DateTimeOnlyR=f;var d=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.check=function(e){var t=u.VALIDATED_TYPE,n=!1;if(t.allFacets().forEach(function(e){\"format\"==e.facetName()&&\"rfc2616\"===e.value()&&(n=!0)}),\"string\"==typeof e){if(!n){var a=e.match(/^(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2})(?:\\.\\d+)?((?:[\\+\\-]\\d{2}:\\d{2})|Z)$/);if(!a||a.length<3)return u.error(c.INVALID_RFC3339,this);var o=a[1],s=a[2];return r(o)&&i(s)?u.ok():u.error(c.INVALID_RFC3339,this)}return e.match(/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\\,[ ]+\\d{2}[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\\d{4}[ ]+\\d{2}:\\d{2}:\\d{2}[ ]+GMT/)||e.match(/(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday)\\,[ ]+\\d{2}-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-\\d{2}[ ]+\\d{2}:\\d{2}:\\d{2}[ ]+GMT/)||e.match(/(Mon|Tue|Wed|Thu|Fri|Sat|Sun)\\,[ ]+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ]+\\d{1,2}[ ]+\\d{2}:\\d{2}:\\d{2}[ ]+GMT/)?u.ok():u.error(c.INVALID_RFC2616,this)}return u.error(c.INVALID_DATTIME,this)},t.prototype.requiredType=function(){return u.STRING},t.prototype.value=function(){return!0},t.prototype.facetName=function(){return\"should be datetime-only\"},t}(u.GenericTypeOf);t.DateTimeR=d},function(e,t,n){\"use strict\";function r(){return R}function i(e){return e instanceof A.AbstractType}function a(e,t){return void 0===t&&(t=A.builtInRegistry()),T.parseJSONTypeCollection(e,t)}function o(e){return T.parseJSON(null,e,A.builtInRegistry())}function s(e){return e.types||e.annotationTypes?T.parseJSONTypeCollection(e):T.parseJSON(null,e)}function u(e,t){return T.parseJSON(null,e,t?t.getTypeRegistry():A.builtInRegistry())}function c(e){return T.parseTypeCollection(e,A.builtInRegistry())}function l(e,t,n,r,i,a,o){if(void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===a&&(a=!0),void 0===o&&(o=!1),a){var s;if(null!=(s=i?n.getAnnotationType(e):n.getType(e)))return s}return T.parse(e,t,n?n.getTypeRegistry():A.builtInRegistry(),r,i,a,o)}function p(e){return T.storeAsJSON(e)}function f(e,t,n){void 0===n&&(n=!1),A.autoCloseFlag=n;try{return t.validate(e,n)}finally{A.autoCloseFlag=!1}}function d(e,t){return e.validateType(t.getAnnotationTypeRegistry())}function m(e,t){return t.ac(e)}function h(e){return e.canDoAc()}function y(){return E.getInstance().allPrototypes()}function _(){return A.builtInRegistry()}function g(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return A.derive(e,t)}function v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return A.union(e,t)}function b(e){x.setPropertyConstructor(e)}function S(e,t){return x.toNominal(e,t)}var A=n(6);t.tsInterfaces=n(48);var T=n(91),E=n(65),C=n(8),N=n(7),w=n(7),k=n(7),x=n(339);t.nominalTypes=n(150),t.nominalInterfaces=n(149),t.typeExpressions=n(341);var R=n(92);t.TOP_LEVEL_EXTRA=t.tsInterfaces.TOP_LEVEL_EXTRA,t.DEFINED_IN_TYPES_EXTRA=t.tsInterfaces.DEFINED_IN_TYPES_EXTRA,t.USER_DEFINED_EXTRA=t.tsInterfaces.USER_DEFINED_EXTRA,t.SOURCE_EXTRA=t.tsInterfaces.SOURCE_EXTRA,t.getSchemaUtils=r,t.isParsedType=i,t.loadTypeCollection=a,t.loadType=o,t.parse=s,t.parseType=u,function(e){e[e.SCALAR=0]=\"SCALAR\",e[e.ARRAY=1]=\"ARRAY\",e[e.MAP=2]=\"MAP\"}(t.NodeKind||(t.NodeKind={}));t.NodeKind;t.parseFromAST=c,t.parseTypeFromAST=l,t.dump=p,t.validate=f,t.validateTypeDefinition=d,t.performAC=m,t.checkACStatus=h,t.builtInFacets=y,t.builtInTypes=_,t.derive=g,t.unify=v;var I=function(){function e(e){this.target=e}return e.prototype.addProperty=function(e,t,n){return this.target.declareProperty(e,t,n),this},e.prototype.closeType=function(){return this.target.addMeta(new C.KnownPropertyRestriction(!1)),this},e.prototype.annotate=function(e,t){return this.target.addMeta(new N.Annotation(e,t)),this},e.prototype.customFacet=function(e,t){return this.target.addMeta(new w.CustomFacet(e,t)),this},e.prototype.customFacetDeclaration=function(e,t,n){return void 0===n&&(n=!0),this.target.addMeta(new k.FacetDeclaration(e,t,n)),this},e.prototype.addSimpleFacet=function(e,t){return this.target.addMeta(E.getInstance().buildFacet(e,t)),this},e.prototype.getResult=function(){return this.target},e}();t.TypeConstructor=I,t.setPropertyConstructor=b,t.toNominal=S},function(e,t,n){\"use strict\";function r(){return new i}var i;try{i=n(401).JSONValidator}catch(e){}if(!i){i=function(){function e(){}return e.prototype.setRemoteReference=function(e,t){},e.prototype.validateSchema=function(e){},e.prototype.getMissingRemoteReferences=function(){return[]},e.prototype.isResourceLoaded=function(e){return!0},e.prototype.validate=function(e,t){},e.prototype.getLastErrors=function(){return[]},e}()}t.getValidator=r},function(e,t,n){\"use strict\";function r(e){o=e}function i(e,t,n){void 0===n&&(n=null);var r=null;if(e.getExtra(m))return e.getExtra(m);if(!e){t(\"any\")||(r=new u.StructuredType(e.name()))}if(e.isBuiltin()){var h=\"any\"!=e.name()&&\"array\"!=e.name()?t(e.name()):null;r=h?h:e.isScalar()?new u.ValueType(e.name(),null):new u.StructuredType(e.name())}else if(e.isObject())r=new u.StructuredType(e.name(),null);else if(e.isArray()){var y=new u.Array(e.name(),null);r=y,e.putExtra(m,r);var _=e.oneMeta(l.ComponentShouldBeOfType),g=_?_.value():s.ANY;y.setComponent(i(g,t))}else if(e instanceof s.UnionType){var v=new u.Union(e.name(),null);0==e.superTypes().length&&v._superTypes.push(i(s.UNION,t,n)),e.putExtra(m,v),e.options().forEach(function(n){if(null==v.left)v.left=i(n,t);else if(null==v.right)v.right=i(n,t);else{var r=new u.Union(e.name(),null);r.left=v.right,r.right=i(n,t),v.right=r}}),r=v}else if(e.isScalar())r=new u.ValueType(e.name(),null);else if(e instanceof s.ExternalType){var b=e,S=new u.ExternalType(b.name());S.schemaString=b.schema(),r=S}if(r||(r=new u.StructuredType(e.name())),e.superTypes().forEach(function(e){var n=i(e,t);e.isBuiltin()?r._superTypes.push(n):r.addSuperType(n)}),e.isEmpty()){if(e.isArray()&&1==e.superTypes().length&&e.superTypes()[0].isAnonymous()){var A=r.superTypes()[0];A.setName(e.name()),A._subTypes=A._subTypes.filter(function(e){return e!=r}),r=A}if(e.isUnion()&&1==e.superTypes().length&&e.superTypes()[0].isAnonymous()){var A=r.superTypes()[0];A.setName(e.name()),A._subTypes=A._subTypes.filter(function(e){return e!=r}),r=A}}e.putExtra(m,r);var T=c.toProto(e);T.properties.forEach(function(e){var n=e.regExp?\"/\"+e.id+\"/\":e.id,a=o?o(n):new u.Property(n);a.withDomain(r),a.withRange(i(e.type,t)),e.optional||a.withRequired(!0),e.regExp&&a.withKeyRegexp(n)}),T.facetDeclarations.filter(function(e){return!e.isBuiltIn()}).forEach(function(e){var n=o?o(e.facetName()):new u.Property(e.facetName());n.withRange(i(e.type(),t)),r.addFacet(n)}),e.customFacets().forEach(function(e){r.fixFacet(e.facetName(),e.value())});for(var E={example:!0,examples:!0},C=e.meta().filter(function(t){if(!(t instanceof f.Discriminator||t instanceof f.DiscriminatorValue)){if(!(t instanceof l.FacetRestriction||t instanceof f.MetaInfo||t instanceof l.KnownPropertyRestriction))return!1;if(t instanceof f.FacetDeclaration||t instanceof f.CustomFacet)return!1}var n=t.requiredType(),r=n.isUnion()?n.allOptions():[n];if(!d.some(r,function(t){return e.isSubTypeOf(t)}))return!1;var i=t.facetName();return!E[i]&&(\"discriminatorValue\"==i?t.isStrict():\"allowedTargets\"==i||null!=p.getInstance().facetPrototypeWithName(i))}),N=0,w=C;N<w.length;N++){var k=w[N],x=k.facetName();\"closed\"==x&&(x=\"additionalProperties\"),r.fixFacet(x,k.value(),!0)}return r.addAdapter(e),e.isEmpty()&&r.addAdapter(new u.Empty),r._validator=a(e),e.isBuiltin()?r.buildIn=!0:e.subTypes().forEach(function(e){i(e,t,n)}),r}function a(e){return function(t){return e.validate(t,!1).getErrors()}}var o,s=n(6),u=n(150),c=n(91),l=n(8),p=n(65),f=n(7),d=n(1),m=\"nominal\";t.setPropertyConstructor=r,t.toNominal=i},function(e,t,n){\"use strict\";var r=function(){function e(t,n,r,i){this.message=t,this.expected=n,this.found=r,this.location=i,this.name=\"SyntaxError\",\"function\"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e)}function t(t){function n(e){var n,r,i=Y[e];if(i)return i;for(n=e-1;!Y[n];)n--;for(i=Y[n],i={line:i.line,column:i.column,seenCR:i.seenCR};n<e;)r=t.charAt(n),\"\\n\"===r?(i.seenCR||i.line++,i.column=1,i.seenCR=!1):\"\\r\"===r||\"\\u2028\"===r||\"\\u2029\"===r?(i.line++,i.column=1,i.seenCR=!0):(i.column++,i.seenCR=!1),n++;return Y[e]=i,i}function r(e,t){var r=n(e),i=n(t);return{start:{offset:e,line:r.line,column:r.column},end:{offset:t,line:i.line,column:i.column}}}function i(e){z<J||(z>J&&(J=z,G=[]),G.push(e))}function a(t,n,r,i){return null!==n&&function(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}(n),new e(null!==t?t:function(e,t){var n,r,i,a=new Array(e.length);for(i=0;i<e.length;i++)a[i]=e[i].description;return n=e.length>1?a.slice(0,-1).join(\", \")+\" or \"+a[e.length-1]:a[0],r=t?'\"'+function(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\\\/g,\"\\\\\\\\\").replace(/\"/g,'\\\\\"').replace(/\\x08/g,\"\\\\b\").replace(/\\t/g,\"\\\\t\").replace(/\\n/g,\"\\\\n\").replace(/\\f/g,\"\\\\f\").replace(/\\r/g,\"\\\\r\").replace(/[\\x00-\\x07\\x0B\\x0E\\x0F]/g,function(e){return\"\\\\x0\"+t(e)}).replace(/[\\x10-\\x1F\\x80-\\xFF]/g,function(e){return\"\\\\x\"+t(e)}).replace(/[\\u0100-\\u0FFF]/g,function(e){return\"\\\\u0\"+t(e)}).replace(/[\\u1000-\\uFFFF]/g,function(e){return\"\\\\u\"+t(e)})}(t)+'\"':\"end of input\",\"Expected \"+n+\" but \"+r+\" found.\"}(n,r),n,r,i)}function o(){var e,n,r,a,u,l,p,f;return e=z,n=c(),n!==d?(r=s(),r!==d?(a=z,u=c(),u!==d?(124===t.charCodeAt(z)?(l=y,z++):(l=d,0===X&&i(_)),l!==d?(p=c(),p!==d?(f=o(),f!==d?(u=[u,l,p,f],a=u):(z=a,a=d)):(z=a,a=d)):(z=a,a=d)):(z=a,a=d),a===d&&(a=null),a!==d?(H=e,n=g(r,a),e=n):(z=e,e=d)):(z=e,e=d)):(z=e,e=d),e}function s(){var e,n,r,a,s,l,p,f;if(e=z,40===t.charCodeAt(z)?(n=v,z++):(n=d,0===X&&i(b)),n!==d)if(c()!==d)if((r=o())!==d)if(c()!==d)if(41===t.charCodeAt(z)?(a=S,z++):(a=d,0===X&&i(A)),a!==d){for(s=[],l=z,p=c(),p!==d?(t.substr(z,2)===T?(f=T,z+=2):(f=d,0===X&&i(E)),f!==d?(p=[p,f],l=p):(z=l,l=d)):(z=l,l=d);l!==d;)s.push(l),l=z,p=c(),p!==d?(t.substr(z,2)===T?(f=T,z+=2):(f=d,0===X&&i(E)),f!==d?(p=[p,f],l=p):(z=l,l=d)):(z=l,l=d);s!==d?(H=e,n=C(r,s),e=n):(z=e,e=d)}else z=e,e=d;else z=e,e=d;else z=e,e=d;else z=e,e=d;else z=e,e=d;return e===d&&(e=u()),e}function u(){var e,n,r,a,o,s;if(X++,e=z,n=[],(r=l())!==d)for(;r!==d;)n.push(r),r=l();else n=d;if(n!==d){for(r=[],a=z,o=c(),o!==d?(t.substr(z,2)===T?(s=T,z+=2):(s=d,0===X&&i(E)),s!==d?(o=[o,s],a=o):(z=a,a=d)):(z=a,a=d);a!==d;)r.push(a),a=z,o=c(),o!==d?(t.substr(z,2)===T?(s=T,z+=2):(s=d,0===X&&i(E)),s!==d?(o=[o,s],a=o):(z=a,a=d)):(z=a,a=d);r!==d?(H=e,n=w(n,r),e=n):(z=e,e=d)}else z=e,e=d;return X--,e===d&&(n=d,0===X&&i(N)),e}function c(){var e,n;for(X++,e=[],x.test(t.charAt(z))?(n=t.charAt(z),z++):(n=d,0===X&&i(R));n!==d;)e.push(n),x.test(t.charAt(z))?(n=t.charAt(z),z++):(n=d,0===X&&i(R));return X--,e===d&&(n=d,0===X&&i(k)),e}function l(){var e;return I.test(t.charAt(z))?(e=t.charAt(z),z++):(e=d,0===X&&i(D)),e===d&&(95===t.charCodeAt(z)?(e=M,z++):(e=d,0===X&&i(P)),e===d&&(45===t.charCodeAt(z)?(e=L,z++):(e=d,0===X&&i(O)),e===d&&(46===t.charCodeAt(z)?(e=U,z++):(e=d,0===X&&i(F)),e===d&&(B.test(t.charAt(z))?(e=t.charAt(z),z++):(e=d,0===X&&i(K)),e===d&&(V.test(t.charAt(z))?(e=t.charAt(z),z++):(e=d,0===X&&i(j)),e===d&&(63===t.charCodeAt(z)?(e=W,z++):(e=d,0===X&&i(q)))))))),e}var p,f=arguments.length>1?arguments[1]:{},d={},m={Term:o},h=o,y=\"|\",_={type:\"literal\",value:\"|\",description:'\"|\"'},g=function(e,t){return t?{type:\"union\",first:e,rest:t[3]}:e},v=\"(\",b={type:\"literal\",value:\"(\",description:'\"(\"'},S=\")\",A={type:\"literal\",value:\")\",description:'\")\"'},T=\"[]\",E={type:\"literal\",value:\"[]\",description:'\"[]\"'},C=function(e,t){return{type:\"parens\",expr:e,arr:t.length}},N={type:\"other\",description:\"name\"},w=function(e,t){return{type:\"name\",value:e.join(\"\"),arr:t.length}},k={type:\"other\",description:\"whitespace\"},x=/^[ \\t\\n\\r]/,R={type:\"class\",value:\"[ \\\\t\\\\n\\\\r]\",description:\"[ \\\\t\\\\n\\\\r]\"},I=/^[A-Z]/,D={type:\"class\",value:\"[A-Z]\",description:\"[A-Z]\"},M=\"_\",P={type:\"literal\",value:\"_\",description:'\"_\"'},L=\"-\",O={type:\"literal\",value:\"-\",description:'\"-\"'},U=\".\",F={type:\"literal\",value:\".\",description:'\".\"'},B=/^[a-z:#\\/]/,K={type:\"class\",value:\"[a-z]\",description:\"[a-z]\"},V=/^[0-9]/,j={type:\"class\",value:\"[0-9]\",description:\"[0-9]\"},W=\"?\",q={type:\"literal\",value:\"?\",description:'\"?\"'},z=0,H=0,Y=[{line:1,column:1,seenCR:!1}],J=0,G=[],X=0;if(\"startRule\"in f){if(!(f.startRule in m))throw new Error(\"Can't start parsing from rule \\\"\"+f.startRule+'\".');h=m[f.startRule]}if((p=h())!==d&&z===t.length)return p;throw p!==d&&z<t.length&&i({type:\"end\",description:\"end of input\"}),a(null,G,J<t.length?t.charAt(J):null,J<t.length?r(J,J+1):r(J,J))}return function(e,t){function n(){this.constructor=e}n.prototype=t.prototype,e.prototype=new n}(e,Error),{SyntaxError:e,parse:t}}();e.exports=r},function(e,t,n){\"use strict\";function r(e,t){o.visit(e,t)}function i(e){return o.serializeToString(e)}function a(e){return o.parse(e)}var o=n(151);t.visit=r,t.serializeToString=i,t.parse=a},function(e,t,n){\"use strict\";function r(e,t,n){return{originalPath:e,virtualIndex:t,patchedContent:n}}function i(e){if(!e)return\"\";var t=Object.keys(e)[0],n=e[t];if(\"#text\"==t)return n;if(!n&&\"\"!==n)return\"\";var r=\"<\"+t,a=n.$||{};return Object.keys(a).forEach(function(e){r=r+\" \"+e+'=\"'+a[e]+'\"'}),r+=\">\",\"string\"==typeof n?r+=n:Object.keys(n).forEach(function(e){if(\"$\"!==e)if(\"object\"!=typeof n[e]||n[e].length)if(\"string\"!=typeof n[e]&&n[e]){if(\"array\"==typeof n[e]||n[e].length)for(var t=n[e],a=0;a<t.length;a++){var o=t[a],s={};s[e]=o,r+=i(s)}}else{var s={};s[e]=n[e]||\"\",r+=i(s)}else{var s={};s[e]=n[e],r+=i(s)}}),r=r+\"</\"+t+\">\"}function a(e){return new c(e)}function o(e){var t=e&&Object.keys(e)[0];if(t){s(e[t])}return i(e)}function s(e){if(e&&\"string\"!=typeof e){var t=[];Object.keys(e).forEach(function(n){if(\"$\"!=n)if(0===n.indexOf(\"@\")){var r={key:n,value:e[n]};t.push(r)}else if(u(e[n])){var i=e[n];i.forEach(function(e){return s(e)})}else\"string\"!=typeof e[n]&&s(e[n])}),e.$||(e.$={});var n=e.$;t.forEach(function(t){delete e[t.key],n[t.key.substring(1)]=t.value})}}function u(e){return!!e&&(\"object\"==typeof e&&\"number\"==typeof e.length)}var c;try{c=n(172).XMLValidator}catch(e){}if(!c){c=function(){function e(e){}return e.prototype.validate=function(e,t){return[]},e}()}t.createXmlSchemaReference=r,t.getValidator=a,t.jsonToXml=o},function(e,t,n){\"use strict\";function r(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!0);for(var i=\"<\"+e,a=0;a<n;a++)i=\"    \"+i;return t&&Object.keys(t).length>0&&Object.keys(t).forEach(function(e){\"string\"==typeof t[e]&&(i=i+\" \"+e+'=\"'+t[e]+'\"')}),i=i+\">\"+(r?\"\\n\":\"\")}function i(e,t){void 0===t&&(t=0);for(var n=\"</\"+e,r=0;r<t&&r>-1;r++)n=\"    \"+n;var n=(t>-1?\"\\n\":\"\")+n+\">\\n\";return n}function a(e,t){t=d(t);var n=x(t),a=A(t),s=r(n,o(e,a)),u={};if(u[n]=e,t.isArray()){t.meta().filter(function(e){return e instanceof L.ComponentShouldBeOfType})[0];s+=l(u,t,1,!0)}else s+=c(e,a,1);var s=s+i(n);return s}function o(e,t){var n={};return P.filter(t,function(e){return R(e.value()).attribute}).forEach(function(t){var r=t.propId(),i=k(t);e[r]&&(n[i]=e[r].toString())}),n}function s(e,t,n){var a=Object.keys(e)[0],l=e[a],p=null;if(t.isScalar()){var f=A(t);p=r(a,o(l,f),n,!t.isScalar())+l.toString()}else{if(t.isUnion())return s(e,u(l,t),n);var f=A(t);p=r(a,o(l,f),n,!t.isScalar())+c(l,f,n+1)}return p+=i(a,t.isScalar()?-1:n)}function u(e,t){var n=t.typeFamily(),r=[],i=null;return n.forEach(function(t){var n=a(e,t);if(n){var i=p(n,t);if(i){var o=f(i);r.push({type:t,errors:o&&o.length||0})}}}),i=r.length>0?r[0]:{type:n[0]},r.forEach(function(e){e.errors<i.errors&&(i=e)}),i.type}function c(e,t,n){var r=P.filter(t,function(e){return!R(e.value()).attribute}),i=\"\";return r.forEach(function(t){var r=k(t),a=t.propId(),o={};o[r]=e[a],i+=t.value().isArray()?l(o,t.value(),n):e[a]||\"\"===e[a]?s(o,t.value(),n):\"\"}),i}function l(e,t,n,a){void 0===a&&(a=!1);var o=Object.keys(e)[0],u=e[o],c=R(t),l=a||c.wrapped,p=\"\",f=w(t),d=f&&f.name(),m=n;return l&&!a&&(p=r(o,null,n),m+=1),u&&D(u)&&u.forEach(function(e){var t={};t[l?d:o]=e,p+=s(t,f,m)}),l&&(p+=i(o,n)),p}function p(e,t){var n=null,r={};return r.explicitChildren=!1,r.explicitArray=!1,r.explicitRoot=h(t)||!t.isExternal(),M.parseString(e,r,function(e,t){if(n=t,e)throw new Error}),n=h(t)?n:_(n,d(t))}function f(e){var t=e[F];return delete e[F],t&&0!==t.length?t.map(function(e){return new U.Status(U.Status.ERROR,\"\",e,{})}):null}function d(e){return e&&m(e)&&e.superTypes()&&0!==e.superTypes().length?1===e.superTypes().length?e.superTypes()[0]:P.find(e.allSuperTypes(),function(e){return\"object\"===e.name()})||e:e}function m(e){return!!e&&!!P.find(B,function(t){return e.name()===t})}function h(e){return!!y(e)||!!P.find(e.allSuperTypes(),function(e){return y(e)})}function y(e){return!(!e.isExternal()||!e._content||\"string\"!=typeof e._content||0!==e._content.trim().indexOf(\"<\"))}function _(e,t){var n=Object.keys(e)[0],r=e[n],i=[],a=x(t);a!==n&&i.push('Unexpected root node \"'+n+'\", \"'+a+'\" is expected.');var o;if(t.isArray()){var s=[],u=[],c=t.meta().filter(function(e){return e instanceof L.ComponentShouldBeOfType})[0],l=c&&c.value().name();u.push(l),o=C(r,t,i,!0),S(r,i,s,u)}else o=b(r,t.isUnion()?v(r,t):t,i);return o[F]=i,o}function g(e,t){var n,r=[];n=b(e,t,r);var i=t.validateDirect(n,!0,!1).getErrors();return r.length+(i&&i.length)}function v(e,t){var n=[];if(t.typeFamily().forEach(function(t){return n.push({type:t,errors:g(JSON.parse(JSON.stringify(e)),t)})}),0===n.length)return t;var r=n[0];return n.forEach(function(e){e.errors<r.errors&&(r=e)}),r.type}function b(e,t,n){var r={};if(!t)return e;if(t.isScalar())return I(t,e,n);if(t.isUnion())return b(e,v(e,t),n);var i=A(t),a=[],o=[];return T(e,i,a).forEach(function(e){return r[Object.keys(e)[0]]=e[Object.keys(e)[0]]}),E(e,i,o,n).forEach(function(e){return r[Object.keys(e)[0]]=e[Object.keys(e)[0]]}),S(e,n,a,o),r}function S(e,t,n,r,i){if(void 0===i&&(i=!1),\"object\"==typeof e){e.$||(e.$={}),n.forEach(function(t){delete e.$[t]}),r.forEach(function(t){delete e[t]});var a=Object.keys(e.$);delete e.$;var o=Object.keys(e);a.forEach(function(e){t.push('Unexpected attribute \"'+e+'\".')}),o.forEach(function(n){t.push('Unexpected element \"'+n+'\".'),i&&delete e[n]})}}function A(e){return e.meta().filter(function(e){return e instanceof L.PropertyIs}).map(function(e){return e})||[]}function T(e,t,n){var r=e.$;return r?P.filter(t,function(e){return R(e.value()).attribute}).map(function(e){var t={},i=e.propId(),a=k(e);n.push(a);var o=r[a];return t[i]=I(e.value(),o),null===t[i]?null:t}).filter(function(e){return e}):[]}function E(e,t,n,r){return P.filter(t,function(e){return!R(e.value()).attribute}).map(function(t){var i={},a=(R(t.value()),t.propId()),o=k(t);n.push(o);var s=e[o];return t.value().isArray()?i[a]=C(e[o],t.value(),r):i[a]=s||\"\"===s?b(s,t.value(),r):null,null===i[a]?null:i}).filter(function(e){return e})}function C(e,t,n,r){void 0===r&&(r=!1);var i=R(t),a=r||i.wrapped,o=w(t),s=o&&o.name();if(a){var u=e;e=e&&e[s],S(u,n,[],[s],!0)}return e?(e=N(e),e=D(e)?e.map(function(e){return b(e,o,n)}):\"object\"==typeof e&&e||[]):[]}function N(e){return D(e)?e:\"object\"==typeof e?[e]:[]}function w(e){if(!e||!e.isArray())return null;var t=e.meta().filter(function(e){return e instanceof L.ComponentShouldBeOfType});return t&&t.length>0&&t[0].value()}function k(e){var t=R(e.value()),n=e.propId(),r=t.name||n;return t.namespace&&(r=t.namespace+\":\"+r),(t.prefix||\"\")+r}function x(e){var t=R(e),n=e.name();\"\"===n&&e.isUnion()&&(n=\"object\");var r=t.name||n;return(t.prefix||\"\")+r}function R(e){var t=e.meta().filter(function(e){return e instanceof O.XMLInfo}).map(function(e){return e})[0],n={attribute:!1,wrapped:!1,name:!1,namespace:!1,prefix:!1};if(!t)return n;var r=t.value();return r?(Object.keys(n).forEach(function(e){n[e]=r[e]||n[e]}),n):n}function I(e,t,n){if(void 0===n&&(n=[]),\"object\"==typeof t){var r=I(e,t._);return delete t._,S(t,n,[],[],!0),r}if(!t&&\"\"!==t.trim())return null;if(e.isNumber()){var i=parseFloat(t);if(!isNaN(i))return i}if(e.isBoolean()){if(\"true\"===t)return!0;if(\"false\"===t)return!1}return\"string\"==typeof t?t:null}function D(e){return!!e&&(\"object\"==typeof e&&\"number\"==typeof e.length)}var M=n(366),P=n(1),L=n(8),O=n(7),U=n(6),F=\"@unexpected_root_attributes_and_elements\",B=[\"application/x-www-form-urlencoded\",\"application/json\",\"application/xml\",\"multipart/form-data\"];t.serializeToXML=a,t.readObject=p,t.getXmlErrors=f},function(e,t){e.exports={12:{code:\"12\",message:\"\"},24:{code:\"24\",message:\"\"},25:{code:\"25\",message:\"\"},SCHEMA_AND_TYPE:{code:\"SCHEMA_AND_TYPE\",message:\"'schema' and 'type' are mutually exclusive\"},REQUIRED_OVERRIDE_OPTIONAL:{code:\"REQUIRED_OVERRIDE_OPTIONAL\",message:\"Can not override required property '{{propertyName}}' to be optional\"},CYCLIC_DEPENDENCY:{code:\"CYCLIC_DEPENDENCY\",message:\"'{{typeName}}' has cyclic dependency\"},REDEFINIG_BUILDTIN:{code:\"REDEFINIG_BUILDTIN\",message:\"Redefining a built in type: {{typeName}}\"},RECURRENT_DEFINITION:{code:\"RECURRENT_DEFINITION\",message:\"Recurrent type definition\"},INHERITING_UNKNOWN_TYPE:{code:\"INHERITING_UNKNOWN_TYPE\",message:\"Inheriting from unknown type\"},RECURRENT_UNION_OPTION:{code:\"RECURRENT_UNION_OPTION\",message:\"Recurrent type as an option of union type\"},UNKNOWN_UNION_OPTION:{code:\"UNKNOWN_UNION_OPTION\",message:\"Unknown type as an option of union type\"},RECURRENT_ARRAY_DEFINITION:{code:\"RECURRENT_ARRAY_DEFINITION\",message:\"Recurrent array type definition\"},UNKNOWN_ARRAY_COMPONENT:{code:\"UNKNOWN_ARRAY_COMPONENT\",message:\"Referring to unknown type '{{componentTypeName}}' as an array component type\"},EXTERNALS_MIX:{code:\"EXTERNALS_MIX\",message:\"It is not allowed to mix RAML types with externals\"},EXTERNAL_FACET:{code:\"EXTERNAL_FACET\",message:\"External types can not declare facet '{{name}}'\"},OVERRIDE_FACET:{code:\"OVERRIDE_FACET\",message:\"Facet '{{name}}' can not be overriden\"},OVERRIDE_BUILTIN_FACET:{code:\"OVERRIDE_BUILTIN_FACET\",message:\"Built in facet '{{name}}' can not be overriden\"},FACET_START_BRACKET:{code:\"FACET_START_BRACKET\",message:\"Facet '{{name}}' can not start from '('\"},FACET_PROHIBITED_FOR_EXTERNALS:{code:\"FACET_PROHIBITED_FOR_EXTERNALS\",message:\"'{{facetName}}' facet is prohibited for external types\"},UNKNOWN_FACET:{code:\"UNKNOWN_FACET\",message:\"Specifying unknown facet: '{{facetName}}'\"},MISSING_REQUIRED_FACETS:{code:\"MISSING_REQUIRED_FACETS\",message:\"Missing required facets: {{facetsList}}\"},OBJECT_EXPECTED:{code:\"OBJECT_EXPECTED\",message:\"object is expected\"},NULL_NOT_ALLOWED:{code:\"NULL_NOT_ALLOWED\",message:\"Null or undefined value is not allowed\"},DISCRIMINATOR_NEEDED:{code:\"DISCRIMINATOR_NEEDED\",message:\"Can not discriminate types '{{name1}}' and '{{name2}}' without discriminator\"},SAME_DISCRIMINATOR_VALUE:{code:\"SAME_DISCRIMINATOR_VALUE\",message:\"Types '{{name1}}' and '{{name2}}' have same discriminator value\"},NOTHING:{code:\"NOTHING\",message:\"nothing\"},TYPE_EXPECTED:{code:\"TYPE_EXPECTED\",message:\"{{typeName}} is expected\"},INTEGER_EXPECTED:{code:\"INTEGER_EXPECTED\",message:\"integer is expected\"},NULL_EXPECTED:{code:\"NULL_EXPECTED\",message:\"null is expected\"},SCALAR_EXPECTED:{code:\"SCALAR_EXPECTED\",message:\"scalar is expected\"},INCORRECT_DISCRIMINATOR:{code:\"INCORRECT_DISCRIMINATOR\",message:\"None of the '{{rootType}}' type known subtypes declare '{{value}}' as value of discriminating property '{{propName}}'.\"},MISSING_DISCRIMINATOR:{code:\"MISSING_DISCRIMINATOR\",message:\"Instance of '{{rootType}}' subtype misses value of the discriminating property '{{propName}}'.\"},INVALID_DATEONLY:{code:\"INVALID_DATEONLY\",message:\"'date-only' instance should match 'yyyy-mm-dd' pattern\"},INVALID_TIMEONLY:{code:\"INVALID_TIMEONLY\",message:\"'time-only' instance should match 'hh:mm:ss[.ff...]' pattern\"},INVALID_DATETIMEONLY:{code:\"INVALID_DATETIMEONLY\",message:\"'datetime-only' instance should match 'yyyy-mm-ddThh:mm:ss[.ff...]' pattern\"},INVALID_RFC3339:{code:\"INVALID_RFC3339\",message:\"Valid rfc3339 formatted string is expected\"},INVALID_RFC2616:{code:\"INVALID_RFC2616\",message:\"Valid rfc2616 formatted string is expected\"},INVALID_DATTIME:{code:\"INVALID_DATTIME\",message:\"Valid datetime formatted string is expected\"},UNKNOWN_ANNOTATION:{code:\"UNKNOWN_ANNOTATION\",message:\"Using unknown annotation type: '{{facetName}}'\"},INVALID_ANNOTATION_VALUE:{code:\"INVALID_ANNOTATION_VALUE\",message:\"Invalid annotation value {{msg}}\"},CAN_NOT_PARSE_JSON:{code:\"CAN_NOT_PARSE_JSON\",message:\"Can not parse JSON example: {{msg}}\"},INVALID_XML:{code:\"INVALID_XML\",message:\"Invalid XML.\"},STRICT_BOOLEAN:{code:\"STRICT_BOOLEAN\",message:\"'strict' should be boolean\"},DISPLAY_NAME_STRING:{code:\"DISPLAY_NAME_STRING\",message:\"'displayName' should be string\"},DESCRIPTION_STRING:{code:\"DESCRIPTION_STRING\",message:\"'description' should be string\"},INVALID_EXMAPLE:{code:\"INVALID_EXMAPLE\",message:\"Using invalid 'example': {{msg}}\"},ADDITIONAL_PROPERTIES_BOOLEAN:{code:\"REQUIRED_BOOLEAN\",message:\"Value of 'additionalProperties' facet should be boolean\"},REQUIRED_BOOLEAN:{code:\"REQUIRED_BOOLEAN\",message:\"Value of 'required' facet should be boolean\"},UNIQUE_ITEMS_BOOLEAN:{code:\"UNIQUE_ITEMS_BOOLEAN\",message:\"Value of 'uniqueItems' facet should be boolean\"},EXMAPLES_MAP:{code:\"EXMAPLES_MAP\",message:\"'examples' value should be a map\"},INVALID_DEFAULT_VALUE:{code:\"INVALID_DEFAULT_VALUE\",message:\"Using invalid 'defaultValue': {{msg}}\"},DISCRIMINATOR_FOR_UNION:{code:\"DISCRIMINATOR_FOR_UNION\",message:\"You can not specify 'discriminator' for union types\"},DISCRIMINATOR_FOR_OBJECT:{code:\"DISCRIMINATOR_FOR_OBJECT\",message:\"You only can use 'discriminator' with object types\"},DISCRIMINATOR_FOR_INLINE:{code:\"DISCRIMINATOR_FOR_INLINE\",message:\"You can not specify 'discriminator' for inline type declarations\"},UNKNOWN_FOR_DISCRIMINATOR:{code:\"UNKNOWN_FOR_DISCRIMINATOR\",message:\"Using unknown property '{{value}}' as discriminator\"},SCALAR_FOR_DISCRIMINATOR:{code:\"SCALAR_FOR_DISCRIMINATOR\",message:\"It is only allowed to use scalar properties as discriminators\"},DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR:{code:\"DISCRIMINATOR_VALUE_WITHOUT_DISCRIMINATOR\",message:\"You can not use 'discriminatorValue' without declaring 'discriminator'\"},INVALID_DISCRIMINATOR_VALUE:{code:\"INVALID_DISCRIMINATOR_VALUE\",message:\"Using invalid 'disciminatorValue': {{msg}}\"},PROPERTIES_MAP:{code:\"PROPERTIES_MAP\",message:\"'properties' should be a map\"},FACETS_MAP:{code:\"FACETS_MAP\",message:\"'facets' should be a map\"},VALIDATING_AGAINS_UNKNOWN:{code:\"VALIDATING_AGAINS_UNKNOWN\",message:\"Validating instance against unknown type: '{{typeName}}'\"},EXTERNAL_IN_PROPERTY_DEFINITION:{code:\"EXTERNAL_IN_PROPERTY_DEFINITION\",message:\"It is not allowed to use external types in property definitions\"},UNKNOWN_IN_PROPERTY_DEFINITION:{code:\"UNKNOWN_IN_PROPERTY_DEFINITION\",message:\"Property '{{propName}}' refers to unknown type '{{typeName}}'\"},ERROR_IN_RANGE:{code:\"ERROR_IN_RANGE\",message:\"Property '{{propName}}' range type has error: {{msg}}\"},INCORRECT_SCHEMA:{code:\"INCORRECT_SCHEMA\",message:\"Incorrect schema: {{msg}}\"},UNABLE_TO_VALIDATE_XML:{code:\"UNABLE_TO_VALIDATE_XML\",message:\"Unable to validate example against schema (xmllint)\"},CIRCULAR_REFS_IN_JSON_SCHEMA:{code:\"CIRCULAR_REFS_IN_JSON_SCHEMA\",message:\"JSON schema contains circular references\"},EXAMPLE_SCHEMA_FAILURE:{code:\"EXAMPLE_SCHEMA_FAILURE\",message:\"Example does not conform to schema: {{msg}}\"},JOSN_EXAMPLE_VALIDATION_EXCEPTION:{code:\"JOSN_EXAMPLE_VALIDATION_EXCEPTION\",message:\"Validating example against schema caused an exception: {{msg}}\"},UNKNOWN_PROPERTY:{code:\"UNKNOWN_PROPERTY\",message:\"Unknown property: '{{propName}}'\"},REQUIRED_PROPERTY_MISSING:{code:\"REQUIRED_PROPERTY_MISSING\",message:\"Required property '{{propName}}' is missing\"},INVALID_REGEXP:{code:\"INVALID_REGEXP\",message:\"{{msg}}\"},FACET_USAGE_RESTRICTION:{code:\"FACET_USAGE_RESTRICTION\",message:\"{{facetName}} facet can only be used with {{typeNames}} types\"},FACET_REQUIRE_NUMBER:{code:\"FACET_REQUIRE_NUMBER\",message:\"'{{facetName}}' value should be a number\"},FACET_REQUIRE_INTEGER:{code:\"FACET_REQUIRE_INTEGER\",message:\"'{{facetName}}' value should be an integer\"},MIN_VALUE:{code:\"MIN_VALUE\",message:\"'{{facetName}}' value should be at least {{minValue}}\"},EVEN_RATIO:{code:\"EVEN_RATIO\",message:\"result of division of {{val1}} on {{val2}} should be integer\"},MUST_BE_UNIQUE:{code:\"MUST_BE_UNIQUE\",message:\"items should be unique\"},ARRAY_AGAINST_UNKNOWN:{code:\"ARRAY_AGAINST_UNKNOWN\",message:\"Array instance is validated against unknown type: '{{typeName}}'\"},INVALID_COMPONENT_TYPE:{code:\"INVALID_COMPONENT_TYPE\",message:\"Component type has error: {{msg}}\"},EXTERNAL_AS_COMPONENT:{code:\"EXTERNAL_AS_COMPONENT\",message:\"It is not allowed to use external types in component type definitions\"},UNKNOWN_AS_COMPONENT:{code:\"UNKNOWN_AS_COMPONENT\",message:\"Component refers to unknown type {{typeName}}\"},PATTERN_VIOLATION:{code:\"PATTERN_VIOLATION\",message:\"String should match to '{{value}}'\"},ALLOWED_FORMAT_VALUES:{code:\"ALLOWED_FORMAT_VALUES\",message:\"Following format values are allowed: {{allowedValues}}\"},ENUM_RESTRICTION:{code:\"ENUM_RESTRICTION\",message:\"value should be one of: {{values}}\"},ENUM_OWNER_TYPES:{code:\"ENUM_OWNER_TYPES\",message:\"'enum' facet can only be used with: {{typeNames}}\"},ENUM_ARRAY:{code:\"ENUM_ARRAY\",message:\"'enum' facet value must be defined by array\"},RESTRICTIONS_CONFLICT:{code:\"RESTRICTIONS_CONFLICT\",message:null},MINMAX_RESTRICTION_VIOLATION:{code:\"MINMAX_RESTRICTION_VIOLATION\",message:null},UNION_TYPE_FAILURE:{code:\"UNION_TYPE_FAILURE\",message:\"Union type options do not pass validation\"},UNION_TYPE_FAILURE_DETAILS:{code:\"UNION_TYPE_FAILURE_DETAILS\",message:\"Union type option does not pass validation ({{msg}})\"},INVALID_JSON_SCHEMA_DETAILS:{code:\"INVALID_JSON_SCHEMA_DETAILS\",message:\"Invalid JSON schema: {{msg}}\"},INVALID_JSON_SCHEMA:{code:\"INVALID_JSON_SCHEMA\",message:\"Invalid JSON schema\"},JSON_SCHEMA_VALIDATION_EXCEPTION:{code:\"JSON_SCHEMA_VALIDATION_EXCEPTION\",message:\"Schema validation exception: {{msg}}\"},REFERENCE_NOT_FOUND:{code:\"REFERENCE_NOT_FOUND\",message:\"Reference not found: {{ref}}\"},INVALID_XML_SCHEMA:{code:\"INVALID_XML_SCHEMA\",message:\"Invalid XML schema content\"},INVALID_ANNOTATION_LOCATION:{code:\"INVALID_ANNOTATION_LOCATION\",message:\"Annotation '{{aName}}' can not be placed at this location, allowed targets are: {{aValues}}\"},CONTENT_DOES_NOT_MATCH_THE_SCHEMA:{code:\"CONTENT_DOES_NOT_MATCH_THE_SCHEMA\",message:\"Content is not valid according to schema: {{msg}}\"},EXTERNAL_TYPE_ERROR:{code:\"EXTERNAL_TYPE_ERROR\",message:\"Referenced type '{{typeName}}' does not match '{{objectName}}' root node\"},CAN_NOT_PARSE_SCHEMA:{code:\"CAN_NOT_PARSE_SCHEMA\",message:\"Can not parse schema\"},FILE_TYPES_SHOULD_BE_AN_ARRAY:{code:\"FILE_TYPES_SHOULD_BE_AN_ARRAY\",message:\"'fileTypes' value should be an array of strings\"},FACET_CAN_NOT_BE_FIXED_BY_THE_DECLARING_TYPE:{code:\"FACET_CAN_NOT_BE_FIXED_BY_THE_DECLARING_TYPE\",message:\"A facet  can not be fixed by the declaring type\"},ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE:{code:\"ITEMS_SHOULD_BE_REFERENCE_OR_INLINE_TYPE\",message:\"The 'items' property value should be either a reference to an existing type or an inline type declaration\"},VALUE_SHOULD_BE_POSITIVE:{code:\"VALUE_SHOULD_BE_POSITIVE\",message:\"Value of the '{{facetName}}' facet should be positive\"}}},function(e,t,n){e.exports=n(30)},function(e,t,n){\"use strict\";function r(){this.head=null,this.tail=null,this.length=0}var i=(n(16).Buffer,n(69));e.exports=r,r.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},r.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},r.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},r.prototype.clear=function(){this.head=this.tail=null,this.length=0},r.prototype.join=function(e){if(0===this.length)return\"\";for(var t=this.head,n=\"\"+t.data;t=t.next;)n+=e+t.data;return n},r.prototype.concat=function(e){if(0===this.length)return i.alloc(0);if(1===this.length)return this.head.data;for(var t=i.allocUnsafe(e>>>0),n=this.head,r=0;n;)n.data.copy(t,r),r+=n.data.length,n=n.next;return t}},function(e,t,n){e.exports=n(153)},function(e,t,n){e.exports=n(93)},function(e,t,n){e.exports=n(94)},function(e,t,n){(function(e){!function(t){function r(e,n){if(!(this instanceof r))return new r(e,n);var i=this;a(i),i.q=i.c=\"\",i.bufferCheckPosition=t.MAX_BUFFER_LENGTH,i.opt=n||{},i.opt.lowercase=i.opt.lowercase||i.opt.lowercasetags,i.looseCase=i.opt.lowercase?\"toLowerCase\":\"toUpperCase\",i.tags=[],i.closed=i.closedRoot=i.sawRoot=!1,i.tag=i.error=null,i.strict=!!e,i.noscript=!(!e&&!i.opt.noscript),i.state=z.BEGIN,i.strictEntities=i.opt.strictEntities,i.ENTITIES=i.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),i.attribList=[],i.opt.xmlns&&(i.ns=Object.create(K)),i.trackPosition=i.opt.position!==!1,i.trackPosition&&(i.position=i.line=i.column=0),m(i,\"onready\")}function i(e){for(var n=Math.max(t.MAX_BUFFER_LENGTH,10),r=0,i=0,a=R.length;i<a;i++){var o=e[R[i]].length;if(o>n)switch(R[i]){case\"textNode\":y(e);break;case\"cdata\":h(e,\"oncdata\",e.cdata),e.cdata=\"\";break;case\"script\":h(e,\"onscript\",e.script),e.script=\"\";break;default:g(e,\"Max buffer length exceeded: \"+R[i])}r=Math.max(r,o)}var s=t.MAX_BUFFER_LENGTH-r;e.bufferCheckPosition=s+e.position}function a(e){for(var t=0,n=R.length;t<n;t++)e[R[t]]=\"\"}function o(e){y(e),\"\"!==e.cdata&&(h(e,\"oncdata\",e.cdata),e.cdata=\"\"),\"\"!==e.script&&(h(e,\"onscript\",e.script),e.script=\"\")}function s(e,t){return new u(e,t)}function u(e,t){if(!(this instanceof u))return new u(e,t);I.apply(this),this._parser=new r(e,t),this.writable=!0,this.readable=!0;var n=this;this._parser.onend=function(){n.emit(\"end\")},this._parser.onerror=function(e){n.emit(\"error\",e),n._parser.error=null},this._decoder=null,D.forEach(function(e){Object.defineProperty(n,\"on\"+e,{get:function(){return n._parser[\"on\"+e]},set:function(t){if(!t)return n.removeAllListeners(e),n._parser[\"on\"+e]=t,t;n.on(e,t)},enumerable:!0,configurable:!1})})}function c(e){return e.split(\"\").reduce(function(e,t){return e[t]=!0,e},{})}function l(e,t){return e.test(t)}function p(e,t){return e[t]}function f(e,t){return!l(e,t)}function d(e,t){return!p(e,t)}function m(e,t,n){e[t]&&e[t](n)}function h(e,t,n){e.textNode&&y(e),m(e,t,n)}function y(e){e.textNode=_(e.opt,e.textNode),e.textNode&&m(e,\"ontext\",e.textNode),e.textNode=\"\"}function _(e,t){return e.trim&&(t=t.trim()),e.normalize&&(t=t.replace(/\\s+/g,\" \")),t}function g(e,t){return y(e),e.trackPosition&&(t+=\"\\nLine: \"+e.line+\"\\nColumn: \"+e.column+\"\\nChar: \"+e.c),t=new Error(t),e.error=t,m(e,\"onerror\",t),e}function v(e){return e.sawRoot&&!e.closedRoot&&b(e,\"Unclosed root tag\"),e.state!==z.BEGIN&&e.state!==z.BEGIN_WHITESPACE&&e.state!==z.TEXT&&g(e,\"Unexpected end\"),y(e),e.c=\"\",e.closed=!0,m(e,\"onend\"),r.call(e,e.strict,e.opt),e}function b(e,t){if(\"object\"!=typeof e||!(e instanceof r))throw new Error(\"bad call to strictFail\");e.strict&&g(e,t)}function S(e){e.strict||(e.tagName=e.tagName[e.looseCase]());var t=e.tags[e.tags.length-1]||e,n=e.tag={name:e.tagName,attributes:{}};e.opt.xmlns&&(n.ns=t.ns),e.attribList.length=0,h(e,\"onopentagstart\",n)}function A(e,t){var n=e.indexOf(\":\"),r=n<0?[\"\",e]:e.split(\":\"),i=r[0],a=r[1];return t&&\"xmlns\"===e&&(i=\"xmlns\",a=\"\"),{prefix:i,local:a}}function T(e){if(e.strict||(e.attribName=e.attribName[e.looseCase]()),e.attribList.indexOf(e.attribName)!==-1||e.tag.attributes.hasOwnProperty(e.attribName))return void(e.attribName=e.attribValue=\"\");if(e.opt.xmlns){var t=A(e.attribName,!0),n=t.prefix,r=t.local;if(\"xmlns\"===n)if(\"xml\"===r&&e.attribValue!==F)b(e,\"xml: prefix must be bound to \"+F+\"\\nActual: \"+e.attribValue);else if(\"xmlns\"===r&&e.attribValue!==B)b(e,\"xmlns: prefix must be bound to \"+B+\"\\nActual: \"+e.attribValue);else{var i=e.tag,a=e.tags[e.tags.length-1]||e;i.ns===a.ns&&(i.ns=Object.create(a.ns)),i.ns[r]=e.attribValue}e.attribList.push([e.attribName,e.attribValue])}else e.tag.attributes[e.attribName]=e.attribValue,h(e,\"onattribute\",{name:e.attribName,value:e.attribValue});e.attribName=e.attribValue=\"\"}function E(e,t){if(e.opt.xmlns){var n=e.tag,r=A(e.tagName);n.prefix=r.prefix,n.local=r.local,n.uri=n.ns[r.prefix]||\"\",n.prefix&&!n.uri&&(b(e,\"Unbound namespace prefix: \"+JSON.stringify(e.tagName)),n.uri=r.prefix);var i=e.tags[e.tags.length-1]||e;n.ns&&i.ns!==n.ns&&Object.keys(n.ns).forEach(function(t){h(e,\"onopennamespace\",{prefix:t,uri:n.ns[t]})});for(var a=0,o=e.attribList.length;a<o;a++){var s=e.attribList[a],u=s[0],c=s[1],l=A(u,!0),p=l.prefix,f=l.local,d=\"\"===p?\"\":n.ns[p]||\"\",m={name:u,value:c,prefix:p,local:f,uri:d};p&&\"xmlns\"!==p&&!d&&(b(e,\"Unbound namespace prefix: \"+JSON.stringify(p)),m.uri=p),e.tag.attributes[u]=m,h(e,\"onattribute\",m)}e.attribList.length=0}e.tag.isSelfClosing=!!t,e.sawRoot=!0,e.tags.push(e.tag),h(e,\"onopentag\",e.tag),t||(e.noscript||\"script\"!==e.tagName.toLowerCase()?e.state=z.TEXT:e.state=z.SCRIPT,e.tag=null,e.tagName=\"\"),e.attribName=e.attribValue=\"\",e.attribList.length=0}function C(e){if(!e.tagName)return b(e,\"Weird empty close tag.\"),e.textNode+=\"</>\",void(e.state=z.TEXT);if(e.script){if(\"script\"!==e.tagName)return e.script+=\"</\"+e.tagName+\">\",e.tagName=\"\",void(e.state=z.SCRIPT);h(e,\"onscript\",e.script),e.script=\"\"}var t=e.tags.length,n=e.tagName;e.strict||(n=n[e.looseCase]());for(var r=n;t--;){if(e.tags[t].name===r)break;b(e,\"Unexpected close tag\")}if(t<0)return b(e,\"Unmatched closing tag: \"+e.tagName),e.textNode+=\"</\"+e.tagName+\">\",void(e.state=z.TEXT);e.tagName=n;for(var i=e.tags.length;i-- >t;){var a=e.tag=e.tags.pop();e.tagName=e.tag.name,h(e,\"onclosetag\",e.tagName);var o={};for(var s in a.ns)o[s]=a.ns[s];var u=e.tags[e.tags.length-1]||e;e.opt.xmlns&&a.ns!==u.ns&&Object.keys(a.ns).forEach(function(t){h(e,\"onclosenamespace\",{prefix:t,uri:a.ns[t]})})}0===t&&(e.closedRoot=!0),e.tagName=e.attribValue=e.attribName=\"\",e.attribList.length=0,e.state=z.TEXT}function N(e){var t,n=e.entity,r=n.toLowerCase(),i=\"\";return e.ENTITIES[n]?e.ENTITIES[n]:e.ENTITIES[r]?e.ENTITIES[r]:(n=r,\"#\"===n.charAt(0)&&(\"x\"===n.charAt(1)?(n=n.slice(2),t=parseInt(n,16),i=t.toString(16)):(n=n.slice(1),t=parseInt(n,10),i=t.toString(10))),n=n.replace(/^0+/,\"\"),i.toLowerCase()!==n?(b(e,\"Invalid character entity\"),\"&\"+e.entity+\";\"):String.fromCodePoint(t))}function w(e,t){\"<\"===t?(e.state=z.OPEN_WAKA,e.startTagPosition=e.position):d(M,t)&&(b(e,\"Non-whitespace before first tag.\"),e.textNode=t,e.state=z.TEXT)}function k(e,t){var n=\"\";return t<e.length&&(n=e.charAt(t)),n}function x(e){var t=this;if(this.error)throw this.error;if(t.closed)return g(t,\"Cannot write after close. Assign an onready handler.\");if(null===e)return v(t);\"object\"==typeof e&&(e=e.toString());for(var n=0,r=\"\";;){if(r=k(e,n++),t.c=r,!r)break;switch(t.trackPosition&&(t.position++,\"\\n\"===r?(t.line++,t.column=0):t.column++),t.state){case z.BEGIN:if(t.state=z.BEGIN_WHITESPACE,\"\\ufeff\"===r)continue;w(t,r);continue;case z.BEGIN_WHITESPACE:w(t,r);continue;case z.TEXT:if(t.sawRoot&&!t.closedRoot){for(var a=n-1;r&&\"<\"!==r&&\"&\"!==r;)(r=k(e,n++))&&t.trackPosition&&(t.position++,\"\\n\"===r?(t.line++,t.column=0):t.column++);t.textNode+=e.substring(a,n-1)}\"<\"!==r||t.sawRoot&&t.closedRoot&&!t.strict?(!d(M,r)||t.sawRoot&&!t.closedRoot||b(t,\"Text data outside of root node.\"),\"&\"===r?t.state=z.TEXT_ENTITY:t.textNode+=r):(t.state=z.OPEN_WAKA,t.startTagPosition=t.position);continue;case z.SCRIPT:\"<\"===r?t.state=z.SCRIPT_ENDING:t.script+=r;continue;case z.SCRIPT_ENDING:\"/\"===r?t.state=z.CLOSE_TAG:(t.script+=\"<\"+r,t.state=z.SCRIPT);continue;case z.OPEN_WAKA:if(\"!\"===r)t.state=z.SGML_DECL,t.sgmlDecl=\"\";else if(p(M,r));else if(l(V,r))t.state=z.OPEN_TAG,t.tagName=r;else if(\"/\"===r)t.state=z.CLOSE_TAG,t.tagName=\"\";else if(\"?\"===r)t.state=z.PROC_INST,t.procInstName=t.procInstBody=\"\";else{if(b(t,\"Unencoded <\"),t.startTagPosition+1<t.position){var o=t.position-t.startTagPosition;r=new Array(o).join(\" \")+r}t.textNode+=\"<\"+r,t.state=z.TEXT}continue;case z.SGML_DECL:(t.sgmlDecl+r).toUpperCase()===O?(h(t,\"onopencdata\"),t.state=z.CDATA,t.sgmlDecl=\"\",t.cdata=\"\"):t.sgmlDecl+r===\"--\"?(t.state=z.COMMENT,t.comment=\"\",t.sgmlDecl=\"\"):(t.sgmlDecl+r).toUpperCase()===U?(t.state=z.DOCTYPE,(t.doctype||t.sawRoot)&&b(t,\"Inappropriately located doctype declaration\"),t.doctype=\"\",t.sgmlDecl=\"\"):\">\"===r?(h(t,\"onsgmldeclaration\",t.sgmlDecl),t.sgmlDecl=\"\",t.state=z.TEXT):p(P,r)?(t.state=z.SGML_DECL_QUOTED,t.sgmlDecl+=r):t.sgmlDecl+=r;continue;case z.SGML_DECL_QUOTED:r===t.q&&(t.state=z.SGML_DECL,t.q=\"\"),t.sgmlDecl+=r;continue;case z.DOCTYPE:\">\"===r?(t.state=z.TEXT,h(t,\"ondoctype\",t.doctype),t.doctype=!0):(t.doctype+=r,\"[\"===r?t.state=z.DOCTYPE_DTD:p(P,r)&&(t.state=z.DOCTYPE_QUOTED,t.q=r));continue;case z.DOCTYPE_QUOTED:t.doctype+=r,r===t.q&&(t.q=\"\",t.state=z.DOCTYPE);continue;case z.DOCTYPE_DTD:t.doctype+=r,\"]\"===r?t.state=z.DOCTYPE:p(P,r)&&(t.state=z.DOCTYPE_DTD_QUOTED,t.q=r);continue;case z.DOCTYPE_DTD_QUOTED:t.doctype+=r,r===t.q&&(t.state=z.DOCTYPE_DTD,t.q=\"\");continue;case z.COMMENT:\"-\"===r?t.state=z.COMMENT_ENDING:t.comment+=r;continue;case z.COMMENT_ENDING:\"-\"===r?(t.state=z.COMMENT_ENDED,t.comment=_(t.opt,t.comment),t.comment&&h(t,\"oncomment\",t.comment),t.comment=\"\"):(t.comment+=\"-\"+r,t.state=z.COMMENT);continue;case z.COMMENT_ENDED:\">\"!==r?(b(t,\"Malformed comment\"),t.comment+=\"--\"+r,t.state=z.COMMENT):t.state=z.TEXT;continue;case z.CDATA:\"]\"===r?t.state=z.CDATA_ENDING:t.cdata+=r;continue;case z.CDATA_ENDING:\"]\"===r?t.state=z.CDATA_ENDING_2:(t.cdata+=\"]\"+r,t.state=z.CDATA);continue;case z.CDATA_ENDING_2:\">\"===r?(t.cdata&&h(t,\"oncdata\",t.cdata),h(t,\"onclosecdata\"),t.cdata=\"\",t.state=z.TEXT):\"]\"===r?t.cdata+=\"]\":(t.cdata+=\"]]\"+r,t.state=z.CDATA);continue;case z.PROC_INST:\"?\"===r?t.state=z.PROC_INST_ENDING:p(M,r)?t.state=z.PROC_INST_BODY:t.procInstName+=r;continue;case z.PROC_INST_BODY:if(!t.procInstBody&&p(M,r))continue;\"?\"===r?t.state=z.PROC_INST_ENDING:t.procInstBody+=r;continue;case z.PROC_INST_ENDING:\">\"===r?(h(t,\"onprocessinginstruction\",{name:t.procInstName,body:t.procInstBody}),t.procInstName=t.procInstBody=\"\",t.state=z.TEXT):(t.procInstBody+=\"?\"+r,t.state=z.PROC_INST_BODY);continue;case z.OPEN_TAG:l(j,r)?t.tagName+=r:(S(t),\">\"===r?E(t):\"/\"===r?t.state=z.OPEN_TAG_SLASH:(d(M,r)&&b(t,\"Invalid character in tag name\"),t.state=z.ATTRIB));continue;case z.OPEN_TAG_SLASH:\">\"===r?(E(t,!0),C(t)):(b(t,\"Forward-slash in opening tag not followed by >\"),t.state=z.ATTRIB);continue;case z.ATTRIB:if(p(M,r))continue;\">\"===r?E(t):\"/\"===r?t.state=z.OPEN_TAG_SLASH:l(V,r)?(t.attribName=r,t.attribValue=\"\",t.state=z.ATTRIB_NAME):b(t,\"Invalid attribute name\");continue;case z.ATTRIB_NAME:\"=\"===r?t.state=z.ATTRIB_VALUE:\">\"===r?(b(t,\"Attribute without value\"),t.attribValue=t.attribName,T(t),E(t)):p(M,r)?t.state=z.ATTRIB_NAME_SAW_WHITE:l(j,r)?t.attribName+=r:b(t,\"Invalid attribute name\");continue;case z.ATTRIB_NAME_SAW_WHITE:if(\"=\"===r)t.state=z.ATTRIB_VALUE;else{if(p(M,r))continue;b(t,\"Attribute without value\"),t.tag.attributes[t.attribName]=\"\",t.attribValue=\"\",h(t,\"onattribute\",{name:t.attribName,value:\"\"}),t.attribName=\"\",\">\"===r?E(t):l(V,r)?(t.attribName=r,t.state=z.ATTRIB_NAME):(b(t,\"Invalid attribute name\"),t.state=z.ATTRIB)}continue;case z.ATTRIB_VALUE:if(p(M,r))continue;p(P,r)?(t.q=r,t.state=z.ATTRIB_VALUE_QUOTED):(b(t,\"Unquoted attribute value\"),t.state=z.ATTRIB_VALUE_UNQUOTED,t.attribValue=r);continue;case z.ATTRIB_VALUE_QUOTED:if(r!==t.q){\"&\"===r?t.state=z.ATTRIB_VALUE_ENTITY_Q:t.attribValue+=r;continue}T(t),t.q=\"\",t.state=z.ATTRIB_VALUE_CLOSED;continue;case z.ATTRIB_VALUE_CLOSED:p(M,r)?t.state=z.ATTRIB:\">\"===r?E(t):\"/\"===r?t.state=z.OPEN_TAG_SLASH:l(V,r)?(b(t,\"No whitespace between attributes\"),t.attribName=r,t.attribValue=\"\",t.state=z.ATTRIB_NAME):b(t,\"Invalid attribute name\");continue;case z.ATTRIB_VALUE_UNQUOTED:if(d(L,r)){\"&\"===r?t.state=z.ATTRIB_VALUE_ENTITY_U:t.attribValue+=r;continue}T(t),\">\"===r?E(t):t.state=z.ATTRIB;continue;case z.CLOSE_TAG:if(t.tagName)\">\"===r?C(t):l(j,r)?t.tagName+=r:t.script?(t.script+=\"</\"+t.tagName,t.tagName=\"\",t.state=z.SCRIPT):(d(M,r)&&b(t,\"Invalid tagname in closing tag\"),t.state=z.CLOSE_TAG_SAW_WHITE);else{if(p(M,r))continue;f(V,r)?t.script?(t.script+=\"</\"+r,t.state=z.SCRIPT):b(t,\"Invalid tagname in closing tag.\"):t.tagName=r}continue;case z.CLOSE_TAG_SAW_WHITE:if(p(M,r))continue;\">\"===r?C(t):b(t,\"Invalid characters in closing tag\");continue;case z.TEXT_ENTITY:case z.ATTRIB_VALUE_ENTITY_Q:case z.ATTRIB_VALUE_ENTITY_U:var s,u;switch(t.state){case z.TEXT_ENTITY:s=z.TEXT,u=\"textNode\";break;case z.ATTRIB_VALUE_ENTITY_Q:s=z.ATTRIB_VALUE_QUOTED,u=\"attribValue\";break;case z.ATTRIB_VALUE_ENTITY_U:s=z.ATTRIB_VALUE_UNQUOTED,u=\"attribValue\"}\";\"===r?(t[u]+=N(t),t.entity=\"\",t.state=s):l(t.entity.length?q:W,r)?t.entity+=r:(b(t,\"Invalid character in entity name\"),t[u]+=\"&\"+t.entity+r,t.entity=\"\",t.state=s);continue;default:throw new Error(t,\"Unknown state: \"+t.state)}}return t.position>=t.bufferCheckPosition&&i(t),t}t.parser=function(e,t){return new r(e,t)},t.SAXParser=r,t.SAXStream=u,t.createStream=s,t.MAX_BUFFER_LENGTH=65536;var R=[\"comment\",\"sgmlDecl\",\"textNode\",\"tagName\",\"doctype\",\"procInstName\",\"procInstBody\",\"entity\",\"attribName\",\"attribValue\",\"cdata\",\"script\"];t.EVENTS=[\"text\",\"processinginstruction\",\"sgmldeclaration\",\"doctype\",\"comment\",\"opentagstart\",\"attribute\",\"opentag\",\"closetag\",\"opencdata\",\"cdata\",\"closecdata\",\"error\",\"end\",\"ready\",\"script\",\"opennamespace\",\"closenamespace\"],Object.create||(Object.create=function(e){function t(){}return t.prototype=e,new t}),Object.keys||(Object.keys=function(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}),r.prototype={end:function(){v(this)},write:x,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){o(this)}};var I;try{I=n(66).Stream}catch(e){I=function(){}}var D=t.EVENTS.filter(function(e){return\"error\"!==e&&\"end\"!==e});u.prototype=Object.create(I.prototype,{constructor:{value:u}}),u.prototype.write=function(t){if(\"function\"==typeof e&&\"function\"==typeof e.isBuffer&&e.isBuffer(t)){if(!this._decoder){var r=n(95).StringDecoder;this._decoder=new r(\"utf8\")}t=this._decoder.write(t)}return this._parser.write(t.toString()),this.emit(\"data\",t),!0},u.prototype.end=function(e){return e&&e.length&&this.write(e),this._parser.end(),!0},u.prototype.on=function(e,t){var n=this;return n._parser[\"on\"+e]||D.indexOf(e)===-1||(n._parser[\"on\"+e]=function(){var t=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);t.splice(0,0,e),n.emit.apply(n,t)}),I.prototype.on.call(n,e,t)};var M=\"\\r\\n\\t \",P=\"'\\\"\",L=M+\">\",O=\"[CDATA[\",U=\"DOCTYPE\",F=\"http://www.w3.org/XML/1998/namespace\",B=\"http://www.w3.org/2000/xmlns/\",K={xml:F,xmlns:B};M=c(M);var V=/[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,j=/[:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/,W=/[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,q=/[#:_A-Za-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\u00B7\\u0300-\\u036F\\u203F-\\u2040.\\d-]/;P=c(P),L=c(L);var z=0;t.STATE={BEGIN:z++,BEGIN_WHITESPACE:z++,TEXT:z++,TEXT_ENTITY:z++,OPEN_WAKA:z++,SGML_DECL:z++,SGML_DECL_QUOTED:z++,DOCTYPE:z++,DOCTYPE_QUOTED:z++,DOCTYPE_DTD:z++,DOCTYPE_DTD_QUOTED:z++,COMMENT_STARTING:z++,COMMENT:z++,COMMENT_ENDING:z++,COMMENT_ENDED:z++,CDATA:z++,CDATA_ENDING:z++,CDATA_ENDING_2:z++,PROC_INST:z++,PROC_INST_BODY:z++,PROC_INST_ENDING:z++,OPEN_TAG:z++,OPEN_TAG_SLASH:z++,ATTRIB:z++,ATTRIB_NAME:z++,ATTRIB_NAME_SAW_WHITE:z++,ATTRIB_VALUE:z++,ATTRIB_VALUE_QUOTED:z++,ATTRIB_VALUE_CLOSED:z++,ATTRIB_VALUE_UNQUOTED:z++,ATTRIB_VALUE_ENTITY_Q:z++,ATTRIB_VALUE_ENTITY_U:z++,CLOSE_TAG:z++,CLOSE_TAG_SAW_WHITE:z++,SCRIPT:z++,SCRIPT_ENDING:z++},t.XML_ENTITIES={amp:\"&\",gt:\">\",lt:\"<\",quot:'\"',apos:\"'\"},t.ENTITIES={amp:\"&\",gt:\">\",lt:\"<\",quot:'\"',apos:\"'\",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(e){var n=t.ENTITIES[e],r=\"number\"==typeof n?String.fromCharCode(n):n;t.ENTITIES[e]=r});for(var H in t.STATE)t.STATE[t.STATE[H]]=H;z=t.STATE,/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */\nString.fromCodePoint||function(){var e=String.fromCharCode,t=Math.floor,n=function(){var n,r,i=[],a=-1,o=arguments.length;if(!o)return\"\";for(var s=\"\";++a<o;){var u=Number(arguments[a]);if(!isFinite(u)||u<0||u>1114111||t(u)!==u)throw RangeError(\"Invalid code point: \"+u);u<=65535?i.push(u):(u-=65536,n=55296+(u>>10),r=u%1024+56320,i.push(n,r)),(a+1===o||i.length>16384)&&(s+=e.apply(null,i),i.length=0)}return s};Object.defineProperty?Object.defineProperty(String,\"fromCodePoint\",{value:n,configurable:!0,writable:!0}):String.fromCodePoint=n}()}(t)}).call(t,n(16).Buffer)},function(e,t){e.exports=/([\\u0061-\\u007A\\u00B5\\u00DF-\\u00F6\\u00F8-\\u00FF\\u0101\\u0103\\u0105\\u0107\\u0109\\u010B\\u010D\\u010F\\u0111\\u0113\\u0115\\u0117\\u0119\\u011B\\u011D\\u011F\\u0121\\u0123\\u0125\\u0127\\u0129\\u012B\\u012D\\u012F\\u0131\\u0133\\u0135\\u0137\\u0138\\u013A\\u013C\\u013E\\u0140\\u0142\\u0144\\u0146\\u0148\\u0149\\u014B\\u014D\\u014F\\u0151\\u0153\\u0155\\u0157\\u0159\\u015B\\u015D\\u015F\\u0161\\u0163\\u0165\\u0167\\u0169\\u016B\\u016D\\u016F\\u0171\\u0173\\u0175\\u0177\\u017A\\u017C\\u017E-\\u0180\\u0183\\u0185\\u0188\\u018C\\u018D\\u0192\\u0195\\u0199-\\u019B\\u019E\\u01A1\\u01A3\\u01A5\\u01A8\\u01AA\\u01AB\\u01AD\\u01B0\\u01B4\\u01B6\\u01B9\\u01BA\\u01BD-\\u01BF\\u01C6\\u01C9\\u01CC\\u01CE\\u01D0\\u01D2\\u01D4\\u01D6\\u01D8\\u01DA\\u01DC\\u01DD\\u01DF\\u01E1\\u01E3\\u01E5\\u01E7\\u01E9\\u01EB\\u01ED\\u01EF\\u01F0\\u01F3\\u01F5\\u01F9\\u01FB\\u01FD\\u01FF\\u0201\\u0203\\u0205\\u0207\\u0209\\u020B\\u020D\\u020F\\u0211\\u0213\\u0215\\u0217\\u0219\\u021B\\u021D\\u021F\\u0221\\u0223\\u0225\\u0227\\u0229\\u022B\\u022D\\u022F\\u0231\\u0233-\\u0239\\u023C\\u023F\\u0240\\u0242\\u0247\\u0249\\u024B\\u024D\\u024F-\\u0293\\u0295-\\u02AF\\u0371\\u0373\\u0377\\u037B-\\u037D\\u0390\\u03AC-\\u03CE\\u03D0\\u03D1\\u03D5-\\u03D7\\u03D9\\u03DB\\u03DD\\u03DF\\u03E1\\u03E3\\u03E5\\u03E7\\u03E9\\u03EB\\u03ED\\u03EF-\\u03F3\\u03F5\\u03F8\\u03FB\\u03FC\\u0430-\\u045F\\u0461\\u0463\\u0465\\u0467\\u0469\\u046B\\u046D\\u046F\\u0471\\u0473\\u0475\\u0477\\u0479\\u047B\\u047D\\u047F\\u0481\\u048B\\u048D\\u048F\\u0491\\u0493\\u0495\\u0497\\u0499\\u049B\\u049D\\u049F\\u04A1\\u04A3\\u04A5\\u04A7\\u04A9\\u04AB\\u04AD\\u04AF\\u04B1\\u04B3\\u04B5\\u04B7\\u04B9\\u04BB\\u04BD\\u04BF\\u04C2\\u04C4\\u04C6\\u04C8\\u04CA\\u04CC\\u04CE\\u04CF\\u04D1\\u04D3\\u04D5\\u04D7\\u04D9\\u04DB\\u04DD\\u04DF\\u04E1\\u04E3\\u04E5\\u04E7\\u04E9\\u04EB\\u04ED\\u04EF\\u04F1\\u04F3\\u04F5\\u04F7\\u04F9\\u04FB\\u04FD\\u04FF\\u0501\\u0503\\u0505\\u0507\\u0509\\u050B\\u050D\\u050F\\u0511\\u0513\\u0515\\u0517\\u0519\\u051B\\u051D\\u051F\\u0521\\u0523\\u0525\\u0527\\u0561-\\u0587\\u1D00-\\u1D2B\\u1D6B-\\u1D77\\u1D79-\\u1D9A\\u1E01\\u1E03\\u1E05\\u1E07\\u1E09\\u1E0B\\u1E0D\\u1E0F\\u1E11\\u1E13\\u1E15\\u1E17\\u1E19\\u1E1B\\u1E1D\\u1E1F\\u1E21\\u1E23\\u1E25\\u1E27\\u1E29\\u1E2B\\u1E2D\\u1E2F\\u1E31\\u1E33\\u1E35\\u1E37\\u1E39\\u1E3B\\u1E3D\\u1E3F\\u1E41\\u1E43\\u1E45\\u1E47\\u1E49\\u1E4B\\u1E4D\\u1E4F\\u1E51\\u1E53\\u1E55\\u1E57\\u1E59\\u1E5B\\u1E5D\\u1E5F\\u1E61\\u1E63\\u1E65\\u1E67\\u1E69\\u1E6B\\u1E6D\\u1E6F\\u1E71\\u1E73\\u1E75\\u1E77\\u1E79\\u1E7B\\u1E7D\\u1E7F\\u1E81\\u1E83\\u1E85\\u1E87\\u1E89\\u1E8B\\u1E8D\\u1E8F\\u1E91\\u1E93\\u1E95-\\u1E9D\\u1E9F\\u1EA1\\u1EA3\\u1EA5\\u1EA7\\u1EA9\\u1EAB\\u1EAD\\u1EAF\\u1EB1\\u1EB3\\u1EB5\\u1EB7\\u1EB9\\u1EBB\\u1EBD\\u1EBF\\u1EC1\\u1EC3\\u1EC5\\u1EC7\\u1EC9\\u1ECB\\u1ECD\\u1ECF\\u1ED1\\u1ED3\\u1ED5\\u1ED7\\u1ED9\\u1EDB\\u1EDD\\u1EDF\\u1EE1\\u1EE3\\u1EE5\\u1EE7\\u1EE9\\u1EEB\\u1EED\\u1EEF\\u1EF1\\u1EF3\\u1EF5\\u1EF7\\u1EF9\\u1EFB\\u1EFD\\u1EFF-\\u1F07\\u1F10-\\u1F15\\u1F20-\\u1F27\\u1F30-\\u1F37\\u1F40-\\u1F45\\u1F50-\\u1F57\\u1F60-\\u1F67\\u1F70-\\u1F7D\\u1F80-\\u1F87\\u1F90-\\u1F97\\u1FA0-\\u1FA7\\u1FB0-\\u1FB4\\u1FB6\\u1FB7\\u1FBE\\u1FC2-\\u1FC4\\u1FC6\\u1FC7\\u1FD0-\\u1FD3\\u1FD6\\u1FD7\\u1FE0-\\u1FE7\\u1FF2-\\u1FF4\\u1FF6\\u1FF7\\u210A\\u210E\\u210F\\u2113\\u212F\\u2134\\u2139\\u213C\\u213D\\u2146-\\u2149\\u214E\\u2184\\u2C30-\\u2C5E\\u2C61\\u2C65\\u2C66\\u2C68\\u2C6A\\u2C6C\\u2C71\\u2C73\\u2C74\\u2C76-\\u2C7B\\u2C81\\u2C83\\u2C85\\u2C87\\u2C89\\u2C8B\\u2C8D\\u2C8F\\u2C91\\u2C93\\u2C95\\u2C97\\u2C99\\u2C9B\\u2C9D\\u2C9F\\u2CA1\\u2CA3\\u2CA5\\u2CA7\\u2CA9\\u2CAB\\u2CAD\\u2CAF\\u2CB1\\u2CB3\\u2CB5\\u2CB7\\u2CB9\\u2CBB\\u2CBD\\u2CBF\\u2CC1\\u2CC3\\u2CC5\\u2CC7\\u2CC9\\u2CCB\\u2CCD\\u2CCF\\u2CD1\\u2CD3\\u2CD5\\u2CD7\\u2CD9\\u2CDB\\u2CDD\\u2CDF\\u2CE1\\u2CE3\\u2CE4\\u2CEC\\u2CEE\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\uA641\\uA643\\uA645\\uA647\\uA649\\uA64B\\uA64D\\uA64F\\uA651\\uA653\\uA655\\uA657\\uA659\\uA65B\\uA65D\\uA65F\\uA661\\uA663\\uA665\\uA667\\uA669\\uA66B\\uA66D\\uA681\\uA683\\uA685\\uA687\\uA689\\uA68B\\uA68D\\uA68F\\uA691\\uA693\\uA695\\uA697\\uA723\\uA725\\uA727\\uA729\\uA72B\\uA72D\\uA72F-\\uA731\\uA733\\uA735\\uA737\\uA739\\uA73B\\uA73D\\uA73F\\uA741\\uA743\\uA745\\uA747\\uA749\\uA74B\\uA74D\\uA74F\\uA751\\uA753\\uA755\\uA757\\uA759\\uA75B\\uA75D\\uA75F\\uA761\\uA763\\uA765\\uA767\\uA769\\uA76B\\uA76D\\uA76F\\uA771-\\uA778\\uA77A\\uA77C\\uA77F\\uA781\\uA783\\uA785\\uA787\\uA78C\\uA78E\\uA791\\uA793\\uA7A1\\uA7A3\\uA7A5\\uA7A7\\uA7A9\\uA7FA\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF41-\\uFF5A])([\\u0041-\\u005A\\u00C0-\\u00D6\\u00D8-\\u00DE\\u0100\\u0102\\u0104\\u0106\\u0108\\u010A\\u010C\\u010E\\u0110\\u0112\\u0114\\u0116\\u0118\\u011A\\u011C\\u011E\\u0120\\u0122\\u0124\\u0126\\u0128\\u012A\\u012C\\u012E\\u0130\\u0132\\u0134\\u0136\\u0139\\u013B\\u013D\\u013F\\u0141\\u0143\\u0145\\u0147\\u014A\\u014C\\u014E\\u0150\\u0152\\u0154\\u0156\\u0158\\u015A\\u015C\\u015E\\u0160\\u0162\\u0164\\u0166\\u0168\\u016A\\u016C\\u016E\\u0170\\u0172\\u0174\\u0176\\u0178\\u0179\\u017B\\u017D\\u0181\\u0182\\u0184\\u0186\\u0187\\u0189-\\u018B\\u018E-\\u0191\\u0193\\u0194\\u0196-\\u0198\\u019C\\u019D\\u019F\\u01A0\\u01A2\\u01A4\\u01A6\\u01A7\\u01A9\\u01AC\\u01AE\\u01AF\\u01B1-\\u01B3\\u01B5\\u01B7\\u01B8\\u01BC\\u01C4\\u01C7\\u01CA\\u01CD\\u01CF\\u01D1\\u01D3\\u01D5\\u01D7\\u01D9\\u01DB\\u01DE\\u01E0\\u01E2\\u01E4\\u01E6\\u01E8\\u01EA\\u01EC\\u01EE\\u01F1\\u01F4\\u01F6-\\u01F8\\u01FA\\u01FC\\u01FE\\u0200\\u0202\\u0204\\u0206\\u0208\\u020A\\u020C\\u020E\\u0210\\u0212\\u0214\\u0216\\u0218\\u021A\\u021C\\u021E\\u0220\\u0222\\u0224\\u0226\\u0228\\u022A\\u022C\\u022E\\u0230\\u0232\\u023A\\u023B\\u023D\\u023E\\u0241\\u0243-\\u0246\\u0248\\u024A\\u024C\\u024E\\u0370\\u0372\\u0376\\u0386\\u0388-\\u038A\\u038C\\u038E\\u038F\\u0391-\\u03A1\\u03A3-\\u03AB\\u03CF\\u03D2-\\u03D4\\u03D8\\u03DA\\u03DC\\u03DE\\u03E0\\u03E2\\u03E4\\u03E6\\u03E8\\u03EA\\u03EC\\u03EE\\u03F4\\u03F7\\u03F9\\u03FA\\u03FD-\\u042F\\u0460\\u0462\\u0464\\u0466\\u0468\\u046A\\u046C\\u046E\\u0470\\u0472\\u0474\\u0476\\u0478\\u047A\\u047C\\u047E\\u0480\\u048A\\u048C\\u048E\\u0490\\u0492\\u0494\\u0496\\u0498\\u049A\\u049C\\u049E\\u04A0\\u04A2\\u04A4\\u04A6\\u04A8\\u04AA\\u04AC\\u04AE\\u04B0\\u04B2\\u04B4\\u04B6\\u04B8\\u04BA\\u04BC\\u04BE\\u04C0\\u04C1\\u04C3\\u04C5\\u04C7\\u04C9\\u04CB\\u04CD\\u04D0\\u04D2\\u04D4\\u04D6\\u04D8\\u04DA\\u04DC\\u04DE\\u04E0\\u04E2\\u04E4\\u04E6\\u04E8\\u04EA\\u04EC\\u04EE\\u04F0\\u04F2\\u04F4\\u04F6\\u04F8\\u04FA\\u04FC\\u04FE\\u0500\\u0502\\u0504\\u0506\\u0508\\u050A\\u050C\\u050E\\u0510\\u0512\\u0514\\u0516\\u0518\\u051A\\u051C\\u051E\\u0520\\u0522\\u0524\\u0526\\u0531-\\u0556\\u10A0-\\u10C5\\u10C7\\u10CD\\u1E00\\u1E02\\u1E04\\u1E06\\u1E08\\u1E0A\\u1E0C\\u1E0E\\u1E10\\u1E12\\u1E14\\u1E16\\u1E18\\u1E1A\\u1E1C\\u1E1E\\u1E20\\u1E22\\u1E24\\u1E26\\u1E28\\u1E2A\\u1E2C\\u1E2E\\u1E30\\u1E32\\u1E34\\u1E36\\u1E38\\u1E3A\\u1E3C\\u1E3E\\u1E40\\u1E42\\u1E44\\u1E46\\u1E48\\u1E4A\\u1E4C\\u1E4E\\u1E50\\u1E52\\u1E54\\u1E56\\u1E58\\u1E5A\\u1E5C\\u1E5E\\u1E60\\u1E62\\u1E64\\u1E66\\u1E68\\u1E6A\\u1E6C\\u1E6E\\u1E70\\u1E72\\u1E74\\u1E76\\u1E78\\u1E7A\\u1E7C\\u1E7E\\u1E80\\u1E82\\u1E84\\u1E86\\u1E88\\u1E8A\\u1E8C\\u1E8E\\u1E90\\u1E92\\u1E94\\u1E9E\\u1EA0\\u1EA2\\u1EA4\\u1EA6\\u1EA8\\u1EAA\\u1EAC\\u1EAE\\u1EB0\\u1EB2\\u1EB4\\u1EB6\\u1EB8\\u1EBA\\u1EBC\\u1EBE\\u1EC0\\u1EC2\\u1EC4\\u1EC6\\u1EC8\\u1ECA\\u1ECC\\u1ECE\\u1ED0\\u1ED2\\u1ED4\\u1ED6\\u1ED8\\u1EDA\\u1EDC\\u1EDE\\u1EE0\\u1EE2\\u1EE4\\u1EE6\\u1EE8\\u1EEA\\u1EEC\\u1EEE\\u1EF0\\u1EF2\\u1EF4\\u1EF6\\u1EF8\\u1EFA\\u1EFC\\u1EFE\\u1F08-\\u1F0F\\u1F18-\\u1F1D\\u1F28-\\u1F2F\\u1F38-\\u1F3F\\u1F48-\\u1F4D\\u1F59\\u1F5B\\u1F5D\\u1F5F\\u1F68-\\u1F6F\\u1FB8-\\u1FBB\\u1FC8-\\u1FCB\\u1FD8-\\u1FDB\\u1FE8-\\u1FEC\\u1FF8-\\u1FFB\\u2102\\u2107\\u210B-\\u210D\\u2110-\\u2112\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u2130-\\u2133\\u213E\\u213F\\u2145\\u2183\\u2C00-\\u2C2E\\u2C60\\u2C62-\\u2C64\\u2C67\\u2C69\\u2C6B\\u2C6D-\\u2C70\\u2C72\\u2C75\\u2C7E-\\u2C80\\u2C82\\u2C84\\u2C86\\u2C88\\u2C8A\\u2C8C\\u2C8E\\u2C90\\u2C92\\u2C94\\u2C96\\u2C98\\u2C9A\\u2C9C\\u2C9E\\u2CA0\\u2CA2\\u2CA4\\u2CA6\\u2CA8\\u2CAA\\u2CAC\\u2CAE\\u2CB0\\u2CB2\\u2CB4\\u2CB6\\u2CB8\\u2CBA\\u2CBC\\u2CBE\\u2CC0\\u2CC2\\u2CC4\\u2CC6\\u2CC8\\u2CCA\\u2CCC\\u2CCE\\u2CD0\\u2CD2\\u2CD4\\u2CD6\\u2CD8\\u2CDA\\u2CDC\\u2CDE\\u2CE0\\u2CE2\\u2CEB\\u2CED\\u2CF2\\uA640\\uA642\\uA644\\uA646\\uA648\\uA64A\\uA64C\\uA64E\\uA650\\uA652\\uA654\\uA656\\uA658\\uA65A\\uA65C\\uA65E\\uA660\\uA662\\uA664\\uA666\\uA668\\uA66A\\uA66C\\uA680\\uA682\\uA684\\uA686\\uA688\\uA68A\\uA68C\\uA68E\\uA690\\uA692\\uA694\\uA696\\uA722\\uA724\\uA726\\uA728\\uA72A\\uA72C\\uA72E\\uA732\\uA734\\uA736\\uA738\\uA73A\\uA73C\\uA73E\\uA740\\uA742\\uA744\\uA746\\uA748\\uA74A\\uA74C\\uA74E\\uA750\\uA752\\uA754\\uA756\\uA758\\uA75A\\uA75C\\uA75E\\uA760\\uA762\\uA764\\uA766\\uA768\\uA76A\\uA76C\\uA76E\\uA779\\uA77B\\uA77D\\uA77E\\uA780\\uA782\\uA784\\uA786\\uA78B\\uA78D\\uA790\\uA792\\uA7A0\\uA7A2\\uA7A4\\uA7A6\\uA7A8\\uA7AA\\uFF21-\\uFF3A\\u0030-\\u0039\\u00B2\\u00B3\\u00B9\\u00BC-\\u00BE\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u09F4-\\u09F9\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0B72-\\u0B77\\u0BE6-\\u0BF2\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0CE6-\\u0CEF\\u0D66-\\u0D75\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F33\\u1040-\\u1049\\u1090-\\u1099\\u1369-\\u137C\\u16EE-\\u16F0\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19DA\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u2182\\u2185-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA620-\\uA629\\uA6E6-\\uA6EF\\uA830-\\uA835\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19])/g},function(e,t){e.exports=/[^\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u0030-\\u0039\\u00B2\\u00B3\\u00B9\\u00BC-\\u00BE\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u09F4-\\u09F9\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0B72-\\u0B77\\u0BE6-\\u0BF2\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0CE6-\\u0CEF\\u0D66-\\u0D75\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F33\\u1040-\\u1049\\u1090-\\u1099\\u1369-\\u137C\\u16EE-\\u16F0\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19DA\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u2182\\u2185-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA620-\\uA629\\uA6E6-\\uA6EF\\uA830-\\uA835\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]+/g},function(e,t){e.exports=/([\\u0030-\\u0039\\u00B2\\u00B3\\u00B9\\u00BC-\\u00BE\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u09F4-\\u09F9\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0B72-\\u0B77\\u0BE6-\\u0BF2\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0CE6-\\u0CEF\\u0D66-\\u0D75\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F33\\u1040-\\u1049\\u1090-\\u1099\\u1369-\\u137C\\u16EE-\\u16F0\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19DA\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u2182\\u2185-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA620-\\uA629\\uA6E6-\\uA6EF\\uA830-\\uA835\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19])([^\\u0030-\\u0039\\u00B2\\u00B3\\u00B9\\u00BC-\\u00BE\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u09F4-\\u09F9\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0B72-\\u0B77\\u0BE6-\\u0BF2\\u0C66-\\u0C6F\\u0C78-\\u0C7E\\u0CE6-\\u0CEF\\u0D66-\\u0D75\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F33\\u1040-\\u1049\\u1090-\\u1099\\u1369-\\u137C\\u16EE-\\u16F0\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19DA\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2150-\\u2182\\u2185-\\u2189\\u2460-\\u249B\\u24EA-\\u24FF\\u2776-\\u2793\\u2CFD\\u3007\\u3021-\\u3029\\u3038-\\u303A\\u3192-\\u3195\\u3220-\\u3229\\u3248-\\u324F\\u3251-\\u325F\\u3280-\\u3289\\u32B1-\\u32BF\\uA620-\\uA629\\uA6E6-\\uA6EF\\uA830-\\uA835\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19])/g},function(e,t,n){(function(e,t){!function(e,n){\"use strict\";function r(e){\"function\"!=typeof e&&(e=new Function(\"\"+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var r={callback:e,args:t};return c[u]=r,s(u),u++}function i(e){delete c[e]}function a(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}function o(e){if(l)setTimeout(o,0,e);else{var t=c[e];if(t){l=!0;try{a(t)}finally{i(e),l=!1}}}}if(!e.setImmediate){var s,u=1,c={},l=!1,p=e.document,f=Object.getPrototypeOf&&Object.getPrototypeOf(e);f=f&&f.setTimeout?f:e,\"[object process]\"==={}.toString.call(e.process)?function(){s=function(e){t.nextTick(function(){o(e)})}}():function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage(\"\",\"*\"),e.onmessage=n,t}}()?function(){var t=\"setImmediate$\"+Math.random()+\"$\",n=function(n){n.source===e&&\"string\"==typeof n.data&&0===n.data.indexOf(t)&&o(+n.data.slice(t.length))};e.addEventListener?e.addEventListener(\"message\",n,!1):e.attachEvent(\"onmessage\",n),s=function(n){e.postMessage(t+n,\"*\")}}():e.MessageChannel?function(){var e=new MessageChannel;e.port1.onmessage=function(e){o(e.data)},s=function(t){e.port2.postMessage(t)}}():p&&\"onreadystatechange\"in p.createElement(\"script\")?function(){var e=p.documentElement;s=function(t){var n=p.createElement(\"script\");n.onreadystatechange=function(){o(t),n.onreadystatechange=null,e.removeChild(n),n=null},e.appendChild(n)}}():function(){s=function(e){setTimeout(o,0,e)}}(),f.setImmediate=r,f.clearImmediate=i}}(\"undefined\"==typeof self?void 0===e?this:e:self)}).call(t,n(13),n(23))},function(e,t,n){var r=n(32),i=n(45);e.exports=function(e,t){if(null==e)return\"\";for(var n=\"\",a=0;a<e.length;a++){var o=e[a],s=r(o,t);n+=s===o?i(o,t):s}return n}},function(e,t,n){\"use strict\";function r(e,t,n,s){var u=new i(function(i,u){function c(a){r(e,t,{qs:n.qs,headers:n.headers,timeout:n.timeout}).nodeify(function(e,t){var r=e||t.statusCode>=400;if(\"function\"==typeof n.retry&&(r=n.retry(e,t,a+1)),a>=(5|n.maxRetries)&&(r=!1),r){var o=n.retryDelay;\"function\"==typeof n.retryDelay&&(o=n.retryDelay(e,t,a+1)),o=o||200,setTimeout(function(){c(a+1)},o)}else e?u(e):i(t)})}var l=new window.XMLHttpRequest;if(\"string\"!=typeof e)throw new TypeError(\"The method must be a string.\");if(\"string\"!=typeof t)throw new TypeError(\"The URL/path must be a string.\");if(\"function\"==typeof n&&(s=n,n={}),null!==n&&void 0!==n||(n={}),\"object\"!=typeof n)throw new TypeError(\"Options must be an object (or null).\");if(\"function\"!=typeof s&&(s=void 0),e=e.toUpperCase(),n.headers=n.headers||{},n.retry&&\"GET\"===e)return c(0);var p;if(!(!(p=/^([\\w-]+:)?\\/\\/([^\\/]+)/.exec(t))||p[2]==window.location.host)||(n.headers[\"X-Requested-With\"]=\"XMLHttpRequest\"),n.qs&&(t=o(t,n.qs)),n.json&&(n.body=JSON.stringify(n.json),n.headers[\"Content-Type\"]=\"application/json\"),n.timeout){l.timeout=n.timeout;var f=Date.now();l.ontimeout=function(){var e=Date.now()-f,t=new Error(\"Request timed out after \"+e+\"ms\");t.timeout=!0,t.duration=e,u(t)}}l.onreadystatechange=function(){if(4===l.readyState){var e={};l.getAllResponseHeaders().split(\"\\r\\n\").forEach(function(t){var n=t.split(\":\");n.length>1&&(e[n[0].toLowerCase()]=n.slice(1).join(\":\").trim())});var n=new a(l.status,e,l.responseText);n.url=t,i(n)}},l.open(e,t,!0);for(var d in n.headers)l.setRequestHeader(d,n.headers[d]);l.send(n.body?n.body:null)});return u.getBody=function(){return u.then(function(e){return e.getBody()})},u.nodeify(s)}var i=n(296),a=n(116),o=n(357);e.exports=r},function(e,t,n){\"use strict\";function r(e,t){e=e.split(\"?\");var n=e[0],r=(e[1]||\"\").split(\"#\")[0],o=e[1]&&e[1].split(\"#\").length>1?\"#\"+e[1].split(\"#\")[1]:\"\",s=i(r);for(var u in t)s[u]=t[u];return r=a(s),\"\"!==r&&(r=\"?\"+r),n+r+o}var i=n(137).parse,a=n(137).stringify;e.exports=r},function(e,t,n){var r=n(32),i=n(31);e.exports=function(e,t){return i(e,t).replace(/^.| ./g,function(e){return r(e,t)})}},function(e,t,n){\"use strict\";function r(e,t){return s.resolve(e,t)}function i(e){return u.readFileSync(e).toString()}function a(e){return s.dirname(e)}function o(e){return u.existsSync(e)}var s=n(11),u=n(47);t.resolve=r,t.readFileSync=i,t.dirname=a,t.existsSync=o},function(e,t){function n(e){if(O&&C){var t,n=O(e);for(t=0;t<n.length;t+=1)C(e,n[t],{value:e[n[t]],writable:!1,enumerable:!1,configurable:!1})}}function r(e){if(C){if(e.length>w)throw new RangeError(\"Array too large for polyfill\");var t;for(t=0;t<e.length;t+=1)!function(t){C(e,t,{get:function(){return e._getter(t)},set:function(n){e._setter(t,n)},enumerable:!0,configurable:!1})}(t)}}function i(e,t){var n=32-t;return e<<n>>n}function a(e,t){var n=32-t;return e<<n>>>n}function o(e){return[255&e]}function s(e){return i(e[0],8)}function u(e){return[255&e]}function c(e){return a(e[0],8)}function l(e){return e=L(Number(e)),[e<0?0:e>255?255:255&e]}function p(e){return[e>>8&255,255&e]}function f(e){return i(e[0]<<8|e[1],16)}function d(e){return[e>>8&255,255&e]}function m(e){return a(e[0]<<8|e[1],16)}function h(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function y(e){return i(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function _(e){return[e>>24&255,e>>16&255,e>>8&255,255&e]}function g(e){return a(e[0]<<24|e[1]<<16|e[2]<<8|e[3],32)}function v(e,t,n){function r(e){var t=I(e),n=e-t;return n<.5?t:n>.5?t+1:t%2?t+1:t}var i,a,o,s,u,c,l,p=(1<<t-1)-1;for(e!==e?(a=(1<<t)-1,o=P(2,n-1),i=0):e===1/0||e===-(1/0)?(a=(1<<t)-1,o=0,i=e<0?1:0):0===e?(a=0,o=0,i=1/e==-(1/0)?1:0):(i=e<0,e=R(e),e>=P(2,1-p)?(a=M(I(D(e)/x),1023),o=r(e/P(2,a)*P(2,n)),o/P(2,n)>=2&&(a+=1,o=1),a>p?(a=(1<<t)-1,o=0):(a+=p,o-=P(2,n))):(a=0,o=r(e/P(2,1-p-n)))),u=[],s=n;s;s-=1)u.push(o%2?1:0),o=I(o/2);for(s=t;s;s-=1)u.push(a%2?1:0),a=I(a/2);for(u.push(i?1:0),u.reverse(),c=u.join(\"\"),l=[];c.length;)l.push(parseInt(c.substring(0,8),2)),c=c.substring(8);return l}function b(e,t,n){var r,i,a,o,s,u,c,l,p=[];for(r=e.length;r;r-=1)for(a=e[r-1],i=8;i;i-=1)p.push(a%2?1:0),a>>=1;return p.reverse(),o=p.join(\"\"),s=(1<<t-1)-1,u=parseInt(o.substring(0,1),2)?-1:1,c=parseInt(o.substring(1,1+t),2),l=parseInt(o.substring(1+t),2),c===(1<<t)-1?0!==l?NaN:u*(1/0):c>0?u*P(2,c-s)*(1+l/P(2,n)):0!==l?u*P(2,-(s-1))*(l/P(2,n)):u<0?-0:0}function S(e){return b(e,11,52)}function A(e){return v(e,11,52)}function T(e){return b(e,8,23)}function E(e){return v(e,8,23)}var C,N=void 0,w=1e5,k=function(){var e=Object.prototype.toString,t=Object.prototype.hasOwnProperty;return{Class:function(t){return e.call(t).replace(/^\\[object *|\\]$/g,\"\")},HasProperty:function(e,t){return t in e},HasOwnProperty:function(e,n){return t.call(e,n)},IsCallable:function(e){return\"function\"==typeof e},ToInt32:function(e){return e>>0},ToUint32:function(e){return e>>>0}}}(),x=Math.LN2,R=Math.abs,I=Math.floor,D=Math.log,M=Math.min,P=Math.pow,L=Math.round;C=Object.defineProperty&&function(){try{return Object.defineProperty({},\"x\",{}),!0}catch(e){return!1}}()?Object.defineProperty:function(e,t,n){if(!e===Object(e))throw new TypeError(\"Object.defineProperty called on non-object\");return k.HasProperty(n,\"get\")&&Object.prototype.__defineGetter__&&Object.prototype.__defineGetter__.call(e,t,n.get),k.HasProperty(n,\"set\")&&Object.prototype.__defineSetter__&&Object.prototype.__defineSetter__.call(e,t,n.set),k.HasProperty(n,\"value\")&&(e[t]=n.value),e};var O=Object.getOwnPropertyNames||function(e){if(e!==Object(e))throw new TypeError(\"Object.getOwnPropertyNames called on non-object\");var t,n=[];for(t in e)k.HasOwnProperty(e,t)&&n.push(t);return n};!function(){function e(e,t,o){var s;return s=function(e,t,a){var o,u,c,l;if(arguments.length&&\"number\"!=typeof arguments[0])if(\"object\"==typeof arguments[0]&&arguments[0].constructor===s)for(o=arguments[0],this.length=o.length,this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new i(this.byteLength),this.byteOffset=0,c=0;c<this.length;c+=1)this._setter(c,o._getter(c));else if(\"object\"!=typeof arguments[0]||(arguments[0]instanceof i||\"ArrayBuffer\"===k.Class(arguments[0]))){if(\"object\"!=typeof arguments[0]||!(arguments[0]instanceof i||\"ArrayBuffer\"===k.Class(arguments[0])))throw new TypeError(\"Unexpected argument type(s)\");if(this.buffer=e,this.byteOffset=k.ToUint32(t),this.byteOffset>this.buffer.byteLength)throw new RangeError(\"byteOffset out of range\");if(this.byteOffset%this.BYTES_PER_ELEMENT)throw new RangeError(\"ArrayBuffer length minus the byteOffset is not a multiple of the element size.\");if(arguments.length<3){if(this.byteLength=this.buffer.byteLength-this.byteOffset,this.byteLength%this.BYTES_PER_ELEMENT)throw new RangeError(\"length of buffer minus byteOffset not a multiple of the element size\");this.length=this.byteLength/this.BYTES_PER_ELEMENT}else this.length=k.ToUint32(a),this.byteLength=this.length*this.BYTES_PER_ELEMENT;if(this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError(\"byteOffset and length reference an area beyond the end of the buffer\")}else for(u=arguments[0],this.length=k.ToUint32(u.length),this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new i(this.byteLength),this.byteOffset=0,c=0;c<this.length;c+=1)l=u[c],this._setter(c,Number(l));else{if(this.length=k.ToInt32(arguments[0]),a<0)throw new RangeError(\"ArrayBufferView size is not a small enough positive integer\");this.byteLength=this.length*this.BYTES_PER_ELEMENT,this.buffer=new i(this.byteLength),this.byteOffset=0}this.constructor=s,n(this),r(this)},s.prototype=new a,s.prototype.BYTES_PER_ELEMENT=e,s.prototype._pack=t,s.prototype._unpack=o,s.BYTES_PER_ELEMENT=e,s.prototype._getter=function(e){if(arguments.length<1)throw new SyntaxError(\"Not enough arguments\");if((e=k.ToUint32(e))>=this.length)return N;var t,n,r=[];for(t=0,n=this.byteOffset+e*this.BYTES_PER_ELEMENT;t<this.BYTES_PER_ELEMENT;t+=1,n+=1)r.push(this.buffer._bytes[n]);return this._unpack(r)},s.prototype.get=s.prototype._getter,s.prototype._setter=function(e,t){if(arguments.length<2)throw new SyntaxError(\"Not enough arguments\");if((e=k.ToUint32(e))>=this.length)return N;var n,r,i=this._pack(t);for(n=0,r=this.byteOffset+e*this.BYTES_PER_ELEMENT;n<this.BYTES_PER_ELEMENT;n+=1,r+=1)this.buffer._bytes[r]=i[n]},s.prototype.set=function(e,t){if(arguments.length<1)throw new SyntaxError(\"Not enough arguments\");var n,r,i,a,o,s,u,c,l,p;if(\"object\"==typeof arguments[0]&&arguments[0].constructor===this.constructor){if(n=arguments[0],(i=k.ToUint32(arguments[1]))+n.length>this.length)throw new RangeError(\"Offset plus length of array is out of range\");if(c=this.byteOffset+i*this.BYTES_PER_ELEMENT,l=n.length*this.BYTES_PER_ELEMENT,n.buffer===this.buffer){for(p=[],o=0,s=n.byteOffset;o<l;o+=1,s+=1)p[o]=n.buffer._bytes[s];for(o=0,u=c;o<l;o+=1,u+=1)this.buffer._bytes[u]=p[o]}else for(o=0,s=n.byteOffset,u=c;o<l;o+=1,s+=1,u+=1)this.buffer._bytes[u]=n.buffer._bytes[s]}else{if(\"object\"!=typeof arguments[0]||void 0===arguments[0].length)throw new TypeError(\"Unexpected argument type(s)\");if(r=arguments[0],a=k.ToUint32(r.length),(i=k.ToUint32(arguments[1]))+a>this.length)throw new RangeError(\"Offset plus length of array is out of range\");for(o=0;o<a;o+=1)s=r[o],this._setter(i+o,Number(s))}},s.prototype.subarray=function(e,t){function n(e,t,n){return e<t?t:e>n?n:e}e=k.ToInt32(e),t=k.ToInt32(t),arguments.length<1&&(e=0),arguments.length<2&&(t=this.length),e<0&&(e=this.length+e),t<0&&(t=this.length+t),e=n(e,0,this.length),t=n(t,0,this.length);var r=t-e;return r<0&&(r=0),new this.constructor(this.buffer,this.byteOffset+e*this.BYTES_PER_ELEMENT,r)},s}var i=function(e){if((e=k.ToInt32(e))<0)throw new RangeError(\"ArrayBuffer size is not a small enough positive integer\");this.byteLength=e,this._bytes=[],this._bytes.length=e;var t;for(t=0;t<this.byteLength;t+=1)this._bytes[t]=0;n(this)};t.ArrayBuffer=t.ArrayBuffer||i;var a=function(){},v=e(1,o,s),b=e(1,u,c),C=e(1,l,c),w=e(2,p,f),x=e(2,d,m),R=e(4,h,y),I=e(4,_,g),D=e(4,E,T),M=e(8,A,S);t.Int8Array=t.Int8Array||v,t.Uint8Array=t.Uint8Array||b,t.Uint8ClampedArray=t.Uint8ClampedArray||C,t.Int16Array=t.Int16Array||w,t.Uint16Array=t.Uint16Array||x,t.Int32Array=t.Int32Array||R,t.Uint32Array=t.Uint32Array||I,t.Float32Array=t.Float32Array||D,t.Float64Array=t.Float64Array||M}(),function(){function e(e,t){return k.IsCallable(e.get)?e.get(t):e[t]}function r(n){return function(r,i){if((r=k.ToUint32(r))+n.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError(\"Array index out of range\");r+=this.byteOffset;var o,s=new t.Uint8Array(this.buffer,r,n.BYTES_PER_ELEMENT),u=[];for(o=0;o<n.BYTES_PER_ELEMENT;o+=1)u.push(e(s,o));return Boolean(i)===Boolean(a)&&u.reverse(),e(new n(new t.Uint8Array(u).buffer),0)}}function i(n){return function(r,i,o){if((r=k.ToUint32(r))+n.BYTES_PER_ELEMENT>this.byteLength)throw new RangeError(\"Array index out of range\");var s,u,c=new n([i]),l=new t.Uint8Array(c.buffer),p=[];for(s=0;s<n.BYTES_PER_ELEMENT;s+=1)p.push(e(l,s));Boolean(o)===Boolean(a)&&p.reverse(),u=new t.Uint8Array(this.buffer,r,n.BYTES_PER_ELEMENT),u.set(p)}}var a=function(){var n=new t.Uint16Array([4660]);return 18===e(new t.Uint8Array(n.buffer),0)}(),o=function(e,r,i){if(0===arguments.length)e=new t.ArrayBuffer(0);else if(!(e instanceof t.ArrayBuffer||\"ArrayBuffer\"===k.Class(e)))throw new TypeError(\"TypeError\");if(this.buffer=e||new t.ArrayBuffer(0),this.byteOffset=k.ToUint32(r),this.byteOffset>this.buffer.byteLength)throw new RangeError(\"byteOffset out of range\");if(arguments.length<3?this.byteLength=this.buffer.byteLength-this.byteOffset:this.byteLength=k.ToUint32(i),this.byteOffset+this.byteLength>this.buffer.byteLength)throw new RangeError(\"byteOffset and length reference an area beyond the end of the buffer\");n(this)};o.prototype.getUint8=r(t.Uint8Array),o.prototype.getInt8=r(t.Int8Array),o.prototype.getUint16=r(t.Uint16Array),o.prototype.getInt16=r(t.Int16Array),o.prototype.getUint32=r(t.Uint32Array),o.prototype.getInt32=r(t.Int32Array),o.prototype.getFloat32=r(t.Float32Array),o.prototype.getFloat64=r(t.Float64Array),o.prototype.setUint8=i(t.Uint8Array),o.prototype.setInt8=i(t.Int8Array),o.prototype.setUint16=i(t.Uint16Array),o.prototype.setInt16=i(t.Int16Array),o.prototype.setUint32=i(t.Uint32Array),o.prototype.setInt32=i(t.Int32Array),o.prototype.setFloat32=i(t.Float32Array),o.prototype.setFloat64=i(t.Float64Array),t.DataView=t.DataView||o}()},function(e,t,n){\"use strict\";e.exports={isString:function(e){return\"string\"==typeof e},isObject:function(e){return\"object\"==typeof e&&null!==e},isNull:function(e){return null===e},isNullOrUndefined:function(e){return null==e}}},function(e,t,n){(function(t){function n(e,t){function n(){if(!i){if(r(\"throwDeprecation\"))throw new Error(t);r(\"traceDeprecation\")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}if(r(\"noDeprecation\"))return e;var i=!1;return n}function r(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&\"true\"===String(n).toLowerCase()}e.exports=n}).call(t,n(13))},function(module,exports,__webpack_require__){function Context(){}var indexOf=__webpack_require__(181),Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var n in e)t.push(n);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var n=0;n<e.length;n++)t(e[n],n,e)},defineProp=function(){try{return Object.defineProperty({},\"_\",{}),function(e,t,n){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:n})}}catch(e){return function(e,t,n){e[t]=n}}}(),globals=[\"Array\",\"Boolean\",\"Date\",\"Error\",\"EvalError\",\"Function\",\"Infinity\",\"JSON\",\"Math\",\"NaN\",\"Number\",\"Object\",\"RangeError\",\"ReferenceError\",\"RegExp\",\"String\",\"SyntaxError\",\"TypeError\",\"URIError\",\"decodeURI\",\"decodeURIComponent\",\"encodeURI\",\"encodeURIComponent\",\"escape\",\"eval\",\"isFinite\",\"isNaN\",\"parseFloat\",\"parseInt\",\"undefined\",\"unescape\"];Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError(\"needs a 'context' argument.\");var t=document.createElement(\"iframe\");t.style||(t.style={}),t.style.display=\"none\",document.body.appendChild(t);var n=t.contentWindow,r=n.eval,i=n.execScript;!r&&i&&(i.call(n,\"null\"),r=n.eval),forEach(Object_keys(e),function(t){n[t]=e[t]}),forEach(globals,function(t){e[t]&&(n[t]=e[t])});var a=Object_keys(n),o=r.call(n,this.code);return forEach(Object_keys(n),function(t){(t in e||indexOf(a,t)===-1)&&(e[t]=n[t])}),forEach(globals,function(t){t in e||defineProp(e,t,n[t])}),document.body.removeChild(t),o},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),n=this.runInContext(t);return forEach(Object_keys(t),function(n){e[n]=t[n]}),n},forEach(Object_keys(Script.prototype),function(e){exports[e]=Script[e]=function(t){var n=Script(t);return n[e].apply(n,[].slice.call(arguments,1))}}),exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return\"object\"==typeof e&&forEach(Object_keys(e),function(n){t[n]=e[n]}),t}},function(e,t){(function(){\"use strict\";t.stripBOM=function(e){return\"\\ufeff\"===e[0]?e.substring(1):e}}).call(this)},function(e,t){(function(){\"use strict\";var e;e=new RegExp(/(?!xmlns)^.*:/),t.normalize=function(e){return e.toLowerCase()},t.firstCharLowerCase=function(e){return e.charAt(0).toLowerCase()+e.slice(1)},t.stripPrefix=function(t){return t.replace(e,\"\")},t.parseNumbers=function(e){return isNaN(e)||(e=e%1==0?parseInt(e,10):parseFloat(e)),e},t.parseBooleans=function(e){return/^(?:true|false)$/i.test(e)&&(e=\"true\"===e.toLowerCase()),e}}).call(this)},function(e,t,n){(function(){\"use strict\";var e,r,i,a,o,s,u,c,l,p,f,d=function(e,t){function n(){this.constructor=e}for(var r in t)m.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},m={}.hasOwnProperty,h=function(e,t){return function(){return e.apply(t,arguments)}};l=n(350),a=n(40),r=n(376),e=n(364),u=n(365),p=n(96).setImmediate,o=function(e){return\"object\"==typeof e&&null!=e&&0===Object.keys(e).length},s=function(e,t){var n,r,i;for(n=0,r=e.length;n<r;n++)i=e[n],t=i(t);return t},c=function(e){return e.indexOf(\"&\")>=0||e.indexOf(\">\")>=0||e.indexOf(\"<\")>=0},f=function(e){return\"<![CDATA[\"+i(e)+\"]]>\"},i=function(e){return e.replace(\"]]>\",\"]]]]><![CDATA[>\")},t.processors=u,t.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:\"@\",charkey:\"#\",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:\"@@\",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:\"\"},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:\"$\",charkey:\"_\",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:\"$$\",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:\"root\",xmldec:{version:\"1.0\",encoding:\"UTF-8\",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:\"  \",newline:\"\\n\"},headless:!1,chunkSize:1e4,emptyTag:\"\",cdata:!1}},t.ValidationError=function(e){function t(e){this.message=e}return d(t,e),t}(Error),t.Builder=function(){function e(e){var n,r,i;this.options={},r=t.defaults[.2];for(n in r)m.call(r,n)&&(i=r[n],this.options[n]=i);for(n in e)m.call(e,n)&&(i=e[n],this.options[n]=i)}return e.prototype.buildObject=function(e){var n,i,a,o,s;return n=this.options.attrkey,i=this.options.charkey,1===Object.keys(e).length&&this.options.rootName===t.defaults[.2].rootName?(s=Object.keys(e)[0],e=e[s]):s=this.options.rootName,a=function(e){return function(t,r){var o,s,u,l,p,d;if(\"object\"!=typeof r)e.options.cdata&&c(r)?t.raw(f(r)):t.txt(r);else for(p in r)if(m.call(r,p))if(s=r[p],p===n){if(\"object\"==typeof s)for(o in s)d=s[o],t=t.att(o,d)}else if(p===i)t=e.options.cdata&&c(s)?t.raw(f(s)):t.txt(s);else if(Array.isArray(s))for(l in s)m.call(s,l)&&(u=s[l],t=\"string\"==typeof u?e.options.cdata&&c(u)?t.ele(p).raw(f(u)).up():t.ele(p,u).up():a(t.ele(p),u).up());else\"object\"==typeof s?t=a(t.ele(p),s).up():\"string\"==typeof s&&e.options.cdata&&c(s)?t=t.ele(p).raw(f(s)).up():(null==s&&(s=\"\"),t=t.ele(p,s.toString()).up());return t}}(this),o=r.create(s,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),a(o,e).end(this.options.renderOpts)},e}(),t.Parser=function(n){function r(e){this.parseString=h(this.parseString,this),this.reset=h(this.reset,this),this.assignOrPush=h(this.assignOrPush,this),this.processAsync=h(this.processAsync,this);var n,r,i;if(!(this instanceof t.Parser))return new t.Parser(e);this.options={},r=t.defaults[.2];for(n in r)m.call(r,n)&&(i=r[n],this.options[n]=i);for(n in e)m.call(e,n)&&(i=e[n],this.options[n]=i);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+\"ns\"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(u.normalize)),this.reset()}return d(r,n),r.prototype.processAsync=function(){var e,t;try{return this.remaining.length<=this.options.chunkSize?(e=this.remaining,this.remaining=\"\",this.saxParser=this.saxParser.write(e),this.saxParser.close()):(e=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(e),p(this.processAsync))}catch(e){if(t=e,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(t)}},r.prototype.assignOrPush=function(e,t,n){return t in e?(e[t]instanceof Array||(e[t]=[e[t]]),e[t].push(n)):this.options.explicitArray?e[t]=[n]:e[t]=n},r.prototype.reset=function(){var e,t,n,r;return this.removeAllListeners(),this.saxParser=l.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(e){return function(t){if(e.saxParser.resume(),!e.saxParser.errThrown)return e.saxParser.errThrown=!0,e.emit(\"error\",t)}}(this),this.saxParser.onend=function(e){return function(){if(!e.saxParser.ended)return e.saxParser.ended=!0,e.emit(\"end\",e.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,r=[],e=this.options.attrkey,t=this.options.charkey,this.saxParser.onopentag=function(n){return function(i){var a,o,u,c,l;if(u={},u[t]=\"\",!n.options.ignoreAttrs){l=i.attributes;for(a in l)m.call(l,a)&&(e in u||n.options.mergeAttrs||(u[e]={}),o=n.options.attrValueProcessors?s(n.options.attrValueProcessors,i.attributes[a]):i.attributes[a],c=n.options.attrNameProcessors?s(n.options.attrNameProcessors,a):a,n.options.mergeAttrs?n.assignOrPush(u,c,o):u[e][c]=o)}return u[\"#name\"]=n.options.tagNameProcessors?s(n.options.tagNameProcessors,i.name):i.name,n.options.xmlns&&(u[n.options.xmlnskey]={uri:i.uri,local:i.local}),r.push(u)}}(this),this.saxParser.onclosetag=function(e){return function(){var n,i,a,u,c,l,p,f,d,h,y;if(p=r.pop(),l=p[\"#name\"],e.options.explicitChildren&&e.options.preserveChildrenOrder||delete p[\"#name\"],p.cdata===!0&&(n=p.cdata,delete p.cdata),h=r[r.length-1],p[t].match(/^\\s*$/)&&!n?(i=p[t],delete p[t]):(e.options.trim&&(p[t]=p[t].trim()),e.options.normalize&&(p[t]=p[t].replace(/\\s{2,}/g,\" \").trim()),p[t]=e.options.valueProcessors?s(e.options.valueProcessors,p[t]):p[t],1===Object.keys(p).length&&t in p&&!e.EXPLICIT_CHARKEY&&(p=p[t])),o(p)&&(p=\"\"!==e.options.emptyTag?e.options.emptyTag:i),null!=e.options.validator){y=\"/\"+function(){var e,t,n;for(n=[],e=0,t=r.length;e<t;e++)c=r[e],n.push(c[\"#name\"]);return n}().concat(l).join(\"/\");try{p=e.options.validator(y,h&&h[l],p)}catch(t){a=t,e.emit(\"error\",a)}}if(e.options.explicitChildren&&!e.options.mergeAttrs&&\"object\"==typeof p)if(e.options.preserveChildrenOrder){if(h){h[e.options.childkey]=h[e.options.childkey]||[],f={};for(u in p)m.call(p,u)&&(f[u]=p[u]);h[e.options.childkey].push(f),delete p[\"#name\"],1===Object.keys(p).length&&t in p&&!e.EXPLICIT_CHARKEY&&(p=p[t])}}else c={},e.options.attrkey in p&&(c[e.options.attrkey]=p[e.options.attrkey],delete p[e.options.attrkey]),!e.options.charsAsChildren&&e.options.charkey in p&&(c[e.options.charkey]=p[e.options.charkey],delete p[e.options.charkey]),Object.getOwnPropertyNames(p).length>0&&(c[e.options.childkey]=p),p=c;return r.length>0?e.assignOrPush(h,l,p):(e.options.explicitRoot&&(d=p,p={},p[l]=d),e.resultObject=p,e.saxParser.ended=!0,e.emit(\"end\",e.resultObject))}}(this),n=function(e){return function(n){var i,a;if(a=r[r.length-1])return a[t]+=n,e.options.explicitChildren&&e.options.preserveChildrenOrder&&e.options.charsAsChildren&&(e.options.includeWhiteChars||\"\"!==n.replace(/\\\\n/g,\"\").trim())&&(a[e.options.childkey]=a[e.options.childkey]||[],i={\"#name\":\"__text__\"},i[t]=n,e.options.normalize&&(i[t]=i[t].replace(/\\s{2,}/g,\" \").trim()),a[e.options.childkey].push(i)),a}}(this),this.saxParser.ontext=n,this.saxParser.oncdata=function(e){return function(e){var t;if(t=n(e))return t.cdata=!0}}()},r.prototype.parseString=function(t,n){var r;null!=n&&\"function\"==typeof n&&(this.on(\"end\",function(e){return this.reset(),n(null,e)}),this.on(\"error\",function(e){return this.reset(),n(e)}));try{return t=t.toString(),\"\"===t.trim()?(this.emit(\"end\",null),!0):(t=e.stripBOM(t),this.options.async?(this.remaining=t,p(this.processAsync),this.saxParser):this.saxParser.write(t).close())}catch(e){if(r=e,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit(\"error\",r),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw r}},r}(a.EventEmitter),t.parseString=function(e,n,r){var i,a,o;return null!=r?(\"function\"==typeof r&&(i=r),\"object\"==typeof n&&(a=n)):(\"function\"==typeof n&&(i=n),a={}),o=new t.Parser(a),o.parseString(e,i)}}).call(this)},function(e,t,n){(function(){var t;t=n(12),e.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error(\"Missing attribute name of element \"+e.name);if(null==n)throw new Error(\"Missing attribute value for attribute \"+t+\" of element \"+e.name);this.name=this.stringify.attName(t),this.value=this.stringify.attValue(n)}return e.prototype.clone=function(){return t(e.prototype,this)},e.prototype.toString=function(e,t){return\" \"+this.name+'=\"'+this.value+'\"'},e}()}).call(this)},function(e,t,n){(function(){var t,r;r=n(374),n(165),n(166),t=n(167),e.exports=function(){function e(e,n){var i,a;if(null==e)throw new Error(\"Root element needs a name\");null==n&&(n={}),this.options=n,this.stringify=new r(n),a=new t(this,\"doc\"),i=a.element(e),i.isRoot=!0,i.documentObject=this,this.rootObject=i,n.headless||(i.declaration(n),null==n.pubID&&null==n.sysID||i.doctype(n))}return e.prototype.root=function(){return this.rootObject},e.prototype.end=function(e){return this.toString(e)},e.prototype.toString=function(e){var t,n,r,i,a,o;return n=(null!=e?e.pretty:void 0)||!1,null!=(i=null!=e?e.indent:void 0)?i:\"  \",null!=(a=null!=e?e.offset:void 0)?a:0,t=null!=(o=null!=e?e.newline:void 0)?o:\"\\n\",r=\"\",null!=this.xmldec&&(r+=this.xmldec.toString(e)),null!=this.doctype&&(r+=this.doctype.toString(e)),r+=this.rootObject.toString(e),n&&r.slice(-t.length)===t&&(r=r.slice(0,-t.length)),r},e}()}).call(this)},function(e,t,n){(function(){n(12),e.exports=function(){function e(e,t,n,r,i,a){if(this.stringify=e.stringify,null==t)throw new Error(\"Missing DTD element name\");if(null==n)throw new Error(\"Missing DTD attribute name\");if(!r)throw new Error(\"Missing DTD attribute type\");if(!i)throw new Error(\"Missing DTD attribute default\");if(0!==i.indexOf(\"#\")&&(i=\"#\"+i),!i.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error(\"Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT\");if(a&&!i.match(/^(#FIXED|#DEFAULT)$/))throw new Error(\"Default value only applies to #FIXED or #DEFAULT\");this.elementName=this.stringify.eleName(t),this.attributeName=this.stringify.attName(n),this.attributeType=this.stringify.dtdAttType(r),this.defaultValue=this.stringify.dtdAttDefault(a),this.defaultValueType=i}return e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<!ATTLIST \"+this.elementName+\" \"+this.attributeName+\" \"+this.attributeType,\"#DEFAULT\"!==this.defaultValueType&&(o+=\" \"+this.defaultValueType),this.defaultValue&&(o+=' \"'+this.defaultValue+'\"'),o+=\">\",a&&(o+=r),o},e}()}).call(this)},function(e,t,n){(function(){n(12),e.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error(\"Missing DTD element name\");n||(n=\"(#PCDATA)\"),Array.isArray(n)&&(n=\"(\"+n.join(\",\")+\")\"),this.name=this.stringify.eleName(t),this.value=this.stringify.dtdElementValue(n)}return e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<!ELEMENT \"+this.name+\" \"+this.value+\">\",a&&(o+=r),o},e}()}).call(this)},function(e,t,n){(function(){var t;n(12),t=n(19),e.exports=function(){function e(e,n,r,i){if(this.stringify=e.stringify,null==r)throw new Error(\"Missing entity name\");if(null==i)throw new Error(\"Missing entity value\");if(this.pe=!!n,this.name=this.stringify.eleName(r),t(i)){if(!i.pubID&&!i.sysID)throw new Error(\"Public and/or system identifiers are required for an external entity\");if(i.pubID&&!i.sysID)throw new Error(\"System identifier is required for a public external entity\");if(null!=i.pubID&&(this.pubID=this.stringify.dtdPubID(i.pubID)),null!=i.sysID&&(this.sysID=this.stringify.dtdSysID(i.sysID)),null!=i.nData&&(this.nData=this.stringify.dtdNData(i.nData)),this.pe&&this.nData)throw new Error(\"Notation declaration is not allowed in a parameter entity\")}else this.value=this.stringify.dtdEntityValue(i)}return e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<!ENTITY\",this.pe&&(o+=\" %\"),o+=\" \"+this.name,this.value?o+=' \"'+this.value+'\"':(this.pubID&&this.sysID?o+=' PUBLIC \"'+this.pubID+'\" \"'+this.sysID+'\"':this.sysID&&(o+=' SYSTEM \"'+this.sysID+'\"'),this.nData&&(o+=\" NDATA \"+this.nData)),o+=\">\",a&&(o+=r),o},e}()}).call(this)},function(e,t,n){(function(){n(12),e.exports=function(){function e(e,t,n){if(this.stringify=e.stringify,null==t)throw new Error(\"Missing notation name\");if(!n.pubID&&!n.sysID)throw new Error(\"Public or system identifiers are required for an external entity\");this.name=this.stringify.eleName(t),null!=n.pubID&&(this.pubID=this.stringify.dtdPubID(n.pubID)),null!=n.sysID&&(this.sysID=this.stringify.dtdSysID(n.sysID))}return e.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=\"<!NOTATION \"+this.name,this.pubID&&this.sysID?o+=' PUBLIC \"'+this.pubID+'\" \"'+this.sysID+'\"':this.pubID?o+=' PUBLIC \"'+this.pubID+'\"':this.sysID&&(o+=' SYSTEM \"'+this.sysID+'\"'),o+=\">\",a&&(o+=r),o},e}()}).call(this)},function(e,t,n){(function(){var t,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;r=n(12),t=n(37),e.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error(\"Missing raw text\");this.value=this.stringify.raw(n)}return i(t,e),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=this.value,a&&(o+=r),o},t}(t)}).call(this)},function(e,t){(function(){var t=function(e,t){return function(){return e.apply(t,arguments)}},n={}.hasOwnProperty;e.exports=function(){function e(e){this.assertLegalChar=t(this.assertLegalChar,this);var r,i,a;this.allowSurrogateChars=null!=e?e.allowSurrogateChars:void 0,this.noDoubleEncoding=null!=e?e.noDoubleEncoding:void 0,i=(null!=e?e.stringify:void 0)||{};for(r in i)n.call(i,r)&&(a=i[r],this[r]=a)}return e.prototype.eleName=function(e){return e=\"\"+e||\"\",this.assertLegalChar(e)},e.prototype.eleText=function(e){return e=\"\"+e||\"\",this.assertLegalChar(this.elEscape(e))},e.prototype.cdata=function(e){if(e=\"\"+e||\"\",e.match(/]]>/))throw new Error(\"Invalid CDATA text: \"+e);return this.assertLegalChar(e)},e.prototype.comment=function(e){if(e=\"\"+e||\"\",e.match(/--/))throw new Error(\"Comment text cannot contain double-hypen: \"+e);return this.assertLegalChar(e)},e.prototype.raw=function(e){return\"\"+e||\"\"},e.prototype.attName=function(e){return\"\"+e||\"\"},e.prototype.attValue=function(e){return e=\"\"+e||\"\",this.attEscape(e)},e.prototype.insTarget=function(e){return\"\"+e||\"\"},e.prototype.insValue=function(e){if(e=\"\"+e||\"\",e.match(/\\?>/))throw new Error(\"Invalid processing instruction value: \"+e);return e},e.prototype.xmlVersion=function(e){if(e=\"\"+e||\"\",!e.match(/1\\.[0-9]+/))throw new Error(\"Invalid version number: \"+e);return e},e.prototype.xmlEncoding=function(e){if(e=\"\"+e||\"\",!e.match(/^[A-Za-z](?:[A-Za-z0-9._-]|-)*$/))throw new Error(\"Invalid encoding: \"+e);return e},e.prototype.xmlStandalone=function(e){return e?\"yes\":\"no\"},e.prototype.dtdPubID=function(e){return\"\"+e||\"\"},e.prototype.dtdSysID=function(e){return\"\"+e||\"\"},e.prototype.dtdElementValue=function(e){return\"\"+e||\"\"},e.prototype.dtdAttType=function(e){return\"\"+e||\"\"},e.prototype.dtdAttDefault=function(e){return null!=e?\"\"+e||\"\":e},e.prototype.dtdEntityValue=function(e){return\"\"+e||\"\"},e.prototype.dtdNData=function(e){return\"\"+e||\"\"},e.prototype.convertAttKey=\"@\",e.prototype.convertPIKey=\"?\",e.prototype.convertTextKey=\"#text\",e.prototype.convertCDataKey=\"#cdata\",e.prototype.convertCommentKey=\"#comment\",e.prototype.convertRawKey=\"#raw\",e.prototype.assertLegalChar=function(e){var t,n;if(t=this.allowSurrogateChars?/[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uFFFE-\\uFFFF]/:/[\\u0000-\\u0008\\u000B-\\u000C\\u000E-\\u001F\\uD800-\\uDFFF\\uFFFE-\\uFFFF]/,n=e.match(t))throw new Error(\"Invalid character (\"+n+\") in string: \"+e+\" at index \"+n.index);return e},e.prototype.elEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\\S+;)&/g:/&/g,e.replace(t,\"&amp;\").replace(/</g,\"&lt;\").replace(/>/g,\"&gt;\").replace(/\\r/g,\"&#xD;\")},e.prototype.attEscape=function(e){var t;return t=this.noDoubleEncoding?/(?!&\\S+;)&/g:/&/g,e.replace(t,\"&amp;\").replace(/</g,\"&lt;\").replace(/\"/g,\"&quot;\")},e}()}).call(this)},function(e,t,n){(function(){var t,r,i=function(e,t){function n(){this.constructor=e}for(var r in t)a.call(t,r)&&(e[r]=t[r]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},a={}.hasOwnProperty;r=n(12),t=n(37),e.exports=function(e){function t(e,n){if(t.__super__.constructor.call(this,e),null==n)throw new Error(\"Missing element text\");this.value=this.stringify.eleText(n)}return i(t,e),t.prototype.clone=function(){return r(t.prototype,this)},t.prototype.toString=function(e,t){var n,r,i,a,o,s,u,c,l;return a=(null!=e?e.pretty:void 0)||!1,n=null!=(s=null!=e?e.indent:void 0)?s:\"  \",i=null!=(u=null!=e?e.offset:void 0)?u:0,r=null!=(c=null!=e?e.newline:void 0)?c:\"\\n\",t||(t=0),l=new Array(t+i+1).join(n),o=\"\",a&&(o+=l),o+=this.value,a&&(o+=r),o},t}(t)}).call(this)},function(e,t,n){(function(){var t,r;r=n(278),t=n(368),e.exports.create=function(e,n,i,a){return a=r({},n,i,a),new t(e,a).root()}}).call(this)},function(e,t){function n(){}function r(e,t,n,r,c){function d(e){if(e>65535){e-=65536;var t=55296+(e>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}function m(e){var t=e.slice(1,-1);return t in n?n[t]:\"#\"===t.charAt(0)?d(parseInt(t.substr(1).replace(\"x\",\"0x\"))):(c.error(\"entity not found:\"+e),e)}function h(t){if(t>T){var n=e.substring(T,t).replace(/&#?\\w+;/g,m);b&&y(T),r.characters(n,0,t-T),T=t}}function y(t,n){for(;t>=g&&(n=v.exec(e));)_=n.index,g=_+n[0].length,b.lineNumber++;b.columnNumber=t-_+1}for(var _=0,g=0,v=/.*(?:\\r\\n?|\\n)|.*$/g,b=r.locator,S=[{currentNSMap:t}],A={},T=0;;){try{var E=e.indexOf(\"<\",T);if(E<0){if(!e.substr(T).match(/^\\s*$/)){var C=r.doc,N=C.createTextNode(e.substr(T));C.appendChild(N),r.currentElement=N}return}switch(E>T&&h(E),e.charAt(E+1)){case\"/\":var w=e.indexOf(\">\",E+3),k=e.substring(E+2,w),x=S.pop();w<0?(k=e.substring(E+2).replace(/[\\s<].*/,\"\"),c.error(\"end tag name: \"+k+\" is not complete:\"+x.tagName),w=E+1+k.length):k.match(/\\s</)&&(k=k.replace(/[\\s<].*/,\"\"),c.error(\"end tag name: \"+k+\" maybe not complete\"),w=E+1+k.length);var R=x.localNSMap,I=x.tagName==k;if(I||x.tagName&&x.tagName.toLowerCase()==k.toLowerCase()){if(r.endElement(x.uri,x.localName,k),R)for(var D in R)r.endPrefixMapping(D);I||c.fatalError(\"end tag name: \"+k+\" is not match the current start tagName:\"+x.tagName)}else S.push(x);w++;break;case\"?\":b&&y(E),w=p(e,E,r);break;case\"!\":b&&y(E),w=l(e,E,r,c);break;default:b&&y(E);var M=new f,P=S[S.length-1].currentNSMap,w=a(e,E,M,P,m,c),L=M.length;if(!M.closed&&u(e,w,M.tagName,A)&&(M.closed=!0,n.nbsp||c.warning(\"unclosed xml attribute\")),b&&L){for(var O=i(b,{}),U=0;U<L;U++){var F=M[U];y(F.offset),F.locator=i(b,{})}r.locator=O,o(M,r,P)&&S.push(M),r.locator=b}else o(M,r,P)&&S.push(M);\"http://www.w3.org/1999/xhtml\"!==M.uri||M.closed?w++:w=s(e,w,M.tagName,m,r)}}catch(e){c.error(\"element parse error: \"+e),w=-1}w>T?T=w:h(Math.max(E,T)+1)}}function i(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,a){for(var o,s,u=++t,c=g;;){var l=e.charAt(u);switch(l){case\"=\":if(c===v)o=e.slice(t,u),c=S;else{if(c!==b)throw new Error(\"attribute equal must after attrName\");c=S}break;case\"'\":case'\"':if(c===S||c===v){if(c===v&&(a.warning('attribute value must after \"=\"'),o=e.slice(t,u)),t=u+1,!((u=e.indexOf(l,t))>0))throw new Error(\"attribute value no end '\"+l+\"' match\");s=e.slice(t,u).replace(/&#?\\w+;/g,i),n.add(o,s,t-1),c=T}else{if(c!=A)throw new Error('attribute value must after \"=\"');s=e.slice(t,u).replace(/&#?\\w+;/g,i),n.add(o,s,t),a.warning('attribute \"'+o+'\" missed start quot('+l+\")!!\"),t=u+1,c=T}break;case\"/\":switch(c){case g:n.setTagName(e.slice(t,u));case T:case E:case C:c=C,n.closed=!0;case A:case v:case b:break;default:throw new Error(\"attribute invalid close char('/')\")}break;case\"\":return a.error(\"unexpected end of input\"),c==g&&n.setTagName(e.slice(t,u)),u;case\">\":switch(c){case g:n.setTagName(e.slice(t,u));case T:case E:case C:break;case A:case v:s=e.slice(t,u),\"/\"===s.slice(-1)&&(n.closed=!0,s=s.slice(0,-1));case b:c===b&&(s=o),c==A?(a.warning('attribute \"'+s+'\" missed quot(\")!!'),n.add(o,s.replace(/&#?\\w+;/g,i),t)):(\"http://www.w3.org/1999/xhtml\"===r[\"\"]&&s.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute \"'+s+'\" missed value!! \"'+s+'\" instead!!'),n.add(s,s,t));break;case S:throw new Error(\"attribute value missed!!\")}return u;case\"\":l=\" \";default:if(l<=\" \")switch(c){case g:n.setTagName(e.slice(t,u)),c=E;break;case v:o=e.slice(t,u),c=b;break;case A:var s=e.slice(t,u).replace(/&#?\\w+;/g,i);a.warning('attribute \"'+s+'\" missed quot(\")!!'),n.add(o,s,t);case T:c=E}else switch(c){case b:n.tagName;\"http://www.w3.org/1999/xhtml\"===r[\"\"]&&o.match(/^(?:disabled|checked|selected)$/i)||a.warning('attribute \"'+o+'\" missed value!! \"'+o+'\" instead2!!'),n.add(o,o,t),t=u,c=v;break;case T:a.warning('attribute space is required\"'+o+'\"!!');case E:c=v,t=u;break;case S:c=A,t=u;break;case C:throw new Error(\"elements closed character '/' and '>' must be connected to\")}}u++}}function o(e,t,n){for(var r=e.tagName,i=null,a=e.length;a--;){var o=e[a],s=o.qName,u=o.value,l=s.indexOf(\":\");if(l>0)var p=o.prefix=s.slice(0,l),f=s.slice(l+1),d=\"xmlns\"===p&&f;else f=s,p=null,d=\"xmlns\"===s&&\"\";o.localName=f,d!==!1&&(null==i&&(i={},c(n,n={})),n[d]=i[d]=u,o.uri=\"http://www.w3.org/2000/xmlns/\",t.startPrefixMapping(d,u))}for(var a=e.length;a--;){o=e[a];var p=o.prefix;p&&(\"xml\"===p&&(o.uri=\"http://www.w3.org/XML/1998/namespace\"),\"xmlns\"!==p&&(o.uri=n[p||\"\"]))}var l=r.indexOf(\":\");l>0?(p=e.prefix=r.slice(0,l),f=e.localName=r.slice(l+1)):(p=null,f=e.localName=r);var m=e.uri=n[p||\"\"];if(t.startElement(m,f,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(m,f,r),i)for(p in i)t.endPrefixMapping(p)}function s(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var a=e.indexOf(\"</\"+n+\">\",t),o=e.substring(t+1,a);if(/[&<]/.test(o))return/^script$/i.test(n)?(i.characters(o,0,o.length),a):(o=o.replace(/&#?\\w+;/g,r),i.characters(o,0,o.length),a)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&(i=e.lastIndexOf(\"</\"+n+\">\"),i<t&&(i=e.lastIndexOf(\"</\"+n)),r[n]=i),i<t}function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t,n,r){switch(e.charAt(t+2)){case\"-\":if(\"-\"===e.charAt(t+3)){var i=e.indexOf(\"-->\",t+4);return i>t?(n.comment(e,t+4,i-t-4),i+3):(r.error(\"Unclosed comment\"),-1)}return-1;default:if(\"CDATA[\"==e.substr(t+3,6)){var i=e.indexOf(\"]]>\",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var a=m(e,t),o=a.length;if(o>1&&/!doctype/i.test(a[0][0])){var s=a[1][0],u=o>3&&/^public$/i.test(a[2][0])&&a[3][0],c=o>4&&a[4][0],l=a[o-1];return n.startDTD(s,u&&u.replace(/^(['\"])(.*?)\\1$/,\"$2\"),c&&c.replace(/^(['\"])(.*?)\\1$/,\"$2\")),n.endDTD(),l.index+l[0].length}}return-1}function p(e,t,n){var r=e.indexOf(\"?>\",t);if(r){var i=e.substring(t,r).match(/^<\\?(\\S*)\\s*([\\s\\S]*?)\\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function f(e){}function d(e,t){return e.__proto__=t,e}function m(e,t){var n,r=[],i=/'[^']+'|\"[^\"]+\"|[^\\s<>\\/=]+=?|(\\/?\\s*>|<)/g;for(i.lastIndex=t,i.exec(e);n=i.exec(e);)if(r.push(n),n[1])return r}var h=/[A-Z_a-z\\xC0-\\xD6\\xD8-\\xF6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]/,y=new RegExp(\"[\\\\-\\\\.0-9\"+h.source.slice(1,-1)+\"\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]\"),_=new RegExp(\"^\"+h.source+y.source+\"*(?::\"+h.source+y.source+\"*)?$\"),g=0,v=1,b=2,S=3,A=4,T=5,E=6,C=7;n.prototype={parse:function(e,t,n){var i=this.domBuilder;i.startDocument(),c(t,t={}),r(e,t,n,i,this.errorHandler),i.endDocument()}},f.prototype={setTagName:function(e){if(!_.test(e))throw new Error(\"invalid tagName:\"+e);this.tagName=e},add:function(e,t,n){if(!_.test(e))throw new Error(\"invalid attribute:\"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},d({},d.prototype)instanceof d||(d=function(e,t){function n(){}n.prototype=t,n=new n;for(t in e)n[t]=e[t];return n}),t.XMLReader=n},function(e,t,n){\"use strict\";function r(e,t){var n,r,i,a,o,s,u;if(null===t)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),\"!!\"===o.slice(0,2)&&(o=\"tag:yaml.org,2002:\"+o.slice(2)),u=e.compiledTypeMap[o],u&&R.call(u.styleAliases,s)&&(s=u.styleAliases[s]),n[o]=s;return n}function i(e){var t,n,r;if(t=e.toString(16).toUpperCase(),e<=255)n=\"x\",r=2;else if(e<=65535)n=\"u\",r=4;else{if(!(e<=4294967295))throw new N(\"code point within a string may not be greater than 0xFFFFFFFF\");n=\"U\",r=8}return\"\\\\\"+n+C.repeat(\"0\",r-t.length)+t}function a(e){this.schema=e.schema||w,this.indent=Math.max(1,e.indent||2),this.skipInvalid=e.skipInvalid||!1,this.flowLevel=C.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=r(this.schema,e.styles||null),this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=\"\",this.duplicates=[],this.usedDuplicates=null}function o(e,t){for(var n,r=C.repeat(\" \",t),i=0,a=-1,o=\"\",s=e.length;i<s;)a=e.indexOf(\"\\n\",i),a===-1?(n=e.slice(i),i=s):(n=e.slice(i,a+1),i=a+1),n.length&&\"\\n\"!==n&&(o+=r),o+=n;return o}function s(e,t){return\"\\n\"+C.repeat(\" \",e.indent*t)}function u(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}function c(e){this.source=e,this.result=\"\",this.checkpoint=0}function l(e,t,n){var r,i,a,s,l,f,h,y,_,g,v,b,S,A,T,E,C,N,w,k;if(0===t.length)return void(e.dump=\"''\");if(0==t.indexOf(\"!include\"))return void(e.dump=\"\"+t);if(0==t.indexOf(\"!$$$novalue\"))return void(e.dump=\"\");if(-1!==te.indexOf(t))return void(e.dump=\"'\"+t+\"'\");for(r=!0,i=t.length?t.charCodeAt(0):0,a=P===i||P===t.charCodeAt(t.length-1),W!==i&&H!==i&&Y!==i&&X!==i||(r=!1),a?(r=!1,s=!1,l=!1):(s=!0,l=!0),f=!0,h=new c(t),y=!1,_=0,g=0,v=e.indent*n,b=80,v<40?b-=v:b=40,A=0;A<t.length;A++){if(S=t.charCodeAt(A),r){if(d(S))continue;r=!1}f&&S===K&&(f=!1),T=ee[S],E=m(S),(T||E)&&(S!==D&&S!==O&&S!==K?(s=!1,l=!1):S===D&&(y=!0,f=!1,A>0&&t.charCodeAt(A-1)===P&&(l=!1,s=!1),s&&(C=A-_,_=A,C>g&&(g=C))),S!==O&&(f=!1),h.takeUpTo(A),h.escapeChar())}if(r&&u(e,t)&&(r=!1),N=\"\",(s||l)&&(w=0,t.charCodeAt(t.length-1)===D&&(w+=1,t.charCodeAt(t.length-2)===D&&(w+=1)),0===w?N=\"-\":2===w&&(N=\"+\")),l&&g<b&&(s=!1),y||(l=!1),r)e.dump=t;else if(f)e.dump=\"'\"+t+\"'\";else if(s)k=p(t,b),e.dump=\">\"+N+\"\\n\"+o(k,v);else if(l)N||(t=t.replace(/\\n$/,\"\")),e.dump=\"|\"+N+\"\\n\"+o(t,v);else{if(!h)throw new Error(\"Failed to dump scalar value\");h.finish(),e.dump='\"'+h.result+'\"'}}function p(e,t){var n,r=\"\",i=0,a=e.length,o=/\\n+$/.exec(e);for(o&&(a=o.index+1);i<a;)n=e.indexOf(\"\\n\",i),n>a||n===-1?(r&&(r+=\"\\n\\n\"),r+=f(e.slice(i,a),t),i=a):(r&&(r+=\"\\n\\n\"),r+=f(e.slice(i,n),t),i=n+1);return o&&\"\\n\"!==o[0]&&(r+=o[0]),r}function f(e,t){if(\"\"===e)return e;for(var n,r,i,a=/[^\\s] [^\\s]/g,o=\"\",s=0,u=0,c=a.exec(e);c;)n=c.index,n-u>t&&(r=s!==u?s:n,o&&(o+=\"\\n\"),i=e.slice(u,r),o+=i,u=r+1),s=n+1,c=a.exec(e);return o&&(o+=\"\\n\"),o+=u!==s&&e.length-u>t?e.slice(u,s)+\"\\n\"+e.slice(s+1):e.slice(u)}function d(e){return I!==e&&D!==e&&M!==e&&j!==e&&J!==e&&G!==e&&$!==e&&Z!==e&&U!==e&&B!==e&&V!==e&&L!==e&&Q!==e&&z!==e&&K!==e&&O!==e&&F!==e&&q!==e&&!ee[e]&&!m(e)}function m(e){return!(32<=e&&e<=126||133===e||160<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111)}function h(e,t,n){var r,i,a=\"\",o=e.tag;for(r=0,i=n.length;r<i;r+=1)b(e,t,n[r],!1,!1)&&(0!==r&&(a+=\", \"),a+=e.dump);e.tag=o,e.dump=\"[\"+a+\"]\"}function y(e,t,n,r){var i,a,o=\"\",u=e.tag;for(i=0,a=n.length;i<a;i+=1)b(e,t+1,n[i],!0,!0)&&(r&&0===i||(o+=s(e,t)),o+=\"- \"+e.dump);e.tag=u,e.dump=o||\"[]\"}function _(e,t,n){var r,i,a,o,s,u=\"\",c=e.tag,l=Object.keys(n);for(r=0,i=l.length;r<i;r+=1)s=\"\",0!==r&&(s+=\", \"),a=l[r],o=n[a],b(e,t,a,!1,!1)&&(e.dump.length>1024&&(s+=\"? \"),s+=e.dump+\": \",b(e,t,o,!1,!1)&&(s+=e.dump,u+=s));e.tag=c,e.dump=\"{\"+u+\"}\"}function g(e,t,n,r){var i,a,o,u,c,l,p=\"\",f=e.tag,d=Object.keys(n);for(i=0,a=d.length;i<a;i+=1)l=\"\",r&&0===i||(l+=s(e,t)),o=d[i],u=n[o],b(e,t+1,o,!0,!0)&&(c=null!==e.tag&&\"?\"!==e.tag||e.dump&&e.dump.length>1024,c&&(l+=e.dump&&D===e.dump.charCodeAt(0)?\"?\":\"? \"),l+=e.dump,c&&(l+=s(e,t)),b(e,t+1,u,!0,c)&&(l+=e.dump&&D===e.dump.charCodeAt(0)?\":\":\": \",l+=e.dump,p+=l));e.tag=f,e.dump=p||\"{}\"}function v(e,t,n){var r,i,a,o,s,u;for(i=n?e.explicitTypes:e.implicitTypes,a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||\"object\"==typeof t&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(e.tag=n?s.tag:\"?\",s.represent){if(u=e.styleMap[s.tag]||s.defaultStyle,\"[object Function]\"===x.call(s.represent))r=s.represent(t,u);else{if(!R.call(s.represent,u))throw new N(\"!<\"+s.tag+'> tag resolver accepts not \"'+u+'\" style');r=s.represent[u](t,u)}e.dump=r}return!0}return!1}function b(e,t,n,r,i){e.tag=null,e.dump=n,v(e,n,!1)||v(e,n,!0);var a=x.call(e.dump);r&&(r=0>e.flowLevel||e.flowLevel>t),(null!==e.tag&&\"?\"!==e.tag||2!==e.indent&&t>0)&&(i=!1);var o,s,u=\"[object Object]\"===a||\"[object Array]\"===a;if(u&&(o=e.duplicates.indexOf(n),s=o!==-1),s&&e.usedDuplicates[o])e.dump=\"*ref_\"+o;else{if(u&&s&&!e.usedDuplicates[o]&&(e.usedDuplicates[o]=!0),\"[object Object]\"===a)r&&0!==Object.keys(e.dump).length?(g(e,t,e.dump,i),s&&(e.dump=\"&ref_\"+o+(0===t?\"\\n\":\"\")+e.dump)):(_(e,t,e.dump),s&&(e.dump=\"&ref_\"+o+\" \"+e.dump));else if(\"[object Array]\"===a)r&&0!==e.dump.length?(y(e,t,e.dump,i),s&&(e.dump=\"&ref_\"+o+(0===t?\"\\n\":\"\")+e.dump)):(h(e,t,e.dump),s&&(e.dump=\"&ref_\"+o+\" \"+e.dump));else{if(\"[object String]\"!==a){if(e.skipInvalid)return!1;throw new N(\"unacceptable kind of an object to dump \"+a)}\"?\"!==e.tag&&l(e,e.dump,t)}null!==e.tag&&\"?\"!==e.tag&&(e.dump=\"!<\"+e.tag+\"> \"+e.dump)}return!0}function S(e,t){var n,r,i=[],a=[];for(A(e,i,a),n=0,r=a.length;n<r;n+=1)t.duplicates.push(i[a[n]]);t.usedDuplicates=new Array(r)}function A(e,t,n){var r,i,a;x.call(e);if(null!==e&&\"object\"==typeof e)if(-1!==(i=t.indexOf(e)))-1===n.indexOf(i)&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)A(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)A(e[r[i]],t,n)}function T(e,t){t=t||{};var n=new a(t);return S(e,n),b(n,0,e,!0,!0)?n.dump+\"\\n\":\"\"}function E(e,t){return T(e,C.extend({schema:k},t))}var C=n(38),N=n(68),w=n(170),k=n(100),x=Object.prototype.toString,R=Object.prototype.hasOwnProperty,I=9,D=10,M=13,P=32,L=33,O=34,U=35,F=37,B=38,K=39,V=42,j=44,W=45,q=58,z=62,H=63,Y=64,J=91,G=93,X=96,$=123,Q=124,Z=125,ee={};ee[0]=\"\\\\0\",ee[7]=\"\\\\a\",ee[8]=\"\\\\b\",ee[9]=\"\\\\t\",ee[10]=\"\\\\n\",ee[11]=\"\\\\v\",ee[12]=\"\\\\f\",ee[13]=\"\\\\r\",ee[27]=\"\\\\e\",ee[34]='\\\\\"',ee[92]=\"\\\\\\\\\",ee[133]=\"\\\\N\",ee[160]=\"\\\\_\",ee[8232]=\"\\\\L\",ee[8233]=\"\\\\P\";var te=[\"y\",\"Y\",\"yes\",\"Yes\",\"YES\",\"on\",\"On\",\"ON\",\"n\",\"N\",\"no\",\"No\",\"NO\",\"off\",\"Off\",\"OFF\"];c.prototype.takeUpTo=function(e){var t;if(e<this.checkpoint)throw t=new Error(\"position should be > checkpoint\"),t.position=e,t.checkpoint=this.checkpoint,t;return this.result+=this.source.slice(this.checkpoint,e),this.checkpoint=e,this},c.prototype.escapeChar=function(){var e,t;return e=this.source.charCodeAt(this.checkpoint),t=ee[e]||i(e),this.result+=t,this.checkpoint+=1,this},c.prototype.finish=function(){this.source.length>this.checkpoint&&this.takeUpTo(this.source.length)},t.dump=T,t.safeDump=E},function(e,t,n){\"use strict\";function r(e){return 10===e||13===e}function i(e){return 9===e||32===e}function a(e){return 9===e||32===e||10===e||13===e}function o(e){return 44===e||91===e||93===e||123===e||125===e}function s(e){var t;return 48<=e&&e<=57?e-48:(t=32|e,97<=t&&t<=102?t-97+10:-1)}function u(e){return 120===e?2:117===e?4:85===e?8:0}function c(e){return 48<=e&&e<=57?e-48:-1}function l(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10),56320+(e-65536&1023))}function p(e,t){return new V(t,new j(e.filename,e.input,e.position,e.line-1,e.position-e.lineStart))}function f(e,t,n){var r=g(e,t);if(r){var i=n+t;if(!e.errorMap[i]){var a=new j(e.filename,e.input,t,r.line-1,t-r.start),o=new V(n,a);e.errors.push(o)}}}function d(e,t){var n=p(e,t),r=n.message+n.mark.position;e.errorMap[r]||(e.errors.push(n),e.errorMap[r]=1);for(var i=e.position;;){if(e.position>=e.input.length-1)return;var a=e.input.charAt(e.position);if(\"\\n\"==a)return void(--e.position==i&&(e.position+=1));if(\"\\r\"==a)return void(--e.position==i&&(e.position+=1));e.position++}}function m(e,t){var n=p(e,t);e.onWarning&&e.onWarning.call(null,n)}function h(e,t,n,r){var i,a,o,s,u=e.result;if(u.startPosition==-1&&(u.startPosition=t),t<=n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)9===(o=s.charCodeAt(i))||32<=o&&o<=1114111||d(e,\"expected valid JSON character\");u.value+=s,u.endPosition=n}}function y(e,t,n,r,i){if(null!=r){null===t&&(t={startPosition:r.startPosition,endPosition:i.endPosition,parent:null,errors:[],mappings:[],kind:B.Kind.MAP});var a=B.newMapping(r,i);return a.parent=t,r.parent=a,null!=i&&(i.parent=a),!e.ignoreDuplicateKeys&&t.mappings.forEach(function(t){t.key&&t.key.value===(a.key&&a.key.value)&&(f(e,a.key.startPosition,\"duplicate key\"),f(e,t.key.startPosition,\"duplicate key\"))}),t.mappings.push(a),t.endPosition=i?i.endPosition:r.endPosition+1,t}}function _(e){var t;t=e.input.charCodeAt(e.position),10===t?e.position++:13===t?(e.position++,10===e.input.charCodeAt(e.position)&&e.position++):d(e,\"a line break is expected\"),e.line+=1,e.lineStart=e.position,e.lines.push({start:e.lineStart,line:e.line})}function g(e,t){for(var n,r=0;r<e.lines.length&&!(e.lines[r].start>t);r++)n=e.lines[r];return n?n:{start:0,line:0}}function v(e,t,n){for(var a=0,o=e.input.charCodeAt(e.position);0!==o;){for(;i(o);)o=e.input.charCodeAt(++e.position);if(t&&35===o)do{o=e.input.charCodeAt(++e.position)}while(10!==o&&13!==o&&0!==o);if(!r(o))break;for(_(e),o=e.input.charCodeAt(e.position),a++,e.lineIndent=0;32===o;)e.lineIndent++,o=e.input.charCodeAt(++e.position)}return-1!==n&&0!==a&&e.lineIndent<n&&m(e,\"deficient indentation\"),a}function b(e){var t,n=e.position;return!(45!==(t=e.input.charCodeAt(n))&&46!==t||e.input.charCodeAt(n+1)!==t||e.input.charCodeAt(n+2)!==t||(n+=3,0!==(t=e.input.charCodeAt(n))&&!a(t)))}function S(e,t,n){1===n?t.value+=\" \":n>1&&(t.value+=K.repeat(\"\\n\",n-1))}function A(e,t,n){var s,u,c,l,p,f,d,m,y,_=e.kind,g=e.result,A=B.newScalar();if(A.plainScalar=!0,e.result=A,y=e.input.charCodeAt(e.position),a(y)||o(y)||35===y||38===y||42===y||33===y||124===y||62===y||39===y||34===y||37===y||64===y||96===y)return!1;if((63===y||45===y)&&(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u)))return!1;for(e.kind=\"scalar\",c=l=e.position,p=!1;0!==y;){if(58===y){if(u=e.input.charCodeAt(e.position+1),a(u)||n&&o(u))break}else if(35===y){if(s=e.input.charCodeAt(e.position-1),a(s))break}else{if(e.position===e.lineStart&&b(e)||n&&o(y))break;if(r(y)){if(f=e.line,d=e.lineStart,m=e.lineIndent,v(e,!1,-1),e.lineIndent>=t){p=!0,y=e.input.charCodeAt(e.position);continue}e.position=l,e.line=f,e.lineStart=d,e.lineIndent=m;break}}if(p&&(h(e,c,l,!1),S(e,A,e.line-f),c=l=e.position,p=!1),i(y)||(l=e.position+1),y=e.input.charCodeAt(++e.position),e.position>=e.input.length)return!1}return h(e,c,l,!1),e.result.startPosition!=-1?(A.rawValue=e.input.substring(A.startPosition,A.endPosition),!0):(e.kind=_,e.result=g,!1)}function T(e,t){var n,i,a;if(39!==(n=e.input.charCodeAt(e.position)))return!1;var o=B.newScalar();for(e.kind=\"scalar\",e.result=o,o.startPosition=e.position,e.position++,i=a=e.position;0!==(n=e.input.charCodeAt(e.position));)if(39===n){if(h(e,i,e.position,!0),n=e.input.charCodeAt(++e.position),o.endPosition=e.position,39!==n)return!0;i=a=e.position,e.position++}else r(n)?(h(e,i,a,!0),S(e,o,v(e,!1,t)),i=a=e.position):e.position===e.lineStart&&b(e)?d(e,\"unexpected end of the document within a single quoted scalar\"):(e.position++,a=e.position,o.endPosition=e.position);d(e,\"unexpected end of the stream within a single quoted scalar\")}function E(e,t){var n,i,a,o,c,p;if(34!==(p=e.input.charCodeAt(e.position)))return!1;e.kind=\"scalar\";var f=B.newScalar();for(f.doubleQuoted=!0,e.result=f,f.startPosition=e.position,e.position++,n=i=e.position;0!==(p=e.input.charCodeAt(e.position));){if(34===p)return h(e,n,e.position,!0),e.position++,f.endPosition=e.position,f.rawValue=e.input.substring(f.startPosition,f.endPosition),!0;if(92===p){if(h(e,n,e.position,!0),p=e.input.charCodeAt(++e.position),r(p))v(e,!1,t);else if(p<256&&(e.allowAnyEscape?oe[p]:ie[p]))f.value+=e.allowAnyEscape?se[p]:ae[p],e.position++;else if((c=u(p))>0){for(a=c,o=0;a>0;a--)p=e.input.charCodeAt(++e.position),(c=s(p))>=0?o=(o<<4)+c:d(e,\"expected hexadecimal character\");f.value+=l(o),e.position++}else d(e,\"unknown escape sequence\");n=i=e.position}else r(p)?(h(e,n,i,!0),S(e,f,v(e,!1,t)),n=i=e.position):e.position===e.lineStart&&b(e)?d(e,\"unexpected end of the document within a double quoted scalar\"):(e.position++,i=e.position)}d(e,\"unexpected end of the stream within a double quoted scalar\")}function C(e,t){var n,r,i,o,s,u,c,l,p,f,m,h=!0,_=e.tag,g=e.anchor;if(91===(m=e.input.charCodeAt(e.position)))o=93,c=!1,r=B.newItems(),r.startPosition=e.position;else{if(123!==m)return!1;o=125,c=!0,r=B.newMap(),r.startPosition=e.position}for(null!==e.anchor&&(r.anchorId=e.anchor,e.anchorMap[e.anchor]=r),m=e.input.charCodeAt(++e.position);0!==m;){if(v(e,!0,t),(m=e.input.charCodeAt(e.position))===o)return e.position++,e.tag=_,e.anchor=g,e.kind=c?\"mapping\":\"sequence\",e.result=r,r.endPosition=e.position,!0;if(!h){var b=e.position;d(e,\"missed comma between flow collection entries\"),e.position=b+1}if(p=l=f=null,s=u=!1,63===m&&(i=e.input.charCodeAt(e.position+1),a(i)&&(s=u=!0,e.position++,v(e,!0,t))),n=e.line,D(e,t,H,!1,!0),p=e.tag,l=e.result,v(e,!0,t),m=e.input.charCodeAt(e.position),!u&&e.line!==n||58!==m||(s=!0,m=e.input.charCodeAt(++e.position),v(e,!0,t),D(e,t,H,!1,!0),f=e.result),c)y(e,r,p,l,f);else if(s){var S=y(e,null,p,l,f);S.parent=r,r.items.push(S)}else l.parent=r,r.items.push(l);r.endPosition=e.position+1,v(e,!0,t),m=e.input.charCodeAt(e.position),44===m?(h=!0,m=e.input.charCodeAt(++e.position)):h=!1}d(e,\"unexpected end of the stream within a flow collection\")}function N(e,t){var n,a,o,s,u=X,l=!1,p=t,f=0,m=!1;if(124===(s=e.input.charCodeAt(e.position)))a=!1;else{if(62!==s)return!1;a=!0}var y=B.newScalar();for(e.kind=\"scalar\",e.result=y,y.startPosition=e.position;0!==s;)if(43===(s=e.input.charCodeAt(++e.position))||45===s)X===u?u=43===s?Q:$:d(e,\"repeat of a chomping mode identifier\");else{if(!((o=c(s))>=0))break;0===o?d(e,\"bad explicit indentation width of a block scalar; it cannot be less than one\"):l?d(e,\"repeat of an indentation width identifier\"):(p=t+o-1,l=!0)}if(i(s)){do{s=e.input.charCodeAt(++e.position)}while(i(s));if(35===s)do{s=e.input.charCodeAt(++e.position)}while(!r(s)&&0!==s)}for(;0!==s;){for(_(e),e.lineIndent=0,s=e.input.charCodeAt(e.position);(!l||e.lineIndent<p)&&32===s;)e.lineIndent++,s=e.input.charCodeAt(++e.position);if(!l&&e.lineIndent>p&&(p=e.lineIndent),r(s))f++;else{if(e.lineIndent<p){u===Q?y.value+=K.repeat(\"\\n\",f):u===X&&l&&(y.value+=\"\\n\");break}for(a?i(s)?(m=!0,y.value+=K.repeat(\"\\n\",f+1)):m?(m=!1,y.value+=K.repeat(\"\\n\",f+1)):0===f?l&&(y.value+=\" \"):y.value+=K.repeat(\"\\n\",f):l&&(y.value+=K.repeat(\"\\n\",f+1)),l=!0,f=0,n=e.position;!r(s)&&0!==s;)s=e.input.charCodeAt(++e.position);h(e,n,e.position,!1)}}y.endPosition=e.position;for(var g=e.position-1;;){var v=e.input[g];if(\"\\r\"==v||\"\\n\"==v)break;if(\" \"!=v&&\"\\t\"!=v)break;g--}return y.endPosition=g,y.rawValue=e.input.substring(y.startPosition,y.endPosition),!0}function w(e,t){var n,r,i,o=e.tag,s=e.anchor,u=B.newItems(),c=!1;for(null!==e.anchor&&(u.anchorId=e.anchor,e.anchorMap[e.anchor]=u),u.startPosition=e.position,i=e.input.charCodeAt(e.position);0!==i&&45===i&&(r=e.input.charCodeAt(e.position+1),a(r));)if(c=!0,e.position++,v(e,!0,-1)&&e.lineIndent<=t)u.items.push(null),i=e.input.charCodeAt(e.position);else if(n=e.line,D(e,t,J,!1,!0),e.result.parent=u,u.items.push(e.result),v(e,!0,-1),i=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==i)d(e,\"bad indentation of a sequence entry\");else if(e.lineIndent<t)break;return u.endPosition=e.position,!!c&&(e.tag=o,e.anchor=s,e.kind=\"sequence\",e.result=u,u.endPosition=e.position,!0)}function k(e,t,n){var o,s,u,c,l=e.tag,p=e.anchor,f=B.newMap(),m=null,h=null,_=null,g=!1,b=!1;for(f.startPosition=e.position,null!==e.anchor&&(f.anchorId=e.anchor,e.anchorMap[e.anchor]=f),c=e.input.charCodeAt(e.position);0!==c;){if(o=e.input.charCodeAt(e.position+1),u=e.line,63!==c&&58!==c||!a(o)){if(!D(e,n,Y,!1,!0))break;if(e.line===u){for(c=e.input.charCodeAt(e.position);i(c);)c=e.input.charCodeAt(++e.position);if(58===c)c=e.input.charCodeAt(++e.position),a(c)||d(e,\"a whitespace character is expected after the key-value separator within a block mapping\"),g&&(y(e,f,m,h,null),m=h=_=null),b=!0,g=!1,s=!1,m=e.tag,h=e.result;else{if(!b)return e.tag=l,e.anchor=p,!0;d(e,\"can not read an implicit mapping pair; a colon is missed\")}}else{if(!b)return e.tag=l,e.anchor=p,!0;for(d(e,\"can not read a block mapping entry; a multiline key may not be an implicit key\");e.position>0;)if(c=e.input.charCodeAt(--e.position),r(c)){e.position++;break}}}else 63===c?(g&&(y(e,f,m,h,null),m=h=_=null),b=!0,g=!0,s=!0):g?(g=!1,s=!0):d(e,\"incomplete explicit mapping pair; a key node is missed\"),e.position+=1,c=o;if((e.line===u||e.lineIndent>t)&&(D(e,t,G,!0,s)&&(g?h=e.result:_=e.result),g||(y(e,f,m,h,_),m=h=_=null),v(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)d(e,\"bad indentation of a mapping entry\");else if(e.lineIndent<t)break}return g&&y(e,f,m,h,null),b&&(e.tag=l,e.anchor=p,e.kind=\"mapping\",e.result=f),b}function x(e){var t,n,r,i,o=!1,s=!1;if(33!==(i=e.input.charCodeAt(e.position)))return!1;if(null!==e.tag&&d(e,\"duplication of a tag property\"),i=e.input.charCodeAt(++e.position),60===i?(o=!0,i=e.input.charCodeAt(++e.position)):33===i?(s=!0,n=\"!!\",i=e.input.charCodeAt(++e.position)):n=\"!\",t=e.position,o){do{i=e.input.charCodeAt(++e.position)}while(0!==i&&62!==i);e.position<e.length?(r=e.input.slice(t,e.position),i=e.input.charCodeAt(++e.position)):d(e,\"unexpected end of the stream within a verbatim tag\")}else{for(;0!==i&&!a(i);)33===i&&(s?d(e,\"tag suffix cannot contain exclamation marks\"):(n=e.input.slice(t-1,e.position+1),ne.test(n)||d(e,\"named tag handle cannot contain such characters\"),s=!0,t=e.position+1)),i=e.input.charCodeAt(++e.position);r=e.input.slice(t,e.position),te.test(r)&&d(e,\"tag suffix cannot contain flow indicator characters\")}return r&&!re.test(r)&&d(e,\"tag name cannot contain such characters: \"+r),o?e.tag=r:z.call(e.tagMap,n)?e.tag=e.tagMap[n]+r:\"!\"===n?e.tag=\"!\"+r:\"!!\"===n?e.tag=\"tag:yaml.org,2002:\"+r:d(e,'undeclared tag handle \"'+n+'\"'),!0}function R(e){var t,n;if(38!==(n=e.input.charCodeAt(e.position)))return!1;for(null!==e.anchor&&d(e,\"duplication of an anchor property\"),n=e.input.charCodeAt(++e.position),t=e.position;0!==n&&!a(n)&&!o(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&d(e,\"name of an anchor node must contain at least one character\"),e.anchor=e.input.slice(t,e.position),!0}function I(e){var t,n,r;e.length,e.input;if(42!==(r=e.input.charCodeAt(e.position)))return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!a(r)&&!o(r);)r=e.input.charCodeAt(++e.position);return e.position<=t&&(d(e,\"name of an alias node must contain at least one character\"),e.position=t+1),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||(d(e,'unidentified alias \"'+n+'\"'),e.position<=t&&(e.position=t+1)),e.result=B.newAnchorRef(n,t,e.position,e.anchorMap[n]),v(e,!0,-1),!0}function D(e,t,n,r,i){var a,o,s,u,c,l,p,f,h=1,y=!1,_=!1;if(e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=G===n||J===n,r&&v(e,!0,-1)&&(y=!0,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)),1===h)for(;x(e)||R(e);)v(e,!0,-1)?(y=!0,s=a,e.lineIndent>t?h=1:e.lineIndent===t?h=0:e.lineIndent<t&&(h=-1)):s=!1;if(s&&(s=y||i),1!==h&&G!==n||(p=H===n||Y===n?t:t+1,f=e.position-e.lineStart,1===h?s&&(w(e,f)||k(e,f,p))||C(e,p)?_=!0:(o&&N(e,p)||T(e,p)||E(e,p)?_=!0:I(e)?(_=!0,null===e.tag&&null===e.anchor||d(e,\"alias node should not have any properties\")):A(e,p,H===n)&&(_=!0,null===e.tag&&(e.tag=\"?\")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result,e.result.anchorId=e.anchor)):0===h&&(_=s&&w(e,f))),null!==e.tag&&\"!\"!==e.tag)if(\"!include\"==e.tag)e.result||(e.result=B.newScalar(),e.result.startPosition=e.position,e.result.endPosition=e.position,d(e,\"!include without value\")),e.result.kind=B.Kind.INCLUDE_REF;else if(\"?\"===e.tag)for(u=0,c=e.implicitTypes.length;u<c;u+=1){l=e.implicitTypes[u];var g=e.result.value;if(l.resolve(g)){e.result.valueObject=l.construct(e.result.value),e.tag=l.tag,null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result);break}}else z.call(e.typeMap,e.tag)?(l=e.typeMap[e.tag],null!==e.result&&l.kind!==e.kind&&d(e,\"unacceptable node kind for !<\"+e.tag+'> tag; it should be \"'+l.kind+'\", not \"'+e.kind+'\"'),l.resolve(e.result)?(e.result=l.construct(e.result),null!==e.anchor&&(e.result.anchorId=e.anchor,e.anchorMap[e.anchor]=e.result)):d(e,\"cannot resolve a node with !<\"+e.tag+\"> explicit tag\")):m(e,\"unknown tag !<\"+e.tag+\">\");return null!==e.tag||null!==e.anchor||_}function M(e){var t,n,o,s,u=e.position,c=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(s=e.input.charCodeAt(e.position))&&(v(e,!0,-1),s=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==s));){for(c=!0,s=e.input.charCodeAt(++e.position),t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);for(n=e.input.slice(t,e.position),o=[],n.length<1&&d(e,\"directive name must not be less than one character in length\");0!==s;){for(;i(s);)s=e.input.charCodeAt(++e.position);if(35===s){do{s=e.input.charCodeAt(++e.position)}while(0!==s&&!r(s));break}if(r(s))break;for(t=e.position;0!==s&&!a(s);)s=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==s&&_(e),z.call(le,n)?le[n](e,n,o):(m(e,'unknown document directive \"'+n+'\"'),e.position++)}if(v(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,v(e,!0,-1)):c&&d(e,\"directives end mark is expected\"),D(e,e.lineIndent-1,G,!1,!0),v(e,!0,-1),e.checkLineBreaks&&ee.test(e.input.slice(u,e.position))&&m(e,\"non-ASCII line breaks are interpreted as content\"),e.documents.push(e.result),e.position===e.lineStart&&b(e))return void(46===e.input.charCodeAt(e.position)&&(e.position+=3,v(e,!0,-1)));e.position<e.length-1&&d(e,\"end of the stream or a document separator is expected\")}function P(e,t){e=String(e),t=t||{},0!==e.length&&(10!==e.charCodeAt(e.length-1)&&13!==e.charCodeAt(e.length-1)&&(e+=\"\\n\"),65279===e.charCodeAt(0)&&(e=e.slice(1)));var n=new ce(e,t);for(Z.test(n.input)&&d(n,\"the stream contains non-printable characters\"),n.input+=\"\\0\";32===n.input.charCodeAt(n.position);)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;){var r=n.position;if(M(n),n.position<=r)for(;n.position<n.length-1;n.position++){var i=n.input.charAt(n.position);if(\"\\n\"==i)break}}return n.documents.forEach(function(e){return e.errors=n.errors}),n.documents}function L(e,t,n){var r,i,a=P(e,n);for(r=0,i=a.length;r<i;r+=1)t(a[r])}function O(e,t){var n=P(e,t);if(0!==n.length){if(1===n.length){var r=n[0];return r.endPosition=e.length,r.startPosition>r.endPosition&&(r.startPosition=r.endPosition),r}var i=new V(\"expected a single document in the stream, but found more\");return i.mark=new j(\"\",\"\",0,0,0),i.mark.position=n[0].endPosition,n[0].errors.push(i),n[0]}}function U(e,t,n){L(e,t,K.extend({schema:W},n))}function F(e,t){return O(e,K.extend({schema:W},t))}for(var B=n(399),K=n(38),V=n(68),j=n(380),W=n(100),q=n(170),z=Object.prototype.hasOwnProperty,H=1,Y=2,J=3,G=4,X=1,$=2,Q=3,Z=/[\\x00-\\x08\\x0B\\x0C\\x0E-\\x1F\\x7F-\\x84\\x86-\\x9F\\uD800-\\uDFFF\\uFFFE\\uFFFF]/,ee=/[\\x85\\u2028\\u2029]/,te=/[,\\[\\]\\{\\}]/,ne=/^(?:!|!!|![a-z\\-]+!)$/i,re=/^(?:!|[^,\\[\\]\\{\\}])(?:%[0-9a-f]{2}|[0-9a-z\\-#;\\/\\?:@&=\\+\\$,_\\.!~\\*'\\(\\)\\[\\]])*$/i,ie=new Array(256),ae=new Array(256),oe=new Array(256),se=new Array(256),ue=0;ue<256;ue++)se[ue]=ae[ue]=function(e){return 48===e?\"\\0\":97===e?\"\u0007\":98===e?\"\\b\":116===e?\"\\t\":9===e?\"\\t\":110===e?\"\\n\":118===e?\"\\v\":102===e?\"\\f\":114===e?\"\\r\":101===e?\"\u001b\":32===e?\" \":34===e?'\"':47===e?\"/\":92===e?\"\\\\\":78===e?\"\":95===e?\" \":76===e?\"\\u2028\":80===e?\"\\u2029\":\"\"}(ue),ie[ue]=ae[ue]?1:0,oe[ue]=1,ie[ue]||(se[ue]=\"\\\\\"+String.fromCharCode(ue));var ce=function(){function e(e,t){this.errorMap={},this.errors=[],this.lines=[],this.input=e,this.filename=t.filename||null,this.schema=t.schema||q,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.allowAnyEscape=t.allowAnyEscape||!1,this.ignoreDuplicateKeys=t.ignoreDuplicateKeys||!1,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}return e}(),le={YAML:function(e,t,n){var r,i,a;null!==e.version&&d(e,\"duplication of %YAML directive\"),1!==n.length&&d(e,\"YAML directive accepts exactly one argument\"),r=/^([0-9]+)\\.([0-9]+)$/.exec(n[0]),null===r&&d(e,\"ill-formed argument of the YAML directive\"),i=parseInt(r[1],10),a=parseInt(r[2],10),1!==i&&d(e,\"found incompatible YAML document (version 1.2 is required)\"),e.version=n[0],e.checkLineBreaks=a<2,2!==a&&d(e,\"found incompatible YAML document (version 1.2 is required)\")},TAG:function(e,t,n){var r,i;2!==n.length&&d(e,\"TAG directive accepts exactly two arguments\"),r=n[0],i=n[1],ne.test(r)||d(e,\"ill-formed tag handle (first argument) of the TAG directive\"),z.call(e.tagMap,r)&&d(e,'there is a previously declared suffix for \"'+r+'\" tag handle'),re.test(i)||d(e,\"ill-formed tag prefix (second argument) of the TAG directive\"),e.tagMap[r]=i}};!function(){function e(){}e}();t.loadAll=L,t.load=O,t.safeLoadAll=U,t.safeLoad=F,e.exports.loadAll=L,e.exports.load=O,e.exports.safeLoadAll=U,e.exports.safeLoad=F},function(e,t,n){\"use strict\";var r=n(38),i=function(){function e(e,t,n,r,i){this.name=e,this.buffer=t,this.position=n,this.line=r,this.column=i}return e.prototype.getSnippet=function(e,t){void 0===e&&(e=0),void 0===t&&(t=75);var n,i,a,o,s;if(!this.buffer)return null;for(e=e||4,t=t||75,n=\"\",i=this.position;i>0&&-1===\"\\0\\r\\n\\u2028\\u2029\".indexOf(this.buffer.charAt(i-1));)if(i-=1,this.position-i>t/2-1){n=\" ... \",i+=5;break}for(a=\"\",o=this.position;o<this.buffer.length&&-1===\"\\0\\r\\n\\u2028\\u2029\".indexOf(this.buffer.charAt(o));)if((o+=1)-this.position>t/2-1){a=\" ... \",o-=5;break}return s=this.buffer.slice(i,o),r.repeat(\" \",e)+n+s+a+\"\\n\"+r.repeat(\" \",e+this.position-i+n.length)+\"^\"},e.prototype.toString=function(e){void 0===e&&(e=!0);var t,n=\"\";return this.name&&(n+='in \"'+this.name+'\" '),n+=\"at line \"+(this.line+1)+\", column \"+(this.column+1),e||(t=this.getSnippet())&&(n+=\":\\n\"+t),n},e}();e.exports=i},function(e,t,n){\"use strict\";var r=n(49);e.exports=new r({include:[n(383)]})},function(e,t,n){\"use strict\";var r=n(49);e.exports=new r({explicit:[n(397),n(395),n(390)]})},function(e,t,n){\"use strict\";var r=n(49);e.exports=new r({include:[n(382)],implicit:[n(392),n(385),n(387),n(386)]})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!1;var t,n,r=0,i=e.length,a=c;for(n=0;n<i;n++)if(!((t=a.indexOf(e.charAt(n)))>64)){if(t<0)return!1;r+=6}return r%8==0}function i(e){var t,n,r=e.replace(/[\\r\\n=]/g,\"\"),i=r.length,a=c,o=0,u=[];for(t=0;t<i;t++)t%4==0&&t&&(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,0===n?(u.push(o>>16&255),u.push(o>>8&255),u.push(255&o)):18===n?(u.push(o>>10&255),u.push(o>>2&255)):12===n&&u.push(o>>4&255),s?new s(u):u}function a(e){var t,n,r=\"\",i=0,a=e.length,o=c;for(t=0;t<a;t++)t%3==0&&t&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+e[t];return n=a%3,0===n?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===n?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===n&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function o(e){return s&&s.isBuffer(e)}var s=n(16).Buffer,u=n(10),c=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\\n\\r\";e.exports=new u(\"tag:yaml.org,2002:binary\",{kind:\"scalar\",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!1;var t=e.length;return 4===t&&(\"true\"===e||\"True\"===e||\"TRUE\"===e)||5===t&&(\"false\"===e||\"False\"===e||\"FALSE\"===e)}function i(e){return\"true\"===e||\"True\"===e||\"TRUE\"===e}function a(e){return\"[object Boolean]\"===Object.prototype.toString.call(e)}var o=n(10);e.exports=new o(\"tag:yaml.org,2002:bool\",{kind:\"scalar\",resolve:r,construct:i,predicate:a,represent:{lowercase:function(e){return e?\"true\":\"false\"},uppercase:function(e){return e?\"TRUE\":\"FALSE\"},camelcase:function(e){return e?\"True\":\"False\"}},defaultStyle:\"lowercase\"})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!1;return!!c.test(e)}function i(e){var t,n,r,i;return t=e.replace(/_/g,\"\").toLowerCase(),n=\"-\"===t[0]?-1:1,i=[],0<=\"+-\".indexOf(t[0])&&(t=t.slice(1)),\".inf\"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:\".nan\"===t?NaN:0<=t.indexOf(\":\")?(t.split(\":\").forEach(function(e){i.unshift(parseFloat(e,10))}),t=0,r=1,i.forEach(function(e){t+=e*r,r*=60}),n*t):n*parseFloat(t,10)}function a(e,t){if(isNaN(e))switch(t){case\"lowercase\":return\".nan\";case\"uppercase\":return\".NAN\";case\"camelcase\":return\".NaN\"}else if(Number.POSITIVE_INFINITY===e)switch(t){case\"lowercase\":return\".inf\";case\"uppercase\":return\".INF\";case\"camelcase\":return\".Inf\"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case\"lowercase\":return\"-.inf\";case\"uppercase\":return\"-.INF\";case\"camelcase\":return\"-.Inf\"}else if(s.isNegativeZero(e))return\"-0.0\";return e.toString(10)}function o(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&(0!=e%1||s.isNegativeZero(e))}var s=n(38),u=n(10),c=new RegExp(\"^(?:[-+]?(?:[0-9][0-9_]*)\\\\.[0-9_]*(?:[eE][-+][0-9]+)?|\\\\.[0-9_]+(?:[eE][-+][0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\\\.[0-9_]*|[-+]?\\\\.(?:inf|Inf|INF)|\\\\.(?:nan|NaN|NAN))$\");e.exports=new u(\"tag:yaml.org,2002:float\",{kind:\"scalar\",resolve:r,construct:i,predicate:o,represent:a,defaultStyle:\"lowercase\"})},function(e,t,n){\"use strict\";function r(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}function o(e){if(null===e)return!1;var t,n=e.length,o=0,s=!1;if(!n)return!1;if(t=e[o],\"-\"!==t&&\"+\"!==t||(t=e[++o]),\"0\"===t){if(o+1===n)return!0;if(\"b\"===(t=e[++o])){for(o++;o<n;o++)if(\"_\"!==(t=e[o])){if(\"0\"!==t&&\"1\"!==t)return!1;s=!0}return s}if(\"x\"===t){for(o++;o<n;o++)if(\"_\"!==(t=e[o])){if(!r(e.charCodeAt(o)))return!1;s=!0}return s}for(;o<n;o++)if(\"_\"!==(t=e[o])){if(!i(e.charCodeAt(o)))return!1;s=!0}return s}for(;o<n;o++)if(\"_\"!==(t=e[o])){if(\":\"===t)break;if(!a(e.charCodeAt(o)))return!1;s=!0}return!!s&&(\":\"!==t||/^(:[0-5]?[0-9])+$/.test(e.slice(o)))}function s(e){var t,n,r=e,i=1,a=[];return r.indexOf(\"_\")!==-1&&(r=r.replace(/_/g,\"\")),t=r[0],\"-\"!==t&&\"+\"!==t||(\"-\"===t&&(i=-1),r=r.slice(1),t=r[0]),\"0\"===r?0:\"0\"===t?\"b\"===r[1]?i*parseInt(r.slice(2),2):\"x\"===r[1]?i*parseInt(r,16):i*parseInt(r,8):r.indexOf(\":\")!==-1?(r.split(\":\").forEach(function(e){a.unshift(parseInt(e,10))}),r=0,n=1,a.forEach(function(e){r+=e*n,n*=60}),i*r):i*parseInt(r,10)}function u(e){return\"[object Number]\"===Object.prototype.toString.call(e)&&0==e%1&&!c.isNegativeZero(e)}var c=n(38),l=n(10);e.exports=new l(\"tag:yaml.org,2002:int\",{kind:\"scalar\",resolve:o,construct:s,predicate:u,represent:{binary:function(e){return\"0b\"+e.toString(2)},octal:function(e){return\"0\"+e.toString(8)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return\"0x\"+e.toString(16).toUpperCase()}},defaultStyle:\"decimal\",styleAliases:{binary:[2,\"bin\"],octal:[8,\"oct\"],decimal:[10,\"dec\"],hexadecimal:[16,\"hex\"]}})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!1;if(0===e.length)return!1;var t=e,n=/\\/([gim]*)$/.exec(e),r=\"\";if(\"/\"===t[0]){if(n&&(r=n[1]),r.length>3)return!1;if(\"/\"!==t[t.length-r.length-1])return!1;t=t.slice(1,t.length-r.length-1)}try{new RegExp(t,r);return!0}catch(e){return!1}}function i(e){var t=e,n=/\\/([gim]*)$/.exec(e),r=\"\";return\"/\"===t[0]&&(n&&(r=n[1]),t=t.slice(1,t.length-r.length-1)),new RegExp(t,r)}function a(e){var t=\"/\"+e.source+\"/\";return e.global&&(t+=\"g\"),e.multiline&&(t+=\"m\"),e.ignoreCase&&(t+=\"i\"),t}function o(e){return\"[object RegExp]\"===Object.prototype.toString.call(e)}var s=n(10);e.exports=new s(\"tag:yaml.org,2002:js/regexp\",{kind:\"scalar\",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){\"use strict\";function r(){return!0}function i(){}function a(){return\"\"}function o(e){return void 0===e}var s=n(10);e.exports=new s(\"tag:yaml.org,2002:js/undefined\",{kind:\"scalar\",resolve:r,construct:i,predicate:o,represent:a})},function(e,t,n){\"use strict\";var r=n(10);e.exports=new r(\"tag:yaml.org,2002:map\",{kind:\"mapping\",construct:function(e){return null!==e?e:{}}})},function(e,t,n){\"use strict\";function r(e){return\"<<\"===e||null===e}var i=n(10);e.exports=new i(\"tag:yaml.org,2002:merge\",{kind:\"scalar\",resolve:r})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!0;var t=e.length;return 1===t&&\"~\"===e||4===t&&(\"null\"===e||\"Null\"===e||\"NULL\"===e)}function i(){return null}function a(e){return null===e}var o=n(10);e.exports=new o(\"tag:yaml.org,2002:null\",{kind:\"scalar\",resolve:r,construct:i,predicate:a,represent:{canonical:function(){return\"~\"},lowercase:function(){return\"null\"},uppercase:function(){return\"NULL\"},camelcase:function(){return\"Null\"}},defaultStyle:\"lowercase\"})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!0;var t,n,r,i,a,u=[],c=e;for(t=0,n=c.length;t<n;t+=1){if(r=c[t],a=!1,\"[object Object]\"!==s.call(r))return!1;for(i in r)if(o.call(r,i)){if(a)return!1;a=!0}if(!a)return!1;if(-1!==u.indexOf(i))return!1;u.push(i)}return!0}function i(e){return null!==e?e:[]}var a=n(10),o=Object.prototype.hasOwnProperty,s=Object.prototype.toString;e.exports=new a(\"tag:yaml.org,2002:omap\",{kind:\"sequence\",resolve:r,construct:i})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!0;var t,n,r,i,a,s=e;for(a=new Array(s.length),t=0,n=s.length;t<n;t+=1){if(r=s[t],\"[object Object]\"!==o.call(r))return!1;if(i=Object.keys(r),1!==i.length)return!1;a[t]=[i[0],r[i[0]]]}return!0}function i(e){if(null===e)return[];var t,n,r,i,a,o=e;for(a=new Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}var a=n(10),o=Object.prototype.toString;e.exports=new a(\"tag:yaml.org,2002:pairs\",{kind:\"sequence\",resolve:r,construct:i})},function(e,t,n){\"use strict\";var r=n(10);e.exports=new r(\"tag:yaml.org,2002:seq\",{kind:\"sequence\",construct:function(e){return null!==e?e:[]}})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!0;var t,n=e;for(t in n)if(o.call(n,t)&&null!==n[t])return!1;return!0}function i(e){return null!==e?e:{}}var a=n(10),o=Object.prototype.hasOwnProperty;e.exports=new a(\"tag:yaml.org,2002:set\",{kind:\"mapping\",resolve:r,construct:i})},function(e,t,n){\"use strict\";var r=n(10);e.exports=new r(\"tag:yaml.org,2002:str\",{kind:\"scalar\",construct:function(e){return null!==e?e:\"\"}})},function(e,t,n){\"use strict\";function r(e){if(null===e)return!1;return null!==s.exec(e)}function i(e){var t,n,r,i,a,o,u,c,l,p,f=0,d=null;if(null===(t=s.exec(e)))throw new Error(\"Date resolve error\");if(n=+t[1],r=+t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],u=+t[6],t[7]){for(f=t[7].slice(0,3);f.length<3;)f+=\"0\";f=+f}return t[9]&&(c=+t[10],l=+(t[11]||0),d=6e4*(60*c+l),\"-\"===t[9]&&(d=-d)),p=new Date(Date.UTC(n,r,i,a,o,u,f)),d&&p.setTime(p.getTime()-d),p}function a(e){return e.toISOString()}var o=n(10),s=new RegExp(\"^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:(?:[Tt]|[ \\\\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\\\.([0-9]*))?(?:[ \\\\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?)?$\");e.exports=new o(\"tag:yaml.org,2002:timestamp\",{kind:\"scalar\",resolve:r,construct:i,instanceOf:Date,represent:a})},function(e,t,n){\"use strict\";function r(e,t){var n=t?t.endPosition:e.endPosition+1;return{key:e,value:t,startPosition:e.startPosition,endPosition:n,kind:c.MAPPING,parent:null,errors:[]}}function i(e,t,n,r){return{errors:[],referencesAnchor:e,value:r,startPosition:t,endPosition:n,kind:c.ANCHOR_REF,parent:null}}function a(e){return void 0===e&&(e=\"\"),{errors:[],startPosition:-1,endPosition:-1,value:e,kind:c.SCALAR,parent:null,doubleQuoted:!1,rawValue:e}}function o(){return{errors:[],startPosition:-1,endPosition:-1,items:[],kind:c.SEQ,parent:null}}function s(){return o()}function u(e){return{errors:[],startPosition:-1,endPosition:-1,mappings:e?e:[],kind:c.MAP,parent:null}}!function(e){e[e.SCALAR=0]=\"SCALAR\",e[e.MAPPING=1]=\"MAPPING\",e[e.MAP=2]=\"MAP\",e[e.SEQ=3]=\"SEQ\",e[e.ANCHOR_REF=4]=\"ANCHOR_REF\",e[e.INCLUDE_REF=5]=\"INCLUDE_REF\"}(t.Kind||(t.Kind={}));var c=t.Kind;t.newMapping=r,t.newAnchorRef=i,t.newScalar=a,t.newItems=o,t.newSeq=s,t.newMap=u},function(e,t,n){var r=n(171);e.exports=r},function(e,t){},function(e,t){},function(e,t){},function(e,t){}])});\n/* eslint-enable */\n"
  },
  {
    "path": "configs/web/api-flow-config.js",
    "content": "import Environment from '../../src/environments/web/Environment'\n\nimport SwaggerLoader from '../../src/loaders/swagger/Loader'\nimport RAMLLoader from '../../src/loaders/raml/Loader'\nimport PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader'\n\nimport SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser'\nimport RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser'\nimport PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser'\n\nimport SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer'\nimport RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer'\nimport PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer'\nimport InternalSerializer from '../../src/serializers/internal/Serializer'\n\nexport const loaders = [\n  SwaggerLoader,\n  RAMLLoader,\n  PostmanV2Loader\n]\n\nexport const parsers = [\n  SwaggerV2Parser,\n  RAMLV1Parser,\n  PostmanV2Parser\n]\n\nexport const serializers = [\n  SwaggerV2Serializer,\n  RAMLV1Serializer,\n  InternalSerializer,\n  PostmanV2Serializer\n]\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/web/api-flow.js",
    "content": "import flow from '../../src/api-flow'\n\nexport const ApiFlow = flow\n"
  },
  {
    "path": "configs/web/webpack.config.babel.js",
    "content": "const path = require('path')\n\nconst config = {\n  target: 'web',\n  entry: path.resolve(__dirname, './api-flow.js'),\n  output: {\n    path: path.resolve(__dirname, '../../dist/web/'),\n    filename: 'api-flow.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      { test: /\\.js$/, use: 'babel-loader', include: [ path.resolve(__dirname, '../../src') ] },\n      { test: /\\.json$/, use: 'json-loader', include: [ path.resolve(__dirname, '../../') ] }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js'),\n      'raml-1-parser': path.resolve(__dirname, '../shared/raml-1-parser.js')\n    }\n  },\n  node: {\n    fs: 'empty',\n    request: 'empty',\n    net: 'empty',\n    tls: 'empty'\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "configs/webworker/api-flow-config.js",
    "content": "import Environment from '../../src/environments/web/Environment'\n\nimport SwaggerLoader from '../../src/loaders/swagger/Loader'\nimport RAMLLoader from '../../src/loaders/raml/Loader'\nimport PostmanV2Loader from '../../src/loaders/postman/v2.0/Loader'\n\nimport SwaggerV2Parser from '../../src/parsers/swagger/v2.0/Parser'\nimport RAMLV1Parser from '../../src/parsers/raml/v1.0/Parser'\nimport PostmanV2Parser from '../../src/loaders/postman/v2.0/Parser'\n\nimport SwaggerV2Serializer from '../../src/serializers/swagger/v2.0/Serializer'\nimport RAMLV1Serializer from '../../src/serializers/raml/v1.0/Serializer'\nimport PostmanV2Serializer from '../../src/serializers/postman/v2.0/Serializer'\nimport InternalSerializer from '../../src/serializers/internal/Serializer'\n\nexport const loaders = [\n  SwaggerLoader,\n  RAMLLoader,\n  PostmanV2Loader\n]\n\nexport const parsers = [\n  SwaggerV2Parser,\n  RAMLV1Parser,\n  PostmanV2Parser\n]\n\nexport const serializers = [\n  SwaggerV2Serializer,\n  RAMLV1Serializer,\n  InternalSerializer,\n  PostmanV2Serializer\n]\n\nexport const environment = Environment\n"
  },
  {
    "path": "configs/webworker/api-flow.js",
    "content": "// TODO fix interface mismatch\nimport ApiFlow from '../../src/api-flow'\n\nconst methods = {}\n\nmethods.postSuccess = (action, extraneous) => {\n  return (data) => {\n    self.postMessage({\n      action,\n      success: true,\n      result: data,\n      ...extraneous\n    })\n  }\n}\n\nmethods.postError = (action, extraneous) => {\n  return (_error) => {\n    let error = _error\n\n    if (_error instanceof Error) {\n      error = _error.message || _error.name || 'unknown error'\n    }\n\n    self.postMessage({\n      action,\n      success: false,\n      error,\n      ...extraneous\n    })\n  }\n}\n\n  // TODO Handle Failures differently from Errors\nmethods.postFailure = (action, extraneous) => {\n  return (_error) => {\n    let error = _error\n\n    if (_error instanceof Error) {\n      error = _error.message || _error.name || 'unknown error'\n    }\n\n    self.postMessage({\n      action,\n      success: false,\n      error,\n      ...extraneous\n    })\n  }\n}\n\nmethods.extractTransformQuery = (parameters) => {\n  const valid = this.validateArguments(parameters)\n  if (!valid) {\n    return {\n      extraneous: parameters\n    }\n  }\n\n  const {\n          content,\n          source,\n          target,\n          ...extraneous\n      } = parameters\n\n  const flowOptions = {\n    source: {\n      name: source.format,\n      version: source.version\n    },\n    target: {\n      name: target.format,\n      version: target.version\n    }\n  }\n\n  return {\n    query: [ content, flowOptions ],\n    extraneous\n  }\n}\n\nmethods.extractDetectFormatQuery = (parameters) => {\n  const { content, ...extraneous } = parameters\n  return {\n    query: [ content ],\n    extraneous\n  }\n}\n\nmethods.extractDetectNameQuery = (parameters) => {\n  const { content, ...extraneous } = parameters\n  return {\n    query: [ content ],\n    extraneous\n  }\n}\n\nmethods.extractActionAndQuery = (data) => {\n  const { action, ...parameters } = data\n\n  const extractorMap = {\n    transform: methods.extractTransformQuery\n    /*\n    detectFormat: ::this.extractDetectFormatQuery,\n    detectName: ::this.extractDetectNameQuery\n    */\n  }\n\n  const extractor = extractorMap[action]\n\n  if (!extractor) {\n    return { extraneous: data }\n  }\n\n  const { query, ...extraneous } = extractor(parameters)\n\n  if (!query) {\n    return { extraneous }\n  }\n\n  return { action, query, extraneous }\n}\n\nmethods.processMessage = (msg) => {\n  if (!msg) {\n    methods.postError(null, null)('ApiFlow does not accept empty message')\n  }\n\n  const { action, query, extraneous } = this.extractActionAndQuery(msg.data)\n\n  if (!action || !query) {\n    methods.postError(action, extraneous)('Unrecognized action')\n  }\n  const actionMap = {\n    transform: ApiFlow.transform\n    /*\n    detectName: ::this.detectName,\n    detectFormat: ::this.detectFormat\n    */\n  }\n\n  const actor = actionMap[action]\n  if (!actor) {\n    // TODO send message about internal conflict\n    const error = 'Internal Error: ' +\n                  'ApiFlow did not find any actors for this action ' +\n                  'despite validating the action. This should not happen'\n    return methods.postFailure(action, extraneous)(error)\n  }\n\n  const promise = actor(...query)\n\n  promise\n    .then(methods.postSuccess(action, extraneous), methods.postError(action, extraneous))\n    .catch(methods.postFailure(action, extraneous))\n}\n\nself.onmessage = function() {\n  methods.processMessage(arguments)\n}\n\nexport default ApiFlow\n"
  },
  {
    "path": "configs/webworker/webpack.config.babel.js",
    "content": "const path = require('path')\n\nconst config = {\n  target: 'webworker',\n  entry: path.resolve(__dirname, './api-flow.js'),\n  output: {\n    path: path.resolve(__dirname, '../../../dist/node/'),\n    filename: 'api-flow.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    rules: [\n      {\n        test: /\\.js$/,\n        use: 'babel-loader',\n        include: [ path.resolve(__dirname, '../../src'), __dirname ]\n      },\n      { test: /\\.json$/, use: 'json-loader', include: [ path.resolve(__dirname, '../../') ] }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  resolve: {\n    alias: {\n      'api-flow-config$': path.resolve(__dirname, './api-flow-config.js'),\n      'raml-1-parser': path.resolve(__dirname, '../shared/raml-1-parser.js')\n    }\n  },\n  node: {\n    fs: false,\n    request: false,\n    net: false,\n    tls: false\n  }\n}\nmodule.exports = config\n"
  },
  {
    "path": "linting/dev.yaml",
    "content": "---\nextends: ./eslint_base.yaml\n\nrules:\n  no-debugger: 1\n  no-console: 1\n  no-unreachable: 1\n  no-unused-vars: 1\n  no-param-reassign: 1\n  max-len: 1\n"
  },
  {
    "path": "linting/eslint_base.yaml",
    "content": "---\nenv:\n  browser: true\n  node: true\n  es6: true\n  mocha: true\nparser: babel-eslint\nglobals:\n  ga: true\n  mixpanel: true\n  olark: true\n  Raven: true\nsettings:\n  flowtype:\n    onlyFilesWithFlowAnnotation: true\necmaFeatures:\n  arrowFunctions: true\n  binaryLiterals: true\n  blockBindings: true\n  classes: true\n  defaultParams: true\n  destructuring: true\n  forOf: true\n  generators: true\n  modules: true\n  objectLiteralComputedProperties: true\n  objectLiteralDuplicateProperties: true\n  objectLiteralShorthandMethods: true\n  objectLiteralShorthandProperties: true\n  octalLiterals: true\n  regexUFlag: true\n  regexYFlag: true\n  spread: true\n  superInFunctions: true\n  templateStrings: true\n  unicodeCodePointEscapes: true\n  globalReturn: true\n  jsx: true\nrules:\n  comma-dangle: 2\n  no-cond-assign: 2\n  no-console: 2\n  no-constant-condition: 2\n  no-control-regex: 2\n  no-debugger: 2\n  no-dupe-args: 2\n  no-dupe-keys: 2\n  no-duplicate-case: 2\n  no-empty: 2\n  no-empty-character-class: 2\n  no-ex-assign: 2\n  no-extra-boolean-cast: 2\n  no-extra-semi: 2\n  no-func-assign: 2\n  no-inner-declarations: 2\n  no-invalid-regexp: 2\n  no-irregular-whitespace: 2\n  no-negated-in-lhs: 2\n  no-obj-calls: 2\n  no-regex-spaces: 2\n  no-sparse-arrays: 2\n  no-unreachable: 2\n  use-isnan: 2\n  valid-jsdoc: 2\n  valid-typeof: 2\n  block-scoped-var: 0\n  complexity: 0\n  consistent-return: 0\n  curly: 2\n  default-case: 2\n  dot-notation: 2\n  eqeqeq: 2\n  guard-for-in: 2\n  no-alert: 0\n  no-caller: 2\n  no-div-regex: 2\n  no-else-return: 0 # nicer to have strong if/else logic\n  no-eq-null: 2\n  no-eval: 2\n  no-extend-native: 2\n  no-extra-bind: 2\n  no-fallthrough: 2\n  no-floating-decimal: 2\n  no-implied-eval: 2\n  no-iterator: 2\n  no-labels: 2\n  no-lone-blocks: 2\n  no-loop-func: 2\n  no-multi-spaces: 2\n  no-multi-str: 2\n  no-native-reassign: 2\n  no-new: 2\n  no-new-func: 2\n  no-new-wrappers: 2\n  no-octal: 2\n  no-octal-escape: 2\n  no-param-reassign: 2\n  no-process-env: 0\n  no-proto: 2\n  no-redeclare: 2\n  no-return-assign: 2\n  no-script-url: 2\n  no-self-compare: 2\n  no-sequences: 2\n  no-throw-literal: 2\n  no-unused-expressions: 2\n  no-void: 2\n  no-warning-comments:\n  - 0\n  - terms:\n    - todo\n    - fixme\n    location: start\n  no-with: 2\n  radix: 2\n  vars-on-top: 2\n  wrap-iife: 2\n  yoda: 2\n  strict: 0\n  no-catch-shadow: 2\n  no-delete-var: 2\n  no-label-var: 2\n  no-shadow: 2\n  no-shadow-restricted-names: 2\n  no-undef: 2\n  no-undef-init: 2\n  no-undefined: 2\n  no-unused-vars: 2\n  no-use-before-define: 2\n  indent:\n  - 1\n  - 2\n  - SwitchCase: 1\n  brace-style:\n  - 1\n  - stroustrup\n  - allowSingleLine: true\n  camelcase: 0\n  comma-spacing:\n  - 1\n  - before: false\n    after: true\n  comma-style:\n  - 1\n  - last\n  consistent-this:\n  - 1\n  - _this\n  eol-last: 1\n  func-names: 0\n  func-style: 0\n  key-spacing:\n  - 1\n  - beforeColon: false\n    afterColon: true\n  max-nested-callbacks:\n  - 1\n  - 3\n  new-cap:\n  - 1\n  - newIsCap: true\n    capIsNew: false\n  new-parens: 1\n  newline-after-var: 0\n  no-array-constructor: 1\n  no-inline-comments: 1\n  no-lonely-if: 1\n  no-mixed-spaces-and-tabs: 1\n  no-multiple-empty-lines:\n  - 1\n  - max: 2\n  no-nested-ternary: 1\n  no-new-object: 1\n  no-spaced-func: 1\n  no-ternary: 0\n  no-trailing-spaces: 1\n  no-underscore-dangle: 0\n  no-extra-parens: 0\n  one-var:\n  - 1\n  - never\n  operator-assignment: 0\n  padded-blocks:\n  - 1\n  - never\n  quote-props:\n  - 1\n  - as-needed\n  - numbers: true\n  quotes:\n  - 1\n  - single\n  semi:\n  - 1\n  - \"never\"\n  semi-spacing:\n  - 1\n  - before: false\n    after: true\n  sort-vars: 0\n  keyword-spacing:\n  - 1\n  - before: true\n    after: true\n  space-before-blocks:\n  - 1\n  - always\n  space-before-function-paren:\n  - 1\n  - anonymous: never\n    named: never\n  object-curly-spacing:\n  - 1\n  - always\n  array-bracket-spacing:\n  - 1\n  - always\n  computed-property-spacing:\n  - 1\n  - never\n  space-in-parens:\n  - 1\n  - never\n  space-infix-ops:\n    - 1\n  space-unary-ops:\n  - 1\n  - words: true\n    nonwords: false\n  spaced-comment:\n  - 1\n  - always\n  wrap-regex: 0\n  no-var: 2\n  generator-star-spacing:\n  - 2\n  - before\n  max-depth:\n  - 2\n  - 4\n  max-len:\n  - 2\n  - 100\n  - 2\n  max-params:\n  - 2\n  - 6\n  max-statements:\n  - 2\n  - max: 10\n  - ignoreTopLevelFunctions: true\n  no-bitwise: 0\n  no-plusplus: 2\n  prefer-const: 2\n  require-jsdoc:\n  - 1\n  - require:\n      FunctionDeclaration: true\n      MethodDefinition: true\n      ClassDeclaration: true\n      ArrowFunctionExpression: true\n"
  },
  {
    "path": "linting/prod.yaml",
    "content": "---\nextends: ./eslint_base.yaml\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"api-flow\",\n  \"description\": \"A flow written in ES6 using Immutable to convert between API description formats (Swagger, etc.) and other programs such as cURL command lines.\",\n  \"keywords\": [\n    \"api\",\n    \"swagger\",\n    \"paw\",\n    \"curl\",\n    \"api blueprint\",\n    \"raml\",\n    \"grape\"\n  ],\n  \"bin\": {\n    \"api-flow\": \"./bin/api-flow.js\"\n  },\n  \"version\": \"0.1.0\",\n  \"main\": \"./dist/node/api-flow.js\",\n  \"license\": \"MIT\",\n  \"homepage\": \"https://github.com/luckymarmot/API-Flow\",\n  \"dependencies\": {\n    \"argparse\": \"^1.0.7\",\n    \"babel-plugin-transform-flow-strip-types\": \"6.3.15\",\n    \"babel-polyfill\": \"6.3.14\",\n    \"babel-runtime\": \"6.3.19\",\n    \"drafter.js\": \"^2.6.6\",\n    \"immutable\": \"^3.8.1\",\n    \"js-yaml\": \"3.5.5\",\n    \"json-schema-faker\": \"^0.3.7\",\n    \"raml-1-parser\": \"^1.1.14\",\n    \"raml-parser\": \"0.8.16\",\n    \"request\": \"^2.72.0\",\n    \"swagger-schema-official\": \"2.0.0-bab6bed\",\n    \"tv4\": \"1.2.7\"\n  },\n  \"devDependencies\": {\n    \"babel-cli\": \"6.6.5\",\n    \"babel-core\": \"6.4.0\",\n    \"babel-eslint\": \"^6.1.2\",\n    \"babel-loader\": \"6.2.0\",\n    \"babel-plugin-istanbul\": \"^4.1.1\",\n    \"babel-plugin-rewire\": \"1.0.0-beta-3\",\n    \"babel-plugin-transform-decorators\": \"6.3.13\",\n    \"babel-plugin-transform-decorators-legacy\": \"1.3.2\",\n    \"babel-plugin-transform-runtime\": \"6.3.13\",\n    \"babel-preset-es2015\": \"6.3.13\",\n    \"babel-preset-stage-0\": \"6.3.13\",\n    \"babel-preset-stage-1\": \"6.3.13\",\n    \"babel-preset-stage-2\": \"6.3.13\",\n    \"babel-preset-stage-3\": \"6.3.13\",\n    \"babel-register\": \"6.3.13\",\n    \"chai\": \"3.4.1\",\n    \"chokidar\": \"^1.6.1\",\n    \"colors\": \"^1.1.2\",\n    \"cross-env\": \"^4.0.0\",\n    \"diff\": \"^3.2.0\",\n    \"eslint\": \"^3.3.1\",\n    \"eslint-loader\": \"^1.5.0\",\n    \"eslint-plugin-flowtype\": \"^2.29.1\",\n    \"expect\": \"^1.20.2\",\n    \"flow-bin\": \"^0.36.0\",\n    \"json-loader\": \"0.5.4\",\n    \"mocha\": \"2.3.4\",\n    \"nyc\": \"^10.2.0\",\n    \"seedrandom\": \"^2.4.2\",\n    \"uglify-js\": \"^2.7.5\",\n    \"uglifyjs-webpack-plugin\": \"^0.2.1\",\n    \"webpack\": \"2.x\"\n  },\n  \"eslintConfig\": {\n    \"extends\": \"./linting/prod.yaml\"\n  },\n  \"scripts\": {\n    \"compile\": \"./node_modules/babel-cli/bin/babel.js --ignore='**/__tests__/' -d lib/ src/\",\n    \"compile-node\": \"TARGET=node ./node_modules/webpack/bin/webpack.js\",\n    \"compile-web\": \"TARGET=web ./node_modules/webpack/bin/webpack.js\",\n    \"compile-worker\": \"TARGET=webworker ./node_modules/webpack/bin/webpack.js\",\n    \"test\": \"$npm_package_options_mocha \\\"src/**/__tests__/*.spec.js\\\"\",\n    \"validate\": \"node validate.js\",\n    \"lint\": \"./node_modules/eslint/bin/eslint.js -c linting/prod.yaml src/\"\n  },\n  \"options\": {\n    \"mocha\": \"./node_modules/.bin/mocha --require mocha --compilers js:babel-register --reporter spec\"\n  },\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"git@github.com:luckymarmot/API-Flow.git\"\n  },\n  \"nyc\": {\n    \"require\": [\n      \"babel-register\"\n    ],\n    \"reporter\": [\n      \"lcov\",\n      \"text\"\n    ],\n    \"sourceMap\": false,\n    \"instrument\": false\n  }\n}\n"
  },
  {
    "path": "scripts/clean.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\n\nrm -rf \"$base/dist/paw\"\n"
  },
  {
    "path": "scripts/configure.sh",
    "content": "#!/usr/bin/env sh\nyarn install\n"
  },
  {
    "path": "scripts/flow-runner.js",
    "content": "const execFile = require('child_process').execFile\nconst flow = require('flow-bin')\nimport chokidar from 'chokidar'\n\n/**\n * A helper function to run flow tests. Clears the window and the prints\n * the status of flow.\n * @returns {void} nothing\n */\nfunction runSuite() {\n    execFile(flow, [ 'status', '--color', 'always' ], (err, stdout) => {\n        process.stdout.write('\\x1Bc')\n        /* eslint-disable no-console */\n        console.log(stdout)\n        /* eslint-enable no-console */\n    })\n}\n\n/**\n * Chokidar watches all the files for any kind of change and calls the run\n * function from above. Read more: https://github.com/paulmillr/chokidar\n * @param  {string} a glob of files to watch\n * @param  {object} settings\n */\nchokidar.watch('src/**/*.js', {\n    persistent: true\n}).on('change', () => runSuite())\n"
  },
  {
    "path": "scripts/generators.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\n\n#ignore first parm1\nshift\nset -e\n\nmkdir -p \"$base/dist/paw\";\n\n# iterate\nwhile test ${#} -gt 0\ndo\n    echo \"creating $1 generator\"\n    if [ -f \"$base/configs/paw/generators/$1/webpack.config.babel.js\" ]\n    then\n        $base/node_modules/webpack/bin/webpack.js --bail --display-error-details --config=\"$base/configs/paw/generators/$1/webpack.config.babel.js\";\n    else\n        echo \"no webpack config file found for $1. skipping...\"\n    fi;\n    shift\ndone\n"
  },
  {
    "path": "scripts/importers.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\n\n#ignore first parm1\nshift\nset -e\n\nmkdir -p \"$base/dist/paw\";\n\n# iterate\nwhile test ${#} -gt 0\ndo\n    echo \"creating $1 importer\"\n    if [ -f \"$base/configs/paw/importers/$1/webpack.config.babel.js\" ]\n    then\n        $base/node_modules/webpack/bin/webpack.js --bail --display-error-details --config=\"$base/configs/paw/importers/$1/webpack.config.babel.js\";\n    else\n        echo \"no webpack config file found for $1. skipping...\"\n    fi;\n    shift\ndone\n"
  },
  {
    "path": "scripts/lint.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\nnode \"$base/node_modules/eslint/bin/eslint.js\" -c \"$base/linting/prod.yaml\" \"$base/src/\"\n"
  },
  {
    "path": "scripts/pack.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\n\nmkdir -p \"$base/releases/paw\";\n\npaw_extensions=\"$base/dist/paw/*\"\necho \"paw extensions: $paw_extensions\"\ncd \"$base/dist/paw\"\nfor extension in $paw_extensions\ndo\n  echo \"extension: $extension\"\n  if [ -d \"$extension\" ]\n  then\n    cd \"$extension/..\"\n    echo \"in $extension --- $(ls)\"\n    package=$(echo \"$extension\" | sed -E 's-.*/([^/]+)-\\1-')\n    echo \"package --- $package\"\n    zip -r \"$package.zip\" \"./$package\";\n    mv \"./$package.zip\" \"$base/releases/paw/\";\n    cd \"$base\"\n  fi;\ndone;\ncd \"$base\"\n"
  },
  {
    "path": "scripts/runners.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\n\n#ignore first parm1\nshift\n\n# iterate\nwhile test ${#} -gt 0\ndo\n    echo \"creating $1 lib in dist/$1\"\n    rm -rf \"$base/dist/$1\"\n    node \"$base/node_modules/webpack/bin/webpack.js\" --config \"$base/configs/$1/webpack.config.babel.js\"\n    shift\ndone\n"
  },
  {
    "path": "scripts/test.sh",
    "content": "base=$1\nif [ \"$2\" = \"lint\" ]\nthen\n  node \"$base/node_modules/eslint/bin/eslint.js\" -c \"$base/linting/prod.yaml\" \"$base/src/\"\nelif [ \"$2\" = \"unit\" ]\nthen\n  node \"$base/node_modules/.bin/mocha\" --require mocha --compilers js:babel-register --reporter spec \"$base/src/**/__tests__/*.spec.js\"\nelif [ \"$2\" = \"e2e\" ]\nthen\n  node \"$base/node_modules/.bin/mocha\" --require mocha --compilers js:babel-register --require \"$base/testing/test-require-patch.js\" --reporter spec \"$base/testing/**/*.spec.js\"\nelif [ \"$2\" = \"cov\" ]\nthen\n  NODE_ENV=test node \"$base/node_modules/.bin/nyc\" \"$base/node_modules/.bin/mocha\" \"$base/src/**/__tests__/*.spec.js\"\nelse\n  echo \"invalid TEST_TARGET: $2\"\nfi\n"
  },
  {
    "path": "scripts/transfer.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\ndir=$2\n\nif [ -d \"$base/dist/paw\" ]\nthen\n  echo \"transfering all paw extensions to extension folder\"\n  cp -r \"$base/dist/paw/\" \"$dir\"\nfi;\n"
  },
  {
    "path": "scripts/watch.sh",
    "content": "#!/usr/bin/env sh\nbase=$1\naction=$2\n\necho \"starting to watch\"\n\nif hash fswatch 2>/dev/null; then\n    fswatch -l 5 -0 \"$base/src\" | xargs -0 -n1 -I{} make $action\nfi\n"
  },
  {
    "path": "src/README.md",
    "content": "# Understanding API-Flow\nThis document tries to briefly explain how API-Flow functions and how you can extend it.\n\n## The API-Flow conversion flow\nAPI-Flow converts an API format into another in 4 different steps\n1. **Setup -** API-Flow sets the environment in which the conversion will be done (node, web, paw,\n  etc.). At this point, the user can pre-populate items in a cache for later resolution of missing\n  URIs.\n2. **Loading -** API-Flow tries to resolve a URI to a file and then parses this file to look for\n  missing references, and to fix/normalize parts of the file that can be improved.\n3. **Parsing -** API-Flow parses the normalized file and converts it into its internal model.\n4. **Serializing -** API-Flow converts the internal model representation into a target format.\n\nIf you want to see what a converter would look like, you can refer yourself to the file\n[`src/api-flow.js`](https://github.com/luckymarmot/API-Flow/blob/develop/src/api-flow.js)\n\n## Why use an internal model\nBecause it's `n/2` times faster to implement than 1-to-1 conversions, where `n` is the number of\nformat-versions that we want to support.\n\n## Decomposing the Internal Model\nThe internal model tries to describe what an API can do with as reduced set of components that, in\ntheory, should be able to describe an API as well as any API Format.\n\n### Core Components of the API-Flow model\nIn this section, we expose a small group of core components as well as some of their subtleties.\nThis section does not exhaustively cover all components of the API-Flow and leaves the more trivial\nones to the comprehension of the reader.\n\n#### Api\nThe Api Record is the root component that holds all the other components. It is composed of 4 fields\nthat describe different aspects of an API.\n- **info -** the info field is represented by an Info Record that holds metadata relative to the\n  Api, such as the License, the terms of service, the Api version or more importantly, the title of\n  the Api.\n- **store -** the store field is represented by a Store Record that holds all shared elements in the\n  Api, such as endpoints, authentication methods, parameters, responses, constraints, etc.\n- **group -** the group field is represented by a Group Record that holds the structure of the Api\n  in its source file. This can then be used if the target format does not have strict structural\n  requirements (e.g. Paw)\n- **resources -** the resources field is represented by a dictionary of Resource Records that holds\n  all the resources of an Api. We define a Resource in very much the same way as Swagger or RAML;\n  that is, that a Resource is the ensemble of operations accessible from a given path. We do not\n  impose a unicity restriction on Resources based on their path, which means that two different\n  Resources can share the same path. We, however, recommend having a disjunction of the Requests\n  based on their methods for a given Resource path. If this recommendation is not respected, the\n  conversion may result in an unnecessary loss of information.\n\n#### Store\nThe Store Record is relatively plain and simple. It defines a Map (aka TypedStore) for different\ncomponents of the Api, which are the following:\n- **constraint -** this TypedStore holds all the shared constraints of the Api. (A JSON Schema is\n  a constraint)\n- **endpoint -** the TypedStore holds all the shared endpoints of the Api. We recommend that all\n  endpoints be stored here, even if they are only used once\n- **parameter -** this TypedStore holds all the shared parameters of the Api. These shared\n  parameters must include their location of use (query, header, body, path) as well as whether they\n  are to be used in a request or a response.\n- **response -** this TypedStore holds all the shared responses of the Api.\n- **auth -** this TypedStore holds all the shared authentication methods of the Api. We **require**\n  that all authentication methods used in the Api be store in this TypedStore.\n- **variable -** this TypedStore holds all the shared variables of the Api. Variables are\n  contextual constraints that cannot be represented by a JSON Schema. Variables change behavior\n  together based on an environment name. This is used in Paw and Postman to represent environment\n  variables, where you can switch between different environments.\n- **interface -** this TypedStore holds all the shared interfaces that are used throughout the Api.\n  These interfaces can be used to describe features that are shared across multiple resources,\n  requests, responses, parameters, etc.\n\nNote that these fields are all written in their singular form instead of plural. The rationale\nbehind it being that these field names are types of store.\n\nThe Store is referenced from other components of the Api by use of References.\n\n#### Reference\nThe Reference record is a simple component with two fields that uniquely identify an object in the\nstore. The two fields are `type` and `uuid`. In addition to these two fields, there is a third\n`overlay`.\n- **type -** this field corresponds to the name of a TypedStore (e.g. `constraint`, `auth`, etc.)\n- **uuid -** this field corresponds to the id of an object inside a TypedStore. As such, there are\n  no requirements for the id to be unique across all objects, but only inside the TypedStore. It is,\n  however, preferred to have it behave as a uuid.\n- **overlay -** this field is used to override part of the object that the Reference links to. If it\n  is defined, it **must** always be of the same type as the underlying object. This is particularly\n  useful to add applicableContexts to shared Parameters (more about what an applicableContexts is\n  can be found in the Parameter section)\n\n**Accessing an object in the Store**\nGiven a Reference, one can easily access the corresponding object in the Store with the following\nsnippet:\n\n```js\nconst ref = new Reference({ type: 'auth', uuid: 'basic_auth' })\nlet auth\nauth = store.getIn([ ref.get('type'), ref.get('uuid') ])\n// or\nauth = store.getIn(ref.getLocation())\n```\n\n#### Group\nThe Group Record can be seen as a folder. It can have a name and hold other folders. It can also\nhold ID references to resources stored in the `resources` field. Note that these are not Reference\nRecord but simple id strings.\n\n#### Resource\nThe Resource Record is a container for one or multiple operations (a.k.a. Request) that share a path\nand endpoint(s). It is composed of the following fields:\n- **uuid -** a unique identifier for the Resource (optional)\n- **name -** the name of the Resource (optional)\n- **description -** a description of the Resource (optional)\n- **endpoints -** a Map of URLs or References to shared endpoints that is used by this\n  resource. We **strongly** recommend to only have References to shared endpoints in this Map.\n- **path -** a URL representing the path of the Resource.\n- **methods -** a Map holding all the Request Records that are associated with this Resource\n- **interfaces -** a Map of Interfaces or References to shared Interfaces that this Resource\n  implements.\n\n#### Request\nThe Request Record contains all the elements necessary to describing an operation on a resource.\n- **id -** a unique identifier for this operation (optional)\n- **name -** the name of the Request/Operation (optional)\n- **description -** a description of the Request/Operation (optional)\n- **method -** the method to be used with this operation. API-Flow does not impose\n  restrictions on what verbs can be used with operations (however, some formats do).\n- **auths -** a List of all the authentication methods this operation can be used. This **must** be\n  a List of References to shared authentication methods, with a potential `null` value included. If\n  a `null` value is included, this means that this operation can also be used without any\n  authentication.\n- **contexts -** a List of the possible Contexts that this operation can be used with. Contexts are\n  a relatively complex component of API-Flow and warrant a separate explanation. You can read more\n  about Contexts and what they represent in their dedicated section.\n- **parameters -** a container that holds all the possible parameters that can be used with this\n  operation, aka a ParameterContainer. The parameters can be defined directly in the container, or\n  be References to shared parameters saved in the Store. They can also be filtered out depending on\n  a Context, to give different views of operation. You can learn more about the ParameterContainer\n  and Parameters in their dedicated sections.\n- **responses -** a Map of Responses or References to shared responses that can be returned by this\n  operation.\n- **endpoints -** a Map of URLs or References to shared endpoints that is used by this\n  request. We **strongly** recommend to only have References to shared endpoints in this Map if it\n  is used. If this Map is left empty, the `endpoints` field from the containing `Resource` should be\n  used.\n- **interfaces -** a Map of Interfaces or References to shared Interfaces that this Request\n  implements.\n\n#### Context\nContexts are one of the more powerful and complex aspects of API-Flow and are a generalization of\nthe concept of typed bodies in RAML. In RAML, it is possible to define different bodies\nschemas/dataTypes depending on the Content-Type, which can be particularly useful to represent the\ndifferences between JSON and XML schemas. In this case, each Content-Type header value would define\na Context and the body parameters would be filtered according to which context is applicable to\nthem.\n\nFor instance, if we had the Context<Content-Type=application/json> and two body\nParameters, with one being applicable in application/json, while the other be applicable in\napplication/xml. Then, we could filter the body parameters based on the context to only get the\nparameters that are relevant to this context. This would be how to represent a RAML body with\nmultiple schemas/dataTypes: a List of Contexts, each describing the possible value of the\nContent-Type header, and a Map of Body Parameters, each with a single applicableContext.\n\nHowever, Contexts are more powerful than their RAML counterpart, as they can, in theory, be applied\nnot only to body Parameters, but also to headers, query parameters, and path parameters. They are\nalso not limited to only describing Content-Type header values, but can be used with any\nparameter-value pair, and are not limited to having a single Parameter as their set of constraints.\nThis means that the API-Flow model is able to describe conditional use of parameters based on the\nvalues of different parameters, like, for instance, the use of the `Accept-Encoding` header only if\nthe `Accept` header has a value or a variation of accepted values for `Accept-Encoding` based on\nthe values of `Accept-Language`. In practice, we have seen no format that allows such level of\ndescribability, with RAML v1.0 and swagger v3.0 being the most descriptive.\n\n**Note:** If you are trying to implement a Serializer for a format that does not support having\nmultiple contexts, we **strongly** recommend that you take one of the contexts and represent it,\ninstead of ignoring Contexts altogether, as ignoring contexts may lead to incoherent definitions of\ncertain parameters, or duplicate parameters that shouldn't.\n\nA Context is composed of the following field:\n- **constraints -** a List of Parameter that have a given default value. This is what is used to\nfilter parameters down to a certain view.\n\n#### ParameterContainer\nA ParameterContainer is a simple container that holds three main blocks, one for each part of a\nRequest/Response in which parameters can be found: the headers, the query, and the body. This\ncontainer also exposes two methods that can be used to make manipulation of Parameters more\npleasant: resolve and filter.\n\nA ParameterContainer is therefore composed of the following fields:\n- **headers -** a Map of Parameters or References to shared Parameters that describe headers\n- **queries -** a Map of Parameters or References to shared Parameters that describe query\n  parameters. The use of the term `queries` instead of the simpler `query` cannot be explained.\n- **body -** a Map of Parameters or References to shared Parameters that describe body parameters.\n\nIn Addition to these fields, a ParameterContainer exposes the following two methods.\n- **resolve(store) -** this method iterates over the different parameters in the container and\n  replaces references to shared parameters by the shared parameters. This transforms a\n  `Map<string,Parameter|Reference>` into a `Map<string, Parameter>`.\n- **filter(constraints) -** this method iterates over the different parameters in the container and\n  filters out Parameters which should not be used with this List of constraints. This List of\n  constraints is naturally the `constraints` field of a Context. Note that `filter` can only be\n  applied to ParameterContainers that do not contain References. Not resolving before filtering will\n  crash.\n\n#### Parameter\nA Parameter is a representation of a simple block of an operation. It can represent a query\nparameter, or a header or a body, or path variable. It is used to describe the variability of an\noperation.\n\nA Parameter is composed of the following fields:\n- **in -** the location of the Parameter. this can be `header`, `query`, `body` or `path`.\n- **usedIn -** this describes whether this Parameter is used in a Request or a Response. Both `in`\n  and `usedIn` can be inferred from their location in a ParameterContainer and the containing\n  Request or Response Record, except when dealing with shared Parameters that are therefore stored\n  out of their context and may need these fields to properly function\n- **key -** the key of the Parameter. For instance, the Parameter representing the\n  `Content-Type: application/json` header has the key `Content-Type`, while the Parameter\n  representing the `limit=100` query parameter has the key `limit`.\n- **name -** the name of the Parameter. While this is very often the same as the key of the\n  Parameter, there can be cases where having a different, more human-friendly name, for a parameter\n  is useful. This would be where such a display name would be stored.\n- **description -** a description of the Parameter.\n- **type -** the type of the Parameter (e.g. string, integer, number, boolean, etc.). The type\n  `array` defines a special behavior for the Parameter, which is explained in details further below.\n- **format -** the format of the Parameter (e.g. 'datetime', etc.). This is field has not yet been\n  normalized and is therefore unstable. Use with caution.\n- **default -** the default value of the Parameter.\n- **superType -** the superType of the Parameter. Setting this value to something else than `null`\n  signifies that this Parameter has a non-standard behavior. For instance, if the superType is set\n  to `sequence`, this signifies that the Parameter describes a sequence of Parameters whose\n  evaluation should be concatenated, which is particularly useful to describe paths that contain\n  variables. A more detailed explanation can be found below.\n- **value -** a complex object whose definition varies based on the superType and type. It contains\n  the components necessary to the representation of such superTypes and types. Note this should\n  **not** be confused with default. `default` represents the default value of a Parameter, whereas\n  `value` can contain a Parameter describing the schema of an item in an array if the type is\n  `array`. therefore it is possible to have both a `default` and `value` at the same time.\n- **constraints -** this is a List of all the constraints this Parameter is subject to. This is\n  represented by a List of Constraint. You can find more about Constraints in their dedicated\n  section further below.\n- **applicableContexts -** this is a List describing all the contexts in which a Parameter can be\n  used. If the List is left empty, this means that this Parameter can be used regardless of Context.\n  Note that this is not a List of Contexts, but a List *describing* contexts. As such, there are\n  minute differences that need to be considered. For instance, valid context values are not defined\n  as `default` valued Parameters, but as Parameters with constraints such as\n  `Constraint.Enum([ default1, default2, ... ])`. This means that for instance a Parameter that can\n  be used in both `application/x-www-form-urlencoded` and `multipart/form-data`, is described by a\n  single applicable context Parameter whose constraints is an Enum of both values.\n- **interfaces -** this is a Map of Interfaces or References to shared Interfaces that this\n  Parameter implements.\n\n#### Constraint\nA Constraint Record is a simple representation of a constraint and can test a value to see whether\nit complies with the constraint.\n\nThere are many different Constraint that all follow a standard pattern:\n- **name -** this field describes the name to give to the constraint when representing it as a JSON\n  Schema. It is not accessible from the different standard Constraints constructors.\n- **value -** if `name` held the left-hand side of the JSONSchema, then `value` would hold the\n  right-hand side of it. It is often the only field accessible from the constructors.\n- **expression -** this field is a function that is used to test whether a value is valid with\n  respect to the constraint. It also rarely accessible.\n\nConstraints expose two methods:\n- **evaluate(value) -** tests whether a value is valid with respect to the constraint\n- **toJSONSchema() =** returns the JSON Schema representation of this constraint\n\nHere are some notable Constraint constructors:\n- `new Constraint.Enum([ ... ])`\n- `new Constraint.JSONSchema({ type: 'string', pattern: ... })`\n- `new Constraint.XMLSchema('<some:xsd/>')` exists, but is more of a patch than a real\n  representation of an XSD schema.\n- `new Constraint.Constraint({ name, value, expression })` can be used to create custom constraints\n  that cannot be represented by the commonly available Constraints.\n\n#### Response\nA Response Record holds all the information relative to the expected responses to an operation\nunder a certain status code.\n- **code -** the status code that this Response describes\n- **description -** a description of this Response (optional)\n- **parameters -** a ParameterContainer that holds all the Parameters or References relative to this\n  response.\n- **contexts -** a List of possible Contexts that this response can be used in.\n- **interfaces -** this is a Map of Interfaces or References to shared Interfaces that this\n  Response implements.\n\n#### Auth\nAPI-Flow supports multiple types of authentication methods, which are represented by the Auth\nobject. These authentication methods are fairly straightforward and their definitions can be found\nin the [`src/models/auths`](https://github.com/luckymarmot/API-Flow/tree/develop/src/models/auths) folder.\n\nHere is a list of the currently support authentication method:\n- `Auth.ApiKey`\n- `Auth.AWSSig4`\n- `Auth.Basic`\n- `Auth.Digest`\n- `Auth.Hawk`\n- `Auth.OAuth1`\n- `Auth.OAuth2`\n- `Auth.Custom`\n"
  },
  {
    "path": "src/api-flow-config.js",
    "content": "import Environment from './environments/node/Environment'\n\nimport SwaggerLoader from './loaders/swagger/Loader'\nimport RAMLLoader from './loaders/raml/Loader'\nimport InternalLoader from './loaders/internal/Loader'\nimport PostmanCollectionV2Loader from './loaders/postman/v2.0/Loader'\n\nimport SwaggerV2Parser from './parsers/swagger/v2.0/Parser'\nimport RAMLV1Parser from './parsers/raml/v1.0/Parser'\nimport InternalParser from './parsers/internal/Parser'\nimport PostmanCollectionV2Parser from './parsers/postman/v2.0/Parser'\n\nimport SwaggerV2Serializer from './serializers/swagger/v2.0/Serializer'\nimport RAMLV1Serializer from './serializers/raml/v1.0/Serializer'\nimport InternalSerializer from './serializers/internal/Serializer'\nimport PostmanV2Serializer from './serializers/postman/v2.0/Serializer'\nimport ApiBlueprint1ASerializer from './serializers/api-blueprint/1A/Serializer'\n\nexport const loaders = [\n  SwaggerLoader,\n  RAMLLoader,\n  InternalLoader,\n  PostmanCollectionV2Loader\n]\n\nexport const parsers = [\n  SwaggerV2Parser,\n  RAMLV1Parser,\n  InternalParser,\n  PostmanCollectionV2Parser\n]\n\nexport const serializers = [\n  SwaggerV2Serializer,\n  RAMLV1Serializer,\n  InternalSerializer,\n  PostmanV2Serializer,\n  ApiBlueprint1ASerializer\n]\n\nexport const environment = Environment\n"
  },
  {
    "path": "src/api-flow.js",
    "content": "// TODO this is not what we want (this should happen in ./loaders/loaders, ./parsers/parsers, etc.)\nimport environment from './environments/environment'\nimport loaders from './loaders/loaders'\nimport parsers from './parsers/parsers'\nimport serializers from './serializers/serializers'\nimport { currify } from './utils/fp-utils'\n\nconst methods = {}\n\n/**\n * @class DefaultApiFlow\n * @description The default core class of API-Flow.\n * It holds all the necessary methods used to convert a file from one format to another.\n */\nexport class DefaultApiFlow {\n  /**\n   * detects the format of a given content\n   * @param {string} content: the content whose format needs to be found\n   * @returns {{format: string, version: string}} the corresponding format object\n   * @static\n   */\n  static detectFormat(content) {\n    // TODO implement this\n    return methods.detect(content)\n  }\n\n  /**\n   * detects the name of a given API from a given content\n   * @param {string} content: the content whose name needs to be guessed\n   * @returns {string?} the corresponding API name, if it exists\n   * @static\n   */\n  static detectName(content) {\n    // TODO implement this\n    return methods.detectName(content)\n  }\n\n  /**\n   * updates an environment cache with a set of resolved uris\n   * @param {Object<URIString, string>} cache: an object where each key-value pair is a uri string\n   * and its associated content\n   * @returns {void}\n   * @static\n   */\n  static setCache(cache) {\n    environment.setCache(cache)\n  }\n\n  /**\n   * sets an environment up based on options\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the set-up of\n   * the converter\n   * @returns {void}\n   * @static\n   */\n  static setup({ options } = {}) {\n    // TODO implement this\n    return methods.setup({ options })\n  }\n\n  /**\n   * finds a primaryUri from an array of multiple items. A primaryUri is the root uri from which\n   * all the other files are resolved. For instance, in a RAML document, there exists a root\n   * document (with the header `#%RAML 1.0`) which can refer to multiple other subcomponents such as\n   * RAML libraries. The root document's uri would be the primary uri.\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the behavior of\n   * the converter\n   * @param {Array<{uri: string}>} items: an array of uris from which one should be chosen as the\n   * Primary URI\n   * @returns {string?} the corresponding API name, if it exists\n   * @static\n   */\n  static findPrimaryUri({ options, items }) {\n    return methods.findPrimaryUri({ options, items })\n  }\n\n  /**\n   * resolves a uri to a file and normalizes it based on the loader selected from the options object\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the loading of\n   * the uri and it's normalization\n   * @param {Object} args.uri: the uri to resolve\n   * @returns {Promise} a promise that resolves if the uri is successfully loaded and normalized.\n   * It resolves to the object { options, item }, where options are the options passed to the load\n   * method, and item contains the normalized content of the uri.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * converts a normalized item in a specific format into the intermediate model.\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the parsing of\n   * the item\n   * @param {Object} args.item: the item to parse\n   * @returns {Promise} a promise that resolves if the item is successfully parsed.\n   * It resolves to the object { options, api }, where options are the options passed to the parse\n   * method, and api contains the intermediate model representing the item.\n   * @static\n   */\n  static parse({ options, item }) {\n    return methods.parse({ options, item })\n  }\n\n  /**\n   * converts an intermediate model api into a specific format.\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the\n   * serialization of the model\n   * @param {Object} args.api: the model to serialize\n   * @returns {Promise} a promise that resolves if the item is successfully parsed.\n   * It resolves to the string representation of the api in the target format\n   * @static\n   */\n  static serialize({ options, api }) {\n    return methods.serialize({ options, api })\n  }\n\n  /**\n   * resolves a uri to a file, loads, parses and converts it based on the provided options object.\n   * It is a shorthand method for the successive calls of `load`, `parse` and `serialize`.\n   * @param {Object} args: the named args of this method\n   * @param {Object} args.options: a set of options containing settings relevant to the conversion\n   * of the file at the given uri\n   * @param {Object} args.uri: the uri of the file to convert\n   * @returns {Promise} a promise that resolves if the uri is successfully loaded and converted.\n   * It resolves to the string representation of the api in the target format.\n   * @static\n   */\n  static transform({ options, uri }) {\n    return methods.transform({ options, uri })\n  }\n}\n\n// TODO implement this\nmethods.findPrimaryUri = ({ items }) => {\n  const candidate = items\n    .filter(item => loaders.filter(loader => loader.isParsable(item)).length > 0)[0]\n\n  if (!candidate) {\n    return null\n  }\n\n  return candidate.uri\n}\n\nmethods.setup = ({ options = {} } = {}) => {\n  options.fsResolver = environment.fsResolver\n  options.httpResolver = environment.httpResolver\n\n  return options\n}\n\n/**\n * finds a loader for the source format, or infers one from the extension of the primary file\n * @param {Object} args: the named arguments of the methods\n * @param {Object} args.options: the settings to use to convert this ensemble of items\n * @param {Object} args.primary: the primary file of this conversion, it is used as a starting point\n * by the loader to extract all required dependencies, and fix files if needed\n * @returns {Loader?} the loader that is required to prepare the primary file and its associated\n * items, if one was found.\n */\nmethods.getLoader = ({ options = {}, uri }) => {\n  const { format } = options.source || {}\n\n  if (!format) {\n    const loader = loaders.getLoaderByExtension(uri, true)\n    return loader\n  }\n\n  const loader = loaders.getLoaderByFormat(format)\n  return loader\n}\n\n/**\n * load a primary file and associated items in memory, with all the required dependencies that can\n * be resolved, and fixes the files to remove external information\n * @param {Object} args: the named arguments of the methods\n * @param {Object} args.options: the settings to use to convert this ensemble of items\n * @param {string} args.uri: the uri of the primary file\n * @param {Item?} args.primary: the primary file to load, if there is one.\n * @returns {Promise} a promise that resolves once everything needed has been loaded into memory.\n */\nmethods.load = ({ options, uri }) => {\n  let $options = options\n  if (!options || !options.fsResolver || !options.httpResolver) {\n    $options = methods.setup({ options })\n  }\n\n  const loader = methods.getLoader({ options: $options, uri })\n\n  if (!loader) {\n    return Promise.reject(new Error('could not load file(s): missing source format'))\n  }\n\n  return loader.load({ options: $options, uri })\n}\n\n/**\n * iteratively (reduce) finds the best parser for a given item\n * @param {Item} item: the item to test the parser against\n * @param {{score: number, format: string, version: string}} best: the best parser found yet\n * @param {Parser} parser: the parser to test\n * @returns {{score: number, format: string, version: string}} best: the updated best parser\n */\nmethods.findBestParser = (item, best, parser) => {\n  const { format, version, score } = parser.detect(item)\n\n  if (best.score < score) {\n    return { format, version, score }\n  }\n\n  return best\n}\n\n/**\n * groups item results by format and version, iff the associated score is above 0.9\n * @param {Object} acc: the accumulator that holds the items grouped by format and version\n * @param {{score: number, format: string, version: string}} toGroup: the best parser associated\n * with an item\n * @return {Object} acc: the updated accumulator\n */\nmethods.groupByFormatAndVersion = (acc, toGroup) => {\n  const { version, format, score } = toGroup\n\n  if (score < 0.9) {\n    return acc\n  }\n\n  const key = format + '@' + version\n  acc[key] = acc[key] || []\n  acc[key].push(toGroup)\n  return acc\n}\n\n/**\n * infers the version of the format that should be used for the items\n * @param {string} format: the format of the items\n * @param {Item} item: the item to use to find the version of the format\n * @returns {{format: string, version: string?}} the infered format and version\n */\nmethods.inferVersion = (format, item) => {\n  const potentialParsers = parsers.getParsersByFormat(format)\n\n  const findBestParser = currify(methods.findBestParser, item)\n  const candidate = potentialParsers.reduce(findBestParser, { format, version: null, score: -1 })\n\n  if (candidate.format && candidate.version) {\n    return { format, version: candidate.version }\n  }\n\n  return { format, version: null }\n}\n\n/**\n * infers the format and version that should be used for the items\n * @param {Item} item: the items to use to find the version of the format\n * @returns {{format: string?, version: string?}} the infered format and version\n */\nmethods.inferBestFormatAndBestVersion = (item) => {\n  const potentialParsers = parsers.getParsers()\n\n  const findBestParser = currify(methods.findBestParser, item)\n  const candidate = potentialParsers\n    .reduce(findBestParser, { format: null, version: null, score: -1 })\n\n  if (candidate.format && candidate.version) {\n    return { format: candidate.format, version: candidate.version }\n  }\n\n  return { format: null, version: null }\n}\n\n/**\n * complements format and version with infered format and version from items\n * @param {Object} args: the named arguments of the method\n * @param {string?} args.format: the parse format of the loaded items, if it was provided,\n * @param {string?} args.version: the version of the format of the primary file, if it was provided.\n * @param {Array<Item>} args.items: the items to use to infer the missing format and/or the missing\n * version of the loader\n * @returns {{ format: string?, version: string? }} the resulting format and version\n */\nmethods.inferFormatAndVersion = ({ format, version, item }) => {\n  if (format && version) {\n    return { format, version }\n  }\n\n  if (format) {\n    return methods.inferVersion(format, item)\n  }\n\n  return methods.inferBestFormatAndBestVersion(item)\n}\n\n/**\n * finds the parser corresponding to a set of items or infers it.\n * @param {Object} args: the named arguments of the method\n * @param {Object} args.options: the settings to use to parse the items\n * @param {Array<Item>} items: the loaded items.\n * @returns {Parser?} the corresponding parser\n */\nmethods.getParser = ({ options = {}, item }) => {\n  let { format, version } = options.source || {}\n\n  if (!format || !version) {\n    const infered = methods.inferFormatAndVersion({ format, version, item })\n\n    format = infered.version\n    version = infered.version\n  }\n\n  if (!format || !version) {\n    return null\n  }\n\n  const parser = parsers.getParserByFormatAndVersion({ format, version })\n  return parser\n}\n\n/**\n * parses an array of loaded items into Apis\n * @param {Object} args: the named arguments of the method\n * @param {Object} args.options: the settings to use to parse the items\n * @param {Array<Item>} items: the loaded items to parse\n * @returns {Promise} a promise that resolves with an array of Apis and options if it successfully\n * parses the items\n */\nmethods.parse = ({ options, item }) => {\n  const parser = methods.getParser({ options, item })\n\n  if (!parser) {\n    return Promise.reject(new Error('could not parse file(s): missing source format'))\n  }\n\n  return parser.parse({ options, item })\n}\n\n/**\n * finds the serializer to use for the Apis.\n * @param {Object} args: the named arguments of the method\n * @param {Object} args.options: the settings to use to serialize the Apis\n * @returns {Serializer?} the corresponding serializer\n */\nmethods.getSerializer = ({ options = {} }) => {\n  const { format, version } = options.target || {}\n\n  if (!format) {\n    return null\n  }\n\n  if (!version) {\n    return serializers.getNewestSerializerByFormat(format)\n  }\n\n  return serializers.getSerializerByFormatAndVersion({ format, version })\n}\n\n/**\n * parses an array of loaded Apis into their expected format\n * @param {Object} args: the named arguments of the method\n * @param {Object} args.options: the settings to use to serialize the items\n * @param {Array<Item>} items: the Apis to serialize\n * @returns {Promise} a promise that resolves with an array of Items if it successfully\n * serializes the items\n */\nmethods.serialize = ({ options, api }) => {\n  const serializer = methods.getSerializer({ options })\n\n  if (!serializer) {\n    return Promise.reject(new Error('could not convert Api(s): missing target format'))\n  }\n\n  const serialized = serializer.serialize({ options, api })\n  return serialized\n}\n\nmethods.transform = ({ options, uri }) => {\n  return methods.load({ options, uri })\n    .then(methods.parse, methods.handleLoadError)\n    .then(methods.serialize, methods.handleParseError)\n    .catch(methods.handleSerializeError)\n}\n\nexport const __internals__ = methods\nexport default DefaultApiFlow\n"
  },
  {
    "path": "src/environments/environment.js",
    "content": "import { environment as LoadedEnvironment } from 'api-flow-config'\n\nexport const environment = LoadedEnvironment\nexport default environment\n"
  },
  {
    "path": "src/environments/node/Environment.js",
    "content": "import fs from 'fs'\nimport { parse } from 'url'\nimport request from 'request'\n\nlet cache = {}\n\nconst methods = {}\n\nmethods.setCache = ($cache) => {\n  if ($cache) {\n    Object.assign(cache, $cache)\n  }\n  else {\n    cache = {}\n  }\n}\n\nmethods.fsResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n  return new Promise((resolve, reject) => {\n    if (cache[cleanUri]) {\n      return resolve(cache[cleanUri])\n    }\n    else {\n      const path = parse(uri).pathname\n      fs.readFile(path, function(err, data) {\n        if (err) {\n          return reject(new Error(err))\n        }\n        else {\n          const content = data.toString()\n          cache[cleanUri] = content\n          return resolve(content)\n        }\n      })\n    }\n  })\n}\n\nmethods.httpResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n  return new Promise((resolve, reject) => {\n    if (cache[cleanUri]) {\n      return resolve(cache[cleanUri])\n    }\n    else {\n      request.get(uri, (error, response, body) => {\n        if (error) {\n          return reject(new Error(error))\n        }\n        else {\n          cache[cleanUri] = body\n          return resolve(body)\n        }\n      })\n    }\n  })\n}\n\nconst NodeEnvironment = {\n  setCache: methods.setCache,\n  cache,\n  fsResolver: { resolve: methods.fsResolve },\n  httpResolver: { resolve: methods.httpResolve }\n}\n\nexport const __internals__ = methods\nexport default NodeEnvironment\n"
  },
  {
    "path": "src/environments/paw/Environment.js",
    "content": "import { NetworkHTTPRequest } from '../../mocks/PawShims'\n\nlet cache = {}\n\nconst methods = {}\n\nmethods.setCache = ($cache) => {\n  if ($cache) {\n    Object.assign(cache, $cache)\n  }\n  else {\n    cache = {}\n  }\n}\n\nmethods.fsResolve = (uri) => {\n  const cleanUri = decodeURIComponent(uri.split('#')[0])\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  if (cache['file://' + cleanUri]) {\n    return Promise.resolve(cache['file://' + cleanUri])\n  }\n\n  const msg = 'Sandbox error: include ' +\n    cleanUri +\n    ' in your import by dragging it along with the main file.'\n\n  return Promise.reject(new Error(msg))\n}\n\nmethods.httpResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return new Promise((resolve, reject) => {\n    const request = new NetworkHTTPRequest()\n    request.requestUrl = uri\n    request.requestMethod = 'GET'\n    request.requestTimeout = 20 * 1000\n    const status = request.send()\n\n    if (status && request.responseStatusCode < 300) {\n      resolve(request.responseBody)\n    }\n    else {\n      const msg = 'Failed to fetch ' +\n        uri + '. Got code: ' +\n        request.responseStatusCode\n      reject(new Error(msg))\n    }\n  })\n}\n\nconst PawEnvironment = {\n  setCache: methods.setCache,\n  cache,\n  fsResolver: { resolve: methods.fsResolve },\n  httpResolver: { resolve: methods.httpResolve }\n}\n\nexport const __internals__ = methods\nexport default PawEnvironment\n"
  },
  {
    "path": "src/environments/template/Environment.js",
    "content": "/**\n * This is a template to help speed up the writing of an environment.\n *\n * An Environment acts as a sort of wrapper around I/O calls for Loaders, normalizing the Interface\n * used to interact with the world. Environments can therefore be used to describe a web or\n * web-worker environment, or a node environment or Paw. Each of these environments have different\n * interfaces when dealing with I/O calls. For instance, web environments cannnot access local\n * files, and uses XMLHttpRequest to resolve remote files. Node, on the other hand, can access local\n * files. Finally, paw is sandboxed, cannot access local files unless granted authorization by the\n * user and can only access remote files under certain conditions, with a different API from both\n * node and the web.\n *\n * Additionally, an Environment can store files for resolution. This can be useful when these files\n * are not readily available or should be accessible at a different uri than the one they currently\n * are (e.g. during development of an API). Paw makes use of this functionality to avoid asking the\n * user permission for each file, if they were dragged along with the primary file of the format to\n * parse.\n *\n * If you intend to run API-Flow in an environment that is not one of the already available\n * environments, and that has different apis for file resolution than these environments, this is\n * the file you should inspire yourself from.\n */\n\n/**\n * A cache that holds resolved uris. This is useful to reduce the I/O footprint, as well as\n * for saving prefetched files at arbitrary uris.\n */\nlet cache = {}\n\nconst methods = {}\n\n/**\n * updates the cache with new (uri -> content) relationships. If an object is provided, this will\n * merge the old cache with the new one. If no object is provided, it will clear the cache\n * @param {Object?} $cache - a Map of uri to content to merge with the current cache\n * @returns {Object} the updated cache\n */\nmethods.setCache = ($cache) => {\n  if ($cache) {\n    return Object.assign(cache, $cache)\n  }\n  else {\n    cache = {}\n    return cache\n  }\n}\n\n/**\n * tries to resolve a local file, first against the cache, then by using methods available in this\n * environment.\n * @param {string} uri - the uri to resolve to a local file\n * @returns {Promise} a promise resolving to the content of the file on success\n */\nmethods.fsResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return Promise.reject(new Error('this environment cannot access local files'))\n}\n\n/**\n * tries to resolve a remote file, first against the cache, then by using methods available in this\n * environment.\n * @param {string} uri - the uri to resolve to a remote file\n * @returns {Promise} a promise resolving to the content of the file on success\n */\nmethods.httpResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return Promise.reject(new Error('this environment cannot access remote files'))\n}\n\n/**\n * @exports TemplateEnvironment - the core object of this module: the Environment\n * @property {Function} setCache - updates the cache of the environment\n * @property {Object} cache - the cache of the environment\n * @property {Object} fsResolver - the local file resolver\n * @property {Function} fsResolver.resolve - the resolution method of the local file resolver\n * @property {Object} httpResolver - the remote file resolver\n * @property {Function} httpResolver.resolve - the resolution method of the remote file resolver\n */\nconst TemplateEnvironment = {\n  setCache: methods.setCache,\n  cache,\n  fsResolver: { resolve: methods.fsResolve },\n  httpResolver: { resolve: methods.httpResolve }\n}\n\n/**\n * @exports __internals__ - this object should hold all the methods used in this file. It used to\n * easily mock and spy on internal methods in a testing environment.\n */\nexport const __internals__ = methods\n\nexport default TemplateEnvironment\n"
  },
  {
    "path": "src/environments/web/Environment.js",
    "content": "let cache = {}\n\nconst methods = {}\n\nmethods.setCache = ($cache) => {\n  if ($cache) {\n    Object.assign(cache, $cache)\n  }\n  else {\n    cache = {}\n  }\n}\n\nmethods.fsResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return Promise.reject(new Error('web browsers cannot access local files'))\n}\n\nmethods.httpResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return new Promise((resolve, reject) => {\n    const req = new XMLHttpRequest()\n\n    req.addEventListener('error', (event) => {\n      return reject(new Error(event))\n    })\n\n    req.addEventListener('abort', (event) => {\n      return reject(new Error(event))\n    })\n\n    req.addEventListener('load', () => {\n      return resolve(req.responseText)\n    })\n\n\n    req.open('GET', uri)\n    req.send()\n  })\n}\n\nconst BrowserEnvironment = {\n  setCache: methods.setCache,\n  cache,\n  fsResolver: { resolve: methods.fsResolve },\n  httpResolver: { resolve: methods.httpResolve }\n}\n\nexport const __internals__ = methods\nexport default BrowserEnvironment\n"
  },
  {
    "path": "src/environments/worker/Environment.js",
    "content": "let cache = {}\n\nconst methods = {}\n\nmethods.setCache = ($cache) => {\n  if ($cache) {\n    Object.assign(cache, $cache)\n  }\n  else {\n    cache = {}\n  }\n}\n\nmethods.fsResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return Promise.reject(new Error('web workers cannot access local files'))\n}\n\nmethods.httpResolve = (uri) => {\n  const cleanUri = uri.split('#')[0]\n\n  if (cache[cleanUri]) {\n    return Promise.resolve(cache[cleanUri])\n  }\n\n  return new Promise((resolve, reject) => {\n    const req = new XMLHttpRequest()\n\n    req.addEventListener('error', (event) => {\n      return reject(new Error(event))\n    })\n\n    req.addEventListener('abort', (event) => {\n      return reject(new Error(event))\n    })\n\n    req.addEventListener('load', () => {\n      return resolve(req.responseText)\n    })\n\n\n    req.open('GET', uri)\n    req.send()\n  })\n}\n\nconst BrowserEnvironment = {\n  setCache: methods.setCache,\n  cache,\n  fsResolver: { resolve: methods.fsResolve },\n  httpResolver: { resolve: methods.httpResolve }\n}\n\nexport const __internals__ = methods\nexport default BrowserEnvironment\n"
  },
  {
    "path": "src/loaders/internal/Loader.js",
    "content": "import { resolve, parse } from 'url'\n\nconst methods = {}\n\nconst __meta__ = {\n  extensions: [ 'json' ],\n  parsable: true,\n  format: 'internal'\n}\n\n/**\n * @class InternalLoader\n * @description The loader associated with internal model dumps.\n * It holds all the necessary methods used to load a file representing a dump of the intermediate\n * model.\n */\nexport class InternalLoader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\nmethods.isParsable = (content) => {\n  const parsed = methods.parseJSON(content)\n  return !!parsed && parsed._model\n}\n\n/**\n * converts a string written in JSON or YAML format into an object\n * @param {string} str: the string to parse\n * @returns {Object?} the converted object, or null if str was not a JSON or YAML string\n */\nmethods.parseJSON = (str) => {\n  let parsed = null\n  try {\n    parsed = JSON.parse(str)\n  }\n  catch (jsonParseError) {\n    return null\n  }\n  return parsed\n}\n\nmethods.resolve = (options, uri, { $ref = '' } = {}) => {\n  const uriToLoad = resolve(uri, $ref)\n  const protocol = parse(uriToLoad).protocol\n  if (protocol && protocol.substr(0, 4) === 'http') {\n    return options.httpResolver.resolve(uriToLoad.split('#')[0])\n  }\n\n  return options.fsResolver.resolve(uriToLoad.split('#')[0])\n}\n\n\nmethods.fixPrimary = (options, { content }) => {\n  const internal = methods.parseJSON(content)\n\n  if (!internal) {\n    return Promise.reject(new Error('could not parse internal file (not a JSON)'))\n  }\n\n  return { options, item: internal }\n}\n\nmethods.handleRejection = (error) => {\n  return Promise.reject(error)\n}\n\nmethods.load = ({ options, uri }) => {\n  const primaryPromise = methods.resolve(options, uri)\n\n  return primaryPromise\n    .then(\n      (primary) => {\n        return methods.fixPrimary(options, { uri, content: primary })\n      },\n      methods.handleRejection\n    )\n}\n\nexport const __internals__ = methods\nexport default InternalLoader\n"
  },
  {
    "path": "src/loaders/loaders.js",
    "content": "import { loaders } from 'api-flow-config'\n\nconst methods = {}\n\nmethods.extractExtension = (uri) => {\n  if (uri) {\n    const extension = uri.split('.').slice(-1)[0]\n    if (!extension || extension === uri) {\n      return null\n    }\n\n    return extension\n  }\n\n  return null\n}\n\nmethods.getLoaderByExtension = (item, onlyParsableLoaders = false) => {\n  const extension = methods.extractExtension(item)\n\n  if (!extension) {\n    return null\n  }\n\n  const usableLoaders = loaders.filter(loader => loader.extensions.indexOf(extension) !== -1)\n\n  if (onlyParsableLoaders) {\n    return usableLoaders.filter(loader => loader.parsable === true)[0] || null\n  }\n\n  return usableLoaders[0] || null\n}\n\nmethods.getLoaderByFormat = (format) => {\n  return loaders.filter(loader => loader.format === format)[0] || null\n}\n\nmethods.filter = (...args) => loaders.filter(...args)\n\nexport const getLoaderByExtension = methods.getLoaderByExtension\nexport const getLoaderByFormat = methods.getLoaderByFormat\n\nexport default methods\n"
  },
  {
    "path": "src/loaders/paw/Loader.js",
    "content": "const methods = {}\n\nconst __meta__ = {\n  extensions: [],\n  parsable: true,\n  format: 'paw'\n}\n\n/**\n * @class PawLoader\n * @description a dummy associated with paw.\n * This is a hack around the options passed to the Parser, as Paw directly exposes a context object\n * as well as a list of items to export\n */\nexport class PawLoader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\nmethods.isParsable = () => false\nmethods.load = ({ options }) => ({ options })\n"
  },
  {
    "path": "src/loaders/postman/v2.0/Loader.js",
    "content": "import { resolve, parse } from 'url'\nimport { List } from 'immutable'\n\nimport URL from '../../../models/URL'\nimport { convertEntryListInMap, flatten } from '../../../utils/fp-utils'\n\nconst methods = {}\n\nconst __meta__ = {\n  extensions: [ 'json' ],\n  parsable: true,\n  format: 'postman-collection'\n}\n\n/**\n * @class PostmanCollectionV2Loader\n * @description The loader associated with postman collection v2 formats.\n * It holds all the necessary methods used to load a file representing a postman collection v2.\n */\nexport class PostmanCollectionV2Loader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\nmethods.parseContent = (content) => {\n  try {\n    const parsed = JSON.parse(content)\n    return parsed\n  }\n  catch (e) {\n    return null\n  }\n}\n\nmethods.scoreCollection = (collection) => {\n  let score = 0\n  score += collection.info ? 1 / 5 : 0\n  score += (collection.info || {}).schema ? 1 / 5 : 0\n  if ((collection.info || {}).schema === 'https://schema.getpostman.com/json/collection/v2.0.0/') {\n    score += 1 / 5\n  }\n  score += Array.isArray(collection.item) ? 1 / 2 : 0\n  score = score > 1 ? 1 : score\n\n  return score\n}\n\nmethods.isParsable = (content) => {\n  const parsed = methods.parseContent(content)\n\n  if (!parsed) {\n    return false\n  }\n\n  const score = methods.scoreCollection(parsed)\n  return score > 0.85\n}\n\nmethods.resolve = (options, uri, { $ref = '' } = {}) => {\n  const uriToLoad = resolve(uri, $ref)\n  const protocol = parse(uriToLoad).protocol\n  if (protocol && protocol.substr(0, 4) === 'http') {\n    return options.httpResolver.resolve(uriToLoad.split('#')[0])\n  }\n\n  return options.fsResolver.resolve(uriToLoad.split('#')[0])\n}\n\nmethods.normalizeRequestItem = (item) => {\n  if (item.request && typeof item.request === 'string') {\n    const url = item.request\n    item.request = {\n      url,\n      method: 'GET'\n    }\n  }\n\n  return item\n}\n\nmethods.normalizeAuthItem = (auth, item) => {\n  if (auth) {\n    if (!item.request) {\n      item.auth = auth\n    }\n    else if (!item.request.auth) {\n      item.request.auth = auth\n    }\n  }\n\n  return item\n}\n\nmethods.extractPostmanURLDomainFromURL = (url) => {\n  const hostname = url.get('hostname')\n  if (!hostname) {\n    return null\n  }\n\n  return { key: 'domain', value: hostname.generate(List([ '{{', '}}' ])) }\n}\n\nmethods.extractPostmanURLPortFromURL = (url) => {\n  const port = url.get('port')\n  if (!port) {\n    return null\n  }\n\n  return { key: 'port', value: port.generate(List([ '{{', '}}' ])) }\n}\n\nmethods.extractPostmanURLPathFromURL = (url) => {\n  const path = url.get('pathname')\n  if (!path) {\n    return null\n  }\n\n  return { key: 'path', value: path.generate(List([ '{{', '}}' ])) }\n}\n\nmethods.extractPostmanURLQueryFromURL = (urlString) => {\n  const queryString = urlString.split('?')[1]\n\n  if (!queryString) {\n    return null\n  }\n\n  const queryArray = queryString.split('#')[0]\n    .split('&')\n    .map(queryParam => {\n      const [ key, value ] = queryParam.split('=')\n      return { key, value }\n    })\n\n  return { key: 'query', value: queryArray }\n}\n\nmethods.extractPostmanURLProtocolFromURL = (url) => {\n  const protocol = url.getIn([ 'protocol', 0 ]) || 'http'\n\n  if (protocol[protocol.length - 1] !== ':') {\n    return { key: 'protocol', value: protocol }\n  }\n\n  return { key: 'protocol', value: protocol.slice(0, -1) }\n}\n\nmethods.createPostmanURLObjectFromURLString = (urlString) => {\n  const url = new URL({\n    url: urlString,\n    variableDelimiters: List([ '{{', '}}', ':' ])\n  })\n\n  const kvs = [\n    methods.extractPostmanURLProtocolFromURL(url),\n    methods.extractPostmanURLDomainFromURL(url),\n    methods.extractPostmanURLPortFromURL(url),\n    methods.extractPostmanURLPathFromURL(url),\n    methods.extractPostmanURLQueryFromURL(urlString)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractProtocolStringFromPostmanURLObject = (urlObject) => {\n  return (urlObject.protocol || 'http') + '://'\n}\n\nmethods.extractDomainStringFromPostmanURLObject = (urlObject) => {\n  const domain = urlObject.domain || urlObject.host\n  if (typeof domain === 'string') {\n    return domain\n  }\n\n  if (!Array.isArray(domain)) {\n    return 'localhost'\n  }\n\n  return domain.join('.') || 'localhost'\n}\n\nmethods.extractPortStringFromPostmanURLObject = (urlObject) => {\n  if (!urlObject.port) {\n    return ''\n  }\n\n  return ':' + urlObject.port\n}\n\nmethods.extractPathStringFromPostmanURLObject = (urlObject) => {\n  if (typeof urlObject.path === 'string') {\n    return urlObject.path || '/'\n  }\n\n  if (!Array.isArray(urlObject.path)) {\n    return '/'\n  }\n\n  return '/' + urlObject.path.map(pathPart => {\n    if (typeof pathPart === 'string') {\n      return pathPart\n    }\n\n    return pathPart.value || ''\n  }).join('/')\n}\n\nmethods.extractQueryStringFromPostmanURLObject = (urlObject) => {\n  if (\n    !urlObject.query ||\n    !Array.isArray(urlObject.query) ||\n    !urlObject.query.length\n  ) {\n    return ''\n  }\n\n  const queryParams = urlObject.query.map(queryParam => {\n    return (queryParam.key || '') + '=' + (queryParam.value || '')\n  })\n\n  return '?' + queryParams.join('&')\n}\n\nmethods.createPostmanURLStringFromURLObject = (urlObject) => {\n  if (!urlObject) {\n    return 'http://localhost/'\n  }\n\n  const url = [\n    methods.extractProtocolStringFromPostmanURLObject(urlObject),\n    methods.extractDomainStringFromPostmanURLObject(urlObject),\n    methods.extractPortStringFromPostmanURLObject(urlObject),\n    methods.extractPathStringFromPostmanURLObject(urlObject),\n    methods.extractQueryStringFromPostmanURLObject(urlObject)\n  ].join('')\n\n  return url\n}\n\nmethods.normalizeRequestURL = (item) => {\n  if (!item.request) {\n    return item\n  }\n\n  if (typeof item.request.url === 'string') {\n    item.request.urlString = item.request.url\n    item.request.url = methods.createPostmanURLObjectFromURLString(item.request.urlString)\n  }\n  else {\n    if (item.request.url && !item.request.url.domain && item.request.url.host) {\n      item.request.url.domain = item.request.url.host\n    }\n    item.request.urlString = methods.createPostmanURLStringFromURLObject(item.request.url)\n  }\n\n  return item\n}\n\nmethods.normalizeChild = (auth, item) => {\n  let $item = item\n  $item = methods.normalizeRequestItem($item)\n  $item = methods.normalizeAuthItem(auth, $item)\n  $item = methods.normalizeRequestURL($item)\n\n  return $item\n}\n\nmethods.normalizeItems = (itemGroup) => {\n  if (itemGroup.request) {\n    return itemGroup\n  }\n\n  if (!itemGroup.item || !Array.isArray(itemGroup.item)) {\n    return itemGroup\n  }\n\n  itemGroup.item = itemGroup.item\n    .map(item => methods.normalizeChild(itemGroup.auth, item))\n    .map(methods.normalizeItems)\n\n  return itemGroup\n}\n\nmethods.extractGlobalsFromUrlString = (urlString) => {\n  if (typeof urlString !== 'string') {\n    return []\n  }\n\n  const globals = (urlString.match(/{{([^{}]*)}}/g) || [])\n    .map(t => ({ key: t.slice(2, -2) }))\n\n  return globals\n}\n\nmethods.extractGlobalsFromHeader = (header) => {\n  if (typeof header !== 'object' && typeof header !== 'string') {\n    return []\n  }\n\n  if (typeof header === 'string') {\n    return (header.match(/{{([^{}]*)}}/g) || [])\n      .map(t => ({ key: t.slice(2, -2) }))\n  }\n\n  if (typeof header.value !== 'string') {\n    return []\n  }\n\n  const value = (header.value + '')\n  const globals = (value.match(/{{([^{}]*)}}/g) || [])\n    .map(t => ({ key: t.slice(2, -2) }))\n\n  return globals\n}\n\nmethods.extractGlobalsFromHeaders = (headers) => {\n  if (typeof headers !== 'object' && typeof headers !== 'string') {\n    return []\n  }\n\n  if (typeof headers === 'string') {\n    return (headers.match(/{{([^{}]*)}}/g) || [])\n      .map(t => ({ key: t.slice(2, -2) }))\n  }\n\n  if (!Array.isArray(headers)) {\n    return []\n  }\n\n  return headers\n    .map(methods.extractGlobalsFromHeader)\n    .reduce(flatten, [])\n}\n\nmethods.extractGlobalsFromRawBody = (raw) => {\n  if (typeof raw !== 'string') {\n    return []\n  }\n\n  if (raw.match(/^{{([^{}]*)}}$/)) {\n    return [ { key: raw.slice(2, -2) } ]\n  }\n\n  return []\n}\n\nmethods.extractGlobalsFromEncodedBody = (body) => {\n  if (!body || !Array.isArray(body)) {\n    return []\n  }\n\n  return body\n    .map(param => {\n      if (typeof param !== 'object' || typeof param.value !== 'string') {\n        return null\n      }\n\n      const value = param.value\n      const match = value.match(/^{{([^{}]*)}}$/)\n\n      if (!match) {\n        return null\n      }\n\n      return { key: match[1] }\n    })\n    .filter(v => !!v)\n}\n\nmethods.extractGlobalsFromFileBody = (body) => {\n  if (!body || !body.content || typeof body.content !== 'string') {\n    return []\n  }\n\n  const match = body.content.match(/^{{([^{}]*)}}$/)\n  if (!match) {\n    return []\n  }\n\n  return [ { key: match[1] } ]\n}\n\nmethods.extractGlobalsFromBody = (body) => {\n  if (!body) {\n    return []\n  }\n\n  if (body.raw) {\n    return methods.extractGlobalsFromRawBody(body.raw)\n  }\n\n  if (body.mode === 'urlencoded' || body.mode === 'formdata') {\n    return methods.extractGlobalsFromEncodedBody(body[body.mode])\n  }\n\n  if (body.file) {\n    return methods.extractGlobalsFromFileBody(body.file)\n  }\n\n  return []\n}\n\nmethods.extractGlobalsFromItem = (item) => {\n  const urlString = item.request.urlString\n  const urlGlobals = methods.extractGlobalsFromUrlString(urlString)\n  const headerGlobals = methods.extractGlobalsFromHeaders(item.request.headers)\n  const bodyGlobals = methods.extractGlobalsFromBody(item.request.body)\n\n  return [].concat(urlGlobals, headerGlobals, bodyGlobals)\n}\n\nmethods.extractGlobalsFromItemGroup = (globals, itemGroup) => {\n  if (itemGroup.request) {\n    return [].concat(globals, methods.extractGlobalsFromItem(itemGroup))\n  }\n\n  if (!itemGroup.item || !Array.isArray(itemGroup.item)) {\n    return globals\n  }\n\n  return itemGroup.item.reduce(($globals, item) => {\n    return methods.extractGlobalsFromItemGroup($globals, item)\n  }, globals)\n}\n\nmethods.addGlobalsToRoot = (collection) => {\n  const globals = methods.extractGlobalsFromItemGroup([], collection)\n  collection.globals = globals.reduce(convertEntryListInMap, {})\n  return collection\n}\n\nmethods.normalizeCollection = (options, collection) => {\n  try {\n    const normalized = methods.normalizeItems(collection)\n    const withGlobals = methods.addGlobalsToRoot(normalized)\n    return Promise.resolve({ options, item: withGlobals })\n  }\n  catch (e) {\n    return Promise.reject(e)\n  }\n}\n\nmethods.fixPrimary = (options, { content }) => {\n  let collection = null\n  try {\n    collection = JSON.parse(content)\n  }\n  catch (e) {\n    return Promise.reject(new Error('could not parse postman file (not a JSON)'))\n  }\n\n  if (!collection) {\n    return Promise.reject(new Error('Attempting to parse the Postman file yielded `null`'))\n  }\n\n  return methods.normalizeCollection(options, collection)\n}\n\nmethods.handleRejection = (error) => {\n  return Promise.reject(error)\n}\n\nmethods.areOptionsInvalid = (options) => {\n  if (!options) {\n    return new Error('missing loader argument: options')\n  }\n\n  if (typeof options !== 'object') {\n    return new Error('invalid loader argument: options must be an object')\n  }\n\n  if (\n    typeof options.httpResolver !== 'object' ||\n    typeof options.httpResolver.resolve !== 'function'\n  ) {\n    return new Error('invalid loader argument: options.httpResolver must have a resolve method')\n  }\n\n  if (\n    typeof options.fsResolver !== 'object' ||\n    typeof options.fsResolver.resolve !== 'function'\n  ) {\n    return new Error('invalid loader argument: options.fsResolver must have a resolve method')\n  }\n\n  return null\n}\n\nmethods.validateArgs = ({ options, uri }) => {\n  const invalidOptions = methods.areOptionsInvalid(options)\n  if (invalidOptions) {\n    return invalidOptions\n  }\n\n  if (typeof uri === 'undefined') {\n    return new Error('missing loader argument: uri')\n  }\n\n  return null\n}\n\nmethods.load = ({ options, uri }) => {\n  const error = methods.validateArgs({ options, uri })\n  if (error) {\n    return methods.handleRejection(error)\n  }\n\n  const primaryPromise = methods.resolve(options, uri)\n\n  return primaryPromise\n    .then(\n      (primary) => {\n        return methods.fixPrimary(options, { content: primary })\n      },\n      methods.handleRejection\n    )\n}\n\nexport const __internals__ = methods\nexport default PostmanCollectionV2Loader\n"
  },
  {
    "path": "src/loaders/postman/v2.0/__tests__/Loader.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport URL from '../../../../models/URL'\n\nimport Loader, { __internals__ } from '../Loader'\n\ndescribe('loaders/postman/v2.0/Loader.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Loader }', () => {\n    describe('@load', () => {\n      it('should call methods.load', () => {\n        spyOn(__internals__, 'load').andCall(({ options, uri }) => options + uri)\n        const params = { options: 123, uri: 234 }\n\n        const expected = 123 + 234\n        const actual = Loader.load(params)\n\n        expect(__internals__.load).toHaveBeenCalledWith(params)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@isParsable', () => {\n      it('should call methods.isParsable', () => {\n        spyOn(__internals__, 'isParsable').andCall((content) => content * 2)\n        const params = { content: 123 }\n\n        const expected = 123 * 2\n        const actual = Loader.isParsable(params)\n\n        expect(__internals__.isParsable).toHaveBeenCalledWith(123)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@isParsable', () => {\n    it('should work', () => {\n      const inputs = [\n        'not a json',\n        JSON.stringify(null, null, 2),\n        JSON.stringify({ info: 'some info' }, null, 2),\n        JSON.stringify({ info: { schema: 'some schema' } }, null, 2),\n        JSON.stringify({\n          info: { schema: 'https://schema.getpostman.com/json/collection/v2.0.0/' }\n        }, null, 2),\n        JSON.stringify({\n          info: { schema: 'https://schema.getpostman.com/json/collection/v2.0.0/' },\n          item: 'some weird item'\n        }, null, 2),\n        // true\n        JSON.stringify({\n          info: { schema: 'https://schema.getpostman.com/json/collection/v2.0.0/' },\n          item: []\n        }, null, 2),\n        JSON.stringify({ info: 'some info', item: [] }, null, 2),\n        JSON.stringify({ item: [] }, null, 2)\n      ]\n      const expected = [\n        false,\n        false,\n        false,\n        false,\n        false,\n        false,\n        true,\n        false,\n        false\n      ]\n      const actual = inputs.map(input => __internals__.isParsable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@resolve', () => {\n    it('should work', () => {\n      const inputs = [\n        [\n          {\n            fsResolver: { resolve: () => 123 },\n            httpResolver: { resolve: () => 234 }\n          }, 'https://www.example.com/test'\n        ],\n        [\n          {\n            fsResolver: { resolve: () => 123 },\n            httpResolver: { resolve: () => 234 }\n          }, 'file:///test'\n        ],\n        [\n          {\n            fsResolver: {\n              resolve: (u) => {\n                return u === 'file:///test' ? 123 : 456\n              }\n            },\n            httpResolver: {\n              resolve: (u) => {\n                return u === 'https://www.example.com/test' ? 234 : 345\n              }\n            }\n          }, 'https://www.example.com/test#some/hash'\n        ],\n        [\n          {\n            fsResolver: {\n              resolve: (u) => {\n                return u === 'file:///test' ? 123 : 456\n              }\n            },\n            httpResolver: {\n              resolve: (u) => {\n                return u === 'https://www.example.com/test' ? 234 : 345\n              }\n            }\n          }, 'file:///test#some/hash'\n        ]\n      ]\n      const expected = [\n        234, 123, 234, 123\n      ]\n      const actual = inputs.map(input => __internals__.resolve(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeRequestItem', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { request: {} },\n        { request: 'https://www.example.com' }\n      ]\n      const expected = [\n        {},\n        { request: {} },\n        { request: { url: 'https://www.example.com', method: 'GET' } }\n      ]\n      const actual = inputs.map(input => __internals__.normalizeRequestItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeAuthItem', () => {\n    it('should work', () => {\n      const inputs = [\n        [ null, {} ],\n        [ { a: 123 }, {} ],\n        [ { a: 123 }, { request: {} } ],\n        [ { a: 123 }, { request: { auth: { b: 234 } } } ]\n      ]\n      const expected = [\n        {},\n        { auth: { a: 123 } },\n        { request: { auth: { a: 123 } } },\n        { request: { auth: { b: 234 } } }\n      ]\n      const actual = inputs.map(input => __internals__.normalizeAuthItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPostmanURLDomainFromURL', () => {\n    it('should work', () => {\n      const inputs = [\n        new URL({ url: 'file:///test' }),\n        new URL({ url: 'https://www.example.com:5050/test' })\n      ]\n      const expected = [\n        null,\n        { key: 'domain', value: 'www.example.com' }\n      ]\n      const actual = inputs.map(input => __internals__.extractPostmanURLDomainFromURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPostmanURLPortFromURL', () => {\n    it('should work', () => {\n      const inputs = [\n        new URL({ url: 'file:///test' }),\n        new URL({ url: 'https://www.example.com:5050/test' })\n      ]\n      const expected = [\n        null,\n        { key: 'port', value: '5050' }\n      ]\n      const actual = inputs.map(input => __internals__.extractPostmanURLPortFromURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPostmanURLPathFromURL', () => {\n    it('should work', () => {\n      const inputs = [\n        new URL({ url: 'https://www.example.com:5050' }),\n        new URL({ url: 'https://www.example.com:5050/test' }),\n        (new URL({ url: 'https://www.example.com:5050' })).set('pathname', null)\n      ]\n      const expected = [\n        { key: 'path', value: '/' },\n        { key: 'path', value: '/test' },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractPostmanURLPathFromURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPostmanURLQueryFromURL', () => {\n    it('should work', () => {\n      const inputs = [\n        'https://www.example.com/test',\n        'https://www.example.com/test?some=query&limit=5',\n        'https://www.example.com/test?some=query&limit=5#/some/hash'\n      ]\n      const expected = [\n        null,\n        {\n          key: 'query',\n          value: [ { key: 'some', value: 'query' }, { key: 'limit', value: '5' } ]\n        },\n        {\n          key: 'query',\n          value: [ { key: 'some', value: 'query' }, { key: 'limit', value: '5' } ]\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractPostmanURLQueryFromURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPostmanURLProtocolFromURL', () => {\n    it('should work', () => {\n      const inputs = [\n        new URL({ url: '/test' }),\n        new URL({ url: 'https://www.example.com:5050/test' })\n      ]\n      const expected = [\n        { key: 'protocol', value: 'http' },\n        { key: 'protocol', value: 'https' }\n      ]\n      const actual = inputs.map(input => __internals__.extractPostmanURLProtocolFromURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPostmanURLObjectFromURLString', () => {\n    it('should work', () => {\n      const inputs = [\n        '/test',\n        'https:///test/final',\n        'https://www.example.com:5050/test?some=query&limit=5',\n        'https://www.example.com/test?some=query&limit=5#/some/hash'\n      ]\n      const expected = [\n        {\n          protocol: 'http',\n          path: '/test'\n        },\n        {\n          protocol: 'https',\n          path: '/test/final'\n        },\n        {\n          protocol: 'https',\n          domain: 'www.example.com',\n          port: '5050',\n          path: '/test',\n          query: [\n            { key: 'some', value: 'query' },\n            { key: 'limit', value: '5' }\n          ]\n        },\n        {\n          protocol: 'https',\n          domain: 'www.example.com',\n          path: '/test',\n          query: [\n            { key: 'some', value: 'query' },\n            { key: 'limit', value: '5' }\n          ]\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createPostmanURLObjectFromURLString(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractProtocolStringFromPostmanURLObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { protocol: 'https' }\n      ]\n      const expected = [\n        'http://',\n        'https://'\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractProtocolStringFromPostmanURLObject(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDomainStringFromPostmanURLObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { domain: '' },\n        { domain: 'www.example.com' },\n        { domain: [] },\n        { domain: [ 'www', 'example', 'com' ] }\n      ]\n      const expected = [\n        'localhost',\n        'localhost',\n        'www.example.com',\n        'localhost',\n        'www.example.com'\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractDomainStringFromPostmanURLObject(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPortStringFromPostmanURLObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { port: '5050' }\n      ]\n      const expected = [\n        '',\n        ':5050'\n      ]\n      const actual = inputs.map(input => __internals__.extractPortStringFromPostmanURLObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPathStringFromPostmanURLObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { path: '' },\n        { path: '/some/path' },\n        { path: 1231231 },\n        { path: [] },\n        { path: [ 'some', 'path' ] },\n        { path: [ 'some', { type: 'string', value: 'path' } ] },\n        { path: [ 'some', { type: 'string' } ] }\n      ]\n      const expected = [\n        '/',\n        '/',\n        '/some/path',\n        '/',\n        '/',\n        '/some/path',\n        '/some/path',\n        '/some/'\n      ]\n      const actual = inputs.map(input => __internals__.extractPathStringFromPostmanURLObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryStringFromPostmanURLObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { query: 123 },\n        { query: [] },\n        { query: [ {} ] },\n        { query: [ { key: 123 }, { value: 234 } ] },\n        { query: [ { key: 123, value: 234 }, { key: 345, value: 456 } ] }\n      ]\n      const expected = [\n        '',\n        '',\n        '',\n        '?=',\n        '?123=&=234',\n        '?123=234&345=456'\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractQueryStringFromPostmanURLObject(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPostmanURLStringFromURLObject', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractProtocolStringFromPostmanURLObject')\n        .andCall(({ protocol }) => protocol || '')\n      spyOn(__internals__, 'extractDomainStringFromPostmanURLObject')\n        .andCall(({ domain }) => domain || '')\n      spyOn(__internals__, 'extractPortStringFromPostmanURLObject')\n        .andCall(({ port }) => port || '')\n      spyOn(__internals__, 'extractPathStringFromPostmanURLObject')\n        .andCall(({ path }) => path || '')\n      spyOn(__internals__, 'extractQueryStringFromPostmanURLObject')\n        .andCall(({ query }) => query || '')\n\n      const inputs = [\n        null,\n        {},\n        { protocol: 12, domain: 34, port: 56, path: 78, query: 90 }\n      ]\n      const expected = [\n        'http://localhost/',\n        '',\n        '1234567890'\n      ]\n      const actual = inputs.map(input => __internals__.createPostmanURLStringFromURLObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeRequestURL', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createPostmanURLObjectFromURLString').andCall(v => v + v)\n      spyOn(__internals__, 'createPostmanURLStringFromURLObject').andCall(v => {\n        if (typeof v === 'object') {\n          return v.domain / 2\n        }\n        return v / 2\n      })\n\n      const inputs = [\n        { request: { url: '123' } },\n        { request: { url: 234 } },\n        { request: { url: { host: 345 } } }\n      ]\n      const expected = [\n        { request: { url: '123123', urlString: '123' } },\n        { request: { url: 234, urlString: 234 / 2 } },\n        { request: { url: { host: 345, domain: 345 }, urlString: 345 / 2 } }\n      ]\n      const actual = inputs.map(input => __internals__.normalizeRequestURL(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeChild', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'normalizeRequestItem').andCall(v => v * 2)\n      spyOn(__internals__, 'normalizeAuthItem').andCall((a, v) => a + v)\n      spyOn(__internals__, 'normalizeRequestURL').andCall(v => v * 3)\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        ((234 * 2) + 123) * 3\n      ]\n\n      const actual = inputs.map(input => __internals__.normalizeChild(...input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with real example', () => {\n      const inputs = [\n        [\n          {\n            type: 'basic',\n            basic: { username: 'jon' }\n          },\n          {\n            name: 'some ItemGroup',\n            item: []\n          }\n        ],\n        [\n          {\n            type: 'basic',\n            basic: { username: 'jon' }\n          },\n          {\n            name: 'some Item',\n            request: 'https://www.example.com'\n          }\n        ],\n        [\n          {\n            type: 'basic',\n            basic: { username: 'jon' }\n          },\n          {\n            name: 'some Item',\n            request: {\n              url: 'https://www.example.com'\n            }\n          }\n        ],\n        [\n          {\n            type: 'basic',\n            basic: { username: 'jon' }\n          },\n          {\n            name: 'some Item',\n            request: {\n              url: {\n                protocol: 'https',\n                domain: 'www.example.com',\n                path: '/some/path',\n                query: [\n                  { key: 'limit', value: 5 }\n                ]\n              }\n            }\n          }\n        ]\n      ]\n      const expected = [\n        {\n          name: 'some ItemGroup',\n          item: [],\n          auth: {\n            type: 'basic',\n            basic: { username: 'jon' }\n          }\n        },\n        {\n          name: 'some Item',\n          request: {\n            method: 'GET',\n            url: {\n              protocol: 'https',\n              domain: 'www.example.com',\n              path: '/'\n            },\n            urlString: 'https://www.example.com',\n            auth: {\n              type: 'basic',\n              basic: { username: 'jon' }\n            }\n          }\n        },\n        {\n          name: 'some Item',\n          request: {\n            url: {\n              protocol: 'https',\n              domain: 'www.example.com',\n              path: '/'\n            },\n            urlString: 'https://www.example.com',\n            auth: {\n              type: 'basic',\n              basic: { username: 'jon' }\n            }\n          }\n        },\n        {\n          name: 'some Item',\n          request: {\n            url: {\n              protocol: 'https',\n              domain: 'www.example.com',\n              path: '/some/path',\n              query: [\n                { key: 'limit', value: 5 }\n              ]\n            },\n            urlString: 'https://www.example.com/some/path?limit=5',\n            auth: {\n              type: 'basic',\n              basic: { username: 'jon' }\n            }\n          }\n        }\n      ]\n\n      const actual = inputs.map(input => __internals__.normalizeChild(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeItems', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'normalizeChild').andCall((a, i) => {\n        if (a) {\n          i.auth = a + 1\n        }\n        return i\n      })\n      const inputs = [\n        {},\n        { request: {} },\n        { item: [] },\n        { item: [\n          { request: {} },\n          { request: {} }\n        ] },\n        { item: [\n          { request: {} },\n          { request: {} }\n        ], auth: 123 },\n        { item: [\n          { request: {} },\n          { request: {} },\n          { item: [\n            { request: {} }\n          ] }\n        ], auth: 123 }\n      ]\n      const expected = [\n        {},\n        { request: {} },\n        { item: [] },\n        { item: [\n          { request: {} },\n          { request: {} }\n        ] },\n        { item: [\n          { request: {}, auth: 124 },\n          { request: {}, auth: 124 }\n        ], auth: 123 },\n        { item: [\n          { request: {}, auth: 124 },\n          { request: {}, auth: 124 },\n          { item: [\n            { request: {}, auth: 125 }\n          ], auth: 124 }\n        ], auth: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.normalizeItems(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromUrlString', () => {\n    it('should work', () => {\n      const inputs = [\n        123,\n        '123',\n        '{{ref}}',\n        '{{abc}}{{def}}'\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'ref' } ],\n        [ { key: 'abc' }, { key: 'def' } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromUrlString(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromHeader', () => {\n    it('should work', () => {\n      const inputs = [\n        123,\n        '123',\n        '{{ref}}',\n        '{{abc}}{{def}}',\n        {},\n        { value: 123 },\n        { value: '123' },\n        { value: '{{ref}}' },\n        { value: '{{abc}}{{def}}' }\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'ref' } ],\n        [ { key: 'abc' }, { key: 'def' } ],\n        [],\n        [],\n        [],\n        [ { key: 'ref' } ],\n        [ { key: 'abc' }, { key: 'def' } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromHeader(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromHeaders', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGlobalsFromHeader').andCall(v => [ { key: v } ])\n      const inputs = [\n        123,\n        '123',\n        '{{ref}}',\n        '{{abc}}{{def}}',\n        { a: 123 },\n        [],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'ref' } ],\n        [ { key: 'abc' }, { key: 'def' } ],\n        [],\n        [],\n        [ { key: 123 }, { key: 234 } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromHeaders(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromRawBody', () => {\n    it('should work', () => {\n      const inputs = [\n        123,\n        'abc',\n        '{{abc}}'\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'abc' } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromRawBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromEncodedBody', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        [],\n        [ 123, 234 ],\n        [ 123, { value: 234 } ],\n        [ 123, { value: '234' } ],\n        [ 123, { value: '{{ref}}' } ],\n        [ { value: '{{abc}}' }, { value: '{{def}}' } ]\n      ]\n      const expected = [\n        [],\n        [],\n        [],\n        [],\n        [],\n        [],\n        [ { key: 'ref' } ],\n        [ { key: 'abc' }, { key: 'def' } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromEncodedBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromFileBody', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { content: 123 },\n        { content: 'abc' },\n        { content: '{{ref}}' }\n      ]\n      const expected = [\n        [],\n        [],\n        [],\n        [],\n        [ { key: 'ref' } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromFileBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromBody', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGlobalsFromRawBody').andCall(v => [ v * 2 ])\n      spyOn(__internals__, 'extractGlobalsFromEncodedBody').andCall(v => [ v * 3 ])\n      spyOn(__internals__, 'extractGlobalsFromFileBody').andCall(v => [ v * 4 ])\n\n      const inputs = [\n        null,\n        {},\n        { raw: 123 },\n        { mode: 'urlencoded', urlencoded: 234 },\n        { mode: 'formdata', formdata: 345 },\n        { mode: 'file', file: 456 }\n      ]\n      const expected = [\n        [],\n        [],\n        [ 123 * 2 ],\n        [ 234 * 3 ],\n        [ 345 * 3 ],\n        [ 456 * 4 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGlobalsFromUrlString').andCall(v => v ? v : [])\n      spyOn(__internals__, 'extractGlobalsFromHeaders').andCall(v => v ? v : [])\n      spyOn(__internals__, 'extractGlobalsFromBody').andCall(v => v ? v : [])\n\n      const inputs = [\n        { request: {} },\n        { request: {\n          urlString: [ 123 ],\n          headers: [ 234 ],\n          body: [ 345 ]\n        } }\n      ]\n      const expected = [\n        [],\n        [ 123, 234, 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGlobalsFromItemGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGlobalsFromItem').andCall(v => v.request)\n\n      const inputs = [\n        [ [ 123, 234 ], { request: 345 } ],\n        [ [ 123, 234 ], {} ],\n        [ [ 123, 234 ], { item: 'some obj' } ],\n        [ [ 123, 234 ], { item: [] } ],\n        [ [ 123, 234 ], { item: [\n          { request: 456 },\n          { item: [ { request: 567 } ] }\n        ] } ]\n      ]\n\n      const expected = [\n        [ 123, 234, 345 ],\n        [ 123, 234 ],\n        [ 123, 234 ],\n        [ 123, 234 ],\n        [ 123, 234, 456, 567 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractGlobalsFromItemGroup(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addGlobalsToRoot', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGlobalsFromItemGroup').andCall((a, c) => c.globals)\n\n      const inputs = [\n        { globals: [ { key: 'abc', value: 123 }, { key: 'def', value: 234 } ] }\n      ]\n      const expected = [\n        { globals: { abc: 123, def: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.addGlobalsToRoot(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@fixPrimary', () => {\n    it('should work', (done) => {\n      spyOn(__internals__, 'normalizeItems').andCall(c => {\n        if (typeof c === 'object' && c.reject) {\n          throw new Error('failure in normalizeItems')\n        }\n        return c\n      })\n\n      const inputs = [\n        [ 123, { content: null } ],\n        [ 123, { content: 'null' } ],\n        [ 123, { content: { a: 123 } } ],\n        [ 123, { content: JSON.stringify({ a: 123 }, null, 2) } ],\n        [ 123, { content: JSON.stringify({ reject: true }, null, 2) } ]\n      ]\n\n      const expected = [\n        {\n          success: () => { throw new Error('should have failed') },\n          error: () => true\n        },\n        {\n          success: () => { throw new Error('should have failed') },\n          error: () => true\n        },\n        {\n          success: () => { throw new Error('should have failed') },\n          error: () => true\n        },\n        {\n          success: ({ options, item }) => {\n            expect(options).toEqual(123)\n            expect(item).toEqual({ a: 123, globals: {} })\n          },\n          error: (e) => { throw e || new Error('should not have failed') }\n        },\n        {\n          success: () => { throw new Error('should not have failed') },\n          error: () => true\n        }\n      ]\n\n      Promise.all(inputs.map((input, index) => {\n        return __internals__.fixPrimary(...input)\n          .then(expected[index].success, expected[index].error)\n      })).then(\n        () => done(),\n        e => done(e || new Error('one assertion failed'))\n      )\n    })\n  })\n\n  describe('@handleRejection', () => {\n    it('should work', (done) => {\n      const input = 123123\n      __internals__.handleRejection(input)\n        .then(\n          () => done(new Error('should have been rejected')),\n          () => done()\n        )\n    })\n  })\n\n  describe('@validateArgs', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { options: true },\n        { options: {} },\n        { options: { httpResolver: true } },\n        { options: { httpResolver: {} } },\n        { options: { httpResolver: { resolve: true } } },\n        { options: { httpResolver: { resolve: () => {} } } },\n        { options: {\n          httpResolver: { resolve: () => {} },\n          fsResolver: true\n        } },\n        { options: {\n          httpResolver: { resolve: () => {} },\n          fsResolver: {}\n        } },\n        { options: {\n          httpResolver: { resolve: () => {} },\n          fsResolver: { resolve: true }\n        } },\n        { options: {\n          httpResolver: { resolve: () => {} },\n          fsResolver: { resolve: () => {} }\n        } },\n        { options: {\n          httpResolver: { resolve: () => {} },\n          fsResolver: { resolve: () => {} }\n        }, uri: 123 }\n      ]\n      const expected = [\n        new Error('missing loader argument: options'),\n        new Error('invalid loader argument: options must be an object'),\n        new Error('invalid loader argument: options.httpResolver must have a resolve method'),\n        new Error('invalid loader argument: options.httpResolver must have a resolve method'),\n        new Error('invalid loader argument: options.httpResolver must have a resolve method'),\n        new Error('invalid loader argument: options.httpResolver must have a resolve method'),\n        new Error('invalid loader argument: options.fsResolver must have a resolve method'),\n        new Error('invalid loader argument: options.fsResolver must have a resolve method'),\n        new Error('invalid loader argument: options.fsResolver must have a resolve method'),\n        new Error('invalid loader argument: options.fsResolver must have a resolve method'),\n        new Error('missing loader argument: uri'),\n        null\n      ]\n      const actual = inputs.map(input => __internals__.validateArgs(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@load', () => {\n    it('should work', (done) => {\n      spyOn(__internals__, 'validateArgs').andCall(({ options }) => {\n        if (options.error) {\n          return 123\n        }\n        return false\n      })\n\n      spyOn(__internals__, 'handleRejection').andCall(e => Promise.reject(e))\n      spyOn(__internals__, 'resolve').andCall(({ reject }) => {\n        if (reject) {\n          return Promise.reject(234)\n        }\n\n        return Promise.resolve(345)\n      })\n\n      spyOn(__internals__, 'fixPrimary').andCall(({ rejectFix }, { content }) => {\n        return rejectFix ? Promise.reject(456) : Promise.resolve(content)\n      })\n\n      const inputs = [\n        { options: { error: true } },\n        { options: { error: false, reject: true, rejectFix: true }, uri: 234 },\n        { options: { error: false, reject: false, rejectFix: true }, uri: 234 },\n        { options: { error: false, reject: false, rejectFix: false }, uri: 234 }\n      ]\n      const expected = [\n        {\n          success: () => Promise.reject(new Error('should not have succeeded #1')),\n          error: (v) => expect(v).toEqual(123)\n        },\n        {\n          success: () => Promise.reject(new Error('should not have succeeded #2')),\n          error: (v) => expect(v).toEqual(234)\n        },\n        {\n          success: () => Promise.reject(new Error('should not have succeeded #3')),\n          error: (v) => expect(v).toEqual(456)\n        },\n        {\n          success: (v) => expect(v).toEqual(345),\n          error: () => Promise.reject(new Error('should not have failed'))\n        }\n      ]\n      const actual = inputs.map((input, index) => {\n        const { success, error } = expected[index]\n        return __internals__.load(input).then(success, error)\n      })\n\n      Promise.all(actual).then(() => done(), () => done('A test failed'))\n    })\n  })\n})\n"
  },
  {
    "path": "src/loaders/raml/Loader.js",
    "content": "import raml from 'raml-1-parser'\nimport { parse } from 'url'\n\nconst methods = {}\n\nconst __meta__ = {\n  extensions: [ 'yml', 'yaml', 'raml' ],\n  parsable: true,\n  format: 'raml'\n}\n\n/**\n * @class RAMLLoader\n * @description The loader associated with the RAML v1.0 format.\n * It holds all the necessary methods used to load a file in RAML v1.0 format.\n */\nexport class RAMLLoader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\nmethods.isParsable = (content) => {\n  const firstLine = content.split('\\n', 1)[0]\n  const match = firstLine.match(/^#%RAML 1\\.0$/)\n  if (match) {\n    return true\n  }\n\n  return false\n}\n\nmethods.createRAMLResolvers = (options) => {\n  const httpResolver = {\n    getResourceAsync: options.httpResolver.resolve\n  }\n\n  const fsResolver = {\n    contentAsync: options.fsResolver.resolve\n  }\n\n  return { fsResolver, httpResolver }\n}\n\nmethods.load = ({ options, uri }) => {\n  const { fsResolver, httpResolver } = methods.createRAMLResolvers(options)\n\n  if (parse(uri).protocol === 'file:') {\n    return raml.loadApi(\n      parse(uri).pathname,\n      {\n        fsResolver,\n        httpResolver\n      }\n    ).then(ramlApi => {\n      return { options, item: ramlApi.expand() }\n    })\n  }\n  return raml.loadApi(uri, { fsResolver, httpResolver }).then(ramlApi => {\n    return { options, item: ramlApi }\n  })\n}\n\nexport const __internals__ = methods\nexport default RAMLLoader\n"
  },
  {
    "path": "src/loaders/swagger/Loader.js",
    "content": "import { resolve, parse } from 'url'\nimport yaml from 'js-yaml'\n\nconst methods = {}\n\nconst __meta__ = {\n  extensions: [ 'json', 'yml', 'yaml', 'swagger' ],\n  parsable: true,\n  format: 'swagger'\n}\n\n/**\n * @class SwaggerLoader\n * @description The loader associated with the Swagger v2.0 format.\n * It holds all the necessary methods used to load a file in Swagger v2.0 format.\n */\nexport class SwaggerLoader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\nmethods.isParsable = (content) => {\n  const parsed = methods.parseJSONorYAML(content)\n\n  let score = 0\n\n  if (parsed) {\n    score += parsed.swagger ? 1 / 4 : 0\n    score += parsed.swagger === '2.0' ? 1 / 4 : 0\n    score += parsed.info ? 1 / 4 : 0\n    score += parsed.paths ? 1 / 4 : 0\n    score = score > 1 ? 1 : score\n  }\n\n  return score > 0.9\n}\n\n/**\n * converts a string written in JSON or YAML format into an object\n * @param {string} str: the string to parse\n * @returns {Object?} the converted object, or null if str was not a JSON or YAML string\n */\nmethods.parseJSONorYAML = (str) => {\n  let parsed = null\n  try {\n    parsed = JSON.parse(str)\n  }\n  catch (jsonParseError) {\n    try {\n      parsed = yaml.safeLoad(str)\n    }\n    catch (yamlParseError) {\n      return null\n    }\n  }\n  return parsed\n}\n\nmethods.compareUris = (first, second, base) => {\n  const $first = base ? resolve(base, first) : first\n  const $second = base ? resolve(base, second) : second\n\n  return $first.split('#')[0] === $second.split('#')[0]\n}\n\nmethods.traverseObject = (hash, toTraverse) => {\n  const path = hash.split('/').slice(1)\n  let traversed = toTraverse\n  while (path.length > 0) {\n    traversed = traversed[path.shift()]\n    if (!traversed) {\n      return {}\n    }\n  }\n\n  return traversed\n}\n\nmethods.traverse = (content, { $ref = '#/' } = {}) => {\n  const toTraverse = methods.parseJSONorYAML(content)\n\n  if (!toTraverse) {\n    return {}\n  }\n\n  const hash = $ref.split('#')[1]\n\n  if (!hash) {\n    return toTraverse\n  }\n\n  return methods.traverseObject(hash, toTraverse)\n}\n\nmethods.resolve = (options, uri, { $ref = '' } = {}) => {\n  const uriToLoad = resolve(uri, $ref)\n  const protocol = parse(uriToLoad).protocol\n  if (protocol && protocol.substr(0, 4) === 'http') {\n    return options.httpResolver.resolve(uriToLoad.split('#')[0])\n  }\n\n  return options.fsResolver.resolve(uriToLoad.split('#')[0])\n}\n\nmethods.objectMap = (obj, func) => {\n  const mapped = Object.keys(obj).map(key => ({ key: key, value: func(obj[key], key, obj) }))\n  return mapped\n}\n\nmethods.fixRemotePaths = (options, uri, swagger) => {\n  const pathPromises = Object.keys(swagger.paths).map(path => {\n    const pathObj = swagger.paths[path]\n    if (!pathObj.$ref || pathObj.$ref[0] === '#') {\n      return Promise.resolve({ key: path, value: pathObj })\n    }\n\n    const updated = methods\n      .resolve(options, uri, path)\n      .then(item => methods.traverse(item.content, path))\n      .then(value => ({ key: path, value: value }))\n    return updated\n  })\n\n  return Promise.all(pathPromises).then(pathArray => {\n    const paths = pathArray.reduce((acc, { key, value }) => {\n      acc[key] = value\n      return acc\n    }, {})\n\n    swagger.paths = paths\n    return swagger\n  })\n}\n\nmethods.fixImplicitHost = (uri) => {\n  if (!uri) {\n    return 'localhost'\n  }\n\n  const host = parse(uri).host\n  if (!host) {\n    return 'localhost'\n  }\n\n  return host\n}\n\nmethods.fixImplicitUriReferences = (options, uri, swagger) => {\n  if (!swagger.host) {\n    swagger.host = methods.fixImplicitHost(uri)\n  }\n\n  if (!swagger.schemes || !swagger.schemes.length) {\n    const scheme = uri ? (parse(uri).protocol || '').split(':')[0] : 'http'\n    swagger.schemes = [ scheme ]\n  }\n\n  return { options, item: swagger }\n}\n\nmethods.fixPrimary = (options, { uri, content }) => {\n  const swagger = methods.parseJSONorYAML(content)\n\n  if (!swagger) {\n    return Promise.reject(new Error('could not parse swagger file (not a JSON or YAML)'))\n  }\n\n  return methods.fixRemotePaths(options, uri, swagger)\n    .then(updatedSwagger => methods.fixImplicitUriReferences(options, uri, updatedSwagger))\n}\n\nmethods.handleRejection = (error) => {\n  return Promise.reject(error)\n}\n\nmethods.load = ({ options, uri }) => {\n  const primaryPromise = methods.resolve(options, uri)\n\n  return primaryPromise\n    .then(\n      (primary) => {\n        return methods.fixPrimary(options, { uri, content: primary })\n      },\n      methods.handleRejection\n    )\n}\n\nexport const __internals__ = methods\nexport default SwaggerLoader\n"
  },
  {
    "path": "src/loaders/template/v1.0/Loader.js",
    "content": "/**\n * This is a template to help speed up the writing of a loader.\n *\n * A Loader acts as a sort of helper that digests a file and its possible dependencies into a nicely\n * formatted object that can be easily parsed. It is in charge of resolving dependencies and\n * integrating them correctly in the item that is returned. In its most simple form, a Loader can be\n * a simple `JSON.parse` on a file with no dependencies.\n *\n * For example, the swagger format allows paths to be defined in multiple files, with the main file\n * holding references to these externally defined files. In addition, it allows one to implicitly\n * define a host, port and basePath based on the origin of the main file. The Swagger Loader will\n * therefore try to resolve every reference to external paths it encounters, as well as making\n * the host, port and basePath explicit in the main file, if they are not present. This reduces\n * greatly the complexity of the checks that need to be done in the parser.\n *\n * Another example would be the Postman collection v2 format, where the schema is very very\n * permissive in terms of what is considered valid (e.g. a request can be a string representing a\n * URL or it can be an object with a `url` field that can be a string or an object that optionally\n * contains `protocol`, `domain`, `port`, `path` and `query` objects or strings). Additionally,\n * the actual implementation, while valid from a strict json schema point of view, is semantically\n * in contradiction with the format on certain points, with, for instance, a `host` field instead\n * of the `domain` field specified in the spec. All this makes it quite complex to manipulate\n * postman collections. The Postman Collection v2 Loader helps resolve this issue, by normalizing\n * the format (e.g. every string is transformed into its more descriptive object representation).\n *\n * If there are aspects of your format that can be polymorphic, or if your format can be decomposed\n * between multiple files, it is recommended that you normalize it in the Loader for your format.\n *\n * Additionally, you can also define Loaders for non-core files (e.g. files that cannot be parsed\n * alone, but are referenced in core format files)\n */\nimport { resolve, parse } from 'url'\n\nconst methods = {}\n\n/**\n * Meta information about the Loader.\n * @property {Array<string>} extensions - **beta** the file extensions that this loader can be\n * responsible for. This is mostly used for loaders for non-parsable objects.\n * @property {boolean} parsable - whether the Loader returns a parsable item.\n * @property {string} format - the format this Loader is responsible for.\n */\nconst __meta__ = {\n  extensions: [ 'json', 'yml', 'har', 'whatever' ],\n  parsable: true,\n  format: 'template'\n}\n\n/**\n * @class TemplateLoader\n * @description An example loader to help speed up the support of a new format.\n * It holds all the necessary methods used to load and fix a file written in a given format\n */\nexport class TemplateLoader {\n  static extensions = __meta__.extensions\n  static parsable = __meta__.parsable\n  static format = __meta__.format\n\n  /**\n   * Resolves a URI and fixes it if necessary.\n   * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n   * the URI.\n   * @param {Object} namedParams.options - an object holding all the settings necessary for\n   * resolving, loading, parsing and serializing a uri and its dependencies.\n   * @param {string} uri - the URI to resolve to a file that will be used as the primary file for\n   * this loader\n   * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n   * `methods.fixPrimary` for more information.\n   * @static\n   */\n  static load({ options, uri }) {\n    return methods.load({ options, uri })\n  }\n\n  /**\n   * Tests whether the content of a file is parsable by this loader and associated parser. This is\n   * used to tell which loader/parser combo should be used.\n   * @param {string?} content - the content of the file to test\n   * @returns {boolean} whether it is parsable or not\n   * @static\n   */\n  static isParsable({ content }) {\n    return methods.isParsable(content)\n  }\n}\n\n/**\n * Tests whether the content of a file is parsable by this loader and associated parser. This is\n * used to tell which loader/parser combo should be used.\n * @param {string?} content - the content of the file to test\n * @returns {boolean} whether it is parsable or not\n */\nmethods.isParsable = (content) => {\n  // FIXME use your own parsability strategy\n  if (!content) {\n    return false\n  }\n  return false\n}\n\n/**\n * Resolves a $ref uri to a local or remote file. if no $ref is provided, the root uri is used\n * instead.\n * @param {Object} options - an object holding all the settings necessary for resolving, loading,\n * parsing and serializing a uri and its dependencies. It notably holds an `fsResolver` and an\n * `httpResolver` which are used to resolve local and remote files in a given environment.\n * @param {Object} options.fsResolver - a local file resolver. It can fail to resolve if the file\n * does not exist, or if the environment does not allow for local file resolution (web).\n * @param {Object} options.httpResolver - a remote file resolver. It can fail to resolve if the\n * file does not exist or if the environment does not allow for remote file resolution (because of\n * cross-origin for instance)\n * @param {string} uri - the base uri from which to resolve references. If no reference is provided,\n * it itself is resolved.\n * @param {Object} schema - a schema holding a reference to resolve\n * @param {string} schema.$ref - the reference to resolve. It is can depend on the uri of the file\n * in which it was found (hence the existence of the `uri` field)\n * @returns {Promise} the resolved content of the file located at $ref or uri.\n *\n * IMPORTANT: Do NOT implement your own resolution strategies here. Do not use fetch, or\n * XMLHTTPRequest, or http.get here. Loaders must be environment-agnostic, otherwise your code will\n * NOT be portable to multiple environments such node, web, webworker, or paw. If the environment\n * you wish to use this loader in is not already present, you can create it base on the template\n * provided in `src/environments/template/`.\n */\nmethods.resolve = (options, uri, { $ref = '' } = {}) => {\n  const uriToLoad = resolve(uri, $ref)\n  const protocol = parse(uriToLoad).protocol\n  if (protocol && protocol.substr(0, 4) === 'http') {\n    return options.httpResolver.resolve(uriToLoad.split('#')[0])\n  }\n\n  return options.fsResolver.resolve(uriToLoad.split('#')[0])\n}\n\n/**\n * Modifies a primary file to be more easily manipulable (by resolving external dependencies,\n * simplifying the format, normalizing it, removing external context, etc.). This is the entry point\n * for most of the normalization code that can be needed.\n * @param {Object} options - an object holding all the settings necessary for resolving, loading,\n * parsing and serializing a uri and its dependencies. This MUST be passed as a field in the\n * resolved object.\n * @param {Object} resolved - an object describing a resolved uri. it notably contains the content\n * of the resolved file.\n * @param {string} resolved.content - the content a resolved uri.\n * @returns {Promise} a promise containing the normalized/fixed primary item of the format.\n *\n * IMPORTANT: The resolution format is standardized and MUST be of the form { options, item },\n * where the `options` field is the options initially passed to the loader, and the `item` field\n * contains the normalized item (parsed, without dependencies, etc.).\n */\nmethods.fixPrimary = (options, resolved) => {\n  if (!resolved.content || resolved.content) {\n    return Promise.reject(new Error('this method needs to be implemented'))\n  }\n  return Promise.resolve({ options, item: resolved.content })\n}\n\n/**\n * Handles the case of a failed resolution. Different loaders and parsers can be more or less\n * tolerant to failures, and can implement different strategies as to what to do in the event of a\n * failure.\n * @param {Error} error - the error that caused the resolution failure\n * @returns {Promise} a promise that represents the failure strategy of the Loader.\n */\nmethods.handleRejection = (error) => {\n  return Promise.reject(error)\n}\n\n/**\n * Resolves a URI and fixes it if necessary.\n * @param {Object} namedParams - an object holding the named parameters used for the resolution of\n * the URI.\n * @param {Object} namedParams.options - an object holding all the settings necessary for resolving,\n * loading, parsing and serializing a uri and its dependencies.\n * @param {string} uri - the URI to resolve to a file that will be used as the primary file for this\n * loader\n * @returns {Promise} a Promise containing the `options` and normalized `item` in an object. See\n * `methods.fixPrimary` for more information.\n */\nmethods.load = ({ options, uri }) => {\n  const primaryPromise = methods.resolve(options, uri)\n\n  return primaryPromise.then(\n    (primary) => methods.fixPrimary(options, { content: primary }),\n    methods.handleRejection\n  )\n}\n\n/**\n * @exports __internals__ - this object should hold all the methods used in this file. It used to\n * easily mock and spy on internal methods in a testing environment.\n */\nexport const __internals__ = methods\n\n/**\n * @exports TemplateLoader - the core object of this module: the Loader\n */\nexport default TemplateLoader\n"
  },
  {
    "path": "src/loaders/template/v1.0/__tests__/Loader.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport Loader, { __internals__ } from '../Loader'\n\ndescribe('loaders/template/v1.0/Loader.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Loader }', () => {\n    describe('@load', () => {\n      it('should call methods.load', () => {\n        spyOn(__internals__, 'load').andCall(({ options, uri }) => options + uri)\n        const params = { options: 123, uri: 234 }\n\n        const expected = 123 + 234\n        const actual = Loader.load(params)\n\n        expect(__internals__.load).toHaveBeenCalledWith(params)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@isParsable', () => {\n      it('should call methods.isParsable', () => {\n        spyOn(__internals__, 'isParsable').andCall((content) => content * 2)\n        const params = { content: 123 }\n\n        const expected = 123 * 2\n        const actual = Loader.isParsable(params)\n\n        expect(__internals__.isParsable).toHaveBeenCalledWith(123)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@isParsable', () => {\n    const cases = [\n      {\n        test: 'should return false if no content',\n        input: [],\n        expected: false\n      },\n      {\n        test: 'should return false if content',\n        input: [ 'some content' ],\n        expected: false\n      }\n    ]\n\n    cases.forEach(({ test = 'should work', input, expected }) => {\n      it(test, () => {\n        const actual = __internals__.isParsable(...input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@resolve', () => {\n    const cases = [\n      {\n        test: 'should use the httpResolver if uri starts with http',\n        input: [\n          {\n            fsResolver: { resolve: () => 123 },\n            httpResolver: { resolve: () => 234 }\n          },\n          'https://www.example.com/test'\n        ],\n        expected: 234\n      },\n      {\n        test: 'should use the fsResolver if uri starts with file',\n        input: [\n          {\n            fsResolver: { resolve: () => 123 },\n            httpResolver: { resolve: () => 234 }\n          },\n          'file:///test'\n        ],\n        expected: 123\n      },\n      {\n        test: 'should ignore the hash fragment with the httpResolver',\n        input: [\n          {\n            fsResolver: {\n              resolve: (u) => {\n                return u === 'file:///test' ? 123 : 456\n              }\n            },\n            httpResolver: {\n              resolve: (u) => {\n                return u === 'https://www.example.com/test' ? 234 : 345\n              }\n            }\n          },\n          'https://www.example.com/test#some/hash'\n        ],\n        expected: 234\n      },\n      {\n        test: 'should ignore the hash fragment with the fsResolver',\n        input: [\n          {\n            fsResolver: {\n              resolve: (u) => {\n                return u === 'file:///test' ? 123 : 456\n              }\n            },\n            httpResolver: {\n              resolve: (u) => {\n                return u === 'https://www.example.com/test' ? 234 : 345\n              }\n            }\n          },\n          'file:///test#some/hash'\n        ],\n        expected: 123\n      }\n    ]\n\n    cases.forEach(({ test = 'should work', input, expected }) => {\n      it(test, () => {\n        const actual = __internals__.resolve(...input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@fixPrimary', () => {\n    const passthrough = [ true, false, 'data' ]\n    const cases = [\n      {\n        test: 'should reject if no content',\n        input: [\n          { someOptions: 123 },\n          { content: null }\n        ],\n        expected: {\n          success: (done) => () => done(new Error('should have rejected')),\n          error: (done) => () => done()\n        }\n      },\n      {\n        test: 'should reject if content',\n        input: [\n          { someOptions: 123 },\n          { content: 'some content' }\n        ],\n        expected: {\n          success: (done) => () => done(new Error('should have rejected')),\n          error: (done) => () => done()\n        }\n      },\n      {\n        test: 'should resolve if content is shifty',\n        input: [\n          { someOptions: 123 },\n          { get content() { return passthrough.shift() } }\n        ],\n        expected: {\n          success: (done) => () => done(),\n          error: (done) => () => done(new Error('should have resolved'))\n        }\n      }\n    ]\n\n    cases.forEach(({ test = 'should work', input, expected }) => {\n      it(test, (done) => {\n        __internals__.fixPrimary(...input).then(\n          expected.success(done),\n          expected.error(done)\n        )\n      })\n    })\n  })\n\n  describe('@handleRejection', () => {\n    const cases = [\n      {\n        test: 'should reject',\n        input: [\n          new Error('failed to resolve uri for some reason')\n        ],\n        expected: {\n          success: (done) => () => done(new Error('should have rejected')),\n          error: (done) => () => done()\n        }\n      }\n    ]\n\n    cases.forEach(({ test = 'should work', input, expected }) => {\n      it(test, (done) => {\n        __internals__.handleRejection(...input).then(\n          expected.success(done),\n          expected.error(done)\n        )\n      })\n    })\n  })\n\n  describe('@load', () => {\n    const cases = [\n      {\n        test: 'should call methods.fixPrimary if methods.resolve successfully resolves',\n        before: () => {\n          spyOn(__internals__, 'resolve').andReturn(Promise.resolve(123))\n          spyOn(__internals__, 'fixPrimary').andCall((opt, { content }) => {\n            if (content === 123) {\n              return Promise.resolve(234)\n            }\n\n            return Promise.reject(new Error('content should have been 123'))\n          })\n          spyOn(__internals__, 'handleRejection').andReturn(\n            Promise.reject(new Error('should not have been called'))\n          )\n        },\n        input: [\n          { options: { someOptions: 123 }, uri: 'some-uri' }\n        ],\n        expected: {\n          success: (done) => () => done(),\n          error: (done) => (e) => done(new Error(e))\n        }\n      },\n      {\n        test: 'should call methods.handleRejection if methods.resolve fails to resolve',\n        before: () => {\n          spyOn(__internals__, 'resolve').andReturn(Promise.reject(new Error('failed to resolve')))\n          spyOn(__internals__, 'fixPrimary').andReturn(\n            Promise.reject(new Error('should not have been called'))\n          )\n          spyOn(__internals__, 'handleRejection').andReturn(\n            Promise.resolve('successfully called handleRejection')\n          )\n        },\n        input: [\n          { options: { someOptions: 123 }, uri: 'some-uri' }\n        ],\n        expected: {\n          success: (done) => () => done(),\n          error: (done) => (e) => done(new Error(e))\n        }\n      }\n    ]\n\n    cases.forEach(({ test = 'should work', before, input, expected }) => {\n      it(test, (done) => {\n        before()\n        __internals__.load(...input).then(\n          expected.success(done),\n          expected.error(done)\n        )\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "src/mocks/PawMocks.js",
    "content": "/**\n * sets up a spy on functions of a object\n * @param {Object} $this: the object to add spies to\n * @param {string} field: the field for which to add a spy\n * @param {string} prefix: the prefix to use for the spy object\n * @returns {Function} a hook function that updates the state of the spy before calling the spied-on\n * function.\n */\nconst setupFuncSpy = ($this, field, prefix) => {\n  return (...args) => {\n    $this[prefix + 'spy'][field].count += 1\n    $this[prefix + 'spy'][field].calls.push(args)\n    return $this[prefix + 'spy'][field].func.apply($this, args)\n  }\n}\n\n/**\n * creates a spies object that holds all the relevant information for a field\n * @param {Object} spies: the spies object to update\n * @param {Object} obj: the object to spy on\n * @returns {Object} the updated spies object\n */\nconst createSpies = (spies, obj) => {\n  for (const field in obj) {\n    if (obj.hasOwnProperty(field) && typeof obj[field] === 'function') {\n      spies[field] = {\n        count: 0,\n        calls: [],\n        func: obj[field]\n      }\n    }\n  }\n\n  return spies\n}\n\n/**\n * binds spies from an instance to an object methods\n * @param {Object} $this: the instance to which the spies should be bound\n * @param {Object} obj: the object to spy on\n * @param {string} prefix: the prefix to use for the spy methods and fields\n * @returns {void}\n */\nconst bindSpies = ($this, obj, prefix) => {\n  for (const field in obj) {\n    // TODO maybe go up the prototype chain to spoof not-owned properties\n    if (obj.hasOwnProperty(field)) {\n      if (typeof obj[field] === 'function') {\n        $this[field] = setupFuncSpy($this, field, prefix)\n      }\n      else {\n        $this[field] = obj[field]\n      }\n    }\n  }\n}\n\n/**\n * @class Mock\n * @description wraps an arbitrary object and exposes spies on its methods.\n */\nexport class Mock {\n  /**\n   * creates a Mock instance based on an object\n   * @constructor\n   * @param {Object} obj: the object to spy on\n   * @param {string} prefix: the prefix to use for the spy methods and fields.\n   */\n  constructor(obj, prefix = '$$_') {\n    const spies = createSpies({}, obj)\n    this[prefix + 'spy'] = spies\n\n    bindSpies(this, obj, prefix)\n\n    this[prefix + 'spyOn'] = (field, func) => {\n      this[prefix + 'spy'][field].func = func\n      return this\n    }\n\n    this[prefix + 'getSpy'] = (field) => {\n      return this[prefix + 'spy'][field]\n    }\n  }\n}\n\n/**\n * @class ClassMock\n * @description wraps a class instance and exposes spies on its methods.\n */\nexport class ClassMock extends Mock {\n  /**\n   * creates a ClassMock instance based on a class instance\n   * @constructor\n   * @param {Object} instance: the class instance to spy on\n   * @param {string} prefix: the prefix to use for the spy methods and fields.\n   */\n  constructor(instance, prefix = '$$_') {\n    const properties = Object.getOwnPropertyNames(\n      Object.getPrototypeOf(instance)\n    )\n\n    const obj = {}\n    for (const property of properties) {\n      if (property !== 'constructor') {\n        obj[property] = ::Object.getPrototypeOf(instance)[property]\n      }\n    }\n\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class PawContextMock\n * @description creates a mock of a Paw Context.\n */\nexport class PawContextMock extends Mock {\n  /**\n   * creates a fake Paw Context\n   * @constructor\n   * @param {Object} baseObj: a base object to use for the spies\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(baseObj, prefix) {\n    const obj = {\n      getCurrentRequest: () => {},\n      getRequestByName: () => {},\n      getRequestGroupByName: () => {},\n      getRootRequestTreeItems: () => {},\n      getRootRequests: () => {},\n      getAllRequests: () => {},\n      getAllGroups: () => {},\n      getEnvironmentDomainByName: () => {},\n      getEnvironmentVariableByName: () => {},\n      getRequestById: () => {},\n      getRequestGroupById: () => {},\n      getEnvironmentDomainById: () => {},\n      getEnvironmentVariableById: () => {},\n      getEnvironmentById: () => {},\n      createRequest: () => {},\n      createRequestGroup: () => {},\n      createEnvironmentDomain: () => {}\n    }\n    Object.assign(obj, baseObj)\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class PawContextMock\n * @description creates a mock of a Paw Request.\n */\nexport class PawRequestMock extends Mock {\n  /**\n   * creates a fake Paw Request\n   * @constructor\n   * @param {Object} baseObj: a base object to use for the spies\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(baseObj, prefix) {\n    const obj = {\n      id: null,\n      name: null,\n      order: null,\n      parent: null,\n      url: null,\n      method: null,\n      headers: null,\n      httpBasicAuth: null,\n      oauth1: null,\n      oauth2: null,\n      body: null,\n      urlEncodedBody: null,\n      multipartBody: null,\n      jsonBody: null,\n      timeout: null,\n      followRedirects: null,\n      redirectAuthorization: null,\n      redirectMethod: null,\n      sendCookies: null,\n      storeCookies: null,\n      getUrl: () => {},\n      getUrlBase: () => {},\n      getUrlParams: () => {},\n      getUrlParameters: () => {},\n      getHeaders: () => {},\n      getHeaderByName: () => {},\n      setHeader: () => {},\n      getHttpBasicAuth: () => {},\n      getOAuth1: () => {},\n      getOAuth2: () => {},\n      getBody: () => {},\n      getUrlEncodedBody: () => {},\n      getMultipartBody: () => {},\n      getLastExchange: () => {}\n    }\n    Object.assign(obj, baseObj)\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class DynamicValue\n * @description creates a mock of a DynamicValue.\n */\nexport class DynamicValue extends Mock {\n  /**\n   * creates a fake DynamicValue\n   * @constructor\n   * @param {string} type: the type of the DynamicValue\n   * @param {Object} baseObj: a base object to use for the spies\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(type, baseObj, prefix = '$$_') {\n    const obj = {\n      type: type,\n      toString: () => {},\n      getEvaluatedString: () => {}\n    }\n    Object.assign(obj, baseObj)\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class DynamicString\n * @description creates a mock of a DynamicString.\n */\nexport class DynamicString extends Mock {\n  /**\n   * creates a fake DynamicString\n   * @constructor\n   * @param {Array} items: the items in a DynamicString\n   */\n  constructor(...items) {\n    const obj = {\n      length: null,\n      components: items,\n      toString: () => {},\n      getComponentAtIndex: () => {},\n      getSimpleString: () => {},\n      getOnlyString: () => {},\n      getOnlyDynamicValue: () => {},\n      getEvaluatedString: () => {},\n      copy: () => {},\n      appendString: () => {},\n      appendDynamicValue: () => {},\n      appendDynamicString: () => {}\n    }\n    super(obj, '$$_')\n  }\n}\n\n/**\n * @class InputField\n * @description creates a mock of an InputField.\n */\nexport class InputField extends Mock {\n  /**\n   * creates a fake InputField\n   * @constructor\n   * @param {string} key: the key of an InputField\n   * @param {string} name: the name of an InputField\n   * @param {string} type: the type of an InputField\n   * @param {Object} options: the options of an InputField\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(key, name, type, options, prefix = '') {\n    const obj = {\n      key: key,\n      name: name,\n      type: type,\n      options: options\n    }\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class NetworkHTTPRequest\n * @description creates a mock of a NetworkHTTPRequest.\n */\nexport class NetworkHTTPRequest extends Mock {\n  /**\n   * creates a fake InputField\n   * @constructor\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(prefix = '') {\n    const obj = {\n      requestUrl: null,\n      requestMethod: null,\n      requestTimeout: null,\n      requestBody: null,\n      responseStatusCode: null,\n      responseHeaders: null,\n      responseBody: null,\n      setRequestHeader: () => {},\n      getRequestHeader: () => {},\n      getResponseHeader: () => {},\n      send: () => {}\n    }\n    super(obj, prefix)\n  }\n}\n\n/**\n * @class RecordParameter\n * @description creates a mock of a RecordParameter.\n */\nexport class RecordParameter extends Mock {\n  /**\n   * creates a fake RecordParameter\n   * @constructor\n   * @param {string} key: the key of an RecordParameter\n   * @param {string} value: the value of an RecordParameter\n   * @param {boolean?} enabled: whether a RecordParameter is enabled\n   * @param {string} prefix: the prefix to use for the spy methods and fields\n   */\n  constructor(key, value, enabled, prefix = '') {\n    const obj = {\n      key, value, enabled,\n      toString: () => {}\n    }\n\n    super(obj, prefix)\n  }\n}\n\n/**\n * a simple mock around a class that does nothing\n * @param {Object} _class: the class to wrap with nothing\n * @returns {Object} the same _class, with nothing changed\n */\nexport const registerImporter = (_class) => {\n  return _class\n}\n\n/**\n * a simple mock around a class that does nothing\n * @param {Object} _class: the class to wrap with nothing\n * @returns {Object} the same _class, with nothing changed\n */\nexport const registerCodeGenerator = (_class) => {\n  return _class\n}\n"
  },
  {
    "path": "src/mocks/PawShims.js",
    "content": "/* istanbul ignore next */\nif (\n    typeof registerImporter === 'undefined' ||\n    typeof DynamicValue === 'undefined' ||\n    typeof DynamicString === 'undefined' ||\n    typeof registerCodeGenerator === 'undefined' ||\n    typeof InputField === 'undefined' ||\n    typeof NetworkHTTPRequest === 'undefined'\n) {\n  const mocks = require('./PawMocks.js')\n  module.exports = {\n    registerImporter: mocks.registerImporter,\n    DynamicValue: mocks.DynamicValue,\n    DynamicString: mocks.DynamicString,\n    registerCodeGenerator: mocks.registerCodeGenerator,\n    InputField: mocks.InputField,\n    NetworkHTTPRequest: mocks.NetworkHTTPRequest,\n    RecordParameter: mocks.RecordParameter\n  }\n}\nelse {\n    /* eslint-disable no-undef */\n  module.exports = {\n    registerImporter: registerImporter,\n    DynamicValue: DynamicValue,\n    DynamicString: DynamicString,\n    registerCodeGenerator: registerCodeGenerator,\n    InputField: InputField,\n    NetworkHTTPRequest: NetworkHTTPRequest,\n    RecordParameter: RecordParameter\n  }\n    /* eslint-enable no-undef */\n}\n"
  },
  {
    "path": "src/mocks/__tests__/PawMocks.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\n/* eslint-disable require-jsdoc */\nimport expect from 'expect'\n\nimport {\n  Mock,\n  ClassMock,\n  PawContextMock,\n  PawRequestMock,\n  DynamicValue,\n  DynamicString,\n  InputField,\n  NetworkHTTPRequest,\n  RecordParameter,\n  registerImporter, registerCodeGenerator\n} from '../PawMocks'\n\ndescribe('mocks/PawMocks.js', () => {\n  describe('{ Mock }', () => {\n    describe('~constructor', () => {\n      it('should only wrap functions field in object', () => {\n        const obj = { a: 123, b: 234, c: 345 }\n        const mock = new Mock(obj)\n\n        expect(mock.$$_spy).toEqual({})\n        expect(mock.$$_spyOn).toBeA(Function)\n        expect(mock.$$_getSpy).toBeA(Function)\n        delete mock.$$_spy\n        delete mock.$$_spyOn\n        delete mock.$$_getSpy\n        expect(JSON.parse(JSON.stringify(mock))).toEqual(obj)\n      })\n\n      it('should only use provided prefix', () => {\n        const obj = { a: 123, b: 234, c: 345 }\n        const mock = new Mock(obj, '__')\n\n        expect(mock.__spy).toExist()\n        expect(mock.__spyOn).toExist()\n        expect(mock.__getSpy).toExist()\n      })\n\n      it('should only ignore not own properties', () => {\n        function A() {\n          this.a = 123\n        }\n        A.prototype.b = 123\n\n        const obj = new A()\n        const mock = new Mock(obj, '__')\n\n        expect(mock.__spy).toExist()\n        expect(mock.__spyOn).toExist()\n        expect(mock.__getSpy).toExist()\n        expect(mock.a).toExist()\n        expect(mock.b).toNotExist()\n      })\n\n      it('should wrap function fields with spy', () => {\n        const obj = { wrapped: () => 123 }\n        const mock = new Mock(obj, '')\n\n        expect(mock.spy.wrapped).toEqual({ count: 0, calls: [], func: obj.wrapped })\n      })\n\n      it('should replace wrapped function fields with spy function with spyOn', () => {\n        const obj = { wrapped: () => 123 }\n        const mock = new Mock(obj, '')\n\n        expect(mock.spy.wrapped).toEqual({ count: 0, calls: [], func: obj.wrapped })\n        const replaceFunc = () => 234\n        mock.spyOn('wrapped', replaceFunc)\n        expect(mock.spy.wrapped).toEqual({ count: 0, calls: [], func: replaceFunc })\n      })\n\n      it('should replace update spy on call', () => {\n        const obj = { wrapped: () => 123 }\n        const mock = new Mock(obj, '')\n\n        expect(mock.spy.wrapped).toEqual({ count: 0, calls: [], func: obj.wrapped })\n        const replaceFunc = () => 234\n        mock.spyOn('wrapped', replaceFunc)\n        expect(mock.spy.wrapped).toEqual({ count: 0, calls: [], func: replaceFunc })\n        mock.wrapped('abc', 'def')\n        expect(mock.spy.wrapped).toEqual({\n          count: 1,\n          calls: [ [ 'abc', 'def' ] ],\n          func: replaceFunc\n        })\n      })\n\n      it('should get correct spy on getSpy call', () => {\n        const obj = { wrapped: () => 123, secret: () => 345 }\n        const mock = new Mock(obj, '')\n\n        const replaceFunc = () => 234\n        const replaceSecretFunc = () => 456\n        mock.spyOn('wrapped', replaceFunc)\n        mock.spyOn('secret', replaceSecretFunc)\n\n        mock.wrapped('abc', 'def')\n        expect(mock.getSpy('wrapped')).toEqual({\n          count: 1,\n          calls: [ [ 'abc', 'def' ] ],\n          func: replaceFunc\n        })\n      })\n    })\n  })\n\n  describe('{ ClassMock }', () => {\n    describe('~constructor', () => {\n      it('should use 1st param as instance to mock', () => {\n        class Test {\n          constructor() {}\n\n          someMethod() {\n            return this.a + this.b\n          }\n        }\n        const instance = new Test()\n        const params = [ instance ]\n        const actual = new ClassMock(...params)\n        expect(actual.someMethod).toBeA(Function)\n      })\n    })\n  })\n\n  describe('{ PawContextMock }', () => {\n    /* eslint-disable max-statements */\n    describe('~constructor', () => {\n      it('should merge 1st param into Mock', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.a).toEqual(123)\n        expect(actual.b).toEqual(234)\n        expect(actual.c).toEqual(345)\n      })\n\n      it('should expose `getCurrentRequest` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getCurrentRequest).toBeA(Function)\n        expect(actual.getCurrentRequest()).toNotExist()\n      })\n\n      it('should expose `getRequestByName` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRequestByName).toBeA(Function)\n        expect(actual.getRequestByName()).toNotExist()\n      })\n\n      it('should expose `getRequestGroupByName` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRequestGroupByName).toBeA(Function)\n        expect(actual.getRequestGroupByName()).toNotExist()\n      })\n\n      it('should expose `getRootRequestTreeItems` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRootRequestTreeItems).toBeA(Function)\n        expect(actual.getRootRequestTreeItems()).toNotExist()\n      })\n\n      it('should expose `getRootRequests` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRootRequests).toBeA(Function)\n        expect(actual.getRootRequests()).toNotExist()\n      })\n\n      it('should expose `getAllRequests` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getAllRequests).toBeA(Function)\n        expect(actual.getAllRequests()).toNotExist()\n      })\n\n      it('should expose `getAllGroups` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getAllGroups).toBeA(Function)\n        expect(actual.getAllGroups()).toNotExist()\n      })\n\n      it('should expose `getEnvironmentDomainByName` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getEnvironmentDomainByName).toBeA(Function)\n        expect(actual.getEnvironmentDomainByName()).toNotExist()\n      })\n\n      it('should expose `getEnvironmentVariableByName` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getEnvironmentVariableByName).toBeA(Function)\n        expect(actual.getEnvironmentVariableByName()).toNotExist()\n      })\n\n      it('should expose `getRequestById` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRequestById).toBeA(Function)\n        expect(actual.getRequestById()).toNotExist()\n      })\n\n      it('should expose `getRequestGroupById` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getRequestGroupById).toBeA(Function)\n        expect(actual.getRequestGroupById()).toNotExist()\n      })\n\n      it('should expose `getEnvironmentDomainById` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getEnvironmentDomainById).toBeA(Function)\n        expect(actual.getEnvironmentDomainById()).toNotExist()\n      })\n\n      it('should expose `getEnvironmentVariableById` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getEnvironmentVariableById).toBeA(Function)\n        expect(actual.getEnvironmentVariableById()).toNotExist()\n      })\n\n      it('should expose `getEnvironmentById` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.getEnvironmentById).toBeA(Function)\n        expect(actual.getEnvironmentById()).toNotExist()\n      })\n\n      it('should expose `createRequest` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.createRequest).toBeA(Function)\n        expect(actual.createRequest()).toNotExist()\n      })\n\n      it('should expose `createRequestGroup` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.createRequestGroup).toBeA(Function)\n        expect(actual.createRequestGroup()).toNotExist()\n      })\n\n      it('should expose `createEnvironmentDomain` method', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawContextMock(...params)\n        expect(actual.createEnvironmentDomain).toBeA(Function)\n        expect(actual.createEnvironmentDomain()).toNotExist()\n      })\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('{ PawRequestMock }', () => {\n    /* eslint-disable max-statements */\n    describe('~constructor', () => {\n      it('should merge 1st param into Mock', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.a).toEqual(123)\n        expect(actual.b).toEqual(234)\n        expect(actual.c).toEqual(345)\n      })\n\n      it('should expose `id` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.id).toEqual(null)\n      })\n\n      it('should expose `name` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.name).toEqual(null)\n      })\n\n      it('should expose `order` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.order).toEqual(null)\n      })\n\n      it('should expose `parent` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.parent).toEqual(null)\n      })\n\n      it('should expose `url` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.url).toEqual(null)\n      })\n\n      it('should expose `method` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.method).toEqual(null)\n      })\n\n      it('should expose `headers` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.headers).toEqual(null)\n      })\n\n      it('should expose `httpBasicAuth` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.httpBasicAuth).toEqual(null)\n      })\n\n      it('should expose `oauth1` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.oauth1).toEqual(null)\n      })\n\n      it('should expose `oauth2` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.oauth2).toEqual(null)\n      })\n\n      it('should expose `body` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.body).toEqual(null)\n      })\n\n      it('should expose `urlEncodedBody` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.urlEncodedBody).toEqual(null)\n      })\n\n      it('should expose `multipartBody` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.multipartBody).toEqual(null)\n      })\n\n      it('should expose `jsonBody` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.jsonBody).toEqual(null)\n      })\n\n      it('should expose `timeout` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.timeout).toEqual(null)\n      })\n\n      it('should expose `followRedirects` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.followRedirects).toEqual(null)\n      })\n\n      it('should expose `redirectAuthorization` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.redirectAuthorization).toEqual(null)\n      })\n\n      it('should expose `sendCookies` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.sendCookies).toEqual(null)\n      })\n\n      it('should expose `redirectMethod` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.redirectMethod).toEqual(null)\n      })\n\n      it('should expose `storeCookies` field', () => {\n        const params = [ { a: 123, b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.storeCookies).toEqual(null)\n      })\n\n      it('should expose `getUrl` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getUrl).toBeA(Function)\n        expect(actual.getUrl()).toNotExist()\n      })\n\n      it('should expose `getUrlBase` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getUrlBase).toBeA(Function)\n        expect(actual.getUrlBase()).toNotExist()\n      })\n\n      it('should expose `getUrlParams` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getUrlParams).toBeA(Function)\n        expect(actual.getUrlParams()).toNotExist()\n      })\n\n      it('should expose `getUrlParameters` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getUrlParameters).toBeA(Function)\n        expect(actual.getUrlParameters()).toNotExist()\n      })\n\n      it('should expose `getHeaders` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getHeaders).toBeA(Function)\n        expect(actual.getHeaders()).toNotExist()\n      })\n\n      it('should expose `getHeaderByName` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getHeaderByName).toBeA(Function)\n        expect(actual.getHeaderByName()).toNotExist()\n      })\n\n      it('should expose `setHeader` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.setHeader).toBeA(Function)\n        expect(actual.setHeader()).toNotExist()\n      })\n\n      it('should expose `getHttpBasicAuth` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getHttpBasicAuth).toBeA(Function)\n        expect(actual.getHttpBasicAuth()).toNotExist()\n      })\n\n      it('should expose `getOAuth1` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getOAuth1).toBeA(Function)\n        expect(actual.getOAuth1()).toNotExist()\n      })\n\n      it('should expose `getOAuth2` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getOAuth2).toBeA(Function)\n        expect(actual.getOAuth2()).toNotExist()\n      })\n\n      it('should expose `getBody` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getBody).toBeA(Function)\n        expect(actual.getBody()).toNotExist()\n      })\n\n      it('should expose `getUrlEncodedBody` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getUrlEncodedBody).toBeA(Function)\n        expect(actual.getUrlEncodedBody()).toNotExist()\n      })\n\n      it('should expose `getMultipartBody` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getMultipartBody).toBeA(Function)\n        expect(actual.getMultipartBody()).toNotExist()\n      })\n\n      it('should expose `getLastExchange` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new PawRequestMock(...params)\n        expect(actual.getLastExchange).toBeA(Function)\n        expect(actual.getLastExchange()).toNotExist()\n      })\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('{ DynamicValue }', () => {\n    describe('~constructor', () => {\n      it('should expose 1st param as `type` field', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicValue(...params)\n        expect(actual.type).toEqual(123)\n      })\n\n      it('should merge 2nd param into Mock', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicValue(...params)\n        expect(actual.b).toEqual(234)\n        expect(actual.c).toEqual(345)\n      })\n\n      it('should expose `toString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicValue(...params)\n        expect(actual.toString).toBeA(Function)\n        expect(actual.toString()).toNotExist()\n      })\n\n      it('should expose `getEvaluatedString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicValue(...params)\n        expect(actual.getEvaluatedString).toBeA(Function)\n        expect(actual.getEvaluatedString()).toNotExist()\n      })\n    })\n  })\n\n  describe('{ DynamicString }', () => {\n    /* eslint-disable max-statements */\n    describe('~constructor', () => {\n      it('should expose params as `components` field', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.components).toEqual(params)\n      })\n\n      it('should expose `length` field', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.length).toEqual(null)\n      })\n\n      it('should expose `toString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.toString).toBeA(Function)\n        expect(actual.toString()).toNotExist()\n      })\n\n      it('should expose `getComponentAtIndex` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.getComponentAtIndex).toBeA(Function)\n        expect(actual.getComponentAtIndex()).toNotExist()\n      })\n\n      it('should expose `getSimpleString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.getSimpleString).toBeA(Function)\n        expect(actual.getSimpleString()).toNotExist()\n      })\n\n      it('should expose `getOnlyString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.getOnlyString).toBeA(Function)\n        expect(actual.getOnlyString()).toNotExist()\n      })\n\n      it('should expose `getOnlyDynamicValue` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.getOnlyDynamicValue).toBeA(Function)\n        expect(actual.getOnlyDynamicValue()).toNotExist()\n      })\n\n      it('should expose `getEvaluatedString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.getEvaluatedString).toBeA(Function)\n        expect(actual.getEvaluatedString()).toNotExist()\n      })\n\n      it('should expose `copy` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.copy).toBeA(Function)\n        expect(actual.copy()).toNotExist()\n      })\n\n      it('should expose `appendString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.appendString).toBeA(Function)\n        expect(actual.appendString()).toNotExist()\n      })\n\n      it('should expose `appendDynamicValue` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.appendDynamicValue).toBeA(Function)\n        expect(actual.appendDynamicValue()).toNotExist()\n      })\n\n      it('should expose `appendDynamicString` method', () => {\n        const params = [ 123, { b: 234, c: 345 } ]\n        const actual = new DynamicString(...params)\n        expect(actual.appendDynamicString).toBeA(Function)\n        expect(actual.appendDynamicString()).toNotExist()\n      })\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('{ InputField }', () => {\n    describe('~constructor', () => {\n      it('should expose 1st param as `key` field', () => {\n        const params = [ 123, 234, 345, 456 ]\n        const actual = new InputField(...params)\n        expect(actual.key).toEqual(123)\n      })\n\n      it('should expose 2nd param as `name` field', () => {\n        const params = [ 123, 234, 345, 456 ]\n        const actual = new InputField(...params)\n        expect(actual.name).toEqual(234)\n      })\n\n      it('should expose 3rd param as `type` field', () => {\n        const params = [ 123, 234, 345, 456 ]\n        const actual = new InputField(...params)\n        expect(actual.type).toEqual(345)\n      })\n\n      it('should expose 4th param as `options` field', () => {\n        const params = [ 123, 234, 345, 456 ]\n        const actual = new InputField(...params)\n        expect(actual.options).toEqual(456)\n      })\n    })\n  })\n\n  describe('{ NetworkHTTPRequest }', () => {\n    /* eslint-disable max-statements */\n    describe('~constructor', () => {\n      it('should expose `requestUrl` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.requestUrl).toEqual(null)\n      })\n\n      it('should expose `requestMethod` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.requestMethod).toEqual(null)\n      })\n\n      it('should expose `requestTimeout` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.requestTimeout).toEqual(null)\n      })\n\n      it('should expose `requestBody` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.requestBody).toEqual(null)\n      })\n\n      it('should expose `responseStatusCode` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.responseStatusCode).toEqual(null)\n      })\n\n      it('should expose `responseHeaders` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.responseHeaders).toEqual(null)\n      })\n\n      it('should expose `responseBody` field', () => {\n        const actual = new NetworkHTTPRequest()\n        expect(actual.responseBody).toEqual(null)\n      })\n\n      it('should expose `setRequestHeader` method', () => {\n        const actual = new NetworkHTTPRequest()\n\n        expect(actual.setRequestHeader).toBeA(Function)\n        expect(actual.setRequestHeader()).toNotExist()\n      })\n\n      it('should expose `getRequestHeader` method', () => {\n        const actual = new NetworkHTTPRequest()\n\n        expect(actual.getRequestHeader).toBeA(Function)\n        expect(actual.getRequestHeader()).toNotExist()\n      })\n\n      it('should expose `getResponseHeader` method', () => {\n        const actual = new NetworkHTTPRequest()\n\n        expect(actual.getResponseHeader).toBeA(Function)\n        expect(actual.getResponseHeader()).toNotExist()\n      })\n\n      it('should expose `send` method', () => {\n        const actual = new NetworkHTTPRequest()\n\n        expect(actual.send).toBeA(Function)\n        expect(actual.send()).toNotExist()\n      })\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('{ RecordParameter }', () => {\n    describe('~constructor', () => {\n      it('should set first param as `key` in Mock', () => {\n        const params = [ 123, 234, 345 ]\n        const actual = new RecordParameter(...params)\n\n        expect(actual.key).toEqual(123)\n      })\n\n      it('should set second param as `value` in Mock', () => {\n        const params = [ 123, 234, 345 ]\n        const actual = new RecordParameter(...params)\n\n        expect(actual.value).toEqual(234)\n      })\n\n      it('should set third param as `enabled` in Mock', () => {\n        const params = [ 123, 234, 345 ]\n        const actual = new RecordParameter(...params)\n\n        expect(actual.enabled).toEqual(345)\n      })\n\n      it('should expose `toString` method', () => {\n        const params = [ 123, 234, 345 ]\n        const actual = new RecordParameter(...params)\n\n        expect(actual.toString).toBeA(Function)\n        expect(actual.toString()).toNotExist()\n      })\n    })\n  })\n\n  describe('@registerImporter', () => {\n    it('should do nothing', () => {\n      const nested = { a: 123, b: 234 }\n      const obj = { c: nested, d: nested }\n\n      const expected = obj\n      const actual = registerImporter(obj)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@registerCodeGenerator', () => {\n    it('should do nothing', () => {\n      const nested = { a: 123, b: 234 }\n      const obj = { c: nested, d: nested }\n\n      const expected = obj\n      const actual = registerCodeGenerator(obj)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n/* eslint-enable require-jsdoc */\n/* eslint-enable max-nested-callbacks */\n"
  },
  {
    "path": "src/mocks/__tests__/PawShims.spec.js",
    "content": "import expect from 'expect'\n\ndescribe('mocks/PawShims.js', () => {\n  it('should use mocks if paw objects are not globally defined', () => {\n    const $module = require('../PawShims.js')\n\n    expect($module.registerImporter).toExist()\n    expect($module.registerCodeGenerator).toExist()\n    expect($module.DynamicValue).toExist()\n    expect($module.DynamicString).toExist()\n    expect($module.InputField).toExist()\n    expect($module.NetworkHTTPRequest).toExist()\n    expect($module.RecordParameter).toExist()\n  })\n})\n"
  },
  {
    "path": "src/models/Api.js",
    "content": "import { Record, OrderedMap } from 'immutable'\n\nimport Model from './ModelInfo'\nimport Info from './Info'\nimport Store from './Store'\n\n/**\n * Metadata about the Api Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'api.core.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Api Record.\n */\nconst ApiSpec = {\n  _model: model,\n  resources: new OrderedMap(),\n  group: null,\n  store: new Store(),\n  info: new Info()\n}\n\n/**\n * The Api Record\n */\nexport const Api = Record(ApiSpec)\nexport default Api\n"
  },
  {
    "path": "src/models/Auth.js",
    "content": "import BasicAuth from './auths/Basic'\nimport DigestAuth from './auths/Digest'\nimport NTLMAuth from './auths/NTLM'\nimport NegotiateAuth from './auths/Negotiate'\nimport ApiKeyAuth from './auths/ApiKey'\nimport OAuth1Auth from './auths/OAuth1'\nimport OAuth2Auth from './auths/OAuth2'\nimport AWSSig4Auth from './auths/AWSSig4'\nimport HawkAuth from './auths/Hawk'\nimport CustomAuth from './auths/Custom'\n\nconst Auth = {\n  Basic: BasicAuth,\n  Digest: DigestAuth,\n  NTLM: NTLMAuth,\n  Negotiate: NegotiateAuth,\n  ApiKey: ApiKeyAuth,\n  OAuth1: OAuth1Auth,\n  OAuth2: OAuth2Auth,\n  AWSSig4: AWSSig4Auth,\n  Hawk: HawkAuth,\n  Custom: CustomAuth\n}\n\nexport default Auth\n"
  },
  {
    "path": "src/models/Constraint.js",
    "content": "import Immutable from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Constraint Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'constraint.constraint.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the BasicAuth Record.\n * - `name` is the name of the Constraint\n * - `value` is the context used by the `expression` field to validate an object\n * - `expression` is used to test whether an object is valid or not\n */\nconst ConstraintSpec = {\n  _model: model,\n  name: null,\n  value: null,\n  expression: () => { return false }\n}\n\n/**\n * The base Constraint class\n */\nexport class Constraint extends Immutable.Record(ConstraintSpec) {\n  /**\n   * @param {any} d: a value to test against the expression of this Constraint\n   * @returns {boolean} true if the value is valid against the expression.\n   */\n  evaluate(d) {\n    return this.get('expression')(d)\n  }\n\n  /**\n   * @returns {Object} the JSON Schema corresponding to this Constraint\n   */\n  toJSONSchema() {\n    const obj = {}\n    const key = this.get('name')\n    const value = this.get('value')\n    obj[key] = value\n    return obj\n  }\n}\n\n/**\n * A MultipleOf Constraint.\n * evaluate returns true if and only if the object to test is a multiple of\n * the value passed to the constructor\n */\nexport class MultipleOfConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'multiple-of.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'multipleOf',\n      value: value,\n      expression: d => {\n        return d % value === 0\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A Maximum Constraint.\n * evaluate returns true if and only if the object to test is smaller than\n * the value passed to the constructor\n */\nexport class MaximumConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'maximum.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'maximum',\n      value: value,\n      expression: d => {\n        return d <= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * An ExclusiveMaximum Constraint.\n * evaluate returns true if and only if the object to test is strictly smaller\n * the value passed to the constructor\n */\nexport class ExclusiveMaximumConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'exclusive-maximum.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'exclusiveMaximum',\n      value: value,\n      expression: d => {\n        return d < value\n      }\n    }\n    super(obj)\n  }\n\n  /**\n   * @returns {Object} the JSON Schema corresponding to this Constraint\n   */\n  toJSONSchema() {\n    const obj = {}\n    const key = this.get('name')\n    const value = this.get('value')\n    obj.maximum = value\n    obj[key] = true\n    return obj\n  }\n}\n\n/**\n * A Minimum Constraint\n * evaluate returns true if and only if the object to test is larger than\n * the value passed to the constructor\n */\nexport class MinimumConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'minimum.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'minimum',\n      value: value,\n      expression: d => {\n        return d >= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * An ExclusiveMinimum Constraint.\n * evaluate returns true if and only if the object to test is strictly larger than\n * the value passed to the constructor\n */\nexport class ExclusiveMinimumConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'exclusive-minimum.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'exclusiveMinimum',\n      value: value,\n      expression: d => {\n        return d > value\n      }\n    }\n    super(obj)\n  }\n\n  /**\n   * @returns {Object} the JSON Schema corresponding to this Constraint\n   */\n  toJSONSchema() {\n    const obj = {}\n    const key = this.get('name')\n    const value = this.get('value')\n    obj.minimum = value\n    obj[key] = true\n    return obj\n  }\n}\n\n/**\n * A MaximumLength Constraint.\n * evaluate returns true if and only if the object to test has a length smaller than\n * the value passed to the constructor\n */\nexport class MaximumLengthConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'maximum-length.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'maxLength',\n      value: value,\n      expression: d => {\n        return d.length <= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A MinimumLength Constraint.\n * evaluate returns true if and only if the object to test has a length larger than\n * the value passed to the constructor\n */\nexport class MinimumLengthConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'minimum-length.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'minLength',\n      value: value,\n      expression: d => {\n        return d.length >= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A Pattern Constraint.\n * evaluate returns true if and only if the object to test matches\n * the pattern passed to the constructor\n */\nexport class PatternConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {string} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'pattern.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'pattern',\n      value: value,\n      expression: d => {\n        return d.match(value) !== null\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A MaximumItems Constraint.\n * evaluate returns true if and only if the object to test has less items than\n * the value passed to the constructor\n */\nexport class MaximumItemsConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'maximum-items.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'maxItems',\n      value: value,\n      expression: d => {\n        if (typeof value === 'undefined' || value === null) {\n          return true\n        }\n        return (d.length || d.size) <= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A MinimumItems Constraint.\n * evaluate returns true if and only if the object to test has more items than\n * the value passed to the constructor\n */\nexport class MinimumItemsConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = 0) {\n    const obj = {\n      _model: new Model({\n        name: 'minimum-items.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'minItems',\n      value: value,\n      expression: d => {\n        return (d.length || d.size) >= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A UniqueItems Constraint.\n * evaluate returns true if and only if the object to test contains only\n * unique values\n */\nexport class UniqueItemsConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {boolean} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = false) {\n    const obj = {\n      _model: new Model({\n        name: 'unique-items.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'uniqueItems',\n      value: value,\n      expression: d => {\n        if (!value) {\n          return true\n        }\n        const valueSet = d.reduce((_obj, item) => {\n          const itemKey = JSON.stringify(item)\n          _obj[itemKey] = true\n          return _obj\n        }, {})\n        return (d.length || d.size) === Object.keys(valueSet).length\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A MaximumProperties Constraint.\n * evaluate returns true if and only if the object to test has less properties than\n * the value passed to the constructor\n */\nexport class MaximumPropertiesConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value) {\n    const obj = {\n      _model: new Model({\n        name: 'maximum-properties.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'maxProperties',\n      value: value,\n      expression: d => {\n        if (typeof value === 'undefined' || value === null) {\n          return true\n        }\n        return Object.keys(d).length <= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A MinimumProperties Constraint.\n * evaluate returns true if and only if the object to test has more properties than\n * the value passed to the constructor\n */\nexport class MinimumPropertiesConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {number} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = 0) {\n    const obj = {\n      _model: new Model({\n        name: 'minimum-properties.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'minProperties',\n      value: value,\n      expression: d => {\n        return Object.keys(d).length >= value\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * An Enum Constraint.\n * evaluate returns true if and only if the object to test is in\n * the list of values passed to the constructor\n */\nexport class EnumConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {Array} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = []) {\n    const obj = {\n      _model: new Model({\n        name: 'enum.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'enum',\n      value: value,\n      expression: d => {\n        return value.indexOf(d) >= 0\n      }\n    }\n    super(obj)\n  }\n}\n\n/**\n * A JSON Schema Constraint.\n * evaluate returns true. (Unimplemented)\n * TODO: implement evaluate\n */\nexport class JSONSchemaConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {Object} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = {}) {\n    const obj = {\n      _model: new Model({\n        name: 'json.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'json',\n      value: value,\n      expression: () => {\n        return true\n      }\n    }\n    super(obj)\n  }\n\n  /**\n   * @returns {Object} the JSON Schema corresponding to this Constraint\n   */\n  toJSONSchema() {\n    return this.get('value')\n  }\n}\n\n/**\n * An XML Schema Constraint.\n * evaluate returns true. (Unimplemented)\n * TODO: implement evaluate\n */\nexport class XMLSchemaConstraint extends Constraint {\n  /**\n   * @constructor\n   * @param {string} value: the value to use as a basis for the Constraint\n   */\n  constructor(value = '') {\n    const obj = {\n      _model: new Model({\n        name: 'xml.constraint.models',\n        version: '0.1.0'\n      }),\n      name: 'xml',\n      value: value,\n      expression: () => {\n        return true\n      }\n    }\n    super(obj)\n  }\n\n  /**\n   * @returns {Object} the JSON Schema corresponding to this Constraint\n   */\n  toJSONSchema() {\n    return {\n      'x-xml': this.get('value')\n    }\n  }\n}\n\nconst _Constraint = {\n  Constraint: Constraint,\n  MultipleOf: MultipleOfConstraint,\n  Maximum: MaximumConstraint,\n  ExclusiveMaximum: ExclusiveMaximumConstraint,\n  Minimum: MinimumConstraint,\n  ExclusiveMinimum: ExclusiveMinimumConstraint,\n  MaximumLength: MaximumLengthConstraint,\n  MinimumLength: MinimumLengthConstraint,\n  Pattern: PatternConstraint,\n  MaximumItems: MaximumItemsConstraint,\n  MinimumItems: MinimumItemsConstraint,\n  UniqueItems: UniqueItemsConstraint,\n  MaximumProperties: MaximumPropertiesConstraint,\n  MinimumProperties: MinimumPropertiesConstraint,\n  Enum: EnumConstraint,\n  JSONSchema: JSONSchemaConstraint,\n  XMLSchema: XMLSchemaConstraint\n}\n\nexport default _Constraint\n"
  },
  {
    "path": "src/models/Contact.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Contact Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'contact.utils.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Contact Record.\n */\nconst ContactSpec = {\n  _model: model,\n  name: null,\n  url: null,\n  email: null\n}\n\n/**\n * The Contact Record\n */\nexport class Contact extends Record(ContactSpec) { }\nexport default Contact\n"
  },
  {
    "path": "src/models/Context.js",
    "content": "import { Record, Map, List } from 'immutable'\n\nimport Model from './ModelInfo'\nimport ParameterContainer from './ParameterContainer'\n\n/**\n * Metadata about the Context Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'context.core.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Context Record.\n */\nconst ContextSpec = {\n  _model: model,\n  constraints: List(),\n  type: null,\n  implements: Map()\n}\n\n/**\n * Holds all the internal methods used in tandem with a Context\n */\nconst methods = {}\n\n/**\n * The Context Record\n */\nexport class Context extends Record(ContextSpec) {\n  /**\n   * @param {ParameterContainer} paramContainer: the parameter container to filter\n   * @returns {ParameterContainer} the filtered parameter container\n   */\n  filter(paramContainer) {\n    return methods.filter(this, paramContainer)\n  }\n}\n\n/**\n * filters a ParameterContainer based on the constraints in a Context\n * @param {Context} context: the context to get the constraints from\n * @param {ParameterContainer} paramContainer: the ParameterContainer to filter\n * @returns {ParameterContainer} the filtered ParameterContainer\n */\nmethods.filter = (context, paramContainer) => {\n  if (paramContainer instanceof ParameterContainer) {\n    return paramContainer.filter(context.get('constraints'))\n  }\n\n  return null\n}\n\nexport const __internals__ = methods\nexport default Context\n"
  },
  {
    "path": "src/models/Core.js",
    "content": "import Api from './Api'\nimport Res from './Response'\nimport Ctx from './Context'\nimport Param from './Parameter'\nimport ParamContainer from './ParameterContainer'\n\nexport const Parameter = Param\nexport const ParameterContainer = ParamContainer\nexport const Body = Ctx\nexport const Response = Res\nexport const Context = Api\n"
  },
  {
    "path": "src/models/Group.js",
    "content": "import { OrderedMap, List, Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Group Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'group.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Group Record.\n */\nconst GroupSpec = {\n  _model: model,\n  id: null,\n  name: null,\n  description: null,\n  children: OrderedMap()\n}\n\n/**\n * Holds all the internal methods used in tandem with a Group\n */\nconst methods = {}\n\n/**\n * The Group Record\n */\nexport class Group extends Record(GroupSpec) {\n  /**\n   * Returns the list of all request Ids in the group and its sub groups\n   * @returns {List<(string | number)>} a List with all the request Ids from the group\n   * and its sub groups\n   */\n  getRequestIds() {\n    return methods.getRequestIds(this)\n  }\n\n  /**\n   * Returns the list of all Requests in the group and its sub groups, if they are\n   * present in a Request Map\n   * WARNING: numerical ids are cast to strings\n   * @param {?Map<Request>} requestMap: the Map from which to get the requests by\n   * their ids\n   * @returns {List<Request>} a List with all the existing Request from the group\n   * and its sub groups\n   */\n  getRequests(requestMap) {\n    return methods.getRequests(this, requestMap)\n  }\n}\n\n/**\n * Checks if an object is an Id or not\n * @param {string | number | Group} idOrGroup: the object to test\n * @returns {boolean} whether the object is an Id or not\n */\nmethods.isId = (idOrGroup) => {\n  return typeof idOrGroup === 'string' || typeof idOrGroup === 'number'\n}\n\n/**\n * Checks if an object is a Group or not\n * @param {string | number | Group} idOrGroup: the object to test\n * @returns {boolean} whether the object is a Group or not\n */\nmethods.isGroup = (idOrGroup) => {\n  return idOrGroup instanceof Group\n}\n\n/**\n * a reducer to flatten a List of List into a List\n * @param {List<A>} flatList: the flattened List\n * @param {List<A>} list: the List to add to the flat list\n * @returns {List<A>} the updated flat List\n */\nmethods.flattenReducer = (flatList, list) => flatList.concat(list)\n\n/**\n * Returns the list of all request Ids in the group and its sub groups\n * @param {Group} group: the group to extract the request Ids from\n * @returns {List<(string | number)>} a List with all the request Ids from the group\n * and its sub groups\n */\nmethods.getRequestIds = (group) => {\n  if (!group || typeof group.get !== 'function' || !group.get('children')) {\n    return List()\n  }\n\n  const children = group.get('children').valueSeq()\n  const requestsIds = children.filter(methods.isId)\n  const groups = children.filter(methods.isGroup)\n\n  const nestedRequestIds = groups.map(methods.getRequestIds)\n\n  return nestedRequestIds\n    .reduce(methods.flattenReducer, List())\n    .concat(requestsIds)\n}\n\n/**\n * Checks if an object is a Request or not\n * @param {any} request: the object to test\n * @returns {boolean} whether the object is a Request or not\n */\nmethods.isRequest = (request) => !!request\n\n/**\n * Returns the list of all Requests in the group and its sub groups, if they are\n * present in a Request Map\n * WARNING: numerical ids are cast to strings\n * @param {Group} group: the group to extract the request Ids from\n * @param {?Map<Request>} requestMap: the Map from which to get the requests by\n * their ids\n * @returns {List<Request>} a List with all the existing Request from the group\n * and its sub groups\n */\nmethods.getRequests = (group, requestMap) => {\n  if (!requestMap || typeof requestMap.get !== 'function') {\n    return List()\n  }\n\n  const ids = methods.getRequestIds(group)\n\n  return ids.map(id => {\n    return requestMap.get(id + '')\n  }).filter(methods.isRequest)\n}\n\nexport const __internals__ = methods\nexport default Group\n"
  },
  {
    "path": "src/models/Info.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Info Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'info.utils.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Info Record.\n */\nconst InfoSpec = {\n  _model: model,\n  title: null,\n  description: null,\n  tos: null,\n  contact: null,\n  license: null,\n  version: null\n}\n\n/**\n * The Info Record\n */\nexport class Info extends Record(InfoSpec) { }\nexport default Info\n"
  },
  {
    "path": "src/models/Interface.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Interface Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'interface.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Interface Record.\n */\nconst InterfaceSpec = {\n  _model: model,\n  name: null,\n  uuid: null,\n  level: null,\n  required: false,\n  description: null,\n  underlay: null\n}\n\nexport const Interface = Record(InterfaceSpec)\n\nexport default Interface\n"
  },
  {
    "path": "src/models/Item.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\nconst ItemSpec = {\n  _model: new Model({\n    name: 'item.models',\n    version: '0.1.0'\n  }),\n  uri: null,\n  name: null,\n  mediaType: null,\n  content: null\n}\n\n/**\n * The Item Record\n */\nexport class Item extends Record(ItemSpec) { }\n"
  },
  {
    "path": "src/models/License.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the License Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'license.utils.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the License Record.\n */\nconst LicenseSpec = {\n  _model: model,\n  name: null,\n  url: null\n}\n\n/**\n * The License Record\n */\nexport class License extends Record(LicenseSpec) { }\nexport default License\n"
  },
  {
    "path": "src/models/ModelInfo.js",
    "content": "import { Record } from 'immutable'\n\n/**\n * Default Spec for the Model Record.\n */\nconst ModelSpec = {\n  name: '',\n  version: ''\n}\n\nexport const Model = Record(ModelSpec)\n\nexport default Model\n"
  },
  {
    "path": "src/models/Parameter.js",
    "content": "import { List, Map, Record } from 'immutable'\n// import jsf from 'json-schema-faker'\n\nimport Model from './ModelInfo'\nimport Reference from './Reference'\n\n/**\n * Metadata about the Parameter Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'parameter.core.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Parameter Record.\n * @property {string} in: the location of the parameter (header, query, body, ...). Mainly used for\n * shared parameters, as the ParameterStore is location agnostic\n * @property {string} usedIn: the type of object that holds the parameter (can be either request or\n * response)\n * @property {string} uuid:  a string that uniquely identifies this parameter (not a true uuid)\n * @property {string} key: the key of the Parameter as used in the header, query, body, etc.\n * @property {string} name?: a humand readable name for the Parameter like `Access token`\n * @property {string} description: a description of the purpose of the parameter\n * @property {List<*>} examples: a List of values that are valid representations of the parameter\n * @property {string} type: the JSON type of the Parameter\n * @property {string} format: the format of the Parameter (highly coupled with type)\n * @property {any} default: the default value of the Parameter\n * @property {boolean} required: whether the Parameter is mandatory or not.\n * @property {string} superType: some Parameters have complex representations, like sequences of\n * string Parameters that combine together create what would be a DynamicString in Paw or a string\n * with environment variables in Postman. the superType helps further define what the behavior of\n * the parameter is, without supercharging other fields (like format or type) with semantics that\n * are only relevant inside the model\n * @property {any} value: an object that is relevant to the construction of the Parameter, depending\n * on the superType. For instance, it could be a List<Parameter>, if the superType is \"sequence\".\n * @property {List<Constraint>} constraints: a List of Constraint that the Parameter must respect.\n * it is used to generate a JSON Schema out of the Parameter, and also to test if a value is valid\n * with respect to the Parameter. For instance, 'application/json' is not a valid Value for a\n * Parameter with the constraints: List([ new Contraint.Enum([ 'application/xml' ]) ])\n * @property {List<Parameter>} applicableContexts: a List of Parameters that help define whether\n * the Parameter can used in a given Context. @see methods.@isValid for more information\n * @property {Map<*, Reference)>} interfaces: a List of Interfaces implemented by the Parameter.\n * This is used to extract shared features at difference levels (like Resource, Request, Response,\n * URL, and Parameter).\n */\nconst ParameterSpec = {\n  _model: model,\n  in: null,\n  usedIn: 'request',\n  uuid: null,\n  key: null,\n  name: null,\n  description: null,\n  examples: List(),\n  type: null,\n  format: null,\n  default: null,\n  required: false,\n  superType: null,\n  value: null,\n  constraints: List(),\n  applicableContexts: List(),\n  interfaces: Map()\n}\n\n/**\n * Holds all the internal methods used in tandem with a Parameter\n */\nconst methods = {}\n\n/**\n * The Parameter Record\n */\nexport class Parameter extends Record(ParameterSpec) {\n  /**\n   * transforms a Parameter into a JSON Schema\n   * @param {boolean} useFaker: whether to use Faker or not\n   * @param {boolean} replaceRefs: whether to replace refs with simple strings or to replace them\n   * with $refs\n   * @returns {schema} the corresponding schema\n   */\n  getJSONSchema(useFaker = false, replaceRefs = false) {\n    return methods.getJSONSchema(this, useFaker, replaceRefs)\n  }\n\n  /**\n   * generates a value from a Parameter or a JSON Schema.\n   * @param {boolean} useDefault: whether to use the default value or not\n   * @param {schema} _constraintSet: an optional schema to generate from. If this schema is\n   * provided, the calling Parameter is ignored.\n   * @returns {any} the generated value\n   */\n  generate(useDefault, _constraintSet) {\n    return methods.generate(this, useDefault, _constraintSet)\n  }\n\n  /**\n   * validates a value against the constraints of a Parameter\n   * @param {any} value: the value to test\n   * @returns {boolean} whether the value respects all the constraints of the Parameter or not\n   */\n  validate(value) {\n    return methods.validate(this, value)\n  }\n\n  /**\n   * tests whether there is an applicableContext in which the param is validated\n   * @param {Parameter} param: the param to validate\n   * @returns {boolean} whether the param respects all the constraints of one of the\n   * applicableContexts or not\n   */\n  isValid(param) {\n    return methods.isValid(this, param)\n  }\n}\n\n/**\n * merges a constraint schema with a schema\n * @param {schema} set: the schema to update\n * @param {schema} constraint: the constraint schema to merge\n * @returns {schema} the updated schema\n */\nmethods.mergeConstraintInSchema = (set, constraint) => {\n  const obj = constraint.toJSONSchema()\n  Object.assign(set, obj)\n  return set\n}\n\n/**\n * adds constraints from a Parameter to a schema\n * @param {Parameter} param: the parameter to get the constraints from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.addConstraintsToSchema = (param, schema) => {\n  const constraints = param.get('constraints')\n  const _schema = constraints.reduce(methods.mergeConstraintInSchema, schema)\n  return _schema\n}\n\n/**\n * normalizes the type from a Parameter\n * @param {string | any} type: the type to normalize\n * @returns {string} the infered type\n */\nmethods.inferType = (type) => {\n  if (!type) {\n    return null\n  }\n\n  if (typeof type !== 'string') {\n    return 'string'\n  }\n\n  if (type.match(/double/i) || type.match(/float/i)) {\n    return 'number'\n  }\n\n  if (type.match(/date/i)) {\n    return 'string'\n  }\n\n  return type\n}\n\n/**\n * adds type from a Parameter to a schema\n * @param {Parameter} param: the parameter to get the type from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.addTypeFromParameterToSchema = (param, schema) => {\n  const types = [\n    'integer', 'number', 'array', 'string', 'object', 'boolean', 'null'\n  ]\n\n  let type = param.get('type') || ''\n\n  if (types.indexOf(type) === -1) {\n    type = methods.inferType(type)\n\n    if (!type) {\n      return schema\n    }\n  }\n\n  schema.type = type\n  return schema\n}\n\n/**\n * adds title from a Parameter to a schema\n * @param {Parameter} param: the parameter to get the title from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.addTitleFromParameterToSchema = (param, schema) => {\n  const key = param.get('key')\n  if (key) {\n    schema['x-title'] = key\n  }\n\n  return schema\n}\n\n/**\n * adds the default value from a Parameter to a schema\n * @param {Parameter} param: the parameter to get the default value from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.addDefaultFromParameterToSchema = (param, schema) => {\n  const _default = param.get('default')\n  if (_default !== null && typeof _default !== 'undefined') {\n    schema.default = param.get('default')\n  }\n\n  return schema\n}\n\n/**\n * transforms a simple Parameter into a schema\n * @param {Parameter} simple: the parameter to transform\n * @returns {schema} the corresponding schema\n */\nmethods.getJSONSchemaFromSimpleParameter = (simple) => {\n  let schema = {}\n  schema = methods.addConstraintsToSchema(simple, schema)\n  schema = methods.addTypeFromParameterToSchema(simple, schema)\n  schema = methods.addTitleFromParameterToSchema(simple, schema)\n  schema = methods.addDefaultFromParameterToSchema(simple, schema)\n\n  return schema\n}\n\n/**\n * extracts the sequence from a SequenceParameter into a schema\n * @param {Parameter} sequenceParam: the parameter to get the sequence from\n * @param {schema} schema: the schema to update\n * @param {boolean} useFaker: whether we should use Faker or not\n * @returns {schema} the updated schema\n */\nmethods.addSequenceToSchema = (sequenceParam, schema, useFaker = true) => {\n  const sequence = sequenceParam.get('value')\n  if (!sequence) {\n    return schema\n  }\n\n  schema['x-sequence'] = sequence.map((\n        param\n    ) => {\n    return methods.getJSONSchema(param, useFaker)\n  }).toJS()\n\n  schema.format = 'sequence'\n\n  return schema\n}\n\n/**\n * transforms a SequenceParameter into a schema\n * @param {Parameter} sequenceParam: the parameter to transform\n * @param {boolean} useFaker: whether we should use Faker or not\n * @returns {schema} the corresponding schema\n */\nmethods.getJSONSchemaFromSequenceParameter = (sequenceParam, useFaker = true) => {\n  let schema = {}\n  schema = methods.addConstraintsToSchema(sequenceParam, schema)\n  schema = methods.addTypeFromParameterToSchema(sequenceParam, schema)\n  schema = methods.addTitleFromParameterToSchema(sequenceParam, schema)\n  schema = methods.addSequenceToSchema(sequenceParam, schema, useFaker)\n  return schema\n}\n\n/**\n * extracts the items field from an ArrayParameter into a schema\n * @param {Parameter} param: the parameter to transform\n * @param {schema} schema: the schema to update\n * @param {boolean} useFaker: whether we should use Faker or not\n * @returns {schema} the updated schema\n */\nmethods.addItemstoSchema = (param, schema, useFaker = true) => {\n  const items = param.get('value')\n  if (items instanceof Parameter) {\n    schema.items = methods.getJSONSchema(items, useFaker)\n  }\n\n  return schema\n}\n\n/**\n * transforms an ArrayParameter into a schema\n * @param {Parameter} arrayParam: the parameter to transform\n * @param {boolean} useFaker: whether we should use Faker or not\n * @returns {schema} the corresponding schema\n */\nmethods.getJSONSchemaFromArrayParameter = (arrayParam, useFaker = true) => {\n  let schema = {}\n  schema = methods.addConstraintsToSchema(arrayParam, schema)\n  schema = methods.addTypeFromParameterToSchema(arrayParam, schema)\n  schema = methods.addTitleFromParameterToSchema(arrayParam, schema)\n  schema = methods.addItemstoSchema(arrayParam, schema, useFaker)\n\n  return schema\n}\n\n/**\n * applies the reference field from a ReferenceParameter to a schema\n * @param {Parameter} param: the parameter to get the reference from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.addReferenceToSchema = (param, schema) => {\n  const ref = param.get('value')\n\n  if (!(ref instanceof Reference)) {\n    return schema\n  }\n\n  schema.$ref = ref.get('uuid')\n  return schema\n}\n\n/**\n * transforms a ReferenceParameter into a schema\n * @param {Parameter} refParam: the parameter to transform\n * @returns {schema} the corresponding schema\n */\nmethods.getJSONSchemaFromReferenceParameter = (refParam) => {\n  let schema = {}\n\n  schema = methods.addConstraintsToSchema(refParam, schema)\n  schema = methods.addTitleFromParameterToSchema(refParam, schema)\n  schema = methods.addReferenceToSchema(refParam, schema)\n\n  return schema\n}\n\n/**\n * adds Faker fields if applicable based on format of Parameter\n * @param {Parameter} param: the parameter to get the reference from\n * @param {schema} schema: the schema to update\n * @returns {schema} the updated schema\n */\nmethods.updateSchemaWithFaker = (param, schema) => {\n  const fakerFormatMap = {\n    email: {\n      faker: 'internet.email'\n    },\n      // base64 endoded\n    byte: {\n      pattern: '^(?:[A-Za-z0-9+/]{4})*' +\n                   '(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$'\n    },\n      // not really binary but who cares\n    binary: {\n      pattern: '^.*$'\n    },\n    'date-time': {\n      faker: 'date.recent'\n    },\n    password: {\n      pattern: '^.*$'\n    },\n    sequence: {\n      format: 'sequence'\n    }\n  }\n\n  const format = param.get('format') || ''\n\n  if (fakerFormatMap[format]) {\n    const constraint = fakerFormatMap[format]\n    const key = Object.keys(constraint)[0]\n    if (key && !schema[key]) {\n      Object.assign(schema, constraint)\n    }\n  }\n\n  return schema\n}\n\n/**\n * unescapes a URI fragment\n * @param {string} uriFragment: the uri fragment to unescape\n * @returns {string} the updated schema\n */\nmethods.unescapeURIFragment = (uriFragment) => {\n  return uriFragment.replace(/~1/g, '/').replace(/~0/g, '~')\n}\n\nmethods.replaceRefsInArray = (obj) => {\n  for (let i = 0; i < obj.length; i += 1) {\n    const content = obj[i]\n    obj[i] = methods.replaceRefs(content)\n  }\n  return obj\n}\n\nmethods.replaceRefsInObject = (obj) => {\n  for (const key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      obj[key] = methods.replaceRefs(obj[key])\n    }\n  }\n\n  return obj\n}\n\n/**\n * @deprecated (use at your own risk)\n * replaces References in a pseudo-schema with default values to make it a simple schema\n * @param {object} obj: the pseudo-schema to transform in a schema\n * @returns {schema} the corresponding schema\n */\nmethods.replaceRefs = (obj) => {\n  if (typeof obj !== 'object' || obj === null) {\n    return obj\n  }\n\n  if (obj.$ref) {\n    obj.default = methods\n          .unescapeURIFragment(obj.$ref.split('/').slice(-1)[0])\n    obj.type = 'string'\n    delete obj.$ref\n  }\n\n  if (Array.isArray(obj)) {\n    return methods.replaceRefsInArray(obj)\n  }\n\n  return methods.replaceRefsInObject(obj)\n}\n\nmethods.simplifyRefsInArray = (obj) => {\n  for (let i = 0; i < obj.length; i += 1) {\n    const content = obj[i]\n    obj[i] = methods.simplifyRefs(content)\n  }\n\n  return obj\n}\n\nmethods.simplifyRefsInObject = (obj) => {\n  for (const key in obj) {\n    if (obj.hasOwnProperty(key)) {\n      obj[key] = methods.simplifyRefs(obj[key])\n    }\n  }\n\n  return obj\n}\n\n/**\n * replaces References in a pseudo-schema with $refs to make it a valid schema\n * @param {object} obj: the pseudo-schema to transform in a schema\n * @returns {schema} the corresponding schema\n */\nmethods.simplifyRefs = (obj) => {\n  if (typeof obj !== 'object' || obj === null) {\n    return obj\n  }\n\n  if (obj.$ref instanceof Reference) {\n    obj.$ref = obj.$ref.get('uuid')\n  }\n\n  if (Array.isArray(obj)) {\n    return methods.simplifyRefsInArray(obj)\n  }\n\n  return methods.simplifyRefsInObject(obj)\n}\n\n/**\n * tests wether a Parameter is simple (standard type, no weird things)\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} the corresponding schema\n */\nmethods.isSimpleParameter = (\n  param\n) => {\n  if (param.get('superType')) {\n    return false\n  }\n\n  // if no type is provided assume simple\n  const type = param.get('type') || null\n\n  const types = [\n    'integer', 'number', 'string', 'object', 'boolean', 'null'\n  ]\n\n  if (type && types.indexOf(type) === -1) {\n    return false\n  }\n\n  return true\n}\n\n/**\n * tests wether a Parameter is a SequenceParameter\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} the corresponding schema\n */\nmethods.isSequenceParameter = (\n  param\n) => {\n  const superType = param.get('superType') || ''\n\n  return superType === 'sequence'\n}\n\n/**\n * tests wether a Parameter is an ArrayParameter\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} the corresponding schema\n */\nmethods.isArrayParameter = (\n  param\n) => {\n  const type = param.get('type') || ''\n\n  return type === 'array'\n}\n\n/**\n * tests wether a Parameter is a ReferenceParameter\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} the corresponding schema\n */\nmethods.isReferenceParameter = (\n  param\n) => {\n  const superType = param.get('superType') || ''\n\n  return superType === 'reference'\n}\n\nmethods.getRawJSONSchema = (parameter, useFaker) => {\n  if (methods.isSimpleParameter(parameter)) {\n    return methods.getJSONSchemaFromSimpleParameter(parameter)\n  }\n\n  if (methods.isSequenceParameter(parameter)) {\n    return methods.getJSONSchemaFromSequenceParameter(parameter, useFaker)\n  }\n\n  if (methods.isArrayParameter(parameter)) {\n    return methods.getJSONSchemaFromArrayParameter(parameter, useFaker)\n  }\n\n  if (methods.isReferenceParameter(parameter)) {\n    return methods.getJSONSchemaFromReferenceParameter(parameter)\n  }\n\n  return {}\n}\n\n/**\n * transforms a Parameter into a JSON Schema\n * @param {Parameter} parameter: the parameter to transform\n * @param {boolean} useFaker: whether to use Faker or not\n * @param {boolean} replaceRefs: whether to replace refs with simple strings or to replace them with\n * $refs\n * @returns {schema} the corresponding schema\n */\nmethods.getJSONSchema = (\n    parameter,\n    useFaker = false,\n    replaceRefs = false\n) => {\n  let schema = methods.getRawJSONSchema(parameter, useFaker)\n\n  if (useFaker) {\n    schema = methods.updateSchemaWithFaker(parameter, schema)\n  }\n\n  if (replaceRefs) {\n    schema = methods.replaceRefs(schema)\n  }\n  else {\n    schema = methods.simplifyRefs(schema)\n  }\n\n  return schema\n}\n\n/**\n * Gets the default value of a Parameter, if applicable\n * @param {Parameter} parameter: the parameter to get the default value of\n * @returns {any} the default value\n */\nmethods.generateFromDefault = (parameter) => {\n  const _default = parameter.get('default')\n  if (_default !== null && typeof _default !== 'undefined') {\n    return _default\n  }\n\n  return null\n}\n\nmethods.generateFromSequenceDefaults = (parameter) => {\n  const sequence = parameter.get('value')\n  if (!sequence) {\n    return null\n  }\n\n  const defaults = sequence.map(param => {\n    return methods.generate(param) || ''\n  }).toJS()\n\n  return defaults.join('')\n}\n\n/**\n * generates a value from a Parameter or a JSON Schema.\n * @param {Parameter} parameter: the Parameter to get a JSON Schema from\n * @param {boolean} useDefault: whether to use the default value or not\n * @param {schema} _schema: an optional schema to generate from. If this schema is provided, the\n * Parameter is ignored.\n * @returns {any} the generated value\n */\nmethods.generate = (\n    parameter\n) => {\n  if (parameter.get('superType') === 'sequence') {\n    return methods.generateFromSequenceDefaults(parameter)\n  }\n\n  return methods.generateFromDefault(parameter)\n}\n\n/**\n * validates a value against the constraints of a Parameter\n * @param {Parameter} parameter: the Parameter to test the value against\n * @param {any} value: the value to test\n * @returns {boolean} whether the value respects all the constraints of the Parameter or not\n */\nmethods.validate = (\n    parameter,\n    value\n) => {\n  const constraints = parameter.get('constraints')\n  return constraints.reduce((\n        bool,\n        cond\n    ) => {\n    return bool && cond.evaluate(value)\n  }, true)\n}\n\n/**\n * tests whether there is an applicableContext in which the param is validated\n * @param {Parameter} source: the Parameter to get the applicableContexts from\n * @param {Parameter} param: the param to validate\n * @returns {boolean} whether the param respects all the constraints of one of the\n * applicableContexts or not\n */\nmethods.isValid = (\n    source,\n    param\n) => {\n  const list = source.get('applicableContexts')\n    // No external constraint\n  if (list.size === 0) {\n    return true\n  }\n\n  return list.reduce((\n        bool,\n        _param\n    ) => {\n    // && has precedence on ||\n    // === (1 || (2a && 2b))\n    return bool || (\n      _param.get('key') === param.get('key') &&\n      _param.validate(param.get('default'))\n    )\n  }, false)\n}\n\nexport const __internals__ = methods\nexport default Parameter\n"
  },
  {
    "path": "src/models/ParameterContainer.js",
    "content": "import { OrderedMap, Record } from 'immutable'\n\nimport { currify } from '../utils/fp-utils'\n\nimport Model from './ModelInfo'\nimport Reference from './Reference'\n\n/**\n * Metadata about the ParameterContainer Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'parameter-container.core.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the ParameterContainer Record.\n */\nconst ParameterContainerSpec = {\n  _model: model,\n  headers: OrderedMap(),\n  queries: OrderedMap(),\n  body: OrderedMap(),\n  path: OrderedMap()\n}\n\n/**\n * Holds all the internal methods used in tandem with a ParameterContainer\n */\nconst methods = {}\n\n/**\n * The ParameterContainer Record\n */\nexport class ParameterContainer extends Record(ParameterContainerSpec) {\n  /**\n   * gets a set of headers from a ParameterContainer\n   * @returns {OrderedMap} the set of headers\n   */\n  getHeadersSet() {\n    return methods.getHeadersSet(this)\n  }\n\n  /**\n   * resolves all the References the ParameterContainer contains to their corresponding object in\n   * a given store\n   * @param {Store} store: the store to use to resolve Reference\n   * @returns {ParameterContainer} a ParameterContainer with as few References as possible\n   */\n  resolve(store) {\n    return methods.resolve(this, store)\n  }\n\n  /**\n   * filters a ParameterContainer based on a set of constraint Parameter from a Context\n   * @param {List<Parameter>} contextContraints: a List of constraint Parameters from a Context\n   * @returns {ParameterContainer} a ParameterContainer that respects all the constraints from a\n   * Context.\n   */\n  filter(contextContraints) {\n    return methods.filter(this, contextContraints)\n  }\n}\n\n/**\n * adds a Parameter to an object based on its key field\n * @param {obj} set: the set to update\n * @param {Parameter} param: the Parameter to add\n * @returns {set} the updated set\n */\nmethods.headerSetReducer = (set, param) => {\n  const key = param.get('key')\n\n  if (key === null || typeof key === 'undefined') {\n    return set\n  }\n\n  set[param.get('key')] = param\n  return set\n}\n\n/**\n * gets a set of headers from a ParameterContainer\n * @param {ParameterContainer} container: the ParameterContainer to get the headers from\n * @returns {OrderedMap} the set of headers\n */\nmethods.getHeadersSet = (container) => {\n  const headers = container.get('headers')\n  const _set = headers.reduce(methods.headerSetReducer, {})\n  return new OrderedMap(_set)\n}\n\n/**\n * filters a block against a Parameter\n * @param {List<Parameter>} block: a list of Parameters belonging to a certain part of a request,\n * like headers, or query params, etc.\n * @param {Parameter} param: the Parameter to test the validation against\n * @returns {List<Parameter>} the filtered block with only valid Parameters against the param\n */\nmethods.filterBlockReducer = (block, param) => {\n  return block.filter((d) => {\n    return d.isValid(param)\n  })\n}\n\n/**\n * filters a block against a list of constraints from a context\n * @param {List<Parameter>} block: a list of Parameters belonging to a certain part of a request,\n * like headers, or query params, etc.\n * @param {List<Parameter>} contextContraints: the list of Parameters to test against\n * @returns {List<Parameter>} the filtered block with only valid Parameters against the\n * contextContraints\n */\nmethods.filterBlock = (block, contextContraints) => {\n  return contextContraints.reduce(methods.filterBlockReducer, block)\n}\n\n/**\n * filters a block against a list of constraints from a context\n * @param {ParameterContainer} container: the ParameterContainer to filter based on the context\n * @param {List<Parameter>} contextContraints: the list of Parameters to test against\n * @returns {ParameterContainer} the filtered ParameterContainer with only valid Parameters\n * against the contextContraints\n */\nmethods.filter = (container, contextContraints) => {\n  if (!contextContraints) {\n    return container\n  }\n\n  const headers = methods.filterBlock(container.get('headers'), contextContraints)\n  const queries = methods.filterBlock(container.get('queries'), contextContraints)\n  const body = methods.filterBlock(container.get('body'), contextContraints)\n  const path = methods.filterBlock(container.get('path'), contextContraints)\n\n  return container.withMutations((_container) => {\n    _container\n      .set('headers', headers)\n      .set('queries', queries)\n      .set('body', body)\n      .set('path', path)\n  })\n}\n\nmethods.resolveReference = (store, paramOrRef) => {\n  if (paramOrRef instanceof Reference) {\n    return store.getIn(paramOrRef.getLocation())\n  }\n\n  return paramOrRef\n}\n\nmethods.removeUnresolvedRefs = (param) => !!param\n\nmethods.resolveBlock = (store, block) => {\n  const transformRefs = currify(methods.resolveReference, store)\n  return block\n    .map(transformRefs)\n    .filter(methods.removeUnresolvedRefs)\n}\n\nmethods.resolve = (container, store) => {\n  const resolveBlock = currify(methods.resolveBlock, store)\n  const headers = resolveBlock(container.get('headers'))\n  const queries = resolveBlock(container.get('queries'))\n  const body = resolveBlock(container.get('body'))\n  const path = resolveBlock(container.get('path'))\n\n  const resolved = container.withMutations((_container) => {\n    _container\n    .set('headers', headers)\n    .set('queries', queries)\n    .set('body', body)\n    .set('path', path)\n  })\n\n  return resolved\n}\n\nexport const __internals__ = methods\nexport default ParameterContainer\n"
  },
  {
    "path": "src/models/Reference.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\nconst methods = {}\n\n/**\n * Metadata about the Reference Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'reference.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Reference Record.\n * @property {string} type: the type of reference. Used to access the correct store. For instance,\n * if type is 'parameter', then the Parameter store will be access in the Store object.\n * @property {string} uuid: the key to access the desired Object in the store. Does not have to be\n * uuid, so long as it is uniquely defined.\n * @overlay {string} overlay: parameters to apply to the linked object. For instance, assuming this\n * Reference links to an OAuth2 Auth Object, we could have an `overlay` such as:\n * const overlay = new Auth.OAuth2({\n *  scopes: someScopebjects\n * })\n * this would override the scopes defined in the linked OAuth2 Record with the scopes\n * defined in the overlay.\n */\nconst ReferenceSpec = {\n  _model: model,\n  type: null,\n  uuid: null,\n  overlay: null\n}\n\n/**\n * The Reference Record\n */\nexport class Reference extends Record(ReferenceSpec) {\n  /**\n   * returns the path of a reference in a store\n   * @returns {List<string>} the path to use with store.getIn()\n   */\n  getLocation() {\n    return methods.getLocation(this)\n  }\n\n  /**\n   * resolves a Reference against a Store. (finds what is located in the store at the location\n   * described by the Reference)\n   * @param {Store} store: the Store to search in\n   * @returns {any} the object found in the Store at the location provided by the Reference. returns\n   * undefined if not found\n   */\n  resolve(store) {\n    return methods.resolve(this, store)\n  }\n}\n\n/**\n * returns the path of a reference in a store\n * @param {Reference} ref: the reference to get the path from\n * @returns {List<string>} the path to use with store.getIn()\n */\nmethods.getLocation = (ref) => {\n  return [ ref.get('type'), ref.get('uuid') ]\n}\n\n/**\n * resolves a Reference against a Store. (finds what is located in the store at the location\n * described by the Reference)\n * @param {Reference} ref: the Reference to use to search the store\n * @param {Store} store: the Store to search in\n * @returns {any} the object found in the Store at the location provided by the Reference. returns\n * undefined if not found\n */\nmethods.resolve = (ref, store) => {\n  const path = methods.getLocation(ref)\n  const resolved = store.getIn(path)\n\n  return resolved\n}\n\nexport const __internals__ = methods\nexport default Reference\n"
  },
  {
    "path": "src/models/Request.js",
    "content": "import { List, Map, Record } from 'immutable'\n\nimport Model from './ModelInfo'\nimport ParameterContainer from './ParameterContainer'\n\n/**\n * Metadata about the Request Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'request.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Request Record.\n */\nconst RequestSpec = {\n  _model: model,\n  id: null,\n  endpoints: Map(),\n  name: null,\n  description: null,\n  method: null,\n  parameters: new ParameterContainer(),\n  contexts: List(),\n  auths: List(),\n  responses: Map(),\n  timeout: null,\n  tags: List(),\n  interfaces: Map()\n}\n\nexport const Request = Record(RequestSpec)\n\nexport default Request\n"
  },
  {
    "path": "src/models/Resource.js",
    "content": "import { OrderedMap, Map, Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Resource Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'resource.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Resource Record.\n */\nconst ResourceSpec = {\n  _model: model,\n  name: null,\n  uuid: null,\n  endpoints: OrderedMap(),\n  path: null,\n  methods: Map(),\n  description: null,\n  interfaces: Map()\n}\n\n/**\n * The Resource Record\n */\nexport const Resource = Record(ResourceSpec)\n\nexport default Resource\n"
  },
  {
    "path": "src/models/Response.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record, Map, List } from 'immutable'\n\nimport Model from './ModelInfo'\nimport ParameterContainer from './ParameterContainer'\n\n/**\n * Metadata about the Response Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'response.core.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Response Record.\n */\nconst ResponseSpec = {\n  _model: model,\n  code: null,\n  description: null,\n  examples: null,\n  parameters: new ParameterContainer(),\n  contexts: List(),\n  interfaces: Map()\n}\n\n/**\n * The Response Record\n */\nexport const Response = Record(ResponseSpec)\n\nexport default Response\n"
  },
  {
    "path": "src/models/Store.js",
    "content": "import { Record, OrderedMap } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Store Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'store.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Store Record.\n */\nconst StoreSpec = {\n  _model: model,\n  variable: new OrderedMap(),\n  constraint: new OrderedMap(),\n  endpoint: new OrderedMap(),\n  parameter: new OrderedMap(),\n  response: new OrderedMap(),\n  auth: new OrderedMap(),\n  interface: new OrderedMap()\n}\n\n/**\n * The Store Record\n */\nexport const Store = Record(StoreSpec)\n\nexport default Store\n"
  },
  {
    "path": "src/models/URL.js",
    "content": "import { parse, format, resolve } from 'url'\nimport { Record, List } from 'immutable'\n\nimport Model from './ModelInfo'\n\nimport URLComponent from './URLComponent'\n/**\n * Metadata about the URL Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'url.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the URL Record.\n * Most fields are direct matches for parse(url), except for protocol, hostname, pathname, and\n * secure.\n * - `protocol` expects a List of protocols applicable to the url\n * - `hostname` and `pathname` are URLComponents, as they are the two core fields of the urlObject.\n * - `secure` is a boolean to tell whether the url supports a secure protocol. This is a helper to\n * make generation more uniform and favor secure protocols over unsecure ones.\n * Other fields may evolve into URLComponents in future versions, when the need for higher\n * descriptivity arises.\n */\nconst URLSpec = {\n  _model: model,\n  uuid: null,\n  protocol: List(),\n  slashes: true,\n  auth: null,\n  host: null,\n  port: null,\n  hostname: null,\n  href: null,\n  path: null,\n  pathname: null,\n  query: null,\n  search: null,\n  hash: null,\n  secure: false,\n  variableDelimiters: List(),\n  description: null\n}\n\n/**\n * Holds all the internal methods used in tandem with a URL\n */\nconst methods = {}\n\n/**\n * The URL Record\n */\nexport class URL extends Record(URLSpec) {\n  /**\n   * @constructor\n   * @param {Object} props: the properties of this URL Record\n   * @param {string|Object} props.url: a representation of the url this Record needs to reflect.\n   * The string representation of the url is preferred.\n   * @param {List<string>} props.variableDelimiters: a List of delimiters for variables present in\n   * the url.\n   * @param {string?} props.description: an optional description of the purpose of this URL.\n   * @param {string?} props.uuid: an optional uuid field\n   * @param {boolean?} props.secure: an optional field to tell whether a URL is secure or not.\n   */\n  constructor(props) {\n    if (!props) {\n      super()\n      return this\n    }\n\n    const { url, uuid, secure, variableDelimiters, description } = props\n    const urlComponents = methods.getURLComponents(url, variableDelimiters)\n\n    super({ ...urlComponents, secure, uuid, variableDelimiters, description })\n    return this\n  }\n\n  /**\n   * generates an href from a URL\n   * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n   * fields)\n   * @param {boolean} useDefault: whether to use the default values or not\n   * @returns {string} the url.href\n   */\n  generate(delimiters = List(), useDefault = true) {\n    return methods.generate(this, delimiters, useDefault)\n  }\n\n  /**\n   * generates a URL from a URL and a url string\n   * @param {string} url: the url to reach\n   * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n   * fields)\n   * @param {boolean} useDefault: whether to use the default values or not\n   * @returns {URL} the resolved URL\n   *\n   * IMPORTANT: the from string must be using the same delimiters format as the one provided with\n   * `delimiters`, otherwise the final result might have inconsistencies.\n   */\n  resolve(url, delimiters = List(), useDefault = true) {\n    return methods.resolve(this, url, delimiters, useDefault)\n  }\n\n  /**\n   * converts a URL Record into a urlObject\n   * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n   * fields)\n   * @param {boolean} useDefault: whether to use the default values or not\n   * @returns {Object} the corresponding urlObject\n   */\n  toURLObject(delimiters, useDefault) {\n    return methods.convertURLComponentsToURLObject(this, delimiters, useDefault)\n  }\n}\n\nmethods.getURLComponents = (url, variableDelimiters) => {\n  if (typeof url === 'string') {\n    const urlObject = parse(url)\n    return methods.convertURLObjectToURLComponents(urlObject, variableDelimiters)\n  }\n\n  if (url && typeof url === 'object' && !(url.host instanceof URLComponent)) {\n    return methods.convertURLObjectToURLComponents(url, variableDelimiters)\n  }\n\n  return url\n}\n\n/**\n * converts all urlObject fields into their corresponding type used in the URL Record\n * @param {Object} _urlObject: the urlObject to convert\n * @param {List<string>} variableDelimiters: the variable delimiters (needed to detect variables in\n * the fields)\n * @returns {Object} an object containing the matching URL Record fields\n */\nmethods.convertURLObjectToURLComponents = (_urlObject, variableDelimiters = List()) => {\n  const urlObject = methods.fixUrlObject(_urlObject)\n\n  const components = {\n    protocol: List([ urlObject.protocol ]),\n    slashes: urlObject.slashes,\n    auth: urlObject.auth,\n    host: urlObject.host,\n    hostname: urlObject.hostname ? new URLComponent({\n      componentName: 'hostname',\n      string: urlObject.hostname,\n      variableDelimiters\n    }) : null,\n    port: urlObject.port ? new URLComponent({\n      componentName: 'port',\n      string: urlObject.port,\n      variableDelimiters\n    }) : null,\n    path: urlObject.path,\n    pathname: urlObject.pathname ? new URLComponent({\n      componentName: 'pathname',\n      string: urlObject.pathname,\n      variableDelimiters\n    }) : null,\n    search: urlObject.search,\n    query: urlObject.query,\n    hash: urlObject.hash,\n    href: urlObject.href,\n    secure: urlObject.secure || false\n  }\n\n  return components\n}\n\nmethods.formatHostFromHostnameAndPort = (hostname, port) => {\n  if (hostname && port) {\n    return hostname + ':' + port\n  }\n\n  if (hostname) {\n    return hostname\n  }\n\n  return null\n}\n\n/**\n * converts a URL Record into a urlObject\n * @param {URL} url: the URL Record to convert\n * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n * fields)\n * @param {boolean} useDefault: whether to use the default values or not\n * @returns {Object} the corresponding urlObject\n */\nmethods.convertURLComponentsToURLObject = (url, delimiters = List(), useDefault = true) => {\n  const protocol = url.get('secure') ?\n    url.get('protocol').filter(proto => proto.match(/[^w]s:?$/)).get(0) :\n    url.getIn([ 'protocol', 0 ])\n\n  const slashes = url.get('slashes')\n  const hostname = url.get('hostname') ?\n    url.get('hostname').generate(delimiters, useDefault) : null\n  const port = url.get('port') ?\n    url.get('port').generate(delimiters, useDefault) : null\n  const host = methods.formatHostFromHostnameAndPort(hostname, port)\n  const pathname = url.get('pathname') ?\n    url.get('pathname').generate(delimiters, useDefault) : null\n\n  const urlObject = {\n    protocol, slashes, hostname, port, host, pathname\n  }\n\n  return urlObject\n}\n\n/**\n * generates an href from a URL\n * @param {URL} url: the URL Record to generate the href from\n * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n * fields)\n * @param {boolean} useDefault: whether to use the default values or not\n * @returns {string} the url.href\n */\nmethods.generate = (url, delimiters = List(), useDefault = true) => {\n  const urlObject = methods.convertURLComponentsToURLObject(url, delimiters, useDefault)\n  return format(urlObject)\n}\n\n/**\n * generates a URL from a URL and a url string\n * @param {URL} from: the URL Record to that serves as a base reference\n * @param {string} to: the url to reach\n * @param {List<string>} delimiters: the variable delimiters (needed to format variables in the\n * fields)\n * @param {boolean} useDefault: whether to use the default values or not\n * @returns {URL} the resolved URL\n *\n * IMPORTANT: the from string must be using the same delimiters format as the one provided with\n * `delimiters`, otherwise the final result might have inconsistencies.\n */\nmethods.resolve = (from, to, delimiters, useDefault = true) => {\n  const fromString = methods.generate(from, delimiters, useDefault)\n  let resolved = resolve(fromString, to)\n\n  // massive hack\n  // FIXME\n  resolved = resolved.replace('///', '//')\n\n  return new URL({\n    url: resolved,\n    variableDelimiters: delimiters\n  })\n}\n\n/**\n * urldecodes every field of a UrlObject\n * @param {UrlObject} urlObject: the urlObject to decode\n * @returns {UrlObject} the decoded urlObject\n */\nmethods.decodeUrlObject = (urlObject) => {\n  const keys = Object.keys(urlObject)\n\n  for (const key of keys) {\n    if (typeof urlObject[key] === 'string') {\n      urlObject[key] = decodeURIComponent(urlObject[key])\n    }\n  }\n\n  return urlObject\n}\n\n/**\n * separates the host string into hostname and port\n * @param {string} host: the host string\n * @returns {Object} the hostname and port if they exist\n */\nmethods.splitHostInHostnameAndPort = (host) => {\n  if (!host) {\n    return { hostname: null, port: null }\n  }\n\n  const [ hostname, port ] = host.split(':')\n  return { hostname: hostname || null, port: port || null }\n}\n\n/**\n * extracts the host from a pathname. Used when URL.parse failed to parse\n * the URL correctly (often due to the presence of brackets in the hostname)\n * @param {string} _pathname: the pathname to decompose\n * @returns {Object} the host and pathname, if they exist\n */\nmethods.splitPathnameInHostAndPathname = (_pathname) => {\n  if (!_pathname) {\n    return { host: null, pathname: null }\n  }\n\n  const m = _pathname.match(/([^/]*)(\\/.*)/)\n\n  if (m) {\n    const host = m[1] || null\n    const pathname = m[2]\n    return { host, pathname }\n  }\n\n  return { host: _pathname, pathname: null }\n}\n\n/**\n * creates a path from a pathname and a search field\n * @param {string} pathname: the pathname field of a UrlObject\n * @param {string} search: the search field of a UrlObject\n * @returns {string} the url.path\n */\nmethods.createPathFromPathNameAndSearch = (pathname, search) => {\n  return (pathname || '') + (search || '') || null\n}\n\n/**\n * generates an href from a base URL, a host and a path. This is used to update\n * the href field of a UrlObject, when the URL.parse failed.\n * @param {URL} base: the base URL Record to generate the href from\n * @param {?string} host: the host to use in place of the base URL's host\n * @param {?string} pathname: the pathname to use in place of the base URL's pathname\n * @returns {string} the url.href\n */\nmethods.createHrefFromBaseAndHostAndPathName = (base, host, pathname) => {\n  return format({\n    protocol: base.protocol || null,\n    slashes: base.slashes,\n    auth: base.auth || null,\n    host: host || null,\n    pathname: pathname || '/',\n    search: base.search || null,\n    hash: base.hash || null\n  })\n}\n\n/**\n * tries to fix a UrlObject that has no host by searching the pathname for a host\n * and updating the related fields\n * @param {UrlObject} urlObject: the UrlObject to fix\n * @returns {UrlObject} the fixed urlObject\n */\nmethods.fixUrlObject = (urlObject) => {\n  const decoded = methods.decodeUrlObject(urlObject)\n  if (decoded.host || !decoded.pathname) {\n    return decoded\n  }\n\n  const { host, pathname } = methods.splitPathnameInHostAndPathname(decoded.pathname)\n  const { hostname, port } = methods.splitHostInHostnameAndPort(host)\n  const path = methods.createPathFromPathNameAndSearch(pathname, decoded.search)\n  const href = methods.createHrefFromBaseAndHostAndPathName(decoded, host, pathname)\n\n  return { ...urlObject, host, pathname, hostname, port, path, href }\n}\n\nexport const __internals__ = methods\nexport default URL\n"
  },
  {
    "path": "src/models/URLComponent.js",
    "content": "import { Record, List } from 'immutable'\n\nimport Model from './ModelInfo'\n\nimport {\n    Parameter\n} from './Parameter'\n\nimport { flatten } from '../utils/fp-utils'\n\n/**\n * Metadata about the URLComponent Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'url-component.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the URLComponent Record.\n */\nconst URLComponentSpec = {\n  _model: model,\n  componentName: null,\n  string: null,\n  parameter: null,\n  variableDelimiters: List()\n}\n\n/**\n * Holds all the internal methods used in tandem with a URLComponent\n */\nconst methods = {}\n\n/**\n * The URLComponent Record\n */\nexport class URLComponent extends Record(URLComponentSpec) {\n  /**\n   * @constructor\n   * @param {Object} component: the url component to represent as a URLComponent Record.\n   */\n  constructor(component) {\n    if (component && component.string && !component.parameter) {\n      component.parameter = methods.convertStringToParameter(\n        component.componentName,\n        component.string,\n        component.variableDelimiters\n      )\n    }\n\n    super(component)\n    return this\n  }\n\n  /**\n   * adds a constraint to the parameter of a URLComponent\n   * @param {Constraint} constraint: the constraint to add\n   * @returns {URLComponent} the updated URLComponent\n   */\n  addConstraint(constraint) {\n    return methods.addConstraintToURLComponent(this, constraint)\n  }\n\n  /**\n   * generates a string representing a URLComponent, with variables wrapped based on the\n   * variableDelimiters.\n   * @param {List<string>} variableDelimiters: the variable delimiters. like List([ '{{', '}}' ])\n   * @param {boolean} useDefault: whether to use the default value or to generate from the JSON\n   * schema\n   * @returns {Parameter} the updated Parameter\n   */\n  generate(variableDelimiters = List(), useDefault = true) {\n    return methods.generateURLComponent(this, variableDelimiters, useDefault)\n  }\n}\n\n/**\n * creates a simple Parameter from a key, value pair\n * @param {string} key: the key of the pair\n * @param {string} value: the value of the pair\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.convertSimpleStringToParameter = (key = null, value) => {\n  return new Parameter({\n    key,\n    name: key,\n    type: 'string',\n    default: value\n  })\n}\n\n/**\n * a Map function to convert a string in a Parameter based on its index in the array.\n * A Parameter without a key is simply a string waiting to be generated, while a Parameter with a\n * key is a `variable` that could be referred to. We assume that the array is an alternating list of\n * var/non-var elements, starting with a non-var string\n * @param {string} section: the string to convert to a Parameter\n * @param {string} index: the index in the array of the string\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.sectionMapper = (section, index) => {\n  const key = index % 2 ? section : null\n  return methods.convertSimpleStringToParameter(key, section)\n}\n\n/**\n * transforms a string into a List<string> based on the variable delimiters\n * @param {string} string: the string to split\n * @param {List<string>} delimiters: the variable delimiters used to separate variables from\n * non-variables. like List([ '{{', '}}' ])\n * @returns {List<string>} the list containing all the variable/non-variable strings, in order\n *\n * NOTE: this will fail to behave correctly if the delimiters are special parts of a regex, like '$'\n */\nmethods.extractSectionsFromString = (string, delimiters) => {\n  const regex = new RegExp(delimiters.slice(0, 2).join('(.+?)'))\n  const sections = string.split(regex)\n  if (delimiters.size <= 2) {\n    return sections\n  }\n\n  const subRegex = new RegExp(delimiters.slice(2).join('(.+?)'))\n  return sections\n    .map(section => section.split(subRegex))\n    .reduce(flatten, [])\n}\n\n/**\n * converts a url component into a SequenceParameter, with its variables extracted based on\n * the delimiters provided\n * @param {string} key: the type of URL component (hostname, pathname, etc.)\n * @param {string} string: the string to transform into a sequence\n * @param {List<string>} delimiters: the variable delimiters. like List([ '{{', '}}' ])\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.convertComplexStringToSequenceParameter = (key, string, delimiters) => {\n  const sections = methods.extractSectionsFromString(string, delimiters)\n  const sequence = sections.map(methods.sectionMapper)\n\n  if (sequence.length === 1) {\n    return sequence[0]\n      .set('key', key)\n      .set('name', key)\n  }\n\n  return new Parameter({\n    key,\n    name: key,\n    type: 'string',\n    superType: 'sequence',\n    value: List(sequence)\n  })\n}\n\n/**\n * converts a url component into a Parameter, with its variables extracted based on\n * the delimiters provided\n * @param {string} key: the type of URL component (hostname, pathname, etc.)\n * @param {string} string: the string to transform into a Parameter\n * @param {List<string>} delimiters: the variable delimiters. like List([ '{{', '}}' ])\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.convertStringToParameter = (key, string, delimiters = List()) => {\n  if (delimiters.size === 0) {\n    return methods.convertSimpleStringToParameter(key, string)\n  }\n\n  return methods.convertComplexStringToSequenceParameter(key, string, delimiters)\n}\n\n/**\n * adds a constraint to the parameter of a URLComponent\n * @param {URLComponent} urlComponent: the URLComponent to update\n * @param {Constraint} constraint: the constraint to add\n * @returns {URLComponent} the updated URLComponent\n */\nmethods.addConstraintToURLComponent = (urlComponent, constraint) => {\n  let parameter = urlComponent.get('parameter')\n  if (!parameter) {\n    parameter = methods.convertStringToParameter(\n      urlComponent.get('componentName'),\n      urlComponent.get('string'),\n      urlComponent.get('variableDelimiters')\n    )\n  }\n  let constraints = parameter.get('constraints')\n\n  constraints = constraints.push(constraint)\n  parameter = parameter.set('constraints', constraints)\n  return urlComponent.set('parameter', parameter)\n}\n\n/**\n * wraps a variable with handles.\n * @param {string} variable: the variable to wrap\n * @param {List<string>} delimiters: the variable delimiters. like List([ '{{', '}}' ])\n * @returns {string} the wrapped variable\n */\nmethods.addHandlesToVariable = (variable, delimiters) => {\n  const handles = List([\n    delimiters.get(0),\n    typeof delimiters.get(1) !== 'undefined' ? delimiters.get(1) : delimiters.get(0)\n  ])\n\n  return handles.join(variable)\n}\n\n/**\n * wraps with handles all variables in the sequence of a SequenceParameter.\n * @param {Parameter} param: the SequenceParameter to update\n * @param {List<string>} delimiters: the variable delimiters. like List([ '{{', '}}' ])\n * @returns {Parameter} the updated Parameter\n */\nmethods.addVarHandlesToVariablesInSequenceParameter = (param, delimiters) => {\n  const sequence = param.get('value')\n  const sequenceWithVars = sequence.map((section, index) => {\n    if (index % 2 === 0) {\n      return section\n    }\n\n    const variable = methods.addHandlesToVariable(section.get('key'), delimiters)\n    return section.set('default', variable)\n  })\n\n  return param.set('value', sequenceWithVars)\n}\n\n/**\n * generates a string representing a URLComponent, with variables wrapped based on the\n * variableDelimiters.\n * @param {URLComponent} urlComponent: the URLComponent to transform in a string\n * @param {List<string>} variableDelimiters: the variable delimiters. like List([ '{{', '}}' ])\n * @param {boolean} useDefault: whether to use the default value or to generate from the JSON schema\n * @returns {Parameter} the updated Parameter\n */\nmethods.generateURLComponent = (urlComponent, variableDelimiters = List(), useDefault = true) => {\n  let parameter = urlComponent.get('parameter')\n  if (variableDelimiters.size !== 0 && parameter.get('superType') === 'sequence') {\n    parameter = methods.addVarHandlesToVariablesInSequenceParameter(parameter, variableDelimiters)\n  }\n\n  return parameter.generate(useDefault)\n}\n\nexport const __internals__ = methods\nexport default URLComponent\n"
  },
  {
    "path": "src/models/Variable.js",
    "content": "import { Map, Record } from 'immutable'\n\nimport Model from './ModelInfo'\n\n/**\n * Metadata about the Variable Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'variable.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the Variable Record.\n */\nconst VariableSpec = {\n  _model: model,\n  name: null,\n  values: Map(),\n  defaultEnvironment: null\n}\n\n/**\n * The Variable Record\n */\nexport const Variable = Record(VariableSpec)\n\nexport default Variable\n"
  },
  {
    "path": "src/models/__tests__/Api.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Api from '../Api'\n\ndescribe('models/Api.js', () => {\n  describe('{ Api }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'resources',\n        'group',\n        'store',\n        'info'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Api(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Constraint.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record, List } from 'immutable'\nimport expect from 'expect'\n\nimport Constraint from '../Constraint'\n\ndescribe('models/Constraint.js', () => {\n  describe('{ Constraint }', () => {\n    it('should be a Record', () => {\n      const instance = new Constraint.Constraint({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'value',\n        'expression'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Constraint.Constraint(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('@evaluate', () => {\n      it('should return false', () => {\n        const mod = new Constraint.Constraint()\n\n        const expected = false\n        const actual = mod.evaluate()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@toJSONSchema', () => {\n      it('should work', () => {\n        const mod = new Constraint.Constraint({\n          name: 'test',\n          value: 28\n        })\n\n        const expected = { test: 28 }\n        const actual = mod.toJSONSchema()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('{ MultipleOfConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MultipleOf(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MultipleOf(4)\n\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(24)).toEqual(true)\n      expect(mod.evaluate(5)).toEqual(false)\n      expect(mod.evaluate(5.5)).toEqual(false)\n    })\n\n    describe('@toJSONSchema', () => {\n      it('should work', () => {\n        const mod = new Constraint.MultipleOf(4)\n\n        const expected = { multipleOf: 4 }\n        const actual = mod.toJSONSchema()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('{ MaximumConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.Maximum(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.Maximum(4)\n\n      expect(mod.evaluate(3)).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(5)).toEqual(false)\n    })\n\n    describe('@toJSONSchema', () => {\n      it('should work', () => {\n        const mod = new Constraint.Maximum(4)\n\n        const expected = { maximum: 4 }\n        const actual = mod.toJSONSchema()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('{ ExclusiveMaximumConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.ExclusiveMaximum(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.ExclusiveMaximum(4)\n\n      expect(mod.evaluate(3)).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(false)\n      expect(mod.evaluate(5)).toEqual(false)\n    })\n\n    it('@toJSONSchema works as expected', () => {\n      const mod = new Constraint.ExclusiveMaximum(4)\n\n      const expected = {\n        maximum: 4,\n        exclusiveMaximum: true\n      }\n      const actual = mod.toJSONSchema()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('{ MinimumConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.Minimum(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.Minimum(4)\n\n      expect(mod.evaluate(3)).toEqual(false)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(5)).toEqual(true)\n    })\n  })\n\n  describe('{ ExclusiveMinimumConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.ExclusiveMinimum(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.ExclusiveMinimum(4)\n\n      expect(mod.evaluate(3)).toEqual(false)\n      expect(mod.evaluate(4)).toEqual(false)\n      expect(mod.evaluate(5)).toEqual(true)\n    })\n\n    it('@toJSONSchema works as expected', () => {\n      const mod = new Constraint.ExclusiveMinimum(4)\n\n      const expected = {\n        minimum: 4,\n        exclusiveMinimum: true\n      }\n\n      const actual = mod.toJSONSchema()\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('{ MaximumLengthConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MaximumLength(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MaximumLength(5)\n\n      expect(mod.evaluate('this')).toEqual(true)\n      expect(mod.evaluate('short')).toEqual(true)\n      expect(mod.evaluate('too long')).toEqual(false)\n    })\n  })\n\n  describe('{ MinimumLengthConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MinimumLength(4)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MinimumLength(10)\n\n      expect(mod.evaluate('too short')).toEqual(false)\n      expect(mod.evaluate('just right')).toEqual(true)\n      expect(mod.evaluate('long enough')).toEqual(true)\n    })\n  })\n\n  describe('{ PatternConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.Pattern(/.*valid.*/)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.Pattern(/.*valid.*/)\n\n      expect(mod.evaluate('this is valid')).toEqual(true)\n      expect(mod.evaluate('this is not')).toEqual(false)\n    })\n  })\n\n  describe('{ MaximumItemsConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MaximumItems(3)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MaximumItems(3)\n\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 4 ])).toEqual(false)\n      expect(mod.evaluate(List([ 1, 2, 3 ]))).toEqual(true)\n      expect(mod.evaluate(List([ 1, 2, 3, 4 ]))).toEqual(false)\n    })\n\n    it('should work if no value provided', () => {\n      const mod = new Constraint.MaximumItems()\n\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 4 ])).toEqual(true)\n    })\n\n    it('should work if null value provided', () => {\n      const mod = new Constraint.MaximumItems(null)\n\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 4 ])).toEqual(true)\n    })\n  })\n\n  describe('{ MinimumItemsConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MinimumItems(3)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MinimumItems(3)\n\n      expect(mod.evaluate(List([ 1, 2 ]))).toEqual(false)\n      expect(mod.evaluate(List([ 1, 2, 3 ]))).toEqual(true)\n      expect(mod.evaluate([ 1, 2 ])).toEqual(false)\n      expect(mod.evaluate([ 1, 2, 3 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 4 ])).toEqual(true)\n    })\n\n    it('should work with default value', () => {\n      const mod = new Constraint.MinimumItems()\n\n      expect(mod.evaluate(List([ 1, 2 ]))).toEqual(true)\n      expect(mod.evaluate(List([ 1, 2, 3 ]))).toEqual(true)\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 4 ])).toEqual(true)\n    })\n  })\n\n  describe('{ UniqueItemsConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.UniqueItems(true)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.UniqueItems(true)\n\n      expect(mod.evaluate(List([ 1, 2 ]))).toEqual(true)\n      expect(mod.evaluate(List([ 1, 2, 3, 2 ]))).toEqual(false)\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 2 ])).toEqual(false)\n      expect(mod.evaluate([ 1, 2, 3, [ 1, 2, 3 ] ])).toEqual(true)\n    })\n\n    it('should work if no value provided', () => {\n      const mod = new Constraint.UniqueItems()\n\n      expect(mod.evaluate([ 1, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, 2 ])).toEqual(true)\n      expect(mod.evaluate([ 1, 2, 3, [ 1, 2, 3 ] ])).toEqual(true)\n    })\n  })\n\n  describe('{ MaximumPropertiesConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MaximumProperties(3)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MaximumProperties(3)\n\n      expect(mod.evaluate({ a: 1, b: 2 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3, d: 4 })).toEqual(false)\n    })\n\n    it('should work if no value provided', () => {\n      const mod = new Constraint.MaximumProperties()\n\n      expect(mod.evaluate({ a: 1, b: 2 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3, d: 4 })).toEqual(true)\n    })\n\n    it('should work if null value provided', () => {\n      const mod = new Constraint.MaximumProperties(null)\n\n      expect(mod.evaluate({ a: 1, b: 2 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3, d: 4 })).toEqual(true)\n    })\n  })\n\n  describe('{ MinimumPropertiesConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.MinimumProperties(3)\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.MinimumProperties(3)\n\n      expect(mod.evaluate({ a: 1, b: 2 })).toEqual(false)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3, d: 4 })).toEqual(true)\n    })\n\n    it('should work with default value', () => {\n      const mod = new Constraint.MinimumProperties()\n\n      expect(mod.evaluate({ a: 1, b: 2 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3 })).toEqual(true)\n      expect(mod.evaluate({ a: 1, b: 2, c: 3, d: 4 })).toEqual(true)\n    })\n  })\n\n  describe('{ EnumConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.Enum([ 'one', 'two', 'three' ])\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.Enum([ 'one', 'two', 'three' ])\n\n      expect(mod.evaluate('one')).toEqual(true)\n      expect(mod.evaluate('two')).toEqual(true)\n      expect(mod.evaluate('four')).toEqual(false)\n    })\n  })\n\n  describe('{ JSONSchemaConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.JSONSchema({\n        type: 'integer',\n        minimum: 3,\n        maximum: 6\n      })\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.JSONSchema({\n        type: 'integer',\n        minimum: 3,\n        maximum: 6\n      })\n\n      expect(mod.evaluate(1)).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(7)).toEqual(true)\n    })\n\n    it('should work with default schema', () => {\n      const mod = new Constraint.JSONSchema()\n\n      expect(mod.evaluate(1)).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(7)).toEqual(true)\n    })\n\n    describe('@toJSONSchema', () => {\n      it('should work', () => {\n        const mod = new Constraint.JSONSchema({\n          type: 'integer',\n          minimum: 3,\n          maximum: 6\n        })\n\n        const expected = {\n          type: 'integer',\n          minimum: 3,\n          maximum: 6\n        }\n        const actual = mod.toJSONSchema()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('{ XMLSchemaConstraint }', () => {\n    it('should be a Constraint', () => {\n      const mod = new Constraint.XMLSchema(\n        `<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n          <xs:element name=\"userId\" type=\"xs:string\"/>\n         </xs:schema>`\n      )\n\n      expect(mod).toBeA(Constraint.Constraint)\n    })\n\n    it('should work', () => {\n      const mod = new Constraint.XMLSchema(\n        `<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n          <xs:element name=\"userId\" type=\"xs:string\"/>\n         </xs:schema>`\n      )\n\n      expect(mod.evaluate('1')).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(null)).toEqual(true)\n    })\n\n    it('should work with default value', () => {\n      const mod = new Constraint.XMLSchema()\n\n      expect(mod.evaluate('1')).toEqual(true)\n      expect(mod.evaluate(4)).toEqual(true)\n      expect(mod.evaluate(null)).toEqual(true)\n    })\n\n    describe('@toJSONSchema', () => {\n      it('should work', () => {\n        const mod = new Constraint.XMLSchema(\n          `<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n            <xs:element name=\"userId\" type=\"xs:string\"/>\n           </xs:schema>`\n        )\n\n        const expected = {\n          'x-xml': `<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\">\n            <xs:element name=\"userId\" type=\"xs:string\"/>\n           </xs:schema>`\n        }\n        const actual = mod.toJSONSchema()\n\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Contact.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { Contact } from '../Contact'\n\ndescribe('models/Contact.js', () => {\n  describe('{ Contact }', () => {\n    it('should be a Record', () => {\n      const instance = new Contact({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'url',\n        'email'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Contact(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Context.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { Context, __internals__ } from '../Context'\nimport ParameterContainer from '../ParameterContainer'\n\ndescribe('models/Context.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Context }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'constraints',\n        'type',\n        'implements'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Context(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('-methods', () => {\n      describe('@filter', () => {\n        it('should call __internals__.filter', () => {\n          const expected = 123141\n          spyOn(__internals__, 'filter').andReturn(expected)\n\n          const context = new Context()\n          const actual = context.filter()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.filter).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.filter with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'filter').andReturn(expected)\n\n          const context = new Context({\n            constraints: new List([ 1, 2, 3 ])\n          })\n          const container = new ParameterContainer({ headers: List([ 1, 2, 3 ]) })\n          const actual = context.filter(container)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.filter).toHaveBeenCalled(context, container)\n        })\n      })\n    })\n  })\n\n  describe('@filter', () => {\n    it('should return null if no ParameterContainer', () => {\n      const container = null\n      const context = new Context()\n\n      const expected = null\n      const actual = __internals__.filter(context, container)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if paramContainer is not ParameterContainer', () => {\n      const container = { type: 'string' }\n      const context = new Context()\n\n      const expected = null\n      const actual = __internals__.filter(context, container)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call paramContainer.filter', () => {\n      const container = new ParameterContainer({\n        headers: List([ 1, 2, 3 ])\n      })\n      spyOn(container, 'filter').andReturn('test')\n\n      const context = new Context()\n\n      const expected = 'test'\n      const actual = __internals__.filter(context, container)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Group.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record, OrderedMap, List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { Group, __internals__ } from '../Group'\n\ndescribe('models/Group.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Group }', () => {\n    it('should be a Group', () => {\n      const instance = new Group({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'id',\n        'name',\n        'description',\n        'children'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Group(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('-methods', () => {\n      describe('@getRequestIds', () => {\n        it('should call __internals__.getRequestIds', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getRequestIds').andReturn(expected)\n\n          const group = new Group()\n          const actual = group.getRequestIds()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getRequestIds).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.getRequestIds with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getRequestIds').andReturn(expected)\n\n          const group = new Group()\n          const actual = group.getRequestIds()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getRequestIds).toHaveBeenCalled(group)\n        })\n      })\n\n      describe('@getRequests', () => {\n        it('should call __internals__.getRequests', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getRequests').andReturn(expected)\n\n          const group = new Group()\n          const actual = group.getRequests()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getRequests).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.getRequests with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getRequests').andReturn(expected)\n\n          const group = new Group()\n          const requestMap = new OrderedMap({\n            a: 123,\n            b: 321\n          })\n          const actual = group.getRequests(requestMap)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getRequests).toHaveBeenCalledWith(group, requestMap)\n        })\n      })\n    })\n  })\n\n  describe('@isId', () => {\n    it('should return true if id is string', () => {\n      const id = 'test'\n      const expected = true\n      const actual = __internals__.isId(id)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if id is number', () => {\n      const id = 124124\n      const expected = true\n      const actual = __internals__.isId(id)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if id is Group', () => {\n      const id = new Group()\n      const expected = false\n      const actual = __internals__.isId(id)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isGroup', () => {\n    it('should return false if id is string', () => {\n      const id = 'test'\n      const expected = false\n      const actual = __internals__.isGroup(id)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if id is number', () => {\n      const id = 124124\n      const expected = false\n      const actual = __internals__.isGroup(id)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if id is Group', () => {\n      const id = new Group()\n      const expected = true\n      const actual = __internals__.isGroup(id)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@flattenReducer', () => {\n    it('should concatenate the content of the second list to the content of the first', () => {\n      const flat = List([ 1, 2, 3 ])\n      const list = List([ 4, 5, 6 ])\n\n      const expected = List([ 1, 2, 3, 4, 5, 6 ])\n      const actual = __internals__.flattenReducer(flat, list)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRequestIds', () => {\n    it('should return empty List if no group', () => {\n      const group = null\n\n      const expected = List()\n      const actual = __internals__.getRequestIds(group)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return empty List if no children in group', () => {\n      const group = new Group()\n\n      const expected = List()\n      const actual = __internals__.getRequestIds(group)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call isId with each child of group', () => {\n      spyOn(__internals__, 'isId').andReturn(false)\n      const group = new Group({\n        children: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n\n      __internals__.getRequestIds(group)\n\n      expect(__internals__.isId.calls.length).toEqual(2)\n      expect(__internals__.isId.calls[0].arguments.slice(0, 1)).toEqual([ 123 ])\n      expect(__internals__.isId.calls[1].arguments.slice(0, 1)).toEqual([ 321 ])\n    })\n\n    it('should call isGroup with each child of group', () => {\n      spyOn(__internals__, 'isGroup').andReturn(false)\n      const group = new Group({\n        children: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n\n      __internals__.getRequestIds(group)\n\n      expect(__internals__.isGroup.calls.length).toEqual(2)\n      expect(__internals__.isGroup.calls[0].arguments.slice(0, 1)).toEqual([ 123 ])\n      expect(__internals__.isGroup.calls[1].arguments.slice(0, 1)).toEqual([ 321 ])\n    })\n\n    it('should call itself on each sub group', () => {\n      spyOn(__internals__, 'getRequestIds').andCallThrough()\n      const subA = new Group({\n        name: 'subA'\n      })\n      const subB = new Group({\n        name: 'subB'\n      })\n      const subC = new Group({\n        name: 'subC'\n      })\n\n      const group = new Group({\n        children: OrderedMap({\n          a: subA,\n          b: subB,\n          c: subC\n        })\n      })\n\n      __internals__.getRequestIds(group)\n\n      expect(__internals__.getRequestIds.calls.length).toEqual(4)\n      expect(__internals__.getRequestIds.calls[1].arguments.slice(0, 1))\n        .toEqual([ subA ])\n      expect(__internals__.getRequestIds.calls[2].arguments.slice(0, 1))\n        .toEqual([ subB ])\n      expect(__internals__.getRequestIds.calls[3].arguments.slice(0, 1))\n        .toEqual([ subC ])\n    })\n\n    it('should call flattenReducer with each requestIds List from the sub groups', () => {\n      spyOn(__internals__, 'flattenReducer').andReturn(List([ 789, 987 ]))\n\n      const subA = new Group({\n        name: 'subA',\n        children: OrderedMap({ a1: 123, a2: 321 })\n      })\n      const subB = new Group({\n        name: 'subB',\n        children: OrderedMap({ b1: 234, b2: 432 })\n      })\n      const subC = new Group({\n        name: 'subC',\n        children: OrderedMap({ c1: 345, c2: 543 })\n      })\n\n      const group = new Group({\n        children: OrderedMap({\n          a: subA,\n          b: subB,\n          c: subC\n        })\n      })\n\n      __internals__.getRequestIds(group)\n\n      expect(__internals__.flattenReducer.calls.length).toEqual(3)\n      expect(__internals__.flattenReducer.calls[0].arguments.slice(0, 2))\n        .toEqual([ List(), List([ 123, 321 ]) ])\n      expect(__internals__.flattenReducer.calls[1].arguments.slice(0, 2))\n        .toEqual([ List([ 789, 987 ]), List([ 234, 432 ]) ])\n      expect(__internals__.flattenReducer.calls[2].arguments.slice(0, 2))\n        .toEqual([ List([ 789, 987 ]), List([ 345, 543 ]) ])\n    })\n\n    it('should work', () => {\n      const subSubA = new Group({\n        name: 'subSubA',\n        children: OrderedMap({ aa1: 456, aa2: 654 })\n      })\n\n      const subA = new Group({\n        name: 'subA',\n        children: OrderedMap({ a1: 123, a2: 321, a3: subSubA })\n      })\n      const subB = new Group({\n        name: 'subB',\n        children: OrderedMap({ b1: 234, b2: 432 })\n      })\n      const subC = new Group({\n        name: 'subC',\n        children: OrderedMap({ c1: 345, c2: 543 })\n      })\n\n      const group = new Group({\n        children: OrderedMap({\n          a: subA,\n          b: subB,\n          c: subC,\n          d: 567,\n          e: 765\n        })\n      })\n\n      const expected = List([ 456, 654, 123, 321, 234, 432, 345, 543, 567, 765 ])\n      const actual = __internals__.getRequestIds(group)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isRequest', () => {\n    it('should return true if Request not null', () => {\n      const request = { a: 123 }\n      const expected = true\n      const actual = __internals__.isRequest(request)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if Request is null', () => {\n      const request = null\n      const expected = false\n      const actual = __internals__.isRequest(request)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRequests', () => {\n    it('should return empty List if no Request Map', () => {\n      const group = new Group({\n        children: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n\n      const requestMap = null\n\n      const expected = List()\n      const actual = __internals__.getRequests(group, requestMap)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return empty List if no Group', () => {\n      const group = null\n\n      const requestMap = OrderedMap({\n        '123': 'req1',\n        '321': 'req2'\n      })\n\n      const expected = List()\n      const actual = __internals__.getRequests(group, requestMap)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getRequestIds', () => {\n      spyOn(__internals__, 'getRequestIds').andReturn(List([ 123, 321 ]))\n\n      const group = new Group({\n        children: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n\n      const requestMap = OrderedMap({\n        '123': 'req1',\n        '321': 'req2'\n      })\n\n      __internals__.getRequests(group, requestMap)\n\n      expect(__internals__.getRequestIds).toHaveBeenCalledWith(group)\n    })\n\n    it('should drop non-matching requests ids', () => {\n      const group = new Group({\n        children: OrderedMap({\n          a: 789,\n          b: 678,\n          c: 987\n        })\n      })\n\n      const requestMap = OrderedMap({\n        '123': 'req1',\n        '321': 'req2'\n      })\n\n      const expected = List()\n      const actual = __internals__.getRequests(group, requestMap)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const group = new Group({\n        children: OrderedMap({\n          a: 123,\n          b: 321,\n          c: 987\n        })\n      })\n\n      const requestMap = OrderedMap({\n        '123': 'req1',\n        '321': 'req2'\n      })\n\n      const expected = List([ 'req1', 'req2' ])\n      const actual = __internals__.getRequests(group, requestMap)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Info.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { Info } from '../Info'\n\ndescribe('models/Info.js', () => {\n  describe('{ Info }', () => {\n    it('should be a Record', () => {\n      const instance = new Info({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'title',\n        'description',\n        'tos',\n        'contact',\n        'license',\n        'version'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Info(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Interface.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Interface from '../Interface'\n\ndescribe('models/Interface.js', () => {\n  describe('{ Interface }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'required',\n        'description'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Interface(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/License.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { License } from '../License'\n\ndescribe('models/License.js', () => {\n  describe('{ License }', () => {\n    it('should be a Record', () => {\n      const instance = new License({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'url'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new License(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/ModelInfo.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Model from '../ModelInfo'\n\ndescribe('models/ModelInfo.js', () => {\n  describe('{ Model }', () => {\n    describe('#fields', () => {\n      it('should have a `name` field', () => {\n        const name = 'test'\n        const data = { name }\n\n        const instance = new Model(data)\n\n        expect(instance.get('name')).toEqual(name)\n      })\n\n      it('should have a `version` field', () => {\n        const version = 'test'\n        const data = { version }\n\n        const instance = new Model(data)\n\n        expect(instance.get('version')).toEqual(version)\n      })\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Parameter.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\n/* eslint-disable require-jsdoc */\nimport { Record, List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { Parameter, __internals__ } from '../Parameter'\nimport Reference from '../Reference'\nimport Constraint from '../Constraint'\n\ndescribe('models/Parameter.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Parameter }', () => {\n    it('should be a Record', () => {\n      const instance = new Parameter()\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'in',\n        'uuid',\n        'key',\n        'default',\n        'value',\n        'type',\n        'superType',\n        'format',\n        'name',\n        'required',\n        'description',\n        'examples',\n        'constraints',\n        'applicableContexts',\n        'interfaces'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Parameter(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('-methods', () => {\n      describe('@getJSONSchema', () => {\n        it('should call __internals__.getJSONSchema', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getJSONSchema').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.getJSONSchema()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getJSONSchema).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.getJSONSchema with correct default arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getJSONSchema').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.getJSONSchema()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getJSONSchema.calls[0].arguments).toEqual([ param, false, false ])\n        })\n\n        it('should call __internals__.getJSONSchema with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getJSONSchema').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.getJSONSchema(false, false)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getJSONSchema).toHaveBeenCalled(param, false, false)\n        })\n      })\n\n      describe('@generate', () => {\n        it('should call __internals__.generate', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generate').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.generate()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generate).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.generate with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generate').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.generate(false, { a: 123 })\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generate).toHaveBeenCalledWith(param, false, { a: 123 })\n        })\n      })\n\n      describe('@validate', () => {\n        it('should call __internals__.validate', () => {\n          const expected = 123141\n          spyOn(__internals__, 'validate').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.validate()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.validate).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.validate with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'validate').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.validate(1234)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.validate).toHaveBeenCalledWith(param, 1234)\n        })\n      })\n\n      describe('@isValid', () => {\n        it('should call __internals__.isValid', () => {\n          const expected = 123141\n          spyOn(__internals__, 'isValid').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.isValid()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.isValid).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.isValid with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'isValid').andReturn(expected)\n\n          const param = new Parameter()\n          const actual = param.isValid(12345)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.isValid).toHaveBeenCalledWith(param, 12345)\n        })\n      })\n    })\n  })\n\n  describe('@mergeConstraintInSchema', () => {\n    it('should call constraint.toJSONSchema', () => {\n      const set = { abc: 123 }\n      const constraint = new Constraint.Enum()\n\n      spyOn(constraint, 'toJSONSchema').andReturn({ enum: [ 1, 2, 3 ] })\n      __internals__.mergeConstraintInSchema(set, constraint)\n\n      expect(constraint.toJSONSchema).toHaveBeenCalled()\n    })\n\n    it('should merge constraint.toJSONSchema with schema', () => {\n      const schema = { type: 'integer' }\n      const constraint = new Constraint.Enum()\n\n      spyOn(constraint, 'toJSONSchema').andReturn({ enum: [ 1, 2, 3 ] })\n\n      const expected = {\n        type: 'integer',\n        enum: [ 1, 2, 3 ]\n      }\n\n      const actual = __internals__.mergeConstraintInSchema(schema, constraint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addConstraintsToSchema', () => {\n    it('should call __internals__.mergeConstraintInSchema for each constraint', () => {\n      const parameter = new Parameter({\n        constraints: List([\n          new Constraint.Enum([ 1, 2, 3 ]),\n          new Constraint.Maximum(2)\n        ])\n      })\n      const schema = {}\n\n      spyOn(__internals__, 'mergeConstraintInSchema').andReturn({ type: 'string' })\n\n      __internals__.addConstraintsToSchema(parameter, schema)\n\n      expect(__internals__.mergeConstraintInSchema.calls.length).toEqual(2)\n    })\n\n    it('should merge the schemas from all the constraints', () => {\n      const parameter = new Parameter({\n        constraints: List([\n          new Constraint.Enum([ 1, 2, 3 ]),\n          new Constraint.Maximum(2)\n        ])\n      })\n      const schema = { type: 'integer' }\n\n      const expected = {\n        type: 'integer',\n        enum: [ 1, 2, 3 ],\n        maximum: 2\n      }\n      const actual = __internals__.addConstraintsToSchema(parameter, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@inferType', () => {\n    it('should return string if type is badly-typed (e.g. type=123)', () => {\n      const input = 123\n\n      const expected = 'string'\n      const actual = __internals__.inferType(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return number if type is double or float', () => {\n      const inputs = [\n        'double',\n        'float',\n        'DoUble',\n        'FloAt'\n      ]\n\n      const expected = [ 'number', 'number', 'number', 'number' ]\n      const actual = inputs.map(input => __internals__.inferType(input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return string if type is date', () => {\n      const type = 'date'\n      const expected = 'string'\n      const actual = __internals__.inferType(type)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if no type provided', () => {\n      const type = null\n      const expected = null\n      const actual = __internals__.inferType(type)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return type otherwise', () => {\n      const type = 'complex-type'\n      const expected = type\n      const actual = __internals__.inferType(type)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addTypeFromParameterToSchema', () => {\n    it('should add type to schema if javascript type', () => {\n      const inputs = [\n        [ new Parameter({ type: 'integer' }), {} ],\n        [ new Parameter({ type: 'number' }), {} ],\n        [ new Parameter({ type: 'array' }), {} ],\n        [ new Parameter({ type: 'string' }), {} ],\n        [ new Parameter({ type: 'object' }), {} ],\n        [ new Parameter({ type: 'boolean' }), {} ],\n        [ new Parameter({ type: 'null' }), {} ]\n      ]\n\n      const expected = [\n        { type: 'integer' },\n        { type: 'number' },\n        { type: 'array' },\n        { type: 'string' },\n        { type: 'object' },\n        { type: 'boolean' },\n        { type: 'null' }\n      ]\n\n      const actual = inputs.map(input => __internals__.addTypeFromParameterToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call inferType if type if not standard', () => {\n      const param = new Parameter({ type: 'double' })\n      const schema = {}\n\n      spyOn(__internals__, 'inferType').andReturn('number')\n\n      const expected = {\n        type: 'number'\n      }\n\n      const actual = __internals__.addTypeFromParameterToSchema(param, schema)\n\n      expect(__internals__.inferType).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should keep other fields in schema', () => {\n      const param = new Parameter({ type: 'string' })\n      const schema = {\n        enum: [ 'a', 'b', 'c' ]\n      }\n\n      const expected = {\n        type: 'string',\n        enum: [ 'a', 'b', 'c' ]\n      }\n\n      const actual = __internals__.addTypeFromParameterToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addTitleFromParameterToSchema', () => {\n    it('should not do anything if no title exists', () => {\n      const param = new Parameter()\n      const schema = { type: 'string', pattern: '^.{5}$' }\n      const expected = schema\n\n      const actual = __internals__.addTitleFromParameterToSchema(param, schema)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add title if it exists', () => {\n      const param = new Parameter({ key: 'someTitle' })\n      const schema = { type: 'string', pattern: '^.{5}$', 'x-title': 'someTitle' }\n      const expected = schema\n\n      const actual = __internals__.addTitleFromParameterToSchema(param, schema)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addDefaultFromParameterToSchema', () => {\n    it('should not do anything if no default exist', () => {\n      const param = new Parameter()\n      const schema = { type: 'string', pattern: '^.{5}$' }\n      const expected = schema\n\n      const actual = __internals__.addDefaultFromParameterToSchema(param, schema)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add default if it exists', () => {\n      const param = new Parameter({ default: 'default' })\n      const schema = { type: 'string', pattern: '^.{5}$', default: 'default' }\n      const expected = schema\n\n      const actual = __internals__.addTitleFromParameterToSchema(param, schema)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getJSONSchemaFromSimpleParameter', () => {\n    it('should call addConstraintsToSchema', () => {\n      spyOn(__internals__, 'addConstraintsToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSimpleParameter(param)\n\n      expect(__internals__.addConstraintsToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTypeFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTypeFromParameterToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSimpleParameter(param)\n\n      expect(__internals__.addTypeFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTitleFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTitleFromParameterToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSimpleParameter(param)\n\n      expect(__internals__.addTitleFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addDefaultFromParameterToSchema', () => {\n      spyOn(__internals__, 'addDefaultFromParameterToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSimpleParameter(param)\n\n      expect(__internals__.addDefaultFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const param = new Parameter({\n        key: 'Content-Type',\n        type: 'string',\n        default: 'application/json',\n        constraints: List([\n          new Constraint.Enum([ 'application/json', 'application/xml' ])\n        ])\n      })\n\n      const expected = {\n        'x-title': 'Content-Type',\n        type: 'string',\n        default: 'application/json',\n        enum: [ 'application/json', 'application/xml' ]\n      }\n\n      const actual = __internals__.getJSONSchemaFromSimpleParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addSequenceToSchema', () => {\n    it('should do nothing if no sequence', () => {\n      const param = new Parameter()\n      const schema = { type: 'string' }\n\n      const expected = schema\n      const actual = __internals__.addSequenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getJSONSchema for each Parameter in the sequence', () => {\n      spyOn(__internals__, 'getJSONSchema').andReturn(true)\n      const param = new Parameter({\n        value: List([\n          new Parameter(),\n          new Parameter()\n        ])\n      })\n      const schema = { type: 'string' }\n\n      __internals__.addSequenceToSchema(param, schema)\n\n      expect(__internals__.getJSONSchema.calls.length).toEqual(2)\n    })\n\n    it('should add an x-sequence field that is an array', () => {\n      spyOn(__internals__, 'getJSONSchema').andReturn(true)\n      const param = new Parameter({\n        value: List([\n          new Parameter(),\n          new Parameter()\n        ])\n      })\n      const schema = { type: 'string' }\n\n      const actual = __internals__.addSequenceToSchema(param, schema)\n\n      expect(actual['x-sequence']).toBeAn(Array)\n    })\n\n    it('should put the returned values in the x-sequence field', () => {\n      spyOn(__internals__, 'getJSONSchema').andReturn(true)\n      const param = new Parameter({\n        value: List([\n          new Parameter(),\n          new Parameter()\n        ])\n      })\n      const schema = {}\n\n      const expected = {\n        format: 'sequence',\n        'x-sequence': [ true, true ]\n      }\n      const actual = __internals__.addSequenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not destroy other fields', () => {\n      spyOn(__internals__, 'getJSONSchema').andReturn(true)\n      const param = new Parameter({\n        value: List([\n          new Parameter(),\n          new Parameter()\n        ])\n      })\n\n      const schema = {\n        type: 'string',\n        enum: [ '1', '2', '3', '4' ],\n        default: '1'\n      }\n\n      const expected = {\n        type: 'string',\n        enum: [ '1', '2', '3', '4' ],\n        default: '1',\n        format: 'sequence',\n        'x-sequence': [ true, true ]\n      }\n\n      const actual = __internals__.addSequenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getJSONSchemaFromSequenceParameter', () => {\n    it('should call addConstraintsToSchema', () => {\n      spyOn(__internals__, 'addConstraintsToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSequenceParameter(param)\n\n      expect(__internals__.addConstraintsToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTypeFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTypeFromParameterToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSequenceParameter(param)\n\n      expect(__internals__.addTypeFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTitleFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTitleFromParameterToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSequenceParameter(param)\n\n      expect(__internals__.addTitleFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addSequenceToSchema', () => {\n      spyOn(__internals__, 'addSequenceToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromSequenceParameter(param)\n\n      expect(__internals__.addSequenceToSchema).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const param = new Parameter({\n        key: 'Content-Type',\n        type: 'string',\n        value: List([\n          new Parameter({\n            type: 'string',\n            default: 'application/'\n          }),\n          new Parameter({\n            key: 'format',\n            type: 'string',\n            constraints: List([\n              new Constraint.Enum([ 'json', 'xml' ])\n            ])\n          })\n        ]),\n        constraints: List([\n          new Constraint.Enum([ 'application/json', 'application/xml' ])\n        ])\n      })\n\n      const expected = {\n        'x-title': 'Content-Type',\n        type: 'string',\n        format: 'sequence',\n        'x-sequence': [\n          { type: 'string', default: 'application/' },\n          { type: 'string', 'x-title': 'format', enum: [ 'json', 'xml' ] }\n        ],\n        enum: [ 'application/json', 'application/xml' ]\n      }\n\n      const actual = __internals__.getJSONSchemaFromSequenceParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addItemstoSchema', () => {\n    it('should do nothing if no item', () => {\n      const param = new Parameter()\n      const schema = { type: 'array' }\n\n      const expected = schema\n      const actual = __internals__.addItemstoSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should do nothing if item is not a Parameter', () => {\n      const param = new Parameter({\n        value: [ 'some', 'list' ]\n      })\n      const schema = { type: 'array' }\n\n      const expected = schema\n      const actual = __internals__.addItemstoSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getJSONSchema with items param', () => {\n      spyOn(__internals__, 'getJSONSchema')\n\n      const items = new Parameter({\n        type: 'number'\n      })\n      const param = new Parameter({\n        value: items\n      })\n\n      const schema = { type: 'array' }\n\n      __internals__.addItemstoSchema(param, schema)\n\n      expect(__internals__.getJSONSchema).toHaveBeenCalledWith(items, true)\n    })\n\n    it('should add items schema to items field in schema', () => {\n      const itemSchema = { type: 'number' }\n      spyOn(__internals__, 'getJSONSchema').andReturn(itemSchema)\n\n      const items = new Parameter({\n        type: 'number'\n      })\n      const param = new Parameter({\n        value: items\n      })\n      const schema = {}\n\n      const expected = {\n        items: itemSchema\n      }\n      const actual = __internals__.addItemstoSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not override any other fields in schema', () => {\n      const itemSchema = { 'x-title': 'diceThrow', type: 'integer', minimum: 1, maximum: 6 }\n      spyOn(__internals__, 'getJSONSchema').andReturn(itemSchema)\n\n      const items = new Parameter({\n        'x-title': 'diceThrow',\n        type: 'integer',\n        constraints: List([\n          new Constraint.Minimum(1),\n          new Constraint.Maximum(6)\n        ])\n      })\n      const param = new Parameter({\n        value: items\n      })\n      const schema = {\n        type: 'array',\n        default: [ 1, 2, 3 ],\n        maxItems: 5,\n        minItems: 2,\n        'x-title': 'diceThrows'\n      }\n\n      const expected = {\n        type: 'array',\n        default: [ 1, 2, 3 ],\n        maxItems: 5,\n        minItems: 2,\n        'x-title': 'diceThrows',\n        items: itemSchema\n      }\n      const actual = __internals__.addItemstoSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getJSONSchemaFromArrayParameter', () => {\n    it('should call addConstraintsToSchema', () => {\n      spyOn(__internals__, 'addConstraintsToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromArrayParameter(param)\n\n      expect(__internals__.addConstraintsToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTypeFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTypeFromParameterToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromArrayParameter(param)\n\n      expect(__internals__.addTypeFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTitleFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTitleFromParameterToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromArrayParameter(param)\n\n      expect(__internals__.addTitleFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addItemstoSchema', () => {\n      spyOn(__internals__, 'addItemstoSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromArrayParameter(param)\n\n      expect(__internals__.addItemstoSchema).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const param = new Parameter({\n        key: 'diceThrows',\n        type: 'array',\n        value: new Parameter({\n          key: 'diceThrow',\n          type: 'integer',\n          constraints: List([\n            new Constraint.Minimum(1),\n            new Constraint.Maximum(6)\n          ])\n        }),\n        constraints: List([\n          new Constraint.MinimumItems(3),\n          new Constraint.MaximumItems(6)\n        ])\n      })\n\n      const expected = {\n        'x-title': 'diceThrows',\n        type: 'array',\n        items: {\n          'x-title': 'diceThrow',\n          type: 'integer',\n          minimum: 1,\n          maximum: 6\n        },\n        minItems: 3,\n        maxItems: 6\n      }\n\n      const actual = __internals__.getJSONSchemaFromArrayParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addReferenceToSchema', () => {\n    it('should do nothing if no reference', () => {\n      const param = new Parameter()\n      const schema = { type: 'string' }\n\n      const expected = schema\n      const actual = __internals__.addReferenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should do nothing if value is not a reference', () => {\n      const param = new Parameter({\n        value: 'not a reference'\n      })\n      const schema = { type: 'string' }\n\n      const expected = schema\n      const actual = __internals__.addReferenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add a $ref field', () => {\n      const param = new Parameter({\n        value: new Reference({\n          uuid: '#/definitions/UserId'\n        })\n      })\n      const schema = { type: 'number', enum: [ 1, 2, 3 ] }\n\n      const expected = {\n        type: 'number', enum: [ 1, 2, 3 ], $ref: '#/definitions/UserId'\n      }\n      const actual = __internals__.addReferenceToSchema(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getJSONSchemaFromReferenceParameter', () => {\n    it('should call addConstraintsToSchema', () => {\n      spyOn(__internals__, 'addConstraintsToSchema').andReturn({ $schema: 'withConstraints' })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromReferenceParameter(param)\n\n      expect(__internals__.addConstraintsToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addTitleFromParameterToSchema', () => {\n      spyOn(__internals__, 'addTitleFromParameterToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromReferenceParameter(param)\n\n      expect(__internals__.addTitleFromParameterToSchema).toHaveBeenCalled()\n    })\n\n    it('should call addReferenceToSchema', () => {\n      spyOn(__internals__, 'addReferenceToSchema').andReturn({\n        $schema: 'withConstraints'\n      })\n\n      const param = new Parameter()\n      __internals__.getJSONSchemaFromReferenceParameter(param)\n\n      expect(__internals__.addReferenceToSchema).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const param = new Parameter({\n        key: 'userId',\n        type: 'reference',\n        value: new Reference({\n          uuid: '#/definitions/UserId'\n        }),\n        constraints: List([\n          new Constraint.Enum([ 1, 2, 3 ])\n        ])\n      })\n\n      const expected = {\n        'x-title': 'userId',\n        $ref: '#/definitions/UserId',\n        enum: [ 1, 2, 3 ]\n      }\n\n      const actual = __internals__.getJSONSchemaFromReferenceParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateSchemaWithFaker', () => {\n    it('should do nothing if no format', () => {\n      const param = new Parameter()\n      const schema = { type: 'string' }\n\n      const expected = schema\n      const actual = __internals__.updateSchemaWithFaker(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update schema with matching faker field', () => {\n      const param = new Parameter({\n        format: 'email'\n      })\n      const schema = {}\n\n      const expected = { faker: 'internet.email' }\n      const actual = __internals__.updateSchemaWithFaker(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not override schema field with matching faker field', () => {\n      const param = new Parameter({\n        format: 'password'\n      })\n      // super secure password scheme\n      const schema = {\n        pattern: '^[a-z]{4-8}$'\n      }\n\n      const expected = schema\n      const actual = __internals__.updateSchemaWithFaker(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not destroy other fields', () => {\n      const param = new Parameter({\n        format: 'password'\n      })\n      // super secure password scheme\n      const schema = {\n        type: 'string',\n        minLength: 4,\n        maxLength: 8\n      }\n\n      const expected = {\n        type: 'string',\n        minLength: 4,\n        maxLength: 8,\n        pattern: '^.*$'\n      }\n\n      const actual = __internals__.updateSchemaWithFaker(param, schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@unescapeURIFragment', () => {\n    it('should work', () => {\n      const fragments = [\n        '#/definitions/User',\n        '#/definitions/User~01',\n        '#/definitions/User~10',\n        '#/definitions/User~0~1',\n        '#/definitions/User~1~0'\n      ]\n\n      const expected = [\n        '#/definitions/User',\n        '#/definitions/User~1',\n        '#/definitions/User/0',\n        '#/definitions/User~/',\n        '#/definitions/User/~'\n      ]\n\n      for (let i = 0; i < fragments.length; i += 1) {\n        const actual = __internals__.unescapeURIFragment(fragments[i])\n        expect(actual).toEqual(expected[i])\n      }\n    })\n  })\n\n  describe('@replaceRefs', () => {\n    it('should do nothing if input is not an object', () => {\n      const input = 'some object'\n\n      const expected = input\n      const actual = __internals__.replaceRefs(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should replace $ref by default', () => {\n      const input = {\n        type: 'integer',\n        $ref: '#/definitions/UserId'\n      }\n\n      const expected = {\n        type: 'string',\n        default: 'UserId'\n      }\n      const actual = __internals__.replaceRefs(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call itself for each item in array if input is array', () => {\n      spyOn(__internals__, 'replaceRefs').andCallThrough()\n      const input = [ 1, 2, 3 ]\n\n      __internals__.replaceRefs(input)\n\n      expect(__internals__.replaceRefs.calls.length).toEqual(4)\n    })\n\n    it('should call itself for each key in object if input is object', () => {\n      spyOn(__internals__, 'replaceRefs').andCallThrough()\n      const input = { a: 1, b: 2, c: 3 }\n\n      __internals__.replaceRefs(input)\n\n      expect(__internals__.replaceRefs.calls.length).toEqual(4)\n    })\n\n    it('should call ignoring keys from the prototype chain if it is an object', () => {\n      spyOn(__internals__, 'replaceRefs').andCallThrough()\n      function A() {\n        this.a = 1\n        this.b = 2\n        this.c = 3\n      }\n      A.prototype.d = 4\n      A.prototype.e = 5\n\n      const input = new A()\n      __internals__.replaceRefs(input)\n\n      expect(__internals__.replaceRefs.calls.length).toEqual(4)\n    })\n  })\n\n  describe('@simplifyRefs', () => {\n    it('should do nothing if input is not an object', () => {\n      const input = 'some object'\n\n      const expected = input\n      const actual = __internals__.simplifyRefs(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should replace $ref by uuid if $ref is a Reference record', () => {\n      const input = {\n        type: 'integer',\n        $ref: new Reference({\n          uuid: '#/definitions/UserId'\n        })\n      }\n\n      const expected = {\n        type: 'integer',\n        $ref: '#/definitions/UserId'\n      }\n      const actual = __internals__.simplifyRefs(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call itself for each item in array if input is array', () => {\n      spyOn(__internals__, 'simplifyRefs').andCallThrough()\n      const input = [ 1, 2, 3 ]\n\n      __internals__.simplifyRefs(input)\n\n      expect(__internals__.simplifyRefs.calls.length).toEqual(4)\n    })\n\n    it('should call itself for each key in object if input is object', () => {\n      spyOn(__internals__, 'simplifyRefs').andCallThrough()\n      const input = { a: 1, b: 2, c: 3 }\n\n      __internals__.simplifyRefs(input)\n\n      expect(__internals__.simplifyRefs.calls.length).toEqual(4)\n    })\n\n    it('should call ignoring keys from the prototype chain if it is an object', () => {\n      spyOn(__internals__, 'simplifyRefs').andCallThrough()\n      function A() {\n        this.a = 1\n        this.b = 2\n        this.c = 3\n      }\n      A.prototype.d = 4\n      A.prototype.e = 5\n\n      const input = new A()\n      __internals__.simplifyRefs(input)\n\n      expect(__internals__.simplifyRefs.calls.length).toEqual(4)\n    })\n  })\n\n  describe('@isSimpleParameter', () => {\n    it('should return true if type if common js type but not array', () => {\n      const inputs = [\n        'number', 'string', 'object', 'boolean', 'null'\n      ]\n\n      for (const input of inputs) {\n        const param = new Parameter({\n          type: input\n        })\n        const actual = __internals__.isSimpleParameter(param)\n        expect(actual).toBeTruthy()\n      }\n    })\n\n    it('should return true if type if integer', () => {\n      const input = new Parameter({\n        type: 'integer'\n      })\n\n      const actual = __internals__.isSimpleParameter(input)\n\n      expect(actual).toBeTruthy()\n    })\n\n    it('should return false if array', () => {\n      const input = new Parameter({\n        type: 'array'\n      })\n\n      const actual = __internals__.isSimpleParameter(input)\n\n      expect(actual).toBeFalsy()\n    })\n\n    it('should return false otherwise', () => {\n      const input = new Parameter({\n        type: 'qwirqwfhqow'\n      })\n\n      const actual = __internals__.isSimpleParameter(input)\n\n      expect(actual).toBeFalsy()\n    })\n\n    it('should return false if param has a superType', () => {\n      const input = new Parameter({\n        superType: 'sequence',\n        type: 'string'\n      })\n\n      const actual = __internals__.isSimpleParameter(input)\n\n      expect(actual).toBeFalsy()\n    })\n  })\n\n  describe('@isSequenceParameter', () => {\n    it('should return true if superType === sequence', () => {\n      const input = new Parameter({ superType: 'sequence' })\n\n      const actual = __internals__.isSequenceParameter(input)\n      expect(actual).toBeTruthy()\n    })\n\n    it('should return false if superType is not set', () => {\n      const input = new Parameter()\n\n      const actual = __internals__.isSequenceParameter(input)\n      expect(actual).toBeFalsy()\n    })\n\n    it('should return false otherwise', () => {\n      const input = new Parameter({ superType: 'qowqwbq' })\n      const actual = __internals__.isSequenceParameter(input)\n      expect(actual).toBeFalsy()\n    })\n  })\n\n  describe('@isArrayParameter', () => {\n    it('should return true if type === array', () => {\n      const input = new Parameter({ type: 'array' })\n\n      const actual = __internals__.isArrayParameter(input)\n      expect(actual).toBeTruthy()\n    })\n\n    it('should return false if superType is not set', () => {\n      const input = new Parameter()\n\n      const actual = __internals__.isArrayParameter(input)\n      expect(actual).toBeFalsy()\n    })\n\n    it('should return false otherwise', () => {\n      const input = new Parameter({ type: 'qowqwbq' })\n      const actual = __internals__.isArrayParameter(input)\n      expect(actual).toBeFalsy()\n    })\n  })\n\n  describe('@isReferenceParameter', () => {\n    it('should return true if superType === reference', () => {\n      const input = new Parameter({ superType: 'reference' })\n\n      const actual = __internals__.isReferenceParameter(input)\n      expect(actual).toBeTruthy()\n    })\n\n    it('should return false if superType is not set', () => {\n      const input = new Parameter()\n\n      const actual = __internals__.isReferenceParameter(input)\n      expect(actual).toBeFalsy()\n    })\n\n    it('should return false otherwise', () => {\n      const input = new Parameter({ superType: 'qowqwbq' })\n      const actual = __internals__.isReferenceParameter(input)\n      expect(actual).toBeFalsy()\n    })\n  })\n\n  describe('@getRawJSONSchema', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'isSimpleParameter').andCall(({ simple }) => !!simple)\n      spyOn(__internals__, 'getJSONSchemaFromSimpleParameter').andCall(({ simple }) => simple)\n      spyOn(__internals__, 'isSequenceParameter').andCall(({ sequence }) => !!sequence)\n      spyOn(__internals__, 'getJSONSchemaFromSequenceParameter').andCall(({ sequence }) => sequence)\n      spyOn(__internals__, 'isArrayParameter').andCall(({ array }) => !!array)\n      spyOn(__internals__, 'getJSONSchemaFromArrayParameter').andCall(({ array }) => array)\n      spyOn(__internals__, 'isReferenceParameter').andCall(({ reference }) => !!reference)\n      spyOn(__internals__, 'getJSONSchemaFromReferenceParameter')\n        .andCall(({ reference }) => reference)\n\n      const inputs = [\n        [ { simple: 123 }, false ],\n        [ { sequence: 234 }, false ],\n        [ { array: 345 }, false ],\n        [ { reference: 456 }, false ],\n        [ { other: 567 }, false ]\n      ]\n      const expected = [\n        123, 234, 345, 456, {}\n      ]\n      const actual = inputs.map(input => __internals__.getRawJSONSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@getJSONSchema', () => {\n    it('should call getRawJSONSchema', () => {\n      spyOn(__internals__, 'getRawJSONSchema').andReturn({})\n      const param = new Parameter()\n\n      __internals__.getJSONSchema(param)\n\n      expect(__internals__.getRawJSONSchema).toHaveBeenCalled()\n    })\n\n    it('should call updateSchemaWithFaker if useFaker', () => {\n      spyOn(__internals__, 'updateSchemaWithFaker').andReturn({})\n      const param = new Parameter()\n\n      __internals__.getJSONSchema(param, true)\n\n      expect(__internals__.updateSchemaWithFaker).toHaveBeenCalled()\n    })\n\n    it('should not call updateSchemaWithFaker if not useFaker', () => {\n      spyOn(__internals__, 'updateSchemaWithFaker').andReturn({})\n      const param = new Parameter()\n\n      __internals__.getJSONSchema(param, false)\n\n      expect(__internals__.updateSchemaWithFaker).toNotHaveBeenCalled()\n    })\n\n    it('should call replaceRefs if replaceRefs', () => {\n      spyOn(__internals__, 'replaceRefs').andReturn({})\n      const param = new Parameter()\n\n      __internals__.getJSONSchema(param, false, true)\n\n      expect(__internals__.replaceRefs).toHaveBeenCalled()\n    })\n\n    it('should call simplifyRefs if not replaceRefs', () => {\n      spyOn(__internals__, 'simplifyRefs').andReturn({})\n      const param = new Parameter()\n\n      __internals__.getJSONSchema(param, false, false)\n\n      expect(__internals__.simplifyRefs).toHaveBeenCalled()\n    })\n  })\n\n  describe('@generateFromDefault', () => {\n    it('should return null if no default', () => {\n      const param = new Parameter()\n\n      const actual = __internals__.generateFromDefault(param)\n      expect(actual).toEqual(null)\n    })\n\n    it('should return value if default', () => {\n      const param = new Parameter({\n        default: false\n      })\n\n      const actual = __internals__.generateFromDefault(param)\n      expect(actual).toEqual(false)\n    })\n  })\n\n  describe('@generate', () => {\n    it('should call generateFromSequenceDefaults if param has sequence superType', () => {\n      spyOn(__internals__, 'generateFromSequenceDefaults').andReturn(true)\n\n      const param = new Parameter({ superType: 'sequence' })\n\n      __internals__.generate(param, true)\n\n      expect(__internals__.generateFromSequenceDefaults).toHaveBeenCalled()\n    })\n\n    it('should call generateFromDefault otherwise', () => {\n      spyOn(__internals__, 'generateFromDefault').andReturn(true)\n\n      const param = new Parameter()\n\n      __internals__.generate(param, true)\n\n      expect(__internals__.generateFromDefault).toHaveBeenCalled()\n    })\n\n    it('should return generateFromSequenceDefaults value if superType is sequence', () => {\n      spyOn(__internals__, 'generateFromSequenceDefaults').andReturn(12345)\n\n      const param = new Parameter({ superType: 'sequence' })\n\n      const expected = 12345\n      const actual = __internals__.generate(param, true)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return generateFromDefault value otherwise', () => {\n      spyOn(__internals__, 'generateFromDefault').andReturn(12345)\n\n      const param = new Parameter()\n\n      const expected = 12345\n      const actual = __internals__.generate(param, true)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const inputs = [\n        new Parameter(),\n        new Parameter({ default: 123 }),\n        new Parameter({ superType: 'sequence' }),\n        new Parameter({ superType: 'sequence', value: List() }),\n        new Parameter({ superType: 'sequence', value: List([\n          new Parameter(),\n          new Parameter({ default: 234 }),\n          new Parameter({ default: 345 })\n        ]) }),\n        new Parameter({ superType: 'sequence', value: List([\n          new Parameter(),\n          new Parameter({ default: 456 }),\n          new Parameter({ superType: 'sequence', value: List([\n            new Parameter(),\n            new Parameter({ default: 567 }),\n            new Parameter({ default: 678 })\n          ]) })\n        ]) })\n      ]\n\n      const expected = [ null, 123, null, '', '234345', '456567678' ]\n      const actual = inputs.map(input => __internals__.generate(input))\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@validate', () => {\n    it('should return true if no constraints', () => {\n      const param = new Parameter()\n      const value = 'whatever'\n\n      const expected = true\n      const actual = __internals__.validate(param, value)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if value matches constraints', () => {\n      const param = new Parameter({\n        type: 'string',\n        constraints: List([\n          new Constraint.MaximumLength(15),\n          new Constraint.MinimumLength(5),\n          new Constraint.Pattern('^what')\n        ])\n      })\n      const value = 'whatever'\n\n      const expected = true\n      const actual = __internals__.validate(param, value)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if value fails to match 1 constraint', () => {\n      const param = new Parameter({\n        type: 'string',\n        constraints: List([\n          new Constraint.MaximumLength(6),\n          new Constraint.MinimumLength(2),\n          new Constraint.Pattern('^what')\n        ])\n      })\n      const value = 'whatever'\n\n      const expected = false\n      const actual = __internals__.validate(param, value)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isValid', () => {\n    it('should return true if no applicableContexts', () => {\n      const source = new Parameter()\n      const input = new Parameter()\n\n      const expected = true\n      const actual = __internals__.isValid(source, input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    /* eslint-disable max-statements */\n    it('should call validate for applicableContexts with same key until one is valid', () => {\n      const ext1 = new Parameter({ key: 'test', default: 'ext1' })\n      const ext2 = new Parameter({ key: 'test', default: 'ext2' })\n\n      spyOn(ext1, 'validate').andReturn(false)\n      spyOn(ext2, 'validate').andReturn(false)\n\n      const source = new Parameter({\n        applicableContexts: List([ ext1, ext2 ])\n      })\n      const input = new Parameter({ key: 'test' })\n\n      const expected = false\n      const actual = __internals__.isValid(source, input)\n\n      expect(ext1.validate).toHaveBeenCalled()\n      expect(ext2.validate).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not call validate for applicableContexts with different key', () => {\n      const ext1 = new Parameter({ key: 'test1', default: 'ext1' })\n      const ext2 = new Parameter({ key: 'test2', default: 'ext2' })\n\n      spyOn(ext1, 'validate').andReturn(false)\n      spyOn(ext2, 'validate').andReturn(false)\n\n      const source = new Parameter({\n        applicableContexts: List([ ext1, ext2 ])\n      })\n      const input = new Parameter({ key: 'test1' })\n\n      const expected = false\n      const actual = __internals__.isValid(source, input)\n\n      expect(ext1.validate).toHaveBeenCalled()\n      expect(ext2.validate).toNotHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if no valid applicableContexts', () => {\n      const ext1 = new Parameter({ key: 'test1', default: 'ext1' })\n      const ext2 = new Parameter({ key: 'test2', default: 'ext2' })\n\n      spyOn(ext1, 'validate').andReturn(true)\n      spyOn(ext2, 'validate').andReturn(true)\n\n      const source = new Parameter({\n        applicableContexts: List([ ext1, ext2 ])\n      })\n      const input = new Parameter({ key: 'test0' })\n\n      const expected = false\n      const actual = __internals__.isValid(source, input)\n\n      expect(ext1.validate).toNotHaveBeenCalled()\n      expect(ext2.validate).toNotHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const withCorrectContentTypeHeader = new Parameter({\n        key: 'Content-Type',\n        default: 'application/json',\n        constraints: List([\n          new Constraint.Enum([\n            'application/json',\n            'application/xml'\n          ])\n        ])\n      })\n      const withCorrectAcceptHeader = new Parameter({\n        key: 'Accept',\n        default: 'image/svg+xml',\n        constraints: List([\n          new Constraint.Enum([\n            'image/png',\n            'image/svg+xml'\n          ])\n        ])\n      })\n\n      // valid with correct contentType *OR* accept header\n      const source = new Parameter({\n        applicableContexts: List([ withCorrectContentTypeHeader, withCorrectAcceptHeader ])\n      })\n\n      const invalidInputIncompatibleKey = new Parameter({\n        key: 'X-Previous-Response-Format',\n        default: 'image/svg+xml'\n      })\n\n      let actual\n\n      actual = __internals__.isValid(source, invalidInputIncompatibleKey)\n      expect(actual).toEqual(false)\n\n      const invalidInputInvalidValue = new Parameter({\n        key: 'Accept',\n        default: 'image/jpeg'\n      })\n\n      actual = __internals__.isValid(source, invalidInputInvalidValue)\n      expect(actual).toEqual(false)\n\n      const validInput = new Parameter({\n        key: 'Accept',\n        default: 'image/png'\n      })\n\n      actual = __internals__.isValid(source, validInput)\n      expect(actual).toEqual(true)\n    })\n  })\n})\n/* eslint-enable require-jsdoc */\n/* eslint-enable max-statements */\n"
  },
  {
    "path": "src/models/__tests__/ParameterContainer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { List, OrderedMap } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { ParameterContainer, __internals__ } from '../ParameterContainer'\nimport Parameter from '../Parameter'\n\ndescribe('models/ParameterContainer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ ParameterContainer }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'headers',\n        'queries',\n        'body',\n        'path'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new ParameterContainer(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('-methods', () => {\n      describe('@getHeadersSet', () => {\n        it('should call __internals__.getHeadersSet', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getHeadersSet').andReturn(expected)\n\n          const container = new ParameterContainer()\n          const actual = container.getHeadersSet()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getHeadersSet).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.getHeadersSet with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getHeadersSet').andReturn(expected)\n\n          const container = new ParameterContainer()\n          const actual = container.getHeadersSet()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getHeadersSet).toHaveBeenCalled(container)\n        })\n      })\n\n      describe('@filter', () => {\n        it('should call __internals__.filter', () => {\n          const expected = 123141\n          spyOn(__internals__, 'filter').andReturn(expected)\n\n          const container = new ParameterContainer()\n          const actual = container.filter()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.filter).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.filter with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'filter').andReturn(expected)\n\n          const container = new ParameterContainer()\n          const contextContraints = new List([ 1, 2, 3 ])\n          const actual = container.filter(contextContraints)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.filter).toHaveBeenCalled(container, contextContraints)\n        })\n      })\n    })\n  })\n\n  describe('@headerSetReducer', () => {\n    it('should do nothing if no key field in Parameter', () => {\n      const set = { a: 123, b: 321 }\n      const param = new Parameter()\n\n      const expected = set\n      const actual = __internals__.headerSetReducer(set, param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add Param if key', () => {\n      const set = {}\n      const param = new Parameter({\n        key: 'test'\n      })\n\n      const expected = { test: param }\n      const actual = __internals__.headerSetReducer(set, param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should not modifiy other keys in set', () => {\n      const set = { a: 321, b: 123 }\n      const param = new Parameter({\n        key: 'test'\n      })\n\n      const expected = { a: 321, b: 123, test: param }\n      const actual = __internals__.headerSetReducer(set, param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should override key if already present', () => {\n      const set = { a: 321, b: 123, test: 42 }\n      const param = new Parameter({\n        key: 'test'\n      })\n\n      const expected = { a: 321, b: 123, test: param }\n      const actual = __internals__.headerSetReducer(set, param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getHeadersSet', () => {\n    it('should return empty Map if no headers', () => {\n      const container = new ParameterContainer()\n\n      const expected = new OrderedMap()\n      const actual = __internals__.getHeadersSet(container)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call headerSetReducer for each Param in headers list', () => {\n      spyOn(__internals__, 'headerSetReducer').andReturn({})\n\n      const container = new ParameterContainer({\n        headers: List([ new Parameter(), new Parameter() ])\n      })\n\n      __internals__.getHeadersSet(container)\n\n      expect(__internals__.headerSetReducer.calls.length).toEqual(2)\n    })\n\n    it('should work', () => {\n      const param1 = new Parameter({\n        key: 'param1'\n      })\n      const param2 = new Parameter({\n        key: 'param2'\n      })\n\n      const container = new ParameterContainer({\n        headers: List([ param1, param2 ])\n      })\n\n      const expected = new OrderedMap({ param1, param2 })\n      const actual = __internals__.getHeadersSet(container)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@filterBlockReducer', () => {\n    it('should call block.filter', () => {\n      const block = List([ 1, 2, 3 ])\n\n      spyOn(block, 'filter').andReturn('test')\n\n      __internals__.filterBlockReducer(block, null)\n\n      expect(block.filter).toHaveBeenCalled()\n    })\n\n    it('should call isValid on each Param in block', () => {\n      const param1 = new Parameter()\n      const param2 = new Parameter()\n      const block = List([ param1, param2 ])\n\n      spyOn(param1, 'isValid').andReturn(true)\n      spyOn(param2, 'isValid').andReturn(true)\n\n      __internals__.filterBlockReducer(block, null)\n\n      expect(param1.isValid).toHaveBeenCalled()\n      expect(param2.isValid).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const param1 = new Parameter({\n        key: 'Content-Type'\n      })\n      const param2 = new Parameter({\n        key: 'Content-Type'\n      })\n      const block = List([ param1, param2 ])\n      const param = new Parameter()\n\n      const expected = block\n      const actual = __internals__.filterBlockReducer(block, param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@filterBlock', () => {\n    it('should call contextContraints.reduce with filterBlockReducer', () => {\n      const block = List([ 1, 2, 3 ])\n      const contextContraints = List()\n\n      spyOn(contextContraints, 'reduce').andReturn('test')\n\n      __internals__.filterBlock(block, contextContraints)\n\n      expect(contextContraints.reduce.calls[0].arguments.slice(0, 2))\n        .toEqual([ __internals__.filterBlockReducer, block ])\n    })\n  })\n\n  describe('@filter', () => {\n    it('should do nothing if no contextContraints', () => {\n      const container = new ParameterContainer({\n        headers: List([ 1, 2, 3 ])\n      })\n      const contextContraints = null\n\n      const expected = container\n      const actual = __internals__.filter(container, contextContraints)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call filterBlock for each block in the container', () => {\n      spyOn(__internals__, 'filterBlock').andReturn('test')\n\n      const container = new ParameterContainer({\n        headers: List([ 1, 2, 3 ])\n      })\n      const contextContraints = new List([ 1 ])\n\n      __internals__.filter(container, contextContraints)\n\n      expect(__internals__.filterBlock.calls.length).toEqual(4)\n    })\n\n    it('should work', () => {\n      spyOn(__internals__, 'filterBlock').andReturn('test')\n\n      const container = new ParameterContainer({\n        headers: List([ 1, 2, 3 ])\n      })\n      const contextContraints = new List([ 1 ])\n\n      const expected = new ParameterContainer({\n        headers: 'test',\n        queries: 'test',\n        body: 'test',\n        path: 'test'\n      })\n      const actual = __internals__.filter(container, contextContraints)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Reference.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { OrderedMap } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport Store from '../Store'\n\nimport { Reference, __internals__ } from '../Reference'\n\ndescribe('models/Reference.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Reference }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'type',\n        'uuid',\n        'overlay'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Reference(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n\n    describe('-methods', () => {\n      describe('@getLocation', () => {\n        it('should call __internals__.getLocation', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getLocation').andReturn(expected)\n\n          const ref = new Reference()\n          const actual = ref.getLocation()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getLocation).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.getLocation with the correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'getLocation').andReturn(expected)\n\n          const ref = new Reference()\n          const actual = ref.getLocation()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.getLocation).toHaveBeenCalledWith(ref)\n        })\n      })\n\n      describe('@resolve', () => {\n        it('should call __internals__.resolve', () => {\n          const expected = 123141\n          spyOn(__internals__, 'resolve').andReturn(expected)\n\n          const ref = new Reference()\n          const actual = ref.resolve()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.resolve).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.resolve with the correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'resolve').andReturn(expected)\n\n          const ref = new Reference()\n          const store = new Store({\n            constraint: 123\n          })\n          const actual = ref.resolve(store)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.resolve).toHaveBeenCalledWith(ref, store)\n        })\n      })\n    })\n  })\n\n  describe('@getLocation', () => {\n    it('should work', () => {\n      const refs = [\n        new Reference({ type: 'variable', uuid: 1234 }),\n        new Reference({ type: 7538, uuid: 1234 }),\n        new Reference({ type: 'whatever', uuid: '#/definitions/userId' }),\n        new Reference({ type: 8749, uuid: 'someUuid' })\n      ]\n\n      const expecteds = [\n        [ 'variable', 1234 ],\n        [ 7538, 1234 ],\n        [ 'whatever', '#/definitions/userId' ],\n        [ 8749, 'someUuid' ]\n      ]\n\n      const actuals = refs.map(ref => ref.getLocation())\n\n      actuals.map((actual, index) => {\n        const expected = expecteds[index]\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@resolve', () => {\n    it('should call @getLocation with ref', () => {\n      spyOn(__internals__, 'getLocation').andCall(v => [ 'constraint', v ])\n\n      const ref = 'abc'\n      const store = new Store({\n        constraint: OrderedMap({\n          abc: 234\n        })\n      })\n\n      __internals__.resolve(ref, store)\n\n      expect(__internals__.getLocation).toHaveBeenCalledWith(ref)\n    })\n\n    it('should return object saved in store if it exists', () => {\n      const ref = new Reference({\n        type: 'constraint',\n        uuid: 'abc'\n      })\n      const store = new Store({\n        constraint: OrderedMap({\n          abc: 234\n        })\n      })\n\n      const expected = 234\n      const actual = __internals__.resolve(ref, store)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return undefined if it does not exists in store', () => {\n      const ref = new Reference({\n        type: 'constraint',\n        uuid: 'def'\n      })\n      const store = new Store({\n        constraint: OrderedMap({\n          abc: 234\n        })\n      })\n\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n      const actual = __internals__.resolve(ref, store)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Request.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { Request } from '../Request'\n\ndescribe('models/Request.js', () => {\n  describe('{ Request }', () => {\n    it('should be a Record', () => {\n      const instance = new Request({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'id',\n        'name',\n        'description',\n        'method',\n        'parameters',\n        'contexts',\n        'auths',\n        'responses',\n        'timeout',\n        'tags',\n        'interfaces'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Request(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Resource.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Resource from '../Resource'\n\ndescribe('models/Resource.js', () => {\n  describe('{ Resource }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'uuid',\n        'endpoints',\n        'path',\n        'methods',\n        'description',\n        'interfaces'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Resource(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Response.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Response from '../Response'\n\ndescribe('models/Response.js', () => {\n  describe('{ Response }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'code',\n        'description',\n        'examples',\n        'parameters',\n        'contexts',\n        'interfaces'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Response(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Store.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Store from '../Store'\n\ndescribe('models/Store.js', () => {\n  describe('{ Store }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'endpoint',\n        'constraint',\n        'variable',\n        'parameter',\n        'response',\n        'interface'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Store(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/URL.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { parse } from 'url'\nimport { Record, List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { URL, __internals__ } from '../URL'\nimport URLComponent from '../URLComponent'\n\ndescribe('models/URL.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ URL }', () => {\n    it('should be a Record', () => {\n      const instance = new URL({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    /* eslint-disable max-statements */\n    describe('#fields', () => {\n      it('should have a `protocol` field', () => {\n        const key = 'protocol'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(List([ value ]))\n      })\n\n      it('should have a `slashes` field', () => {\n        const key = 'slashes'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `auth` field', () => {\n        const key = 'auth'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `host` field', () => {\n        const key = 'host'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `hostname` field', () => {\n        spyOn(__internals__, 'convertURLObjectToURLComponents').andCall((urlObject) => urlObject)\n\n        const key = 'hostname'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `port` field', () => {\n        spyOn(__internals__, 'convertURLObjectToURLComponents').andCall((urlObject) => urlObject)\n\n        const key = 'port'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `path` field', () => {\n        const key = 'path'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `pathname` field', () => {\n        spyOn(__internals__, 'convertURLObjectToURLComponents').andCall((urlObject) => urlObject)\n\n        const key = 'pathname'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `search` field', () => {\n        const key = 'search'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `query` field', () => {\n        const key = 'query'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `hash` field', () => {\n        const key = 'hash'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `href` field', () => {\n        const key = 'href'\n        const value = 'test'\n        const data = { url: {} }\n        data.url[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `secure` field', () => {\n        const key = 'secure'\n        const value = 'test'\n        const data = {}\n        data[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `variableDelimiters` field', () => {\n        const key = 'variableDelimiters'\n        const value = 'test'\n        const data = {}\n        data[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `uuid` field', () => {\n        const key = 'uuid'\n        const value = 'test'\n        const data = {}\n        data[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n\n      it('should have a `description` field', () => {\n        const key = 'description'\n        const value = 'test'\n        const data = {}\n        data[key] = value\n\n        const instance = new URL(data)\n\n        expect(instance.get(key)).toEqual(value)\n      })\n    })\n    /* eslint-enable max-statements */\n\n    describe('-methods', () => {\n      describe('@generate', () => {\n        it('should call __internals__.generate', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generate').andReturn(expected)\n\n          const component = new URL({ url: {} })\n          const actual = component.generate()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generate).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.generate with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generate').andReturn(expected)\n\n          const component = new URL({ url: {} })\n          const actual = component.generate(List([ 1, 2 ]), true)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generate).toHaveBeenCalled(component, List([ 1, 2 ]), true)\n        })\n      })\n\n      describe('@resolve', () => {\n        it('should call __internals__.resolve', () => {\n          const expected = 123141\n          spyOn(__internals__, 'resolve').andReturn(expected)\n\n          const component = new URL({ url: {} })\n          const actual = component.resolve()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.resolve).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.resolve with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'resolve').andReturn(expected)\n\n          const url = new URL({ url: {} })\n          const delimiters = List([ 1, 2 ])\n          const component = new URL({ url: {} })\n          const actual = component.resolve(url, delimiters, true)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.resolve).toHaveBeenCalled(\n            component, url, delimiters, true\n          )\n        })\n      })\n\n      describe('@toURLObject', () => {\n        it('should call __internals__.convertURLComponentsToURLObject', () => {\n          const expected = 123141\n          spyOn(__internals__, 'convertURLComponentsToURLObject').andReturn(expected)\n\n          const component = new URL({ url: {} })\n          const actual = component.toURLObject()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.convertURLComponentsToURLObject).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.convertURLComponentsToURLObject with correct args', () => {\n          const expected = 123141\n          spyOn(__internals__, 'convertURLComponentsToURLObject').andReturn(expected)\n\n          const component = new URL({ url: {} })\n          const actual = component.toURLObject(List([ 1, 2 ]), true)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.convertURLComponentsToURLObject).toHaveBeenCalled(\n            component, List([ 1, 2 ]), true\n          )\n        })\n      })\n    })\n\n    it('should work as expected with path urls', () => {\n      const instance = new URL({\n        url: '/some/path/{pathId}',\n        variableDelimiters: List([ '{', '}' ])\n      })\n\n      expect(instance.toURLObject(List([ '{{', '}}' ])).pathname).toEqual('/some/path/{{pathId}}')\n    })\n  })\n\n  describe('@convertURLObjectToURLComponents', () => {\n    it('should call fixUrlObject', () => {\n      const url = 'https://echo.paw.cloud/users'\n      spyOn(__internals__, 'fixUrlObject').andReturn(parse(url))\n\n      const urlObject = parse(url)\n      const variableDelimiters = List([ '{', '}' ])\n\n      __internals__.convertURLObjectToURLComponents(urlObject, variableDelimiters)\n\n      expect(__internals__.fixUrlObject).toHaveBeenCalledWith(urlObject)\n    })\n\n    it('should work', () => {\n      const urlObject = parse('https://jon:paw@{sub}.paw.{ext}:{port}/users/{userId}?min={op}#home')\n      const variableDelimiters = List([ '{', '}' ])\n\n      const expected = {\n        protocol: List([ urlObject.protocol ]),\n        slashes: true,\n        auth: 'jon:paw',\n        host: '{sub}.paw.{ext}:{port}',\n        hostname: new URLComponent({\n          componentName: 'hostname',\n          string: '{sub}.paw.{ext}',\n          variableDelimiters\n        }),\n        port: new URLComponent({\n          componentName: 'port',\n          string: '{port}',\n          variableDelimiters\n        }),\n        path: '/users/{userId}?min={op}',\n        pathname: new URLComponent({\n          componentName: 'pathname',\n          string: '/users/{userId}',\n          variableDelimiters\n        }),\n        search: '?min={op}',\n        query: 'min={op}',\n        hash: '#home',\n        href: 'https://jon:paw@{sub}.paw.{ext}:{port}/users/{userId}?min={op}#home',\n        secure: false\n      }\n\n      const actual = __internals__.convertURLObjectToURLComponents(urlObject, variableDelimiters)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertURLComponentsToURLObject', () => {\n    it('should use default values if not provided', () => {\n      const url = new URL({\n        url: 'http://echo.paw.cloud:80/users/123'\n      })\n\n      const expected = {\n        protocol: 'http:',\n        slashes: true,\n        host: 'echo.paw.cloud:80',\n        hostname: 'echo.paw.cloud',\n        port: '80',\n        pathname: '/users/123'\n      }\n\n      const actual = __internals__.convertURLComponentsToURLObject(url)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const delimiters = List([ '{', '}' ])\n      const url = new URL({\n        url: 'https://{sub}.paw.{ext}:{port}/users/{userId}',\n        variableDelimiters: delimiters\n      })\n      const newDelimiters = List([ '{', '}' ])\n      const useDefault = true\n\n      const expected = {\n        protocol: 'https:',\n        slashes: true,\n        host: '{sub}.paw.{ext}:{port}',\n        hostname: '{sub}.paw.{ext}',\n        port: '{port}',\n        pathname: '/users/{userId}'\n      }\n\n      const actual = __internals__.convertURLComponentsToURLObject(url, newDelimiters, useDefault)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should respect `secure` constraint', () => {\n      const delimiters = List([ '{', '}' ])\n      const url = (new URL({\n        url: 'https://{sub}.paw.{ext}:{port}/users/{userId}',\n        variableDelimiters: delimiters\n      }))\n        .set('protocol', List([ 'https:', 'http:', 'ws:' ]))\n        .set('secure', true)\n      const newDelimiters = List([ '{', '}' ])\n      const useDefault = true\n\n      const expected = {\n        protocol: 'https:',\n        slashes: true,\n        host: '{sub}.paw.{ext}:{port}',\n        hostname: '{sub}.paw.{ext}',\n        port: '{port}',\n        pathname: '/users/{userId}'\n      }\n\n      const actual = __internals__.convertURLComponentsToURLObject(url, newDelimiters, useDefault)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null for pathname if no pathname in url', () => {\n      const delimiters = List([ '{', '}' ])\n      const url = (new URL({\n        url: 'https://{sub}.paw.{ext}:{port}/users/{userId}',\n        variableDelimiters: delimiters\n      })).set('pathname', null)\n      const newDelimiters = List([ '{', '}' ])\n      const useDefault = true\n\n      const expected = {\n        protocol: 'https:',\n        slashes: true,\n        host: '{sub}.paw.{ext}:{port}',\n        hostname: '{sub}.paw.{ext}',\n        port: '{port}',\n        pathname: null\n      }\n\n      const actual = __internals__.convertURLComponentsToURLObject(url, newDelimiters, useDefault)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@generate', () => {\n    it('should call convertURLComponentsToURLObject', () => {\n      const urlString = 'https://sub.paw.ext/users/:userId'\n      spyOn(__internals__, 'convertURLComponentsToURLObject').andReturn(parse(urlString))\n\n      const delimiters = List([ '{', '}' ])\n      const useDefault = true\n      const url = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}',\n        variableDelimiters: delimiters\n      })\n\n      __internals__.generate(url, delimiters, useDefault)\n\n      expect(__internals__.convertURLComponentsToURLObject)\n        .toHaveBeenCalledWith(url, delimiters, useDefault)\n    })\n\n    it('should work', () => {\n      const delimiters = List([ '{', '}' ])\n      const useDefault = true\n      const url = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}',\n        variableDelimiters: delimiters\n      })\n\n      const expected = 'https://{sub}.paw.{ext}/users/{userId}'\n      const actual = __internals__.generate(url, delimiters, useDefault)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const delimiters = List([ '{', '}' ])\n      const url = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}',\n        variableDelimiters: delimiters\n      })\n\n      const expected = 'https://sub.paw.ext/users/userId'\n      const actual = __internals__.generate(url)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@resolve', () => {\n    it('should call generate', () => {\n      spyOn(__internals__, 'generate').andReturn('https://{sub}.paw.{ext}/users/{userId}/')\n      const delimiters = List([ '{', '}' ])\n      const from = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}/',\n        variableDelimiters: delimiters\n      })\n      const to = './purchases/{purchaseId}'\n      const useDefault = true\n\n      __internals__.resolve(from, to, delimiters, useDefault)\n\n      expect(__internals__.generate).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const delimiters = List([ '{', '}' ])\n      const from = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}/',\n        variableDelimiters: delimiters\n      })\n      const to = './purchases/{purchaseId}'\n      const useDefault = true\n\n      const expected = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}/purchases/{purchaseId}',\n        variableDelimiters: delimiters\n      })\n      const actual = __internals__.resolve(from, to, delimiters, useDefault)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const delimiters = List([ '{', '}' ])\n      const from = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}/',\n        variableDelimiters: delimiters\n      })\n      const to = './purchases/{purchaseId}'\n\n      const expected = new URL({\n        url: 'https://{sub}.paw.{ext}/users/{userId}/purchases/{purchaseId}',\n        variableDelimiters: delimiters\n      })\n      const actual = __internals__.resolve(from, to, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@decodeUrlObject', () => {\n    it('should decode every field that is a string', () => {\n      const urlObject = {\n        hostname: 'echo.paw.cloud',\n        pathname: '/users/%7BuserId%7D'\n      }\n      const expected = {\n        hostname: 'echo.paw.cloud',\n        pathname: '/users/{userId}'\n      }\n      const actual = __internals__.decodeUrlObject(urlObject)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore fields that are not strings', () => {\n      const urlObject = {\n        slashes: true,\n        hostname: 'echo.paw.cloud',\n        port: 8000,\n        pathname: '/users/%7BuserId%7D'\n      }\n      const expected = {\n        slashes: true,\n        hostname: 'echo.paw.cloud',\n        port: 8000,\n        pathname: '/users/{userId}'\n      }\n\n      const actual = __internals__.decodeUrlObject(urlObject)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@splitHostInHostnameAndPort', () => {\n    it('should set both to null if empty string', () => {\n      const host = ''\n\n      const expected = { hostname: null, port: null }\n      const actual = __internals__.splitHostInHostnameAndPort(host)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should set port to null if no colon', () => {\n      const host = 'echo.paw.cloud'\n\n      const expected = { hostname: 'echo.paw.cloud', port: null }\n      const actual = __internals__.splitHostInHostnameAndPort(host)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should set port and hostname to null if host is only colon', () => {\n      const host = ':'\n\n      const expected = { hostname: null, port: null }\n      const actual = __internals__.splitHostInHostnameAndPort(host)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const host = 'echo.paw.cloud:8080'\n\n      const expected = { hostname: 'echo.paw.cloud', port: '8080' }\n      const actual = __internals__.splitHostInHostnameAndPort(host)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@splitPathnameInHostAndPathname', () => {\n    it('should set both host and pathname to null if empty string', () => {\n      const pathname = ''\n\n      const expected = { host: null, pathname: null }\n      const actual = __internals__.splitPathnameInHostAndPathname(pathname)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should set both host to previous pathname if it has no slash', () => {\n      const pathname = '{sub}.paw.{ext}'\n\n      const expected = { host: pathname, pathname: null }\n      const actual = __internals__.splitPathnameInHostAndPathname(pathname)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should set host to null if previous pathname starts with slash', () => {\n      const pathname = '/users/{userId}'\n\n      const expected = { host: null, pathname }\n      const actual = __internals__.splitPathnameInHostAndPathname(pathname)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const pathname = '{sub}.paw.{ext}/users/{userId}/purchases/{purchaseId}'\n\n      const expected = {\n        host: '{sub}.paw.{ext}',\n        pathname: '/users/{userId}/purchases/{purchaseId}'\n      }\n\n      const actual = __internals__.splitPathnameInHostAndPathname(pathname)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPathFromPathNameAndSearch', () => {\n    it('should return null if no pathname or search', () => {\n      const pathname = null\n      const search = null\n\n      const expected = null\n      const actual = __internals__.createPathFromPathNameAndSearch(pathname, search)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore null pathname', () => {\n      const pathname = null\n      const search = '?query=true'\n\n      const expected = search\n      const actual = __internals__.createPathFromPathNameAndSearch(pathname, search)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore null search', () => {\n      const pathname = '/users/{userId}'\n      const search = null\n\n      const expected = pathname\n      const actual = __internals__.createPathFromPathNameAndSearch(pathname, search)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const pathname = '/users/{userId}'\n      const search = '?query=true'\n\n      const expected = pathname + search\n      const actual = __internals__.createPathFromPathNameAndSearch(pathname, search)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHrefFromBaseAndHostAndPathName', () => {\n    it('should work', () => {\n      const base = {\n        protocol: 'https',\n        slashes: true,\n        auth: 'jon:paw',\n        host: 'old.host.com:8080',\n        pathname: '/old/path/to/resource',\n        search: '?query=true',\n        hash: '#NoHashtag'\n      }\n\n      const host = 'new.host.io:443'\n      const pathname = '/new/awesome/path'\n\n      const expected = 'https://jon:paw@new.host.io:443/new/awesome/path?query=true#NoHashtag'\n      const actual = __internals__.createHrefFromBaseAndHostAndPathName(base, host, pathname)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with missing pathname', () => {\n      const base = {\n        protocol: 'https',\n        slashes: true,\n        auth: 'jon:paw',\n        host: 'old.host.com:8080',\n        pathname: '/old/path/to/resource',\n        search: '?query=true',\n        hash: '#NoHashtag'\n      }\n\n      const host = 'new.host.io:443'\n\n      const expected = 'https://jon:paw@new.host.io:443/?query=true#NoHashtag'\n      const actual = __internals__.createHrefFromBaseAndHostAndPathName(base, host)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with missing params', () => {\n      const base = {\n        protocol: 'https',\n        slashes: true,\n        auth: 'jon:paw',\n        host: 'old.host.com:8080',\n        pathname: '/old/path/to/resource',\n        search: '?query=true',\n        hash: '#NoHashtag'\n      }\n\n      const expected = 'https:///?query=true#NoHashtag'\n      const actual = __internals__.createHrefFromBaseAndHostAndPathName(base)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@fixUrlObject', () => {\n    it('should call decodeUrlObject', () => {\n      spyOn(__internals__, 'decodeUrlObject').andReturn({ host: 'echo.paw.cloud' })\n\n      const urlObject = {}\n\n      __internals__.fixUrlObject(urlObject)\n\n      expect(__internals__.decodeUrlObject).toHaveBeenCalled()\n    })\n\n    it('should return decoded UrlObject if host or no pathname', () => {\n      spyOn(__internals__, 'decodeUrlObject').andReturn({ host: 'echo.paw.cloud' })\n\n      const urlObject = {}\n\n      const expected = { host: 'echo.paw.cloud' }\n      const actual = __internals__.fixUrlObject(urlObject)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call splitPathnameInHostAndPathname if no host', () => {\n      spyOn(__internals__, 'splitPathnameInHostAndPathname').andReturn({\n        host: 'echo.paw.cloud',\n        pathname: '/users/{userId}'\n      })\n\n      const urlObject = {\n        pathname: '/users/{userId}'\n      }\n\n      __internals__.fixUrlObject(urlObject)\n\n      expect(__internals__.splitPathnameInHostAndPathname).toHaveBeenCalled()\n    })\n\n    it('should call splitHostInHostnameAndPort if no host', () => {\n      spyOn(__internals__, 'splitHostInHostnameAndPort').andReturn({\n        hostname: '{sub}.paw.{ext}',\n        port: '{port}'\n      })\n\n      const urlObject = {\n        pathname: '{sub}.paw.{ext}:{port}/users/{userId}'\n      }\n\n      __internals__.fixUrlObject(urlObject)\n\n      expect(__internals__.splitHostInHostnameAndPort).toHaveBeenCalled()\n    })\n\n    it('should call createPathFromPathNameAndSearch', () => {\n      spyOn(__internals__, 'createPathFromPathNameAndSearch').andReturn('/users/{userId}')\n\n      const urlObject = {\n        pathname: '{sub}.paw.{ext}:{port}/users/{userId}'\n      }\n\n      __internals__.fixUrlObject(urlObject)\n\n      expect(__internals__.createPathFromPathNameAndSearch).toHaveBeenCalled()\n    })\n\n    it('should call createHrefFromBaseAndHostAndPathName', () => {\n      spyOn(__internals__, 'createHrefFromBaseAndHostAndPathName')\n        .andReturn('https://{sub}.paw.{ext}:{port}/users/{userId}')\n\n      const urlObject = {\n        protocol: 'https:',\n        slashes: true,\n        pathname: '{sub}.paw.{ext}:{port}/users/{userId}'\n      }\n\n      __internals__.fixUrlObject(urlObject)\n\n      expect(__internals__.createHrefFromBaseAndHostAndPathName).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const urlObject = {\n        protocol: 'https:',\n        slashes: true,\n        pathname: '{sub}.paw.{ext}:{port}/users/{userId}'\n      }\n\n      const expected = {\n        protocol: 'https:',\n        slashes: true,\n        host: '{sub}.paw.{ext}:{port}',\n        hostname: '{sub}.paw.{ext}',\n        port: '{port}',\n        path: '/users/{userId}',\n        pathname: '/users/{userId}',\n        href: 'https://{sub}.paw.{ext}:{port}/users/{userId}'\n      }\n      const actual = __internals__.fixUrlObject(urlObject)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/URLComponent.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record, List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport { URLComponent, __internals__ } from '../URLComponent'\nimport Parameter from '../Parameter'\nimport Constraint from '../Constraint'\n\ndescribe('models/URLComponent.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ URLComponent }', () => {\n    it('should be a Record', () => {\n      const instance = new URLComponent()\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      it('should have a `componentName` field', () => {\n        const componentName = 'test'\n        const data = { componentName }\n\n        const instance = new URLComponent(data)\n\n        expect(instance.get('componentName')).toEqual(componentName)\n      })\n\n      it('should have a `string` field', () => {\n        const string = 'test'\n        const data = { string }\n\n        const instance = new URLComponent(data)\n\n        expect(instance.get('string')).toEqual(string)\n      })\n\n      it('should have a `parameter` field', () => {\n        const parameter = 'test'\n        const data = { parameter }\n\n        const instance = new URLComponent(data)\n\n        expect(instance.get('parameter')).toEqual(parameter)\n      })\n\n      it('should have a `variableDelimiters` field', () => {\n        const variableDelimiters = 'test'\n        const data = { variableDelimiters }\n\n        const instance = new URLComponent(data)\n\n        expect(instance.get('variableDelimiters')).toEqual(variableDelimiters)\n      })\n    })\n\n    describe('-methods', () => {\n      describe('@addConstraint', () => {\n        it('should call __internals__.addConstraintToURLComponent', () => {\n          const expected = 123141\n          spyOn(__internals__, 'addConstraintToURLComponent').andReturn(expected)\n\n          const component = new URLComponent()\n          const actual = component.addConstraint()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.addConstraintToURLComponent).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.addConstraintToURLComponent with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'addConstraintToURLComponent').andReturn(expected)\n\n          const component = new URLComponent()\n          const actual = component.addConstraint(true)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.addConstraintToURLComponent).toHaveBeenCalled(component, true)\n        })\n      })\n\n      describe('@generate', () => {\n        it('should call __internals__.generateURLComponent', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generateURLComponent').andReturn(expected)\n\n          const component = new URLComponent()\n          const actual = component.generate()\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generateURLComponent).toHaveBeenCalled()\n        })\n\n        it('should call __internals__.generateURLComponent with correct arguments', () => {\n          const expected = 123141\n          spyOn(__internals__, 'generateURLComponent').andReturn(expected)\n\n          const delimiters = List([ 1, 2 ])\n          const component = new URLComponent()\n          const actual = component.generate(delimiters, true)\n\n          expect(actual).toEqual(expected)\n          expect(__internals__.generateURLComponent).toHaveBeenCalled(component, delimiters, true)\n        })\n      })\n    })\n  })\n\n  describe('@convertSimpleStringToParameter', () => {\n    it('should return a Parameter', () => {\n      const actual = __internals__.convertSimpleStringToParameter()\n\n      expect(actual).toBeA(Parameter)\n    })\n\n    it('should return expected Parameter', () => {\n      const key = 'test'\n      const value = '42'\n\n      const expected = new Parameter({\n        key: 'test',\n        name: 'test',\n        default: '42',\n        type: 'string'\n      })\n      const actual = __internals__.convertSimpleStringToParameter(key, value)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@sectionMapper', () => {\n    it('should call convertSimpleStringToParameter', () => {\n      spyOn(__internals__, 'convertSimpleStringToParameter').andReturn(1234)\n\n      const section = '4321'\n      const index = 0\n      __internals__.sectionMapper(section, index)\n\n      expect(__internals__.convertSimpleStringToParameter).toHaveBeenCalled()\n    })\n\n    it('should set key to section only if index is odd', () => {\n      spyOn(__internals__, 'convertSimpleStringToParameter').andReturn(1234)\n\n      const section = '4321'\n\n      // random even index\n      let index = Math.floor(Math.random() * 2000) * 2\n      __internals__.sectionMapper(section, index)\n      expect(__internals__.convertSimpleStringToParameter).toHaveBeenCalledWith(null, section)\n\n      // random odd index\n      index = Math.floor(Math.random() * 2000) * 2 + 1\n      __internals__.sectionMapper(section, index)\n      expect(__internals__.convertSimpleStringToParameter).toHaveBeenCalledWith(section, section)\n    })\n  })\n\n  describe('@extractSectionsFromString', () => {\n    it('should work with no variables in string', () => {\n      const string = '/a/simple/path'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = [ string ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with variables in string', () => {\n      const string = '/a/{userId}/path/{pathId}'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = [ '/a/', 'userId', '/path/', 'pathId', '' ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with poorly formatted string', () => {\n      const string = '/a/we}ird/{path/'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = [ string ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should always start with a non-variable string', () => {\n      const string = '{userId}/path/{pathId}'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = [ '', 'userId', '/path/', 'pathId', '' ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with secondary delimiters', () => {\n      const string = '/{{userId}}/path/:pathId'\n      const delimiters = List([ '{{', '}}', ':' ])\n\n      const expected = [ '/', 'userId', '/path/', 'pathId' ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with secondary delimiters even if no primary variable', () => {\n      const string = '/users/path/:pathId'\n      const delimiters = List([ '{{', '}}', ':' ])\n\n      const expected = [ '/users/path/', 'pathId' ]\n      const actual = __internals__.extractSectionsFromString(string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertComplexStringToSequenceParameter', () => {\n    it('should return a SequenceParameter if path has variable', () => {\n      const key = 'pathname'\n      const string = '/a/simple/{path}'\n      const delimiters = List([ '{', '}' ])\n\n      const actual = __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(actual).toBeA(Parameter)\n      expect(actual.get('superType')).toEqual('sequence')\n    })\n\n    it('should return a standard parameter if path has no variable', () => {\n      const key = 'pathname'\n      const string = '/a/simple/path'\n      const delimiters = List([ '{', '}' ])\n\n      const actual = __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(actual).toBeA(Parameter)\n      expect(actual.get('superType')).toEqual(null)\n    })\n\n    it('should call extractSectionsFromString', () => {\n      spyOn(__internals__, 'extractSectionsFromString').andReturn([])\n\n      const key = 'pathname'\n      const string = '/a/simple/path'\n      const delimiters = List([ '{', '}' ])\n      __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(__internals__.extractSectionsFromString).toHaveBeenCalledWith(string, delimiters)\n    })\n\n    it('should call sectionMapper for each extracted section', () => {\n      spyOn(__internals__, 'extractSectionsFromString').andReturn([ '/a/', '{userId}', '/path' ])\n      spyOn(__internals__, 'sectionMapper').andReturn([])\n\n      const key = 'pathname'\n      const string = '/a/{userId}/path'\n      const delimiters = List([ '{', '}' ])\n      __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(__internals__.sectionMapper.calls.length).toEqual(3)\n    })\n\n    it('should work', () => {\n      const key = 'pathname'\n      const string = '/a/{userId}/path'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = new Parameter({\n        key: 'pathname',\n        name: 'pathname',\n        type: 'string',\n        superType: 'sequence',\n        value: List([\n          new Parameter({\n            type: 'string',\n            default: '/a/'\n          }),\n          new Parameter({\n            key: 'userId',\n            name: 'userId',\n            type: 'string',\n            default: 'userId'\n          }),\n          new Parameter({\n            type: 'string',\n            default: '/path'\n          })\n        ])\n      })\n\n      const actual = __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no variables', () => {\n      const key = 'pathname'\n      const string = '/a/simple/path'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = new Parameter({\n        key: 'pathname',\n        name: 'pathname',\n        type: 'string',\n        default: '/a/simple/path'\n      })\n\n      const actual = __internals__.convertComplexStringToSequenceParameter(key, string, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStringToParameter', () => {\n    it('should call convertSimpleStringToParameter if no delimiters', () => {\n      spyOn(__internals__, 'convertSimpleStringToParameter').andReturn(321)\n\n      const key = 'pathname'\n      const string = '/a/{userId}/path'\n      __internals__.convertStringToParameter(key, string)\n\n      expect(__internals__.convertSimpleStringToParameter).toHaveBeenCalledWith(key, string)\n    })\n\n    it('should call convertSimpleStringToParameter if delimiters', () => {\n      spyOn(__internals__, 'convertComplexStringToSequenceParameter').andReturn(321)\n\n      const key = 'pathname'\n      const string = '/a/{userId}/path'\n      const delimiters = List([ '%' ])\n      __internals__.convertStringToParameter(key, string, delimiters)\n\n      expect(__internals__.convertComplexStringToSequenceParameter).toHaveBeenCalledWith(\n        key,\n        string,\n        delimiters\n      )\n    })\n  })\n\n  describe('@addConstraintToURLComponent', () => {\n    it('should call convertStringToParameter if no parameter in component', () => {\n      const param = new Parameter({\n        key: 'someKey'\n      })\n      spyOn(__internals__, 'convertStringToParameter').andReturn(param)\n\n      const component = new URLComponent()\n      const constraint = new Constraint.Enum([ '123', '321' ])\n      __internals__.addConstraintToURLComponent(component, constraint)\n\n      expect(__internals__.convertStringToParameter).toHaveBeenCalled()\n    })\n\n    it('should add constraint to parameter', () => {\n      const param = new Parameter({\n        key: 'someKey'\n      })\n      const component = new URLComponent({\n        parameter: param\n      })\n      const constraint = new Constraint.Enum([ '123', '321' ])\n\n      const expected = new URLComponent({\n        parameter: new Parameter({\n          key: 'someKey',\n          constraints: List([ constraint ])\n        })\n      })\n      const actual = __internals__.addConstraintToURLComponent(component, constraint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addHandlesToVariable', () => {\n    it('should work with single delimiters', () => {\n      const variable = 'userId'\n      const delimiters = List([ '%' ])\n\n      const expected = '%userId%'\n      const actual = __internals__.addHandlesToVariable(variable, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with couple delimiters', () => {\n      const variable = 'userId'\n      const delimiters = List([ '{', '}' ])\n\n      const expected = '{userId}'\n      const actual = __internals__.addHandlesToVariable(variable, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addVarHandlesToVariablesInSequenceParameter', () => {\n    it('should call addHandlesToVariable for each variable', () => {\n      spyOn(__internals__, 'addHandlesToVariable').andReturn('handled')\n\n      const param = new Parameter({\n        type: 'string',\n        superType: 'sequence',\n        key: 'someKey',\n        name: 'someKey',\n        value: List([\n          new Parameter({ type: 'string', default: '/path/' }),\n          new Parameter({ key: 'pathId', name: 'pathId', type: 'string', default: 'pathId' }),\n          new Parameter({ type: 'string', default: '/users/' }),\n          new Parameter({ key: 'userId', name: 'userId', type: 'string', default: 'userId' }),\n          new Parameter({ type: 'string', default: '/path/' })\n        ])\n      })\n      const delimiters = List([ '{', '}' ])\n\n      __internals__.addVarHandlesToVariablesInSequenceParameter(param, delimiters)\n\n      expect(__internals__.addHandlesToVariable.calls.length).toEqual(2)\n      expect(__internals__.addHandlesToVariable.calls[0].arguments).toEqual([\n        'pathId', delimiters\n      ])\n      expect(__internals__.addHandlesToVariable.calls[1].arguments).toEqual([\n        'userId', delimiters\n      ])\n    })\n\n    it('should work', () => {\n      const param = new Parameter({\n        type: 'string',\n        superType: 'sequence',\n        key: 'someKey',\n        name: 'someKey',\n        value: List([\n          new Parameter({ type: 'string', default: '/path/' }),\n          new Parameter({ key: 'pathId', name: 'pathId', type: 'string', default: 'pathId' }),\n          new Parameter({ type: 'string', default: '/users/' }),\n          new Parameter({ key: 'userId', name: 'userId', type: 'string', default: 'userId' }),\n          new Parameter({ type: 'string', default: '/path/' })\n        ])\n      })\n      const delimiters = List([ '{', '}' ])\n\n      const expected = new Parameter({\n        type: 'string',\n        superType: 'sequence',\n        key: 'someKey',\n        name: 'someKey',\n        value: List([\n          new Parameter({ type: 'string', default: '/path/' }),\n          new Parameter({ key: 'pathId', name: 'pathId', type: 'string', default: '{pathId}' }),\n          new Parameter({ type: 'string', default: '/users/' }),\n          new Parameter({ key: 'userId', name: 'userId', type: 'string', default: '{userId}' }),\n          new Parameter({ type: 'string', default: '/path/' })\n        ])\n      })\n      const actual = __internals__.addVarHandlesToVariablesInSequenceParameter(param, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@generateURLComponent', () => {\n    it('should call addVarHandles... if param is sequence and variableDelimiters exists', () => {\n      const parameter = new Parameter({\n        type: 'string',\n        superType: 'sequence'\n      })\n\n      spyOn(parameter, 'generate').andReturn('some/string/')\n      spyOn(__internals__, 'addVarHandlesToVariablesInSequenceParameter').andReturn(parameter)\n\n      const variableDelimiters = List([ '%' ])\n      const urlComponent = new URLComponent({ parameter })\n\n      __internals__.generateURLComponent(urlComponent, variableDelimiters)\n\n      expect(__internals__.addVarHandlesToVariablesInSequenceParameter).toHaveBeenCalled()\n    })\n\n    it('should not call addVarHandles... if param is not sequence', () => {\n      const parameter = new Parameter({\n        type: 'string'\n      })\n\n      spyOn(parameter, 'generate').andReturn('some/string/')\n      spyOn(__internals__, 'addVarHandlesToVariablesInSequenceParameter').andReturn(parameter)\n\n      const variableDelimiters = List([ '%' ])\n      const urlComponent = new URLComponent({ parameter })\n\n      __internals__.generateURLComponent(urlComponent, variableDelimiters)\n\n      expect(__internals__.addVarHandlesToVariablesInSequenceParameter).toNotHaveBeenCalled()\n    })\n\n    it('should not call addVarHandles... if no variableDelimiters', () => {\n      const parameter = new Parameter({\n        type: 'string',\n        superType: 'sequence'\n      })\n\n      spyOn(parameter, 'generate').andReturn('some/string/')\n      spyOn(__internals__, 'addVarHandlesToVariablesInSequenceParameter').andReturn(parameter)\n\n      const urlComponent = new URLComponent({ parameter })\n\n      __internals__.generateURLComponent(urlComponent)\n\n      expect(__internals__.addVarHandlesToVariablesInSequenceParameter).toNotHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const parameter = new Parameter({\n        type: 'string',\n        superType: 'sequence',\n        value: List([\n          new Parameter({\n            type: 'string', default: '/users/'\n          }),\n          new Parameter({\n            key: 'userId', name: 'userId',\n            type: 'string', default: 'userId'\n          }),\n          new Parameter({\n            type: 'string', default: ''\n          })\n        ])\n      })\n\n      const urlComponent = new URLComponent({ parameter })\n      const delimiters = List([ '{{', '}}' ])\n\n      const expected = '/users/{{userId}}'\n      const actual = __internals__.generateURLComponent(urlComponent, delimiters)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/__tests__/Variable.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect from 'expect'\n\nimport Variable from '../Variable'\n\ndescribe('models/Variable.js', () => {\n  describe('{ Variable }', () => {\n    describe('#fields', () => {\n      const fields = [\n        'name',\n        'values',\n        'defaultEnvironment'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new Variable(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/AWSSig4.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the AWSSig4Auth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'aws-sig-4.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the AWSSig4Auth Record.\n */\nconst AWSSig4AuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  key: null,\n  secret: null,\n  region: null,\n  service: null\n}\n\n/**\n * The AWSSig4Auth Record\n */\nexport class AWSSig4Auth extends Record(AWSSig4AuthSpec) { }\nexport default AWSSig4Auth\n"
  },
  {
    "path": "src/models/auths/ApiKey.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the ApiKeyAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'api-key.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the ApiKeyAuth Record.\n */\nconst ApiKeyAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  name: null,\n  in: null,\n  key: null\n}\n\n/**\n * The ApiKeyAuth Record\n */\nexport class ApiKeyAuth extends Record(ApiKeyAuthSpec) { }\nexport default ApiKeyAuth\n"
  },
  {
    "path": "src/models/auths/Basic.js",
    "content": "import { OrderedMap, Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the BasicAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'basic.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the BasicAuth Record.\n */\nconst BasicAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  username: null,\n  password: null,\n  raw: null,\n  interfaces: OrderedMap()\n}\n\n/**\n * The BasicAuth Record\n */\nexport class BasicAuth extends Record(BasicAuthSpec) { }\nexport default BasicAuth\n"
  },
  {
    "path": "src/models/auths/Custom.js",
    "content": "import { OrderedMap, Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the BasicAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'custom.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the BasicAuth Record.\n */\nconst CustomAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  setup: null,\n  interfaces: OrderedMap()\n}\n\n/**\n * The BasicAuth Record\n */\nexport class CustomAuth extends Record(CustomAuthSpec) { }\nexport default CustomAuth\n"
  },
  {
    "path": "src/models/auths/Digest.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the DigestAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'digest.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the DigestAuth Record.\n */\nconst DigestAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  username: null,\n  password: null\n}\n\n/**\n * The DigestAuth Record\n */\nexport class DigestAuth extends Record(DigestAuthSpec) { }\nexport default DigestAuth\n"
  },
  {
    "path": "src/models/auths/Hawk.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the HawkAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'hawk.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the HawkAuth Record.\n */\nconst HawkAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  id: null,\n  key: null,\n  algorithm: null\n}\n\n/**\n * The HawkAuth Record\n */\nexport class HawkAuth extends Record(HawkAuthSpec) { }\nexport default HawkAuth\n"
  },
  {
    "path": "src/models/auths/NTLM.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the NTLMAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'ntlm.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the NTLMAuth Record.\n */\nconst NTLMAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  username: null,\n  password: null\n}\n\n/**\n * The NTLMAuth Record\n */\nexport class NTLMAuth extends Record(NTLMAuthSpec) { }\nexport default NTLMAuth\n"
  },
  {
    "path": "src/models/auths/Negotiate.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the NegotiateAuth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'negotiate.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the NegotiateAuth Record.\n */\nconst NegotiateAuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  username: null,\n  password: null\n}\n\n/**\n * The NegotiateAuth Record\n */\nexport class NegotiateAuth extends Record(NegotiateAuthSpec) { }\nexport default NegotiateAuth\n"
  },
  {
    "path": "src/models/auths/OAuth1.js",
    "content": "import { Record } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the OAuth1Auth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'oauth-1.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the OAuth1Auth Record.\n */\nconst OAuth1AuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  callback: null,\n  consumerSecret: null,\n  tokenSecret: null,\n  consumerKey: null,\n  algorithm: null,\n  nonce: null,\n  additionalParameters: null,\n  timestamp: null,\n  token: null,\n  version: null,\n  signature: null,\n  tokenCredentialsUri: null,\n  requestTokenUri: null,\n  authorizationUri: null\n}\n\n/**\n * The OAuth1Auth Record\n */\nexport class OAuth1Auth extends Record(OAuth1AuthSpec) { }\nexport default OAuth1Auth\n"
  },
  {
    "path": "src/models/auths/OAuth2.js",
    "content": "import { Record, List } from 'immutable'\n\nimport Model from '../ModelInfo'\n\n/**\n * Metadata about the OAuth2Auth Record.\n * Used for internal serialization and deserialization\n */\nconst modelInstance = {\n  name: 'oauth-2.auth.models',\n  version: '0.1.0'\n}\nconst model = new Model(modelInstance)\n\n/**\n * Default Spec for the OAuth2Auth Record.\n * flowMap: {\n *    'accessCode': 'authorization_code',\n *    'implicit': 'implicit',\n *    'application': 'client_credentials',\n *    'password': 'password' or 'resource_owner'\n * }\n *\n *\n */\nconst OAuth2AuthSpec = {\n  _model: model,\n  description: null,\n  authName: null,\n  flow: null,\n  authorizationUrl: null,\n  tokenUrl: null,\n  scopes: List()\n}\n\n/**\n * The OAuth2Auth Record\n */\nexport class OAuth2Auth extends Record(OAuth2AuthSpec) { }\nexport default OAuth2Auth\n"
  },
  {
    "path": "src/models/auths/__tests__/AWSSig4.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { AWSSig4Auth } from '../AWSSig4'\n\ndescribe('models/auths/AWSSig4Auth.js', () => {\n  describe('{ AWSSig4Auth }', () => {\n    it('should be a Record', () => {\n      const instance = new AWSSig4Auth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'key',\n        'secret',\n        'region',\n        'service'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new AWSSig4Auth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/ApiKey.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { ApiKeyAuth } from '../ApiKey'\n\ndescribe('models/auths/ApiKeyAuth.js', () => {\n  describe('{ ApiKeyAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new ApiKeyAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'name',\n        'in',\n        'key'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new ApiKeyAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/Basic.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { BasicAuth } from '../Basic'\n\ndescribe('models/auths/BasicAuth.js', () => {\n  describe('{ BasicAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new BasicAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'username',\n        'password',\n        'raw'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new BasicAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/Custom.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { CustomAuth } from '../Custom'\n\ndescribe('models/auths/CustomAuth.js', () => {\n  describe('{ CustomAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new CustomAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'setup'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new CustomAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/Digest.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { DigestAuth } from '../Digest'\n\ndescribe('models/auths/DigestAuth.js', () => {\n  describe('{ DigestAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new DigestAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'username',\n        'password'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new DigestAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/Hawk.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { HawkAuth } from '../Hawk'\n\ndescribe('models/auths/HawkAuth.js', () => {\n  describe('{ HawkAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new HawkAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'id',\n        'key',\n        'algorithm'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new HawkAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/NTLM.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { NTLMAuth } from '../NTLM'\n\ndescribe('models/auths/NTLMAuth.js', () => {\n  describe('{ NTLMAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new NTLMAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'username',\n        'password'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new NTLMAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/Negotiate.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { NegotiateAuth } from '../Negotiate'\n\ndescribe('models/auths/NegotiateAuth.js', () => {\n  describe('{ NegotiateAuth }', () => {\n    it('should be a Record', () => {\n      const instance = new NegotiateAuth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'username',\n        'password'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new NegotiateAuth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/OAuth1.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { OAuth1Auth } from '../OAuth1'\n\ndescribe('models/auths/OAuth1Auth.js', () => {\n  describe('{ OAuth1Auth }', () => {\n    it('should be a Record', () => {\n      const instance = new OAuth1Auth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'callback',\n        'consumerSecret',\n        'tokenSecret',\n        'consumerKey',\n        'algorithm',\n        'nonce',\n        'additionalParameters',\n        'timestamp',\n        'token',\n        'version',\n        'signature',\n        'tokenCredentialsUri',\n        'requestTokenUri',\n        'authorizationUri'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new OAuth1Auth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/models/auths/__tests__/OAuth2.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { Record } from 'immutable'\nimport expect from 'expect'\n\nimport { OAuth2Auth } from '../OAuth2'\n\ndescribe('models/auths/OAuth2Auth.js', () => {\n  describe('{ OAuth2Auth }', () => {\n    it('should be a Record', () => {\n      const instance = new OAuth2Auth({})\n\n      expect(instance).toBeA(Record)\n    })\n\n    describe('#fields', () => {\n      const fields = [\n        'description',\n        'authName',\n        'flow',\n        'authorizationUrl',\n        'tokenUrl',\n        'scopes'\n      ]\n\n      for (const field of fields) {\n        it('should have a `' + field + '` field', () => {\n          const key = field\n          const value = 'test'\n          const data = {}\n\n          data[key] = value\n          const instance = new OAuth2Auth(data)\n\n          expect(instance.get(key)).toEqual(value)\n        })\n      }\n    })\n  })\n})\n"
  },
  {
    "path": "src/parsers/README.md",
    "content": ""
  },
  {
    "path": "src/parsers/dummy/Parser.js",
    "content": "import { OrderedMap, List } from 'immutable'\n\nimport Api from '../../models/Api'\nimport Store from '../../models/Store'\nimport Constraint from '../../models/Constraint'\nimport Parameter from '../../models/Parameter'\nimport Auth from '../../models/Auth'\nimport URL from '../../models/URL'\nimport Info from '../../models/Info'\nimport Variable from '../../models/Variable'\nimport Reference from '../../models/Reference'\nimport Resource from '../../models/Resource'\nimport Request from '../../models/Request'\nimport ParameterContainer from '../../models/ParameterContainer'\nimport Context from '../../models/Context'\nimport Group from '../../models/Group'\n\nimport { genUuid } from '../../utils/gen-utils'\n\nconst methods = {\n  genUuid\n}\n\nexport const __meta__ = {\n  version: 'v0.0',\n  format: 'dummy'\n}\n\n/**\n * a DummyParser. It contains a static Api Record.\n */\nexport class DummyParser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(content) {\n    return methods.detect(content)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(content) {\n    return methods.getAPIName(content)\n  }\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {Object} item: the content of the file to evaluate\n   * @returns {boolean} true if parsable, false otherwise\n   */\n  static isParsable(item) {\n    return methods.isParsable(item)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse() {\n    return methods.parse(...arguments)\n  }\n}\n\nmethods.detect = () => {\n  return 0\n}\n\nmethods.getAPIName = () => {\n  return null\n}\n\nmethods.isParsable = ({ file }) => {\n  if (file) {\n    const name = file.name || ''\n    return name.split('.').slice(-1)[0] === 'dummy' ? true : false\n  }\n\n  return false\n}\n\nmethods.resolve = (items, item) => {\n  items.push(item)\n  return items\n}\n\nmethods.createStore = () => {\n  return new Store({\n    constraint: new OrderedMap({\n      User: new Constraint.JSONSchema({\n        type: 'object',\n        properties: {\n          userId: {\n            type: 'string',\n            pattern: '^[0-9a-f]{16}$'\n          },\n          pets: {\n            type: 'array',\n            items: {\n              $ref: '#/definitions/Pet'\n            }\n          }\n        },\n        required: [ 'userId', 'pets' ]\n      }),\n      Pet: new Constraint.JSONSchema({\n        type: 'object',\n        properties: {\n          petId: {\n            type: 'integer',\n            minimum: 0,\n            maximum: 1024\n          },\n          name: { type: 'string' },\n          owner: {\n            $ref: '#/definitions/User'\n          }\n        },\n        required: [ 'petId', 'name' ]\n      })\n    }),\n    endpoint: new OrderedMap({\n      server1: new URL({\n        url: 'https://echo.paw.cloud/server1'\n      }).set('protocol', List([ 'https:', 'http:' ])),\n      server2: new URL({\n        url: 'https://echo.paw.cloud/server2'\n      })\n    }),\n    parameter: new OrderedMap({\n      token: new Parameter({\n        key: 'Token',\n        type: 'integer',\n        constraints: List([\n          new Constraint.Enum([ 'token_1', 'token_2' ])\n        ])\n      }),\n      offset: new Parameter({\n        key: 'offset',\n        type: 'integer',\n        description: 'the offset from which to start searching'\n      })\n    }),\n    auth: new OrderedMap({\n      basic_auth: new Auth.Basic({\n        username: 'johnsmith'\n      })\n    }),\n    variable: new OrderedMap({\n      contentType: new Variable({\n        values: new OrderedMap({\n          'json-env': 'application/json',\n          'xml-env': 'application/xml'\n        })\n      })\n    })\n  })\n}\n\nmethods.createInfo = () => {\n  return new Info({\n    title: 'Dummy Api'\n  })\n}\n\nmethods.createResources = () => {\n  return new OrderedMap({\n    '/pets': new Resource({\n      path: new URL({\n        url: '/pets'\n      }),\n      methods: new OrderedMap({\n        get: new Request({\n          name: 'getPets',\n          description: 'gets the list of pets',\n          method: 'get',\n          endpoints: new OrderedMap({\n            server1: new Reference({\n              type: 'endpoint',\n              uuid: 'server1'\n            }),\n            server3: new URL({\n              url: 'https://echo.paw.cloud/server3'\n            })\n          }),\n          auths: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'basic_auth'\n            })\n          ]),\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              '1234': new Parameter({\n                uuid: '1234',\n                key: 'Accept',\n                type: 'string',\n                default: 'application/json',\n                constraints: List([\n                  new Constraint.Enum([\n                    'application/json',\n                    'application/xml'\n                  ])\n                ])\n              }),\n              '4321': new Reference({\n                type: 'parameter',\n                uuid: 'token'\n              })\n            }),\n            queries: new OrderedMap({\n              '2345': new Parameter({\n                uuid: '2345',\n                key: 'limit',\n                type: 'integer',\n                description: 'the number of pets to return with this query. if this is set to 0, ' +\n                  'it returns all pets.',\n                default: 100,\n                constraints: List([\n                  new Constraint.Minimum(0)\n                ])\n              }),\n              '5432': new Reference({\n                type: 'parameter',\n                uuid: 'offset'\n              })\n            })\n          })\n        }),\n        post: new Request({\n          name: 'createPet',\n          description: 'adds a Pet',\n          method: 'post',\n          endpoints: new OrderedMap({\n            server1: new Reference({\n              type: 'endpoint',\n              uuid: 'server1'\n            })\n          }),\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              '1234': new Parameter({\n                uuid: '1234',\n                key: 'Accept',\n                type: 'string',\n                default: 'application/json',\n                constraints: List([\n                  new Constraint.Enum([\n                    'application/json',\n                    'application/xml'\n                  ])\n                ])\n              }),\n              '4321': new Reference({\n                type: 'parameter',\n                uuid: 'token'\n              }),\n              '567': new Parameter({\n                uuid: '1234',\n                key: 'Content-Type',\n                type: 'string',\n                default: 'application/json',\n                constraints: List([\n                  new Constraint.Enum([\n                    'application/json',\n                    'application/xml'\n                  ])\n                ])\n              })\n            }),\n            body: new OrderedMap({\n              '765': new Parameter({\n                uuid: '765',\n                key: null,\n                in: 'body',\n                constraints: List([\n                  new Constraint.JSONSchema({\n                    type: 'object',\n                    properties: {\n                      name: {\n                        type: 'string'\n                      }\n                    }\n                  })\n                ])\n              })\n            })\n          })\n        })\n      })\n    }),\n    '/pets/{petId}': new Resource({\n      path: new URL({\n        url: '/pets/{petId}',\n        variableDelimiters: List([ '{', '}' ])\n      }),\n      methods: new OrderedMap({\n        get: new Request({\n          name: 'getPet',\n          description: 'gets a pet given a petId',\n          method: 'get',\n          endpoints: new OrderedMap({\n            server2: new Reference({\n              type: 'endpoint',\n              uuid: 'server2'\n            })\n          }),\n          auths: List([\n            new Auth.Basic({\n              username: 'user',\n              password: 'pass'\n            })\n          ])\n        }),\n        post: new Request({\n          name: 'updatePet',\n          description: 'updates the pet with given petId',\n          method: 'post',\n          endpoints: OrderedMap({\n            server3: new URL({\n              url: 'https://echo.paw.cloud/server3'\n            })\n          }),\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              '456': new Parameter({\n                uuid: '456',\n                key: 'Content-Type',\n                description: 'the MIME type of the body of this request',\n                default: 'application/x-www-form-urlencoded',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    type: 'string',\n                    constraints: List([\n                      new Constraint.Enum([ 'application/x-www-form-urlencoded' ])\n                    ])\n                  })\n                ])\n              }),\n              '654': new Parameter({\n                uuid: '654',\n                key: 'Content-Type',\n                description: 'the MIME type of the body of this request',\n                default: 'multipart/form-data',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    type: 'string',\n                    constraints: List([\n                      new Constraint.Enum([ 'multipart/form-data' ])\n                    ])\n                  })\n                ])\n              })\n            }),\n            body: OrderedMap({\n              '345': new Parameter({\n                uuid: '345',\n                key: 'ownerId',\n                in: 'body',\n                description: 'the id of the owner',\n                type: 'string',\n                constraints: List([ new Constraint.Pattern('^[0-9a-f]{15}$') ]),\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    type: 'string',\n                    constraints: List([\n                      new Constraint.Enum([\n                        'application/x-www-form-urlencoded',\n                        'multipart/form-data'\n                      ])\n                    ])\n                  })\n                ])\n              }),\n              '543': new Parameter({\n                uuid: '543',\n                key: 'name',\n                in: 'body',\n                description: 'the name of the pet',\n                type: 'string',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    type: 'string',\n                    constraints: List([\n                      new Constraint.Enum([\n                        'application/x-www-form-urlencoded',\n                        'multipart/form-data'\n                      ])\n                    ])\n                  })\n                ])\n              })\n            })\n          }),\n          contexts: new List([\n            new Context({\n              constraints: List([\n                new Parameter({\n                  key: 'Content-Type',\n                  in: 'headers',\n                  type: 'string',\n                  default: 'application/x-www-form-urlencoded'\n                })\n              ])\n            }),\n            new Context({\n              constraints: List([\n                new Parameter({\n                  key: 'Content-Type',\n                  in: 'headers',\n                  type: 'string',\n                  default: 'multipart/form-data'\n                })\n              ])\n            })\n          ])\n        })\n      })\n    })\n  })\n}\n\nmethods.createGroup = () => {\n  return new Group({\n    name: 'Root Group',\n    children: OrderedMap({\n      '/pets': '/pets',\n      nested: new Group({\n        name: 'Nested Group',\n        children: OrderedMap({\n          '/pets/{petId}': '/pets/{petId}'\n        })\n      })\n    })\n  })\n}\n\nmethods.parse = () => {\n  const info = methods.createInfo()\n  const store = methods.createStore()\n  const resources = methods.createResources()\n  const group = methods.createGroup()\n\n  return new Api({\n    info,\n    store,\n    resources,\n    group\n  })\n}\n\nexport const __internals__ = methods\nexport default DummyParser\n"
  },
  {
    "path": "src/parsers/internal/Parser.js",
    "content": "import { OrderedMap, List } from 'immutable'\n\nimport ModelInfo from '../../models/ModelInfo'\nimport Api from '../../models/Api'\nimport Auth from '../../models/Auth'\nimport Constraint from '../../models/Constraint'\nimport Contact from '../../models/Contact'\nimport Context from '../../models/Context'\nimport Group from '../../models/Group'\nimport Info from '../../models/Info'\nimport Interface from '../../models/Interface'\nimport License from '../../models/License'\nimport Parameter from '../../models/Parameter'\nimport ParameterContainer from '../../models/ParameterContainer'\nimport Reference from '../../models/Reference'\nimport Request from '../../models/Request'\nimport Resource from '../../models/Resource'\nimport Response from '../../models/Response'\nimport Store from '../../models/Store'\nimport URL from '../../models/URL'\nimport URLComponent from '../../models/URLComponent'\nimport Variable from '../../models/Variable'\n\nimport { entries, convertEntryListInMap } from '../../utils/fp-utils'\n\nconst methods = {}\n\nexport const __meta__ = {\n  version: 'v1.0',\n  format: 'internal'\n}\n\n/**\n * A Parser that converts a dump of an Api Record into an actual Api Record\n */\nclass InternalParser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(...args) {\n    return methods.detect(...args)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(...args) {\n    return methods.getAPIName(...args)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse(...args) {\n    return methods.parse(...args)\n  }\n}\n\nmethods.detect = () => {}\n\nmethods.getAPIName = () => {}\n\nmethods.isParsable = () => {}\n\nmethods.extractBasicAuth = (obj) => {\n  return new Auth.Basic(obj)\n}\n\nmethods.extractCustomAuth = (obj) => {\n  return new Auth.Custom(obj)\n}\n\nmethods.extractDigestAuth = (obj) => {\n  return new Auth.Digest(obj)\n}\n\nmethods.extractNTLMAuth = (obj) => {\n  return new Auth.NTLM(obj)\n}\n\nmethods.extractNegotiateAuth = (obj) => {\n  return new Auth.Negotiate(obj)\n}\n\nmethods.extractApiKeyAuth = (obj) => {\n  return new Auth.ApiKey(obj)\n}\n\nmethods.extractOAuth1Auth = (obj) => {\n  return new Auth.OAuth1(obj)\n}\n\nmethods.extractOAuth2Auth = (_obj) => {\n  const obj = _obj\n\n  if (obj.scopes) {\n    obj.scopes = List(obj.scopes)\n  }\n\n  return new Auth.OAuth2(obj)\n}\n\nmethods.extractAWSSig4Auth = (obj) => {\n  return new Auth.AWSSig4Auth(obj)\n}\n\nmethods.extractHawkAuth = (obj) => {\n  return new Auth.Hawk(obj)\n}\n\nmethods.extractConstraint = (obj) => {\n  return new Constraint.Constraint(obj)\n}\n\nmethods.extractMultipleOfConstraint = (obj) => {\n  return new Constraint.MultipleOf(obj.value)\n}\n\nmethods.extractMaximumConstraint = (obj) => {\n  return new Constraint.Maximum(obj.value)\n}\n\nmethods.extractExclusiveMaximumConstraint = (obj) => {\n  return new Constraint.ExclusiveMaximum(obj.value)\n}\n\nmethods.extractMinimumConstraint = (obj) => {\n  return new Constraint.Minimum(obj.value)\n}\n\nmethods.extractExclusiveMinimumConstraint = (obj) => {\n  return new Constraint.ExclusiveMinimum(obj.value)\n}\n\nmethods.extractMaximumLengthConstraint = (obj) => {\n  return new Constraint.MaximumLength(obj.value)\n}\n\nmethods.extractMinimumLengthConstraint = (obj) => {\n  return new Constraint.MinimumLength(obj.value)\n}\n\nmethods.extractPatternConstraint = (obj) => {\n  return new Constraint.Pattern(obj.value)\n}\n\nmethods.extractMaximumItemsConstraint = (obj) => {\n  return new Constraint.MaximumItems(obj.value)\n}\n\nmethods.extractMinimumItemsConstraint = (obj) => {\n  return new Constraint.MinimumItems(obj.value)\n}\n\nmethods.extractUniqueItemsConstraint = (obj) => {\n  return new Constraint.UniqueItems(obj.value)\n}\n\nmethods.extractMaximumPropertiesConstraint = (obj) => {\n  return new Constraint.MaximumProperties(obj.value)\n}\n\nmethods.extractMinimumPropertiesConstraint = (obj) => {\n  return new Constraint.MinimumProperties(obj.value)\n}\n\nmethods.extractEnumConstraint = (obj) => {\n  return new Constraint.Enum(obj.value)\n}\n\nmethods.extractJSONSchemaConstraint = (obj) => {\n  return new Constraint.JSONSchema(obj.value)\n}\n\nmethods.extractXMLSchemaConstraint = (obj) => {\n  return new Constraint.XMLSchema(obj.value)\n}\n\nmethods.extractContact = (obj) => {\n  return new Contact(obj)\n}\n\nmethods.extractContext = (obj) => {\n  const type = obj.type\n  const constraints = List(obj.constraints || []).map(methods.extract)\n  const itfs = OrderedMap(obj.implements || {}).map(methods.extract)\n\n  const contextInstance = {\n    constraints,\n    type,\n    implements: itfs\n  }\n\n  return new Context(contextInstance)\n}\n\nmethods.extractGroup = (obj) => {\n  const { id, name, description } = obj || {}\n  const children = OrderedMap(obj.children || {}).map(methods.extract)\n\n  const groupInstance = {\n    id: id,\n    name: name,\n    description: description,\n    children: children\n  }\n\n  return new Group(groupInstance)\n}\n\nmethods.extractInfo = (obj) => {\n  const { title, description, tos, version } = obj || {}\n  const contact = methods.extract(obj.contact)\n  const license = methods.extract(obj.license)\n\n  const infoInstance = {\n    title,\n    description,\n    tos,\n    contact,\n    license,\n    version\n  }\n\n  return new Info(infoInstance)\n}\n\nmethods.extractInterface = (obj) => {\n  const { name, uuid, level, required, description } = obj || {}\n  const underlay = methods.extract(obj.underlay)\n\n  const interfaceInstance = {\n    name, uuid, level, required, description, underlay\n  }\n\n  return new Interface(interfaceInstance)\n}\n\nmethods.extractLicense = (obj) => {\n  return new License(obj)\n}\n\n/* eslint-disable max-statements */\nmethods.extractParameter = (obj) => {\n  const { usedIn, uuid, key, name, description, type, format, required, superType } = obj || {}\n  const location = obj.in\n  const defaultValue = obj.default\n\n  const examples = List(obj.examples || [])\n  const constraints = List(obj.constraints || []).map(methods.extract)\n  const applicableContexts = List(obj.applicableContexts || []).map(methods.extract)\n  const interfaces = OrderedMap(obj.interfaces || {}).map(methods.extract)\n\n  let value = obj.value\n  if (superType === 'sequence') {\n    value = List(obj.value || []).map(methods.extract)\n  }\n\n  if (type === 'array') {\n    if (Array.isArray(value)) {\n      value = List(obj.value || []).map(methods.extract)\n    }\n    else {\n      value = methods.extract(obj.value)\n    }\n  }\n\n  return new Parameter({\n    in: location,\n    default: defaultValue,\n    usedIn, uuid, key, name, description, type, format, required, superType,\n    examples, constraints, applicableContexts, interfaces, value\n  })\n}\n/* eslint-enable max-statements */\n\nmethods.extractParameterContainer = (obj) => {\n  const headers = OrderedMap(obj.headers).map(methods.extract)\n  const queries = OrderedMap(obj.queries).map(methods.extract)\n  const body = OrderedMap(obj.body).map(methods.extract)\n  const path = OrderedMap(obj.path).map(methods.extract)\n\n  const parameterContainerInstance = {\n    headers, queries, body, path\n  }\n\n  return new ParameterContainer(parameterContainerInstance)\n}\n\nmethods.extractReference = (obj) => {\n  const { type, uuid } = obj || {}\n  const overlay = methods.extract(obj.overlay)\n\n  const referenceInstance = { type, uuid, overlay }\n\n  return new Reference(referenceInstance)\n}\n\nmethods.extractRequest = (obj) => {\n  const { id, name, description, method, timeout } = obj || {}\n  const endpoints = OrderedMap(obj.endpoints || {}).map(methods.extract)\n  const parameters = methods.extract(obj.parameters)\n  const contexts = List(obj.contexts || []).map(methods.extract)\n  const auths = List(obj.auths || []).map(methods.extract)\n  const responses = OrderedMap(obj.responses || {}).map(methods.extract)\n  const tags = List(obj.tags || [])\n  const interfaces = OrderedMap(obj.interfaces || {}).map(methods.extract)\n\n  const requestInstance = {\n    id, name, description, method, timeout,\n    endpoints, parameters, contexts, auths, responses, tags, interfaces\n  }\n\n  return new Request(requestInstance)\n}\n\nmethods.extractResource = (obj) => {\n  const { name, uuid, description } = obj || {}\n  const endpoints = OrderedMap(obj.endpoints || {}).map(methods.extract)\n  const path = methods.extract(obj.path)\n  const $methods = OrderedMap(obj.methods || {}).map(methods.extract)\n  const interfaces = OrderedMap(obj.interfaces || {}).map(methods.extract)\n\n  const resourceInstance = {\n    name, uuid, description, endpoints, path,\n    methods: $methods,\n    interfaces\n  }\n\n  return new Resource(resourceInstance)\n}\n\nmethods.extractResponse = (obj) => {\n  const { code, description, examples } = obj || {}\n  const parameters = methods.extract(obj.parameters)\n  const contexts = List(obj.contexts || []).map(methods.extract)\n  const interfaces = OrderedMap(obj.interfaces || {}).map(methods.extract)\n\n  const responseInstance = {\n    code, description, examples, parameters, contexts, interfaces\n  }\n\n  return new Response(responseInstance)\n}\n\nmethods.extractStore = (obj) => {\n  const variable = OrderedMap(obj.variable || {}).map(methods.extract)\n  const constraint = OrderedMap(obj.constraint || {}).map(methods.extract)\n  const endpoint = OrderedMap(obj.endpoint || {}).map(methods.extract)\n  const parameter = OrderedMap(obj.parameter || {}).map(methods.extract)\n  const response = OrderedMap(obj.response || {}).map(methods.extract)\n  const auth = OrderedMap(obj.auth || {}).map(methods.extract)\n  const $interface = OrderedMap(obj.interface || {}).map(methods.extract)\n\n  const storeInstance = {\n    variable, constraint, endpoint, parameter, response, auth, interface: $interface\n  }\n\n  return new Store(storeInstance)\n}\n\nmethods.extractURL = (obj) => {\n  const {\n    uuid, slashes, auth, host, path, search, query, hash, secure, description, href\n  } = obj || {}\n  const protocol = List(obj.protocol || [])\n  const port = methods.extract(obj.port)\n  const hostname = methods.extract(obj.hostname)\n  const pathname = methods.extract(obj.pathname)\n  const variableDelimiters = List(obj.variableDelimiters || [])\n\n  const urlInstance = {\n    uuid,\n    protocol, slashes, auth, host, port, hostname, path, pathname, href,\n    search, query, hash, secure,\n    variableDelimiters, description\n  }\n\n  return new URL().merge(urlInstance)\n}\n\nmethods.extractURLComponent = (obj) => {\n  const { componentName, string } = obj || {}\n  const parameter = methods.extract(obj.parameter)\n  const variableDelimiters = List(obj.variableDelimiters || [])\n\n  const urlComponentInstance = { componentName, string, parameter, variableDelimiters }\n\n  return new URLComponent(urlComponentInstance)\n}\n\nmethods.extractVariable = (obj) => {\n  const { name, defaultEnvironment } = obj || {}\n  const values = OrderedMap(obj.values || {})\n\n  const variableInstance = { name, values, defaultEnvironment }\n\n  return new Variable(variableInstance)\n}\n\nmethods.extractApi = (obj) => {\n  const resources = entries(obj.resources || {})\n      .map(methods.extract)\n      .reduce(convertEntryListInMap, {})\n  const group = methods.extract(obj.group)\n  const store = methods.extract(obj.store)\n  const info = methods.extract(obj.info)\n\n  const apiInstance = {\n    resources: OrderedMap(resources),\n    group: group,\n    store: store,\n    info: info\n  }\n\n  return new Api(apiInstance)\n}\n\nmethods.traverse = (_obj) => {\n  let obj = _obj\n  if (!obj) {\n    return obj\n  }\n\n  if (typeof obj === 'object') {\n    const keys = Object.keys(obj || {})\n    for (const key of keys) {\n      obj[key] = methods.extract(obj[key])\n    }\n  }\n\n  if (Array.isArray(obj)) {\n    obj = obj.map(item => methods.extract(item))\n  }\n\n  return obj\n}\n\nconst classMap = {\n  'api.core.models': methods.extractApi,\n  'basic.auth.models': methods.extractBasicAuth,\n  'custom.auth.models': methods.extractCustomAuth,\n  'digest.auth.models': methods.extractDigestAuth,\n  'ntlm.auth.models': methods.extractNTLMAuth,\n  'negotiate.auth.models': methods.extractNegotiateAuth,\n  'api-key.auth.models': methods.extractApiKeyAuth,\n  'oauth-1.auth.models': methods.extractOAuth1Auth,\n  'oauth-2.auth.models': methods.extractOAuth2Auth,\n  'aws-sig-4.auth.models': methods.extractAWSSig4Auth,\n  'hawk.auth.models': methods.extractHawkAuth,\n  'constraint.constraint.models': methods.extractConstraint,\n  'multiple-of.constraint.models': methods.extractMultipleOfConstraint,\n  'maximum.constraint.models': methods.extractMaximumConstraint,\n  'exclusive-maximum.constraint.models': methods.extractExclusiveMaximumConstraint,\n  'minimum.constraint.models': methods.extractMinimumConstraint,\n  'exclusive-minimum.constraint.models': methods.extractExclusiveMinimumConstraint,\n  'maximum-length.constraint.models': methods.extractMaximumLengthConstraint,\n  'minimum-length.constraint.models': methods.extractMinimumLengthConstraint,\n  'pattern.constraint.models': methods.extractPatternConstraint,\n  'maximum-items.constraint.models': methods.extractMaximumItemsConstraint,\n  'minimum-items.constraint.models': methods.extractMinimumItemsConstraint,\n  'unique-items.constraint.models': methods.extractUniqueItemsConstraint,\n  'maximum-properties.constraint.models': methods.extractMaximumPropertiesConstraint,\n  'minimum-properties.constraint.models': methods.extractMinimumPropertiesConstraint,\n  'enum.constraint.models': methods.extractEnumConstraint,\n  'json.constraint.models': methods.extractJSONSchemaConstraint,\n  'xml.constraint.models': methods.extractXMLSchemaConstraint,\n  'contact.utils.models': methods.extractContact,\n  'context.core.models': methods.extractContext,\n  'group.models': methods.extractGroup,\n  'info.utils.models': methods.extractInfo,\n  'interface.models': methods.extractInterface,\n  'license.utils.models': methods.extractLicense,\n  'parameter.core.models': methods.extractParameter,\n  'parameter-container.core.models': methods.extractParameterContainer,\n  'reference.models': methods.extractReference,\n  'request.models': methods.extractRequest,\n  'resource.models': methods.extractResource,\n  'response.core.models': methods.extractResponse,\n  'store.models': methods.extractStore,\n  'url.models': methods.extractURL,\n  'url-component.models': methods.extractURLComponent,\n  'variable.models': methods.extractVariable\n}\n\nmethods.extract = (obj) => {\n  if (obj && obj._model && classMap[obj._model.name]) {\n    obj._model = new ModelInfo(obj._model)\n    return classMap[obj._model.name](obj)\n  }\n\n  const _obj = methods.traverse(obj)\n  return _obj\n}\n\nmethods.parse = ({ options, item }) => {\n  const api = methods.extract(item)\n\n  return { options, api }\n}\n\nexport const __internals__ = methods\nexport default InternalParser\n"
  },
  {
    "path": "src/parsers/parsers.js",
    "content": "import { parsers } from 'api-flow-config'\n\nconst methods = {}\n\nmethods.getParsersByFormat = (format) => {\n  return parsers.filter(parser => parser.format === format)\n}\n\nmethods.getParserByFormatAndVersion = ({ format, version }) => {\n  const match = parsers.filter(parser => {\n    return parser.__meta__.format === format && parser.__meta__.version === version\n  })[0] || null\n  return match\n}\n\nmethods.getParsers = () => {\n  return parsers\n}\n\n\nexport const getParsersByFormat = methods.getParsersByFormat\nexport const getParserByFormatAndVersion = methods.getParserByFormatAndVersion\nexport const getParsers = methods.getParsers\n\nexport default methods\n"
  },
  {
    "path": "src/parsers/paw/Parser.js",
    "content": "import { parse } from 'url'\nimport { OrderedMap, Set, List } from 'immutable'\n\nimport Api from '../../models/Api'\nimport Info from '../../models/Info'\nimport Contact from '../../models/Contact'\nimport Group from '../../models/Group'\nimport Variable from '../../models/Variable'\nimport Parameter from '../../models/Parameter'\nimport URLComponent from '../../models/URLComponent'\nimport Resource from '../../models/Resource'\nimport Reference from '../../models/Reference'\nimport Constraint from '../../models/Constraint'\nimport ParameterContainer from '../../models/ParameterContainer'\nimport Auth from '../../models/Auth'\nimport Store from '../../models/Store'\nimport URL from '../../models/URL'\nimport Request from '../../models/Request'\n\nimport { currify, convertEntryListInMap } from '../../utils/fp-utils'\n\nconst __meta__ = {\n  format: 'paw',\n  version: 'v3.0'\n}\n\nconst methods = {}\n\n/**\n * A Parser that converts a PawContext and an array of items into an Api Record\n */\nexport class PawParser {\n  static __meta__ = __meta__\n  static identifier =\n        'com.luckymarmot.PawExtensions.API-Flow'\n  static title = 'Api-Flow'\n  static help =\n        'https://github.com/luckymarmot/API-Flow'\n  static languageHighlighter = null\n  static fileExtension = null\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse({ options } = {}) {\n    return methods.parse({ options })\n  }\n}\n\n/**\n * creates a message with information about the state of the document when this was generated\n * @param {PawContext} context: the paw context from which to get the state of the document.\n * @returns {string?} the string describing the state of the project, if it is a cloud project.\n */\nmethods.addGenerationMessage = (context) => {\n  if (context.document.cloudProject && context.document.cloudProject.currentBranch) {\n    const branchName = context.document.cloudProject.currentBranch\n    const commitSha = context.document.cloudProject.commitSha\n    const commitMsg = commitSha ? ' on commit ' + commitSha : ''\n\n    const msg = 'This document was generated from the branch ' + branchName +\n      commitMsg + '.'\n\n    return msg\n  }\n\n  return null\n}\n\n/**\n * creates a message about how to contribute to the project, if it is a cloud porject\n * @param {PawContext} context: the paw context from which to get the info.\n * @returns {string?} the string explaining how to contribute, if it is a cloud project.\n */\nmethods.addContributionMessage = (context) => {\n  if (context.document.isCloudProject) {\n    const cloudProject = context.document.cloudProject || {}\n    const cloudTeam = context.document.cloudTeam || {}\n\n    if (typeof cloudProject.id === 'undefined' || typeof cloudTeam.id === 'undefined') {\n      return null\n    }\n\n    const msg = 'If you are a contributor to this project, you may access it here: ' +\n      'https://paw.cloud/account/teams/' + cloudTeam.id + '/projects/' + cloudProject.id\n\n    return msg\n  }\n\n  return null\n}\n\n/**\n * creates a description of the state of the document.\n * @param {PawContext} context: the paw context from which to get the state of the document.\n * @returns {string?} the string describing the state of the project, if it is a cloud project.\n */\nmethods.extractDescription = (context) => {\n  const description = [\n    methods.addGenerationMessage(context),\n    methods.addContributionMessage(context)\n  ].filter(value => !!value)\n\n  return description.join('\\n\\n') || null\n}\n\n/**\n * extracts a Contact from a context\n * @param {PawContext} context: the context from which to get the contact information.\n * @returns {Contact?} the corresponding contact, if it exists\n */\nmethods.extractContact = (context) => {\n  if (context.document.cloudTeam && context.document.cloudTeam.id) {\n    return new Contact({\n      url: 'https://paw.cloud/account/teams/' + context.document.cloudTeam.id,\n      name: context.document.cloudTeam.name || null\n    })\n  }\n\n  return null\n}\n\n/**\n * extracts a version from a context. By default, it is v0.0.0, but a shortened commit sha will be\n * appended if it is possible.\n * @param {PawContext} context: the context from which to extract a version\n * @returns {string} the corresponding version.\n */\nmethods.extractVersion = (context) => {\n  const version = 'v0.0.0'\n\n  if (context.document.cloudProject && context.document.cloudProject.commitSha) {\n    return version + '-' + context.document.cloudProject.commitSha.slice(0, 10)\n  }\n\n  return version\n}\n\n/**\n * extracts the project title from a context.\n * @param {PawContext} context: the context from which to extract a title.\n * @returns {string} the corresponding title\n */\nmethods.extractTitle = (context) => {\n  const title = context.document.name\n  return title || null\n}\n\n/**\n * creates an Info record from a context\n * @param {PawContext} context: the context to extract information from.\n * @returns {Info} the corresponding Info record\n */\nmethods.extractInfo = (context) => {\n  const title = methods.extractTitle(context)\n  const version = methods.extractVersion(context)\n  const description = methods.extractDescription(context)\n  const contact = methods.extractContact(context)\n\n  return new Info({\n    title, version, description, contact\n  })\n}\n\n/**\n * traverses a tree from a request leaf to the root group and returns the hierarchy from the root\n * to the leaf.\n * @param {Array<(PawRequest|PawRequestGroup)>} path: the accumulator that holds the path up to this\n * request or group\n * @param {PawRequest|PawRequestGroup} reqOrGroup: the request or group to find the parent of.\n * @returns {Array<(PawRequest|PawRequestGroup)>} the ordered sequence of parents of the reqOrGroup\n */\nmethods.getPathForRequestOrGroup = (path, reqOrGroup) => {\n  if (!reqOrGroup) {\n    return path\n  }\n\n  const newPath = [ reqOrGroup, ...path ]\n  return methods.getPathForRequestOrGroup(newPath, reqOrGroup.parent)\n}\n\n/**\n * gets the ordered sequence of parents of a request, from the root group to itself.\n * @param {PawRequest} request: the request to get the parents from.\n * @returns {Array<(PawRequest|PawRequestGroup)>} the corresponding sequence of parents.\n */\nmethods.getPathForRequest = (request) => {\n  return methods.getPathForRequestOrGroup([], request)\n}\n\n/**\n * converts a paw group into a Group record\n * @param {PawRequestGroup} pawGroup: the paw group to converts\n * @returns {Group} the corresponding Group record\n */\nmethods.convertPawGroupIntoGroup = (pawGroup) => {\n  return new Group({\n    name: pawGroup.name || null,\n    id: pawGroup.id || null\n  })\n}\n\n/**\n * gets the id from a PawRequest or PawRequestGroup and appends it to a list of ids. This is used to\n * transform a sequence of request groups into a path that allows us to access the corresponding\n * Group.\n * @param {Array<string>} path: the current list of 'children' and `id` values\n * @param {string} id: the id of the PawRequest or PawRequestGroup.\n * @returns {Array<string>} the updated path.\n */\nmethods.convertPawPathIntoGroupPath = (path, { id }) => [ ...path, 'children', id ]\n\n/**\n * creates a nested group at the expected location in an accumulator, if it does not already exist.\n * This method is designed to be used in a reducer, and allows us to fully construct all groups that\n * correspond to an ordered sequence of groups and subgroups. Since the reducer iterates over an\n * array in orderly fashion, this ensures that at any point in time, the path we are trying to\n * access is clearly defined.\n * @param {Group} acc: the root group which all path should use as a base.\n * @param {PawRequest|PawRequestGroup} item: an item from the ordered sequence of parents\n * @param {integer} index: the index at which the item is located in the sequence\n * @param {Array<PawRequest|PawRequestGroup>} fullPath: the complete ordered sequence of parents\n * @returns {Group} the updated root Group\n */\nmethods.createNestedGroups = (acc, item, index, fullPath) => {\n  const path = fullPath\n    .slice(0, index + 1)\n    .reduce(methods.convertPawPathIntoGroupPath, [])\n\n  // leaf object (i.e. a paw request)\n  if (index === fullPath.length - 1) {\n    return acc.setIn(path, item.id)\n  }\n\n  // node object (i.e. a paw group)\n  const group = acc.getIn(path)\n\n  if (!group) {\n    return acc.setIn(path, methods.convertPawGroupIntoGroup(item))\n  }\n\n  return acc\n}\n\n/**\n * stores a request id in the expected group based on a sequence of parents, creating the groupd and\n * all of its parents if necessary.\n * @param {Group} rootGroup: the group to update with the request id\n * @param {Array<PawRequest|PawRequestGroup>} path: the ordered sequence of parents of the request\n * @returns {Group} the upated group\n */\nmethods.storeRequest = (rootGroup, path) => {\n  return path.reduce(methods.createNestedGroups, rootGroup)\n}\n\n/**\n * extract the hierarchy of groups and requests from a list of requests.\n * @param {Array<PawRequest>} reqs: the list of requests from which to get the hierarchy.\n * @returns {Group} the corresponding Group hierarchy\n */\nmethods.extractGroup = (reqs) => {\n  return reqs\n    .map(methods.getPathForRequest)\n    .reduce(methods.storeRequest, new Group())\n}\n\n/**\n * traverses two strings to find the longest common path, which is similar to the longest common\n * starting string, except that we don't compare character by character but '/'-separated block\n * by '/'-separated block, as /example/pets and /example/pet/:petId have /example as a common path\n * and not /example/pet.\n * @param {Array<string>} lcPathname: the current longest common pathname, in blocks.\n * @param {string} pathname: the pathname to compare\n * @returns {Array<string>} the updated lcPathname\n */\nmethods.findLongestCommonPath = (lcPathname, pathname) => {\n  const sections = pathname.split('/')\n\n  const length = Math.min(lcPathname.length, sections.length)\n\n  let index = 0\n  while (index < length) {\n    if (lcPathname[index] !== sections[index]) {\n      return lcPathname.slice(0, index)\n    }\n\n    index += 1\n  }\n\n  return lcPathname.slice(0, index)\n}\n\n/**\n * @typedef hostMapType\n * @type {Object<string, {\n *   entries: Array<{ key: string, value: PawRequest, urlObject: Object}>,\n *   lcPathname: Array<string>\n * }>}\n */\n\n/**\n *\n * updates a hostmap with data about a request, grouping it with other requests that share a common\n * host.\n * @param {hostMapType} hostMap: the host map to update.\n * @param {object} entry: the entry to add to the host map\n * @param {string} entry.key: the generated string corresponding to the url of the request\n * @param {PawRequest} entry.value: the request to add to the host map\n * @returns {hostMapType} the updated hostMap\n */\nmethods.addHostEntryToHostMap = (hostMap, { key, value }) => {\n  const urlObject = parse(key)\n  const host = urlObject.host\n\n  if (!hostMap[host]) {\n    hostMap[host] = { entries: [], lcPathname: urlObject.pathname.split('/') }\n  }\n\n  const lcPathname = hostMap[host].lcPathname\n  // TODO what fields are used ?\n  hostMap[host].entries.push({ key, value, urlObject })\n  hostMap[host].lcPathname = methods.findLongestCommonPath(lcPathname, urlObject.pathname)\n  return hostMap\n}\n\n/**\n * converts a longest common pathname array into a longest common pathname string\n * @param {Array<string>} lcPathname: the array to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.getLongestCommonPathnameAsString = (lcPathname) => {\n  if (lcPathname.length === 1) {\n    return '/' + lcPathname[0]\n  }\n\n  return lcPathname.join('/')\n}\n\n/**\n * converts a hostMapEntry into a regular Entry\n * @param {object} hostMapEntry: the entry to convert\n * @param {Array<*>} hostMapEntry.entries: the entries corresponding to this specific host.\n * @param {Array<string>} hostMapEntry.lcPathname: the array that contains the longest common\n * pathname of all the entries belonging to this hostMapEntry\n * @param {string} key: the host string\n * @returns {Entry<string, *>} the corresponding Entry\n */\nmethods.updateHostKeyWithLongestCommonPathname = ({ entries, lcPathname }, key) => {\n  const lcString = methods.getLongestCommonPathnameAsString(lcPathname)\n  return {\n    key: key + lcString,\n    value: entries\n  }\n}\n\n/**\n * converts a PawRequest into an array of entries of size 1 where the key is the extracted origin of\n * the urlBase of the requests.\n * @param {Array<PawRequest>} request: the requests to group by host\n * @returns {Array<Entry<string, PawRequest>>} the corresponding sequence of entries.\n */\nmethods.convertSingleRequestIntoRequestEntry = (request) => {\n  const baseUrl = request.getUrlBase()\n  const numberOfSlashes = parse(baseUrl).slashes ? 3 : 1\n  const origin = baseUrl.split('/').slice(0, numberOfSlashes).join('/')\n  return [\n    { key: origin, value: request }\n  ]\n}\n\n/**\n * converts an array of PawRequests into an array of entries where the keys are the urlBase of the\n * requests, except if there is only one request.\n * @param {Array<PawRequest>} requests: the requests to group by host\n * @returns {Array<Entry<string, PawRequest>>} the corresponding sequence of entries.\n */\nmethods.convertRequestsIntoRequestEntries = (requests) => {\n  if (requests.length === 1) {\n    return methods.convertSingleRequestIntoRequestEntry(requests[0])\n  }\n\n  return requests.map(request => {\n    return { key: request.getUrlBase(), value: request }\n  })\n}\n\n/**\n * extracts common hosts from a list of requests, and assigns each request to its corresponding host\n * @param {Array<PawRequest>} requests: the requests to group by host\n * @returns {Seq<Entry<string, *>>} the corresponding sequence of entries.\n */\nmethods.extractCommonHostsFromRequests = (requests) => {\n  const requestEntries = methods.convertRequestsIntoRequestEntries(requests)\n  const hosts = requestEntries.reduce(methods.addHostEntryToHostMap, {})\n\n  return new OrderedMap(hosts).map(methods.updateHostKeyWithLongestCommonPathname).valueSeq()\n}\n\n/**\n * converts a DynamicValue or a string into an Entry.\n * @param {DynamicValue|string} component: the component of a DynamicString to convert into an Entry\n * @return {Entry<string, DynamicValue|string>} the corresponding entry\n */\nmethods.convertDynamicStringComponentIntoEntry = (component) => {\n  if (typeof component === 'string') {\n    return { key: component, value: component }\n  }\n\n  return { key: component.getEvaluatedString(), value: component }\n}\n\n/**\n * tests whether a part of a url is entirely present in a default Url or its secure version\n * @param {string} defaultUrl: the default url to test against.\n * @param {string} defaultSecureUrl: the default secure url to test against.\n * @param {string} urlPart: the part of url to test\n * @returns {boolean} true if it is a part of either urls, false otherwise.\n */\nmethods.isPartOfBaseUrl = (defaultUrl, defaultSecureUrl, urlPart) => {\n  return defaultUrl.indexOf(urlPart) >= 0 || defaultSecureUrl.indexOf(urlPart) >= 0\n}\n\n/**\n * finds the intersection between two strings, and returns the intersection, as well as the right-\n * most exclusion. This is used to find the overlap between a host url and a part of a url\n * associated with that host.\n * @param {string} defaultUrl: the default url to test against.\n * @param {string} defaultSecureUrl: the default secure url to test against.\n * @param {string} urlPart: the part of url to test\n * @returns {{ inside: string, outside: string }}\n *\n * Note: this assumes Paw only supports http and https.\n * Note: this may work incorrectly if url is as follow: http://example.com/example.com/ (not tested)\n */\nmethods.findIntersection = (defaultUrl, defaultSecureUrl, urlPart) => {\n  let baseUrl = defaultUrl\n  if (urlPart.match(/^[^:]*s:\\/\\//)) {\n    baseUrl = defaultSecureUrl\n  }\n\n  const match = (baseUrl + '####' + urlPart).match(/^.*?(.*)####\\1(.*)$/)\n  // always matches\n  return { inside: match[1], outside: match[2] }\n}\n\n/**\n * assigns a component to either a sequence of components representing the baseUrl, or to a sequence\n * of components that represents the path that is specific to this request. If the component is\n * split between the two sequences, we split its evaluated string in such way that as much as\n * possible is put in the base sequence.\n * @param {string} defaultUrl: the non-secure url for a given host\n * @param {string} defaultSecureUrl: the secure url for a given host\n * @param {object} acc: the accumulator that holds the base and path sequences\n * @param {Array<Entry<string, string|DynamicValue>>} acc.baseComponents: the sequence of components\n * that belong to the host url\n * @param {Array<Entry<string, string|DynamicValue>>} acc.pathComponents: the sequence of components\n * that belong to the path of the request\n * @param {object} entry: the entry that represents the component\n * @param {string} entry.key: the evaluated string of the component\n * @param {string|DynamicValue} entry.value: the component\n * @returns {object} acc: the updated accumulator\n */\nmethods.addComponentToBaseOrPath = (\n  defaultUrl,\n  defaultSecureUrl,\n  { baseComponents, pathComponents },\n  { key: urlPart, value: component }\n) => {\n  if (\n    pathComponents.length === 0 &&\n    methods.isPartOfBaseUrl(defaultUrl, defaultSecureUrl, urlPart)\n  ) {\n    // component is member of base url\n    baseComponents.push({ key: urlPart, value: component })\n    return { baseComponents, pathComponents }\n  }\n\n  if (pathComponents.length === 0) {\n    // component may be split between base url and path\n    const { inside, outside } = methods.findIntersection(defaultUrl, defaultSecureUrl, urlPart)\n    baseComponents.push({ key: inside, value: inside })\n    pathComponents.push({ key: outside, value: outside })\n  }\n  else {\n    // component is not a member of base url\n    pathComponents.push({ key: urlPart, value: component })\n  }\n\n  return { baseComponents, pathComponents }\n}\n\n/**\n * tests whether a string or dynamic value is an environment variable\n * @param {string|DynamicValue} stringOrDV: the string or dynamic value to test\n * @returns {boolean} true if it an environment variable, false otherwise\n */\nmethods.isEnvironmentVariable = (stringOrDV) => {\n  return typeof stringOrDV === 'object' &&\n    stringOrDV.type === 'com.luckymarmot.EnvironmentVariableDynamicValue'\n}\n\n/**\n * extracts all possible values from an environment variable.\n * @param {PawContext} context: the context from which to get the environment variable.\n * @param {DynamicValue} dv: the dv that holds a reference to the environmentVariable.\n * @returns {Array<Entry<string, string>>} the array that holds all possible values as Entries.\n */\nmethods.extractPossibleValuesFromEnvironmentVariableDV = (context, dv) => {\n  const variableId = dv.environmentVariable\n  const variable = context.getEnvironmentVariableById(variableId)\n  const domain = variable.domain\n  const environments = domain.environments\n  const values = environments.map((env) => {\n    const rawValue = variable.getValue(env, true)\n    // NOTE: this should not be needed anymore\n    let value = null\n    if (typeof rawValue === 'string') {\n      value = rawValue\n    }\n    else {\n      value = rawValue.getEvaluatedString()\n    }\n    return { key: env.name, value }\n  })\n\n  return values\n}\n\n/**\n * extracts all possible values from a DV Entry.\n * @param {PawContext} context: the context from which to get environment variables\n * @param {Object} entry: the component entry\n * @param {string} entry.key: the part of the url that this component represents\n * @param {string|DynamicValue} entry.value: the component itself\n * @returns {Array<Entry<string, string>>} the corresponding array of possible values for a DV Entry\n */\nmethods.extractPossibleValuesFromDVEntry = (context, { key: urlPart, value: stringOrDV }) => {\n  if (!methods.isEnvironmentVariable(stringOrDV)) {\n    return [ { key: '', value: urlPart } ]\n  }\n\n  return methods.extractPossibleValuesFromEnvironmentVariableDV(context, stringOrDV)\n}\n\n/**\n * combines all possible values from a list of combinations and entries, using a cartesian product\n * of the two arrays, which is then flattened\n * @param {Array<Entry<string, string>>} combinations: the current combinations\n * @param {Array<Entry<string, string>>} entries: the values to combine the combinations with.\n * @returns {Array<Entry<string,string>>} the updated combinations\n */\nmethods.combinePossibleValues = (combinations, entries) =>{\n  return combinations\n    .map((combination) => {\n      const updated = entries.map((entry) => {\n        return { key: combination.key + entry.key, value: combination.value + entry.value }\n      })\n\n      return updated\n    })\n    .reduce((finalList, list) => finalList.concat(list), [])\n}\n\n/**\n * converts an array of components belonging to a base url into a variable, if suitable.\n * It only tries to convert it into a variable if there is a single environment variable in the\n * array of components. It otherwise returns null.\n * @param {PawContext} context: the context used to resolve environment variables\n * @param {string} defaultHost: the host associated to the baseComponents\n * @param {Array<Entry<string, string|DynamicValue>>} baseComponents: the array of components to\n * convert into a variable.\n * @returns {Variable?} the corresponding variable for this array of variables\n */\nmethods.convertBaseComponentsIntoVariable = (context, defaultHost, baseComponents) => {\n  const environmentDVCount = baseComponents.filter(({ value }) => {\n    return methods.isEnvironmentVariable(value)\n  }).length\n\n  if (environmentDVCount !== 1) {\n    return null\n  }\n\n  const extractValuesFromDVEntry = currify(methods.extractPossibleValuesFromDVEntry, context)\n\n  const variableValues = baseComponents\n    .map(extractValuesFromDVEntry)\n    .reduce(methods.combinePossibleValues, [ { key: '', value: '' } ])\n    .reduce(convertEntryListInMap, {})\n\n  return new Variable({\n    name: defaultHost,\n    values: OrderedMap(variableValues)\n  })\n}\n\n/**\n * extracts the variable corresponding to the host, and the path components from a request.\n * @param {PawContext} context: the context in which to resolve the environment variable\n * @param {string} defaultHost: the host of the request\n * @param {function} reducer: the reducer to apply to the components of the request.url\n * @param {Entry<*, PawRequest>} entry: the request entry\n * @param {PawRequest} entry.value: the request\n * @returns {{ request: PawRequest, baseVariable: Variable?, pathComponents: Array<*> }} the\n * corresponding entry with the request, the base variable and the path components\n */\nmethods.extractBaseVariableAndPathComponentsFromRequest = (\n  context,\n  defaultHost,\n  reducer,\n  { value: request }\n) => {\n  const assignComponentToBaseOrPath = reducer\n  const ds = request.getUrlBase(true)\n  const { baseComponents, pathComponents } = ds.components\n    .map(methods.convertDynamicStringComponentIntoEntry)\n    .reduce(assignComponentToBaseOrPath, { baseComponents: [], pathComponents: [] })\n\n  const baseVariable = methods.convertBaseComponentsIntoVariable(\n    context,\n    defaultHost,\n    baseComponents\n  )\n  return { request, baseVariable, pathComponents }\n}\n\n/**\n * A reducer to set the host variable with the first Variable that has been produced from a request\n * @param {Object} acc: the accumulator for the reducer\n * @param {Variable?} acc.hostVariable: the Variable that represents the host\n * @param {Array<ResourceEntry>} acc.requestEntries: the list of requests and their associated path\n * components that belong to this host\n * @param {object} entry: the entry to use to update the accumulator\n * @param {PawRequest} entry.request: the request to convert\n * @param {Variable?} entry.baseVariable: the host variable that was extracted from the request\n * @param {Array<Entry<string, (string|DynamicValue)>>} entry.pathComponents: the components that\n * make up the path of the request\n * @returns {object} acc: the updated accumulator\n */\nmethods.findBaseVariableForRequestEntries = (\n  { hostVariable, requestEntries },\n  { request, baseVariable, pathComponents }\n) => {\n  requestEntries.push({ request, pathComponents })\n\n  if (!hostVariable && baseVariable) {\n    return { hostVariable: baseVariable, requestEntries }\n  }\n\n  return { hostVariable, requestEntries }\n}\n\n/**\n * converts a component entry into a string, or a parameter if the component is a request variable.\n * @param {PawRequest} request: the request to extract the request variable from.\n * @param {Object} entry: the component entry\n * @param {string} entry.key: the evaluated string of the component, used as a key\n * @param {string|DynamicString} entry.value: the component itself\n * @returns {string|Parameter} the corresponding string or parameter\n */\nmethods.convertComponentEntryIntoStringOrParam = (request, { key, value }) => {\n  if (typeof value === 'string') {\n    return value\n  }\n\n  if (value.type !== 'com.luckymarmot.RequestVariableDynamicValue') {\n    return key\n  }\n\n  const { value: param } = methods.convertRequestVariableDVIntoParameter(\n    request, 'path', List(), value, key)\n  return param\n}\n\n/**\n * a reducer to merge sequencial strings together.\n * For instance, if in an array, you have\n *   [ \"abc\", \"def\", \"ghi\", param, \"qwe\", \"asd\" ]\n * the corresponding merge produced by using this function as a reducer will be\n *   [ \"abcdefghi\", param, \"qweasd\" ]\n * @param {Array<string|Parameter>} aggregated: the merged array\n * @param {string|Parameter} stringOrParam: the string or parameter to add to the merged array\n * @returns {Array<string|Parameter>} the updated array\n */\nmethods.mergeSequencialStrings = (aggregated, stringOrParam) => {\n  const previous = aggregated[aggregated.length - 1]\n\n  if (typeof previous === 'string' && typeof stringOrParam === 'string') {\n    aggregated[aggregated.length - 1] = previous + stringOrParam\n    return aggregated\n  }\n\n  aggregated.push(stringOrParam)\n  return aggregated\n}\n\n/**\n * converts a string into a parameter, or returns it as is, if it's already a parameter\n * @param {string|Parameter} stringOrParam: the string or parameter to convert\n * @returns {Parameter} the corresponding parameter\n */\nmethods.convertStringOrParameterIntoParameter = (stringOrParam) => {\n  if (typeof stringOrParam === 'string') {\n    return new Parameter({\n      type: 'string',\n      default: stringOrParam\n    })\n  }\n\n  return stringOrParam\n}\n\n/**\n * creates a default Path endpoint used in a resource.\n * @returns {URL} the default path endpoint\n */\nmethods.createDefaultPathEndpoint = () => {\n  const pathnameComponent = new URLComponent({\n    componentName: 'pathname',\n    string: '',\n    parameter: new Parameter({\n      key: 'pathname',\n      in: 'path',\n      type: 'string',\n      default: '/'\n    })\n  })\n  return new URL().set('pathname', pathnameComponent)\n}\n\n/**\n * inserts an Empty Parameter at the beginning of a sequence if it begins with a url variable\n * instead of a standard string parameter. This is necessary, as our definition of a sequence\n * parameter specifies that it should start with a non parameter value (for ease of reading\n * afterwards)\n * @param {Array<Parameter>} sequence: the sequence to fix if needed\n * @returns {Array<Parameter>} the fixed sequence\n */\nmethods.insertEmptyParameterIfNeeded = (sequence) => {\n  if (sequence[0].get('key') !== null) {\n    sequence.splice(0, 0, new Parameter({ type: 'string', default: '' }))\n  }\n\n  return sequence\n}\n\n/**\n * creates a Path Endpoint for a resource from a sequence of parameters.\n * @param {Array<Parameter>} sequence: the sequence to use in the sequence Parameter of the endpoint\n * @returns {URL} the corresponding path endpoint\n */\nmethods.createPathEndpoint = (sequence) => {\n  const pathnameComponent = new URLComponent({\n    componentName: 'pathname',\n    string: '',\n    parameter: new Parameter({\n      key: 'pathname',\n      in: 'path',\n      type: 'string',\n      superType: 'sequence',\n      value: List(sequence)\n    })\n  })\n\n  const path = new URL().set('pathname', pathnameComponent)\n  return path\n}\n\n/**\n * converts a sequence of path components into a path endpoint to use in a resource.\n * @param {PawRequest} request: the request to use for request variable resolution\n * @param {Array<Entry<string, (string|DynamicValue)>>} components: a list of components that\n * represent the path of the resource\n * @returns {URL} the corresponding endpoint\n */\nmethods.convertPathComponentsIntoPathEndpoint = (request, components) => {\n  const convertComponentEntryIntoStringOrParam = currify(\n    methods.convertComponentEntryIntoStringOrParam, request\n  )\n\n  const sequence = components\n    .map(convertComponentEntryIntoStringOrParam)\n    .reduce(methods.mergeSequencialStrings, [])\n    .map(methods.convertStringOrParameterIntoParameter)\n\n  if (!sequence.length) {\n    return methods.createDefaultPathEndpoint()\n  }\n\n  const normalizedSequence = methods.insertEmptyParameterIfNeeded(sequence)\n  return methods.createPathEndpoint(normalizedSequence)\n}\n\n/**\n * converts a paw request into an endpoint that holds a single request (which is the conversion of\n * the paw request)\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {Reference} reference: the reference to the endpoint being used\n * @param {Object} resourceEntry: the entry to use to create the resource\n * @param {PawRequest} resourceEntry.request: the request to convert\n * @param {Array<Entry<string, (string|Parameter)>>} resourceEntry.pathComponents: the array of\n * components that represent the path of the request\n * @returns {Entry<string, Resource>} the newly created Resource\n */\nmethods.extractResourceFromPawRequest = (context, reference, { request, pathComponents }) => {\n  const path = methods.convertPathComponentsIntoPathEndpoint(request, pathComponents)\n  const endpoints = { [reference.get('uuid')]: reference }\n\n  return {\n    key: request.id,\n    value: new Resource({\n      name: (request.parent || {}).name || null,\n      description: (request.parent || {}).description || null,\n      endpoints: OrderedMap(endpoints),\n      path: path,\n      methods: methods.extractRequestMapFromPawRequest(context, request, endpoints)\n    })\n  }\n}\n\n/**\n * converts an array of host entry into a host Variable and an array of request entry\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {string} defaultHost: the host string that we need to improve on\n * @param {Array<{ key: string, value: PawRequest, urlObject: object }>} hostEntries: the requests\n * associated with this host\n * @returns {object} hostObject: the containing object that holds the host variable and the requests\n * @returns {Variable?} hostObject.hostVariable: the variable representing this host, if it exists.\n * @returns {Array<ResourceEntry>} hostObject.requestEntries: the list of requests and their\n * associated path components that belong to this host\n */\nmethods.convertHostEntriesIntoHostVariableAndRequestEntries = (\n  context, defaultHost, hostEntries\n) => {\n  const defaultUrl = 'http://' + defaultHost\n  const defaultSecureUrl = 'https://' + defaultHost\n\n  const assignComponentToBaseOrPath = currify(\n    methods.addComponentToBaseOrPath,\n    defaultUrl,\n    defaultSecureUrl\n  )\n\n  const extractBaseVariableAndPathComponentsFromRequest = currify(\n    methods.extractBaseVariableAndPathComponentsFromRequest,\n    context, defaultHost, assignComponentToBaseOrPath\n  )\n\n  return hostEntries\n    .map(extractBaseVariableAndPathComponentsFromRequest)\n    .reduce(methods.findBaseVariableForRequestEntries, { hostVariable: null, requestEntries: [] })\n}\n\n/**\n * creates a default host endpoint. The hostEntries are used to extract the possible protocols for\n * this endpoint\n * @param {string} defaultHost: the host string\n * @param {Array<{ key: string, value: PawRequest, urlObject: object }>} hostEntries: the requests\n * associated with this host\n * @returns {Entry} entry: the endpoint as an entry\n * @returns {string} entry.key: the host string. this will be used as a unique identifier\n * @returns {URL} entry.value: the endpoint\n */\nmethods.createDefaultHostEndpoint = (defaultHost, hostEntries) => {\n  const defaultUrl = 'http://' + defaultHost\n\n  let endpointValue = new URL({\n    url: defaultUrl\n  })\n\n  const protocols = Set(hostEntries.map(({ urlObject }) => urlObject.protocol)).toList()\n\n  endpointValue = endpointValue.set('protocol', protocols)\n  return { key: defaultHost, value: endpointValue }\n}\n\n/**\n * creates an Array of Resources from an array of requests\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {string} defaultHost: the host that is shared by all the request entries\n * @param {Variable?} hostVariable: the variable that represents the host, if it exists\n * @param {Array<{ key: string, value: PawRequest, urlObject: object }>} requestEntries: the list of\n * requests associated with this host\n * @returns {Array<Entry<Resources>>} the corresponding list of resources\n */\nmethods.getResourcesFromRequestEntries = (context, defaultHost, hostVariable, requestEntries) => {\n  const reference = new Reference({\n    type: hostVariable ? 'variable' : 'endpoint',\n    uuid: defaultHost\n  })\n\n  const extractResourceFromPawRequest = currify(\n    methods.extractResourceFromPawRequest, context, reference\n  )\n\n  return requestEntries.map(extractResourceFromPawRequest)\n}\n\n/**\n * converts a host object into a resources, and a variable or an endpoint\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {Entry} entry: the entry describing a host\n * @param {string} entry.key: the host string\n * @param {Array<Entry<string, *>>} entry.value: the array of objects describing requests associated\n * with this host\n * @returns {Object} container: the container holding the resources, and the variable or the\n * endpoint\n * @returns {Array<Entry<string, Resource>>} container.resources: the array holding all the\n * resources associated with this host\n * @return {Variable?} container.variable: the Variable record describing this host, if it exists\n * @return {Endpoint?} container.endpoint: the Endpoint record describing this host.\n *\n * NOTE: container.variable and container.endpoint are mutually exclusive\n */\nmethods.convertHostIntoResources = (context, { key: defaultHost, value: hostEntries }) => {\n  const {\n    hostVariable,\n    requestEntries\n  } = methods.convertHostEntriesIntoHostVariableAndRequestEntries(context, defaultHost, hostEntries)\n\n  let variable\n  let endpoint\n  if (hostVariable) {\n    variable = { key: defaultHost, value: hostVariable }\n    endpoint = null\n  }\n  else {\n    variable = null\n    endpoint = methods.createDefaultHostEndpoint(defaultHost, hostEntries)\n  }\n\n  const resources = methods.getResourcesFromRequestEntries(\n    context, defaultHost, hostVariable, requestEntries\n  )\n\n  return { resources, variable, endpoint }\n}\n\n/**\n * returns a request variable from its uuid\n * @param {PawRequest} request: the request to get the variable from\n * @param {string} uuid: the uuid of the variable to resolved\n * @returns {PawRequestVariable?} the corresponding request variable, if it exists\n */\nmethods.getVariableFromUuid = (request, uuid) => {\n  return request.getVariableById(uuid) || null\n}\n\n/**\n * tests whether a DynamicString component is a request variable\n * @param {string|DynamicValue} component: the component to test\n * @returns {boolean} true if it is a request variable, false otherwise\n */\nmethods.isRequestVariableDynamicValue = (component) => {\n  return typeof component === 'object' &&\n    component.type === 'com.luckymarmot.RequestVariableDynamicValue'\n}\n\n/**\n * tests whether the DynamicString holds a single DynamicString that is a request variable\n * @param {DynamicString} ds: the dynamic string to test\n * @returns {boolean} true if it only holds a request variable, false otherwise\n */\nmethods.isRequestVariableDS = (ds) => {\n  return ds.length === 1 && methods.isRequestVariableDynamicValue(ds.components[0])\n}\n\n/**\n * converts a request variable DynamicValue into a Parameter\n * @param {PawRequest} request: the request to use to resolve variable parameters\n * @param {string} location: location of the parameter (e.g. 'headers', 'queries')\n * @param {List<Parameter>} contexts: the contexts in which this Parameter is applicable\n * @param {DynamicValue} paramDV: the dynamic string to convert\n * @param {string} paramName: the name of the parameter\n * @returns {Parameter} the corresponding parameter\n */\nmethods.convertRequestVariableDVIntoParameter = (\n  request, location, contexts, paramDV, paramName\n) => {\n  const variableId = paramDV.variableUUID\n  const variable = request.getVariableById(variableId)\n\n  if (!variable) {\n    return { key: paramName, value: new Parameter({\n      in: location,\n      key: paramName,\n      name: paramName,\n      type: 'string',\n      applicableContexts: contexts\n    }) }\n  }\n\n  const { name, value, required, schema, type, description } = variable\n\n  const defaultValue = typeof (schema || {}).default !== 'undefined' ?\n    schema.default :\n    value.getEvaluatedString()\n\n  const param = new Parameter({\n    in: location,\n    key: name || paramName,\n    name: name || paramName,\n    type: type || 'string',\n    description: description || null,\n    required: required || false,\n    default: defaultValue,\n    constraints: List([\n      new Constraint.JSONSchema(schema)\n    ]),\n    applicableContexts: contexts\n  })\n\n  return { key: paramName, value: param }\n}\n\n/**\n * converts a request variable DynamicString into a Parameter\n * @param {PawRequest} request: the request to use to resolve variable parameters\n * @param {string} location: location of the parameter (e.g. 'headers', 'queries')\n * @param {List<Parameter>} contexts: the contexts in which this Parameter is applicable\n * @param {DynamicString} paramDS: the dynamic string to convert\n * @param {string} paramName: the name of the parameter\n * @returns {Parameter} the corresponding parameter\n */\nmethods.convertRequestVariableDSIntoParameter = (\n  request, location, contexts, paramDS, paramName\n) => {\n  const paramDV = paramDS.components[0]\n  return methods.convertRequestVariableDVIntoParameter(\n    request, location, contexts, paramDV, paramName\n  )\n}\n\n/**\n * Converts a standard dynamic string (i.e. not a request variable) into a Parameter\n * @param {string} location: the location of the parameter (e.g. 'headers', 'queries')\n * @param {List<Parameter>} contexts: the contexts in which the parameter is applicable\n * @param {DynamicString} paramDS: the dynamic string to converts\n * @param {string} paramName: the name of the parameter\n * @returns {Parameter} the corresponding parameter\n */\nmethods.convertStandardDSIntoParameter = (location, contexts, paramDS, paramName) => {\n  const value = paramDS.getEvaluatedString()\n  const param = new Parameter({\n    in: location,\n    key: paramName,\n    name: paramName,\n    type: 'string',\n    default: value,\n    applicableContexts: contexts\n  })\n\n  return { key: paramName, value: param }\n}\n\n/**\n * converts a DynamicString associated with a parameter into a Parameter record\n * @param {PawRequest} request: the request to use to resolve variable parameters\n * @param {string} location: location of the parameter (e.g. 'headers', 'queries')\n * @param {List<Parameter>} contexts: the contexts in which this Parameter is applicable\n * @param {DynamicString} paramDS: the dynamic string to convert\n * @param {string} paramName: the name of the parameter\n * @returns {Parameter} the corresponding parameter\n */\nmethods.convertParameterDynamicStringIntoParameter = (\n  request, location, contexts, paramDS, paramName\n) => {\n  if (methods.isRequestVariableDS(paramDS)) {\n    return methods.convertRequestVariableDSIntoParameter(\n      request, location, contexts, paramDS, paramName\n    )\n  }\n\n  return methods.convertStandardDSIntoParameter(location, contexts, paramDS, paramName)\n}\n\n/**\n * tests whether the request has a url encoded body or not\n * @param {PawRequest} request: the request to test\n * @returns {boolean} true if its body is urlEncoded, false otherwise\n */\nmethods.isRequestBodyUrlEncoded = (request) => {\n  return !!(request.getHeaderByName('Content-Type') || '')\n    .match(/application\\/x-www-form-urlencoded/)\n}\n\n/**\n * tests whether the request has a multipart body or not\n * @param {PawRequest} request: the request to test\n * @returns {boolean} true if its body is multipart, false otherwise\n */\nmethods.isRequestBodyMultipart = (request) => {\n  return !!(request.getHeaderByName('Content-Type') || '')\n    .match(/multipart\\/form-data/)\n}\n\n/**\n * converts a content type into a list of Parameter, to use as applicable contexts in a Parameter.\n * @param {string} contentType: the content type of the request\n * @returns {Array<Parameter>} the corresponding applicable contexts\n */\nmethods.getContentTypeContexts = (contentType) => {\n  return List([\n    new Parameter({\n      key: 'Content-Type',\n      name: 'Content-Type',\n      in: 'headers',\n      type: 'string',\n      constraints: List([\n        new Constraint.Enum([ contentType ])\n      ])\n    })\n  ])\n}\n\n/**\n * creates a default array parameter.\n * @param {List<Parameter>} contexts: the list of contexts in which the parameter is applicable\n * @param {string} name: the name of the parameter\n * @returns {Parameter} a default Parameter of type Array\n */\nmethods.createDefaultArrayParameter = (contexts, name) => {\n  const param = new Parameter({\n    key: name,\n    name: name,\n    in: 'body',\n    type: 'array',\n    format: 'multi',\n    value: new Parameter({\n      type: 'string'\n    }),\n    applicableContexts: contexts\n  })\n\n  return { key: name, value: param }\n}\n\n/**\n * extracts the Parameters from a UrlEncoded or Multipart body\n * @param {Object<string, DynamicString|Array<DynamicString>>} dsMap: an object containing all\n * DynamicString by name of parameter\n * @param {Array<Parameter>} contexts: the contexts in which the parameters are applicable\n * @param {PawRequest} request: the request from which to get the body parameters\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of body Parameters\n */\nmethods.createUrlEncodedOrMultipartBodyParameters = (dsMap, contexts, request) => {\n  const bodyParams = OrderedMap(dsMap)\n    .map((value, name) => {\n      if (Array.isArray(value)) {\n        return methods.createDefaultArrayParameter(contexts, name)\n      }\n\n      return methods.convertParameterDynamicStringIntoParameter(\n        request, 'body', contexts, value, name\n      )\n    })\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(bodyParams)\n}\n\n/**\n * extracts the Parameters from a UrlEncoded body\n * @param {PawRequest} request: the request from which to get the body parameters\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of body Parameters\n */\nmethods.createUrlEncodedBodyParameters = (request) => {\n  const dsMap = request.getUrlEncodedBody(true)\n  const contexts = methods.getContentTypeContexts('application/x-www-form-urlencoded')\n\n  return methods.createUrlEncodedOrMultipartBodyParameters(dsMap, contexts, request)\n}\n\n/**\n * extracts the Parameters from a Multipart body\n * @param {PawRequest} request: the request from which to get the body parameters\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of body Parameters\n */\nmethods.createMultipartBodyParameters = (request) => {\n  const dsMap = request.getMultipartBody(true)\n  const contexts = methods.getContentTypeContexts('multipart/form-data')\n\n  return methods.createUrlEncodedOrMultipartBodyParameters(dsMap, contexts, request)\n}\n\n/**\n * extracts the single body Parameter from a request if the request is not url-encoded or multipart\n * @param {PawRequest} request: the request from which to get the body\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of body parameters\n */\nmethods.createStandardBodyParameters = (request) => {\n  const bodyDS = request.getBody(true)\n\n  if (!bodyDS) {\n    return OrderedMap()\n  }\n\n  const { key, value } = methods.convertParameterDynamicStringIntoParameter(\n    request, 'body', List(), bodyDS, null\n  )\n\n  const body = { [key]: value }\n  return OrderedMap(body)\n}\n\n/**\n * extracts all body Parameters from a request\n * @param {PawRequest} request: the request from which to get the body parameters\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of body parameters\n */\nmethods.getBodyParameters = (request) => {\n  if (methods.isRequestBodyUrlEncoded(request)) {\n    return methods.createUrlEncodedBodyParameters(request)\n  }\n\n  if (methods.isRequestBodyMultipart(request)) {\n    return methods.createMultipartBodyParameters(request)\n  }\n\n  return methods.createStandardBodyParameters(request)\n}\n\n/**\n * extracts all header parameters from a request\n * @param {PawRequest} request: the request from which to get the headers\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of header parameters\n */\nmethods.getHeadersMapFromRequest = (request) => {\n  const extractHeaders = currify(\n    methods.convertParameterDynamicStringIntoParameter, request, 'headers', List()\n  )\n\n  const headers = OrderedMap(request.getHeaders(true))\n    .filter((_, name) => name !== 'Authorization')\n    .map(extractHeaders)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(headers)\n}\n\n/**\n * extracts all query parameters from a request\n * @param {PawRequest} request: the request from which to get the query params\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap of query parameters\n */\nmethods.getQueriesMapFromRequest = (request) => {\n  const extractUrlParams = currify(\n    methods.convertParameterDynamicStringIntoParameter, request, 'queries', List()\n  )\n\n  const queryParams = OrderedMap(request.getUrlParameters(true))\n    .map(extractUrlParams)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(queryParams)\n}\n\n/**\n * extracts all parameters from a request into a ParameterContainer\n * @param {PawRequest} request: the request from which to get the parameters\n * @returns {ParameterContainer} the corresponding ParameterContainer\n */\nmethods.extractParameterContainerFromRequest = (request) => {\n  const headers = methods.getHeadersMapFromRequest(request)\n  const queries = methods.getQueriesMapFromRequest(request)\n  const body = methods.getBodyParameters(request)\n\n  return new ParameterContainer({\n    headers, queries, body\n  })\n}\n\nmethods.updateIdentifiersWithAuthURL = (identifiers, authURL) => {\n  const host = authURL.getEvaluatedString().split('/')[2]\n  const hostArray = host ? host.split('.') : []\n  const domain = hostArray[hostArray.length - 2]\n  if (domain) {\n    identifiers.push(domain)\n  }\n\n  return identifiers\n}\n\n/**\n * extracts an authName from an OAuth2 DynamicValue.\n * @param {DynamicValue} authDV: the oauth2 DynamicValue\n * @returns {string} the authName\n */\nmethods.getAuthNameFromOAuth2DV = (authDV) => {\n  let identifiers = [ 'oauth_2' ]\n  const authURL = authDV.authorizationURL\n  if (authURL) {\n    identifiers = methods.updateIdentifiersWithAuthURL(identifiers, authURL)\n  }\n\n  const grantMap = {\n    '0': 'code',\n    '1': 'implicit',\n    '2': 'resource_owner',\n    '3': 'client_credentials'\n  }\n\n  if (grantMap[authDV.grantType]) {\n    identifiers.push(grantMap[authDV.grantType])\n  }\n\n  identifiers.push('auth')\n\n  return identifiers.join('_')\n}\n\n/**\n * extracts an authName from a DynamicValue.\n * @param {PawContext} context: the context from which to resolve environment variables\n * @param {PawRequest} request: the request from which to resolve request variables\n * @param {DynamicValue} authDV: the DynamicValue to get the name of\n * @returns {string?} the authName, if the authDV is supported by API-Flow.\n */\nmethods.getAuthNameFromAuthDV = (context, request, authDV) => {\n  if (methods.isEnvironmentVariable(authDV)) {\n    const name = context.getEnvironmentVariableById(authDV.environmentVariable).name\n    return name\n  }\n\n  if (methods.isRequestVariableDynamicValue(authDV)) {\n    const variable = request.getVariableById(authDV.variableUUID)\n    return methods.getAuthNameFromAuth(context, request, variable.value)\n  }\n\n  if (authDV.type === 'com.luckymarmot.OAuth2DynamicValue') {\n    return methods.getAuthNameFromOAuth2DV(authDV)\n  }\n\n  return null\n}\n\n/**\n * extracts an authName from the evaluation of a DynamicString\n * @param {DynamicString} authDS: the DynamicString to get the evaluated string of, for the purpose\n * of name extractVersion\n * @returns {string?} the name of the authentication DynamicString, if it is supported by API-Flow.\n */\nmethods.getAuthNameFromAuthString = (authDS) => {\n  const scheme = authDS.getEvaluatedString().split(' ')[0]\n  const nameMap = {\n    Basic: 'basic_auth',\n    Digest: 'digest_auth',\n    Hawk: 'hawk_auth',\n    'AWS4-HMAC-SHA256': 'aws_sig4_auth',\n    OAuth: 'oauth_1_auth',\n    Bearer: 'oauth_2_auth'\n  }\n\n  if (nameMap[scheme]) {\n    return nameMap[scheme]\n  }\n\n  return null\n}\n\n/**\n * extracts an authName from an authentication DynamicString.\n * @param {PawContext} context: the context in which to resolve the environment variable\n * @param {PawRequest} request: the request in which to resolve the request variable\n * @param {DynamicString} authDS: the authentication DynamicString to get the name of\n * @returns {string?} the extracted authName, if the authentication method is supported by API-Flow\n */\nmethods.getAuthNameFromAuth = (context, request, authDS) => {\n  const authDV = authDS.getOnlyDynamicValue()\n\n  if (authDV) {\n    const name = methods.getAuthNameFromAuthDV(context, request, authDV)\n    if (name) {\n      return name\n    }\n  }\n\n  return methods.getAuthNameFromAuthString(authDS)\n}\n\n/**\n * extracts Auth References from a Request\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {PawRequest} request: the request from which to get the authentication header\n * @returns {List<References>} the corresponding list of References\n */\nmethods.extractAuthReferencesFromRequest = (context, request) => {\n  const auth = request.getHeaderByName('Authorization', true)\n  if (!auth) {\n    return List()\n  }\n\n  const authName = methods.getAuthNameFromAuth(context, request, auth)\n\n  return List([\n    new Reference({\n      type: 'auth',\n      uuid: authName\n    })\n  ])\n}\n\n/**\n * converts a paw request into a Request record and stores it in an OrderedMap.\n * @param {PawContext} context: the context in which to resolve the environment variables\n * @param {PawRequest} pawReq: the request to convert\n * @param {OrderedMap<string, Reference>} endpoints: a map of references to endpoints\n * @returns {OrderedMap<string, Request>} the converted Request saved in an OrderedMap\n */\nmethods.extractRequestMapFromPawRequest = (context, pawReq, endpoints) => {\n  const method = pawReq.getMethod()\n  const parameters = methods.extractParameterContainerFromRequest(pawReq)\n  const auths = methods.extractAuthReferencesFromRequest(context, pawReq)\n\n  const request = new Request({\n    id: pawReq.id,\n    endpoints: OrderedMap(endpoints),\n    name: pawReq.name,\n    description: pawReq.description,\n    method,\n    parameters,\n    auths\n  })\n\n  return OrderedMap({ [method]: request })\n}\n\n/**\n * a reducer to group resources, variables, and endpoints together\n * @param {object} acc: the accumulator of the reducer\n * @param {Array<Entry<string, Resources>>} acc.resources: an aggregation of resources over multiple\n * endpoints/hosts\n * @param {Array<Entry<string, Variable>>} acc.variables: an aggregation of variables over multiple\n * endpoints/hosts\n * @param {Array<Entry<string, URL>>} acc.endpoints: an aggregation of endpoints over multiple hosts\n * @param {object} entry: the entry to add to the reducer\n * @param {Array<Entry<string, Resources>>} entry.resources: all the resources associated with a\n * host\n * @param {Variable?} entry.variable: the variable associated with the host, if it exists\n * @param {URL?} entry.endpoint: the endpoint associated with the host, if it exists\n * @returns {object} acc, the updated accumulator\n */\nmethods.groupResourcesVariablesAndEndpoints = (\n  { resources, variables, endpoints },\n  { resources: hostResources, variable, endpoint }\n) => {\n  if (variable) {\n    variables.push(variable)\n  }\n\n  if (endpoint) {\n    endpoints.push(endpoint)\n  }\n\n  return {\n    resources: resources.concat(hostResources),\n    variables,\n    endpoints\n  }\n}\n\nmethods.addAuthorizationAndTokenUrlToOAuth2Auth = (authDV) => {\n  const authInstance = {}\n  const authURL = authDV.authorizationURL\n  if (authURL) {\n    authInstance.authorizationUrl = authURL.getEvaluatedString()\n  }\n\n  const tokenURL = authDV.tokenURL\n  if (tokenURL) {\n    authInstance.tokenUrl = tokenURL.getEvaluatedString()\n  }\n\n  return authInstance\n}\n\n/**\n * extracts an Auth record from an OAuth2 DynamicValue\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {PawRequest} request: the request in which to resolve request variables\n * @param {DynamicString} authDS: the authentication DynamicString\n * @param {DynamicValue} authDV: the authentication DynamicValue\n * @return {Entry<string, Auth>} the corresponding Auth record\n */\nmethods.extractAuthFromOAuth2DV = (context, request, authDS, authDV) => {\n  const authInstance = methods.addAuthorizationAndTokenUrlToOAuth2Auth(authDV)\n\n  const authName = methods.getAuthNameFromAuth(context, request, authDS)\n  authInstance.authName = authName\n\n  const grantMap = {\n    '0': 'accessCode',\n    '1': 'implicit',\n    '2': 'password',\n    '3': 'application'\n  }\n\n  authInstance.flow = grantMap[authDV.grantType] || 'implicit'\n\n  return { key: authName, value: new Auth.OAuth2(authInstance) }\n}\n\n/**\n * extract an Auth from DynamicValue\n * @param {PawContext} context: the context in which to resolve environment variables\n * @param {PawRequest} request: the request in which to resolve request variables\n * @param {DynamicString} authDS: the authentication DynamicString\n * @param {DynamicValue} authDV: the authentication DynamicValue\n * @return {Entry<string, Auth>} the corresponding Auth record\n */\nmethods.extractAuthFromDV = (context, request, authDS, authDV) => {\n  if (methods.isEnvironmentVariable(authDV)) {\n    const value = context\n      .getEnvironmentVariableById(authDV.environmentVariable)\n      .getCurrentValue(true)\n    return methods.extractAuthsFromRequest(context, request, value)\n  }\n\n  if (methods.isRequestVariableDynamicValue(authDV)) {\n    const variable = request.getVariableById(authDV.variableUUID)\n    return methods.extractAuthsFromRequest(context, request, variable.value)\n  }\n\n  if (authDV.type === 'com.luckymarmot.OAuth2DynamicValue') {\n    return methods.extractAuthFromOAuth2DV(context, request, authDS, authDV)\n  }\n\n  return methods.extractAuthFromAuthString(authDS)\n}\n\n/**\n * extracts an Auth from the evaluated string of an authentication DynamicString\n * @param {DynamicString} authDS: the authentication DynamicString to get the evaluated string of\n * @returns {Entry<string, Auth>} the corresponding Auth record\n */\nmethods.extractAuthFromAuthString = (authDS) => {\n  const scheme = authDS.getEvaluatedString().split(' ')[0]\n  const nameMap = {\n    Basic: () => ({ key: 'basic_auth', value: new Auth.Basic({ authName: 'basic_auth' }) }),\n    Digest: () => ({ key: 'digest_auth', value: new Auth.Digest({ authName: 'digest_auth' }) }),\n    Hawk: () => ({ key: 'hawk_auth', value: new Auth.Hawk({ authName: 'hawk_auth' }) }),\n    'AWS4-HMAC-SHA256': () => ({\n      key: 'aws_sig4_auth',\n      value: new Auth.AWSSig4({ authName: 'aws_sig4_auth' })\n    }),\n    OAuth: () => ({ key: 'oauth_1_auth', value: new Auth.OAuth1({ authName: 'oauth_1_auth' }) }),\n    Bearer: () => ({ key: 'oauth_2_auth', value: new Auth.OAuth2({ authName: 'oauth_2_auth' }) })\n  }\n\n  if (nameMap[scheme]) {\n    return nameMap[scheme]()\n  }\n\n  return { key: null, value: null }\n}\n\n/**\n * extract auths from a request or dynamic string\n * @param {PawContext} context: the context to use to resolve environment variables\n * @param {PawRequest} request: the request to use to resolve request variables, or to get the\n * authentication DynamicString\n * @param {DynamicString} _authDS: an optional authentication DynamicString to resolve instead of\n * the authentication DynamicString\n * @returns {Entry<string?, Auth?>} the corresponding auth DynamicValue\n */\nmethods.extractAuthsFromRequest = (context, request, _authDS) => {\n  // potential infinite loop ?\n  const authDS = _authDS || request.getHeaderByName('Authorization', true)\n  const authDV = authDS.getOnlyDynamicValue()\n\n  if (authDV) {\n    return methods.extractAuthFromDV(context, request, authDS, authDV)\n  }\n\n  return methods.extractAuthFromAuthString(authDS)\n}\n\n/**\n * converts an array of PawRequests into Resources\n * @param {PawContext} context: the context to use to resolve environment variables\n * @param {Array<PawRequest>} reqs: the array of requests to convert into resources\n * @returns {{\n *   resources: Object<string, Resources>,\n *   variables: Array<Entry<string, Variable>>,\n *   endpoints: Array<Entry<string, URL>>\n * }} the corresponding resource map, and the associated variables and endpoints\n */\nmethods.extractResources = (context, reqs) => {\n  const hosts = methods.extractCommonHostsFromRequests(reqs)\n  const convertHostIntoResources = currify(methods.convertHostIntoResources, context)\n  const { resources, variables, endpoints } = hosts\n    .map(convertHostIntoResources)\n    .reduce(\n      methods.groupResourcesVariablesAndEndpoints,\n      { resources: [], variables: [], endpoints: [] }\n    )\n\n  const resourceMap = OrderedMap(resources.reduce(convertEntryListInMap, {}))\n\n  return { resources: resourceMap, variables, endpoints }\n}\n\n/**\n * creates a Store from variables, endpoints, and auths\n * @param {PawContext} context: the context to use to resolve environment variables\n * @param {Array<Entry<string, Variable>>} variables: the variables to save in the store\n * @param {Array<Entry<string, URL>>} endpoints: the endpoints to save in the store\n * @param {Array<PawRequest>} reqs: the array of paw requests to use to extract shared auth methods\n * @returns {Store} the corresponding store\n */\nmethods.extractStore = (context, variables, endpoints, reqs) => {\n  const auths = reqs\n    .filter(request => request.getHeaderByName('Authorization', true))\n    .map((request) => methods.extractAuthsFromRequest(context, request))\n    .filter(({ key }) => !!key)\n\n  const variableStore = OrderedMap(variables.reduce(convertEntryListInMap, {}))\n  const endpointStore = OrderedMap(endpoints.reduce(convertEntryListInMap, {}))\n  const authStore = OrderedMap(auths.reduce(convertEntryListInMap, {}))\n\n  const store = new Store({\n    variable: variableStore,\n    endpoint: endpointStore,\n    auth: authStore\n  })\n\n  return store\n}\n\n/**\n * extracts Resources and a Store of shared objects from an array of requests\n * @param {PawContext} context: the context to use to resolve environment variables\n * @param {Array<PawRequest>} reqs: the array of request from which to extract resources and shared\n * objects\n * @returns {object} result\n * @returns {OrderedMap<string, Resource>} result.resources: the extracted resources\n * @returns {Store} result.store: the store containing shared objects from resources\n */\nmethods.extractResourcesAndStore = (context, reqs) => {\n  const { resources, variables, endpoints } = methods.extractResources(context, reqs)\n  const store = methods.extractStore(context, variables, endpoints, reqs)\n\n  return { resources, store }\n}\n\n// NOTE: we're cheating in this method, as we're not using the standard Item interface, but rather\n// passing the requests and context as options to the parser.\n/**\n * imports a list of requests, as well as metadata into an Api\n * @param {object} parserOptions: the parser options\n * @param {PawContext} parserOptions.context: the paw context\n * @param {PawRequest} parserOptions.reqs: the array of requests to import\n * @returns {Api} the corresponding Api\n */\nmethods.parse = ({ options }) => {\n  const { context, reqs } = options\n  const info = methods.extractInfo(context)\n  const group = methods.extractGroup(reqs)\n  const { resources, store } = methods.extractResourcesAndStore(context, reqs)\n\n  const api = new Api({\n    info, store, group, resources\n  })\n\n  return { options, api }\n}\n\nexport const __internals__ = methods\nexport default PawParser\n"
  },
  {
    "path": "src/parsers/paw/__tests__/Parser.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\n/* eslint-disable require-jsdoc */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List, Seq } from 'immutable'\n\nimport { parse } from 'url'\n\nimport Contact from '../../../models/Contact'\nimport Info from '../../../models/Info'\nimport Group from '../../../models/Group'\nimport Variable from '../../../models/Variable'\nimport Parameter from '../../../models/Parameter'\nimport URL from '../../../models/URL'\nimport URLComponent from '../../../models/URLComponent'\nimport Reference from '../../../models/Reference'\nimport Resource from '../../../models/Resource'\nimport Constraint from '../../../models/Constraint'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Request from '../../../models/Request'\nimport Auth from '../../../models/Auth'\nimport Store from '../../../models/Store'\nimport Api from '../../../models/Api'\n\nimport Parser, { __internals__ } from '../Parser'\n\ndescribe('parsers/paw/Parser.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Parser }', () => {\n    describe('@parse', () => {\n      it('should call __internals__.parse', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const actual = Parser.parse()\n\n        expect(__internals__.parse).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.parse with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const options = { context: 123, items: 321, options: 234 }\n        const actual = Parser.parse({ options })\n\n        expect(__internals__.parse).toHaveBeenCalledWith({ options })\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@addGenerationMessage', () => {\n    it('should work', () => {\n      const contexts = [\n        { document: {} },\n        { document: { cloudProject: {} } },\n        { document: { cloudProject: { currentBranch: 'test' } } },\n        { document: { cloudProject: { currentBranch: 'test', commitSha: 123 } } }\n      ]\n\n      const expected = [\n        null,\n        null,\n        'This document was generated from the branch test.',\n        'This document was generated from the branch test on commit 123.'\n      ]\n\n      const actual = contexts.map(__internals__.addGenerationMessage)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addContributionMessage', () => {\n    it('should work', () => {\n      const inputs = [\n        { document: {} },\n        { document: { isCloudProject: false } },\n        { document: { isCloudProject: true } },\n        { document: { isCloudProject: false, cloudProject: {}, cloudTeam: {} } },\n        { document: { isCloudProject: true, cloudProject: {}, cloudTeam: {} } },\n        { document: { isCloudProject: false, cloudProject: {}, cloudTeam: { id: 321 } } },\n        { document: { isCloudProject: true, cloudProject: {}, cloudTeam: { id: 321 } } },\n        { document: { isCloudProject: false, cloudProject: { id: 123 }, cloudTeam: {} } },\n        { document: { isCloudProject: true, cloudProject: { id: 123 }, cloudTeam: {} } },\n        { document: { isCloudProject: false, cloudProject: { id: 123 }, cloudTeam: { id: 321 } } },\n        { document: { isCloudProject: true, cloudProject: { id: 123 }, cloudTeam: { id: 321 } } }\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        'If you are a contributor to this project, you may access it here: ' +\n          'https://paw.cloud/account/teams/321/projects/123'\n      ]\n      const actual = inputs.map(__internals__.addContributionMessage)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescription', () => {\n    it('should call expected methods', () => {\n      spyOn(__internals__, 'addGenerationMessage').andReturn(null)\n      spyOn(__internals__, 'addContributionMessage').andReturn(null)\n\n      const input = { document: 'test' }\n      __internals__.extractDescription(input)\n\n      expect(__internals__.addGenerationMessage).toHaveBeenCalledWith(input)\n      expect(__internals__.addContributionMessage).toHaveBeenCalledWith(input)\n    })\n\n    it('should work if no message', () => {\n      spyOn(__internals__, 'addGenerationMessage').andReturn(null)\n      spyOn(__internals__, 'addContributionMessage').andReturn(null)\n\n      const input = {}\n      const expected = null\n\n      const actual = __internals__.extractDescription(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if contribution message', () => {\n      spyOn(__internals__, 'addGenerationMessage').andReturn(null)\n      spyOn(__internals__, 'addContributionMessage').andReturn('hey there')\n\n      const input = {}\n      const expected = 'hey there'\n\n      const actual = __internals__.extractDescription(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if generation message', () => {\n      spyOn(__internals__, 'addGenerationMessage').andReturn('gen msg')\n      spyOn(__internals__, 'addContributionMessage').andReturn(null)\n\n      const input = {}\n      const expected = 'gen msg'\n\n      const actual = __internals__.extractDescription(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if both messages', () => {\n      spyOn(__internals__, 'addGenerationMessage').andReturn('gen msg')\n      spyOn(__internals__, 'addContributionMessage').andReturn('contrib msg')\n\n      const input = {}\n      const expected = 'gen msg\\n\\ncontrib msg'\n\n      const actual = __internals__.extractDescription(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractContact', () => {\n    it('should work', () => {\n      const inputs = [\n        { document: {} },\n        { document: { cloudTeam: {} } },\n        { document: { cloudTeam: { id: 123 } } },\n        { document: { cloudTeam: { id: 123, name: 'Dev Team' } } }\n      ]\n      const expected = [\n        null,\n        null,\n        new Contact({ url: 'https://paw.cloud/account/teams/123' }),\n        new Contact({ url: 'https://paw.cloud/account/teams/123', name: 'Dev Team' })\n      ]\n\n      const actual = inputs.map(__internals__.extractContact)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractVersion', () => {\n    it('should work', () => {\n      const inputs = [\n        { document: {} },\n        { document: { cloudProject: {} } },\n        { document: { cloudProject: { commitSha: '123' } } }\n      ]\n      const expected = [\n        'v0.0.0',\n        'v0.0.0',\n        'v0.0.0-123'\n      ]\n      const actual = inputs.map(__internals__.extractVersion)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTitle', () => {\n    it('should work', () => {\n      const inputs = [\n        { document: {} },\n        { document: { name: 'Dev Api' } }\n      ]\n      const expected = [\n        null,\n        'Dev Api'\n      ]\n      const actual = inputs.map(__internals__.extractTitle)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfo', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractTitle').andReturn(123)\n      spyOn(__internals__, 'extractVersion').andReturn(321)\n      spyOn(__internals__, 'extractDescription').andReturn(234)\n      spyOn(__internals__, 'extractContact').andReturn(432)\n\n      const input = {}\n      const expected = new Info({\n        title: 123,\n        version: 321,\n        description: 234,\n        contact: 432\n      })\n\n      const actual = __internals__.extractInfo(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getPathForRequestOrGroup', () => {\n    it('should work with root (null)', () => {\n      const path = [ 123, 123, 123 ]\n      const input = null\n      const expected = path\n      const actual = __internals__.getPathForRequestOrGroup(path, input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getPathForRequestOrGroup if reqOrGroup exists', () => {\n      spyOn(__internals__, 'getPathForRequestOrGroup').andCallThrough()\n\n      const path = [ 321, 432, 543 ]\n      const input = { parent: null }\n      const expected = [ input ].concat(path)\n      const actual = __internals__.getPathForRequestOrGroup(path, input)\n\n      expect(__internals__.getPathForRequestOrGroup).toHaveBeenCalledWith(path, input)\n      expect(__internals__.getPathForRequestOrGroup).toHaveBeenCalledWith([ input, ...path ], null)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getPathForRequest', () => {\n    it('should call getPathForRequestOrGroup with correct arguments', () => {\n      spyOn(__internals__, 'getPathForRequestOrGroup').andReturn(234)\n\n      const input = { reqId: 123 }\n      const expected = 234\n      const actual = __internals__.getPathForRequest(input)\n\n      expect(__internals__.getPathForRequestOrGroup).toHaveBeenCalledWith([], input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertPawGroupIntoGroup', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { id: 123 },\n        { name: 321 },\n        { id: 123, name: 321 }\n      ]\n      const expected = [\n        new Group(),\n        new Group({ id: 123 }),\n        new Group({ name: 321 }),\n        new Group({ id: 123, name: 321 })\n      ]\n      const actual = inputs.map(__internals__.convertPawGroupIntoGroup)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertPawPathIntoGroupPath', () => {\n    it('it should work', () => {\n      const path = [ 234, 321 ]\n      const input = { id: 123 }\n      const expected = [ ...path, 'children', 123 ]\n      const actual = __internals__.convertPawPathIntoGroupPath(path, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createNestedGroups', () => {\n    it('should work if group already exist', () => {\n      spyOn(__internals__, 'convertPawGroupIntoGroup').andReturn(123)\n      const acc = new Group({\n        children: OrderedMap({\n          '123': new Group({\n            children: OrderedMap({\n              '321': new Group({\n                children: OrderedMap({\n                  '234': new Group()\n                })\n              })\n            })\n          })\n        })\n      })\n      const item = '321'\n      const index = 1\n      const input = [ { id: '123' }, { id: '321' }, { id: '234' } ]\n      const expected = acc\n      const actual = __internals__.createNestedGroups(acc, item, index, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if group does not already exist', () => {\n      spyOn(__internals__, 'convertPawGroupIntoGroup').andReturn('group')\n      const acc = new Group({\n        children: OrderedMap({\n          '123': new Group({\n            children: OrderedMap({\n              '321': new Group({\n                children: OrderedMap({\n                  '234': new Group()\n                })\n              })\n            })\n          })\n        })\n      })\n      const item = { id: '789' }\n      const index = 1\n      const input = [ { id: '123' }, { id: '789' }, { id: '234' } ]\n      const expected = acc.setIn([ 'children', '123', 'children', '789' ], 'group')\n      const actual = __internals__.createNestedGroups(acc, item, index, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add leaves', () => {\n      spyOn(__internals__, 'convertPawGroupIntoGroup').andReturn('group')\n      const acc = new Group({\n        children: OrderedMap({\n          '123': new Group({\n            children: OrderedMap({\n              '321': new Group({\n                children: OrderedMap({\n                  '234': new Group()\n                })\n              })\n            })\n          })\n        })\n      })\n      const item = { id: '789' }\n      const index = 1\n      const input = [ { id: '123' }, { id: '789' } ]\n      const expected = acc.setIn([ 'children', '123', 'children', '789' ], '789')\n      const actual = __internals__.createNestedGroups(acc, item, index, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@storeRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createNestedGroups').andReturn(234)\n      const group = new Group()\n      const input = [ { id: '123' }, { id: '321' }, { id: '234' } ]\n      const expected = 234\n      const actual = __internals__.storeRequest(group, input)\n\n      expect(__internals__.createNestedGroups.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getPathForRequest').andReturn(123)\n      spyOn(__internals__, 'storeRequest').andReturn(234)\n\n      const input = [ { reqId: 1 }, { reqId: 2 }, { reqId: 3 }, { reqId: 4 } ]\n      const expected = 234\n      const actual = __internals__.extractGroup(input)\n\n      expect(__internals__.getPathForRequest.calls.length).toEqual(4)\n      expect(__internals__.getPathForRequest.calls[0].arguments.slice(0, 1)).toEqual([ input[0] ])\n\n      expect(__internals__.storeRequest.calls.length).toEqual(4)\n      expect(__internals__.storeRequest.calls[1].arguments.slice(0, 2)).toEqual([ 234, 123 ])\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@findLongestCommonPath', () => {\n    it('should work', () => {\n      const lcPathname = [ '', 'users', '{userId}', 'pets', '{petId}' ]\n      const inputs = [\n        '/users/{userId}/pets/{petId}',\n        '/users/{userId}/pets/{petId}/address',\n        '/users/{userId}/pets',\n        '/users/{userId}/petitions',\n        '/users',\n        '/usage'\n      ]\n\n      const expected = [\n        [ '', 'users', '{userId}', 'pets', '{petId}' ],\n        [ '', 'users', '{userId}', 'pets', '{petId}' ],\n        [ '', 'users', '{userId}', 'pets' ],\n        [ '', 'users', '{userId}' ],\n        [ '', 'users' ],\n        [ '' ]\n      ]\n      const actual = inputs.map(input => __internals__.findLongestCommonPath(lcPathname, input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addHostEntryToHostMap', () => {\n    it('should work', () => {\n      const hostMap = {\n        'echo.paw.cloud': {\n          entries: [ { key: 'http://echo.paw.cloud/users/234', value: 234 } ],\n          lcPathname: [ '', 'users', '234' ]\n        }\n      }\n      const inputs = [\n        { key: 'http://echo.paw.cloud/users/123', value: 123 },\n        { key: 'https://beta.paw.cloud/users/321', value: 321 }\n      ]\n      const expected = {\n        'echo.paw.cloud': {\n          entries: [\n            { key: 'http://echo.paw.cloud/users/234', value: 234 },\n            { key: 'http://echo.paw.cloud/users/123',\n              value: 123,\n              urlObject: parse('http://echo.paw.cloud/users/123') }\n          ],\n          lcPathname: [ '', 'users' ]\n        },\n        'beta.paw.cloud': {\n          entries: [\n            { key: 'https://beta.paw.cloud/users/321',\n              value: 321,\n              urlObject: parse('https://beta.paw.cloud/users/321') }\n          ],\n          lcPathname: [ '', 'users', '321' ]\n        }\n      }\n\n      const actual = inputs.reduce(__internals__.addHostEntryToHostMap, hostMap)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getLongestCommonPathnameAsString', () => {\n    it('should work', () => {\n      const inputs = [\n        [ '', 'users', '123' ],\n        [ '' ]\n      ]\n      const expected = [\n        '/users/123',\n        '/'\n      ]\n      const actual = inputs.map(__internals__.getLongestCommonPathnameAsString)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateHostKeyWithLongestCommonPathname', () => {\n    it('should work', () => {\n      const key = 'echo.paw.cloud'\n      const input = { entries: [ 123, 123, 123 ], lcPathname: [ '', 'users' ] }\n      const expected = { key: 'echo.paw.cloud/users', value: [ 123, 123, 123 ] }\n      const actual = __internals__.updateHostKeyWithLongestCommonPathname(input, key)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSingleRequestIntoRequestEntry', () => {\n    it('should work', () => {\n      const inputs = [\n        { getUrlBase: () => '' },\n        { getUrlBase: () => 'http://paw.cloud/base/users' },\n        { getUrlBase: () => 'file:///base/users' },\n        { getUrlBase: () => 'urn:paw.cloud/base/users' }\n      ]\n      const expected = [\n        [ { key: '', value: { getUrlBase: () => null } } ],\n        [ { key: 'http://paw.cloud', value: { getUrlBase: () => 'http://paw.cloud/base/users' } } ],\n        [ { key: 'file://', value: { getUrlBase: () => 'file:///base/users' } } ],\n        [ { key: 'urn:paw.cloud', value: { getUrlBase: () => 'urn:paw.cloud/base/users' } } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertSingleRequestIntoRequestEntry(input))\n      expect(JSON.stringify(actual, null, 2)).toEqual(JSON.stringify(expected, null, 2))\n    })\n  })\n\n  describe('@convertRequestsIntoRequestEntries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertSingleRequestIntoRequestEntry').andCall(r => {\n        return [ { key: r.getUrlBase() * 2, value: r } ]\n      })\n\n      const inputs = [\n        [],\n        [ { getUrlBase: () => 123 } ],\n        [ { getUrlBase: () => 123 }, { getUrlBase: () => 234 } ]\n      ]\n      const expected = [\n        [],\n        [ { key: 123 * 2, value: { getUrlBase: () => 123 } } ],\n        [\n          { key: 123, value: { getUrlBase: () => 123 } },\n          { key: 234, value: { getUrlBase: () => 234 } }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertRequestsIntoRequestEntries(input))\n      expect(JSON.stringify(actual, null, 2)).toEqual(JSON.stringify(expected, null, 2))\n    })\n  })\n\n  describe('@extractCommonHostsFromRequests', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertRequestsIntoRequestEntries').andCall(v => v)\n      spyOn(__internals__, 'addHostEntryToHostMap').andReturn({ a: 321, b: 321, c: 321 })\n      spyOn(__internals__, 'updateHostKeyWithLongestCommonPathname').andReturn(123)\n      const req1 = { getUrlBase: () => {} }\n      spyOn(req1, 'getUrlBase').andReturn('https://echo.paw.cloud/users')\n      const input = [ req1, req1, req1 ]\n      const expected = Seq([ 123, 123, 123 ])\n      const actual = __internals__.extractCommonHostsFromRequests(input)\n      expect(actual.toList()).toEqual(expected.toList())\n    })\n  })\n\n  describe('@convertDynamicStringComponentIntoEntry', () => {\n    it('should work', () => {\n      const component = {\n        getEvaluatedString: () => {}\n      }\n\n      spyOn(component, 'getEvaluatedString').andReturn(123)\n\n      const inputs = [\n        'some/component',\n        component\n      ]\n\n      const expected = [\n        { key: 'some/component', value: 'some/component' },\n        { key: 123, value: component }\n      ]\n\n      const actual = inputs.map(__internals__.convertDynamicStringComponentIntoEntry)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isPartOfBaseUrl', () => {\n    it('should work', () => {\n      const defaultUrl = 'http://echo.paw.cloud/users'\n      const defaultSecureUrl = 'https://echo.paw.cloud/users'\n      const inputs = [ '/users', '/users/123', '/pets' ]\n      const expected = [ true, false, false ]\n      const actual = inputs.map((input) => {\n        return __internals__.isPartOfBaseUrl(defaultUrl, defaultSecureUrl, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@findIntersection', () => {\n    it('should work', () => {\n      const defaultUrl = 'http://echo.paw.cloud/pets'\n      const defaultSecureUrl = 'https://echo.paw.cloud/pets'\n      const inputs = [\n        '/pets',\n        '/pets/234',\n        '/234',\n        // this one should be outside, because our intersection method tries to place strings so\n        // that they overlap from the right\n        'http://echo.paw.cloud',\n        'http://echo.paw.cloud/pets',\n        'https://echo.paw.cloud/pets'\n      ]\n      const expected = [\n        { inside: '/pets', outside: '' },\n        { inside: '/pets', outside: '/234' },\n        { inside: '', outside: '/234' },\n        { inside: '', outside: 'http://echo.paw.cloud' },\n        { inside: 'http://echo.paw.cloud/pets', outside: '' },\n        { inside: 'https://echo.paw.cloud/pets', outside: '' }\n      ]\n      const actual = inputs.map(\n        input => __internals__.findIntersection(defaultUrl, defaultSecureUrl, input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addComponentToBaseOrPath', () => {\n    it('should work', () => {\n      const defaultUrl = 'http://echo.paw.cloud/users/123/pets'\n      const defaultSecureUrl = 'https://echo.paw.cloud/users/123/pets'\n\n      const accumulator = {\n        baseComponents: [],\n        pathComponents: []\n      }\n\n      const inputs = [\n        { key: 'http://echo.paw.cloud', value: 'serverUrl' },\n        { key: '/users/', value: '/users/' },\n        { key: '123', value: 'userId' },\n        { key: '/pets/234', value: '/pets/petId' },\n        { key: '/address', value: 'address' }\n      ]\n\n      const expected = {\n        baseComponents: [\n          { key: 'http://echo.paw.cloud', value: 'serverUrl' },\n          { key: '/users/', value: '/users/' },\n          { key: '123', value: 'userId' },\n          { key: '/pets', value: '/pets' }\n        ],\n        pathComponents: [\n          { key: '/234', value: '/234' },\n          { key: '/address', value: 'address' }\n        ]\n      }\n      const actual = inputs.reduce((acc, input) => {\n        return __internals__.addComponentToBaseOrPath(defaultUrl, defaultSecureUrl, acc, input)\n      }, accumulator)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isEnvironmentVariable', () => {\n    it('should work', () => {\n      const input = [\n        'some/string',\n        { type: 'com.luckymarmot.SomeRandomDV' },\n        { type: 'com.luckymarmot.EnvironmentVariableDynamicValue' }\n      ]\n      const expected = [ false, false, true ]\n      const actual = input.map(__internals__.isEnvironmentVariable)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPossibleValuesFromEnvironmentVariableDV', () => {\n    it('should work', () => {\n      const domain = {\n        environments: [\n          { name: 'Default' },\n          { name: 'Production' },\n          { name: 'Test' }\n        ]\n      }\n\n      const variable = {\n        domain: domain,\n        getValue: (env) => { return { getEvaluatedString: () => { return '**' + env.name } } }\n      }\n\n      const context = {\n        getEnvironmentVariableById: () => { return variable }\n      }\n\n      const input = { EnvironmentVariable: 123 }\n      const expected = [\n        { key: 'Default', value: '**Default' },\n        { key: 'Production', value: '**Production' },\n        { key: 'Test', value: '**Test' }\n      ]\n      const actual = __internals__.extractPossibleValuesFromEnvironmentVariableDV(context, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with deprecated paw `getValue` method', () => {\n      const domain = {\n        environments: [\n          { name: 'Default' },\n          { name: 'Production' },\n          { name: 'Test' }\n        ]\n      }\n\n      const variable = {\n        domain: domain,\n        getValue: (env) => '**' + env.name\n      }\n\n      const context = {\n        getEnvironmentVariableById: () => { return variable }\n      }\n\n      const input = { EnvironmentVariable: 123 }\n      const expected = [\n        { key: 'Default', value: '**Default' },\n        { key: 'Production', value: '**Production' },\n        { key: 'Test', value: '**Test' }\n      ]\n      const actual = __internals__.extractPossibleValuesFromEnvironmentVariableDV(context, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPossibleValuesFromDVEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractPossibleValuesFromEnvironmentVariableDV').andReturn([\n        { key: 123, value: 123 }, { key: 321, value: 321 }\n      ])\n      const context = {}\n      const inputs = [\n        { key: '/users', value: 'ignored' },\n        { key: '/234', value: { type: 'com.luckymarmot.EnvironmentVariableDynamicValue' } }\n      ]\n      const expected = [\n        [ { key: '', value: '/users' } ],\n        [ { key: 123, value: 123 }, { key: 321, value: 321 } ]\n      ]\n\n      const actual = inputs.map(input => {\n        return __internals__.extractPossibleValuesFromDVEntry(context, input)\n      })\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@combinePossibleValues', () => {\n    it('should work', () => {\n      const combinations = [ { key: '1@', value: '123@' }, { key: '2@', value: '234@' } ]\n      const input = [ { key: '#1', value: '#123' }, { key: '#2', value: '#234' } ]\n      const expected = [\n        { key: '1@#1', value: '123@#123' },\n        { key: '1@#2', value: '123@#234' },\n        { key: '2@#1', value: '234@#123' },\n        { key: '2@#2', value: '234@#234' }\n      ]\n\n      const actual = __internals__.combinePossibleValues(combinations, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBaseComponentsIntoVariable', () => {\n    it('should work if no env dv', () => {\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/123'\n      const input = [ { key: '123', value: '123' }, { key: '234', value: '234' } ]\n      const expected = null\n      const actual = __internals__.convertBaseComponentsIntoVariable(context, defaultHost, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if 2+ env dv', () => {\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/123'\n      const input = [ { key: '123', value: {\n        type: 'com.luckymarmot.EnvironmentVariableDynamicValue'\n      } }, { key: '234', value: {\n        type: 'com.luckymarmot.EnvironmentVariableDynamicValue'\n      } } ]\n      const expected = null\n      const actual = __internals__.convertBaseComponentsIntoVariable(context, defaultHost, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with a single env dv', () => {\n      spyOn(__internals__, 'extractPossibleValuesFromDVEntry').andCall((c, v, i) => {\n        return i ?\n          [ { key: 'default', value: '123' }, { key: 'production', value: '234' } ] :\n          [ { key: '', value: 'https://echo.paw.cloud/users/' } ]\n      })\n\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/users/123'\n      const input = [\n        { key: 'https://echo.paw.cloud/users/', value: 'https://echo.paw.cloud/users/' },\n        { key: '123', value: { type: 'com.luckymarmot.EnvironmentVariableDynamicValue' } }\n      ]\n      const expected = new Variable({\n        name: 'echo.paw.cloud/users/123',\n        values: OrderedMap({\n          default: 'https://echo.paw.cloud/users/123',\n          production: 'https://echo.paw.cloud/users/234'\n        })\n      })\n\n      const actual = __internals__.convertBaseComponentsIntoVariable(context, defaultHost, input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBaseVariableAndPathComponentsFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertDynamicStringComponentIntoEntry').andCall(v => (v + 1))\n      spyOn(__internals__, 'convertBaseComponentsIntoVariable').andReturn(123)\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/users'\n      const request = { getUrlBase: () => { return { components: [ 1, 2, 3 ] } } }\n      const input = { value: request }\n      const reducer = ({ pathComponents }, val) => {\n        return { pathComponents: [ ...pathComponents, val * 2 ] }\n      }\n      const expected = {\n        request: request,\n        baseVariable: 123,\n        pathComponents: [ 4, 6, 8 ]\n      }\n      const actual = __internals__.extractBaseVariableAndPathComponentsFromRequest(\n        context, defaultHost, reducer, input\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@findBaseVariableForRequestEntries', () => {\n    it('should work if no variable', () => {\n      const acc = {\n        hostVariable: null,\n        requestEntries: []\n      }\n      const inputs = [\n        { request: 123, baseVariable: null, pathComponents: [ 1, 2, 3 ] },\n        { request: 234, baseVariable: null, pathComponents: [ 2, 3, 4 ] }\n      ]\n      const expected = {\n        hostVariable: null,\n        requestEntries: [\n          { request: 123, pathComponents: [ 1, 2, 3 ] },\n          { request: 234, pathComponents: [ 2, 3, 4 ] }\n        ]\n      }\n      const actual = inputs.reduce(__internals__.findBaseVariableForRequestEntries, acc)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if variable', () => {\n      const acc = {\n        hostVariable: null,\n        requestEntries: []\n      }\n      const inputs = [\n        { request: 123, baseVariable: 345, pathComponents: [ 1, 2, 3 ] },\n        { request: 234, baseVariable: null, pathComponents: [ 2, 3, 4 ] }\n      ]\n      const expected = {\n        hostVariable: 345,\n        requestEntries: [\n          { request: 123, pathComponents: [ 1, 2, 3 ] },\n          { request: 234, pathComponents: [ 2, 3, 4 ] }\n        ]\n      }\n      const actual = inputs.reduce(__internals__.findBaseVariableForRequestEntries, acc)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertComponentEntryIntoStringOrParam', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRequestVariableDVIntoParameter').andReturn({ value: '456' })\n      const request = {}\n\n      const inputs = [\n        { key: '123', value: '123' },\n        { key: '234', value: { type: 'some.random.dvType' } },\n        { key: '345', value: { type: 'com.luckymarmot.RequestVariableDynamicValue' } }\n      ]\n      const expected = [\n        '123',\n        '234',\n        '456'\n      ]\n\n      const actual = inputs.map(input => {\n        return __internals__.convertComponentEntryIntoStringOrParam(request, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mergeSequencialStrings', () => {\n    it('should work', () => {\n      const acc = []\n      const inputs = [\n        'to', ' concatenate', 123, 'and', ' this', ' too'\n      ]\n      const expected = [ 'to concatenate', 123, 'and this too' ]\n      const actual = inputs.reduce(__internals__.mergeSequencialStrings, acc)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStringOrParameterIntoParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        'test', 123\n      ]\n      const expected = [ new Parameter({ type: 'string', default: 'test' }), 123 ]\n      const actual = inputs.map(__internals__.convertStringOrParameterIntoParameter)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDefaultPathEndpoint', () => {\n    it('should work', () => {\n      const expected = new URL().set('pathname', new URLComponent({\n        componentName: 'pathname',\n        string: '',\n        parameter: new Parameter({\n          key: 'pathname',\n          in: 'path',\n          type: 'string',\n          default: '/'\n        })\n      }))\n\n      const actual = __internals__.createDefaultPathEndpoint()\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@insertEmptyParameterIfNeeded', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Parameter({ key: 123 }) ],\n        [ new Parameter() ]\n      ]\n      const expected = [\n        [ new Parameter({ type: 'string', default: '' }), new Parameter({ key: 123 }) ],\n        [ new Parameter() ]\n      ]\n      const actual = inputs.map(__internals__.insertEmptyParameterIfNeeded)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPathEndpoint', () => {\n    it('should work', () => {\n      const input = [ 123, 123, 123 ]\n      const expected = new URL().set('pathname', new URLComponent({\n        componentName: 'pathname',\n        string: '',\n        parameter: new Parameter({\n          key: 'pathname',\n          in: 'path',\n          type: 'string',\n          superType: 'sequence',\n          value: List(input)\n        })\n      }))\n      const actual = __internals__.createPathEndpoint(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertPathComponentsIntoPathEndpoint', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertComponentEntryIntoStringOrParam').andReturn(345)\n      spyOn(__internals__, 'mergeSequencialStrings').andReturn([ 456, 456, 456 ])\n      spyOn(__internals__, 'convertStringOrParameterIntoParameter').andReturn(567)\n      spyOn(__internals__, 'insertEmptyParameterIfNeeded').andReturn(678)\n      spyOn(__internals__, 'createPathEndpoint').andReturn(234)\n\n      const request = { reqId: 234 }\n      const input = [ 123, 123, 123 ]\n      const expected = 234\n      const actual = __internals__.convertPathComponentsIntoPathEndpoint(request, input)\n\n      expect(__internals__.convertComponentEntryIntoStringOrParam.calls[0].arguments.slice(0, 2))\n        .toEqual([ request, 123 ])\n      expect(__internals__.mergeSequencialStrings.calls[1].arguments.slice(0, 2)).toEqual([\n        [ 456, 456, 456 ], 345\n      ])\n      expect(__internals__.convertStringOrParameterIntoParameter.calls[0].arguments.slice(0, 1))\n        .toEqual([ 456 ])\n      expect(__internals__.insertEmptyParameterIfNeeded).toHaveBeenCalledWith([ 567, 567, 567 ])\n      expect(__internals__.createPathEndpoint).toHaveBeenCalledWith(678)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if obtained sequence is empty', () => {\n      spyOn(__internals__, 'convertComponentEntryIntoStringOrParam').andReturn(345)\n      spyOn(__internals__, 'mergeSequencialStrings').andReturn([])\n      spyOn(__internals__, 'createDefaultPathEndpoint').andReturn(678)\n\n      const request = { reqId: 234 }\n      const input = [ 123, 123, 123 ]\n      const expected = 678\n      const actual = __internals__.convertPathComponentsIntoPathEndpoint(request, input)\n\n      expect(__internals__.convertComponentEntryIntoStringOrParam.calls[0].arguments.slice(0, 2))\n        .toEqual([ request, 123 ])\n      expect(__internals__.mergeSequencialStrings.calls[1].arguments.slice(0, 2)).toEqual([\n        [], 345\n      ])\n\n      expect(__internals__.createDefaultPathEndpoint).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractResourceFromPawRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractRequestMapFromPawRequest').andReturn(456)\n      spyOn(__internals__, 'convertPathComponentsIntoPathEndpoint').andReturn(567)\n\n      const context = {}\n      const reference = new Reference({ type: 'endpoint', uuid: 345 })\n      const input = { request: { id: 123 }, pathComponents: [ 234, 234, 234 ] }\n      const expected = { key: 123, value: new Resource({\n        endpoints: OrderedMap({ '345': reference }),\n        path: 567,\n        methods: 456\n      }) }\n\n      const actual = __internals__.extractResourceFromPawRequest(context, reference, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertHostEntriesIntoHostVariableAndRequestEntries', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractBaseVariableAndPathComponentsFromRequest').andCall(\n        (c, d, r, v) => v + 1\n      )\n      spyOn(__internals__, 'findBaseVariableForRequestEntries').andCall((acc, v) => {\n        acc.hostVariable = 234\n        acc.requestEntries.push(v * 2)\n        return acc\n      })\n\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/users'\n      const input = [ 123, 123, 123, 123 ]\n      const expected = { hostVariable: 234, requestEntries: [ 248, 248, 248, 248 ] }\n      const actual = __internals__.convertHostEntriesIntoHostVariableAndRequestEntries(\n        context, defaultHost, input\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDefaultHostEndpoint', () => {\n    it('should work', () => {\n      const defaultHost = 'echo.paw.cloud/users'\n      const input = [\n        { urlObject: { protocol: 'http' } },\n        { urlObject: { protocol: 'https' } },\n        { urlObject: { protocol: 'http' } }\n      ]\n\n      const expected = {\n        key: 'echo.paw.cloud/users',\n        value: new URL({\n          url: 'http://echo.paw.cloud/users'\n        }).set('protocol', List([ 'http', 'https' ]))\n      }\n      const actual = __internals__.createDefaultHostEndpoint(defaultHost, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getResourcesFromRequestEntries', () => {\n    it('should work with null hostVariable', () => {\n      spyOn(__internals__, 'extractResourceFromPawRequest').andCall((c, r, v) => v * 2)\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/users'\n      const hostVariable = null\n      const input = [ 123, 123, 123, 123 ]\n      const expected = [ 246, 246, 246, 246 ]\n      const actual = __internals__.getResourcesFromRequestEntries(\n        context, defaultHost, hostVariable, input\n      )\n      expect(actual).toEqual(expected)\n      expect(__internals__.extractResourceFromPawRequest.calls[0].arguments[1])\n        .toEqual(new Reference({\n          type: 'endpoint',\n          uuid: 'echo.paw.cloud/users'\n        }))\n    })\n\n    it('should work with hostVariable', () => {\n      spyOn(__internals__, 'extractResourceFromPawRequest').andCall((c, r, v) => v * 2)\n      const context = {}\n      const defaultHost = 'echo.paw.cloud/users'\n      const hostVariable = 678\n      const input = [ 123, 123, 123, 123 ]\n      const expected = [ 246, 246, 246, 246 ]\n      const actual = __internals__.getResourcesFromRequestEntries(\n        context, defaultHost, hostVariable, input\n      )\n      expect(actual).toEqual(expected)\n      expect(__internals__.extractResourceFromPawRequest.calls[0].arguments[1])\n        .toEqual(new Reference({\n          type: 'variable',\n          uuid: 'echo.paw.cloud/users'\n        }))\n    })\n  })\n\n  describe('@convertHostIntoResources', () => {\n    it('should work if obtained hostVariable is null', () => {\n      spyOn(__internals__, 'convertHostEntriesIntoHostVariableAndRequestEntries').andReturn({\n        hostVariable: null,\n        requestEntries: [ 456, 456, 456 ]\n      })\n      spyOn(__internals__, 'createDefaultHostEndpoint').andReturn(345)\n      spyOn(__internals__, 'getResourcesFromRequestEntries').andReturn(234)\n\n      const context = {}\n      const input = { key: 'echo.paw.cloud/users', value: [ 123, 123, 123 ] }\n      const expected = { resources: 234, variable: null, endpoint: 345 }\n      const actual = __internals__.convertHostIntoResources(context, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if obtained hostVariable is not null', () => {\n      spyOn(__internals__, 'convertHostEntriesIntoHostVariableAndRequestEntries').andReturn({\n        hostVariable: 567,\n        requestEntries: [ 456, 456, 456 ]\n      })\n      spyOn(__internals__, 'createDefaultHostEndpoint').andReturn(345)\n      spyOn(__internals__, 'getResourcesFromRequestEntries').andReturn(234)\n\n      const context = {}\n      const input = { key: 'echo.paw.cloud/users', value: [ 123, 123, 123 ] }\n      const expected = {\n        resources: 234,\n        variable: { key: 'echo.paw.cloud/users', value: 567 },\n        endpoint: null\n      }\n      const actual = __internals__.convertHostIntoResources(context, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getVariableFromUuid', () => {\n    it('should work', () => {\n      const request = { getVariableById: () => 246 }\n      const input = 123\n      const expected = 246\n      const actual = __internals__.getVariableFromUuid(request, input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if variable not found', () => {\n      /* eslint-disable no-undefined */\n      const request = { getVariableById: () => undefined }\n      /* eslint-enable no-undefined */\n      const input = 123\n      const expected = null\n      const actual = __internals__.getVariableFromUuid(request, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isRequestVariableDynamicValue', () => {\n    it('should work', () => {\n      const inputs = [\n        123,\n        { type: 'some.random.DV' },\n        { type: 'com.luckymarmot.RequestVariableDynamicValue' }\n      ]\n      const expected = [ false, false, true ]\n      const actual = inputs.map(__internals__.isRequestVariableDynamicValue)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isRequestVariableDS', () => {\n    it('should work', () => {\n      const inputs = [\n        { length: 2, components: [ 1, 2 ] },\n        { length: 1, components: [ 123 ] },\n        { length: 1, components: [ { type: 'some.random.DV' } ] },\n        { length: 1, components: [ { type: 'com.luckymarmot.RequestVariableDynamicValue' } ] },\n        { length: 2, components: [ { type: 'com.luckymarmot.RequestVariableDynamicValue' } ] }\n      ]\n      const expected = [ false, false, false, true, false ]\n      const actual = inputs.map(__internals__.isRequestVariableDS)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRequestVariableDVIntoParameter', () => {\n    it('should work if variable not found', () => {\n      const request = { getVariableById: () => null }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'UserId',\n          name: 'UserId',\n          type: 'string',\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const variable = {\n        name: 'userId',\n        value: { getEvaluatedString: () => 123 },\n        schema: 234,\n        type: 345,\n        description: 456\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userId',\n          name: 'userId',\n          type: 345,\n          description: 456,\n          default: 123,\n          constraints: List([\n            new Constraint.JSONSchema(234)\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should use paramName if variable has no name', () => {\n      const variable = {\n        value: { getEvaluatedString: () => 123 },\n        schema: 234,\n        type: 345,\n        description: 456\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'UserId',\n          name: 'UserId',\n          type: 345,\n          description: 456,\n          default: 123,\n          constraints: List([\n            new Constraint.JSONSchema(234)\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should set type to string if variable has no type', () => {\n      const variable = {\n        name: 'userId',\n        value: { getEvaluatedString: () => 123 },\n        schema: 234,\n        description: 456\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userId',\n          name: 'userId',\n          type: 'string',\n          description: 456,\n          default: 123,\n          constraints: List([\n            new Constraint.JSONSchema(234)\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore description if no description in variable', () => {\n      const variable = {\n        name: 'userId',\n        value: { getEvaluatedString: () => 123 },\n        schema: 234,\n        type: 345\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userId',\n          name: 'userId',\n          type: 345,\n          description: null,\n          default: 123,\n          constraints: List([\n            new Constraint.JSONSchema(234)\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should prefer schema default over value', () => {\n      const variable = {\n        name: 'userId',\n        value: { getEvaluatedString: () => 123 },\n        schema: { default: '' },\n        type: 345\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userId',\n          name: 'userId',\n          type: 345,\n          description: null,\n          default: '',\n          constraints: List([\n            new Constraint.JSONSchema({ default: '' })\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no schema', () => {\n      const variable = {\n        name: 'userId',\n        value: { getEvaluatedString: () => 123 },\n        schema: null,\n        type: 345\n      }\n      const request = { getVariableById: () => variable }\n      const location = 'queries'\n      const contexts = List([ 567, 567 ])\n      const paramName = 'UserId'\n      const input = { variableUUID: 678 }\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userId',\n          name: 'userId',\n          type: 345,\n          description: null,\n          default: 123,\n          constraints: List([\n            new Constraint.JSONSchema(null)\n          ]),\n          applicableContexts: List([ 567, 567 ])\n        })\n      }\n\n      const actual = __internals__.convertRequestVariableDVIntoParameter(\n        request, location, contexts, input, paramName\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRequestVariableDSIntoParameter', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertRequestVariableDVIntoParameter').andReturn(567)\n      const request = {}\n      const location = 123\n      const contexts = 234\n      const paramName = 345\n      const input = { components: [ 456 ] }\n      const expected = 567\n      const actual = __internals__.convertRequestVariableDSIntoParameter(\n        request, location, contexts, input, paramName)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStandardDSIntoParameter', () => {\n    it('should work', () => {\n      const location = 234\n      const contexts = 345\n      const paramName = 456\n      const input = { getEvaluatedString: () => 123 }\n      const expected = {\n        key: 456,\n        value: new Parameter({\n          in: 234,\n          key: 456,\n          name: 456,\n          type: 'string',\n          default: 123,\n          applicableContexts: 345\n        })\n      }\n      const actual = __internals__.convertStandardDSIntoParameter(\n        location, contexts, input, paramName)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterDynamicStringIntoParameter', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct (request variable)', () => {\n      spyOn(__internals__, 'isRequestVariableDS').andReturn(true)\n      spyOn(__internals__, 'convertRequestVariableDSIntoParameter').andReturn(567)\n      spyOn(__internals__, 'convertStandardDSIntoParameter').andReturn(678)\n\n      const request = {}\n      const location = 123\n      const contexts = 234\n      const paramName = 345\n      const input = 456\n      const expected = 567\n      const actual = __internals__.convertParameterDynamicStringIntoParameter(\n        request, location, contexts, input, paramName)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct (not a request variable)', () => {\n      spyOn(__internals__, 'isRequestVariableDS').andReturn(false)\n      spyOn(__internals__, 'convertRequestVariableDSIntoParameter').andReturn(567)\n      spyOn(__internals__, 'convertStandardDSIntoParameter').andReturn(678)\n\n      const request = {}\n      const location = 123\n      const contexts = 234\n      const paramName = 345\n      const input = 456\n      const expected = 678\n      const actual = __internals__.convertParameterDynamicStringIntoParameter(\n        request, location, contexts, input, paramName)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@isRequestBodyUrlEncoded', () => {\n    it('should work', () => {\n      const inputs = [\n        { getHeaderByName: () => null },\n        { getHeaderByName: () => 'application/json' },\n        { getHeaderByName: () => 'application/x-www-form-urlencoded' },\n        { getHeaderByName: () => 'application/x-www-form-urlencoded; charset=utf-8' }\n      ]\n      const expected = [ false, false, true, true ]\n      const actual = inputs.map(__internals__.isRequestBodyUrlEncoded)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isRequestBodyMultipart', () => {\n    it('should work', () => {\n      const inputs = [\n        { getHeaderByName: () => null },\n        { getHeaderByName: () => 'multipart/weird' },\n        { getHeaderByName: () => 'multipart/form-data' },\n        { getHeaderByName: () => 'multipart/form-data; charset=utf-8' }\n      ]\n      const expected = [ false, false, true, true ]\n      const actual = inputs.map(__internals__.isRequestBodyMultipart)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeContexts', () => {\n    it('should work', () => {\n      const input = 'some/Content-Type'\n      const expected = List([\n        new Parameter({\n          key: 'Content-Type',\n          name: 'Content-Type',\n          in: 'headers',\n          type: 'string',\n          constraints: List([\n            new Constraint.Enum([ 'some/Content-Type' ])\n          ])\n        })\n      ])\n      const actual = __internals__.getContentTypeContexts(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDefaultArrayParameter', () => {\n    it('should work', () => {\n      const contexts = 234\n      const input = 123\n      const expected = {\n        key: 123,\n        value: new Parameter({\n          key: 123,\n          name: 123,\n          in: 'body',\n          type: 'array',\n          format: 'multi',\n          value: new Parameter({\n            type: 'string'\n          }),\n          applicableContexts: 234\n        })\n      }\n      const actual = __internals__.createDefaultArrayParameter(contexts, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createUrlEncodedOrMultipartBodyParameters', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'createDefaultArrayParameter').andReturn({ key: 234, value: 345 })\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: 123, value: 456\n      })\n\n      const input = {\n        toto: 123,\n        titi: [ 234, 234 ]\n      }\n      const contexts = []\n      const request = {}\n\n      const expected = OrderedMap({\n        '234': 345,\n        '123': 456\n      })\n\n      const actual = __internals__.createUrlEncodedOrMultipartBodyParameters(\n        input, contexts, request\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createUrlEncodedBodyParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createUrlEncodedOrMultipartBodyParameters').andReturn(234)\n      const input = { getUrlEncodedBody: () => 123 }\n      const expected = 234\n      const actual = __internals__.createUrlEncodedBodyParameters(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createMultipartBodyParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createUrlEncodedOrMultipartBodyParameters').andReturn(234)\n      const input = { getMultipartBody: () => 123 }\n      const expected = 234\n      const actual = __internals__.createMultipartBodyParameters(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createStandardBodyParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: 234, value: 345\n      })\n      const input = { getBody: () => 123 }\n      const expected = OrderedMap({ '234': 345 })\n      const actual = __internals__.createStandardBodyParameters(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no Body DS found', () => {\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: 234, value: 345\n      })\n      const input = { getBody: () => null }\n      const expected = OrderedMap()\n      const actual = __internals__.createStandardBodyParameters(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getBodyParameters', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const urlEncoded = [ true, false, false ]\n      const multipart = [ true, false ]\n      spyOn(__internals__, 'isRequestBodyUrlEncoded').andCall(() => urlEncoded.shift())\n      spyOn(__internals__, 'isRequestBodyMultipart').andCall(() => multipart.shift())\n\n      spyOn(__internals__, 'createUrlEncodedBodyParameters').andReturn(123)\n      spyOn(__internals__, 'createMultipartBodyParameters').andReturn(234)\n      spyOn(__internals__, 'createStandardBodyParameters').andReturn(345)\n\n      const inputs = [ 1, 2, 3 ]\n      const expected = [ 123, 234, 345 ]\n      const actual = inputs.map(__internals__.getBodyParameters)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@getHeadersMapFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: '234',\n        value: 345\n      })\n      const input = { getHeaders: () => ({ '123': 123 }) }\n      const expected = OrderedMap({ '234': 345 })\n      const actual = __internals__.getHeadersMapFromRequest(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore Auth headers', () => {\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: '234',\n        value: 345\n      })\n      const input = { getHeaders: () => ({ Authorization: 123 }) }\n      const expected = OrderedMap()\n      const actual = __internals__.getHeadersMapFromRequest(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getQueriesMapFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterDynamicStringIntoParameter').andReturn({\n        key: '234',\n        value: 345\n      })\n      const input = { getUrlParameters: () => ({ '123': 123 }) }\n      const expected = OrderedMap({ '234': 345 })\n      const actual = __internals__.getQueriesMapFromRequest(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterContainerFromRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getHeadersMapFromRequest').andReturn(123)\n      spyOn(__internals__, 'getQueriesMapFromRequest').andReturn(234)\n      spyOn(__internals__, 'getBodyParameters').andReturn(345)\n\n      const input = { reqId: 123 }\n      const expected = new ParameterContainer({ headers: 123, queries: 234, body: 345 })\n      const actual = __internals__.extractParameterContainerFromRequest(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAuthNameFromOAuth2DV', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { grantType: 0 },\n        { grantType: 1,\n          authorizationURL: { getEvaluatedString: () => 'http://auth.paw.cloud/oauth' }\n        },\n        { grantType: 1,\n          authorizationURL: { getEvaluatedString: () => '' }\n        }\n      ]\n      const expected = [\n        'oauth_2_auth',\n        'oauth_2_code_auth',\n        'oauth_2_paw_implicit_auth',\n        'oauth_2_implicit_auth'\n      ]\n      const actual = inputs.map(__internals__.getAuthNameFromOAuth2DV)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAuthNameFromAuthDV', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const envVar = [ false, false, false, true ]\n      const reqVar = [ false, false, true, false ]\n\n      spyOn(__internals__, 'isEnvironmentVariable').andCall(() => envVar.shift())\n      spyOn(__internals__, 'isRequestVariableDynamicValue').andCall(() => reqVar.shift())\n\n      const context = { getEnvironmentVariableById: () => {} }\n      spyOn(context, 'getEnvironmentVariableById').andReturn({ name: 123 })\n\n      const request = { getVariableById: () => {} }\n      spyOn(request, 'getVariableById').andReturn(789)\n      spyOn(__internals__, 'getAuthNameFromAuth').andReturn(234)\n      spyOn(__internals__, 'getAuthNameFromOAuth2DV').andReturn(345)\n\n      const inputs = [\n        {},\n        { type: 'com.luckymarmot.OAuth2DynamicValue' },\n        {},\n        {}\n      ]\n      const expected = [\n        null,\n        345,\n        234,\n        123\n      ]\n      const actual = inputs.map(input => {\n        return __internals__.getAuthNameFromAuthDV(context, request, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@getAuthNameFromAuthString', () => {\n    it('should work', () => {\n      const inputs = [\n        { getEvaluatedString: () => 'Basic 12fb43bf1b2eb==' },\n        { getEvaluatedString: () => 'Digest realm=123' },\n        { getEvaluatedString: () => 'Hawk someVars' },\n        { getEvaluatedString: () => 'AWS4-HMAC-SHA256 stuff' },\n        { getEvaluatedString: () => 'OAuth version=1' },\n        { getEvaluatedString: () => 'Bearer 1251f21f21bceb123a123' },\n        { getEvaluatedString: () => 'Custom weird' }\n      ]\n      const expected = [\n        'basic_auth',\n        'digest_auth',\n        'hawk_auth',\n        'aws_sig4_auth',\n        'oauth_1_auth',\n        'oauth_2_auth',\n        null\n      ]\n      const actual = inputs.map(__internals__.getAuthNameFromAuthString)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAuthNameFromAuth', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getAuthNameFromAuthDV').andCall((c, r, dv) => dv.name)\n      spyOn(__internals__, 'getAuthNameFromAuthString').andReturn(123)\n\n      const context = {}\n      const request = {}\n      const inputs = [\n        { getOnlyDynamicValue: () => null },\n        { getOnlyDynamicValue: () => ({ type: 'some.random.DV' }) },\n        { getOnlyDynamicValue: () => ({ type: 'some.random.DV', name: 'auth_name' }) }\n      ]\n\n      const expected = [\n        123,\n        123,\n        'auth_name'\n      ]\n\n      const actual = inputs.map((input) => {\n        return __internals__.getAuthNameFromAuth(context, request, input)\n      })\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthReferencesFromRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getAuthNameFromAuth').andReturn(123)\n\n      const context = {}\n      const inputs = [\n        { getHeaderByName: () => { return null } },\n        { getHeaderByName: () => { return 'someDynamicString' } }\n      ]\n      const expected = [\n        List(),\n        List([ new Reference({ type: 'auth', uuid: 123 }) ])\n      ]\n\n      const actual = inputs.map(input => {\n        return __internals__.extractAuthReferencesFromRequest(context, input)\n      })\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestMapFromPawRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractParameterContainerFromRequest').andReturn(678)\n      spyOn(__internals__, 'extractAuthReferencesFromRequest').andReturn(789)\n      const context = {}\n      const endpoints = { '123': 234 }\n      const input = { id: 345, name: 456, description: 567, getMethod: () => 234 }\n      const expected = OrderedMap({\n        '234': new Request({\n          id: 345,\n          name: 456,\n          description: 567,\n          endpoints: OrderedMap({ '123': 234 }),\n          method: 234,\n          parameters: 678,\n          auths: 789\n        })\n      })\n      const actual = __internals__.extractRequestMapFromPawRequest(context, input, endpoints)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@groupResourcesVariablesAndEndpoints', () => {\n    it('should work', () => {\n      const inputs = [\n        { resources: [ 123, 234, 345 ], variable: null, endpoint: 321 },\n        { resources: [ 456, 567, 678 ], variable: 432, endpoint: null },\n        { resources: [ 789, 890, 901 ], variable: 543, endpoint: 654 },\n        { resources: [], variable: null, endpoint: null }\n      ]\n      const expected = {\n        resources: [ 123, 234, 345, 456, 567, 678, 789, 890, 901 ],\n        variables: [ 432, 543 ],\n        endpoints: [ 321, 654 ]\n      }\n      const actual = inputs.reduce(\n        __internals__.groupResourcesVariablesAndEndpoints,\n        { resources: [], variables: [], endpoints: [] }\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthFromOAuth2DV', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getAuthNameFromAuth').andReturn(567)\n\n      const context = {}\n      const request = {}\n      const authDS = {}\n\n      const inputs = [\n        {\n          grantType: 0\n        },\n        {\n          authorizationURL: { getEvaluatedString: () => null },\n          tokenURL: { getEvaluatedString: () => null },\n          grantType: 0\n        },\n        {\n          authorizationURL: { getEvaluatedString: () => null },\n          tokenURL: { getEvaluatedString: () => 123 },\n          grantType: 1\n        },\n        {\n          authorizationURL: { getEvaluatedString: () => 234 },\n          tokenURL: { getEvaluatedString: () => null },\n          grantType: 2\n        },\n        {\n          authorizationURL: { getEvaluatedString: () => 345 },\n          tokenURL: { getEvaluatedString: () => 456 },\n          grantType: 3\n        },\n        {\n          authorizationURL: { getEvaluatedString: () => 345 },\n          tokenURL: { getEvaluatedString: () => 456 },\n          grantType: 5\n        }\n      ]\n\n      const expected = [\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            flow: 'accessCode'\n          })\n        },\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            flow: 'accessCode'\n          })\n        },\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            tokenUrl: 123,\n            flow: 'implicit'\n          })\n        },\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            authorizationUrl: 234,\n            flow: 'password'\n          })\n        },\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            authorizationUrl: 345,\n            tokenUrl: 456,\n            flow: 'application'\n          })\n        },\n        {\n          key: 567,\n          value: new Auth.OAuth2({\n            authName: 567,\n            authorizationUrl: 345,\n            tokenUrl: 456,\n            flow: 'implicit'\n          })\n        }\n      ]\n\n      const actual = inputs.map(input => {\n        return __internals__.extractAuthFromOAuth2DV(context, request, authDS, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthFromDV', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const envVars = [ false, false, false, true ]\n      const reqVars = [ false, false, true, false ]\n      spyOn(__internals__, 'isEnvironmentVariable').andCall(() => envVars.shift())\n      spyOn(__internals__, 'isRequestVariableDynamicValue').andCall(() => reqVars.shift())\n\n      spyOn(__internals__, 'extractAuthsFromRequest').andCall((c, r, v) => v)\n      spyOn(__internals__, 'extractAuthFromOAuth2DV').andReturn(345)\n      spyOn(__internals__, 'extractAuthFromAuthString').andReturn(456)\n\n      const context = { getEnvironmentVariableById: () => ({ getCurrentValue: () => 123 }) }\n      const request = { getVariableById: () => ({ value: 234 }) }\n      const authDS = {}\n      const inputs = [\n        {},\n        { type: 'com.luckymarmot.OAuth2DynamicValue' },\n        {},\n        {}\n      ]\n\n      const expected = [ 456, 345, 234, 123 ]\n      const actual = inputs.map(input => {\n        return __internals__.extractAuthFromDV(context, request, authDS, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractAuthFromAuthString', () => {\n    it('should work', () => {\n      const inputs = [\n        { getEvaluatedString: () => 'Basic 12fb43bf1b2eb==' },\n        { getEvaluatedString: () => 'Digest realm=123' },\n        { getEvaluatedString: () => 'Hawk someVars' },\n        { getEvaluatedString: () => 'AWS4-HMAC-SHA256 stuff' },\n        { getEvaluatedString: () => 'OAuth version=1' },\n        { getEvaluatedString: () => 'Bearer 1251f21f21bceb123a123' },\n        { getEvaluatedString: () => 'Custom weird' }\n      ]\n      const expected = [\n        { key: 'basic_auth', value: new Auth.Basic({ authName: 'basic_auth' }) },\n        { key: 'digest_auth', value: new Auth.Digest({ authName: 'digest_auth' }) },\n        { key: 'hawk_auth', value: new Auth.Hawk({ authName: 'hawk_auth' }) },\n        { key: 'aws_sig4_auth', value: new Auth.AWSSig4({ authName: 'aws_sig4_auth' }) },\n        { key: 'oauth_1_auth', value: new Auth.OAuth1({ authName: 'oauth_1_auth' }) },\n        { key: 'oauth_2_auth', value: new Auth.OAuth2({ authName: 'oauth_2_auth' }) },\n        { key: null, value: null }\n      ]\n\n      const actual = inputs.map(__internals__.extractAuthFromAuthString)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthsFromRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractAuthFromDV').andCall((c, r, d, v) => v * 2)\n      spyOn(__internals__, 'extractAuthFromAuthString').andReturn(345)\n\n      const inputs = [\n        null,\n        null,\n        { getOnlyDynamicValue: () => null },\n        { getOnlyDynamicValue: () => 123 }\n      ]\n\n      const authDSs = [\n        { getOnlyDynamicValue: () => null },\n        { getOnlyDynamicValue: () => 234 }\n      ]\n\n      const context = {}\n      const request = { getHeaderByName: () => authDSs.shift() }\n\n      const expected = [ 345, 468, 345, 246 ]\n      const actual = inputs.map(input => {\n        return __internals__.extractAuthsFromRequest(context, request, input)\n      })\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResources', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractCommonHostsFromRequests').andReturn([ 123, 123, 123 ])\n      spyOn(__internals__, 'convertHostIntoResources').andReturn(234)\n      spyOn(__internals__, 'groupResourcesVariablesAndEndpoints').andReturn({\n        resources: [\n          { key: 'abc', value: 123 },\n          { key: 'def', value: 456 },\n          { key: 'ghi', value: 789 }\n        ],\n        variables: 321,\n        endpoints: 432\n      })\n\n      const context = {}\n      const input = []\n      const expected = {\n        resources: OrderedMap({ abc: 123, def: 456, ghi: 789 }),\n        variables: 321,\n        endpoints: 432\n      }\n\n      const actual = __internals__.extractResources(context, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractStore', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractAuthsFromRequest').andCall((c, r) => {\n        const v = r.getHeaderByName()\n        return { key: v, value: 2 * v }\n      })\n\n      const context = {}\n      const variables = [\n        { key: 'abc', value: 123 },\n        { key: 'def', value: 456 }\n      ]\n      const endpoints = [\n        { key: 'adf', value: 147 },\n        { key: 'fed', value: 654 }\n      ]\n      const input = [\n        { getHeaderByName: () => null },\n        { getHeaderByName: () => 123 },\n        { getHeaderByName: () => 234 }\n      ]\n\n      const expected = new Store({\n        variable: OrderedMap({ abc: 123, def: 456 }),\n        endpoint: OrderedMap({ adf: 147, fed: 654 }),\n        auth: OrderedMap({ '123': 246, '234': 468 })\n      })\n\n      const actual = __internals__.extractStore(context, variables, endpoints, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourcesAndStore', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractResources').andReturn({ resources: 123 })\n      spyOn(__internals__, 'extractStore').andReturn(234)\n\n      const context = {}\n      const input = []\n      const expected = { resources: 123, store: 234 }\n\n      const actual = __internals__.extractResourcesAndStore(context, input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@parse', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'extractInfo').andReturn(123)\n      spyOn(__internals__, 'extractGroup').andReturn(234)\n      spyOn(__internals__, 'extractResourcesAndStore').andReturn({ resources: 345, store: 456 })\n\n      const options = { context: {}, reqs: [] }\n      const input = { options }\n\n      const expected = {\n        options,\n        api: new Api({\n          info: 123,\n          group: 234,\n          resources: 345,\n          store: 456\n        })\n      }\n\n      const actual = __internals__.parse(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n/* eslint-enable require-jsdoc */\n"
  },
  {
    "path": "src/parsers/postman/v2.0/Parser.js",
    "content": "import { OrderedMap, Set, List } from 'immutable'\nimport { convertEntryListInMap, flatten } from '../../../utils/fp-utils'\n\nimport Api from '../../../models/Api'\nimport Info from '../../../models/Info'\nimport Group from '../../../models/Group'\nimport Store from '../../../models/Store'\nimport Parameter from '../../../models/Parameter'\nimport Reference from '../../../models/Reference'\nimport Resource from '../../../models/Resource'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Auth from '../../../models/Auth'\nimport URL from '../../../models/URL'\nimport Request from '../../../models/Request'\nimport Constraint from '../../../models/Constraint'\n\nconst methods = {}\n\nexport const __meta__ = {\n  version: 'v2.0',\n  format: 'postman-collection'\n}\n\n/**\n * A Parser that converts Postman collection v2.0 formatted objects into Api Records\n */\nexport class PostmanCollectionV2Parser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(content) {\n    return methods.detect(content)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(content) {\n    return methods.getAPIName(content)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse() {\n    return methods.parse(...arguments)\n  }\n}\n\n/**\n * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n * @param {string} content: the content of the file to evaluate\n * @returns {number} the corresponding score, between 0 and 1\n */\nmethods.detect = (content) => {\n  const detection = {\n    format: __meta__.format,\n    version: __meta__.version,\n    score: 0\n  }\n\n  try {\n    const json = JSON.parse(content)\n    if (!json.info || !json.item) {\n      return [ detection ]\n    }\n\n    if (!json.info.name || !json.info.schema) {\n      return [ detection ]\n    }\n\n    detection.score = 1\n    return [ detection ]\n  }\n  catch (e) {\n    return [ detection ]\n  }\n}\n\n/**\n * tries to extract a title from a RAML file\n * @param {string} content: the file to get the api title from\n * @returns {string?} the title, if it was found\n */\nmethods.getAPIName = (content) => {\n  try {\n    const json = JSON.parse(content)\n    if (!json.info || !json.item) {\n      return null\n    }\n\n    if (!json.info.name || !json.info.schema) {\n      return null\n    }\n\n    return json.info.name\n  }\n  catch (e) {\n    return null\n  }\n}\n\nmethods.extractInfoTitle = (collection) => {\n  if (!collection || !collection.info || !collection.info.name) {\n    return null\n  }\n\n  return { key: 'title', value: collection.info.name }\n}\n\nmethods.extractInfoDescriptionFromDescriptionString = (description) => {\n  return { key: 'description', value: description }\n}\n\nmethods.extractInfoDescriptionFromDescriptionObject = (description) => {\n  if (!description.content) {\n    return null\n  }\n\n  return { key: 'description', value: description.content }\n}\n\nmethods.extractInfoDescription = (collection) => {\n  if (!collection || !collection.info || !collection.info.description) {\n    return null\n  }\n\n  const description = collection.info.description\n  if (typeof description === 'string') {\n    return methods.extractInfoDescriptionFromDescriptionString(description)\n  }\n\n  return methods.extractInfoDescriptionFromDescriptionObject(description)\n}\n\nmethods.extractInfoTermsOfService = () => null\nmethods.extractInfoContact = () => null\nmethods.extractInfoLicense = () => null\n\nmethods.extractInfoVersionFromVersionString = (version) => {\n  return { key: 'version', value: version }\n}\n\nmethods.extractInfoVersionFromVersionObject = (version) => {\n  if (!version.major && !version.minor && !version.patch) {\n    return null\n  }\n\n  const versionNumber =\n    (version.major || '0') + '.' +\n    (version.minor || '0') + '.' +\n    (version.patch || '0')\n  return { key: 'version', value: versionNumber }\n}\n\nmethods.extractInfoVersion = (collection) => {\n  if (!collection || !collection.info || !collection.info.version) {\n    return null\n  }\n\n  const version = collection.info.version\n  if (typeof version === 'string') {\n    return methods.extractInfoVersionFromVersionString(version)\n  }\n\n  return methods.extractInfoVersionFromVersionObject(version)\n}\n\nmethods.extractInfoInstance = (collection) => {\n  const kvs = [\n    methods.extractInfoTitle(collection),\n    methods.extractInfoDescription(collection),\n    methods.extractInfoTermsOfService(collection),\n    methods.extractInfoContact(collection),\n    methods.extractInfoLicense(collection),\n    methods.extractInfoVersion(collection)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractInfo = (collection) => {\n  const infoInstance = methods.extractInfoInstance(collection)\n\n  return { key: 'info', value: new Info(infoInstance) }\n}\n\nmethods.extractGroupId = () => null\n\nmethods.extractGroupName = (itemGroup) => {\n  if (!itemGroup || !itemGroup.name) {\n    return null\n  }\n\n  return { key: 'name', value: itemGroup.name }\n}\n\nmethods.extractGroupDescription = (itemGroup) => {\n  if (!itemGroup || !itemGroup.description) {\n    return null\n  }\n\n  return { key: 'description', value: itemGroup.description }\n}\n\nmethods.isItem = (itemOrItemGroup) => !!(itemOrItemGroup || {}).request\n\nmethods.extractGroupResourceChildren = (item) => {\n  const id = item.id || item.name || null\n  return { key: id, value: id }\n}\n\nmethods.extractGroupChildrenEntry = (itemOrItemGroup) => {\n  if (methods.isItem(itemOrItemGroup)) {\n    return methods.extractGroupResourceChildren(itemOrItemGroup)\n  }\n\n  return methods.extractGroup(itemOrItemGroup)\n}\n\nmethods.extractGroupChildren = (itemGroup) => {\n  if (!itemGroup.item || !Array.isArray(itemGroup.item)) {\n    return null\n  }\n\n  const children = itemGroup.item\n    .map(methods.extractGroupChildrenEntry)\n    .filter(v => !!v)\n\n  if (!children.length) {\n    return null\n  }\n\n  const childrenMap = OrderedMap(children.reduce(convertEntryListInMap, {}))\n  return { key: 'children', value: childrenMap }\n}\n\nmethods.extractGroupInstance = (itemGroup) => {\n  const kvs = [\n    methods.extractGroupId(itemGroup),\n    methods.extractGroupName(itemGroup),\n    methods.extractGroupDescription(itemGroup),\n    methods.extractGroupChildren(itemGroup)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractGroup = (collectionOrItemGroup) => {\n  const key = collectionOrItemGroup.name || 'group'\n  const groupInstance = methods.extractGroupInstance(collectionOrItemGroup)\n\n  return { key, value: new Group(groupInstance) }\n}\n\nmethods.extractParameterInstanceFromVariable = (variable) => {\n  const validTypes = [ 'integer', 'number', 'string', 'boolean', 'array' ]\n  const type = validTypes.indexOf(variable.type) < 0 ? 'string' : variable.type\n\n  return {\n    key: variable.id || variable.name || null,\n    name: variable.name || null,\n    type,\n    default: variable.value || null\n  }\n}\n\nmethods.extractParameterEntryFromVariable = (variable) => {\n  const key = variable.id || variable.name || null\n  const parameterInstance = methods.extractParameterInstanceFromVariable(variable)\n\n  return { key, value: new Parameter(parameterInstance) }\n}\n\nmethods.extractParameterTypedStore = (collection) => {\n  if (!collection || !collection.variable || !Array.isArray(collection.variable)) {\n    return null\n  }\n\n  const params = collection.variable.map(methods.extractParameterEntryFromVariable)\n  return { key: 'parameter', value: OrderedMap(params.reduce(convertEntryListInMap, {})) }\n}\n\nmethods.extractEndpointTypedStore = (endpoints) => {\n  const endpointMap = endpoints.reduce(convertEntryListInMap, {})\n\n  return { key: 'endpoint', value: OrderedMap(endpointMap) }\n}\n\nmethods.extractAWSSig4AuthFromAuth = (auth) => {\n  const authSettings = auth.awsv4 || {}\n  return {\n    key: auth.type,\n    value: new Auth.AWSSig4({\n      authName: auth.type,\n      key: authSettings.accessKey || null,\n      secret: authSettings.secretKey || null,\n      region: authSettings.region || null,\n      service: authSettings.service || null\n    })\n  }\n}\n\nmethods.extractBasicAuthFromAuth = (auth) => {\n  const authSettings = auth.basic || {}\n  return {\n    key: auth.type,\n    value: new Auth.Basic({\n      authName: auth.type,\n      username: authSettings.username || null,\n      password: authSettings.password || null\n    })\n  }\n}\n\nmethods.extractDigestAuthFromAuth = (auth) => {\n  const authSettings = auth.digest || {}\n  return {\n    key: auth.type,\n    value: new Auth.Digest({\n      authName: auth.type,\n      username: authSettings.username || null,\n      password: authSettings.password || null\n    })\n  }\n}\n\nmethods.extractHawkAuthFromAuth = (auth) => {\n  const authSettings = auth.hawk || {}\n  return {\n    key: auth.type,\n    value: new Auth.Hawk({\n      authName: auth.type,\n      id: authSettings.authId || null,\n      key: authSettings.authKey || null,\n      algorithm: authSettings.algorithm || null\n    })\n  }\n}\n\nmethods.extractOAuth1AuthFromAuth = (auth) => {\n  const authSettings = auth.oauth1 || {}\n  return {\n    key: auth.type,\n    value: new Auth.OAuth1({\n      authName: auth.type,\n      consumerSecret: authSettings.consumerSecret || null,\n      consumerKey: authSettings.consumerKey || null,\n      token: authSettings.token || null,\n      tokenSecret: authSettings.tokenSecret || null\n    })\n  }\n}\n\nmethods.extractOAuth2AuthFromAuth = (auth) => {\n  const authSettings = auth.oauth2 || {}\n  return {\n    key: auth.type,\n    value: new Auth.OAuth2({\n      authName: auth.type,\n      authorizationUrl: authSettings.authUrl || null,\n      tokenUrl: authSettings.accessTokenUrl || null\n    })\n  }\n}\n\n/* eslint-disable max-statements */\nmethods.extractAuthFromPostmanAuth = (auth) => {\n  if (auth.type === 'awsv4') {\n    return methods.extractAWSSig4AuthFromAuth(auth)\n  }\n\n  if (auth.type === 'basic') {\n    return methods.extractBasicAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'digest') {\n    return methods.extractDigestAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'hawk') {\n    return methods.extractHawkAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'noauth') {\n    return null\n  }\n\n  if (auth.type === 'oauth1') {\n    return methods.extractOAuth1AuthFromAuth(auth)\n  }\n\n  if (auth.type === 'oauth2') {\n    return methods.extractOAuth2AuthFromAuth(auth)\n  }\n\n  return null\n}\n/* eslint-enable max-statements */\n\nmethods.extractAuthTypedStore = (items) => {\n  const auths = items\n    .map(item => ((item || {}).request || {}).auth)\n    .filter(v => !!v)\n    .map(methods.extractAuthFromPostmanAuth)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'auth', value: OrderedMap(auths) }\n}\n\nmethods.extractConstraintTypedStore = (collection) => {\n  const constraints = OrderedMap(collection.globals || {}).map((_, key) => {\n    return new Constraint.JSONSchema({\n      title: key\n    })\n  })\n\n  return { key: 'constraint', value: constraints }\n}\n\nmethods.extractStoreInstance = (items, endpoints, collection) => {\n  const kvs = [\n    methods.extractParameterTypedStore(collection),\n    methods.extractEndpointTypedStore(endpoints),\n    methods.extractAuthTypedStore(items),\n    methods.extractConstraintTypedStore(collection)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractStore = (items, endpoints, collection) => {\n  const storeInstance = methods.extractStoreInstance(items, endpoints, collection)\n  return { key: 'store', value: new Store(storeInstance) }\n}\n\nmethods.extractItems = (items, itemGroup) => {\n  if (itemGroup.request) {\n    items.push(itemGroup)\n    return items\n  }\n\n  if (!itemGroup.item || !Array.isArray(itemGroup.item)) {\n    return items\n  }\n\n  return itemGroup.item.reduce(($items, itemOrItemGroup) => {\n    return methods.extractItems($items, itemOrItemGroup)\n  }, items)\n}\n\nmethods.findLongestCommonPath = (lcPathname, pathname) => {\n  const sections = pathname.split('/')\n\n  const length = Math.min(lcPathname.length, sections.length)\n\n  let index = 0\n  while (index < length) {\n    if (lcPathname[index] !== sections[index]) {\n      return lcPathname.slice(0, index)\n    }\n\n    index += 1\n  }\n\n  return lcPathname.slice(0, index)\n}\n\nmethods.addHostEntryToHostMap = (hostMap, { key, value }) => {\n  const hostname = key.get('hostname') ? key.get('hostname').generate(List([ '{{', '}}' ])) : ''\n  const port = key.get('port') ? ':' + key.get('port').generate(List([ '{{', '}}' ])) : ''\n  const host = hostname + port\n  const pathname = key.get('pathname') ? key.get('pathname').generate(List([ '{{', '}}' ])) : ''\n\n  if (!hostMap[host]) {\n    hostMap[host] = { entries: [], lcPathname: pathname.split('/') }\n  }\n\n  const lcPathname = hostMap[host].lcPathname\n\n  hostMap[host].entries.push({ key, value })\n  hostMap[host].lcPathname = methods.findLongestCommonPath(lcPathname, pathname)\n  return hostMap\n}\n\nmethods.getLongestCommonPathnameAsString = (lcPathname) => {\n  if (lcPathname.length === 1) {\n    return '/' + lcPathname[0]\n  }\n\n  return lcPathname.join('/')\n}\n\nmethods.updateHostKeyWithLongestCommonPathname = ({ entries, lcPathname }, key) => {\n  const lcString = methods.getLongestCommonPathnameAsString(lcPathname)\n  return {\n    key: key + lcString,\n    value: entries\n  }\n}\n\nmethods.extractCommonHostsFromRequests = (items) => {\n  const hosts = items\n    .map(item => {\n      return {\n        key: new URL({\n          url: item.request.urlString,\n          variableDelimiters: List([ '{{', '}}', ':' ])\n        }),\n        value: item\n      }\n    })\n    .reduce(methods.addHostEntryToHostMap, {})\n\n  return OrderedMap(hosts).map(methods.updateHostKeyWithLongestCommonPathname).valueSeq().toList()\n}\n\nmethods.createEndpointFromHost = (host, entries) => {\n  const url = 'http://' + host\n\n  const endpoint = new URL({\n    url,\n    variableDelimiters: List([ '{{', '}}', ':' ])\n  })\n\n  const protocols = entries\n    .map(({ key }) => key.get('protocol').toJS())\n    .reduce(flatten, [])\n\n  const urlProtocols = Set(protocols).toList()\n  return { key: host, value: endpoint.set('protocol', urlProtocols) }\n}\n\nmethods.extractResourceEndpointsFromItem = (host) => {\n  const reference = new Reference({\n    type: 'endpoint',\n    uuid: host\n  })\n\n  return { key: 'endpoints', value: OrderedMap({ [host]: reference }) }\n}\n\n// TODO deal with :pathParams in pathname\nmethods.extractResourcePathFromItem = (host, item) => {\n  const url = item.request.urlString\n  const hostPosition = url.match(host)\n  if (!hostPosition) {\n    return { key: 'path', value: new URL({ url: '/' }) }\n  }\n\n  const remainingIndex = hostPosition.index + host.length\n  const path = url.slice(remainingIndex)\n  const normalizedPath = (path[0] !== '/' ? '/' + path : path).split('?')[0]\n\n  return {\n    key: 'path',\n    value: new URL({\n      url: normalizedPath,\n      variableDelimiters: List([ '{{', '}}', ':' ])\n    })\n  }\n}\n\nmethods.extractResourceDescriptionFromItem = () => null\n\nmethods.extractRequestNameFromItem = (item) => {\n  if (!item || !item.name) {\n    return null\n  }\n\n  return { key: 'name', value: item.name }\n}\n\nmethods.extractRequestDescriptionFromItem = (item) => {\n  if (!item || !(item.description || (item.request || {}).description)) {\n    return null\n  }\n\n  const description = item.description || item.request.description\n  return { key: 'description', value: description }\n}\n\nmethods.extractParameterEntryFromQueryParameter = ({ key, value }) => {\n  if (!key) {\n    return null\n  }\n\n  let $default = value || null\n  const match = (value + '').match(/^{{([^{}]*)}}$/)\n  let constraints = List()\n  if (match) {\n    constraints = List([ new Constraint.JSONSchema({ $ref: '#/definitions/' + match[1] }) ])\n    $default = null\n  }\n\n  const $value = new Parameter({\n    key,\n    name: key,\n    type: 'string',\n    default: $default,\n    constraints\n  })\n\n  return { key, value: $value }\n}\n\nmethods.extractQueryBlockFromQueryParams = (queryParams) => {\n  if (!queryParams || !queryParams.length) {\n    return null\n  }\n\n  const block = queryParams\n    .map(methods.extractParameterEntryFromQueryParameter)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'queries', value: OrderedMap(block) }\n}\n\nmethods.extractDefaultAndConstraintsValuesFromHeaderString = (value) => {\n  const trimmed = ((value || '') + '').trim()\n  let $default = trimmed || null\n  const match = trimmed.match(/^{{([^{}]*)}}$/)\n  let constraints = List()\n  if (match) {\n    constraints = List([ new Constraint.JSONSchema({ $ref: '#/definitions/' + match[1] }) ])\n    $default = null\n  }\n\n  return { default: $default, constraints }\n}\n\nmethods.extractHeaderParameterFromString = (line) => {\n  const [ key, value = '' ] = line.split(':')\n\n  if (!key) {\n    return null\n  }\n\n  const {\n    default: $default,\n    constraints\n  } = methods.extractDefaultAndConstraintsValuesFromHeaderString(value)\n\n  const $value = new Parameter({\n    key: key.trim(),\n    name: key.trim(),\n    type: 'string',\n    default: $default,\n    constraints\n  })\n  return { key, value: $value }\n}\n\nmethods.extractHeaderBlockFromHeaderString = (headerString) => {\n  const lines = headerString.split('\\n')\n  const block = lines\n    .map(methods.extractHeaderParameterFromString)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'headers', value: OrderedMap(block) }\n}\n\nmethods.extractHeaderParameterFromObject = (header) => {\n  if (!header || !header.key) {\n    return null\n  }\n\n  const key = header.key\n  const {\n    default: $default,\n    constraints\n  } = methods.extractDefaultAndConstraintsValuesFromHeaderString(header.value)\n\n  const value = new Parameter({\n    key: key.trim(),\n    name: key.trim(),\n    type: 'string',\n    default: $default,\n    constraints\n  })\n  return { key, value }\n}\n\nmethods.extractHeaderParameter = (header) => {\n  if (typeof header === 'string') {\n    return methods.extractHeaderParameterFromString(header)\n  }\n\n  return methods.extractHeaderParameterFromObject(header)\n}\n\nmethods.extractHeaderBlockFromHeaderArray = (headerArray) => {\n  const block = headerArray\n    .map(methods.extractHeaderParameter)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'headers', value: OrderedMap(block) }\n}\n\nmethods.extractHeaderBlockFromHeaders = (headers) => {\n  if (!headers) {\n    return null\n  }\n\n  if (typeof headers === 'string') {\n    return methods.extractHeaderBlockFromHeaderString(headers)\n  }\n\n  if (!Array.isArray(headers) || !headers.length) {\n    return null\n  }\n\n  return methods.extractHeaderBlockFromHeaderArray(headers)\n}\n\nmethods.extractBodyParameterFromUrlEncodedOrFormDataBody = ({ key, value }) => {\n  if (!key) {\n    return null\n  }\n\n  const $value = new Parameter({\n    key,\n    name: key,\n    type: 'string',\n    default: value\n  })\n\n  return { key, value: $value }\n}\n\nmethods.extractBodyBlockFromUrlEncodedOrFormDataBody = (body) => {\n  const block = (body[body.mode] || [])\n    .map(methods.extractBodyParameterFromUrlEncodedOrFormDataBody)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'body', value: OrderedMap(block) }\n}\n\nmethods.extractBodyBlockFromFileBody = (body) => {\n  const block = {\n    file: new Parameter({ type: 'string', default: ((body || {}).file || {}).content || null })\n  }\n\n  return { key: 'body', value: OrderedMap(block) }\n}\n\nmethods.extractBodyBlockFromRawBody = (body) => {\n  const block = {\n    raw: new Parameter({ type: 'string', default: (body || {}).raw || null })\n  }\n\n  return { key: 'body', value: OrderedMap(block) }\n}\n\nmethods.extractBodyBlockFromBody = (body) => {\n  if (!body) {\n    return null\n  }\n\n  if (body.mode === 'urlencoded' || body.mode === 'formdata') {\n    return methods.extractBodyBlockFromUrlEncodedOrFormDataBody(body)\n  }\n\n  if (body.mode === 'file') {\n    return methods.extractBodyBlockFromFileBody(body)\n  }\n\n  if (body.mode === 'raw') {\n    return methods.extractBodyBlockFromRawBody(body)\n  }\n\n  return null\n}\n\nmethods.extractRequestParameterContainerInstanceFromItem = (item) => {\n  const kvs = [\n    methods.extractQueryBlockFromQueryParams((((item || {}).request || {}).url || {}).query),\n    methods.extractHeaderBlockFromHeaders(((item || {}).request || {}).header),\n    methods.extractBodyBlockFromBody(((item || {}).request || {}).body)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractRequestParametersFromItem = (item) => {\n  const key = 'parameters'\n  const parameterContainerInstance = methods.extractRequestParameterContainerInstanceFromItem(item)\n\n  return { key, value: new ParameterContainer(parameterContainerInstance) }\n}\n\n// TODO\nmethods.extractAuthRefsFromAWSV4Auth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromBasicAuth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromDigestAuth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromHawkAuth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromNoAuthAuth = () => {\n  return {\n    key: 'auths',\n    value: List([\n      null\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromOAuth1Auth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\nmethods.extractAuthRefsFromOAuth2Auth = (auth) => {\n  return {\n    key: 'auths',\n    value: List([\n      new Reference({\n        type: 'auth',\n        uuid: auth.type\n      })\n    ])\n  }\n}\n\n/* eslint-disable max-statements */\nmethods.extractAuthsFromItem = (item) => {\n  const auth = ((item || {}).request || {}).auth\n  if (!auth) {\n    return null\n  }\n\n  if (auth.type === 'awsv4') {\n    return methods.extractAuthRefsFromAWSV4Auth(auth)\n  }\n\n  if (auth.type === 'basic') {\n    return methods.extractAuthRefsFromBasicAuth(auth)\n  }\n\n  if (auth.type === 'digest') {\n    return methods.extractAuthRefsFromDigestAuth(auth)\n  }\n\n  if (auth.type === 'hawk') {\n    return methods.extractAuthRefsFromHawkAuth(auth)\n  }\n\n  if (auth.type === 'noauth') {\n    return methods.extractAuthRefsFromNoAuthAuth(auth)\n  }\n\n  if (auth.type === 'oauth1') {\n    return methods.extractAuthRefsFromOAuth1Auth(auth)\n  }\n\n  if (auth.type === 'oauth2') {\n    return methods.extractAuthRefsFromOAuth2Auth(auth)\n  }\n\n  return null\n}\n/* eslint-enable max-statements */\n\nmethods.extractRequestMethodFromItem = (item) => {\n  const method = (((item || {}).request || {}).method || 'get').toLowerCase()\n\n  return { key: 'method', value: method }\n}\n\nmethods.extractRequestInstanceFromItem = (endpointsEntry, item) => {\n  const kvs = [\n    endpointsEntry,\n    methods.extractRequestNameFromItem(item),\n    methods.extractRequestDescriptionFromItem(item),\n    methods.extractRequestParametersFromItem(item),\n    methods.extractRequestMethodFromItem(item),\n    methods.extractAuthsFromItem(item)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractRequestFromItem = (endpointsEntry, item) => {\n  const requestInstance = methods.extractRequestInstanceFromItem(endpointsEntry, item)\n\n  return new Request(requestInstance)\n}\n\nmethods.extractResourceMethodsFromItem = (endpointsEntry, item) => {\n  const { value: method } = methods.extractRequestMethodFromItem(item)\n  const request = methods.extractRequestFromItem(endpointsEntry, item)\n\n  return { key: 'methods', value: OrderedMap({ [method]: request }) }\n}\n\nmethods.extractResourceInstanceFromItem = (host, item) => {\n  const endpointsEntry = methods.extractResourceEndpointsFromItem(host)\n  const kvs = [\n    endpointsEntry,\n    methods.extractResourcePathFromItem(host, item),\n    methods.extractResourceDescriptionFromItem(item),\n    methods.extractResourceMethodsFromItem(endpointsEntry, item)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.extractResourceFromItem = (host, item) => {\n  const key = item.id || item.name || null\n  const resourceInstance = methods.extractResourceInstanceFromItem(host, item)\n\n  return { key, value: new Resource(resourceInstance) }\n}\n\nmethods.getResourcesFromItemEntries = (host, entries) => {\n  return entries.map(({ value }) => methods.extractResourceFromItem(host, value))\n}\n\nmethods.convertHostIntoResources = ({ key: host, value: entries }) => {\n  const endpoint = methods.createEndpointFromHost(host, entries)\n  const resources = methods.getResourcesFromItemEntries(host, entries)\n\n  return { resources, endpoint }\n}\n\nmethods.groupResourcesAndEndpoints = (\n  { resources, endpoints },\n  { resources: hostResources, endpoint }\n) => {\n  endpoints.push(endpoint)\n  return { resources: resources.concat(hostResources || []), endpoints }\n}\n\nmethods.mergeResources = (resourceMap, { key, value }) => {\n  if (resourceMap[key]) {\n    const $methods = resourceMap[key].get('methods')\n    const merged = $methods.merge(value.get('methods'))\n    resourceMap[key] = resourceMap[key].set('methods', merged)\n  }\n  else {\n    resourceMap[key] = value\n  }\n\n  return resourceMap\n}\n\nmethods.extractResources = (collection) => {\n  const items = methods.extractItems([], collection)\n\n  const hosts = methods.extractCommonHostsFromRequests(items)\n  const { resources, endpoints } = hosts\n    .map(methods.convertHostIntoResources)\n    .reduce(methods.groupResourcesAndEndpoints, { resources: [], endpoints: [] })\n\n\n  const resourceMap = OrderedMap(resources.reduce(methods.mergeResources, {}))\n  return { resources: resourceMap, endpoints, items }\n}\n\nmethods.extractApi = (collection) => {\n  const { resources, endpoints, items } = methods.extractResources(collection)\n  const kvs = [\n    methods.extractInfo(collection),\n    methods.extractGroup(collection),\n    methods.extractStore(items, endpoints, collection),\n    { key: 'resources', value: resources }\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.parse = ({ options, item }) => {\n  const apiInstance = methods.extractApi(item)\n\n  return { options, api: new Api(apiInstance) }\n}\n\nexport const __internals__ = methods\nexport default PostmanCollectionV2Parser\n"
  },
  {
    "path": "src/parsers/postman/v2.0/__tests__/Parser.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport { OrderedMap, List } from 'immutable'\nimport expect, { spyOn, restoreSpies } from 'expect'\n\nimport Info from '../../../../models/Info'\nimport Constraint from '../../../../models/Constraint'\nimport Group from '../../../../models/Group'\nimport Parameter from '../../../../models/Parameter'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Auth from '../../../../models/Auth'\nimport Store from '../../../../models/Store'\nimport URL from '../../../../models/URL'\nimport Reference from '../../../../models/Reference'\nimport Request from '../../../../models/Request'\nimport Resource from '../../../../models/Resource'\nimport Api from '../../../../models/Api'\n\nimport Parser, { __internals__ } from '../Parser'\n\ndescribe('parsers/postman/v2.0/Parser.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Parser }', () => {\n    describe('@detect', () => {\n      it('should call __internals__.detect', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const actual = Parser.detect()\n\n        expect(__internals__.detect).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.detect with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const content = 'some content'\n        const actual = Parser.detect(content)\n\n        expect(__internals__.detect).toHaveBeenCalledWith(content)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@getAPIName', () => {\n      it('should call __internals__.getAPIName', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const actual = Parser.getAPIName()\n\n        expect(__internals__.getAPIName).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.getAPIName with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const content = 'some content'\n        const actual = Parser.getAPIName(content)\n\n        expect(__internals__.getAPIName).toHaveBeenCalledWith(content)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@parse', () => {\n      it('should call __internals__.parse', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const actual = Parser.parse()\n\n        expect(__internals__.parse).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.parse with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const options = { context: 123, items: 321, options: 234 }\n        const actual = Parser.parse({ options })\n\n        expect(__internals__.parse).toHaveBeenCalledWith({ options })\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@detect', () => {\n    it('should work', () => {\n      const inputs = [\n        'some weird content',\n        JSON.stringify({}),\n        JSON.stringify({ info: 123 }),\n        JSON.stringify({ item: 234 }),\n        JSON.stringify({ info: 123, item: 234 }),\n        JSON.stringify({ info: { name: 345 }, item: 234 }),\n        JSON.stringify({ info: { schema: 456 }, item: 234 }),\n        JSON.stringify({ info: { name: 345, schema: 456 }, item: 234 })\n      ]\n      const expected = [\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 0\n        } ],\n        [ {\n          format: 'postman-collection',\n          version: 'v2.0',\n          score: 1\n        } ]\n      ]\n      const actual = inputs.map(input => __internals__.detect(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAPIName', () => {\n    it('should work', () => {\n      const inputs = [\n        'some weird content',\n        JSON.stringify({}),\n        JSON.stringify({ info: 123 }),\n        JSON.stringify({ item: 234 }),\n        JSON.stringify({ info: 123, item: 234 }),\n        JSON.stringify({ info: { name: 345 }, item: 234 }),\n        JSON.stringify({ info: { schema: 456 }, item: 234 }),\n        JSON.stringify({ info: { name: 345, schema: 456 }, item: 234 })\n      ]\n      const expected = [\n        null, null, null, null, null, null, null,\n        345\n      ]\n      const actual = inputs.map(input => __internals__.getAPIName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoTitle', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { info: {} },\n        { info: { name: 123 } }\n      ]\n      const expected = [\n        null, null, { key: 'title', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoTitle(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoDescriptionFromDescriptionString', () => {\n    it('should work', () => {\n      const inputs = [\n        'abcd'\n      ]\n      const expected = [\n        { key: 'description', value: 'abcd' }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractInfoDescriptionFromDescriptionString(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoDescriptionFromDescriptionObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { content: 123 }\n      ]\n      const expected = [\n        null, { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractInfoDescriptionFromDescriptionObject(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { info: {} },\n        { info: { description: 'abc' } },\n        { info: { description: { content: 123 } } }\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'description', value: 'abc' },\n        { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoDescription(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoTermsOfService', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever'\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoTermsOfService(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoContact', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever'\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoContact(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoLicense', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever'\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoLicense(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoVersionFromVersionString', () => {\n    it('should work', () => {\n      const inputs = [\n        'v1.0.0'\n      ]\n      const expected = [\n        { key: 'version', value: 'v1.0.0' }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoVersionFromVersionString(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoVersionFromVersionObject', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { major: '1', minor: '2' },\n        { major: '1', patch: '3' },\n        { minor: '2', patch: '3' },\n        { major: '1', minor: '2', patch: '3' }\n      ]\n      const expected = [\n        null,\n        { key: 'version', value: '1.2.0' },\n        { key: 'version', value: '1.0.3' },\n        { key: 'version', value: '0.2.3' },\n        { key: 'version', value: '1.2.3' }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoVersionFromVersionObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoVersion', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { info: {} },\n        { info: { version: '1.2.3' } },\n        { info: { version: { major: '2', minor: '4', patch: '6' } } }\n      ]\n      const expected = [\n        null, null,\n        { key: 'version', value: '1.2.3' },\n        { key: 'version', value: '2.4.6' }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoVersion(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfoInstance', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractInfoTitle').andCall(({ t }) => ({ key: 'title', value: t }))\n      spyOn(__internals__, 'extractInfoDescription')\n        .andCall(({ d }) => ({ key: 'description', value: d }))\n      spyOn(__internals__, 'extractInfoTermsOfService')\n        .andCall(({ o }) => ({ key: 'tos', value: o }))\n      spyOn(__internals__, 'extractInfoContact')\n        .andCall(({ c }) => ({ key: 'contact', value: c }))\n      spyOn(__internals__, 'extractInfoLicense').andCall(({ l }) => ({ key: 'license', value: l }))\n      spyOn(__internals__, 'extractInfoVersion').andCall(({ v }) => ({ key: 'version', value: v }))\n\n      const inputs = [\n        { t: 1, d: 2, o: 3, c: 4, l: 5, v: 6 }\n      ]\n      const expected = [\n        { title: 1, description: 2, tos: 3, contact: 4, license: 5, version: 6 }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfoInstance(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfo', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractInfoInstance').andCall(v => v)\n\n      const inputs = [\n        { title: 123 }\n      ]\n      const expected = [\n        { key: 'info', value: new Info({ title: 123 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractInfo(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupId', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever'\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupId(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupName', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { name: 123 }\n      ]\n      const expected = [\n        null, null,\n        { key: 'name', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { description: 123 }\n      ]\n      const expected = [\n        null, null, { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupDescription(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isItem', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { request: 123 }\n      ]\n      const expected = [\n        false, false, true\n      ]\n      const actual = inputs.map(input => __internals__.isItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupResourceChildren', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { id: 123 },\n        { name: 234 },\n        { id: 123, name: 234 }\n      ]\n      const expected = [\n        { key: null, value: null },\n        { key: 123, value: 123 },\n        { key: 234, value: 234 },\n        { key: 123, value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupResourceChildren(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupChildrenEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'isItem').andCall(({ r }) => !!r)\n      spyOn(__internals__, 'extractGroupResourceChildren').andCall(({ r }) => r)\n      spyOn(__internals__, 'extractGroup').andCall(({ g }) => g)\n\n      const inputs = [\n        { g: 123 },\n        { r: 234 }\n      ]\n      const expected = [\n        123,\n        234\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupChildrenEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupChildren', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGroupChildrenEntry').andCall(v => {\n        if (v % 2) {\n          return { key: v, value: v }\n        }\n\n        return null\n      })\n\n      const inputs = [\n        {},\n        { item: 123 },\n        { item: [ 123, 234, 345 ] },\n        { item: [ 234 ] }\n      ]\n      const expected = [\n        null, null,\n        { key: 'children', value: OrderedMap({ '123': 123, '345': 345 }) },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupChildren(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroupInstance', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGroupId')\n        .andCall(({ i }) => i ? { key: 'id', value: i } : null)\n      spyOn(__internals__, 'extractGroupName')\n        .andCall(({ n }) => n ? { key: 'name', value: n } : null)\n      spyOn(__internals__, 'extractGroupDescription')\n        .andCall(({ d }) => d ? { key: 'description', value: d } : null)\n      spyOn(__internals__, 'extractGroupChildren')\n        .andCall(({ c }) => c ? { key: 'children', value: c } : null)\n\n      const inputs = [\n        {},\n        { i: 123, n: 234, d: 345, c: 456 }\n      ]\n      const expected = [\n        {},\n        { id: 123, name: 234, description: 345, children: 456 }\n      ]\n      const actual = inputs.map(input => __internals__.extractGroupInstance(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractGroupInstance').andReturn({ id: 123 })\n\n      const inputs = [\n        {},\n        { name: 234 }\n      ]\n      const expected = [\n        { key: 'group', value: new Group({ id: 123 }) },\n        { key: 234, value: new Group({ id: 123 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractGroup(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterInstanceFromVariable', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { type: 'weird' },\n        { type: 'integer', id: 123, name: 234, value: 345 },\n        { type: 'integer', name: 234, value: 345 }\n      ]\n      const expected = [\n        { key: null, name: null, type: 'string', default: null },\n        { key: null, name: null, type: 'string', default: null },\n        { key: 123, name: 234, type: 'integer', default: 345 },\n        { key: 234, name: 234, type: 'integer', default: 345 }\n      ]\n      const actual = inputs.map(input => __internals__.extractParameterInstanceFromVariable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterEntryFromVariable', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractParameterInstanceFromVariable').andReturn({ key: 345 })\n\n      const inputs = [\n        {},\n        { id: 123 },\n        { name: 234 },\n        { id: 123, name: 234 }\n      ]\n      const expected = [\n        { key: null, value: new Parameter({ key: 345 }) },\n        { key: 123, value: new Parameter({ key: 345 }) },\n        { key: 234, value: new Parameter({ key: 345 }) },\n        { key: 123, value: new Parameter({ key: 345 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractParameterEntryFromVariable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterTypedStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractParameterEntryFromVariable').andCall(v => ({ key: v, value: v }))\n\n      const inputs = [\n        null,\n        {},\n        { variable: 123 },\n        { variable: [ 123, 234, 345 ] }\n      ]\n      const expected = [\n        null, null, null,\n        { key: 'parameter', value: OrderedMap({ '123': 123, '234': 234, '345': 345 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractParameterTypedStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractEndpointTypedStore', () => {\n    it('should work', () => {\n      const inputs = [\n        [],\n        [ { key: 123, value: 234 }, { key: 345, value: 456 } ]\n      ]\n      const expected = [\n        { key: 'endpoint', value: OrderedMap() },\n        { key: 'endpoint', value: OrderedMap({ '123': 234, '345': 456 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractEndpointTypedStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAWSSig4AuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'awsv4' },\n        { type: 'awsv4', awsv4: {} },\n        { type: 'awsv4', awsv4: {\n          accessKey: 123, secretKey: 234, region: 345, service: 456\n        } }\n      ]\n      const expected = [\n        { key: 'awsv4', value: new Auth.AWSSig4({ authName: 'awsv4' }) },\n        { key: 'awsv4', value: new Auth.AWSSig4({ authName: 'awsv4' }) },\n        { key: 'awsv4', value: new Auth.AWSSig4({\n          authName: 'awsv4',\n          key: 123,\n          secret: 234,\n          region: 345,\n          service: 456\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractAWSSig4AuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBasicAuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'basic' },\n        { type: 'basic', basic: { username: 123, password: 234 } }\n      ]\n      const expected = [\n        { key: 'basic', value: new Auth.Basic({ authName: 'basic' }) },\n        { key: 'basic', value: new Auth.Basic({\n          authName: 'basic',\n          username: 123,\n          password: 234\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractBasicAuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDigestAuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'digest' },\n        { type: 'digest', digest: { username: 123, password: 234 } }\n      ]\n      const expected = [\n        { key: 'digest', value: new Auth.Digest({ authName: 'digest' }) },\n        { key: 'digest', value: new Auth.Digest({\n          authName: 'digest',\n          username: 123,\n          password: 234\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractDigestAuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHawkAuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'hawk' },\n        { type: 'hawk', hawk: { authId: 123, authKey: 234, algorithm: 345 } }\n      ]\n      const expected = [\n        { key: 'hawk', value: new Auth.Hawk({ authName: 'hawk' }) },\n        { key: 'hawk', value: new Auth.Hawk({\n          authName: 'hawk',\n          id: 123,\n          key: 234,\n          algorithm: 345\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractHawkAuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractOAuth1AuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'oauth1' },\n        { type: 'oauth1', oauth1: {\n          consumerSecret: 123,\n          consumerKey: 234,\n          token: 345,\n          tokenSecret: 456\n        } }\n      ]\n      const expected = [\n        { key: 'oauth1', value: new Auth.OAuth1({ authName: 'oauth1' }) },\n        { key: 'oauth1', value: new Auth.OAuth1({\n          authName: 'oauth1',\n          consumerSecret: 123,\n          consumerKey: 234,\n          token: 345,\n          tokenSecret: 456\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractOAuth1AuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractOAuth2AuthFromAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'oauth2' },\n        { type: 'oauth2', oauth2: {\n          authUrl: 123,\n          accessTokenUrl: 234\n        } }\n      ]\n      const expected = [\n        { key: 'oauth2', value: new Auth.OAuth2({ authName: 'oauth2' }) },\n        { key: 'oauth2', value: new Auth.OAuth2({\n          authName: 'oauth2',\n          authorizationUrl: 123,\n          tokenUrl: 234\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractOAuth2AuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthFromPostmanAuth', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAWSSig4AuthFromAuth').andReturn(123)\n      spyOn(__internals__, 'extractBasicAuthFromAuth').andReturn(234)\n      spyOn(__internals__, 'extractDigestAuthFromAuth').andReturn(345)\n      spyOn(__internals__, 'extractHawkAuthFromAuth').andReturn(456)\n      spyOn(__internals__, 'extractOAuth1AuthFromAuth').andReturn(567)\n      spyOn(__internals__, 'extractOAuth2AuthFromAuth').andReturn(678)\n\n      const inputs = [\n        { type: 'awsv4' },\n        { type: 'basic' },\n        { type: 'digest' },\n        { type: 'hawk' },\n        { type: 'noauth' },\n        { type: 'oauth1' },\n        { type: 'oauth2' },\n        { type: 'unknown' }\n      ]\n      const expected = [\n        123,\n        234,\n        345,\n        456,\n        null,\n        567,\n        678,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthFromPostmanAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthTypedStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthFromPostmanAuth')\n        .andCall(v => v % 2 ? { key: v, value: v } : null)\n\n      const inputs = [\n        [],\n        [ null, {}, { request: {} }, { request: '123123' } ],\n        [ { request: { auth: 123 } }, { request: { auth: 234 } }, { request: { auth: 345 } } ]\n      ]\n      const expected = [\n        { key: 'auth', value: OrderedMap() },\n        { key: 'auth', value: OrderedMap() },\n        { key: 'auth', value: OrderedMap({\n          '123': 123,\n          '345': 345\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthTypedStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractConstraintTypedStore', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { globals: {} },\n        { globals: { abc: 123, def: 234 } }\n      ]\n      const expected = [\n        { key: 'constraint', value: OrderedMap() },\n        { key: 'constraint', value: OrderedMap() },\n        { key: 'constraint', value: OrderedMap({\n          abc: new Constraint.JSONSchema({\n            title: 'abc'\n          }),\n          def: new Constraint.JSONSchema({\n            title: 'def'\n          })\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractConstraintTypedStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractStoreInstance', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthTypedStore')\n        .andCall(v => v ? { key: 'auth', value: v } : null)\n      spyOn(__internals__, 'extractEndpointTypedStore')\n        .andCall(v => v ? { key: 'endpoint', value: v } : null)\n      spyOn(__internals__, 'extractParameterTypedStore')\n        .andCall(v => v ? { key: 'parameter', value: v } : null)\n      spyOn(__internals__, 'extractConstraintTypedStore')\n        .andCall(v => v ? { key: 'constraint', value: v * 2 } : null)\n\n      const inputs = [\n        [],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        {},\n        { auth: 123, endpoint: 234, parameter: 345, constraint: 345 * 2 }\n      ]\n      const actual = inputs.map(input => __internals__.extractStoreInstance(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractStoreInstance').andCall((i, e, c) => {\n        return { auth: i, endpoint: e, parameter: c }\n      })\n\n      const inputs = [\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        {\n          key: 'store',\n          value: new Store({\n            auth: 123,\n            endpoint: 234,\n            parameter: 345\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractStore(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractItems', () => {\n    it('should work', () => {\n      const inputs = [\n        [ [ { request: 123 } ], {} ],\n        [ [ { request: 123 } ], { request: 234 } ],\n        [ [ { request: 123 } ], { item: 234 } ],\n        [\n          [ { request: 123 } ],\n          { item: [\n            { request: 234 },\n            { item: [\n              { request: 345 }\n            ] }\n          ] }\n        ]\n      ]\n\n      const expected = [\n        [ { request: 123 } ],\n        [ { request: 123 }, { request: 234 } ],\n        [ { request: 123 } ],\n        [ { request: 123 }, { request: 234 }, { request: 345 } ]\n      ]\n\n      const actual = inputs.map(input => __internals__.extractItems(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@findLongestCommonPath', () => {\n    it('should work', () => {\n      const lcPathname = [ '', 'users', '{userId}', 'pets', '{petId}' ]\n      const inputs = [\n        '/users/{userId}/pets/{petId}',\n        '/users/{userId}/pets/{petId}/address',\n        '/users/{userId}/pets',\n        '/users/{userId}/petitions',\n        '/users',\n        '/usage'\n      ]\n\n      const expected = [\n        [ '', 'users', '{userId}', 'pets', '{petId}' ],\n        [ '', 'users', '{userId}', 'pets', '{petId}' ],\n        [ '', 'users', '{userId}', 'pets' ],\n        [ '', 'users', '{userId}' ],\n        [ '', 'users' ],\n        [ '' ]\n      ]\n      const actual = inputs.map(input => __internals__.findLongestCommonPath(lcPathname, input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addHostEntryToHostMap', () => {\n    it('should work', () => {\n      const hostMap = {\n        'echo.paw.cloud': {\n          entries: [\n            {\n              key: new URL({\n                url: 'http://echo.paw.cloud/users/234',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 234\n            }\n          ],\n          lcPathname: [ '', 'users', '234' ]\n        }\n      }\n      const inputs = [\n        {\n          key: new URL({\n            url: 'http://echo.paw.cloud:8080/users/456',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          }),\n          value: 456\n        },\n        {\n          key: new URL({\n            url: 'http://echo.paw.cloud/users/123',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          }),\n          value: 123\n        },\n        {\n          key: new URL({\n            url: 'https://beta.paw.cloud/users/321',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          }),\n          value: 321\n        },\n        {\n          key: new URL({\n            url: 'https:///users/321',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          }),\n          value: 321\n        },\n        {\n          key: new URL({\n            url: 'staging.paw.cloud',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          }),\n          value: 123\n        }\n      ]\n      const expected = {\n        'echo.paw.cloud:8080': {\n          entries: [\n            {\n              key: new URL({\n                url: 'http://echo.paw.cloud:8080/users/456',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 456\n            }\n          ],\n          lcPathname: [ '', 'users', '456' ]\n        },\n        'echo.paw.cloud': {\n          entries: [\n            {\n              key: new URL({\n                url: 'http://echo.paw.cloud/users/234',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 234\n            },\n            {\n              key: new URL({\n                url: 'http://echo.paw.cloud/users/123',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 123\n            }\n          ],\n          lcPathname: [ '', 'users' ]\n        },\n        'beta.paw.cloud': {\n          entries: [\n            {\n              key: new URL({\n                url: 'https://beta.paw.cloud/users/321',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 321\n            }\n          ],\n          lcPathname: [ '', 'users', '321' ]\n        },\n        '': {\n          entries: [\n            {\n              key: new URL({\n                url: 'https:///users/321',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 321\n            }\n          ],\n          lcPathname: [ '', 'users', '321' ]\n        },\n        'staging.paw.cloud': {\n          entries: [\n            {\n              key: new URL({\n                url: 'staging.paw.cloud',\n                variableDelimiters: List([ '{{', '}}', ':' ])\n              }),\n              value: 123\n            }\n          ],\n          lcPathname: [ '' ]\n        }\n      }\n\n      const actual = inputs.reduce(__internals__.addHostEntryToHostMap, hostMap)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getLongestCommonPathnameAsString', () => {\n    it('should work', () => {\n      const inputs = [\n        [ '', 'users', '123' ],\n        [ '' ]\n      ]\n      const expected = [\n        '/users/123',\n        '/'\n      ]\n      const actual = inputs.map(__internals__.getLongestCommonPathnameAsString)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateHostKeyWithLongestCommonPathname', () => {\n    it('should work', () => {\n      const key = 'echo.paw.cloud'\n      const input = { entries: [ 123, 123, 123 ], lcPathname: [ '', 'users' ] }\n      const expected = { key: 'echo.paw.cloud/users', value: [ 123, 123, 123 ] }\n      const actual = __internals__.updateHostKeyWithLongestCommonPathname(input, key)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractCommonHostsFromRequests', () => {\n    it('should work', () => {\n      const inputs = [\n        [\n          { request: { urlString: 'https://echo.paw.cloud/users/123' } },\n          { request: { urlString: 'https://echo.paw.cloud/users/234' } },\n          { request: { urlString: 'https://beta.paw.cloud/users/123' } }\n        ]\n      ]\n      const expected = [\n        List([\n          {\n            key: 'echo.paw.cloud/users',\n            value: [\n              {\n                key: new URL({\n                  url: 'https://echo.paw.cloud/users/123',\n                  variableDelimiters: List([ '{{', '}}', ':' ])\n                }),\n                value: { request: { urlString: 'https://echo.paw.cloud/users/123' } }\n              },\n              {\n                key: new URL({\n                  url: 'https://echo.paw.cloud/users/234',\n                  variableDelimiters: List([ '{{', '}}', ':' ])\n                }),\n                value: { request: { urlString: 'https://echo.paw.cloud/users/234' } }\n              }\n            ]\n          },\n          {\n            key: 'beta.paw.cloud/users/123',\n            value: [\n              {\n                key: new URL({\n                  url: 'https://beta.paw.cloud/users/123',\n                  variableDelimiters: List([ '{{', '}}', ':' ])\n                }),\n                value: { request: { urlString: 'https://beta.paw.cloud/users/123' } }\n              }\n            ]\n          }\n        ])\n      ]\n      const actual = inputs.map(input => __internals__.extractCommonHostsFromRequests(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createEndpointFromHost', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'echo.paw.cloud', [ { key: new URL({ url: 'http://echo.paw.cloud' }) } ] ],\n        [\n          'echo.paw.cloud',\n          [\n            { key: new URL({ url: 'http://echo.paw.cloud' }) },\n            { key: new URL({ url: 'https://echo.paw.cloud' }) }\n          ]\n        ]\n      ]\n      const expected = [\n        {\n          key: 'echo.paw.cloud',\n          value: new URL({\n            url: 'http://echo.paw.cloud',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          })\n        },\n        {\n          key: 'echo.paw.cloud',\n          value: (new URL({\n            url: 'http://echo.paw.cloud',\n            variableDelimiters: List([ '{{', '}}', ':' ])\n          })).set('protocol', List([ 'http:', 'https:' ]))\n        }\n      ]\n\n      const actual = inputs.map(input => __internals__.createEndpointFromHost(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceEndpointsFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        'echo.paw.cloud'\n      ]\n      const expected = [\n        {\n          key: 'endpoints',\n          value: OrderedMap({\n            'echo.paw.cloud': new Reference({ type: 'endpoint', uuid: 'echo.paw.cloud' })\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceEndpointsFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourcePathFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'echo.paw.cloud', { request: { urlString: 'https://beta.paw/cloud' } } ],\n        [ 'echo.paw.cloud', { request: { urlString: 'https://echo.paw/cloud' } } ],\n        [ 'echo.paw.cloud', { request: { urlString: 'https://echo.paw/cloud/' } } ],\n        [ 'echo.paw.cloud', { request: { urlString: 'https://echo.paw/cloud/users/123' } } ],\n        [ 'echo.paw.cloud', { request: { urlString: 'https://echo.paw/cloud/users/123?t=234' } } ]\n      ]\n      const expected = [\n        { key: 'path', value: new URL({ url: '/' }) },\n        {\n          key: 'path',\n          value: new URL({ url: '/', variableDelimiters: List([ '{{', '}}', ':' ]) })\n        },\n        {\n          key: 'path',\n          value: new URL({ url: '/', variableDelimiters: List([ '{{', '}}', ':' ]) })\n        },\n        {\n          key: 'path',\n          value: new URL({ url: '/users/123', variableDelimiters: List([ '{{', '}}', ':' ]) })\n        },\n        {\n          key: 'path',\n          value: new URL({ url: '/users/123', variableDelimiters: List([ '{{', '}}', ':' ]) })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourcePathFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceDescriptionFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever'\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceDescriptionFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestNameFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { name: 123 }\n      ]\n\n      const expected = [\n        null, null, { key: 'name', value: 123 }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractRequestNameFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestDescriptionFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        'whatever',\n        {},\n        { description: 123 },\n        { request: {} },\n        { request: { description: 234 } },\n        { description: 123, request: { description: 234 } }\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'description', value: 123 },\n        null,\n        { key: 'description', value: 234 },\n        { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractRequestDescriptionFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterEntryFromQueryParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { key: 123 },\n        { key: 123, value: 234 },\n        { key: 123, value: '{{ref}}' }\n      ]\n      const expected = [\n        null,\n        {\n          key: 123,\n          value: new Parameter({\n            key: 123,\n            name: 123,\n            type: 'string',\n            default: null\n          })\n        },\n        {\n          key: 123,\n          value: new Parameter({\n            key: 123,\n            name: 123,\n            type: 'string',\n            default: 234\n          })\n        },\n        {\n          key: 123,\n          value: new Parameter({\n            key: 123,\n            name: 123,\n            type: 'string',\n            default: null,\n            constraints: List([ new Constraint.JSONSchema({ $ref: '#/definitions/ref' }) ])\n          })\n        }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractParameterEntryFromQueryParameter(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryBlockFromQueryParams', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractParameterEntryFromQueryParameter').andCall(v => v)\n\n      const inputs = [\n        null,\n        [],\n        [ { key: 123, value: 234 }, { key: 345, value: 456 } ]\n      ]\n      const expected = [\n        null, null,\n        { key: 'queries', value: OrderedMap({ '123': 234, '345': 456 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractQueryBlockFromQueryParams(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderParameterFromString', () => {\n    it('should work', () => {\n      const inputs = [\n        '',\n        'Content-Type:',\n        'Content-Type: application/json',\n        'Content-Type: {{cType}}'\n      ]\n      const expected = [\n        null,\n        {\n          key: 'Content-Type',\n          value: new Parameter({\n            key: 'Content-Type',\n            name: 'Content-Type',\n            type: 'string',\n            default: null\n          })\n        },\n        {\n          key: 'Content-Type',\n          value: new Parameter({\n            key: 'Content-Type',\n            name: 'Content-Type',\n            type: 'string',\n            default: 'application/json'\n          })\n        },\n        {\n          key: 'Content-Type',\n          value: new Parameter({\n            key: 'Content-Type',\n            name: 'Content-Type',\n            type: 'string',\n            default: null,\n            constraints: List([ new Constraint.JSONSchema({ $ref: '#/definitions/cType' }) ])\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractHeaderParameterFromString(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderBlockFromHeaderString', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractHeaderParameterFromString').andCall(l => {\n        const [ key = '', value = '' ] = l.split(':')\n        if (!key) {\n          return null\n        }\n        return { key: key.trim(), value: value.trim() }\n      })\n\n      const inputs = [\n        '',\n        'Content-Type: application/json\\nAccept: application/json\\n'\n      ]\n      const expected = [\n        { key: 'headers', value: OrderedMap() },\n        {\n          key: 'headers',\n          value: OrderedMap({\n            'Content-Type': 'application/json',\n            Accept: 'application/json'\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractHeaderBlockFromHeaderString(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderParameterFromObject', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { key: '123' },\n        { key: '123', value: 234 },\n        { key: '123', value: '{{ref}}' }\n      ]\n      const expected = [\n        null, null,\n        { key: '123', value: new Parameter({ key: '123', name: '123', type: 'string' }) },\n        {\n          key: '123',\n          value: new Parameter({ key: '123', name: '123', type: 'string', default: '234' })\n        },\n        {\n          key: '123',\n          value: new Parameter({\n            key: '123',\n            name: '123',\n            type: 'string',\n            default: null,\n            constraints: List([ new Constraint.JSONSchema({ $ref: '#/definitions/ref' }) ])\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractHeaderParameterFromObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractHeaderParameterFromString').andReturn(123)\n      spyOn(__internals__, 'extractHeaderParameterFromObject').andReturn(234)\n\n      const inputs = [\n        'Content-Type: application/json',\n        { key: 'Content-Type', value: 'application/json' }\n      ]\n      const expected = [\n        123,\n        234\n      ]\n      const actual = inputs.map(input => __internals__.extractHeaderParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderBlockFromHeaderArray', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractHeaderParameter')\n        .andCall(v => v % 2 ? { key: v, value: v } : null)\n\n      const inputs = [\n        [],\n        [ 123, 234, 345 ]\n      ]\n\n      const expected = [\n        { key: 'headers', value: OrderedMap() },\n        { key: 'headers', value: OrderedMap({ '123': 123, '345': 345 }) }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractHeaderBlockFromHeaderArray(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeaderBlockFromHeaders', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractHeaderBlockFromHeaderString').andReturn(123)\n      spyOn(__internals__, 'extractHeaderBlockFromHeaderArray').andReturn(234)\n\n      const inputs = [\n        null,\n        'Content-Type: application/json\\n',\n        { some: 'weird header object' },\n        [],\n        [ { key: 'Content-Type', value: 'application/json' } ]\n      ]\n      const expected = [\n        null, 123, null, null, 234\n      ]\n\n      const actual = inputs.map(input => __internals__.extractHeaderBlockFromHeaders(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyParameterFromUrlEncodedOrFormDataBody', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { key: 123, value: 234 }\n      ]\n      const expected = [\n        null,\n        { key: 123, value: new Parameter({ key: 123, name: 123, type: 'string', default: 234 }) }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractBodyParameterFromUrlEncodedOrFormDataBody(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyBlockFromUrlEncodedOrFormDataBody', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractBodyParameterFromUrlEncodedOrFormDataBody').andCall(v => {\n        return v % 2 ? { key: v, value: v } : null\n      })\n\n      const inputs = [\n        { mode: 'urlencoded' },\n        { mode: 'formdata' },\n        { mode: 'urlencoded', urlencoded: [ 123, 234, 345 ] },\n        { mode: 'formdata', formdata: [ 123, 234, 345 ] }\n      ]\n      const expected = [\n        { key: 'body', value: OrderedMap() },\n        { key: 'body', value: OrderedMap() },\n        { key: 'body', value: OrderedMap({ '123': 123, '345': 345 }) },\n        { key: 'body', value: OrderedMap({ '123': 123, '345': 345 }) }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractBodyBlockFromUrlEncodedOrFormDataBody(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyBlockFromFileBody', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { file: {} },\n        { file: { content: 123 } }\n      ]\n      const expected = [\n        { key: 'body', value: OrderedMap({ file: new Parameter({ type: 'string' }) }) },\n        { key: 'body', value: OrderedMap({ file: new Parameter({ type: 'string' }) }) },\n        { key: 'body', value: OrderedMap({ file: new Parameter({ type: 'string' }) }) },\n        {\n          key: 'body',\n          value: OrderedMap({ file: new Parameter({ type: 'string', default: 123 }) })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractBodyBlockFromFileBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyBlockFromRawBody', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { raw: 123 }\n      ]\n      const expected = [\n        { key: 'body', value: OrderedMap({ raw: new Parameter({ type: 'string' }) }) },\n        { key: 'body', value: OrderedMap({ raw: new Parameter({ type: 'string' }) }) },\n        {\n          key: 'body',\n          value: OrderedMap({ raw: new Parameter({ type: 'string', default: 123 }) })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractBodyBlockFromRawBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyBlockFromBody', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractBodyBlockFromRawBody').andReturn(123)\n      spyOn(__internals__, 'extractBodyBlockFromUrlEncodedOrFormDataBody').andReturn(234)\n      spyOn(__internals__, 'extractBodyBlockFromFileBody').andReturn(345)\n\n      const inputs = [\n        null,\n        {},\n        { mode: 'urlencoded' },\n        { mode: 'formdata' },\n        { mode: 'file' },\n        { mode: 'raw' }\n      ]\n      const expected = [\n        null,\n        null,\n        234,\n        234,\n        345,\n        123\n      ]\n      const actual = inputs.map(input => __internals__.extractBodyBlockFromBody(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestParameterContainerInstanceFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryBlockFromQueryParams')\n        .andCall(v => v ? { key: 'queries', value: v } : null)\n      spyOn(__internals__, 'extractHeaderBlockFromHeaders')\n        .andCall(v => v ? { key: 'headers', value: v } : null)\n      spyOn(__internals__, 'extractBodyBlockFromBody')\n        .andCall(v => v ? { key: 'body', value: v } : null)\n\n      const inputs = [\n        null,\n        {},\n        { request: {} },\n        { request: { url: {}, header: 234, body: 345 } },\n        { request: { url: { query: 123 }, header: 234, body: 345 } }\n      ]\n      const expected = [\n        {},\n        {},\n        {},\n        { headers: 234, body: 345 },\n        { queries: 123, headers: 234, body: 345 }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractRequestParameterContainerInstanceFromItem(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestParametersFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractRequestParameterContainerInstanceFromItem').andCall(v => v)\n      const inputs = [\n        { body: 123, headers: 234 }\n      ]\n      const expected = [\n        { key: 'parameters', value: new ParameterContainer({ body: 123, headers: 234 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractRequestParametersFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromAWSV4Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'awsv4' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'awsv4'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromAWSV4Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromBasicAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'basic' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'basic'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromBasicAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromDigestAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'digest' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'digest'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromDigestAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromHawkAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'hawk' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'hawk'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromHawkAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromAWSV4Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'noauth' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            null\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromNoAuthAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromOAuth1Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'oauth1' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'oauth1'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromOAuth1Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthRefsFromOAuth2Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 'oauth2' }\n      ]\n      const expected = [\n        {\n          key: 'auths',\n          value: List([\n            new Reference({\n              type: 'auth',\n              uuid: 'oauth2'\n            })\n          ])\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthRefsFromOAuth2Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthsFromItem', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthRefsFromAWSV4Auth').andReturn(123)\n      spyOn(__internals__, 'extractAuthRefsFromBasicAuth').andReturn(234)\n      spyOn(__internals__, 'extractAuthRefsFromDigestAuth').andReturn(345)\n      spyOn(__internals__, 'extractAuthRefsFromHawkAuth').andReturn(456)\n      spyOn(__internals__, 'extractAuthRefsFromNoAuthAuth').andReturn(567)\n      spyOn(__internals__, 'extractAuthRefsFromOAuth1Auth').andReturn(678)\n      spyOn(__internals__, 'extractAuthRefsFromOAuth2Auth').andReturn(789)\n\n      const inputs = [\n        null,\n        {},\n        { request: { auth: { type: 'awsv4' } } },\n        { request: { auth: { type: 'basic' } } },\n        { request: { auth: { type: 'digest' } } },\n        { request: { auth: { type: 'hawk' } } },\n        { request: { auth: { type: 'noauth' } } },\n        { request: { auth: { type: 'oauth1' } } },\n        { request: { auth: { type: 'oauth2' } } },\n        { request: { auth: { type: 'weird' } } }\n      ]\n      const expected = [\n        null,\n        null,\n        123, 234, 345, 456, 567, 678, 789,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthsFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractRequestMethodFromItem', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        {},\n        { request: {} },\n        { request: { method: 'PUT' } }\n      ]\n      const expected = [\n        { key: 'method', value: 'get' },\n        { key: 'method', value: 'get' },\n        { key: 'method', value: 'get' },\n        { key: 'method', value: 'put' }\n      ]\n      const actual = inputs.map(input => __internals__.extractRequestMethodFromItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestInstanceFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractRequestNameFromItem')\n        .andCall(({ n }) => n ? { key: 'name', value: n } : null)\n      spyOn(__internals__, 'extractRequestDescriptionFromItem')\n        .andCall(({ d }) => d ? { key: 'description', value: d } : null)\n      spyOn(__internals__, 'extractRequestParametersFromItem')\n        .andCall(({ p }) => p ? { key: 'parameters', value: p } : null)\n      spyOn(__internals__, 'extractRequestMethodFromItem')\n        .andCall(({ m }) => m ? { key: 'method', value: m } : null)\n      spyOn(__internals__, 'extractAuthsFromItem')\n        .andCall(({ a }) => a ? { key: 'auths', value: a } : null)\n\n      const inputs = [\n        [ null, {} ],\n        [ { key: 'endpoints', value: 123 }, { n: 234, d: 345, p: 456, m: 567, a: 678 } ]\n      ]\n      const expected = [\n        {},\n        { endpoints: 123, name: 234, description: 345, parameters: 456, method: 567, auths: 678 }\n      ]\n      const actual = inputs.map(input => __internals__.extractRequestInstanceFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractRequestInstanceFromItem')\n        .andCall((e, i) => ({ name: e, description: i }))\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        new Request({ name: 123, description: 234 })\n      ]\n      const actual = inputs.map(input => __internals__.extractRequestFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceMethodsFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractRequestMethodFromItem').andCall(i => ({ value: i }))\n      spyOn(__internals__, 'extractRequestFromItem').andCall((e) => e)\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        { key: 'methods', value: OrderedMap({ '234': 123 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceMethodsFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceInstanceFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResourceEndpointsFromItem').andCall(v => v)\n      spyOn(__internals__, 'extractResourcePathFromItem')\n        .andCall((_, { p }) => p ? { key: 'path', value: p } : null)\n      spyOn(__internals__, 'extractResourceDescriptionFromItem')\n        .andCall(({ d }) => d ? { key: 'description', value: d } : null)\n      spyOn(__internals__, 'extractResourceMethodsFromItem')\n        .andCall((_, { m }) => m ? { key: 'methods', value: m } : null)\n\n      const inputs = [\n        [ null, {} ],\n        [ { key: 'endpoints', value: 123 }, { p: 234, d: 345, m: 456 } ]\n      ]\n      const expected = [\n        {},\n        { endpoints: 123, path: 234, description: 345, methods: 456 }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceInstanceFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceFromItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResourceInstanceFromItem').andCall(h => ({ name: h }))\n\n      const inputs = [\n        [ 123, {} ],\n        [ 123, { id: 234 } ],\n        [ 123, { id: 234, name: 345 } ],\n        [ 123, { name: 345 } ]\n      ]\n      const expected = [\n        { key: null, value: new Resource({ name: 123 }) },\n        { key: 234, value: new Resource({ name: 123 }) },\n        { key: 234, value: new Resource({ name: 123 }) },\n        { key: 345, value: new Resource({ name: 123 }) }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceFromItem(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getResourcesFromItemEntries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResourceFromItem').andCall((h, v) => h + v)\n\n      const inputs = [\n        [ 123, [] ],\n        [ 123, [ { value: 234 }, { value: 345 } ] ]\n      ]\n      const expected = [\n        [],\n        [ 123 + 234, 123 + 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.getResourcesFromItemEntries(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertHostIntoResources', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createEndpointFromHost').andCall((h, e) => h + e)\n      spyOn(__internals__, 'getResourcesFromItemEntries').andCall((h, e) => h * e)\n\n      const inputs = [\n        { key: 123, value: 234 }\n      ]\n      const expected = [\n        { resources: 123 * 234, endpoint: 123 + 234 }\n      ]\n      const actual = inputs.map(input => __internals__.convertHostIntoResources(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@groupResourcesAndEndpoints', () => {\n    it('should work', () => {\n      const inputs = [\n        [\n          { resources: [ 123 ], endpoints: [ 'abc' ] },\n          { resources: [ 234, 345 ], endpoint: 'def' }\n        ],\n        [\n          { resources: [ 123 ], endpoints: [ 'abc' ] },\n          { resources: null, endpoint: 'def' }\n        ]\n      ]\n      const expected = [\n        { resources: [ 123, 234, 345 ], endpoints: [ 'abc', 'def' ] },\n        { resources: [ 123 ], endpoints: [ 'abc', 'def' ] }\n      ]\n      const actual = inputs.map(input => __internals__.groupResourcesAndEndpoints(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mergeResources', () => {\n    it('should work', () => {\n      const inputs = [\n        [\n          { abc: new Resource({ methods: OrderedMap({ get: 123, put: 234 }) }) },\n          { key: 'abc', value: new Resource({ methods: OrderedMap({ post: 345 }) }) }\n        ],\n        [\n          { abc: new Resource({ methods: OrderedMap({ get: 123, put: 234 }) }) },\n          { key: 'def', value: new Resource({ methods: OrderedMap({ post: 345 }) }) }\n        ]\n      ]\n      const expected = [\n        { abc: new Resource({ methods: OrderedMap({ get: 123, put: 234, post: 345 }) }) },\n        {\n          abc: new Resource({ methods: OrderedMap({ get: 123, put: 234 }) }),\n          def: new Resource({ methods: OrderedMap({ post: 345 }) })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.mergeResources(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResources', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractItems').andCall((acc, c) => c)\n      spyOn(__internals__, 'extractCommonHostsFromRequests').andCall(i => i)\n      spyOn(__internals__, 'convertHostIntoResources')\n        .andCall(v => ({ resources: [ { key: v, value: v } ], endpoint: v % 2 }))\n\n      const inputs = [\n        [],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        { resources: OrderedMap(), endpoints: [], items: [] },\n        {\n          resources: OrderedMap({ '123': 123, '234': 234, '345': 345 }),\n          endpoints: [ 1, 0, 1 ],\n          items: [ 123, 234, 345 ]\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractResources(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResources').andCall(\n        ({ r, e, it }) => ({ resources: r || null, endpoints: e || null, items: it || null })\n      )\n      spyOn(__internals__, 'extractInfo').andCall(({ i }) => i ? { key: 'info', value: i } : null)\n      spyOn(__internals__, 'extractGroup').andCall(({ g }) => g ? { key: 'group', value: g } : null)\n      spyOn(__internals__, 'extractStore')\n        .andCall((it, e) => it && e ? { key: 'store', value: it + e } : null)\n\n      const inputs = [\n        {},\n        { r: 123, e: 234, it: 345, i: 456, g: 567 }\n      ]\n      const expected = [\n        { resources: null },\n        { resources: 123, info: 456, group: 567, store: 234 + 345 }\n      ]\n      const actual = inputs.map(input => __internals__.extractApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@parse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractApi').andCall(v => ({ resources: v * 2 }))\n\n      const inputs = [\n        { options: 123, item: 234 }\n      ]\n      const expected = [\n        { options: 123, api: new Api({ resources: 234 * 2 }) }\n      ]\n      const actual = inputs.map(input => __internals__.parse(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/parsers/raml/v1.0/Parser.js",
    "content": "import { OrderedMap, List } from 'immutable'\n\nimport Constraint from '../../../models/Constraint'\nimport Group from '../../../models/Group'\nimport Parameter from '../../../models/Parameter'\nimport URLComponent from '../../../models/URLComponent'\nimport Reference from '../../../models/Reference'\nimport Context from '../../../models/Context'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Request from '../../../models/Request'\nimport Resource from '../../../models/Resource'\nimport Response from '../../../models/Response'\nimport URL from '../../../models/URL'\nimport Store from '../../../models/Store'\nimport Auth from '../../../models/Auth'\nimport Interface from '../../../models/Interface'\nimport Info from '../../../models/Info'\nimport Api from '../../../models/Api'\n\nimport { convertEntryListInMap, flatten, currify, entries } from '../../../utils/fp-utils'\n\nconst methods = {}\n\nexport const __meta__ = {\n  version: 'v1.0',\n  format: 'raml'\n}\n\n/**\n * A Parser that converts a RAML AST into an API Record\n */\nexport class RAMLParser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(content) {\n    return methods.detect(content)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(content) {\n    return methods.getAPIName(content)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse() {\n    return methods.parse(...arguments)\n  }\n}\n\n/**\n * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n * @param {string} content: the content of the file to evaluate\n * @returns {number} the corresponding score, between 0 and 1\n */\nmethods.detect = (content) => {\n  const detection = {\n    format: __meta__.format,\n    version: __meta__.version,\n    score: 0\n  }\n\n  const firstLine = content.split('\\n', 1)[0]\n  const match = firstLine.match(/^#%RAML 1\\.0$/)\n  if (match) {\n    detection.score = 1\n    return [ detection ]\n  }\n  return [ detection ]\n}\n\n/**\n * tries to extract a title from a RAML file\n * @param {string} content: the file to get the api title from\n * @returns {string?} the title, if it was found\n */\nmethods.getAPIName = (content) => {\n  const match = content.match(/^title:\\s(.*)$/m)\n  if (match) {\n    return match[1] || null\n  }\n\n  return null\n}\n\n/**\n * adds a $key field to a schema, that is the name of a RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to extract the name of\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the updated schema\n */\nmethods.addKey = (schema, node, offsetKey) => {\n  const key = offsetKey ? offsetKey + '.' + node.name() : node.name()\n  schema.$key = key\n  return schema\n}\n\n/**\n * adds a title field to a schema, that is the displayName of a RAML node, if it is different from\n * the name of the RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to extract the displayName of\n * @returns {Object} the updated schema\n */\nmethods.addTitle = (schema, node) => {\n  const title = node.displayName()\n  if (title && title !== node.name()) {\n    schema.title = title\n  }\n  return schema\n}\n\n/**\n * adds a description field to a schema, taken from a RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to extract the description of\n * @returns {Object} the updated schema\n */\nmethods.addDescription = (schema, node) => {\n  const description = node.description()\n  if (description) {\n    schema.description = description.toJSON()\n  }\n  return schema\n}\n\n/**\n * adds a x-examples field to a schema, taken from a RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to extract the examples of\n * @returns {Object} the updated schema\n */\nmethods.addExamples = (schema, node) => {\n  const example = node.example()\n  if (example) {\n    schema['x-examples'] = [ example.value() ]\n  }\n\n  const examples = node.examples()\n  if (examples.length) {\n    schema['x-examples'] = examples.map(ex => ex.value())\n  }\n\n  if (\n    schema['x-examples'] &&\n    node.kind() !== 'StringTypeDeclaration'\n  ) {\n    schema['x-examples'] = schema['x-examples'].map(ex => {\n      try {\n        const parsed = JSON.parse(ex)\n        return parsed\n      }\n      catch (e) {\n        return ex\n      }\n    })\n  }\n\n  return schema\n}\n\n/**\n * adds a descriptive fields from a RAML node to a schema ($key, title, description, x-examples)\n * @param {Object} $schema: the schema to update\n * @param {RAMLNode} node: the node to extract the information from\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the updated schema\n */\nmethods.addDescriptiveFields = ($schema, node, offsetKey) => {\n  let schema = $schema\n\n  schema = methods.addKey(schema, node, offsetKey)\n  schema = methods.addTitle(schema, node)\n  schema = methods.addDescription(schema, node)\n  schema = methods.addExamples(schema, node)\n\n  return schema\n}\n\n/**\n * tests whether a string is potentially a JSON string (as is done in RAML)\n * @param {string} _str: the string to test\n * @returns {boolean} whether the string is a JSON object or not, as is written inside the RAML\n * parser\n */\nmethods.isMaybeJSON = (_str) => {\n  const str = _str.trim()\n  return (str[0] === '{' && str[str.length - 1] === '}')\n}\n\n/**\n * tests whether a string is potentially an XML string (as is done in RAML)\n * @param {string} _str: the string to test\n * @returns {boolean} whether the string is a XML object or not, as is written inside the RAML\n * parser\n */\nmethods.isMaybeXML = (_str) => {\n  const str = _str.trim()\n  return (str[0] === '<' && str[str.length - 1] === '>')\n}\n\n/**\n * tests whether a node is a TypeDeclaration\n * @param {RAMLNode} node: the node to test\n * @returns {boolean} whether the node is a TypeDeclaration or not\n */\nmethods.isTypeDeclaration = (node) => {\n  return node.kind() === 'TypeDeclaration'\n}\n\n/**\n * converts a JSONTypeDeclaration into a list of schemas\n * @param {string} type: the json type declaration\n * @returns {Array<Object>} the corresponding schemas, if the declaration was successfully parsed\n */\nmethods.convertJSONTypeDeclaration = (type) => {\n  let otherSchemas = []\n  try {\n    const jsonSchema = JSON.parse(type)\n    if (jsonSchema.definitions) {\n      otherSchemas = Object.keys(jsonSchema.definitions).map(name => {\n        jsonSchema.definitions[name].$key = name\n        return jsonSchema.definitions[name]\n      })\n      delete jsonSchema.definitions\n    }\n\n    const schema = jsonSchema\n    return [ schema, ...otherSchemas ]\n  }\n  catch (e) {\n    return []\n  }\n}\n\n/**\n * converts an XMLTypeDeclaration into a list of schemas.\n * @param {string} type: the xml type declaration\n * @returns {Array<Object>} the corresponding schemas (that is poorly parsed)\n */\nmethods.convertXMLTypeDeclaration = (type) => {\n  const schema = {\n    'x-xml': type\n  }\n\n  return [ schema ]\n}\n\n/**\n * converts an InPlaceTypeDeclaration into a list of schemas\n * @param {string} type: the inplace type declaration\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding schemas\n */\nmethods.convertInPlaceTypeDeclaration = (type, offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.' + type : type\n  const schema = {\n    $ref: '#/definitions/' + ref\n  }\n\n  return [ schema ]\n}\n\n/**\n * tests whether the type is \"any\"\n * @param {string} type: the type to test\n * @returns {boolean} whether the type is any or not\n */\nmethods.isAnyType = (type) => type === 'any'\n\n/**\n * converts an AnyTypeDeclaration into a list of schemas\n * @param {string} type: the inplace type declaration\n * @returns {Array<Object>} the corresponding schemas\n */\nmethods.convertAnyTypeDeclaration = () => {\n  const schema = {}\n  return [ schema ]\n}\n\n/**\n * convert a node into a list of schemas based on its type declaration\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding list of schemas\n */\nmethods.convertTypeDeclaration = (node, offsetKey) => {\n  const type = node.type()[0]\n  if (methods.isMaybeJSON(type)) {\n    return methods.convertJSONTypeDeclaration(type, node)\n  }\n  else if (methods.isMaybeXML(type)) {\n    return methods.convertXMLTypeDeclaration(type, node)\n  }\n  else if (methods.isAnyType(type)) {\n    return methods.convertAnyTypeDeclaration(type, node)\n  }\n\n  return methods.convertInPlaceTypeDeclaration(type, offsetKey)\n}\n\n/**\n * updates a object-typed schema with common properties for object schemas\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to extract the information from\n * @returns {Object} the updated schema\n */\nmethods.addSimpleObjectFieldsToSchema = (schema, node) => {\n  const props = [\n    {\n      key: 'minProperties',\n      value: node.minProperties()\n    },\n    {\n      key: 'maxProperties',\n      value: node.maxProperties()\n    },\n    {\n      key: 'additionalProperties',\n      value: node.additionalProperties()\n    },\n    {\n      key: 'discriminator',\n      value: node.discriminator()\n    },\n    {\n      key: 'discriminatorValue',\n      value: node.discriminatorValue()\n    }\n  ]\n\n  return props\n    .filter(prop => prop.value !== null)\n    .reduce(($schema, { key, value }) => {\n      $schema[key] = value\n      return $schema\n    }, schema)\n}\n\n/**\n * converts a RAML node that represents a property in an object type node into a key value pair of\n * schema name and  schema with additional informations about dependencies and requirements.\n * @param {RAMLNode} prop: the node to to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Entry<string, Øbject>} the corresponding key value pair.\n */\nmethods.convertPropertyIntoSchemaEntry = (prop, offsetKey) => {\n  const [ $schema, ...dependencies ] = methods.createSchema(prop, offsetKey)\n  return {\n    key: prop.name(),\n    value: methods.normalizeSchema($schema),\n    deps: dependencies,\n    required: prop.required()\n  }\n}\n\n/**\n * adds a property schema entry to a schema, and sanitizes it.\n * @param {Object} schema: the schema to update\n * @param {Entry} entry: the entry containing the sub schema to add\n * @param {string} entry.key: the name of the sub schema\n * @param {Object} entry.value: the sub schema\n * @returns {Object} the updated schema\n */\nmethods.addPropertyEntryToSchema = (schema, { key, value }) => {\n  delete value.$key\n  schema[key] = value\n  return schema\n}\n\n/**\n * add the properties key to an object-typed schema from a list of schemas for each property\n * @param {Object} schema: the schema to update\n * @param {Array<Entry<string, Object>>} propSchemas: the array containing the schema for each\n * property, in a entry format\n * @returns {Object} the updated schema\n */\nmethods.addPropertiesKeyToSchema = (schema, propSchemas) => {\n  if (propSchemas.length) {\n    const propertiesSchema = propSchemas.reduce(methods.addPropertyEntryToSchema, {})\n    schema.properties = propertiesSchema\n  }\n\n  return schema\n}\n\n/**\n * adds the required key to an object typed schema, from a list of property schemas\n * @param {Object} schema: the schema to update\n * @param {Array<{ key: string, required: boolean }>} propSchemas: the array containing whether the\n * property is required or not\n * @returns {Object} the updated schema\n */\nmethods.addRequiredKeyToSchema = (schema, propSchemas) => {\n  const required = propSchemas\n    .filter(({ required: isRequired }) => isRequired)\n    .map(({ key }) => key)\n\n  if (required.length) {\n    schema.required = required\n  }\n\n  return schema\n}\n\n/**\n * extracts dependencies from property schemas and flattens them into a single list\n * @param {Array<{ deps: Array<Object> }>} propSchemas: the array containing the list of\n * dependencies of each property schema\n * @returns {Array<Object>} the list of other schemas\n */\nmethods.getOtherSchemasFromPropertiesSchemas = (propSchemas) => {\n  const otherSchemas = propSchemas\n    .map(prop => prop.deps)\n    .reduce(flatten, [])\n\n  return otherSchemas\n}\n\n/**\n * extracts the properties from a RAML node and converts each property into a schema, in an entry\n * formatted\n * @param {RAMLNode} node: the node to get the properties from\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Entry<string, Object>>} the corresponding array\n */\nmethods.getPropertiesSchema = (node, offsetKey) => {\n  const properties = node.properties()\n\n  if (!properties) {\n    return []\n  }\n\n  const propSchemas = properties\n    .map((prop) => methods.convertPropertyIntoSchemaEntry(prop, offsetKey))\n\n  return propSchemas\n}\n\n/**\n * adds the properties key to a schema, from a RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to get the properties from\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the updated schema\n */\nmethods.addPropertiesToSchema = (schema, node, offsetKey) => {\n  let updated = schema\n\n  const propSchemas = methods.getPropertiesSchema(node, offsetKey)\n\n  updated = methods.addPropertiesKeyToSchema(updated, propSchemas)\n  updated = methods.addRequiredKeyToSchema(updated, propSchemas)\n\n  const otherSchemas = methods.getOtherSchemasFromPropertiesSchemas(propSchemas)\n\n  return [ updated, ...otherSchemas ]\n}\n\n/**\n * tests whether the type is a standard JSON Schema type\n * @param {string} type: the type to test\n * @returns {boolean} whether it is a standard JSON type\n */\nmethods.isJSONSchemaType = (type) => {\n  return [ 'array', 'object', 'number', 'integer', 'string', 'boolean' ].indexOf(type) !== -1\n}\n\n/**\n * tests whether the type is nil\n * @param {string} type: the type to test\n * @returns {boolean} whether the type is nil or not\n */\nmethods.isNilType = (type) => type === 'nil'\n\n/**\n * tests whether the type is an implicit array type\n * @param {string} type: the type to test\n * @returns {boolean} whether the type is an implicit array type\n */\nmethods.isImplicitArrayType = (type) => !!type.match(/\\[\\]$/)\n\n/**\n * converts a type into an array-typed schema\n * @param {string} type: the type to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the corresponding schema\n */\nmethods.getSchemaFromArrayType = (type, offsetKey) => {\n  const schemas = methods.getSchemaFromType(type, offsetKey)\n  const items = schemas.length === 1 ? schemas[0] : schemas\n  return {\n    type: 'array',\n    items\n  }\n}\n\n/**\n * converts a potential implicit array type into an array-typed schema\n * @param {string} type: the type to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object?} the corresponding schema, it is indeed an implicit array type\n */\nmethods.getSchemaFromImplicitArrayType = (type, offsetKey) => {\n  if (methods.isImplicitArrayType(type)) {\n    const mixedTypesMatch = type.match(/^\\(([^()]+)\\)\\[\\]$/)\n    const uniqueTypeMatch = type.match(/^([^|]+)\\[\\]$/)\n\n    if (mixedTypesMatch || uniqueTypeMatch) {\n      const itemType = (mixedTypesMatch || uniqueTypeMatch)[1]\n      return methods.getSchemaFromArrayType(itemType, offsetKey)\n    }\n  }\n\n  return null\n}\n\n/**\n * converts a potential union type into a schema\n * @param {string} type: the type to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object?} the corresponding schema, it is indeed a union type\n */\nmethods.getSchemaFromUnionType = (type, offsetKey) => {\n  const union = type.split('|').map(str => str.trim()).filter(v => !!v)\n\n  if (union.length > 1) {\n    const anyOf = methods.getSchemaListFromTypes(union, offsetKey)\n    return { anyOf }\n  }\n\n  return null\n}\n\n/**\n * converts a reference type into a schema\n * @param {string} type: the type to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the corresponding schema\n *\n * NOTE: What is the semantic difference between this method and @convertTypeDeclaration ?\n */\nmethods.getSchemaFromReferenceType = (type, offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.' + type : type\n  const $ref = '#/definitions/' + ref\n  return { $ref }\n}\n\n/**\n * converts a potential standard json type into a schema\n * @param {string} type: the type to convert into a schema\n * @returns {Object?} the corresponding schema, it is indeed a json type\n */\nmethods.getSchemaFromJSONType = (type) => {\n  if (methods.isJSONSchemaType(type)) {\n    return { type }\n  }\n\n  return null\n}\n\n/**\n * converts a potential nil type into a schema\n * @param {string} type: the type to convert into a schema\n * @returns {Object?} the corresponding schema, it is indeed a nil type\n */\nmethods.getSchemaFromNilType = (type) => {\n  if (methods.isNilType(type)) {\n    return { type: 'null' }\n  }\n\n  return null\n}\n\n/**\n * converts a type into a schema\n * @param {string} _type: the type to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object?} the corresponding schema\n */\nmethods.getSchemaFromType = (_type, offsetKey) => {\n  const type = _type.trim()\n\n  const schema = methods.getSchemaFromJSONType(type) ||\n    methods.getSchemaFromNilType(type) ||\n    methods.getSchemaFromImplicitArrayType(type, offsetKey) ||\n    methods.getSchemaFromUnionType(type, offsetKey) ||\n    methods.getSchemaFromReferenceType(type, offsetKey)\n\n  return schema\n}\n\n/**\n * converts an array of types into an array of schemas\n * @param {Array<string>} types: the array of types to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.getSchemaListFromTypes = (types, offsetKey) => {\n  if (types === null) {\n    return []\n  }\n  return types.map((type) => methods.getSchemaFromType(type, offsetKey))\n}\n\nmethods.convertMultipleInheritanceObjectWithSingleType = (schemas, $type) => {\n  const type = $type.type\n  const allOf = schemas.filter((schema) => !schema.type)\n  const schema = { type }\n  if (type === 'array' && $type.items) {\n    schema.items = $type.items\n  }\n  if (allOf.length) {\n    schema.allOf = allOf\n  }\n  return schema\n}\n\n/**\n * converts a multiple inheritance object into a schema from an array of types\n * @param {Array<string>} types: the array of types of the multiple inheritance object\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the corresponding schema\n */\nmethods.convertMultipleInheritanceObject = (types, offsetKey) => {\n  const schemas = methods.getSchemaListFromTypes(types, offsetKey)\n\n  const $types = schemas.filter(schema => !!schema.type)\n\n  if ($types.length === 1) {\n    return methods.convertMultipleInheritanceObjectWithSingleType(schemas, $types[0])\n  }\n\n  if (schemas.length === 0) {\n    return { }\n  }\n\n  const allOf = schemas\n  return { allOf }\n}\n\n/**\n * converts an array of types into a schema\n * @param {Array<string>} types: the array of types\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the corresponding schema\n */\nmethods.getSchemasFromTypes = (types, offsetKey) => {\n  const schema = methods.convertMultipleInheritanceObject(types, offsetKey)\n  return schema\n}\n\n/**\n * adds inherited types of a RAML node to a schema\n * @param {Object} $schema: the schema to update\n * @param {RAMLNode} node: the raml node to get the types from\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the updated schema\n */\nmethods.addInheritedTypes = ($schema, node, offsetKey) => {\n  const types = node.type()\n\n  const schema = methods.getSchemasFromTypes(types, offsetKey)\n\n  return Object.assign({}, $schema, schema)\n}\n\n/**\n * converts an object type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertObjectTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n  let otherSchemas = []\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n  schema = methods.addSimpleObjectFieldsToSchema(schema, node);\n  [ schema, ...otherSchemas ] = methods.addPropertiesToSchema(schema, node, offsetKey)\n\n  return [ schema, ...otherSchemas ]\n}\n\n/**\n * updates an array typed schema with simple fields used in array schemas\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to get the values of the simple fields from\n * @returns {Object} the updated schema\n */\nmethods.addSimpleArrayFieldsToSchema = (schema, node) => {\n  const props = [\n    {\n      key: 'uniqueItems',\n      value: node.uniqueItems()\n    },\n    {\n      key: 'minItems',\n      value: node.minItems()\n    },\n    {\n      key: 'maxItems',\n      value: node.maxItems()\n    }\n  ]\n\n  return props\n    .filter(({ value }) => value !== null)\n    .reduce(convertEntryListInMap, schema)\n}\n\n/**\n * tests whether a key is non-descriptive or not\n * @param {string} key: the key to test\n * @returns {boolean} whether the key is non-descriptive or not\n */\nmethods.isNonDescriptKey = (key) => [ 'title', 'description', '$key' ].indexOf(key) < 0\n\n/**\n * normalizes a schema by checking if it is only composed of descriptive keys and an allOf key\n * containing a single schema, and if so, moves the content of the allOf schema inside the parent\n * schema, removing the allOf key.\n * @param {Object} schema: the schema to normalize\n * @returns {Object} the normalized schema\n */\nmethods.normalizeSchema = (schema) => {\n  const keys = Object.keys(schema)\n  const nonDescripKeys = keys.filter(methods.isNonDescriptKey)\n  if (nonDescripKeys.length === 1 && schema.allOf && schema.allOf.length === 1) {\n    const allOf = schema.allOf[0]\n    delete schema.allOf\n\n    return Object.assign(schema, allOf)\n  }\n\n  return schema\n}\n\n/**\n * extracts an array of types for the items of a RAML node\n * @param {RAMLNode} node: the node to get the items' types from.\n * @returns {Array<string>} the corresponding types for the items of the node\n */\nmethods.getItemTypes = (node) => {\n  const items = node.items()\n  if (items && items.length) {\n    return items\n  }\n\n  const types = node.type()\n  const itemTypes = types.map(type => type.trim())\n    .filter(type => type.match(/\\(?.*?\\)?\\[\\]$/))\n    .map(type => type.match(/\\(?(.*?)\\)?\\[\\]$/)[1])\n\n  return itemTypes\n}\n\n/**\n * updates a schema with the items key from a RAML node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to get the items data from\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Objet} the updated schema\n */\nmethods.addItemFieldToSchema = (schema, node, offsetKey) => {\n  const types = methods.getItemTypes(node)\n  const items = methods.getSchemasFromTypes(types, offsetKey)\n  const normalizedItems = methods.normalizeSchema(items)\n  if (Object.keys(normalizedItems).length) {\n    schema.items = normalizedItems\n  }\n  return schema\n}\n\n/**\n * converts an array type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertArrayTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n  schema = methods.addSimpleArrayFieldsToSchema(schema, node)\n  schema = methods.addItemFieldToSchema(schema, node, offsetKey)\n\n  return [ schema ]\n}\n\n/**\n * convert a union type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert into a schema\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertUnionTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n\n  return [ schema ]\n}\n\n/**\n * updates a schema with simple string values from a RAML node\n * @param {Object} schema: the shema to update\n * @param {RAMLNode} node: the node to get the data from\n * @returns {Object} the updated schema\n */\nmethods.addSimpleStringFieldsToSchema = (schema, node) => {\n  const props = [\n    {\n      key: 'minLength',\n      value: node.minLength()\n    },\n    {\n      key: 'maxLength',\n      value: node.maxLength()\n    },\n    {\n      key: 'pattern',\n      value: node.pattern()\n    },\n    {\n      key: 'enum',\n      value: (node.enum() || []).length ? node.enum() : null\n    }\n  ]\n\n  return props\n    .filter(prop => prop.value !== null)\n    .reduce(convertEntryListInMap, schema)\n}\n\n/**\n * converts a string type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Object} the corresponding array of schemas\n */\nmethods.convertStringTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n  schema = methods.addSimpleStringFieldsToSchema(schema, node)\n\n  return [ schema ]\n}\n\n/**\n * updates a schema with simple number properties from a node\n * @param {Object} schema: the schema to update\n * @param {RAMLNode} node: the node to get the data from\n * @returns {Object} the updated schema\n */\nmethods.addSimpleNumberFieldsToSchema = (schema, node) => {\n  const props = [\n    {\n      key: 'minimum',\n      value: node.minimum()\n    },\n    {\n      key: 'maximum',\n      value: node.maximum()\n    },\n    {\n      key: 'multipleOf',\n      value: node.multipleOf()\n    },\n    {\n      key: 'enum',\n      value: (node.enum() || []).length ? node.enum() : null\n    }\n  ]\n\n  return props\n    .filter(prop => prop.value !== null)\n    .reduce(convertEntryListInMap, schema)\n}\n\n/**\n * converts a number type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertNumberTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n  schema = methods.addSimpleNumberFieldsToSchema(schema, node)\n\n  return [ schema ]\n}\n\n/**\n * converts a boolean type declaration node into an array of schemas\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertBooleanTypeDeclaration = (node, offsetKey) => {\n  let schema = {}\n\n  schema = methods.addInheritedTypes(schema, node, offsetKey)\n\n  return [ schema ]\n}\n\n/**\n * converts a date-only type declaration node into an array of schemas\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertDateOnlyTypeDeclaration = (offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.$DateOnly' : '$DateOnly'\n  const schema = {\n    type: 'string',\n    $ref: '#/definitions/' + ref\n  }\n\n  const DateOnlySchema = {\n    $key: ref,\n    type: 'string',\n    pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$',\n    description: 'full-date as defined in RFC#3339'\n  }\n\n  return [ schema, DateOnlySchema ]\n}\n\n/**\n * converts a time-only type declaration node into an array of schemas\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertTimeOnlyTypeDeclaration = (offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.$TimeOnly' : '$TimeOnly'\n  const schema = {\n    type: 'string',\n    $ref: '#/definitions/' + ref\n  }\n\n  const TimeOnlySchema = {\n    $key: ref,\n    type: 'string',\n    pattern: '^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n    description: 'full-time as defined in RFC#3339'\n  }\n\n  return [ schema, TimeOnlySchema ]\n}\n\n/**\n * converts a datetime-only type declaration node into an array of schemas\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertDateTimeOnlyTypeDeclaration = (offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.$DateTimeOnly' : '$DateTimeOnly'\n  const schema = {\n    type: 'string',\n    $ref: '#/definitions/' + ref\n  }\n\n  const DateTimeOnlySchema = {\n    $key: ref,\n    type: 'string',\n    pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T' +\n      '([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n    description: 'full-time as defined in RFC#3339'\n  }\n\n  return [ schema, DateTimeOnlySchema ]\n}\n\n/**\n * converts a datetime type declaration node into an array of schemas\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertDateTimeTypeDeclaration = (offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.$DateTime' : '$DateTime'\n  const schema = {\n    type: 'string',\n    $ref: '#/definitions/' + ref\n  }\n\n  const DateTimeSchema = {\n    $key: ref,\n    type: 'string',\n    description: 'datetime'\n  }\n\n  return [ schema, DateTimeSchema ]\n}\n\n/**\n * converts a file type declaration node into an array of schemas\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.convertFileTypeDeclaration = (offsetKey) => {\n  const ref = offsetKey ? offsetKey + '.$File' : '$File'\n  const schema = {\n    type: 'string',\n    $ref: '#/definitions/' + ref\n  }\n\n  const FileSchema = {\n    $key: ref,\n    type: 'string',\n    description: 'file',\n    pattern: '^[^\\u0000]*\\u0000$'\n  }\n\n  return [ schema, FileSchema ]\n}\n\n/* eslint-disable max-statements */\n/**\n * converts a node into an array of schemas\n * @param {RAMLNode} node: the node to convert\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @returns {Array<Object>} the corresponding array of schemas\n */\nmethods.createSchema = (node, offsetKey) => {\n  let schema = {}\n  let otherSchemas = []\n\n  const typeKind = node.kind()\n  // External Declaration\n  if (typeKind === 'TypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'ObjectTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertObjectTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'ArrayTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertArrayTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'UnionTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertUnionTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'StringTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertStringTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'NumberTypeDeclaration' || typeKind === 'IntegerTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertNumberTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'BooleanTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertBooleanTypeDeclaration(node, offsetKey)\n  }\n  else if (typeKind === 'DateOnlyTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertDateOnlyTypeDeclaration(offsetKey)\n  }\n  else if (typeKind === 'TimeOnlyTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertTimeOnlyTypeDeclaration(offsetKey)\n  }\n  else if (typeKind === 'DateTimeOnlyTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertDateTimeOnlyTypeDeclaration(offsetKey)\n  }\n  else if (typeKind === 'DateTimeTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertDateTimeTypeDeclaration(offsetKey)\n  }\n  else if (typeKind === 'FileTypeDeclaration') {\n    [ schema, ...otherSchemas ] = methods.convertFileTypeDeclaration(offsetKey)\n  }\n\n  schema = methods.addDescriptiveFields(schema, node, offsetKey)\n\n  return [ schema, ...otherSchemas ]\n}\n/* eslint-enable max-statements */\n\n/**\n * updates a definitions object with a schema\n * @param {Object} defs: the definitions object to update\n * @param {Object} schema: the schema to add to the definitions object\n * @returns {Object} the updated definitions object\n */\nmethods.addSchemaToDefinitionsReducer = (defs, schema) => {\n  const key = schema.$key\n  delete schema.$key\n  defs[key] = schema\n  return defs\n}\n\n/**\n * converts a type into schemas and add them to the definitions object\n * @param {string?} offsetKey: the name of the library this node/schema belongs to, if any\n * @param {Object} definitions: the definitions object to update with the schemas\n * @param {RAMLNode} type: the node to extract the schemas from\n * @returns {Object} the updated definitions object\n */\nmethods.addDefinitionsReducer = (offsetKey, definitions, type) => {\n  const schemas = methods.createSchema(type, offsetKey).map(methods.normalizeSchema)\n  return schemas.reduce(methods.addSchemaToDefinitionsReducer, definitions)\n}\n\n/**\n * converts all types in a RAML Api into a definitions object\n * @param {RAMLApi} api: the api to get the types from\n * @param {string?} offsetKey: the name of the library this api belongs to, if any\n * @returns {{ definitions: Object }} the corresponding definitions object, encapsulating all the\n * schemas present in the api\n */\nmethods.createDefinitions = (api, offsetKey) => {\n  const types = api.types()\n  const addDefinitionsReducer = currify(methods.addDefinitionsReducer, offsetKey)\n  const definitions = types.reduce(addDefinitionsReducer, {})\n\n  return { definitions }\n}\n\n/**\n * extracts definitions from the libraries included with the RAMLApi object\n * @param {RAMLApi} api: the api object from which to get the libraries\n * @returns {Object<string, JSONSchema>} the corresponding defintions map of JSONSchemas belonging\n * to the libraries (namespaced)\n */\nmethods.extractDefinitionsFromLibaries = (api) => {\n  const libraries = api.uses()\n\n  if (!libraries) {\n    return {}\n  }\n\n  const libraryDefinitions = libraries\n    .map((library) => {\n      if (!library || !library.ast()) {\n        return null\n      }\n\n      return methods.createDefinitions(library.ast(), library.key()).definitions\n    })\n    .filter(v => !!v)\n    .reduce((acc, value) => {\n      const libDefs = entries(value)\n      return [].concat(acc, libDefs)\n    }, [])\n    .reduce(convertEntryListInMap, {})\n\n  return libraryDefinitions\n}\n\n/**\n * extracts all shared constraints from a RAML Api and stores them in a Constraint TypedStore.\n * @param {RAMLApi} api: the api to get the constraints from\n * @returns {OrderedMap<string, Constraint>} the corresponding TypedStore\n */\nmethods.extractConstraintStore = (api) => {\n  const { definitions } = methods.createDefinitions(api)\n  const libraryDefinitions = methods.extractDefinitionsFromLibaries(api)\n  const allDefinitions = Object.assign({}, definitions, libraryDefinitions)\n\n  return OrderedMap(allDefinitions).map((schema) => new Constraint.JSONSchema(schema))\n}\n\n/**\n * extracts all shared parameters from a RAML Api and stores them in a Parameter TypedStore.\n * @param {RAMLApi} api: the api to get the parameters from\n * @returns {OrderedMap<string, Parameter>} the corresponding TypedStore\n */\nmethods.extractParameterStore = (api) => {\n  const params = {}\n  const globalContentTypeParam = methods.getGlobalContentTypeParameter(api)\n  if (globalContentTypeParam) {\n    params.globalMediaType = globalContentTypeParam\n  }\n\n  return OrderedMap(params)\n}\n\n/**\n * extracts scopes from a RAML OAuth2 settings object\n * @param {RAMLOAuth2SecuritySchemeSettings} settings: the settings from which to get the scopes\n * @returns {List<Entry<string, string>>} the corresponding scopes\n */\nmethods.extractScopesFromOAuth2Settings = (settings) => {\n  const scopes = settings.scopes().map(scope => ({ key: scope, value: '' }))\n\n  return List(scopes)\n}\n\n/**\n * extracts the flow from a RAML OAuth2 settings object\n * @param {RAMLOAuth2SecuritySchemeSettings} settings: the settings from which to get the flow\n * @returns {string?} the corresponding flow\n */\nmethods.extractFlowFromOAuth2Settings = (settings) => {\n  const grantMap = {\n    authorization_code: 'accessCode',\n    implicit: 'implicit',\n    password: 'password',\n    client_credentials: 'application'\n  }\n  const flow = grantMap[(settings.authorizationGrants() || [])[0]] || null\n\n  return flow\n}\n\n/**\n * extracts the authorizationUrl from a RAML OAuth2 settings object\n * @param {RAMLOAuth2SecuritySchemeSettings} settings: the settings from which to get the url\n * @returns {string?} the corresponding url\n */\nmethods.extractAuthorizationUrlFromOAuth2Settings = (settings) => {\n  return (settings.authorizationUri() || { value: () => null }).value() || null\n}\n\n/**\n * extracts the tokenUrl from a RAML OAuth2 settings object\n * @param {RAMLOAuth2SecuritySchemeSettings} settings: the settings from which to get the url\n * @returns {string?} the corresponding url\n */\nmethods.extractTokenUrlFromOAuth2Settings = (settings) => {\n  return (settings.accessTokenUri() || { value: () => null }).value() || null\n}\n\n/**\n * extracts the authName from a RAML Auth scheme\n * @param {RAMLSecurityScheme} scheme: the scheme to get the authName from\n * @returns {string} the corresponding url\n */\nmethods.extractAuthNameFromAuthScheme = (scheme) => scheme.name()\n\n/**\n * converts a RAML OAuth2 Security Scheme into an OAuth2 Record\n * @param {RAMLOAuth2SecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string,OAuth2Auth>} the corresponding OAuth2 record\n */\nmethods.convertRAMLAuthIntoOAuth2AuthEntry = (scheme) => {\n  const settings = scheme.settings()\n\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const flow = methods.extractFlowFromOAuth2Settings(settings)\n  const authorizationUrl = methods.extractAuthorizationUrlFromOAuth2Settings(settings)\n  const tokenUrl = methods.extractTokenUrlFromOAuth2Settings(settings)\n  const scopes = methods.extractScopesFromOAuth2Settings(settings)\n\n  const authInstance = {\n    authName,\n    description,\n    flow,\n    authorizationUrl,\n    tokenUrl,\n    scopes\n  }\n\n  return { key: authName, value: new Auth.OAuth2(authInstance) }\n}\n\n/**\n * extracts the requestTokenUri from a RAML OAuth1 settings object\n * @param {RAMLOAuth1SecuritySchemeSettings} settings: the settings from which to get the url\n * @returns {string?} the corresponding url\n */\nmethods.extractRequestTokenUriFromOAuth1Settings = (settings) => {\n  return (settings.requestTokenUri() || { value: () => null }).value() || null\n}\n\n/**\n * extracts the authorizationUri from a RAML OAuth1 settings object\n * @param {RAMLOAuth1SecuritySchemeSettings} settings: the settings from which to get the url\n * @returns {string?} the corresponding url\n */\nmethods.extractAuthorizationUriFromOAuth1Settings = (settings) => {\n  return (settings.authorizationUri() || { value: () => null }).value() || null\n}\n\n/**\n * extracts the tokenCredentialsUri from a RAML OAuth1 settings object\n * @param {RAMLOAuth1SecuritySchemeSettings} settings: the settings from which to get the url\n * @returns {string?} the corresponding url\n */\nmethods.extractTokenCredentialsUriFromOAuth1Settings = (settings) => {\n  return (settings.tokenCredentialsUri() || { value: () => null }).value() || null\n}\n\n/**\n * extracts the signature from a RAML OAuth1 settings object\n * @param {RAMLOAuth1SecuritySchemeSettings} settings: the settings from which to get the signature\n * @returns {string?} the corresponding signature\n */\nmethods.extractSignatureFromOAuth1Settings = (settings) => {\n  return (settings.signatures() || [])[0] || null\n}\n\n/**\n * converts a RAML OAuth1 Security Scheme into an OAuth1 Record\n * @param {RAMLOAuth1SecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string,OAuth1Auth>} the corresponding OAuth1 record\n */\nmethods.convertRAMLAuthIntoOAuth1AuthEntry = (scheme) => {\n  const settings = scheme.settings()\n\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const requestTokenUri = methods.extractRequestTokenUriFromOAuth1Settings(settings)\n  const authorizationUri = methods.extractAuthorizationUriFromOAuth1Settings(settings)\n  const tokenCredentialsUri = methods.extractTokenCredentialsUriFromOAuth1Settings(settings)\n  const signature = methods.extractSignatureFromOAuth1Settings(settings)\n\n  const authInstance = {\n    authName,\n    description,\n    requestTokenUri,\n    authorizationUri,\n    tokenCredentialsUri,\n    signature\n  }\n\n  return { key: authName, value: new Auth.OAuth1(authInstance) }\n}\n\n/**\n * extracts the location and key from a RAML PassThroughSecurityScheme (aka ApiKey)\n * @param {RAMLPassThroughSecurityScheme} scheme: the security scheme from which to get the location\n * and key\n * @returns {{key: string?, location: string?}} the corresponding object holding the key and\n * location\n */\nmethods.extractLocationAndKeyFromApiKeyScheme = (scheme) => {\n  const describedBy = scheme.describedBy()\n\n  if (!describedBy) {\n    return { key: null, location: null }\n  }\n\n  const headers = describedBy.headers()\n  const queries = describedBy.queryParameters()\n\n  if (headers && headers.length) {\n    return { key: headers[0].name(), location: 'header' }\n  }\n\n  if (queries && queries.length) {\n    return { key: queries[0].name(), location: 'query' }\n  }\n\n  return { key: null, location: null }\n}\n\n/**\n * converts a RAML PassThroughSecurityScheme into an ApiKey Record\n * @param {RAMLPassThroughSecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string,ApiKeyAuth>} the corresponding ApiKey record\n */\nmethods.convertRAMLAuthIntoApiKeyAuthEntry = (scheme) => {\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const { key, location } = methods.extractLocationAndKeyFromApiKeyScheme(scheme)\n\n  const authInstance = {\n    description,\n    authName,\n    key,\n    in: location\n  }\n\n  return { key: authName, value: new Auth.ApiKey(authInstance) }\n}\n\n/**\n * converts a RAML Basic Security Scheme into a Basic Record\n * @param {RAMLBasicSecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string,BasicAuth>} the corresponding Basic record\n */\nmethods.convertRAMLAuthIntoBasicAuthEntry = (scheme) => {\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const authInstance = { authName, description }\n\n  return { key: authName, value: new Auth.Basic(authInstance) }\n}\n\n/**\n * converts a RAML Digest Security Scheme into an OAuth2 Record\n * @param {RAMLDigestSecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string, DigestAuth>} the corresponding Digest record\n */\nmethods.convertRAMLAuthIntoDigestAuthEntry = (scheme) => {\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const authInstance = { authName, description }\n\n  return { key: authName, value: new Auth.Digest(authInstance) }\n}\n\n/**\n* converts a RAML Custom Security Scheme into a CustomAuth Record\n* @param {RAMLAbstractSecurityScheme} scheme: the security scheme to convert\n* @returns {Entry<string, CustomAuth>} the corresponding CustomAuth record\n */\nmethods.convertRAMLAuthIntoCustomAuthEntry = (scheme) => {\n  const authName = methods.extractAuthNameFromAuthScheme(scheme)\n  const description = methods.extractDescription(scheme)\n\n  const authInstance = { authName, description }\n  return { key: authName, value: new Auth.Custom(authInstance) }\n}\n\n/* eslint-disable max-statements */\n/**\n * converts a RAML Security Scheme into an Auth Record\n * @param {RAMLSecurityScheme} scheme: the security scheme to convert\n * @returns {Entry<string,Auth>?} the corresponding Auth record\n */\nmethods.convertRAMLAuthIntoAuthEntry = (scheme) => {\n  const kind = scheme.kind()\n\n  if (kind === 'OAuth2SecurityScheme') {\n    return methods.convertRAMLAuthIntoOAuth2AuthEntry(scheme)\n  }\n\n  if (kind === 'OAuth1SecurityScheme') {\n    return methods.convertRAMLAuthIntoOAuth1AuthEntry(scheme)\n  }\n\n  if (kind === 'PassThroughSecurityScheme') {\n    return methods.convertRAMLAuthIntoApiKeyAuthEntry(scheme)\n  }\n\n  if (kind === 'BasicSecurityScheme') {\n    return methods.convertRAMLAuthIntoBasicAuthEntry(scheme)\n  }\n\n  if (kind === 'DigestSecurityScheme') {\n    return methods.convertRAMLAuthIntoDigestAuthEntry(scheme)\n  }\n\n  if (kind === 'AbstractSecurityScheme') {\n    return methods.convertRAMLAuthIntoCustomAuthEntry(scheme)\n  }\n\n  return null\n}\n/* eslint-enable max-statements */\n\n/**\n * extracts all security schemes from a RAML Library and stores them in an array of entries\n * @param {RAMLLibrary} lib: the library from which to get the security schemes\n * @returns {Array<Entry<string, Auth>>} the corresponding array of Auth as Entries\n */\nmethods.extractAuthsFromRAMLLibrary = (lib) => {\n  const schemes = lib.ast().securitySchemes()\n\n  if (!schemes || !schemes.length) {\n    return []\n  }\n\n  return schemes\n    .map(methods.convertRAMLAuthIntoAuthEntry)\n    .filter(v => !!v)\n    .map(({ key, value }) => {\n      const libKey = lib.key() + '.' + key\n      return { key: libKey, value }\n    })\n}\n\n/**\n * extracts all security schemes from a RAML Api and stores them in an array of entries\n * @param {RAMLApi} api: the api from which to get the security schemes\n * @returns {Array<Entry<string, Auth>>} the corresponding array of Auth as Entries\n */\nmethods.extractAuthsFromRAMLApi = (api) => {\n  const securitySchemes = api.securitySchemes() || []\n  const authsFromLibs = (api.uses() || [])\n    .map(methods.extractAuthsFromRAMLLibrary)\n    .reduce(flatten, [])\n\n  const auths = securitySchemes\n    .map(methods.convertRAMLAuthIntoAuthEntry)\n    .filter(v => !!v)\n\n  return [].concat(auths, authsFromLibs)\n}\n\n/**\n * extracts all security schemes from a RAML Api and stores them in an Auth TypedStore\n * @param {RAMLApi} api: the api from which to get the security schemes\n * @returns {OrderedMap<string, Auth>} the corresponding TypedStore\n */\nmethods.extractAuthStore = (api) => {\n  const auths = methods.extractAuthsFromRAMLApi(api)\n  const authMap = auths.reduce(convertEntryListInMap, {})\n\n  return OrderedMap(authMap)\n}\n\n/**\n * extracts the interface name from a resource base\n * @param {RAMLResourceBase} resourceBase: the resource base from which to get the interface name\n * @returns {string} the corresponding interface name\n */\nmethods.extractInterfaceNameFromResourceBase = (resourceBase) => resourceBase.name()\n\n/**\n * extracts the interface uuid from a resource name\n * @param {string} name: the name from which to get the resource uuid\n * @returns {string} the corresponding interface uuid\n */\nmethods.extractInterfaceUUIDFromResourceName = (name) => 'resourceType_' + name\n\n/**\n * extracts the interface description from a resource base\n * @param {RAMLResourceBase} resourceBase: the resource base from which to get the interface\n * description\n * @returns {string} the corresponding interface description\n */\nmethods.extractInterfaceDescriptionFromResourceBase = (resourceBase) => {\n  return resourceBase.usage() || null\n}\n\n/**\n * converts a RAML resourceBase into an interface entry\n * @param {RAMLResourceBase} resourceBase: the resource base to convert\n * @returns {Entry<string, Interface>} the corresponding interface entry\n */\nmethods.convertResourceBaseIntoInterfaceEntry = (resourceBase) => {\n  const name = methods.extractInterfaceNameFromResourceBase(resourceBase)\n  const uuid = methods.extractInterfaceUUIDFromResourceName(name)\n  const description = methods.extractInterfaceDescriptionFromResourceBase(resourceBase)\n  const resourceInstance = methods.convertRAMLResourceBaseIntoResourceInstance(null, resourceBase)\n  const underlay = new Resource(resourceInstance)\n\n  const interfaceInstance = { name, uuid, level: 'resource', description, underlay }\n\n  return { key: uuid, value: new Interface(interfaceInstance) }\n}\n\n/**\n * extracts the interface name from a method base\n * @param {RAMLMethodBase} methodBase: the method base from which to get the interface name\n * @returns {string} the corresponding interface name\n */\nmethods.extractInterfaceNameFromMethodBase = (methodBase) => methodBase.name()\n\n/**\n * extracts the interface uuid from a method name\n * @param {string} name: the name from which to get the method uuid\n * @returns {string} the corresponding interface uuid\n */\nmethods.extractInterfaceUUIDFromMethodName = (name) => 'trait_' + name\n\n/**\n * extracts the interface description from a resource base\n * @param {RAMLMethodBase} methodBase: the method base from which to get the interface\n * description\n * @returns {string} the corresponding interface description\n */\nmethods.extractInterfaceDescriptionFromMethodBase = (methodBase) => methodBase.usage() || null\n\n/**\n * converts a RAML methodBase into an interface entry\n * @param {RAMLMethodBase} methodBase: the method base to convert\n * @returns {Entry<string, Interface>} the corresponding interface entry\n */\nmethods.convertMethodBaseIntoInterfaceEntry = (methodBase) => {\n  const name = methods.extractInterfaceNameFromMethodBase(methodBase)\n  const uuid = methods.extractInterfaceUUIDFromMethodName(name)\n  const description = methods.extractInterfaceDescriptionFromMethodBase(methodBase)\n  const requestInstance = methods.convertRAMLMethodBaseIntoRequestInstance(null, methodBase)\n  const underlay = new Request(requestInstance)\n\n  const interfaceInstance = { name, uuid, level: 'request', description, underlay }\n\n  return { key: uuid, value: new Interface(interfaceInstance) }\n}\n\n/**\n * extracts all shared interfaces from a RAML Api and stores them in a TypedStore\n * @param {RAMLApi} api: the api to get the resourceTypes and traits from\n * @returns {OrderedMap<string, Interface>} the corresponding TypedStore\n */\nmethods.extractInterfaceStore = (api) => {\n  const resourceInterfaces = (api.resourceTypes() || [])\n    .map(methods.convertResourceBaseIntoInterfaceEntry)\n\n  const requestInterfaces = (api.traits() || [])\n    .map(methods.convertMethodBaseIntoInterfaceEntry)\n\n  const interfaces = [].concat(resourceInterfaces, requestInterfaces)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(interfaces)\n}\n\n/**\n * updates an endpoint's URLComponent with uriParameters, based on the component's name\n * @param {URL} endpoint: the endpoint to update\n * @param {string} componentName: the name of the component to update in the endpoint\n * @param {Array<JSONSchema>} uriParameters: the uriParameters to use to upgrade the description of\n * named parameters in the endpoint\n * @returns {URL} the updated endpoint\n */\nmethods.updateURLComponentWithUriParameters = (endpoint, componentName, uriParameters) => {\n  const component = endpoint.get(componentName)\n\n  if (component && component.getIn([ 'parameter', 'superType' ]) === 'sequence') {\n    const componentValue = component\n      .getIn([ 'parameter', 'value' ])\n      .map(param => {\n        const candidates = uriParameters\n          .filter(uriParameter => {\n            return uriParameter.$key === param.get('key')\n          })\n\n        if (candidates.length) {\n          return methods.convertSchemaIntoParameterEntry(componentName, List(), candidates[0]).value\n        }\n\n        return param\n      })\n    return component.setIn([ 'parameter', 'value' ], componentValue)\n  }\n\n  return component\n}\n\n/**\n * update an endpoint with uriParameters\n * @param {URL} $endpoint: the endpoint to update\n * @param {Array<JSONSchema>} uriParameters: the uriParameters to use to upgrade the description of\n * named parameters in the endpoint\n * @returns {URL} the updated endpoint\n */\nmethods.updateEndpointWithUriParameters = ($endpoint, uriParameters) => {\n  return $endpoint.withMutations(endpoint => {\n    const componentNames = [ 'hostname', 'port', 'pathname' ]\n    componentNames.forEach(componentName => {\n      const updatedComponent = methods\n        .updateURLComponentWithUriParameters(endpoint, componentName, uriParameters)\n      endpoint.set(componentName, updatedComponent)\n    })\n  })\n}\n\n/**\n * extracts the baseUri endpoint from a RAMLApi\n * @param {RAMLBaseUri} baseUri: the baseUri to convert into an endpoint\n * @param {RAMLApi} api: the api from which to get the baseUriParameters\n * @returns {URL} the corresponding endpoint\n */\nmethods.extractBaseUriWithParameters = (baseUri, api) => {\n  const uri = baseUri.value()\n  const protocols = api.protocols()\n  let endpoint = new URL({ url: uri, variableDelimiters: List([ '{', '}' ]) })\n  if (protocols && protocols.length) {\n    endpoint = endpoint.set('protocol', List(protocols.map(protocol => {\n      if (protocol[protocol.length - 1] !== ':') {\n        return protocol.toLowerCase() + ':'\n      }\n\n      return protocol.toLowerCase()\n    })))\n  }\n\n  const parameters = api.baseUriParameters()\n  if (!parameters || !parameters.length) {\n    return endpoint\n  }\n\n  const uriParameters = parameters\n    .map(uriParameter => methods.createSchema(uriParameter).map(methods.normalizeSchema)[0])\n\n  return methods.updateEndpointWithUriParameters(endpoint, uriParameters)\n}\n\n/**\n * extracts the shared endpoint TypedStore from a RAMLApi\n * @param {RAMLApi} api: the api from which to get the shared endpoint\n * @returns {OrderedMap<string, URL>} the corresponding TypedStore\n */\nmethods.extractEndpointStore = (api) => {\n  const baseUri = api.baseUri()\n  if (!baseUri) {\n    const base = new URL()\n    return OrderedMap({ base })\n  }\n\n  const base = methods.extractBaseUriWithParameters(baseUri, api)\n  return OrderedMap({ base })\n}\n\n/**\n * extracts all shared objects from a RAML Api and stores them in a Store\n * @param {RAMLApi} api: the api to get the shared objects from\n * @returns {Store} the corresponding store\n */\nmethods.extractStore = (api) => {\n  const constraint = methods.extractConstraintStore(api)\n  const endpoint = methods.extractEndpointStore(api)\n  const parameter = methods.extractParameterStore(api)\n  const auth = methods.extractAuthStore(api)\n  const $interface = methods.extractInterfaceStore(api)\n\n  const storeInstance = { constraint, endpoint, parameter, auth, interface: $interface }\n\n  return new Store(storeInstance)\n}\n\n/**\n * create a group from a RAML Resource\n * @param {RAMLResource} resource: the resource to convert into a group\n * @returns {Group} the corresponding group\n */\nmethods.createGroupFromResource = (resource) => {\n  const relativeUri = resource.relativeUri()\n  if (!relativeUri) {\n    return new Group({\n      id: resource.completeRelativeUri()\n    })\n  }\n\n  return new Group({\n    id: resource.completeRelativeUri(),\n    name: resource.relativeUri().value()\n  })\n}\n\n/**\n * extracts a group key from a RAML Resource\n * @param {RAMLResource} resource: the resource to extract the key from\n * @returns {string} the corresponding group key\n */\nmethods.getGroupKeyFromResource = (resource) => resource.completeRelativeUri()\n\n/**\n * converts a resource into a group entry\n * @param {RAMLResource} resource: the resource to converts\n * @returns {Entry<string, Group>} the corresponding group entry\n */\nmethods.createGroupEntryFromResource = (resource) => {\n  const childGroup = methods.createGroupFromResource(resource)\n\n  const key = methods.getGroupKeyFromResource(resource)\n  const value = methods.convertResourceIntoGroup(childGroup, resource)\n\n  return { key, value }\n}\n\n/**\n * tests whether a RAMLResource has the method `methods`.\n * @param {RAMLResource} resource: the resource to test\n * @returns {boolean} returns true if it has the method `methods`\n */\nmethods.resourceHasMethods = (resource) => {\n  const hasMethods = typeof resource.methods === 'function' ? !!resource.methods().length : false\n  return hasMethods\n}\n\n/**\n * recursively converts RAML resources into Groups\n * @param {Group} parentGroup: the group to add the children of the RAML resource to.\n * @param {RAMLResource|RAMLApi} resource: the resource to use to create the subgroups\n * @returns {Group} the updated parent group\n */\nmethods.convertResourceIntoGroup = (parentGroup, resource) => {\n  const children = resource.resources()\n    .map(methods.createGroupEntryFromResource)\n\n  if (methods.resourceHasMethods(resource)) {\n    const absoluteUri = resource.absoluteUri()\n    children.push({ key: absoluteUri, value: absoluteUri })\n  }\n\n  const childrenMap = children.reduce(convertEntryListInMap, {})\n\n  return parentGroup.set('children', OrderedMap(childrenMap))\n}\n\n/**\n * extracts the Group architecture from a RAML Api\n * @param {RAMLApi} api: the api to get the resources from\n * @returns {Group} the root group holding the architecture of the api\n */\nmethods.createGroups = (api) => {\n  return methods.convertResourceIntoGroup(new Group(), api)\n}\n\n/**\n * recursively gets all the uriParameters and resources from a RAML resource\n * @param {Array<RAMLTypeDeclaration>} uriParameters: an accumulator that holds uriParameters from\n * the parent resources\n * @param {RAMLResource|RAMLApi} resource: the resource to get all child resources from\n * @returns {Array<{ uriParameters: Array<RAMLTypeDeclaration>, resource: RAMLResource }>} the Array\n * containing all resources and their associated uriParameters.\n */\nmethods.getAllResources = (uriParameters, resource) => {\n  const resources = resource.resources()\n    .map((child) => {\n      const params = [ ...uriParameters, ...child.uriParameters() ]\n      return methods.getAllResources(params, child)\n    })\n    .reduce(flatten, [])\n\n  return [ { uriParameters, resource }, ...resources ]\n}\n\n/**\n * extracts all resources and their associated uriParameters from a RAML Api\n * @param {RAMLApi} api: the api to get the resources from\n * @returns {Array<{ uriParameters: Array<RAMLTypeDeclaration>, resource: RAMLResource }>} the array\n * containing all resources and their associated uriParameters.\n *\n * NOTE: calling resource.uriParameters() does not provide the expected uriParameters, as it only\n * returns the uriParameters that are defined for this specific relativeUri, and does not returns\n * the parent uriParameters. We therefore extract the uriParameters of each parent and propagate\n * them to their children, recursively.\n */\nmethods.getAllResourcesFromApi = (api) => {\n  return api.resources()\n    .map((resource) => methods.getAllResources([], resource))\n    .reduce(flatten, [])\n}\n\n/**\n * converts a string into a Parameter, where the default value is the string.\n * @param {string} str: the string to converts\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.convertStringIntoParameter = (str) => {\n  return new Parameter({\n    type: 'string',\n    default: str\n  })\n}\n\n/**\n * converts a schema into a Parameter, where the constraints are the schema.\n * @param {Object} schema: the schema to convert\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.convertSchemaIntoPathParameter = (schema) => {\n  const name = schema.$key || null\n  const clone = Object.assign({}, schema)\n  delete clone.$key\n\n  return new Parameter({\n    in: 'path',\n    key: name,\n    name: name,\n    description: clone.description || null,\n    type: clone.type || 'string',\n    constraints: List([\n      new Constraint.JSONSchema(clone)\n    ])\n  })\n}\n\n/**\n * iteratively constructs a sequence of Parameters by finding the preceding string of each\n * uri parameter, and appending both as parameters to the sequence.\n * @param {Object} acc: the accumulator for the reducer\n * @param {Array<Parameter>} acc.sequence: the sequence of parameters added up to this point\n * @param {string} acc.remaining: what is left of the string after appending each previous parameter\n * and its string prefix. E.g. for the string '/users/{userId}/songs/{songId}', if the sequence is\n * [ P('/users/'), P('{userId}') ], then the remaining string is '/songs/{songId}'.\n * @param {Object} schema: the schema corresponding to a uriParameter to add to the sequence\n * @returns {{ remaining: string, sequence: Array<Parameter>}} the updated accumulator\n *\n * NOTE: There can be some leftover string in the remaining field. The calling method MUST deal\n * with it accordingly\n */\nmethods.addPathParameterToSequence = ({ remaining, sequence }, schema) => {\n  const key = '{' + schema.$key + '}'\n  const [ before, ...after ] = remaining.split(key)\n  const beforeParam = methods.convertStringIntoParameter(before)\n  const param = methods.convertSchemaIntoPathParameter(schema)\n\n  return { sequence: [ ...sequence, beforeParam, param ], remaining: after.join(key) }\n}\n\n\n/**\n * creates a simple component Parameter from a resource uri string\n * @param {string} componentName: the name of the component which this Parameter should represent\n * @param {string} resourceUri: the uri to convert into a pathname Parameter\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.createSimpleURLComponentParameter = (componentName, resourceUri) => {\n  return new Parameter({\n    key: componentName,\n    name: componentName,\n    type: 'string',\n    default: resourceUri\n  })\n}\n\n/**\n * creates a simple pathname Parameter from a resource uri string\n * @param {string} resourceUri: the uri to convert into a pathname Parameter\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.createSimplePathnameParameter = (resourceUri) => {\n  return methods.createSimpleURLComponentParameter('pathname', resourceUri)\n}\n\n/**\n * creates a sequence component Parameter from a sequence of parameters\n * @param {string} componentName: the name of the component which this Parameter should represent\n * @param {Array<Parameter>} sequence: the sequence of parameter to use for the Sequence Parameter\n * @returns {Parameter} the corresponding sequence parameter\n */\nmethods.createSequenceURLComponentParameter = (componentName, sequence) => {\n  return new Parameter({\n    key: componentName,\n    name: componentName,\n    type: 'string',\n    superType: 'sequence',\n    value: List(sequence)\n  })\n}\n\n/**\n * creates a sequence pathname Parameter from a sequence of parameters\n * @param {Array<Parameter>} sequence: the sequence of parameter to use for the Sequence Parameter\n * @returns {Parameter} the corresponding sequence parameter\n */\nmethods.createSequencePathnameParameter = (sequence) => {\n  return methods.createSequenceURLComponentParameter('pathname', sequence)\n}\n\n/**\n * creates a generic URL Component from a resourceUri and a Parameter\n * @param {string} componentName: the name of the component\n * @param {string} resourceUri: the resource uri this URLComponent should represent\n * @param {Parameter} param: the parameter that describes the resourceUri\n * @returns {URLComponent} the corresponding URLComponent\n */\nmethods.createURLComponentFromParameter = (componentName, resourceUri, param) => {\n  const urlComponent = new URLComponent({\n    componentName,\n    string: resourceUri,\n    parameter: param,\n    variableDelimiters: List([ '{', '}' ])\n  })\n\n  return urlComponent\n}\n\n/**\n * creates a pathname URL Component from a resourceUri and a Parameter\n * @param {string} resourceUri: the resource uri this URLComponent should represent\n * @param {Parameter} param: the parameter that describes the resourceUri\n * @returns {URLComponent} the corresponding URLComponent\n */\nmethods.createPathnameURLComponentFromParameter = (resourceUri, param) => {\n  return methods.createURLComponentFromParameter('pathname', resourceUri, param)\n}\n\n/**\n * creates a pathname endpoint from a resourceUri and a simple parameter that represents the\n * resourceUri.\n * @param {string} resourceUri: the resource uri string that we want to represent with a URL\n * @param {Parameter} param: the parameter describing the resource uri\n * @returns {URL} the corresponding endpoint\n */\nmethods.createPathnameEndpointFromParameter = (resourceUri, param) => {\n  const pathname = methods.createPathnameURLComponentFromParameter(resourceUri, param)\n  return new URL().set('pathname', pathname)\n}\n\n/**\n * creates a pathname parameter from a sequence of parameters and a final parameter\n * @param {Array<Parameter>} sequence: the sequence of parameters to use for the creation of the\n * pathname parameter\n * @param {Parameter} finalParam: the parameter to append to the sequence of parameters to create\n * the full sequence of params for the Sequence Parameter\n * @returns {Parameter} the corresponding sequence parameter\n */\nmethods.createPathnameParameterFromSequenceAndFinalParam = (sequence, finalParam) => {\n  const fullSequence = [].concat(sequence, [ finalParam ])\n  const param = methods.createSequencePathnameParameter(fullSequence)\n  return param\n}\n\n/**\n * converts an array of uriParameters and a RAML resource into an endpoint representing a pathname\n * @param {Array<TypeDeclaration>} uriParameters: an array of parameters that are applicable to the\n * resource complete relative uri\n * @param {RAMLResource} resource: the resource to extract the pathname from (i.e. the\n * completeRelativeUri string)\n * @returns {URL} the corresponding endpoint\n */\nmethods.convertUriParametersAndResourceIntoPath = (uriParameters, resource) => {\n  const resourceUri = resource.completeRelativeUri()\n\n  const { sequence, remaining } = uriParameters\n    .map(uriParameter => methods.createSchema(uriParameter).map(methods.normalizeSchema)[0])\n    .reduce(methods.addPathParameterToSequence, { remaining: resourceUri, sequence: [] })\n\n  const finalComponent = methods.createSimplePathnameParameter(remaining)\n\n  if (remaining === resourceUri) {\n    return methods.createPathnameEndpointFromParameter(resourceUri, finalComponent)\n  }\n\n  const param = methods.createPathnameParameterFromSequenceAndFinalParam(\n    sequence,\n    finalComponent.set('key', null).set('name', null)\n  )\n  return methods.createPathnameEndpointFromParameter(resourceUri, param)\n}\n\n/**\n * extract interfaces from a resource\n * @param {RAMLResource} resource: the resource to extract the interfaces from\n * @returns {OrderedMap<string, Reference>} an OrderedMap containing the possible references to\n * interfaces\n */\nmethods.extractInterfacesFromResource = (resource) => {\n  const type = resource.type()\n  if (type) {\n    const name = type.name() || null\n    const uuid = name ? 'resourceType_' + name : null\n    if (uuid) {\n      return OrderedMap({\n        [uuid]: new Reference({ type: 'interface', uuid })\n      })\n    }\n  }\n\n  return OrderedMap()\n}\n\n/**\n * creates a Context record from a contentType string\n * @param {string} contentType: the Content-Type that needs to act as a constraint for the Context\n * @returns {Context} the corresponding Context\n */\nmethods.createContextFromContentType = (contentType) => {\n  return new Context({\n    constraints: List([\n      new Parameter({\n        key: 'Content-Type',\n        name: 'Content-Type',\n        in: 'headers',\n        default: contentType\n      })\n    ])\n  })\n}\n\n/**\n * extracts a List of Contexts from a RAML request (aka RAMLMethod)\n * @param {RAMLMethod} request: the request to extract the contexts from\n * @returns {List<Context>} the corresponding list of Contexts\n */\nmethods.extractContextsFromRequest = (request) => {\n  const bodies = request.body()\n  if (!bodies) {\n    return List()\n  }\n\n  const contexts = bodies\n    .map(body => body.name())\n    .map(methods.createContextFromContentType)\n\n  return List(contexts)\n}\n\n/**\n * given a location, a name, and a set of constraints as a schema, creates a Parameter that applies\n * only in a list of applicableContexts\n * @param {string} location: the location of the parameter in its ParameterContainer\n * @param {List<Parameter>} contexts: a list of parameters defining the applicableContexts in which\n * this parameter can be used\n * @param {string} name: the name of the parameter\n * @param {Object} schema: the set of constraints this parameter must respect\n * @param {string} uuid: the uuid of the parameter\n * @returns {Parameter} the corresponding Parameter\n */\nmethods.createParameterFromSchemaAndNameAndContexts = (location, contexts, name, schema, uuid) => {\n  return new Parameter({\n    key: name,\n    name: name,\n    uuid: uuid,\n    in: location,\n    description: schema.description || null,\n    type: schema.type || null,\n    constraints: List([\n      new Constraint.JSONSchema(schema)\n    ]),\n    applicableContexts: contexts\n  })\n}\n\n/**\n * given a location (headers, queries, ...) and a list of applicableContexts, converts a schema into\n * a Parameter, in entry format\n * @param {string} location: the location of the parameter in its ParameterContainer\n * @param {List<Parameter>} contexts: the list of applicableContexts for this parameter\n * @param {Object} schema: the schema to convert into a parameter\n * @returns {Entry<string, Parameter>} the corresponding Parameter as an entry\n */\nmethods.convertSchemaIntoParameterEntry = (location, contexts, schema) => {\n  const clone = Object.assign({}, schema)\n  delete clone.$key\n\n  const key = schema.$key || null\n  const value = methods.createParameterFromSchemaAndNameAndContexts(\n    location, contexts, key, clone, key\n  )\n\n  return { key, value }\n}\n\n/**\n * converts a contentType into a list of Parameters that describe applicable contexts\n * @param {string} contentType: the Content-Type to convert into applicableContexts\n * @returns {List<Parameter>} the corresponding applicableContexts\n */\nmethods.convertContentTypeToApplicableContexts = (contentType) => {\n  return List([\n    new Parameter({\n      key: 'Content-Type',\n      name: 'Content-Type',\n      type: 'string',\n      constraints: List([\n        new Constraint.Enum([ contentType ])\n      ])\n    })\n  ])\n}\n\n/**\n * converts a webform TypeDeclaration into an Array of Parameter Entries based on the keys of the\n * web form object properties.\n * @param {RAMLTypeDeclaration} parameter: the type declaration to convert\n * @param {List<Parameter>} contexts: the contexts in which this parameter is applicable\n * @param {string} contentType: the contentType associated with this parameter. This is used to\n * create unique keys for the parameter, as we could have a body that supports both url-encoded and\n * multipart with the same keys, which would cause conflict (as we're using OrderedMaps for the\n * parameters)\n * @returns {Array<Entry<string, Parameter>>} the corresponding array of Parameters as entries\n *\n * NOTE: this will drop complex web forms that have a union data-type or inherited data type\n * e.g.: ( object | array ) will be dropped\n * e.g.: [ object, object ] will be dropped\n * e.g.: Pet will be dropped\n */\nmethods.convertWebFormParameterIntoParameterEntries = (parameter, contexts, contentType) => {\n  const schema = methods.createSchema(parameter).map(methods.normalizeSchema)[0]\n\n  const location = 'body'\n\n  return Object.keys(schema.properties || {}).map(($key) => {\n    const currentSchema = schema.properties[$key]\n\n    const key = contentType + '-' + $key\n    const value = methods.createParameterFromSchemaAndNameAndContexts(\n      location, contexts, $key, currentSchema, key\n    )\n\n    return { key, value }\n  })\n}\n\n/**\n * tests whether a Content-Type is web form or not\n * @param {string} contentType: the Content-Type to test\n * @returns {boolean} true if it is a webform contentType, false otherwise\n */\nmethods.isWebForm = (contentType) => {\n  return !!(\n    contentType.match('application/x-www-form-urlencoded') ||\n    contentType.match('multipart/form-data')\n  )\n}\n\n/**\n * converts a standard body parameter into an array of Parameter entries. (We define standard as\n * any TypeDeclaration that is not associated with a webform contentType)\n * @param {TypeDeclaration} parameter: the type declaration to convert\n * @param {List<Parameter>} contexts: the list of contexts in which the parameter is applicable\n * @param {string} key: the key to use for the entry of the parameter (should be contentType)\n * @returns {Array<Entry<string, Parameter>>} the corresponding array of parameters as entries\n */\nmethods.convertStandardBodyParameterIntoParameterEntries = (parameter, contexts, key) => {\n  const schema = methods.createSchema(parameter).map(methods.normalizeSchema)[0]\n  const clone = Object.assign({}, schema)\n  delete clone.$key\n\n  const value = methods.createParameterFromSchemaAndNameAndContexts(\n    'body', contexts, null, clone, key\n  )\n\n  return [ { key, value } ]\n}\n\n/**\n * converts a Body type declaration into an array of Parameter entries\n * @param {TypeDeclaration} parameter: the type declaration to convert\n * @returns {Array<Entry<string, Parameter>>} the corresponding array of parameters, as entries\n */\nmethods.convertBodyParameterIntoParameterEntries = (parameter) => {\n  const contentType = parameter.name()\n  const contexts = methods.convertContentTypeToApplicableContexts(contentType)\n  if (contentType && methods.isWebForm(contentType)) {\n    return methods.convertWebFormParameterIntoParameterEntries(parameter, contexts, contentType)\n  }\n  return methods.convertStandardBodyParameterIntoParameterEntries(parameter, contexts, contentType)\n}\n\n/**\n * extracts a contentType parameter from a RAML resource, or a RAML response\n * @param {RAMLMethod|RAMLResponse} requestOrResponse: the requestOrResponse to get the\n * contentType from\n * @returns {Parameter?} the corresponding contentType parameter, if it exists\n */\nmethods.getContentTypeParameterFromRequestOrResponse = (requestOrResponse) => {\n  const bodies = requestOrResponse.body()\n\n  if (!bodies) {\n    return null\n  }\n\n  const contentTypes = bodies.map(body => body.name()).filter(v => !!v)\n\n  if (!contentTypes.length) {\n    return null\n  }\n\n  return new Parameter({\n    key: 'Content-Type',\n    name: 'Content-Type',\n    in: 'headers',\n    type: 'string',\n    constraints: List([\n      new Constraint.Enum(contentTypes)\n    ])\n  })\n}\n\n/**\n * extracts the global contentType parameter, if it exists\n * @param {RAMLApi} api: the api to get the global contentTypes from\n * @returns {Parameter?} the corresponding contentType parameter, if it exists\n */\nmethods.getGlobalContentTypeParameter = (api) => {\n  const mediaTypes = api.mediaType()\n\n  if (!mediaTypes) {\n    return null\n  }\n\n  const contentTypes = mediaTypes.map(mediaType => mediaType.value()).filter(v => !!v)\n\n  if (!contentTypes.length) {\n    return null\n  }\n\n  return new Parameter({\n    key: 'Content-Type',\n    name: 'Content-Type',\n    in: 'headers',\n    type: 'string',\n    constraints: List([\n      new Constraint.Enum(contentTypes)\n    ])\n  })\n}\n\n/**\n * extracts a reference to the global content type of the api, if it exists\n * @param {RAMLApi?} api: the api to get the global contentType from\n * @returns {Reference?} the corresponding reference, if the global contentType exists\n */\nmethods.getGlobalContentTypeParameterReference = (api) => {\n  if (!api) {\n    return null\n  }\n\n  const mediaTypes = api.mediaType()\n\n  if (!mediaTypes) {\n    return null\n  }\n\n  const hasMediaType = !!mediaTypes.filter(mediaType => !!mediaType.value()).length\n  if (hasMediaType) {\n    return new Reference({\n      type: 'parameter',\n      uuid: 'globalMediaType'\n    })\n  }\n\n  return null\n}\n\n/**\n * extracts the contentType parameter from a request, or from the global contentType of the api, if\n * no contentType is defined in the request\n * @param {RAMLApi?} api: the api to get the global contentType from\n * @param {RAMLMethod | RAMLResponse} request: the request or response from which to get the\n * contentType\n * @returns {Parameter|Reference?} the corresponding contentType parameter or reference\n *\n * NOTE: if this methods is used with a RAMLResponse, the `api` arguments MUST be set to null\n */\nmethods.getContentTypeParameter = (api, request) => {\n  return methods.getContentTypeParameterFromRequestOrResponse(request) ||\n    methods.getGlobalContentTypeParameterReference(api)\n}\n\n/**\n * creates a ParameterContainer block for queries from a RAML request\n * @param {RAMLMethod} request: the request to extract the query parameters from\n * @returns {OrderedMap<string, Parameter>} an OrderedMap containing all query parameters\n */\nmethods.createQueryParameterBlockFromRequest = (request) => {\n  const qParams = request.queryParameters()\n  const qString = request.queryString()\n\n  if (!(qParams && qParams.length) && !qString) {\n    return OrderedMap()\n  }\n\n  // FIXME: the behavior for the queryString is dubious at best\n  const params = qParams && qParams.length ? qParams : [ qString ]\n\n  const queryParameters = params\n    .map(parameter => methods.createSchema(parameter).map(methods.normalizeSchema)[0])\n    .map((schema) => methods.convertSchemaIntoParameterEntry('queries', List(), schema))\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(queryParameters)\n}\n\n/**\n * creates a ParameterContainer block for headers from a RAML request\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {RAMLMethod} request: the request from which to get the headers\n * @returns {OrderedMap<string, Parameter>} an OrderedMap containing all headers\n */\nmethods.createHeaderParameterBlockFromRequest = (api, request) => {\n  const params = request.headers() || []\n\n  const headers = params\n    .map(parameter => methods.createSchema(parameter).map(methods.normalizeSchema)[0])\n    .map((schema) => methods.convertSchemaIntoParameterEntry('headers', List(), schema))\n    .reduce(convertEntryListInMap, {})\n\n  const contentTypeParameter = methods.getContentTypeParameter(api, request)\n\n  if (!contentTypeParameter) {\n    return OrderedMap(headers)\n  }\n\n  return OrderedMap(headers).set('Content-Type', contentTypeParameter)\n}\n\n/**\n * creates a ParameterContainer block for body parameters from a RAML request\n * @param {RAMLMethod} request: the request from which to get the body parameters\n * @returns {OrderedMap<string, Parameter>} an OrderedMap containing all the body parameters\n */\nmethods.createBodyParameterBlockFromRequest = (request) => {\n  const bodies = request.body()\n\n  if (!bodies) {\n    return OrderedMap()\n  }\n\n  const body = bodies\n    .map(methods.convertBodyParameterIntoParameterEntries)\n    .reduce(flatten, [])\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(body)\n}\n\n/**\n * extracts a ParameterContainer with all parameters from a RAML request\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {RAMLMethod} request: the request from which to extract all parameters\n * @returns {ParameterContainer} the corresponding ParameterContainer\n */\nmethods.extractParameterContainerFromRequest = (api, request) => {\n  const queries = methods.createQueryParameterBlockFromRequest(request)\n  const headers = methods.createHeaderParameterBlockFromRequest(api, request)\n  const body = methods.createBodyParameterBlockFromRequest(request)\n\n  const parameterContainerInstance = { headers, queries, body }\n\n  return new ParameterContainer(parameterContainerInstance)\n}\n\n/**\n * creates a ParameterContainer Block for headers from a RAML response\n * @param {RAMLResponse} response: the response from which to get the headers\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap containing all headers\n */\nmethods.createHeaderParameterBlockFromResponse = (response) => {\n  const params = response.headers() || []\n\n  const headers = params\n    .map(parameter => methods.createSchema(parameter).map(methods.normalizeSchema)[0])\n    .map((schema) => {\n      const { key, value } = methods.convertSchemaIntoParameterEntry('headers', List(), schema)\n      return { key, value: value.set('usedIn', 'response') }\n    })\n    .reduce(convertEntryListInMap, {})\n\n  const contentTypeParameter = methods.getContentTypeParameterFromRequestOrResponse(response)\n\n  if (!contentTypeParameter) {\n    return OrderedMap(headers)\n  }\n\n  return OrderedMap(headers).set('Content-Type', contentTypeParameter.set('usedIn', 'response'))\n}\n\n/**\n * creates a ParameterContainer block for body parameters from a RAML response\n * @param {RAMLResponse} response: the response to get the body parameters from\n * @returns {OrderedMap<string, Parameter>} the corresponding OrderedMap containing all body\n * parameters\n */\nmethods.createBodyParameterBlockFromResponse = (response) => {\n  const bodies = response.body()\n\n  if (!bodies) {\n    return OrderedMap()\n  }\n\n  const body = response.body()\n    .map(methods.convertBodyParameterIntoParameterEntries)\n    .reduce(flatten, [])\n    .map(({ key, value }) => ({ key, value: value.set('usedIn', 'response') }))\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(body)\n}\n\n/**\n * extract a ParameterContainer from a RAML response, containing all parameters of the RAML response\n * @param {RAMLResponse} response: the response from which to get all the parameters\n * @returns {ParameterContainer} the corresponding ParameterContainer\n */\nmethods.extractParameterContainerFromResponse = (response) => {\n  const headers = methods.createHeaderParameterBlockFromResponse(response)\n  const body = methods.createBodyParameterBlockFromResponse(response)\n\n  const parameterContainerInstance = { headers, body }\n\n  return new ParameterContainer(parameterContainerInstance)\n}\n\n/**\n * converts a RAML Auth reference into an Auth reference\n * @param {RAMLSecuritySchemeRef} auth: the raml auth reference\n * @returns {Reference?} the corresponding auth Reference, or null, if it is a NullRef\n *\n * TODO: check that RAML does return an Auth Ref with non name for null type authentication.\n */\nmethods.convertRAMLAuthRefIntoAuthReference = (auth) => {\n  const uuid = auth.name()\n\n  if (!uuid) {\n    return null\n  }\n\n  return new Reference({ type: 'auth', uuid })\n}\n\n/**\n * extracts a List of Auth References from a RAML request\n * @param {RAMLMethod} request: the request from which to get all the auth references\n * @returns {List<References>} the corresponding List of Referenceså\n */\nmethods.extractAuthsFromRequest = (request) => {\n  const securedBy = request.securedBy() || []\n\n  const auths = securedBy\n    .map(methods.convertRAMLAuthRefIntoAuthReference)\n\n  return List(auths)\n}\n\n/**\n * converts a RAML Response into a Response Record Entry\n * @param {RAMLResponse} response: the response to converts\n * @returns {Entry<string, Response>} the corresponding Response as an entry\n */\nmethods.convertRAMLResponseIntoResponseEntry = (response) => {\n  const code = response.code().value() || null\n  const description = methods.extractDescription(response)\n\n  const parameters = methods.extractParameterContainerFromResponse(response)\n  const contexts = methods.extractContextsFromRequest(response)\n\n  const responseInstance = { code, description, parameters, contexts }\n\n  return { key: code, value: new Response(responseInstance) }\n}\n\n/**\n * extracts all responses from a request\n * @param {RAMLMethod} request: the request to get the RAML responses from\n * @returns {OrderedMap<string, Response>} the corresponding OrderedMap of Responses\n */\nmethods.extractResponsesFromRequest = (request) => {\n  const responses = (request.responses() || [])\n    .map(methods.convertRAMLResponseIntoResponseEntry)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(responses)\n}\n\n/**\n * converts a RAML TraitRef into a ReferenceEntry\n * @param {RAMLTraitRef} trait: the trait reference to convert into a Reference\n * @returns {Entry<string, Reference>} the corresponding Reference, as an Entry\n */\nmethods.convertRAMLTraitRefIntoReferenceEntry = (trait) => {\n  const name = trait.name()\n  const uuid = 'trait_' + name\n\n  const referenceInstance = {\n    type: 'interface',\n    uuid\n  }\n\n  return { key: uuid, value: new Reference(referenceInstance) }\n}\n\n/**\n * extracts all interfaces from a RAML request\n * @param {RAMLMethod} request: the request from which to extract all interfaces\n * @returns {OrderedMap<string, Reference>} the corresponding OrderedMap of References\n *\n * TODO: Add type references\n */\nmethods.extractInterfacesFromRequest = (request) => {\n  const interfaces = (request.is() || [])\n    .map(methods.convertRAMLTraitRefIntoReferenceEntry)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(interfaces)\n}\n\n/**\n * tests whether the protocols of a request match the ones from the baseUri\n * @param {Array<string>?} first: the protocols from the request\n * @param {RAMLBaseUri?} baseUri: the baseUri to test against\n * @returns {boolean} true iff first is of length 1 and its first protocol is equal to the protocol\n * from the baseUri.\n */\nmethods.areProtocolsEqual = (first, baseUri) => {\n  if (!first || !baseUri || first.length !== 1) {\n    return false\n  }\n\n  const uri = baseUri.value()\n\n  if (!uri) {\n    return false\n  }\n\n  const protocol = uri.split('://')[0]\n\n  return first[0].toLowerCase() === protocol.toLowerCase() ||\n    (first[0].toLowerCase() === protocol.toLowerCase() + ':')\n}\n\nmethods.createOverlayForMethodBaseEndpoint = (api, methodBase) => {\n  if (\n    methodBase.protocols() &&\n    api &&\n    !methods.areProtocolsEqual(methodBase.protocols(), api.baseUri())\n  ) {\n    return new URL().set('protocol', List(methodBase.protocols().map(protocol => {\n      if (protocol[protocol.length - 1] !== ':') {\n        return protocol.toLowerCase() + ':'\n      }\n      return protocol.toLowerCase()\n    })))\n  }\n\n  return null\n}\n\nmethods.extractMethodBaseEndpoints = (api, methodBase) => {\n  const overlay = methods.createOverlayForMethodBaseEndpoint(api, methodBase)\n\n  const endpoints = OrderedMap({\n    base: new Reference({\n      type: 'endpoint',\n      uuid: 'base',\n      overlay: overlay\n    })\n  })\n\n  return endpoints\n}\n\n/**\n * converts a RAML methodBase into a Request instance\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {RAMLMethodBase | RAMLMethod} methodBase: the method base from which to get most elements\n * of a request instance (like, name, description, contexts, ... But not the method name - 'get')\n * @returns {RequestInstance} the corresponding RequestInstance object\n */\nmethods.convertRAMLMethodBaseIntoRequestInstance = (api, methodBase) => {\n  const endpoints = methods.extractMethodBaseEndpoints(api, methodBase)\n  const name = methodBase.displayName() || null\n  const description = methods.extractDescription(methodBase)\n  const contexts = methods.extractContextsFromRequest(methodBase)\n  const parameters = methods.extractParameterContainerFromRequest(api, methodBase)\n  const auths = methods.extractAuthsFromRequest(methodBase)\n  const responses = methods.extractResponsesFromRequest(methodBase)\n  const interfaces = methods.extractInterfacesFromRequest(methodBase)\n\n  const requestInstance = {\n    endpoints,\n    name,\n    description,\n    contexts,\n    parameters,\n    auths,\n    responses,\n    interfaces\n  }\n\n  return requestInstance\n}\n\n/**\n * convert a RAML request into a Request Entry\n * @param {RAMLApi} api: the api from which to get the global contentType object, if needed\n * @param {RAMLMethod} method: the RAML request to convert into a Request record\n * @returns {Entry<string, Request>} the corresponding Request, as an Entry\n */\nmethods.convertRAMLMethodIntoRequestEntry = (api, method) => {\n  const baseInstance = methods.convertRAMLMethodBaseIntoRequestInstance(api, method)\n\n  const requestInstance = Object.assign({}, baseInstance, { method: method.method() })\n\n  const request = new Request(requestInstance)\n  return { key: method.method(), value: request }\n}\n\n/**\n * extract all requests from a RAML resource\n * @param {RAMLApi} api: the api from which to get the global contentType if needed\n * @param {RAMLResource} resource: the resource to extract all requests from\n * @returns {OrderedMap<string, Request>} the corresponding OrderedMap containing all the Request\n * records\n */\nmethods.extractRequestsFromResource = (api, resource) => {\n  const convertRAMLMethodIntoRequestEntry = currify(methods.convertRAMLMethodIntoRequestEntry, api)\n  const requests = (resource.methods() || [])\n    .map(convertRAMLMethodIntoRequestEntry)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(requests)\n}\n\n/**\n * converts a RAML Resource base into a Resource instance\n * @param {RAMLApi} api: the api used to get the global contentType, if needed\n * @param {RAMLResourceBase | RAMLResource} resource: the resource base from which to get most\n * elements of a resource instance (interfaces, methods, ... but not the path, or the endpoints)\n * @returns {resourceInstance} the corresponding resource instance\n */\nmethods.convertRAMLResourceBaseIntoResourceInstance = (api, resource) => {\n  const interfaces = methods.extractInterfacesFromResource(resource)\n  const $methods = methods.extractRequestsFromResource(api, resource)\n\n  const resourceInstance = {\n    description: methods.extractDescription(resource),\n    interfaces: interfaces,\n    methods: $methods\n  }\n\n  return resourceInstance\n}\n\n/**\n * extracts a name for a resource, if appropriate.\n * If the displayName is equal to the relativeUri, we ignore the displayName.\n * @param {RAMLResource} resource: the resource from which to get a name\n * @returns {string?} the corresponding name, if it is appropriate\n */\nmethods.getNameFromResource = (resource) => {\n  const displayName = resource.displayName()\n  const relativeUri = resource.relativeUri()\n\n  if (relativeUri && displayName === relativeUri.value()) {\n    return null\n  }\n\n  return displayName || null\n}\n\n/**\n * converts a RAML resource into a Resource record\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {Object} normResource: the object containing the resource and all its associated\n * uriParameters\n * @param {Array<TypeDeclaration>} normResource.uriParameters: the uriParameters of the resource\n * @param {RAMLResource} normResource.resource: the resource to convert\n * @returns {Resource} the corresponding Resource record\n */\nmethods.convertRAMLResourceIntoResource = (api, { uriParameters, resource }) => {\n  const path = methods.convertUriParametersAndResourceIntoPath(uriParameters, resource)\n  const endpoints = OrderedMap({\n    base: new Reference({\n      type: 'endpoint',\n      uuid: 'base'\n    })\n  })\n\n  const baseInstance = methods.convertRAMLResourceBaseIntoResourceInstance(api, resource)\n  const name = methods.getNameFromResource(resource)\n\n  const resourceInstance = Object.assign({}, baseInstance, {\n    name: name,\n    uuid: resource.absoluteUri(),\n    path: path,\n    endpoints: endpoints\n  })\n\n  return new Resource(resourceInstance)\n}\n\n/**\n * converts a RAML resource into a Resource record entry\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {Object} normResource: the object containing the resource and all its associated\n * uriParameters\n * @param {Array<TypeDeclaration>} normResource.uriParameters: the uriParameters of the resource\n * @param {RAMLResource} normResource.resource: the resource to convert\n * @returns {Entry<string, Resource>} the corresponding Resource, as an Entry\n */\nmethods.convertRAMLResourceIntoResourceEntry = (api, normResource) => {\n  const key = normResource.resource.absoluteUri()\n  const value = methods.convertRAMLResourceIntoResource(api, normResource)\n  return { key, value }\n}\n\n/**\n * converts a RAML resource list into a Resource record OrderedMap\n * @param {RAMLApi} api: the api from which to get the global contentType, if needed\n * @param {Array<Object>} resources: an array of normalized RAML resources\n * @returns {OrderedMap<string, Resource>} the corresponding OrderedMap of Resource records\n */\nmethods.convertRAMLResourceListIntoResourceMap = (api, resources) => {\n  const convertRAMLResourceIntoResourceEntry = currify(\n    methods.convertRAMLResourceIntoResourceEntry, api\n  )\n  const resourceMap = resources\n    .map(convertRAMLResourceIntoResourceEntry)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(resourceMap)\n}\n\n/**\n * extracts a title from a RAML api\n * @param {RAMLApi} api: api from which to get the title\n * @returns {string?} the corresponding title, if it exists\n */\nmethods.extractApiTitle = (api) => api.title() || null\n\n/**\n * extracts a description from a RAML node\n * @param {RAMLNode} obj: the RAML object from which to get the description\n * @returns {string?} the corresponding description, if it exists\n */\nmethods.extractDescription = (obj) => {\n  const descriptor = obj.description()\n\n  if (!descriptor) {\n    return null\n  }\n\n  return descriptor.value() || null\n}\n\n/**\n * extracts the Api version from a RAML api\n * @param {RAMLApi} api: the api to get the version from\n * @returns {string?} the extracted version, if it exists\n */\nmethods.extractApiVersion = (api) => api.version() || null\n\n/**\n * extracts an Info record from a RAML api\n * @param {RAMLApi} api: the api from which to extract the information pertaining to the Info record\n * @returns {Info} the corresponding Info record\n */\nmethods.extractInfo = (api) => {\n  const title = methods.extractApiTitle(api)\n  const description = methods.extractDescription(api)\n  const version = methods.extractApiVersion(api)\n  const infoInstance = { title, description, version }\n  return new Info(infoInstance)\n}\n\n// TODO improve behavior around multiple items\nmethods.parse = ({ options, item }) => {\n  const api = item\n\n  const group = methods.createGroups(api)\n  const $resources = methods.getAllResourcesFromApi(api)\n  const resources = methods.convertRAMLResourceListIntoResourceMap(api, $resources)\n  const store = methods.extractStore(api)\n  const info = methods.extractInfo(api)\n\n  const apiInstance = { group, resources, info, store }\n\n  return { options, api: new Api(apiInstance) }\n}\n\nexport const __internals__ = methods\nexport default RAMLParser\n"
  },
  {
    "path": "src/parsers/raml/v1.0/__tests__/Parser.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\n/* eslint-disable require-jsdoc */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List } from 'immutable'\n\nimport Constraint from '../../../../models/Constraint'\nimport Auth from '../../../../models/Auth'\nimport Interface from '../../../../models/Interface'\nimport Store from '../../../../models/Store'\nimport Group from '../../../../models/Group'\nimport Parameter from '../../../../models/Parameter'\nimport URLComponent from '../../../../models/URLComponent'\nimport URL from '../../../../models/URL'\nimport Reference from '../../../../models/Reference'\nimport Context from '../../../../models/Context'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Response from '../../../../models/Response'\nimport Request from '../../../../models/Request'\nimport Resource from '../../../../models/Resource'\nimport Info from '../../../../models/Info'\nimport Api from '../../../../models/Api'\n\nimport Parser, { __internals__ } from '../Parser'\n\ndescribe('parsers/raml/v1.0/Parser.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Parser }', () => {\n    describe('@detect', () => {\n      it('should call __internals__.detect', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const actual = Parser.detect()\n\n        expect(__internals__.detect).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.detect with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const content = 'some content'\n        const actual = Parser.detect(content)\n\n        expect(__internals__.detect).toHaveBeenCalledWith(content)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@getAPIName', () => {\n      it('should call __internals__.getAPIName', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const actual = Parser.getAPIName()\n\n        expect(__internals__.getAPIName).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.getAPIName with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const content = 'some content'\n        const actual = Parser.getAPIName(content)\n\n        expect(__internals__.getAPIName).toHaveBeenCalledWith(content)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@parse', () => {\n      it('should call __internals__.parse', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const actual = Parser.parse()\n\n        expect(__internals__.parse).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.parse with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const args = { options: { context: 123, items: 321 }, item: 234 }\n        const actual = Parser.parse(args)\n\n        expect(__internals__.parse).toHaveBeenCalledWith(args)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@detect', () => {\n    it('should work', () => {\n      const input = '#%RAML 1.0'\n      const expected = [ { format: 'raml', version: 'v1.0', score: 1 } ]\n      const actual = __internals__.detect(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 0, if not exactly expected first line', () => {\n      const input = '#%RAML 1.0 Overlay'\n      const expected = [ { format: 'raml', version: 'v1.0', score: 0 } ]\n      const actual = __internals__.detect(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAPIName', () => {\n    it('should work', () => {\n      const input = 'title: toto\\nsomething: else'\n      const expected = 'toto'\n      const actual = __internals__.getAPIName(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if empty title', () => {\n      const input = 'title: \\nsomething else'\n      const expected = null\n      const actual = __internals__.getAPIName(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if no match', () => {\n      const input = 'something else'\n      const expected = null\n      const actual = __internals__.getAPIName(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addKey', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, { name: () => 'User' } ],\n        [ { a: 123 }, { name: () => 'User' }, 'AuthLib' ]\n      ]\n      const expected = [\n        { a: 123, $key: 'User' },\n        { a: 123, $key: 'AuthLib.User' }\n      ]\n      const actual = inputs.map(input => __internals__.addKey(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addTitle', () => {\n    it('should work', () => {\n      const schema = { a: 123 }\n      const inputs = [\n        { displayName: () => null, name: () => 'toto' },\n        { displayName: () => 'toto', name: () => 'toto' },\n        { displayName: () => 'titi', name: () => 'toto' }\n      ]\n\n      const expected = [\n        { a: 123 },\n        { a: 123 },\n        { a: 123, title: 'titi' }\n      ]\n\n      const clone = (obj) => Object.assign({}, obj)\n\n      const actual = inputs.map(input => __internals__.addTitle(clone(schema), input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, { description: () => null } ],\n        [ { a: 123 }, { description: () => ({ toJSON: () => 'titi' }) } ]\n      ]\n\n      const expected = [\n        { a: 123 },\n        { a: 123, description: 'titi' }\n      ]\n\n      const actual = inputs.map(input => __internals__.addDescription(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addExamples', () => {\n    it('should work', () => {\n      const inputs = [\n        // No example\n        [ { a: 123 }, { example: () => null, examples: () => [], kind: () => null } ],\n        // Single Example, node is string\n        [ { a: 123 }, {\n          example: () => ({ value: () => '123' }),\n          examples: () => [],\n          kind: () => 'StringTypeDeclaration'\n        } ],\n        // Single Example, node is not a string (try to parse as JSON object)\n        [ { a: 123 }, {\n          example: () => ({ value: () => '{ \"test\": 234 }' }),\n          examples: () => [],\n          kind: () => 'JSONTypeDeclaration'\n        } ],\n        // Single Example, node is declared as not a string, but example is string\n        [ { a: 123 }, {\n          example: () => ({ value: () => 'abc345' }),\n          examples: () => [],\n          kind: () => 'JSONTypeDeclaration'\n        } ],\n        // examples key, node is tring\n        [ { a: 123 }, {\n          example: () => null,\n          examples: () => [ { value: () => '456' } ],\n          kind: () => 'StringTypeDeclaration'\n        } ],\n        // examples key, node is not a string\n        [ { a: 123 }, {\n          example: () => null,\n          examples: () => [ { value: () => '{ \"test\": 567 }' } ],\n          kind: () => 'JSONTypeDeclaration'\n        } ],\n        // examples key, node is declared as not a string, example is string\n        [ { a: 123 }, {\n          example: () => null,\n          examples: () => [ { value: () => 'abc678' } ],\n          kind: () => 'JSONTypeDeclaration'\n        } ],\n        // examples key overrides example key\n        [ { a: 123 }, {\n          example: () => ({ value: () => '789' }),\n          examples: () => [ { value: () => '890' } ],\n          kind: () => 'StringTypeDeclaration'\n        } ]\n      ]\n      const expected = [\n        // no example\n        { a: 123 },\n        // single example, node is string\n        { a: 123, 'x-examples': [ '123' ] },\n        // single example, node is not a string\n        { a: 123, 'x-examples': [ { test: 234 } ] },\n        // single example, node is not a string, but example is string\n        { a: 123, 'x-examples': [ 'abc345' ] },\n        // examples key, node is string\n        { a: 123, 'x-examples': [ '456' ] },\n        // examples key, node is not a string\n        { a: 123, 'x-examples': [ { test: 567 } ] },\n        // examples key, node is not a string, but example is string\n        { a: 123, 'x-examples': [ 'abc678' ] },\n        // override\n        { a: 123, 'x-examples': [ '890' ] }\n      ]\n      const actual = inputs.map(input => __internals__.addExamples(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addDescriptiveFields', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const merge = (...toAssign) => Object.assign({}, ...toAssign)\n\n      spyOn(__internals__, 'addKey').andCall((obj) => merge(obj, { b: 234 }))\n      spyOn(__internals__, 'addTitle').andCall((obj) => merge(obj, { c: 345 }))\n      spyOn(__internals__, 'addDescription').andCall((obj) => merge(obj, { d: 456 }))\n      spyOn(__internals__, 'addExamples').andCall((obj) => merge(obj, { e: 567 }))\n\n      const input = { a: 123 }\n      const node = { test: 'test' }\n      const offsetKey = 678\n      const expected = { a: 123, b: 234, c: 345, d: 456, e: 567 }\n      const actual = __internals__.addDescriptiveFields(input, node, offsetKey)\n\n      expect(actual).toEqual(expected)\n\n      expect(__internals__.addKey).toHaveBeenCalledWith({ a: 123 }, node, offsetKey)\n      expect(__internals__.addTitle).toHaveBeenCalledWith({ a: 123, b: 234 }, node)\n      expect(__internals__.addDescription).toHaveBeenCalledWith({ a: 123, b: 234, c: 345 }, node)\n      expect(__internals__.addExamples).toHaveBeenCalledWith(\n        { a: 123, b: 234, c: 345, d: 456 }, node\n      )\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@isMaybeJSON', () => {\n    it('should work', () => {\n      const inputs = [\n        '{ \"some\": \"JSON\" }',\n        '<not>a json</not>'\n      ]\n      const expected = [ true, false ]\n\n      const actual = inputs.map(__internals__.isMaybeJSON)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isMaybeXML', () => {\n    it('should work', () => {\n      const inputs = [\n        '{ \"not\": \"XML\" }',\n        '<xml>this is xml</xml>'\n      ]\n      const expected = [ false, true ]\n\n      const actual = inputs.map(__internals__.isMaybeXML)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        { kind: () => 'TypeDeclaration' },\n        { kind: () => 'NotATypeDeclaration' }\n      ]\n      const expected = [ true, false ]\n      const actual = inputs.map(__internals__.isTypeDeclaration)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertJSONTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        'notAJSONTypeDeclaration',\n        '{ \"a\": [ \"simple\", \"json\", \"declaration\" ] }',\n        '{ \"rich\": \"a\", \"definitions\": { \"User\": { \"b\": 123 }, \"Song\": { \"c\": 234 } } }'\n      ]\n\n      const expected = [\n        [],\n        [ { a: [ 'simple', 'json', 'declaration' ] } ],\n        [ { rich: 'a' }, { $key: 'User', b: 123 }, { $key: 'Song', c: 234 } ]\n      ]\n\n      const actual = inputs.map(input => __internals__.convertJSONTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertXMLTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        '<some>XML</some>'\n      ]\n      const expected = [\n        [ { 'x-xml': '<some>XML</some>' } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertXMLTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertInPlaceTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'User' ],\n        [ 'User', 'AuthLib' ]\n      ]\n      const expected = [\n        [ { $ref: '#/definitions/User' } ],\n        [ { $ref: '#/definitions/AuthLib.User' } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertInPlaceTypeDeclaration(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isAnyType', () => {\n    it('should work', () => {\n      const inputs = [\n        'any',\n        'NotAnAnyType'\n      ]\n      const expected = [\n        true, false\n      ]\n      const actual = inputs.map(input => __internals__.isAnyType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertAnyTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        [ {} ]\n      ]\n      const actual = inputs.map(input => __internals__.convertAnyTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: () => [ '{ \"some\": \"json\" }' ] },\n        { type: () => [ '<some>XML</some>' ] },\n        { type: () => [ 'any' ] },\n        { type: () => [ 'User' ] }\n      ]\n      const expected = [\n        [ { some: 'json' } ],\n        [ { 'x-xml': '<some>XML</some>' } ],\n        [ {} ],\n        [ { $ref: '#/definitions/User' } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addSimpleObjectFieldsToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, {\n          minProperties: () => null,\n          maxProperties: () => null,\n          additionalProperties: () => null,\n          discriminator: () => null,\n          discriminatorValue: () => null\n        } ],\n        [ { a: 123 }, {\n          minProperties: () => 123,\n          maxProperties: () => 234,\n          additionalProperties: () => 345,\n          discriminator: () => 456,\n          discriminatorValue: () => 567\n        } ]\n      ]\n      const expected = [\n        { a: 123 },\n        {\n          a: 123,\n          minProperties: 123,\n          maxProperties: 234,\n          additionalProperties: 345,\n          discriminator: 456,\n          discriminatorValue: 567\n        }\n      ]\n      const actual = inputs.map(input => __internals__.addSimpleObjectFieldsToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertPropertyIntoSchemaEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andReturn([ 345, 456, 567 ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v * 2)\n\n      const inputs = [\n        { name: () => 123, required: () => true },\n        { name: () => 234, required: () => false }\n      ]\n      const expected = [\n        { key: 123, required: true, value: 690, deps: [ 456, 567 ] },\n        { key: 234, required: false, value: 690, deps: [ 456, 567 ] }\n      ]\n      const actual = inputs.map(input => __internals__.convertPropertyIntoSchemaEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addPropertiesKeyToSchema', () => {\n    it('should work', () => {\n      const spy = spyOn(__internals__, 'addPropertyEntryToSchema').andReturn({ b: 234, c: 345 })\n\n      const inputs = [\n        [ { a: 123 }, [] ],\n        [ { a: 123 }, [ 234, 345 ] ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, properties: { b: 234, c: 345 } }\n      ]\n      const actual = inputs.map(input => __internals__.addPropertiesKeyToSchema(...input))\n      expect(actual).toEqual(expected)\n\n      expect(spy.calls.length).toEqual(2)\n    })\n  })\n\n  describe('@addPropertyEntryToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, { key: 234, value: { $key: 345, other: 456 } } ]\n      ]\n\n      const expected = [\n        { a: 123, '234': { other: 456 } }\n      ]\n\n      const actual = inputs.map(input => __internals__.addPropertyEntryToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addRequiredKeyToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, [ { required: false, key: 123 }, { required: false, key: 234 } ] ],\n        [ { a: 123 }, [ { required: false, key: 123 }, { required: true, key: 234 } ] ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, required: [ 234 ] }\n      ]\n      const actual = inputs.map(input => __internals__.addRequiredKeyToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getOtherSchemasFromPropertiesSchemas', () => {\n    it('should work', () => {\n      const inputs = [\n        [],\n        [ { deps: [ 123, 234 ] }, { deps: [ 345, 456 ] } ]\n      ]\n      const expected = [\n        [],\n        [ 123, 234, 345, 456 ]\n      ]\n      const actual = inputs.map(input => __internals__.getOtherSchemasFromPropertiesSchemas(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getPropertiesSchema', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertPropertyIntoSchemaEntry').andCall(v => v * 2)\n\n      const inputs = [\n        { properties: () => null },\n        { properties: () => [] },\n        { properties: () => [ 123, 234 ] }\n      ]\n      const expected = [\n        [],\n        [],\n        [ 246, 468 ]\n      ]\n      const actual = inputs.map(input => __internals__.getPropertiesSchema(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addPropertiesToSchema', () => {\n    it('should work', () => {\n      const merge = (...toAssign) => Object.assign({}, ...toAssign)\n\n      const propsSchemas = [\n        { deps: [] },\n        { properties: { b: 234, c: 345 }, required: [ 'b', 'c' ], deps: [] },\n        { deps: [ { b: 456 }, { c: 567 } ] }\n      ]\n\n      spyOn(__internals__, 'getPropertiesSchema').andCall(({ v }) => {\n        return propsSchemas[v]\n      })\n      spyOn(__internals__, 'addPropertiesKeyToSchema').andCall((s, { properties }) => {\n        if (properties) {\n          return merge(s, { properties })\n        }\n\n        return s\n      })\n      spyOn(__internals__, 'addRequiredKeyToSchema').andCall((s, { required }) => {\n        if (required) {\n          return merge(s, { required })\n        }\n\n        return s\n      })\n      spyOn(__internals__, 'getOtherSchemasFromPropertiesSchemas').andCall(p => p.deps)\n\n      const inputs = [\n        [ { a: 123 }, { this: 'is a node', v: 0 } ],\n        [ { a: 123 }, { this: 'is a node', v: 1 } ],\n        [ { a: 123 }, { this: 'is a node', v: 2 } ]\n      ]\n      const expected = [\n        [ { a: 123 } ],\n        [ { a: 123, properties: { b: 234, c: 345 }, required: [ 'b', 'c' ] } ],\n        [ { a: 123 }, { b: 456 }, { c: 567 } ]\n      ]\n\n      const actual = inputs.map(input => __internals__.addPropertiesToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isJSONSchemaType', () => {\n    it('should work', () => {\n      const inputs = [\n        'array', 'object', 'number', 'integer', 'string', 'boolean', 'nil', 'any', 'array | object'\n      ]\n      const expected = [\n        true, true, true, true, true, true, false, false, false\n      ]\n      const actual = inputs.map(input => __internals__.isJSONSchemaType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isNilType', () => {\n    it('should work', () => {\n      const inputs = [\n        'nil',\n        'notNil'\n      ]\n      const expected = [\n        true, false\n      ]\n      const actual = inputs.map(input => __internals__.isNilType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isImplicitArrayType', () => {\n    it('should work', () => {\n      const inputs = [\n        'shouldMatch[]',\n        'shouldNotMatch',\n        '(complex|match)[]',\n        '(complex[] | non-match[])'\n      ]\n      const expected = [\n        true, false, true, false\n      ]\n      const actual = inputs.map(input => __internals__.isImplicitArrayType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromArrayType', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaFromType').andCall(({ schemas }) => schemas)\n\n      const inputs = [\n        { schemas: [ { a: 123 } ] },\n        { schemas: [ { a: 234 }, { b: 345 } ] }\n      ]\n      const expected = [\n        { type: 'array', items: { a: 123 } },\n        { type: 'array', items: [ { a: 234 }, { b: 345 } ] }\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromArrayType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromImplicitArrayType', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaFromArrayType').andCall(v => v)\n\n      const inputs = [\n        '(mixed|type)[]',\n        'uniqueType[]',\n        'weird[]|type[]'\n      ]\n      const expected = [\n        'mixed|type',\n        'uniqueType',\n        null\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromImplicitArrayType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromUnionType', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaListFromTypes').andCall(v => v)\n\n      const inputs = [\n        'union|type',\n        'union | type',\n        'weird |'\n      ]\n      const expected = [\n        { anyOf: [ 'union', 'type' ] },\n        { anyOf: [ 'union', 'type' ] },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromUnionType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromReferenceType', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'User' ],\n        [ 'Song', 'AuthLib' ]\n      ]\n      const expected = [\n        { $ref: '#/definitions/User' },\n        { $ref: '#/definitions/AuthLib.Song' }\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromReferenceType(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromJSONType', () => {\n    it('should work', () => {\n      const inputs = [\n        'array', 'object', 'number', 'integer', 'string', 'boolean', 'nil', 'any'\n      ]\n      const expected = [\n        { type: 'array' },\n        { type: 'object' },\n        { type: 'number' },\n        { type: 'integer' },\n        { type: 'string' },\n        { type: 'boolean' },\n        null,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromJSONType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromNilType', () => {\n    it('should work', () => {\n      const inputs = [\n        'nil',\n        'NotNil'\n      ]\n      const expected = [\n        { type: 'null' },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromNilType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromType', () => {\n    it('should work', () => {\n      const inputs = [\n        'array', 'object', 'string', 'number', 'integer', 'boolean',\n        'nil',\n        'object[]',\n        'object|array',\n        'User'\n      ]\n      const expected = [\n        { type: 'array' },\n        { type: 'object' },\n        { type: 'string' },\n        { type: 'number' },\n        { type: 'integer' },\n        { type: 'boolean' },\n        { type: 'null' },\n        { type: 'array', items: { type: 'object' } },\n        { anyOf: [ { type: 'object' }, { type: 'array' } ] },\n        { $ref: '#/definitions/User' }\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaListFromTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaFromType').andCall(v => v)\n\n      const inputs = [\n        null,\n        [ 123, 234 ],\n        [ 345, 456 ]\n      ]\n      const expected = [\n        [],\n        [ 123, 234 ],\n        [ 345, 456 ]\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaListFromTypes(input))\n      expect(actual).toEqual(expected)\n      expect(__internals__.getSchemaFromType.calls.length).toEqual(4)\n    })\n  })\n\n  describe('@convertMultipleInheritanceObject', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        [ 'User[]' ],\n        [ 'User', 'Resident' ],\n        [ 'array', 'Songs' ],\n        [ 'Songs', 'array' ],\n        [ 'array', '(Visitor|Resident)[]' ]\n      ]\n      const expected = [\n        {},\n        { type: 'array', items: { $ref: '#/definitions/User' } },\n        { allOf: [ { $ref: '#/definitions/User' }, { $ref: '#/definitions/Resident' } ] },\n        { type: 'array', allOf: [ { $ref: '#/definitions/Songs' } ] },\n        { type: 'array', allOf: [ { $ref: '#/definitions/Songs' } ] },\n        { allOf: [\n          { type: 'array' },\n          { type: 'array', items: {\n            anyOf: [\n              { $ref: '#/definitions/Visitor' },\n              { $ref: '#/definitions/Resident' }\n            ]\n          } }\n        ] }\n      ]\n      const actual = inputs.map(input => __internals__.convertMultipleInheritanceObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemasFromTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertMultipleInheritanceObject').andCall(v => v)\n\n      const inputs = [\n        123, 234, 345\n      ]\n      const expected = [\n        123, 234, 345\n      ]\n      const actual = inputs.map(input => __internals__.getSchemasFromTypes(input))\n      expect(actual).toEqual(expected)\n      expect(__internals__.convertMultipleInheritanceObject.calls.length).toEqual(3)\n    })\n  })\n\n  describe('@addInheritedTypes', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, { type: () => [ 'nil' ] } ],\n        [ { a: 123 }, { type: () => [ 'User' ] } ],\n        [ { a: 123 }, { type: () => [ 'object[]' ] } ],\n        [ { a: 123 }, { type: () => [ 'User', 'Resident' ] } ]\n      ]\n      const expected = [\n        { a: 123, type: 'null' },\n        { a: 123, allOf: [ { $ref: '#/definitions/User' } ] },\n        { a: 123, type: 'array', items: { type: 'object' } },\n        { a: 123, allOf: [ { $ref: '#/definitions/User' }, { $ref: '#/definitions/Resident' } ] }\n      ]\n      const actual = inputs.map(input => __internals__.addInheritedTypes(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertObjectTypeDeclaration', () => {\n    it('should work', () => {\n      const merge = (...toMerge) => Object.assign({}, ...toMerge)\n\n      spyOn(__internals__, 'addInheritedTypes').andCall(s => merge(s, { a: 123 }))\n      spyOn(__internals__, 'addSimpleObjectFieldsToSchema').andCall(s => merge(s, { b: 234 }))\n      spyOn(__internals__, 'addPropertiesToSchema').andCall(s => {\n        return [ merge(s, { c: 345 }), { d: 456 }, { e: 567 } ]\n      })\n\n      const inputs = [\n        {}\n      ]\n      const expected = [\n        [ { a: 123, b: 234, c: 345 }, { d: 456 }, { e: 567 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertObjectTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addSimpleArrayFieldsToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, {\n          uniqueItems: () => null,\n          minItems: () => null,\n          maxItems: () => null\n        } ],\n        [ { a: 123 }, {\n          uniqueItems: () => true,\n          minItems: () => 2,\n          maxItems: () => 5\n        } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, uniqueItems: true, minItems: 2, maxItems: 5 }\n      ]\n      const actual = inputs.map(input => __internals__.addSimpleArrayFieldsToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isNonDescriptKey', () => {\n    it('should work', () => {\n      const inputs = [\n        'title', 'description', '$key', 'minItems', 'minimum', 'pattern'\n      ]\n      const expected = [\n        false, false, false, true, true, true\n      ]\n      const actual = inputs.map(input => __internals__.isNonDescriptKey(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@normalizeSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        { title: 123, description: 234, $key: 345 },\n        { title: 123, description: 234, $key: 345, type: 'array' },\n        { title: 123, description: 234, $key: 345, type: 'array', minItems: 456 },\n        { title: 123, description: 234, $key: 345, type: 'array', allOf: [ 567 ] },\n        { title: 123, description: 234, $key: 345, allOf: [ 678, 789 ] },\n        { title: 123, description: 234, $key: 345, allOf: [ { a: 890 } ] },\n        { title: 123, description: 234, $key: 345, allOf: [ { title: 901 } ] }\n      ]\n      const expected = [\n        { title: 123, description: 234, $key: 345 },\n        { title: 123, description: 234, $key: 345, type: 'array' },\n        { title: 123, description: 234, $key: 345, type: 'array', minItems: 456 },\n        { title: 123, description: 234, $key: 345, type: 'array', allOf: [ 567 ] },\n        { title: 123, description: 234, $key: 345, allOf: [ 678, 789 ] },\n        { title: 123, description: 234, $key: 345, a: 890 },\n        { title: 901, description: 234, $key: 345 }\n      ]\n      const actual = inputs.map(input => __internals__.normalizeSchema(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getItemTypes', () => {\n    it('should work', () => {\n      const inputs = [\n        { items: () => null, type: () => [] },\n        { items: () => null, type: () => [ 'User' ] },\n        { items: () => null, type: () => [ 'User[]' ] },\n        { items: () => null, type: () => [ '(Visitor|Resident)[]' ] },\n        { items: () => null, type: () => [ '(Visitor|Resident)[]', 'User[]' ] },\n        { items: () => [], type: () => [] },\n        { items: () => [], type: () => [ 'User' ] },\n        { items: () => [], type: () => [ 'User[]' ] },\n        { items: () => [], type: () => [ '(Visitor|Resident)[]' ] },\n        { items: () => [], type: () => [ '(Visitor|Resident)[]', 'User[]' ] },\n        { items: () => [ 'User', 'Resident' ], type: () => [] },\n        { items: () => [ 'User', 'Resident' ], type: () => [ 'User' ] },\n        { items: () => [ 'User', 'Resident' ], type: () => [ 'User[]' ] },\n        { items: () => [ 'User', 'Resident' ], type: () => [ '(Visitor|Resident)[]' ] },\n        { items: () => [ 'User', 'Resident' ], type: () => [ '(Visitor|Resident)[]', 'User[]' ] }\n      ]\n      const expected = [\n        [],\n        [],\n        [ 'User' ],\n        [ 'Visitor|Resident' ],\n        [ 'Visitor|Resident', 'User' ],\n        [],\n        [],\n        [ 'User' ],\n        [ 'Visitor|Resident' ],\n        [ 'Visitor|Resident', 'User' ],\n        [ 'User', 'Resident' ],\n        [ 'User', 'Resident' ],\n        [ 'User', 'Resident' ],\n        [ 'User', 'Resident' ],\n        [ 'User', 'Resident' ]\n      ]\n      const actual = inputs.map(input => __internals__.getItemTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addItemFieldToSchema', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getItemTypes').andCall(({ b }) => b)\n      spyOn(__internals__, 'getSchemasFromTypes').andCall(v => {\n        if (v.c) {\n          return ({ c: v.c * 2 })\n        }\n\n        return v\n      })\n      spyOn(__internals__, 'normalizeSchema').andCall(v => {\n        if (v.c) {\n          return ({ c: v.c + 1 })\n        }\n\n        return v\n      })\n\n      const inputs = [\n        [ { a: 123 }, { b: { c: 234 } } ],\n        [ { a: 123 }, { b: {} } ]\n      ]\n      const expected = [\n        { a: 123, items: { c: 469 } },\n        { a: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.addItemFieldToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertArrayTypeDeclaration', () => {\n    it('should work', () => {\n      const merge = (...sources) => Object.assign({}, ...sources)\n\n      spyOn(__internals__, 'addInheritedTypes').andCall((s, { a }) => merge(s, { a }, { b: a * 2 }))\n      spyOn(__internals__, 'addSimpleArrayFieldsToSchema').andCall((s, { a }) => {\n        return merge(s, { c: a * 3 })\n      })\n      spyOn(__internals__, 'addItemFieldToSchema').andCall((s, { a }) => {\n        return merge(s, { d: a * 2 + 1 })\n      })\n\n      const inputs = [\n        { a: 123 }\n      ]\n      const expected = [\n        [ { a: 123, b: 246, c: 369, d: 247 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertArrayTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertUnionTypeDeclaration', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'addInheritedTypes').andCall((s, { a }) => ({ a: a * 2 }))\n\n      const inputs = [\n        { a: 123 }\n      ]\n      const expected = [\n        [ { a: 246 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertUnionTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addSimpleStringFieldsToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, {\n          minLength: () => null,\n          maxLength: () => null,\n          pattern: () => null,\n          enum: () => null\n        } ],\n        [ { a: 123 }, {\n          minLength: () => 123,\n          maxLength: () => 234,\n          pattern: () => 345,\n          enum: () => []\n        } ],\n        [ { a: 123 }, {\n          minLength: () => 123,\n          maxLength: () => 234,\n          pattern: () => 345,\n          enum: () => [ 456 ]\n        } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, minLength: 123, maxLength: 234, pattern: 345 },\n        { a: 123, minLength: 123, maxLength: 234, pattern: 345, enum: [ 456 ] }\n      ]\n      const actual = inputs.map(input => __internals__.addSimpleStringFieldsToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStringTypeDeclaration', () => {\n    it('should work', () => {\n      const merge = (...sources) => Object.assign({}, ...sources)\n\n      spyOn(__internals__, 'addInheritedTypes').andCall((s, { a }) => merge(s, { a }, { b: a * 2 }))\n      spyOn(__internals__, 'addSimpleStringFieldsToSchema').andCall((s, { a }) => {\n        return merge(s, { c: a * 3 })\n      })\n\n      const inputs = [\n        { a: 123 }\n      ]\n      const expected = [\n        [ { a: 123, b: 246, c: 369 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertStringTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addSimpleNumberFieldsToSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, {\n          minimum: () => null,\n          maximum: () => null,\n          multipleOf: () => null,\n          enum: () => null\n        } ],\n        [ { a: 123 }, {\n          minimum: () => 234,\n          maximum: () => 345,\n          multipleOf: () => 456,\n          enum: () => []\n        } ],\n        [ { a: 123 }, {\n          minimum: () => 234,\n          maximum: () => 345,\n          multipleOf: () => 456,\n          enum: () => [ 567 ]\n        } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, minimum: 234, maximum: 345, multipleOf: 456 },\n        { a: 123, minimum: 234, maximum: 345, multipleOf: 456, enum: [ 567 ] }\n      ]\n      const actual = inputs.map(input => __internals__.addSimpleNumberFieldsToSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertNumberTypeDeclaration', () => {\n    it('should work', () => {\n      const merge = (...sources) => Object.assign({}, ...sources)\n\n      spyOn(__internals__, 'addInheritedTypes').andCall((s, { a }) => merge(s, { a }, { b: a * 2 }))\n      spyOn(__internals__, 'addSimpleNumberFieldsToSchema').andCall((s, { a }) => {\n        return merge(s, { c: a * 3 })\n      })\n\n      const inputs = [\n        { a: 123 }\n      ]\n      const expected = [\n        [ { a: 123, b: 246, c: 369 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertNumberTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBooleanTypeDeclaration', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'addInheritedTypes').andCall((s, n, o) => Object.assign(s, { v: n + o }))\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        [ { v: 123 + 234 } ]\n      ]\n      const actual = inputs.map(input => __internals__.convertBooleanTypeDeclaration(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertDateOnlyTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'AuthLib'\n      ]\n      const expected = [\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/$DateOnly'\n          },\n          {\n            $key: '$DateOnly',\n            type: 'string',\n            pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$',\n            description: 'full-date as defined in RFC#3339'\n          }\n        ],\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/AuthLib.$DateOnly'\n          },\n          {\n            $key: 'AuthLib.$DateOnly',\n            type: 'string',\n            pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$',\n            description: 'full-date as defined in RFC#3339'\n          }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertDateOnlyTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertTimeOnlyTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'AuthLib'\n      ]\n      const expected = [\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/$TimeOnly'\n          },\n          {\n            $key: '$TimeOnly',\n            type: 'string',\n            pattern: '^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n            description: 'full-time as defined in RFC#3339'\n          }\n        ],\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/AuthLib.$TimeOnly'\n          },\n          {\n            $key: 'AuthLib.$TimeOnly',\n            type: 'string',\n            pattern: '^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n            description: 'full-time as defined in RFC#3339'\n          }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertTimeOnlyTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertDateTimeOnlyTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'AuthLib'\n      ]\n      const expected = [\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/$DateTimeOnly'\n          },\n          {\n            $key: '$DateTimeOnly',\n            type: 'string',\n            pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T' +\n              '([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n            description: 'full-time as defined in RFC#3339'\n          }\n        ],\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/AuthLib.$DateTimeOnly'\n          },\n          {\n            $key: 'AuthLib.$DateTimeOnly',\n            type: 'string',\n            pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T' +\n              '([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$',\n            description: 'full-time as defined in RFC#3339'\n          }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertDateTimeOnlyTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertDateTimeTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'AuthLib'\n      ]\n      const expected = [\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/$DateTime'\n          },\n          {\n            $key: '$DateTime',\n            type: 'string',\n            description: 'datetime'\n          }\n        ],\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/AuthLib.$DateTime'\n          },\n          {\n            $key: 'AuthLib.$DateTime',\n            type: 'string',\n            description: 'datetime'\n          }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertDateTimeTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertFileTypeDeclaration', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'AuthLib'\n      ]\n      const expected = [\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/$File'\n          },\n          {\n            $key: '$File',\n            type: 'string',\n            description: 'file',\n            pattern: '^[^\\u0000]*\\u0000$'\n          }\n        ],\n        [\n          {\n            type: 'string',\n            $ref: '#/definitions/AuthLib.$File'\n          },\n          {\n            $key: 'AuthLib.$File',\n            type: 'string',\n            description: 'file',\n            pattern: '^[^\\u0000]*\\u0000$'\n          }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.convertFileTypeDeclaration(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createSchema', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const merge = (...sources) => Object.assign({}, ...sources)\n\n      spyOn(__internals__, 'convertTypeDeclaration').andReturn([ { a: 1 }, { b: 2 }, { c: 3 } ])\n      spyOn(__internals__, 'convertObjectTypeDeclaration').andReturn([\n        { a: 4 }, { b: 5 }, { c: 6 }\n      ])\n      spyOn(__internals__, 'convertObjectTypeDeclaration').andReturn([\n        { a: 4 }, { b: 5 }, { c: 6 }\n      ])\n      spyOn(__internals__, 'convertArrayTypeDeclaration').andReturn([\n        { a: 7 }, { b: 8 }, { c: 9 }\n      ])\n      spyOn(__internals__, 'convertUnionTypeDeclaration').andReturn([\n        { a: 10 }, { b: 11 }, { c: 12 }\n      ])\n      spyOn(__internals__, 'convertStringTypeDeclaration').andReturn([\n        { a: 13 }, { b: 14 }, { c: 15 }\n      ])\n      spyOn(__internals__, 'convertNumberTypeDeclaration').andReturn([\n        { a: 16 }, { b: 17 }, { c: 18 }\n      ])\n      spyOn(__internals__, 'convertBooleanTypeDeclaration').andReturn([\n        { a: 19 }, { b: 20 }, { c: 21 }\n      ])\n      spyOn(__internals__, 'convertDateOnlyTypeDeclaration').andReturn([\n        { a: 22 }, { b: 23 }, { c: 24 }\n      ])\n      spyOn(__internals__, 'convertTimeOnlyTypeDeclaration').andReturn([\n        { a: 25 }, { b: 26 }, { c: 27 }\n      ])\n      spyOn(__internals__, 'convertDateTimeOnlyTypeDeclaration').andReturn([\n        { a: 28 }, { b: 29 }, { c: 30 }\n      ])\n      spyOn(__internals__, 'convertDateTimeTypeDeclaration').andReturn([\n        { a: 31 }, { b: 32 }, { c: 33 }\n      ])\n      spyOn(__internals__, 'convertFileTypeDeclaration').andReturn([\n        { a: 34 }, { b: 35 }, { c: 36 }\n      ])\n      spyOn(__internals__, 'addDescriptiveFields').andCall((s, { n }) => merge(s, { n }))\n\n\n      const inputs = [\n        { n: 0, kind: () => 'TypeDeclaration' },\n        { n: 1, kind: () => 'ObjectTypeDeclaration' },\n        { n: 2, kind: () => 'ArrayTypeDeclaration' },\n        { n: 3, kind: () => 'UnionTypeDeclaration' },\n        { n: 4, kind: () => 'StringTypeDeclaration' },\n        { n: 5, kind: () => 'NumberTypeDeclaration' },\n        { n: 6, kind: () => 'IntegerTypeDeclaration' },\n        { n: 7, kind: () => 'BooleanTypeDeclaration' },\n        { n: 8, kind: () => 'DateOnlyTypeDeclaration' },\n        { n: 9, kind: () => 'TimeOnlyTypeDeclaration' },\n        { n: 10, kind: () => 'DateTimeOnlyTypeDeclaration' },\n        { n: 11, kind: () => 'DateTimeTypeDeclaration' },\n        { n: 12, kind: () => 'FileTypeDeclaration' },\n        { n: 13, kind: () => 'WeirdTypeDeclaration' },\n        { n: 14, kind: () => null }\n      ]\n      const expected = [\n        [ { a: 1, n: 0 }, { b: 2 }, { c: 3 } ],\n        [ { a: 4, n: 1 }, { b: 5 }, { c: 6 } ],\n        [ { a: 7, n: 2 }, { b: 8 }, { c: 9 } ],\n        [ { a: 10, n: 3 }, { b: 11 }, { c: 12 } ],\n        [ { a: 13, n: 4 }, { b: 14 }, { c: 15 } ],\n        [ { a: 16, n: 5 }, { b: 17 }, { c: 18 } ],\n        [ { a: 16, n: 6 }, { b: 17 }, { c: 18 } ],\n        [ { a: 19, n: 7 }, { b: 20 }, { c: 21 } ],\n        [ { a: 22, n: 8 }, { b: 23 }, { c: 24 } ],\n        [ { a: 25, n: 9 }, { b: 26 }, { c: 27 } ],\n        [ { a: 28, n: 10 }, { b: 29 }, { c: 30 } ],\n        [ { a: 31, n: 11 }, { b: 32 }, { c: 33 } ],\n        [ { a: 34, n: 12 }, { b: 35 }, { c: 36 } ],\n        [ { n: 13 } ],\n        [ { n: 14 } ]\n      ]\n      const actual = inputs.map(input => __internals__.createSchema(input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addSchemaToDefinitionsReducer', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: 123 }, { b: 234, $key: 'b' } ]\n      ]\n      const expected = [\n        { a: 123, b: { b: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.addSchemaToDefinitionsReducer(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addDefinitionsReducer', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(({ b, c }) => [ { b: b * 2 }, { c: c - 11 } ])\n      spyOn(__internals__, 'normalizeSchema').andCall(({ b, c }) => {\n        if (b) {\n          return { b: b + 1 }\n        }\n\n        return { c: c * 2 }\n      })\n      spyOn(__internals__, 'addSchemaToDefinitionsReducer').andCall((s, n) => {\n        return Object.assign({}, s, n)\n      })\n\n      const inputs = [\n        [ null, { a: 123 }, { b: 234, c: 345 } ]\n      ]\n      const expected = [\n        { a: 123, b: 469, c: 668 }\n      ]\n      const actual = inputs.map(input => __internals__.addDefinitionsReducer(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDefinitions', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'addDefinitionsReducer').andCall((o, s, v) => {\n        return Object.assign(s, { [v]: v })\n      })\n\n      const inputs = [\n        { types: () => [] },\n        { types: () => [ 123, 234, 345 ] }\n      ]\n      const expected = [\n        { definitions: {} },\n        { definitions: { '123': 123, '234': 234, '345': 345 } }\n      ]\n      const actual = inputs.map(input => __internals__.createDefinitions(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDefinitionsFromLibaries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createDefinitions').andCall(a => {\n        return { definitions: { [a]: a } }\n      })\n      const inputs = [\n        { uses: () => null },\n        { uses: () => [] },\n        { uses: () => [ { ast: () => null, key: () => 'Song' } ] },\n        { uses: () => [\n          { ast: () => 123, key: () => 'Song' }\n        ] },\n        { uses: () => [\n          { ast: () => 123, key: () => 'Song' },\n          { ast: () => 234, key: () => 'Library' }\n        ] }\n      ]\n      const expected = [\n        {},\n        {},\n        {},\n        { '123': 123 },\n        { '123': 123, '234': 234 }\n      ]\n      const actual = inputs.map(input => __internals__.extractDefinitionsFromLibaries(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractConstraintStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createDefinitions').andCall(v => v)\n      spyOn(__internals__, 'extractDefinitionsFromLibaries').andReturn({ Product: 345 })\n\n      const inputs = [\n        { definitions: { User: 123, Song: 234 } }\n      ]\n\n      const expected = [\n        OrderedMap({\n          User: new Constraint.JSONSchema(123),\n          Song: new Constraint.JSONSchema(234),\n          Product: new Constraint.JSONSchema(345)\n        })\n      ]\n      const actual = inputs.map(input => __internals__.extractConstraintStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getGlobalContentTypeParameter').andCall(v => v * 2)\n      const inputs = [\n        123,\n        0\n      ]\n      const expected = [\n        OrderedMap({ globalMediaType: 246 }),\n        OrderedMap()\n      ]\n      const actual = inputs.map(input => __internals__.extractParameterStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractScopesFromOAuth2Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { scopes: () => [] },\n        { scopes: () => [ 'user:write', 'document:read' ] }\n      ]\n      const expected = [\n        List(),\n        List([ { key: 'user:write', value: '' }, { key: 'document:read', value: '' } ])\n      ]\n      const actual = inputs.map(input => __internals__.extractScopesFromOAuth2Settings(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractFlowFromOAuth2Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { authorizationGrants: () => null },\n        { authorizationGrants: () => [] },\n        { authorizationGrants: () => [ 'authorization_code' ] },\n        { authorizationGrants: () => [ 'implicit' ] },\n        { authorizationGrants: () => [ 'password' ] },\n        { authorizationGrants: () => [ 'client_credentials' ] },\n        { authorizationGrants: () => [ 'implicit', 'authorization_code' ] },\n        { authorizationGrants: () => [ 'weird' ] }\n      ]\n      const expected = [\n        null,\n        null,\n        'accessCode',\n        'implicit',\n        'password',\n        'application',\n        'implicit',\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractFlowFromOAuth2Settings(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthorizationUrlFromOAuth2Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { authorizationUri: () => null },\n        { authorizationUri: () => ({ value: () => '' }) },\n        { authorizationUri: () => ({ value: () => 123 }) }\n      ]\n      const expected = [\n        null,\n        null,\n        123\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractAuthorizationUrlFromOAuth2Settings(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTokenUrlFromOAuth2Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { accessTokenUri: () => null },\n        { accessTokenUri: () => ({ value: () => null }) },\n        { accessTokenUri: () => ({ value: () => 123 }) }\n      ]\n      const expected = [\n        null,\n        null,\n        123\n      ]\n      const actual = inputs.map(input => __internals__.extractTokenUrlFromOAuth2Settings(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthNameFromAuthScheme', () => {\n    it('should work', () => {\n      const inputs = [\n        { name: () => null },\n        { name: () => 123 }\n      ]\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthNameFromAuthScheme(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoOAuth2AuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n\n      spyOn(__internals__, 'extractFlowFromOAuth2Settings').andCall(v => v + 1)\n      spyOn(__internals__, 'extractAuthorizationUrlFromOAuth2Settings').andCall(v => v * 2)\n      spyOn(__internals__, 'extractTokenUrlFromOAuth2Settings').andCall(v => v * 2 + 1)\n      spyOn(__internals__, 'extractScopesFromOAuth2Settings').andCall(v => v * 3)\n\n      const inputs = [\n        { settings: () => 123, name: 234, desc: 345 }\n      ]\n      const expected = [\n        { key: 234, value: new Auth.OAuth2({\n          authName: 234,\n          description: 345,\n          flow: 124,\n          authorizationUrl: 246,\n          tokenUrl: 247,\n          scopes: 369\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoOAuth2AuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestTokenUriFromOAuth1Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { requestTokenUri: () => null },\n        { requestTokenUri: () => ({ value: () => null }) },\n        { requestTokenUri: () => ({ value: () => 123 }) }\n      ]\n      const expected = [\n        null, null, 123\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractRequestTokenUriFromOAuth1Settings(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthorizationUriFromOAuth1Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { authorizationUri: () => null },\n        { authorizationUri: () => ({ value: () => null }) },\n        { authorizationUri: () => ({ value: () => 123 }) }\n      ]\n      const expected = [\n        null, null, 123\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractAuthorizationUriFromOAuth1Settings(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTokenCredentialsUriFromOAuth1Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { tokenCredentialsUri: () => null },\n        { tokenCredentialsUri: () => ({ value: () => null }) },\n        { tokenCredentialsUri: () => ({ value: () => 123 }) }\n      ]\n      const expected = [\n        null, null, 123\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.extractTokenCredentialsUriFromOAuth1Settings(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSignatureFromOAuth1Settings', () => {\n    it('should work', () => {\n      const inputs = [\n        { signatures: () => null },\n        { signatures: () => [] },\n        { signatures: () => [ 123 ] }\n      ]\n      const expected = [\n        null, null, 123\n      ]\n      const actual = inputs.map(input => __internals__.extractSignatureFromOAuth1Settings(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoOAuth1AuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n\n      spyOn(__internals__, 'extractRequestTokenUriFromOAuth1Settings').andCall(v => v + 1)\n      spyOn(__internals__, 'extractAuthorizationUriFromOAuth1Settings').andCall(v => v * 2)\n      spyOn(__internals__, 'extractTokenCredentialsUriFromOAuth1Settings').andCall(v => v * 2 + 1)\n      spyOn(__internals__, 'extractSignatureFromOAuth1Settings').andCall(v => v * 3)\n\n      const inputs = [\n        { settings: () => 123, name: 234, desc: 345 }\n      ]\n      const expected = [\n        {\n          key: 234, value: new Auth.OAuth1({\n            authName: 234,\n            description: 345,\n            requestTokenUri: 124,\n            authorizationUri: 246,\n            tokenCredentialsUri: 247,\n            signature: 369\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoOAuth1AuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractLocationAndKeyFromApiKeyScheme', () => {\n    it('should work', () => {\n      const inputs = [\n        { describedBy: () => null },\n        { describedBy: () => ({ headers: () => null, queryParameters: () => null }) },\n        { describedBy: () => ({ headers: () => [], queryParameters: () => null }) },\n        { describedBy: () => ({ headers: () => null, queryParameters: () => [] }) },\n        { describedBy: () => ({ headers: () => [], queryParameters: () => [] }) },\n        { describedBy: () => ({\n          headers: () => [ { name: () => 123 }, { name: () => 234 } ],\n          queryParameters: () => null\n        }) },\n        { describedBy: () => ({\n          headers: () => null,\n          queryParameters: () => [ { name: () => 345 }, { name: () => 456 } ]\n        }) },\n        { describedBy: () => ({\n          headers: () => [ { name: () => 123 }, { name: () => 234 } ],\n          queryParameters: () => [ { name: () => 345 }, { name: () => 456 } ]\n        }) }\n      ]\n      const expected = [\n        { key: null, location: null },\n        { key: null, location: null },\n        { key: null, location: null },\n        { key: null, location: null },\n        { key: null, location: null },\n        { key: 123, location: 'header' },\n        { key: 345, location: 'query' },\n        { key: 123, location: 'header' }\n      ]\n      const actual = inputs.map(input => __internals__.extractLocationAndKeyFromApiKeyScheme(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoApiKeyAuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n\n      spyOn(__internals__, 'extractLocationAndKeyFromApiKeyScheme').andReturn({\n        key: 456, location: 567\n      })\n\n      const inputs = [\n        { name: 234, desc: 345 }\n      ]\n      const expected = [\n        { key: 234, value: new Auth.ApiKey({\n          authName: 234,\n          description: 345,\n          key: 456,\n          in: 567\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoApiKeyAuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoBasicAuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n\n      const inputs = [\n        { name: 234, desc: 345 }\n      ]\n      const expected = [\n        { key: 234, value: new Auth.Basic({\n          authName: 234, description: 345\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoBasicAuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoDigestAuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n\n      const inputs = [\n        { name: 234, desc: 345 }\n      ]\n      const expected = [\n        { key: 234, value: new Auth.Digest({\n          authName: 234, description: 345\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoDigestAuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoCustomAuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthNameFromAuthScheme').andCall(({ a }) => a)\n      spyOn(__internals__, 'extractDescription').andCall(({ b }) => b)\n\n      const inputs = [\n        { a: 123, b: 234 }\n      ]\n      const expected = [\n        { key: 123, value: new Auth.Custom({ authName: 123, description: 234 }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoCustomAuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthIntoAuthEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLAuthIntoOAuth2AuthEntry').andReturn(123)\n      spyOn(__internals__, 'convertRAMLAuthIntoOAuth1AuthEntry').andReturn(234)\n      spyOn(__internals__, 'convertRAMLAuthIntoApiKeyAuthEntry').andReturn(345)\n      spyOn(__internals__, 'convertRAMLAuthIntoBasicAuthEntry').andReturn(456)\n      spyOn(__internals__, 'convertRAMLAuthIntoDigestAuthEntry').andReturn(567)\n      spyOn(__internals__, 'convertRAMLAuthIntoCustomAuthEntry').andReturn(678)\n\n      const inputs = [\n        { kind: () => null },\n        { kind: () => 'OAuth2SecurityScheme' },\n        { kind: () => 'OAuth1SecurityScheme' },\n        { kind: () => 'PassThroughSecurityScheme' },\n        { kind: () => 'BasicSecurityScheme' },\n        { kind: () => 'DigestSecurityScheme' },\n        { kind: () => 'AbstractSecurityScheme' },\n        { kind: () => 'CustomSecurityScheme' }\n      ]\n      const expected = [\n        null,\n        123, 234, 345, 456, 567, 678,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthIntoAuthEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthsFromRAMLLibrary', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLAuthIntoAuthEntry').andCall(v => {\n        if (v % 2) {\n          return { key: v, value: v }\n        }\n\n        return null\n      })\n\n      const inputs = [\n        { ast: () => ({ securitySchemes: () => null }) },\n        { ast: () => ({ securitySchemes: () => [] }) },\n        { ast: () => ({ securitySchemes: () => [ 123, 234, 345 ] }), key: () => 'lib' }\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'lib.123', value: 123 }, { key: 'lib.345', value: 345 } ]\n      ]\n\n      const actual = inputs.map(input => __internals__.extractAuthsFromRAMLLibrary(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthsFromRAMLApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractAuthsFromRAMLLibrary').andCall(v => [ v ])\n      spyOn(__internals__, 'convertRAMLAuthIntoAuthEntry').andCall(v => v)\n\n      const inputs = [\n        { securitySchemes: () => null, uses: () => null },\n        { securitySchemes: () => [], uses: () => [] },\n        { securitySchemes: () => [ 123 ], uses: () => [ 234 ] }\n      ]\n      const expected = [\n        [],\n        [],\n        [ 123, 234 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthsFromRAMLApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLAuthIntoAuthEntry').andCall(v => {\n        if (!v) {\n          return v\n        }\n        return { key: v, value: v }\n      })\n\n      const inputs = [\n        { securitySchemes: () => null, uses: () => null },\n        { securitySchemes: () => [], uses: () => null },\n        { securitySchemes: () => [ null, 123, 234 ], uses: () => null },\n        { securitySchemes: () => [ 345, 456, null ], uses: () => null }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234 }),\n        OrderedMap({ '345': 345, '456': 456 })\n      ]\n      const actual = inputs.map(input => __internals__.extractAuthStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceNameFromResourceBase', () => {\n    it('should work', () => {\n      const inputs = [\n        { name: () => null },\n        { name: () => 123 }\n      ]\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfaceNameFromResourceBase(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceUUIDFromResourceName', () => {\n    it('should work', () => {\n      const inputs = [\n        123, 234\n      ]\n      const expected = [\n        'resourceType_123', 'resourceType_234'\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfaceUUIDFromResourceName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceDescriptionFromResourceBase', () => {\n    it('should work', () => {\n      const inputs = [\n        { usage: () => null },\n        { usage: () => 123 }\n      ]\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractInterfaceDescriptionFromResourceBase(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResourceBaseIntoInterfaceEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractInterfaceNameFromResourceBase').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractInterfaceDescriptionFromResourceBase').andCall(\n        ({ desc }) => desc\n      )\n      spyOn(__internals__, 'convertRAMLResourceBaseIntoResourceInstance').andCall(\n        (_, { underlay }) => ({ description: underlay })\n      )\n\n      spyOn(__internals__, 'extractInterfaceUUIDFromResourceName').andCall(v => v * 2)\n\n      const inputs = [\n        { name: 123, desc: 234, underlay: 345 }\n      ]\n      const expected = [\n        { key: 246, value: new Interface({\n          name: 123, uuid: 246, description: 234,\n          underlay: new Resource({ description: 345 }),\n          level: 'resource'\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertResourceBaseIntoInterfaceEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceNameFromMethodBase', () => {\n    it('should work', () => {\n      const inputs = [\n        { name: () => null },\n        { name: () => 234 }\n      ]\n      const expected = [\n        null, 234\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfaceNameFromMethodBase(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceUUIDFromMethodName', () => {\n    it('should work', () => {\n      const inputs = [\n        123, 234\n      ]\n      const expected = [\n        'trait_123', 'trait_234'\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfaceUUIDFromMethodName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceDescriptionFromMethodBase', () => {\n    it('should work', () => {\n      const inputs = [\n        { usage: () => null },\n        { usage: () => 234 }\n      ]\n      const expected = [\n        null, 234\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractInterfaceDescriptionFromMethodBase(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertMethodBaseIntoInterfaceEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractInterfaceNameFromMethodBase').andCall(({ name }) => name)\n      spyOn(__internals__, 'extractInterfaceDescriptionFromMethodBase').andCall(\n        ({ desc }) => desc\n      )\n      spyOn(__internals__, 'convertRAMLMethodBaseIntoRequestInstance').andCall(\n        (_, { underlay }) => ({ description: underlay })\n      )\n\n      spyOn(__internals__, 'extractInterfaceUUIDFromMethodName').andCall(v => v * 2)\n\n      const inputs = [\n        { name: 123, desc: 234, underlay: 345 }\n      ]\n      const expected = [\n        { key: 246, value: new Interface({\n          name: 123, uuid: 246, description: 234,\n          underlay: new Request({ description: 345 }),\n          level: 'request'\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertMethodBaseIntoInterfaceEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfaceStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertResourceBaseIntoInterfaceEntry').andCall(\n        v => ({ key: v, value: v })\n      )\n      spyOn(__internals__, 'convertMethodBaseIntoInterfaceEntry').andCall(\n        v => ({ key: v, value: v })\n      )\n\n      const inputs = [\n        { resourceTypes: () => null, traits: () => null },\n        { resourceTypes: () => [], traits: () => null },\n        { resourceTypes: () => [ 123, 234 ], traits: () => null },\n        { resourceTypes: () => null, traits: () => [] },\n        { resourceTypes: () => [], traits: () => [] },\n        { resourceTypes: () => [ 123, 234 ], traits: () => [] },\n        { resourceTypes: () => null, traits: () => [ 345, 456 ] },\n        { resourceTypes: () => [], traits: () => [ 345, 456 ] },\n        { resourceTypes: () => [ 123, 234 ], traits: () => [ 345, 456 ] }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234 }),\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234 }),\n        OrderedMap({ '345': 345, '456': 456 }),\n        OrderedMap({ '345': 345, '456': 456 }),\n        OrderedMap({ '123': 123, '234': 234, '345': 345, '456': 456 })\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfaceStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateURLComponentWithUriParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertSchemaIntoParameterEntry')\n        .andCall((n, c, { value }) => ({ value }))\n\n      const inputs = [\n        [ new URL({ url: 'https://echo.paw.cloud' }), 'hostname', [ { $key: 'userId' } ] ],\n        [\n          (new URL({ url: 'https://echo.paw.cloud' })).set('pathname', null),\n          'pathname',\n          [ { $key: 'userId' } ]\n        ],\n        [\n          new URL({\n            url: 'https://echo.paw.cloud/user/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }),\n          'pathname',\n          [ { $key: 'userId', value: 123 } ]\n        ]\n      ]\n      const expected = [\n        new URLComponent({\n          componentName: 'hostname',\n          string: 'echo.paw.cloud',\n          parameter: new Parameter({\n            key: 'hostname',\n            name: 'hostname',\n            type: 'string',\n            default: 'echo.paw.cloud'\n          })\n        }),\n        null,\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/user/{userId}',\n          parameter: new Parameter({\n            key: 'pathname',\n            name: 'pathname',\n            type: 'string',\n            superType: 'sequence',\n            value: List([\n              new Parameter({\n                type: 'string',\n                default: '/user/'\n              }),\n              123,\n              new Parameter({\n                type: 'string',\n                default: ''\n              })\n            ])\n          }),\n          variableDelimiters: List([ '{', '}' ])\n        })\n      ]\n      const actual = inputs.map(\n        input => __internals__.updateURLComponentWithUriParameters(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateEndpointWithUriParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'updateURLComponentWithUriParameters').andCall((e, c) => c)\n\n      const inputs = [\n        new URL({ url: 'https://echo.paw.cloud:8080/users/123' })\n      ]\n      const expected = [\n        (new URL({ url: 'https://echo.paw.cloud:8080/users/123' }))\n          .set('hostname', 'hostname')\n          .set('port', 'port')\n          .set('pathname', 'pathname')\n      ]\n      const actual = inputs.map(input => __internals__.updateEndpointWithUriParameters(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBaseUriWithParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n      spyOn(__internals__, 'updateEndpointWithUriParameters').andCall((e, a) => {\n        return e.set('secure', a)\n      })\n\n      const inputs = [\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => null, baseUriParameters: () => null }\n        ],\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => [], baseUriParameters: () => null }\n        ],\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => [ 'HTTP', 'HTTPS:' ], baseUriParameters: () => null }\n        ],\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => null, baseUriParameters: () => [] }\n        ],\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => null, baseUriParameters: () => [ 123, 234 ] }\n        ],\n        [\n          { value: () => 'https://echo.paw.cloud/users' },\n          { protocols: () => [ 'HTTP:', 'HTTPS' ], baseUriParameters: () => [ 123, 234 ] }\n        ]\n      ]\n\n      const expected = [\n        new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }),\n        new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }),\n        (new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }))\n          .set('protocol', List([ 'http:', 'https:' ])),\n        new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }),\n        (new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }))\n          .set('secure', [ 123, 234 ]),\n        (new URL({ url: 'https://echo.paw.cloud/users', variableDelimiters: List([ '{', '}' ]) }))\n          .set('protocol', List([ 'http:', 'https:' ]))\n          .set('secure', [ 123, 234 ])\n      ]\n      const actual = inputs.map(input => __internals__.extractBaseUriWithParameters(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractEndpointStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractBaseUriWithParameters').andCall(v => v)\n\n      const inputs = [\n        { baseUri: () => null },\n        { baseUri: () => 123 }\n      ]\n      const expected = [\n        OrderedMap({ base: new URL() }),\n        OrderedMap({ base: 123 })\n      ]\n      const actual = inputs.map(input => __internals__.extractEndpointStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractStore', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractConstraintStore').andCall(({ constraint: v }) => v + 1)\n      spyOn(__internals__, 'extractParameterStore').andCall(({ parameter: v }) => v + 2)\n      spyOn(__internals__, 'extractAuthStore').andCall(({ auth: v }) => v + 3)\n      spyOn(__internals__, 'extractInterfaceStore').andCall(({ interface: v }) => v + 4)\n      spyOn(__internals__, 'extractEndpointStore').andCall(({ endpoint: v }) => v + 5)\n\n      const inputs = [\n        { constraint: 123, parameter: 234, auth: 345, interface: 456, endpoint: 567 }\n      ]\n      const expected = [\n        new Store({\n          constraint: 124, parameter: 236, auth: 348, interface: 460, endpoint: 572\n        })\n      ]\n      const actual = inputs.map(input => __internals__.extractStore(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createGroupFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        { completeRelativeUri: () => null, relativeUri: () => null },\n        { completeRelativeUri: () => 123, relativeUri: () => null },\n        { completeRelativeUri: () => null, relativeUri: () => ({ value: () => null }) },\n        { completeRelativeUri: () => null, relativeUri: () => ({ value: () => 234 }) },\n        { completeRelativeUri: () => 123, relativeUri: () => ({ value: () => null }) },\n        { completeRelativeUri: () => 123, relativeUri: () => ({ value: () => 234 }) }\n      ]\n      const expected = [\n        new Group(),\n        new Group({ id: 123 }),\n        new Group(),\n        new Group({ name: 234 }),\n        new Group({ id: 123 }),\n        new Group({ id: 123, name: 234 })\n      ]\n      const actual = inputs.map(input => __internals__.createGroupFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGroupKeyFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        { completeRelativeUri: () => null },\n        { completeRelativeUri: () => 123 }\n      ]\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(input => __internals__.getGroupKeyFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createGroupEntryFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createGroupFromResource').andCall(({ child }) => child)\n      spyOn(__internals__, 'getGroupKeyFromResource').andCall(({ child }) => child)\n      spyOn(__internals__, 'convertResourceIntoGroup').andCall((v, { child }) => v + child)\n\n      const inputs = [\n        { child: 123 }\n      ]\n      const expected = [\n        { key: 123, value: 246 }\n      ]\n      const actual = inputs.map(input => __internals__.createGroupEntryFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@resourceHasMethods', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { methods: null },\n        { methods: () => [] },\n        { methods: () => [ 123, 234 ] }\n      ]\n      const expected = [\n        false, false, false, true\n      ]\n      const actual = inputs.map(input => __internals__.resourceHasMethods(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResourceIntoGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createGroupEntryFromResource').andCall(v => ({ key: v, value: v }))\n      spyOn(__internals__, 'resourceHasMethods').andCall(({ hasMethods }) => hasMethods)\n\n      const inputs = [\n        [ new Group(), { resources: () => [], hasMethods: false, absoluteUri: () => 345 } ],\n        [ new Group(), {\n          resources: () => [ 123, 234 ],\n          hasMethods: false,\n          absoluteUri: () => 345\n        } ],\n        [ new Group(), { resources: () => [], hasMethods: true, absoluteUri: () => 345 } ],\n        [ new Group(), { resources: () => [ 123, 234 ], hasMethods: true, absoluteUri: () => 345 } ]\n      ]\n      const expected = [\n        new Group({ children: OrderedMap() }),\n        new Group({ children: OrderedMap({ '123': 123, '234': 234 }) }),\n        new Group({ children: OrderedMap({ '345': 345 }) }),\n        new Group({ children: OrderedMap({ '123': 123, '234': 234, '345': 345 }) })\n      ]\n      const actual = inputs.map(input => __internals__.convertResourceIntoGroup(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createGroups', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertResourceIntoGroup').andCall((_, v) => v * 2)\n\n      const inputs = [\n        123\n      ]\n      const expected = [\n        246\n      ]\n      const actual = inputs.map(input => __internals__.createGroups(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAllResources', () => {\n    it('should work', () => {\n      const resC = { uriParameters: () => [ 345 ], resources: () => [] }\n      const resD = { uriParameters: () => [ 456 ], resources: () => [] }\n\n      const resA = { resources: () => [] }\n      const resB = { resources: () => [\n        resC,\n        resD\n      ] }\n\n      const inputs = [\n        [ [ 123, 234 ], resA ],\n        [ [ 123, 234 ], resB ]\n      ]\n      const expected = [\n        [ { uriParameters: [ 123, 234 ], resource: resA } ],\n        [ { uriParameters: [ 123, 234 ], resource: resB }, {\n          uriParameters: [ 123, 234, 345 ],\n          resource: resC\n        }, {\n          uriParameters: [ 123, 234, 456 ],\n          resource: resD\n        } ]\n      ]\n      const actual = inputs.map(input => __internals__.getAllResources(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAllResourcesFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getAllResources').andCall((_, v) => [ v + 111 ])\n\n      const inputs = [\n        { resources: () => [ 123, 345 ] }\n      ]\n      const expected = [\n        [ 234, 456 ]\n      ]\n      const actual = inputs.map(input => __internals__.getAllResourcesFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStringIntoParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        'qwerty',\n        'asdfgh'\n      ]\n      const expected = [\n        new Parameter({ type: 'string', default: 'qwerty' }),\n        new Parameter({ type: 'string', default: 'asdfgh' })\n      ]\n      const actual = inputs.map(input => __internals__.convertStringIntoParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaIntoPathParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { $key: 123, type: 234, description: 345 }\n      ]\n      const expected = [\n        new Parameter({\n          in: 'path',\n          type: 'string',\n          constraints: new List([ new Constraint.JSONSchema({}) ])\n        }),\n        new Parameter({\n          in: 'path',\n          key: 123,\n          name: 123,\n          description: 345,\n          type: 234,\n          constraints: new List([ new Constraint.JSONSchema({ type: 234, description: 345 }) ])\n        })\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaIntoPathParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addPathParameterToSequence', () => {\n    it('should work', () => {\n      const inputs = [\n        [\n          { remaining: '/users/{userId}/songs/{songId}/test', sequence: [] },\n          { $key: 'userId', a: 123 }\n        ],\n        [\n          { remaining: '/songs/{songId}/test', sequence: [\n            new Parameter({ type: 'string', default: '/users/' }),\n            new Parameter({\n              in: 'path',\n              key: 'userId',\n              name: 'userId',\n              type: 'string',\n              constraints: List([ new Constraint.JSONSchema({ a: 123 }) ])\n            })\n          ] },\n          { $key: 'songId', b: 234 } ]\n      ]\n      const expected = [\n        { remaining: '/songs/{songId}/test', sequence: [\n          new Parameter({ type: 'string', default: '/users/' }),\n          new Parameter({\n            in: 'path',\n            key: 'userId',\n            name: 'userId',\n            type: 'string',\n            constraints: List([ new Constraint.JSONSchema({ a: 123 }) ])\n          })\n        ] },\n        { remaining: '/test', sequence: [\n          new Parameter({ type: 'string', default: '/users/' }),\n          new Parameter({\n            in: 'path',\n            key: 'userId',\n            name: 'userId',\n            type: 'string',\n            constraints: List([ new Constraint.JSONSchema({ a: 123 }) ])\n          }),\n          new Parameter({ type: 'string', default: '/songs/' }),\n          new Parameter({\n            in: 'path',\n            key: 'songId',\n            name: 'songId',\n            type: 'string',\n            constraints: List([ new Constraint.JSONSchema({ b: 234 }) ])\n          })\n        ] }\n      ]\n      const actual = inputs.map(input => __internals__.addPathParameterToSequence(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createSimplePathnameParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        123, 234\n      ]\n      const expected = [\n        new Parameter({\n          key: 'pathname',\n          name: 'pathname',\n          type: 'string',\n          default: 123\n        }),\n        new Parameter({\n          key: 'pathname',\n          name: 'pathname',\n          type: 'string',\n          default: 234\n        })\n      ]\n      const actual = inputs.map(input => __internals__.createSimplePathnameParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createSequencePathnameParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 123, 234, 345 ],\n        [ 456, 567, 678 ]\n      ]\n      const expected = [\n        new Parameter({\n          key: 'pathname',\n          name: 'pathname',\n          type: 'string',\n          superType: 'sequence',\n          value: List([ 123, 234, 345 ])\n        }),\n        new Parameter({\n          key: 'pathname',\n          name: 'pathname',\n          type: 'string',\n          superType: 'sequence',\n          value: List([ 456, 567, 678 ])\n        })\n      ]\n      const actual = inputs.map(input => __internals__.createSequencePathnameParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPathnameURLComponentFromParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 123, 234 ],\n        [ 345, 456 ]\n      ]\n      const expected = [\n        new URLComponent({\n          componentName: 'pathname',\n          string: 123,\n          parameter: 234,\n          variableDelimiters: List([ '{', '}' ])\n        }),\n        new URLComponent({\n          componentName: 'pathname',\n          string: 345,\n          parameter: 456,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      ]\n      const actual = inputs.map(\n        input => __internals__.createPathnameURLComponentFromParameter(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPathnameEndpointFromParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createPathnameURLComponentFromParameter').andCall((a, b) => a + b)\n\n      const inputs = [\n        [ 123, 234 ],\n        [ 345, 456 ]\n      ]\n      const expected = [\n        new URL().set('pathname', 123 + 234),\n        new URL().set('pathname', 345 + 456)\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.createPathnameEndpointFromParameter(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPathnameParameterFromSequenceAndFinalParam', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSequencePathnameParameter').andCall(v => v.map(i => i + 111))\n      const inputs = [\n        [ [ 123, 234 ], 345 ],\n        [ [ 456, 567 ], 678 ]\n      ]\n      const expected = [\n        [ 234, 345, 456 ],\n        [ 567, 678, 789 ]\n      ]\n      const actual = inputs.map(\n        input => __internals__.createPathnameParameterFromSequenceAndFinalParam(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertUriParametersAndResourceIntoPath', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v * 4 ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v / 2)\n      spyOn(__internals__, 'addPathParameterToSequence').andCall((acc, v) => {\n        acc.remaining = acc.remaining === 'def' ? '' : acc.remaining\n        acc.sequence.push(v)\n        return acc\n      })\n\n      spyOn(__internals__, 'createSimplePathnameParameter').andCall(s => OrderedMap({ [s]: s }))\n\n      spyOn(__internals__, 'createPathnameEndpointFromParameter').andCall((r, c) => ({\n        uri: r, comp: c\n      }))\n\n      spyOn(__internals__, 'createPathnameParameterFromSequenceAndFinalParam').andCall((s, c) => {\n        return [].concat(s.map(v => v + 1), [ c ])\n      })\n\n      const inputs = [\n        [ [], { completeRelativeUri: () => 'abc' } ],\n        [ [ 123, 234, 345 ], { completeRelativeUri: () => 'abc' } ],\n        [ [ 123, 234, 345 ], { completeRelativeUri: () => 'def' } ]\n      ]\n      const expected = [\n        { uri: 'abc', comp: OrderedMap({ abc: 'abc' }) },\n        { uri: 'abc', comp: OrderedMap({ abc: 'abc' }) },\n        { uri: 'def', comp: [ 247, 469, 691, OrderedMap({ '': '', key: null, name: null }) ] }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertUriParametersAndResourceIntoPath(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfacesFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: () => null },\n        { type: () => ({ name: () => null }) },\n        { type: () => ({ name: () => 'abc' }) }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({\n          resourceType_abc: new Reference({ type: 'interface', uuid: 'resourceType_abc' })\n        })\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfacesFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createContextFromContentType', () => {\n    it('should work', () => {\n      const inputs = [\n        'application/json'\n      ]\n\n      const expected = [\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              name: 'Content-Type',\n              in: 'headers',\n              default: 'application/json'\n            })\n          ])\n        })\n      ]\n      const actual = inputs.map(input => __internals__.createContextFromContentType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractContextsFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createContextFromContentType').andCall(v => !!v)\n\n      const inputs = [\n        { body: () => null },\n        { body: () => [] },\n        { body: () => [ { name: () => null }, { name: () => 'abc' } ] }\n      ]\n      const expected = [\n        List(),\n        List(),\n        List([ false, true ])\n      ]\n      const actual = inputs.map(input => __internals__.extractContextsFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterFromSchemaAndNameAndContexts', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 123, 234, 345, {}, 678 ],\n        [ 123, 234, 345, { description: 456 }, 678 ],\n        [ 123, 234, 345, { type: 567 }, 678 ],\n        [ 123, 234, 345, { description: 456, type: 567 }, 678 ]\n      ]\n      const expected = [\n        new Parameter({\n          key: 345,\n          name: 345,\n          uuid: 678,\n          in: 123,\n          description: null,\n          type: null,\n          constraints: List([\n            new Constraint.JSONSchema({})\n          ]),\n          applicableContexts: 234\n        }),\n        new Parameter({\n          key: 345,\n          name: 345,\n          uuid: 678,\n          in: 123,\n          description: 456,\n          type: null,\n          constraints: List([\n            new Constraint.JSONSchema({ description: 456 })\n          ]),\n          applicableContexts: 234\n        }),\n        new Parameter({\n          key: 345,\n          name: 345,\n          uuid: 678,\n          in: 123,\n          description: null,\n          type: 567,\n          constraints: List([\n            new Constraint.JSONSchema({ type: 567 })\n          ]),\n          applicableContexts: 234\n        }),\n        new Parameter({\n          key: 345,\n          name: 345,\n          uuid: 678,\n          in: 123,\n          description: 456,\n          type: 567,\n          constraints: List([\n            new Constraint.JSONSchema({ description: 456, type: 567 })\n          ]),\n          applicableContexts: 234\n        })\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.createParameterFromSchemaAndNameAndContexts(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaIntoParameterEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createParameterFromSchemaAndNameAndContexts').andCall((...v) => v)\n      const inputs = [\n        [ 123, 234, {} ],\n        [ 123, 234, { $key: 345 } ],\n        [ 123, 234, { $key: 345, desc: 456 } ]\n      ]\n      const expected = [\n        { key: null, value: [ 123, 234, null, {}, null ] },\n        { key: 345, value: [ 123, 234, 345, {}, 345 ] },\n        { key: 345, value: [ 123, 234, 345, { desc: 456 }, 345 ] }\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaIntoParameterEntry(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertContentTypeToApplicableContexts', () => {\n    it('should work', () => {\n      const inputs = [\n        123, 234\n      ]\n      const expected = [\n        List([\n          new Parameter({\n            key: 'Content-Type',\n            name: 'Content-Type',\n            type: 'string',\n            constraints: List([\n              new Constraint.Enum([ 123 ])\n            ])\n          })\n        ]),\n        List([\n          new Parameter({\n            key: 'Content-Type',\n            name: 'Content-Type',\n            type: 'string',\n            constraints: List([\n              new Constraint.Enum([ 234 ])\n            ])\n          })\n        ])\n      ]\n      const actual = inputs.map(\n        input => __internals__.convertContentTypeToApplicableContexts(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertWebFormParameterIntoParameterEntries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n      spyOn(__internals__, 'createParameterFromSchemaAndNameAndContexts').andCall((...v) => v)\n\n      const inputs = [\n        [ {}, 123, 234 ],\n        [ { properties: {} }, 123, 234 ],\n        [ { properties: { userId: {} } }, 123, 234 ],\n        [ { properties: { userId: { type: 'string' } } }, 123, 234 ],\n        [ { properties: { userId: { type: 'string' }, name: { type: 'string' } } }, 123, 234 ]\n      ]\n      const expected = [\n        [],\n        [],\n        [\n          { key: '234-userId', value: [ 'body', 123, 'userId', {}, '234-userId' ] }\n        ],\n        [\n          { key: '234-userId', value: [ 'body', 123, 'userId', { type: 'string' }, '234-userId' ] }\n        ],\n        [\n          { key: '234-userId', value: [ 'body', 123, 'userId', { type: 'string' }, '234-userId' ] },\n          { key: '234-name', value: [ 'body', 123, 'name', { type: 'string' }, '234-name' ] }\n        ]\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertWebFormParameterIntoParameterEntries(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isWebForm', () => {\n    it('should work', () => {\n      const inputs = [\n        'application/x-www-form-urlencoded',\n        'application/x-www-form-urlencoded; charset=utf-8',\n        'multipart/form-data',\n        'multipart/form-data; boundary=X-PAW-BOUNDARY',\n        'application/json'\n      ]\n      const expected = [\n        true, true, true, true, false\n      ]\n      const actual = inputs.map(input => __internals__.isWebForm(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertStandardBodyParameterIntoParameterEntries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n\n      spyOn(__internals__, 'createParameterFromSchemaAndNameAndContexts').andCall((...v) => v)\n\n      const inputs = [\n        [ {}, 123, 234 ],\n        [ { $key: 345 }, 123, 234 ],\n        [ { $key: 345, title: 456 }, 123, 234 ]\n      ]\n      const expected = [\n        [ { key: 234, value: [ 'body', 123, null, {}, 234 ] } ],\n        [ { key: 234, value: [ 'body', 123, null, {}, 234 ] } ],\n        [ { key: 234, value: [ 'body', 123, null, { title: 456 }, 234 ] } ]\n      ]\n      const actual = inputs.map(\n        input => __internals__.convertStandardBodyParameterIntoParameterEntries(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBodyParameterIntoParameterEntries', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertContentTypeToApplicableContexts').andReturn(123)\n\n      spyOn(__internals__, 'convertWebFormParameterIntoParameterEntries').andCall((p, ...v) => {\n        return [ true, ...v ]\n      })\n      spyOn(__internals__, 'convertStandardBodyParameterIntoParameterEntries').andCall(\n        (p, ...v) => [ false, ...v ]\n      )\n\n      const inputs = [\n        { name: () => null },\n        { name: () => 'application/json' },\n        { name: () => 'application/x-www-form-urlencoded' }\n      ]\n      const expected = [\n        [ false, 123, null ],\n        [ false, 123, 'application/json' ],\n        [ true, 123, 'application/x-www-form-urlencoded' ]\n      ]\n      const actual = inputs.map(\n        input => __internals__.convertBodyParameterIntoParameterEntries(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeParameterFromRequestOrResponse', () => {\n    it('should work', () => {\n      const inputs = [\n        { body: () => null },\n        { body: () => [] },\n        { body: () => [\n          { name: () => null }\n        ] },\n        { body: () => [\n          { name: () => null },\n          { name: () => 'application/json' },\n          { name: () => 'application/xml' }\n        ] }\n      ]\n\n      const expected = [\n        null,\n        null,\n        null,\n        new Parameter({\n          key: 'Content-Type',\n          name: 'Content-Type',\n          in: 'headers',\n          type: 'string',\n          constraints: List([\n            new Constraint.Enum([ 'application/json', 'application/xml' ])\n          ])\n        })\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.getContentTypeParameterFromRequestOrResponse(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGlobalContentTypeParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        { mediaType: () => null },\n        { mediaType: () => [] },\n        { mediaType: () => [ { value: () => null } ] },\n        { mediaType: () => [ { value: () => null }, { value: () => 'application/json' } ] },\n        { mediaType: () => [\n          { value: () => null },\n          { value: () => 'application/json' },\n          { value: () => 'application/xml' }\n        ] }\n      ]\n      const expected = [\n        null, null, null,\n        new Parameter({\n          key: 'Content-Type',\n          name: 'Content-Type',\n          in: 'headers',\n          type: 'string',\n          constraints: List([\n            new Constraint.Enum([ 'application/json' ])\n          ])\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          name: 'Content-Type',\n          in: 'headers',\n          type: 'string',\n          constraints: List([\n            new Constraint.Enum([ 'application/json', 'application/xml' ])\n          ])\n        })\n      ]\n      const actual = inputs.map(input => __internals__.getGlobalContentTypeParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGlobalContentTypeParameterReference', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        { mediaType: () => null },\n        { mediaType: () => [] },\n        { mediaType: () => [ { value: () => null } ] },\n        { mediaType: () => [ { value: () => 123 }, { value: () => 234 } ] }\n      ]\n      const expected = [\n        null, null, null, null,\n        new Reference({ type: 'parameter', uuid: 'globalMediaType' })\n      ]\n      const actual = inputs.map(\n        input => __internals__.getGlobalContentTypeParameterReference(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getContentTypeParameterFromRequestOrResponse').andCall(\n        ({ valid }) => valid ? 123 : null\n      )\n      spyOn(__internals__, 'getGlobalContentTypeParameterReference').andCall(\n        ({ valid }) => valid ? 234 : null\n      )\n\n      const inputs = [\n        [ { valid: true }, { valid: true } ],\n        [ { valid: true }, { valid: false } ],\n        [ { valid: false }, { valid: true } ],\n        [ { valid: false }, { valid: false } ]\n      ]\n      const expected = [\n        123, 234, 123, null\n      ]\n\n      const actual = inputs.map(input => __internals__.getContentTypeParameter(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createQueryParameterBlockFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n\n      spyOn(__internals__, 'convertSchemaIntoParameterEntry').andCall(\n        (l, c, v) => ({ key: v.param, value: [ l, c ] })\n      )\n\n      const inputs = [\n        { queryParameters: () => null, queryString: () => null },\n        { queryParameters: () => [], queryString: () => null },\n        { queryParameters: () => [\n          { param: 123 },\n          { param: 234 }\n        ], queryString: () => null },\n        { queryParameters: () => [], queryString: () => ({ param: 345 }) }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': [ 'queries', List() ], '234': [ 'queries', List() ] }),\n        OrderedMap({ '345': [ 'queries', List() ] })\n      ]\n      const actual = inputs.map(input => __internals__.createQueryParameterBlockFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeaderParameterBlockFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n\n      spyOn(__internals__, 'convertSchemaIntoParameterEntry').andCall(\n        (l, c, v) => ({ key: v.param, value: [ l, c ] })\n      )\n\n      spyOn(__internals__, 'getContentTypeParameter').andCall((a) => a.api ? 345 : null)\n\n      const inputs = [\n        [ { api: false }, { headers: () => null } ],\n        [ { api: true }, { headers: () => [] } ],\n        [ { api: true }, { headers: () => [\n          { param: 123 },\n          { param: 234 }\n        ] } ],\n        [ { api: false }, { headers: () => [\n          { param: 123 },\n          { param: 234 }\n        ] } ]\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap({ 'Content-Type': 345 }),\n        OrderedMap({\n          '123': [ 'headers', List() ],\n          '234': [ 'headers', List() ],\n          'Content-Type': 345\n        }),\n        OrderedMap({\n          '123': [ 'headers', List() ],\n          '234': [ 'headers', List() ]\n        })\n      ]\n      const actual = inputs.map(\n        input => __internals__.createHeaderParameterBlockFromRequest(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyParameterBlockFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertBodyParameterIntoParameterEntries').andCall(v => v)\n\n      const inputs = [\n        { body: () => null },\n        { body: () => [] },\n        { body: () => [\n          [ { key: 123, value: 123 }, { key: 234, value: 234 } ],\n          [ { key: 345, value: 345 }, { key: 456, value: 456 } ]\n        ] }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234, '345': 345, '456': 456 })\n      ]\n\n      const actual = inputs.map(input => __internals__.createBodyParameterBlockFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterContainerFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createQueryParameterBlockFromRequest').andCall(v => v * 2)\n      spyOn(__internals__, 'createHeaderParameterBlockFromRequest').andCall((a, v) => a + v)\n      spyOn(__internals__, 'createBodyParameterBlockFromRequest').andCall(v => v * 3)\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n\n      const expected = [\n        new ParameterContainer({ queries: 234 * 2, headers: 123 + 234, body: 234 * 3 })\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractParameterContainerFromRequest(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeaderParameterBlockFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSchema').andCall(v => [ v ])\n      spyOn(__internals__, 'normalizeSchema').andCall(v => v)\n\n      spyOn(__internals__, 'convertSchemaIntoParameterEntry').andCall(\n        (l, c, v) => ({ key: v.param, value: new Parameter({ in: l, key: c }) })\n      )\n\n      spyOn(__internals__, 'getContentTypeParameterFromRequestOrResponse').andCall(\n        ({ ct }) => ct || null\n      )\n\n      const inputs = [\n        [ { headers: () => null } ],\n        [ { headers: () => [] } ],\n        [ { headers: () => [\n          { param: 123 },\n          { param: 234 }\n        ] } ],\n        [ { headers: () => [\n          { param: 123 },\n          { param: 234 }\n        ], ct: new Parameter({ in: 345 }) } ]\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({\n          '123': new Parameter({ in: 'headers', key: List(), usedIn: 'response' }),\n          '234': new Parameter({ in: 'headers', key: List(), usedIn: 'response' })\n        }),\n        OrderedMap({\n          '123': new Parameter({ in: 'headers', key: List(), usedIn: 'response' }),\n          '234': new Parameter({ in: 'headers', key: List(), usedIn: 'response' }),\n          'Content-Type': new Parameter({ in: 345, usedIn: 'response' })\n        })\n      ]\n      const actual = inputs.map(\n        input => __internals__.createHeaderParameterBlockFromResponse(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyParameterBlockFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertBodyParameterIntoParameterEntries').andCall(v => v)\n\n      const inputs = [\n        { body: () => null },\n        { body: () => [] },\n        { body: () => [\n          [\n            { key: 123, value: new Parameter({ in: 123 }) },\n            { key: 234, value: new Parameter({ in: 234 }) }\n          ],\n          [\n            { key: 345, value: new Parameter({ in: 345 }) },\n            { key: 456, value: new Parameter({ in: 456 }) }\n          ]\n        ] }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({\n          '123': new Parameter({ in: 123, usedIn: 'response' }),\n          '234': new Parameter({ in: 234, usedIn: 'response' }),\n          '345': new Parameter({ in: 345, usedIn: 'response' }),\n          '456': new Parameter({ in: 456, usedIn: 'response' })\n        })\n      ]\n\n      const actual = inputs.map(input => __internals__.createBodyParameterBlockFromResponse(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParameterContainerFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createHeaderParameterBlockFromResponse').andCall(v => v * 2)\n      spyOn(__internals__, 'createBodyParameterBlockFromResponse').andCall(v => v * 3)\n\n      const inputs = [\n        [ 123 ]\n      ]\n\n      const expected = [\n        new ParameterContainer({ headers: 123 * 2, body: 123 * 3 })\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractParameterContainerFromResponse(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLAuthRefIntoAuthReference', () => {\n    it('should work', () => {\n      const inputs = [\n        { name: () => null },\n        { name: () => 123 }\n      ]\n      const expected = [\n        null,\n        new Reference({ type: 'auth', uuid: 123 })\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLAuthRefIntoAuthReference(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractAuthsFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLAuthRefIntoAuthReference').andCall(v => v + 1)\n\n      const inputs = [\n        { securedBy: () => null },\n        { securedBy: () => [] },\n        { securedBy: () => [ 123, 234 ] }\n      ]\n\n      const expected = [\n        List(),\n        List(),\n        List([ 124, 235 ])\n      ]\n\n      const actual = inputs.map(input => __internals__.extractAuthsFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLResponseIntoResponseEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractDescription').andCall(v => v.value)\n      spyOn(__internals__, 'extractParameterContainerFromResponse').andCall(v => v.value * 2)\n      spyOn(__internals__, 'extractContextsFromRequest').andCall(v => v.value * 3)\n\n      const inputs = [\n        { code: () => ({ value: () => null }), value: 123 },\n        { code: () => ({ value: () => 200 }), value: 123 }\n      ]\n      const expected = [\n        {\n          key: null,\n          value: new Response({\n            code: null,\n            description: 123,\n            parameters: 123 * 2,\n            contexts: 123 * 3\n          })\n        },\n        {\n          key: 200,\n          value: new Response({\n            code: 200,\n            description: 123,\n            parameters: 123 * 2,\n            contexts: 123 * 3\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLResponseIntoResponseEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResponsesFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLResponseIntoResponseEntry').andCall(v => ({\n        key: v, value: v\n      }))\n\n      const inputs = [\n        { responses: () => null },\n        { responses: () => [] },\n        { responses: () => [ 123, 234 ] }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234 })\n      ]\n      const actual = inputs.map(input => __internals__.extractResponsesFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLTraitRefIntoReferenceEntry', () => {\n    it('should work', () => {\n      // NOTE this behavior is due to a bug in the official RAML parser (v1.16)\n      const inputs = [\n        { name: () => '123' },\n        { name: () => 'Api.234' }\n      ]\n\n      const expected = [\n        { key: 'trait_123', value: new Reference({ type: 'interface', uuid: 'trait_123' }) },\n        { key: 'trait_Api.234', value: new Reference({ type: 'interface', uuid: 'trait_Api.234' }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLTraitRefIntoReferenceEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInterfacesFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLTraitRefIntoReferenceEntry').andCall(\n        v => ({ key: v, value: v })\n      )\n\n      const inputs = [\n        { is: () => null },\n        { is: () => [] },\n        { is: () => [ 123, 234 ] }\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '123': 123, '234': 234 })\n      ]\n      const actual = inputs.map(input => __internals__.extractInterfacesFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@areProtocolsEqual', () => {\n    it('should work', () => {\n      const inputs = [\n        [ null, null ],\n        [ [], {} ],\n        [ [ 'HTTP', 'HTTPS' ], {} ],\n        [ [ 'HTTP' ], { value: () => null } ],\n        [ [ 'HTTP' ], { value: () => 'https://echo.paw.cloud' } ],\n        [ [ 'HTTP' ], { value: () => 'http://echo.paw.cloud' } ]\n      ]\n      const expected = [\n        false,\n        false,\n        false,\n        false,\n        false,\n        true\n      ]\n      const actual = inputs.map(input => __internals__.areProtocolsEqual(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLMethodBaseIntoRequestInstance', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'areProtocolsEqual').andCall((f, s) => f && s && f[0] === s[0])\n      spyOn(__internals__, 'extractDescription').andCall(({ desc }) => desc)\n      spyOn(__internals__, 'extractContextsFromRequest').andCall(({ ctx }) => ctx)\n      spyOn(__internals__, 'extractParameterContainerFromRequest').andCall(\n        (_, { params }) => params\n      )\n      spyOn(__internals__, 'extractAuthsFromRequest').andCall(({ auths }) => auths)\n      spyOn(__internals__, 'extractResponsesFromRequest').andCall(({ res }) => res)\n      spyOn(__internals__, 'extractInterfacesFromRequest').andCall(({ itfs }) => itfs)\n\n      const inputs = [\n        [ { a: 123, baseUri: () => null }, {\n          protocols: () => null,\n          displayName: () => null,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ],\n        [ { a: 123, baseUri: () => null }, {\n          protocols: () => [ '234', '345' ],\n          displayName: () => null,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ],\n        [ { a: 123, baseUri: () => [ '234', '345' ] }, {\n          protocols: () => [ '234', '345' ],\n          displayName: () => null,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ],\n        [ { a: 123, baseUri: () => null }, {\n          protocols: () => null,\n          displayName: () => 456,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ],\n        [ { a: 123, baseUri: () => null }, {\n          protocols: () => [ '234', '345' ],\n          displayName: () => 456,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ],\n        [ { a: 123, baseUri: () => null }, {\n          protocols: () => [ '234:', '345' ],\n          displayName: () => 456,\n          desc: 'abc', ctx: 'def', params: 'ghi', auths: 'jkl', res: 'mno', itfs: 'pqr'\n        } ]\n      ]\n      const expected = [\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: null\n            })\n          }),\n          name: null,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        },\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: new URL().set('protocol', List([ '234:', '345:' ]))\n            })\n          }),\n          name: null,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        },\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: null\n            })\n          }),\n          name: null,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        },\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: null\n            })\n          }),\n          name: 456,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        },\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: new URL().set('protocol', List([ '234:', '345:' ]))\n            })\n          }),\n          name: 456,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        },\n        {\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base',\n              overlay: new URL().set('protocol', List([ '234:', '345:' ]))\n            })\n          }),\n          name: 456,\n          description: 'abc',\n          contexts: 'def',\n          parameters: 'ghi',\n          auths: 'jkl',\n          responses: 'mno',\n          interfaces: 'pqr'\n        }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertRAMLMethodBaseIntoRequestInstance(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@convertRAMLMethodIntoRequestEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLMethodBaseIntoRequestInstance').andCall(({ a }, m) => {\n        return { name: a, description: m.method() }\n      })\n\n      const inputs = [\n        [ { a: 123 }, { method: () => null } ],\n        [ { a: 123 }, { method: () => 234 } ]\n      ]\n      const expected = [\n        { key: null, value: new Request({ name: 123, method: null, description: null }) },\n        { key: 234, value: new Request({ name: 123, method: 234, description: 234 }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertRAMLMethodIntoRequestEntry(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRequestsFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLMethodIntoRequestEntry').andCall((api, res) => {\n        return { key: res, value: api.a + res }\n      })\n\n      const inputs = [\n        [ { a: 123 }, { methods: () => null } ],\n        [ { a: 123 }, { methods: () => [] } ],\n        [ { a: 123 }, { methods: () => [ 234, 345 ] } ]\n      ]\n\n      const expected = [\n        OrderedMap(),\n        OrderedMap(),\n        OrderedMap({ '234': 123 + 234, '345': 123 + 345 })\n      ]\n\n      const actual = inputs.map(input => __internals__.extractRequestsFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLResourceBaseIntoResourceInstance', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractDescription').andCall(v => v)\n      spyOn(__internals__, 'extractInterfacesFromResource').andCall(v => v * 2)\n      spyOn(__internals__, 'extractRequestsFromResource').andCall((a, v) => a + v)\n\n      const inputs = [\n        [ 123, 234 ],\n        [ 345, 456 ]\n      ]\n      const expected = [\n        { description: 234, interfaces: 234 * 2, methods: 123 + 234 },\n        { description: 456, interfaces: 456 * 2, methods: 345 + 456 }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertRAMLResourceBaseIntoResourceInstance(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getNameFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        { displayName: () => null, relativeUri: () => null },\n        { displayName: () => null, relativeUri: () => ({ value: () => null }) },\n        { displayName: () => null, relativeUri: () => ({ value: () => '' }) },\n        { displayName: () => null, relativeUri: () => ({ value: () => 'abc' }) },\n        { displayName: () => 'abc', relativeUri: () => ({ value: () => 'abc' }) },\n        { displayName: () => 'abc', relativeUri: () => ({ value: () => 'def' }) }\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        null,\n        'abc'\n      ]\n      const actual = inputs.map(input => __internals__.getNameFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLResourceIntoResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertUriParametersAndResourceIntoPath').andCall(v => v)\n      spyOn(__internals__, 'convertRAMLResourceBaseIntoResourceInstance').andReturn(\n        { description: 'base', path: 'ignored', name: 'also ignored' }\n      )\n      spyOn(__internals__, 'getNameFromResource').andReturn('someName')\n\n      const inputs = [\n        [ { a: 123 }, { uriParameters: 456, resource: {\n          completeRelativeUri: () => 234, absoluteUri: () => 345\n        } } ],\n        [ { a: 123 }, { uriParameters: 567, resource: {\n          completeRelativeUri: () => null, absoluteUri: () => null\n        } } ]\n      ]\n\n      const expected = [\n        new Resource({\n          name: 'someName',\n          uuid: 345,\n          path: 456,\n          description: 'base',\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base'\n            })\n          })\n        }),\n        new Resource({\n          name: 'someName',\n          uuid: null,\n          path: 567,\n          description: 'base',\n          endpoints: OrderedMap({\n            base: new Reference({\n              type: 'endpoint',\n              uuid: 'base'\n            })\n          })\n        })\n      ]\n\n      const actual = inputs.map(input => __internals__.convertRAMLResourceIntoResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLResourceIntoResourceEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLResourceIntoResource').andCall(({ a }) => a)\n\n      const inputs = [\n        [ { a: 123 }, { resource: { absoluteUri: () => null } } ],\n        [ { a: 123 }, { resource: { absoluteUri: () => 234 } } ]\n      ]\n\n      const expected = [\n        { key: null, value: 123 },\n        { key: 234, value: 123 }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertRAMLResourceIntoResourceEntry(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRAMLResourceListIntoResourceMap', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertRAMLResourceIntoResourceEntry').andCall(({ a }, v) => {\n        return { key: v, value: a + v }\n      })\n\n      const inputs = [\n        [ { a: 123 }, [ 234, 345 ] ]\n      ]\n      const expected = [\n        OrderedMap({ '234': 123 + 234, '345': 123 + 345 })\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertRAMLResourceListIntoResourceMap(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractApiTitle', () => {\n    it('should work', () => {\n      const inputs = [\n        { title: () => null },\n        { title: () => 123 }\n      ]\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(input => __internals__.extractApiTitle(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        { description: () => null },\n        { description: () => ({ value: () => null }) },\n        { description: () => ({ value: () => '123' }) }\n      ]\n      const expected = [\n        null, null, '123'\n      ]\n      const actual = inputs.map(input => __internals__.extractDescription(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractApiVersion', () => {\n    it('should work', () => {\n      const inputs = [\n        { version: () => null },\n        { version: () => 123 }\n      ]\n\n      const expected = [\n        null, 123\n      ]\n      const actual = inputs.map(input => __internals__.extractApiVersion(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractInfo', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractApiTitle').andCall(v => v)\n      spyOn(__internals__, 'extractDescription').andCall(v => v * 2)\n      spyOn(__internals__, 'extractApiVersion').andCall(v => v * 3)\n\n      const inputs = [\n        123, 234\n      ]\n\n      const expected = [\n        new Info({ title: 123, description: 123 * 2, version: 123 * 3 }),\n        new Info({ title: 234, description: 234 * 2, version: 234 * 3 })\n      ]\n      const actual = inputs.map(input => __internals__.extractInfo(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@parse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createGroups').andCall(v => v * 2)\n      spyOn(__internals__, 'getAllResourcesFromApi').andReturn(100)\n      spyOn(__internals__, 'convertRAMLResourceListIntoResourceMap').andCall((v, b) => v * 3 + b)\n      spyOn(__internals__, 'extractStore').andCall(v => v * 4)\n      spyOn(__internals__, 'extractInfo').andCall(v => v * 5)\n\n      const inputs = [\n        { options: 123, item: 234 }\n      ]\n      const expected = [\n        { options: 123, api: new Api({\n          group: 234 * 2,\n          resources: 234 * 3 + 100,\n          store: 234 * 4,\n          info: 234 * 5\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.parse(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n/* eslint-enable require-jsdoc */\n"
  },
  {
    "path": "src/parsers/swagger/v2.0/Parser.js",
    "content": "/**\n * TODO: improve Tag management (there's a Tag Object that contains a description)\n */\n\nimport { parse, format } from 'url'\nimport { OrderedMap, Map, List } from 'immutable'\nimport yaml from 'js-yaml'\nimport tv4 from 'tv4'\nimport swaggerSchema from 'swagger-schema-official/schema.json'\n\nimport Api from '../../../models/Api'\nimport Info from '../../../models/Info'\nimport Contact from '../../../models/Contact'\nimport License from '../../../models/License'\nimport Store from '../../../models/Store'\nimport Reference from '../../../models/Reference'\nimport Interface from '../../../models/Interface'\nimport Parameter from '../../../models/Parameter'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Constraint from '../../../models/Constraint'\nimport Auth from '../../../models/Auth'\nimport URL from '../../../models/URL'\nimport Group from '../../../models/Group'\nimport Resource from '../../../models/Resource'\nimport Response from '../../../models/Response'\nimport Request from '../../../models/Request'\n\nimport { currify, entries, convertEntryListInMap, flatten } from '../../../utils/fp-utils'\n\nexport const __errors__ = {\n  InvalidJSONorYAML: class InvalidJSONorYAMLError extends SyntaxError {},\n  NotASwaggerV2: class NotASwaggerV2Error extends TypeError {}\n}\n\nconst methods = {}\n\nexport const __meta__ = {\n  version: 'v2.0',\n  format: 'swagger'\n}\n\n/**\n * A Parser that converts Swagger v2.0 formatted objects into Api Records\n */\nexport class SwaggerParser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(content) {\n    return methods.detect(content)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(content) {\n    return methods.getAPIName(content)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse() {\n    return methods.parse(...arguments)\n  }\n}\n\n/**\n * throws with message explaining that the file could not be parsed\n * @throws {InvalidJSONorYAMLError}\n * @returns {void}\n */\nmethods.handleUnkownFormat = () => {\n  const message = 'Failed to parse file (not a JSON or a YAML)'\n  const error = new __errors__.InvalidJSONorYAML(message)\n  throw error\n}\n\n/**\n * throws with message explaining that the file could not be parsed\n * @throws {InvalidJSONorYAMLError}\n * @returns {void}\n */\nmethods.handleInvalidSwagger = () => {\n  const message = 'Invalid Swagger File (invalid schema / version < 2.0)\\n' +\n    tv4.error + '\\n' +\n    'Potential culprit: ' + tv4.error.dataPath\n  const error = new __errors__.NotASwaggerV2(message)\n  throw error\n}\n\n/**\n * converts a string written in JSON or YAML format into an object\n * @param {string} str: the string to parse\n * @returns {Object?} the converted object, or null if str was not a JSON or YAML string\n */\nmethods.parseJSONorYAML = (str) => {\n  let parsed\n  try {\n    parsed = JSON.parse(str)\n  }\n  catch (jsonParseError) {\n    try {\n      parsed = yaml.safeLoad(str)\n    }\n    catch (yamlParseError) {\n      return null\n    }\n  }\n\n  return parsed\n}\n\n/**\n * creates a list of normalized objects from a score\n * @param {integer} score: the detection score\n * @returns {List<Object>} the normalized list of objects\n */\nmethods.formatDetectionObject = (score = 0) => {\n  return [ { ...__meta__, score } ]\n}\n\n/**\n * gives a confidence score that the string passed is a swagger file\n * @param {string} content: the content to test the format of\n * @returns {List<Object>} a normalized list of confidence scores\n */\nmethods.detect = (content) => {\n  const parsed = methods.parseJSONorYAML(content)\n\n  let score = 0\n\n  if (parsed) {\n    score += parsed.swagger ? 1 / 4 : 0\n    score += parsed.swagger === '2.0' ? 1 / 4 : 0\n    score += parsed.info ? 1 / 4 : 0\n    score += parsed.paths ? 1 / 4 : 0\n  }\n\n  return methods.formatDetectionObject(score)\n}\n\n/**\n * suggests an API name based on the content of a swagger file\n * @param {string} content: the content of the swagger file\n * @returns {string?} a suggested title for the API\n */\nmethods.getAPIName = (content) => {\n  const parsed = methods.parseJSONorYAML(content)\n\n  if (parsed && parsed.info && parsed.info.title) {\n    return parsed.info.title\n  }\n\n  return null\n}\n\n/**\n * tests whether an object is a swagger object or not\n * @param {Object} maybeSwagger: the object to test\n * @returns {boolean} true if it is a swagger, false otherwise\n */\nmethods.isSwagger = (maybeSwagger) => {\n  const isValid = tv4.validate(maybeSwagger, swaggerSchema)\n  return isValid\n}\n\n/**\n * converts a swagger Contact Object into a Contact Record\n * @param {string} name?: the name of the contact\n * @param {string} url?: the url to visit\n * @param {string} email?: the email to use\n * @returns {Contact} the corresponding Contact Record\n */\nmethods.getContact = ({ name = null, url = null, email = null } = {}) => {\n  const contactInstance = { name, url, email }\n  return new Contact(contactInstance)\n}\n\n/**\n * converts a swagger License Object into a License Record\n * @param {string} name?: the license's name\n * @param {string} url?: location of the license description\n * @returns {License} the corresponding License Record\n */\nmethods.getLicense = ({ name = null, url = null } = {}) => {\n  const licenseInstance = { name, url }\n  return new License(licenseInstance)\n}\n\n/**\n * convert a swagger Info Object into an Info Record\n * @param {InfoObject} info: the object to convert\n * @returns {Info} the corresponding Info Record\n */\nmethods.getInfo = ({\n  contact,\n  license,\n  title = null,\n  description = null,\n  termsOfService = null,\n  version = null\n} = {}) => {\n  const infoInstance = {\n    title,\n    description,\n    version,\n    tos: termsOfService,\n    contact: methods.getContact(contact),\n    license: methods.getLicense(license)\n  }\n\n  return new Info(infoInstance)\n}\n\n/**\n * Fixes the swagger file to not rely on an external context, like the url we got the file from\n * @param {SwaggerObject} swagger: the swagger file that may need fixing\n * @param {string?} url: the context to fix the swagger file\n * @returns {SwaggerObject}: the fixed swagger\n *\n * TODO: this may raise reference issue when dealing with silently defined local files. we could\n * fix this.\n */\nmethods.fixExternalContextDependencies = (swagger, url) => {\n  if (!swagger.host) {\n    swagger.host = url ? parse(url).host : 'localhost'\n  }\n\n  if (!swagger.schemes || !swagger.schemes.length) {\n    const scheme = url ? parse(url).protocol.split(':')[0] : 'http'\n    swagger.schemes = [ scheme ]\n  }\n\n  return swagger\n}\n\n/**\n * extracts entries of a Swagger Resource Object and returns the ones that are methods\n * @param {SwaggerResourceObject} resource: the swagger resource to extract the method entries of\n * @returns {Array<Entry<string, SwaggerOperationObject>>} the methods entries\n */\nmethods.getMethodsFromResourceObject = (resource) => {\n  const $entries = entries(resource)\n  const validMethods = [\n    'get', 'put', 'post', 'delete', 'options', 'head', 'patch'\n  ]\n\n  return $entries.filter(({ key }) => {\n    return validMethods.indexOf(key.toLowerCase()) >= 0\n  })\n}\n\n/**\n * separates parameters and references from a list of Swagger Parameter Objects\n * @param {Array<SwaggerParameterObject|SwaggerReferenceObject>} params: the list of parameters to\n * separate.\n * @returns {\n *   {\n *     parameters: Array<Entry<string, SwaggerParameterObject>>,\n *     references: Array<Entry<string, SwaggerReferenceObject>>\n *   }\n * } the separated parameters and references objects, as Entries.\n */\nmethods.getParametersAndReferencesFromParameterArray = (params = []) => {\n  return params.reduce((acc, param) => {\n    if (param && param.$ref) {\n      acc.references.push({\n        key: param.$ref,\n        value: param\n      })\n    }\n    else {\n      acc.parameters.push({\n        key: param.name + '-' + param.in,\n        value: param\n      })\n    }\n\n    return acc\n  }, { parameters: [], references: [] })\n}\n\n/**\n * converts a Swagger Reference Object into into an Entry of a Reference Record.\n * @param {string} type: the type of the reference\n * @param {string} key: the URI of the Swagger Reference Object\n * @returns {Entry<string, Reference>} the corresponding Reference Record\n */\nmethods.convertReferenceObjectEntryIntoReferenceEntry = (type, { key }) => {\n  return {\n    key,\n    value: new Reference({\n      type,\n      uuid: key\n    })\n  }\n}\n\n/**\n * transforms a list of Swagger Reference Objects into a map of Reference Records\n * @param {string} type: the type of the references\n * @param {Array<string>} refs: the array of Swagger Reference Objects\n * @returns {Object<string, Reference>} the corresponding map of Reference\n */\nmethods.convertReferenceArrayIntoReferenceMap = (type, refs = []) => {\n  const convertRef = currify(methods.convertReferenceObjectEntryIntoReferenceEntry, type)\n  return refs.map(convertRef).reduce(convertEntryListInMap, {})\n}\n\n/**\n * appends parameters that are shared at the Resource level to an Operation Object passed as an\n * Entry.\n * @param {Array<SwaggerParameterObject|SwaggerReferenceObject>} params: the shared parameters\n * @param {string} key: the key of the Entry.\n * @param {SwaggerOperationObject} value: the Swagger Operation Object to update.\n * @returns {Entry<string, SwaggerOperationObject>} the updated operation object\n */\nmethods.updateOperationEntryWithSharedParameters = (params = [], { key, value }) => {\n  if (!key || typeof value !== 'object') {\n    return { key, value }\n  }\n\n  const operationObject = value\n  if (params.length && !(operationObject.parameters && Array.isArray(operationObject.parameters))) {\n    operationObject.parameters = params\n  }\n  else if (params.length) {\n    operationObject.parameters = operationObject.parameters.concat(params)\n  }\n  return { key, value: operationObject }\n}\n\n/**\n * returns the Parameter associated with the consumes field for this operation. If this operation\n * has no `consumes` field, a reference to the global one is used, if it exists.\n * @param {Store} store: the Store Record that holds shared values.\n * @param {SwaggerOperationObject} operation: the operation object to get the consumes field of\n * @returns {\n *   {\n *     consumeParameter: Parameter?,\n *     consumeReference: Reference?,\n *     consumeInterface: Interface?\n *   }\n * } the corresponding Parameter, and interface if it exists\n */\nmethods.getConsumesParamFromOperation = (store = new Store(), operation = {}) => {\n  let consumeInterface = null\n  let consumeParam = null\n  let consumeReference = null\n\n  if (!operation.consumes && store.getIn([ 'parameter', 'globalConsumes' ])) {\n    consumeInterface = store.getIn([ 'interface', 'apiRequestMediaType' ]) || null\n    consumeReference = new Reference({ type: 'parameter', uuid: 'globalConsumes' })\n  }\n  else {\n    const consumes = operation.consumes || []\n    if (consumes.length) {\n      consumeParam = new Parameter({\n        uuid: 'Content-Type-header',\n        in: 'headers',\n        key: 'Content-Type',\n        name: 'Content Type Header',\n        description: 'describes the media type of the request',\n        type: 'string',\n        required: true,\n        constraints: List([\n          new Constraint.Enum(consumes)\n        ])\n      })\n    }\n  }\n\n  return { consumeParameter: consumeParam, consumeReference, consumeInterface: consumeInterface }\n}\n\n/**\n * returns the Parameter associated with the produces field for this operation. If this operation\n * has no `produces` field, a reference to the global one is used, if it exists.\n * @param {Store} store: the Store Record that holds shared values.\n * @param {SwaggerOperationObject} operation: the operation object to get the produces field of\n * @returns {\n *   {\n *     produceParameter: (Parameter | Reference)?,\n *     produceInterface: Interface?\n *   }\n * } the corresponding Parameter, and interface if it exists\n */\nmethods.getProducesParamFromOperation = (store, operation) => {\n  let produceInterface = null\n  let produceParam = null\n\n  if (!operation.produces && store.getIn([ 'parameter', 'globalProduces' ])) {\n    produceInterface = store.getIn([ 'interface', 'apiResponseMediaType' ]) || null\n    produceParam = new Reference({ type: 'parameter', uuid: 'globalProduces' })\n  }\n  else {\n    const produces = operation.produces || []\n    if (produces.length) {\n      produceParam = new Parameter({\n        uuid: 'Content-Type-header',\n        in: 'headers',\n        usedIn: 'response',\n        key: 'Content-Type',\n        name: 'Content Type Header',\n        description: 'describes the media type of the response',\n        type: 'string',\n        required: true,\n        constraints: List([\n          new Constraint.Enum(produces)\n        ])\n      })\n    }\n  }\n\n  return { produceParameter: produceParam, produceInterface: produceInterface }\n}\n\n/**\n * converts a Swagger location (for the `in` field of a parameter object) into a location in a\n * ParameterContainer.\n * @param {string} location: the location to convert\n * @returns {string?} the corresponding location in a ParameterContainer\n */\nmethods.mapParamLocationToParamContainerField = (location) => {\n  if (!location || typeof location !== 'string') {\n    return null\n  }\n\n  const mapping = {\n    path: 'path',\n    header: 'headers',\n    query: 'queries',\n    body: 'body',\n    formdata: 'body'\n  }\n\n  return mapping[location.toLowerCase()] || null\n}\n\n/**\n * adds a Parameter to a container based on the location of the parameter.\n * @param {Instance<ParameterContainer>} container: the parameter container instance to update.\n * @param {string} key: the key of the Entry of a Parameter\n * @param {Parameter} value: the Parameter to add to the container instance.\n * @returns {Instance<ParameterContainer>} the updated container\n *\n * NOTE: an Instance is very different from a record, as it is the mutable object passed to\n * instantiate the Record.\n */\nmethods.addParameterToContainerBlock = (container, { key, value }) => {\n  const containerKey = value.get('in')\n\n  if (container && container[containerKey] && typeof container[containerKey] === 'object') {\n    container[containerKey][key] = value\n  }\n\n  return container\n}\n\n/**\n * gets the value stored at a certain location, and returns it as an Entry.\n * @param {Store} store: the store to fetch the value from\n * @param {string} type: the type of the reference. Used to find the correct TypedStore\n * @param {string} key: the reference in the TypedStore\n * @returns {Entry<string, *>} the resolved value, as an Entry\n */\nmethods.resolveReferenceFromKey = (store, type, { key }) => ({\n  key,\n  value: store.getIn([ type, key ])\n})\n\n/**\n * adds a Reference to a resolved Parameter.\n * @param {Instance<ParameterContainer>} container: the container instance to add the Reference to.\n * @param {string} key: the reference of the resolved Parameter\n * @param {Parameter} value: the resolved Parameter, used to get the location of the Reference in\n * the ParameterContainer.\n * @returns {Instance<ParameterContainer>} the updated container instance\n *\n * NOTE: an Instance is very different from a record, as it is the mutable object passed to\n * instantiate the Record.\n */\nmethods.addReferenceToContainerBlock = (container, { key, value }) => {\n  const containerKey = value.get('in')\n\n  if (container && container[containerKey] && typeof container[containerKey] === 'object') {\n    container[containerKey][key] = new Reference({\n      type: 'parameter',\n      uuid: key\n    })\n  }\n\n  return container\n}\n\n/**\n * creates a ParameterContainer based on a list of parameters and references, wrt. a store.\n * @param {Store} store: the store to get shared values from.\n * @param {Array<Parameter>} params: the parameters to add to the ParameterContainer.\n * @param {Array<Entry<string, string>>} refs: the reference entries to add to the\n * ParameterContainer\n * @returns {ParameterContainer} the corresponding parameter container\n */\nmethods.createParameterContainer = (store = new Store(), params = [], refs = []) => {\n  let paramContainer = {\n    headers: {},\n    queries: {},\n    body: {},\n    path: {}\n  }\n\n  paramContainer = params.reduce(methods.addParameterToContainerBlock, paramContainer)\n\n  const resolveParameterReference = currify(methods.resolveReferenceFromKey, store, 'parameter')\n  paramContainer = refs\n    .map(resolveParameterReference)\n    .filter(({ value }) => !!value)\n    .reduce(methods.addReferenceToContainerBlock, paramContainer)\n\n  const paramContainerInstance = {\n    headers: new OrderedMap(paramContainer.headers),\n    queries: new OrderedMap(paramContainer.queries),\n    path: new OrderedMap(paramContainer.path),\n    body: new OrderedMap(paramContainer.body)\n  }\n\n  return new ParameterContainer(paramContainerInstance)\n}\n\n/**\n * creates an overlay for security requirements that need it (OAuth2)\n * @param {Auth} auth: the Auth to create an Overlay for\n * @param {Array<string>} scopes: the scopes to use for the Overlay\n * @returns {Auth?} the corresponding overlay, if it exists\n */\nmethods.getOverlayFromRequirement = (auth, scopes = []) => {\n  if (auth instanceof Auth.OAuth2 && scopes.length) {\n    return new Auth.OAuth2({\n      scopes: List(scopes.map(scope => ({ key: scope })))\n    })\n  }\n\n  return null\n}\n\n/**\n * creates an Auth from each security requirement.\n * @param {Store} store: the store in which the auths are saved.\n * @param {Array<SwaggerSecurityRequirementObject>} requirements: the list of security requirements.\n * @returns {List<Reference>}: the corresponding array of references to auth objects in the store.\n */\nmethods.getAuthReferences = (store, requirements = []) => {\n  const authReferences = requirements.map((req) => {\n    const $ref = Object.keys(req)[0]\n    const overlay = methods.getOverlayFromRequirement(store.getIn([ 'auth', $ref ]), req[$ref])\n    return new Reference({\n      type: 'auth',\n      uuid: $ref,\n      overlay\n    })\n  })\n\n  return List(authReferences)\n}\n\n/**\n * adds the consumes Parameter to an array of Parameter, if it exists.\n * @param {Store} store: the store in which a global consume Parameter may have been saved.\n * @param {SwaggerOperationObject} operation: the operation object in which there may be a consumes\n * field.\n * @param {Array<Parameter>} parameters: the array of Parameters to add the consume parameter to.\n * @param {Array<Reference>} references: the array of Reference to add the reference to the global\n * consume parameter to, if suited.\n * @returns {Array<Parameter>} the updated parameter array.\n */\nmethods.updateParamsWithConsumeParameter = (store, operation, parameters = [], references = []) => {\n  const {\n    consumeParameter,\n    consumeReference\n  } = methods.getConsumesParamFromOperation(store, operation)\n  if (consumeParameter) {\n    parameters.push({\n      key: consumeParameter.get('uuid'),\n      value: consumeParameter\n    })\n  }\n\n  if (consumeReference) {\n    references.push({\n      key: consumeReference.get('uuid'),\n      value: consumeReference\n    })\n  }\n\n  return [ parameters, references ]\n}\n\n/**\n * updates a Response Object to have a code field. Useful for shared response objects.\n * @param {string} key: the code of the Response object.\n * @param {SwaggerResponseObject} value: the response object to update.\n * @returns {Entry<string, SwaggerResponseObject>} the updated response object, as an Entry.\n */\nmethods.addCodeToResponseEntry = ({ key, value }) => {\n  value.code = key\n  return { key, value }\n}\n\n/**\n * updates the overlay of a ResponseReference to include the producesParameter.\n * @param {Parameter} producesParameter: the Parameter associated with the `produces` field.\n * @param {Entry<string, Reference>} entry: the reference to a shared response, as an Entry.\n * @returns {Entry<string, Reference>} the updated reference\n */\nmethods.updateResponseReferenceWithProduceParameter = (producesParameter, entry) => {\n  const overlay = entry.value.get('overlay')\n  if (!overlay) {\n    const overlayHeaders = {}\n    overlayHeaders[producesParameter.get('uuid')] = producesParameter\n    entry.value = entry.value.set('overlay', new Response({\n      parameters: new ParameterContainer({\n        headers: new OrderedMap(overlayHeaders)\n      })\n    }))\n  }\n  else {\n    const updatedOverlay = overlay.setIn(\n      [ 'parameters', 'headers', producesParameter.get('uuid') ],\n      producesParameter\n    )\n\n    entry.value = entry.value.set('overlay', updatedOverlay)\n  }\n\n  return entry\n}\n\n/**\n * updates a Response to include the producesParameter.\n * @param {Parameter} producesParameter: the Parameter associated with the `produces` field.\n * @param {Entry<string, Response>} entry: the response to update, as an Entry.\n * @returns {Entry<string, Response>} the updated response\n */\nmethods.updateResponseRecordWithProduceParameter = (producesParameter, entry) => {\n  if (producesParameter) {\n    entry.value = entry.value.setIn(\n      [ 'parameters', 'headers', producesParameter.get('uuid') ],\n      producesParameter\n    )\n  }\n\n  return entry\n}\n\n/**\n * updates Response Records as well as References to Response Records to take into account the\n * producesParameter.\n * @param {Parameter} producesParameter: the Parameter associated with the `produces` field.\n * @param {Entry<string, Response|Reference>} entry: the entry to update, be it either a response or\n * a reference.\n * @returns {Entry<string, Response|Reference>} the updated entry.\n */\nmethods.updateResponsesWithProduceParameter = (producesParameter, entry) => {\n  if (!producesParameter) {\n    return entry\n  }\n\n  if (entry.value instanceof Reference) {\n    return methods.updateResponseReferenceWithProduceParameter(producesParameter, entry)\n  }\n  else {\n    return methods.updateResponseRecordWithProduceParameter(producesParameter, entry)\n  }\n}\n\n/**\n * creates a list of Interfaces from a list of tags.\n * @param {Array<string>} tags: the list of tags to use for the interfaces.\n * @returns {OrderedMap<string, Interface>} the corresponding list of interfaces\n */\nmethods.getInterfacesFromTags = (tags = []) => {\n  const interfaces = tags.map(tag => {\n    return {\n      key: tag,\n      value: new Interface({\n        name: tag,\n        uuid: tag,\n        level: 'request'\n      })\n    }\n  }).reduce(convertEntryListInMap, {})\n\n  return OrderedMap(interfaces)\n}\n\n/**\n * creates a Reference to an endpoint, with an Overlay to update the protocol, if needed.\n * @param {SwaggerOperationObject} operation: the operation object that holds the schemes defined\n * for this operation.\n * @param {URL} value: the endpoint we are creating a reference to.\n * @param {string} key: the uuid reference to the endpoint in the store.\n * @returns {Reference} the corresponding reference.\n */\nmethods.addEndpointOverlayFromOperation = (operation, value, key) => {\n  const overlay = operation.schemes ? new URL({\n    variableDelimiters: List([ '{', '}' ])\n  }).set('protocol', List(operation.schemes.map(methods.addDotsToScheme))) : null\n  return new Reference({\n    type: 'endpoint',\n    uuid: key,\n    overlay\n  })\n}\n\n/**\n * tests whether a method can have a body.\n * @param {string} method: the method to test.\n * @returns {boolean} whether this method accepts a body or not.\n */\nmethods.isMethodWithBody = (method) => {\n  return [ 'post', 'put', 'patch', 'delete', 'options' ].indexOf(method) >= 0\n}\n\n/**\n * extracts the ParameterContainer from an operation object. it uses the the store to access the\n * globally defined parameters, and it uses the method name to determine whether to include the\n * globally defined consumes in a parameter, depending on the method.\n * @param {Store} store: the store that holds shared parameters\n * @param {SwaggerOperationObject} operation: the operation object to extract the parameters from\n * @param {string} method: the method of the operation object. used to eliminate consumes for `get`\n * operations, and the like.\n * @returns {ParameterContainer} the corresponding ParameterContainer\n */\nmethods.getParameterContainerForOperation = (store, operation, method) => {\n  /* eslint-disable prefer-const */\n  let {\n    parameters,\n    references\n  } = methods.getParametersAndReferencesFromParameterArray(operation.parameters || [])\n  /* eslint-enable prefer-const */\n  let params = parameters.map(methods.convertParameterObjectIntoParameter)\n\n  if (methods.isMethodWithBody(method)) {\n    [\n      params,\n      references\n    ] = methods.updateParamsWithConsumeParameter(store, operation, params, references)\n  }\n\n  const parameterContainer = methods.createParameterContainer(store, params, references)\n\n  return parameterContainer\n}\n\n/**\n * extracts the responses from an operation object. It uses the store to access the globally defined\n * responses and overlay them with information relevant to the operation object, like the produces\n * field.\n * @param {Store} store: the store frm which to get the shared responses\n * @param {SwaggerOperationObject} operation: the swagger operation object to extract the responses\n * from.\n * @returns {Map<string, Response|Reference>} the corresponding map of Responses or References to\n * Responses.\n */\nmethods.getResponsesForOperation = (store, operation) => {\n  const { produceParameter } = methods.getProducesParamFromOperation(store, operation)\n\n  const updateResponseEntryWithProduceParameter = currify(\n    methods.updateResponsesWithProduceParameter,\n    produceParameter\n  )\n\n  const responses = entries(operation.responses || {})\n    .map(methods.addCodeToResponseEntry)\n    .map(methods.convertResponseObjectIntoResponse)\n    .filter(v => !!v)\n    .map(updateResponseEntryWithProduceParameter)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return OrderedMap(responses)\n}\n\n/**\n * extracts the endpoints from an operation object. It uses the store to access the globally defined\n * endpoints and overlay them with information relevant to the operation object, like the schemes.\n * @param {Store} store: the store from which to get the shared endpoints\n * @param {SwaggerOperationObject} operation: the swagger operation object to extract the endpoints\n * from.\n * @returns {Map<string, Reference>} a list of potentially overlayed references.\n */\nmethods.getEndpointsForOperation = (store, operation) => {\n  const addOverlayToEndpoints = currify(methods.addEndpointOverlayFromOperation, operation)\n  const endpoints = store.get('endpoint').map(addOverlayToEndpoints)\n\n  return endpoints\n}\n\n/**\n * extracts the request Id from a swagger operation object. It maps to an operationId if it exists.\n * Otherwise, it generates a UUID.\n * @param {string?} operationId: the operationId to convert into a request id.\n * @returns {string} the extracted requestId\n */\nmethods.getRequestIdFromOperation = ({ operationId }) => {\n  return operationId || null\n}\n\n// TODO deal with externalDocs\n/* eslint-disable max-statements */\n/**\n * converts a Swagger Operation Object into a Request Record.\n * @param {Store} store: the store from which to get shared values that may be used by the Request.\n * @param {Array<SwaggerSecurityRequirementObject>} security: the global security requirements\n * @param {string} key: the method associated with this swagger Operation.\n * @param {SwaggerOperationObject} value: the operation object to convert.\n * @returns {Request} the corresponding request record.\n */\nmethods.convertOperationIntoRequest = (store, security, { key, value }) => {\n  const method = key\n  const operation = value\n  const { description, summary } = operation\n\n  const reqId = methods.getRequestIdFromOperation(operation)\n  const parameters = methods.getParameterContainerForOperation(store, operation, method)\n  const auths = methods.getAuthReferences(store, operation.security || security || [])\n  const responses = methods.getResponsesForOperation(store, operation)\n  const interfaces = methods.getInterfacesFromTags(operation.tags || [])\n  const endpoints = methods.getEndpointsForOperation(store, operation)\n\n  const requestInstance = {\n    id: reqId,\n    endpoints,\n    name: summary || null,\n    description: description || null,\n    method,\n    parameters,\n    auths,\n    responses,\n    interfaces\n  }\n\n  return { key: method, value: new Request(requestInstance) }\n}\n/* eslint-enable max-statements */\n\n/**\n * creates references for endpoints saved in a store.\n * @param {Store} store: the store to get the endpoints from.\n * @returns {OrderedMap<string, Reference>} the corresponding map of references\n */\nmethods.createReferencesForEndpoints = (store) => {\n  return store.get('endpoint').map((value, key) => {\n    return new Reference({\n      type: 'endpoint',\n      uuid: key\n    })\n  })\n}\n\n/**\n * extracts all Requests from a resource objects and store them in an Object.\n * @param {Store} store: the store to get shared objects from (endpoints, parameters, responses ...)\n * @param {Array<SwaggerSecurityRequirementObject>} security: the global security requirements\n * @param {SwaggerResourceObject} resourceObject: the resource object to extract the requests from\n * @returns {Object<string, Request>} the corresponding Requests, in an object.\n */\nmethods.getRequestsForResource = (store, security, resourceObject) => {\n  const $methods = methods.getMethodsFromResourceObject(resourceObject)\n  const params = resourceObject.parameters || []\n\n  const updateOperationObjects = currify(methods.updateOperationEntryWithSharedParameters, params)\n  const convertOperationIntoRequest = currify(methods.convertOperationIntoRequest, store, security)\n\n  const operations = $methods\n    .map(updateOperationObjects)\n    .map(convertOperationIntoRequest)\n    .reduce(convertEntryListInMap, {})\n\n  return operations\n}\n\n/**\n * updates the path endpoint from the Resource with pathParameters from its swagger operations\n * @param {Store} store: the store to get the parameters from.\n * @param {URL} path: the path endpoint of the Resource\n * @param {Entry} entry: a operation object, as an entry\n * @returns {URL} the updated path endpoint\n */\nmethods.updatePathWithParametersFromOperations = (store, path, { key, value } = {}) => {\n  if (!key && !value) {\n    return path\n  }\n\n  const container = methods.getParameterContainerForOperation(store, value, key)\n  const pathParams = container.get('path')\n\n  if (!pathParams.size || path.getIn([ 'pathname', 'parameter', 'superType' ]) !== 'sequence') {\n    return path\n  }\n\n  const $value = path.getIn([ 'pathname', 'parameter', 'value' ]).map(param => {\n    return pathParams\n      .filter(pathParam => pathParam.get('key') === param.get('key'))\n      .valueSeq()\n      .get(0) || param\n  })\n\n  return path.setIn([ 'pathname', 'parameter', 'value' ], $value)\n}\n\n/**\n * converts a Swagger Resource Object into a Resource Record.\n * @param {Store} store: the store from which to get the possibly shared resources relevant to this\n * Resource.\n * @param {Array<SwaggerSecurityRequirementObject>} security: the global security requirements\n * @param {SwaggerPathObject} paths: the paths of a swagger object.\n * @param {string} path: the path of the swagger resource object.\n * @returns {Resource} the corresponding Resource.\n *\n * FIXME: we assume all external references are resolved.\n * TODO: support $ref for swagger path Items (i.e. this can be a $ref)\n * TODO: transform path into SequenceParameter <- URL\n */\nmethods.getResource = (store, security, paths, path) => {\n  const resourceObject = paths[path]\n  const $methods = methods.getMethodsFromResourceObject(resourceObject)\n\n  const operations = methods.getRequestsForResource(store, security, resourceObject)\n  const endpoints = methods.createReferencesForEndpoints(store)\n  const $path = new URL({\n    url: path,\n    variableDelimiters: List([ '{', '}' ])\n  })\n\n  const updatedPath = methods.updatePathWithParametersFromOperations(store, $path, $methods[0])\n\n  const resourceInstance = {\n    path: updatedPath,\n    endpoints,\n    uuid: path,\n    methods: Map(operations)\n  }\n\n  return new Resource(resourceInstance)\n}\n\n/**\n * converts the swagger path object into a map of Resources.\n * @param {Store} shared: the store in which shared objects are stored.\n * @param {SwaggerObject} swagger: the swagger file to conver the path objects from.\n * @returns {OrderedMap<string, Resource>} the corresponding Map of Resources\n */\nmethods.getResources = (shared, { paths = {}, security = null } = {}) => {\n  const $paths = Object.keys(paths)\n\n  const resourceConverter = currify(methods.getResource, shared, security, paths)\n  const resources = $paths.map(resourceConverter)\n\n  const resourceMap = resources.reduce((acc, resource) => {\n    const key = resource.get('uuid')\n    acc[key] = resource\n    return acc\n  }, {})\n\n  return new OrderedMap(resourceMap)\n}\n\n/**\n * adds dots to schemes that are missing them\n * @param {string} scheme: the scheme to add dots to.\n * @returns {string} the updated schemes with dots at the end\n */\nmethods.addDotsToScheme = (scheme) => {\n  if (scheme.lastIndexOf(':') !== scheme.length - 1) {\n    return scheme + ':'\n  }\n\n  return scheme\n}\n\n/**\n * returns the list of shared endpoints in the swagger file (in v2, it's the combination of\n * protocol, host, and basePath)\n * @param {List<string>} schemes: the list of protocols supported by the API\n * @param {string} host: the reference host for the API.\n * @param {string} basePath: a path that acts as a prefix to the paths of each resources in the API.\n * @returns {List<URL>} a List that contains all the shared endpoints\n */\nmethods.getSharedEndpoints = ({\n  schemes = [ 'http' ],\n  host = 'localhost',\n  basePath = '/'\n} = {}) => {\n  const secure = schemes.filter(scheme => scheme.match(/[^w]s:?$/)).length > 0\n  const protocol = schemes[0]\n  const url = format({ protocol, host, pathname: basePath })\n  const uuid = 'base'\n  const variableDelimiters = List([ '{', '}' ])\n\n  let endpoint = new URL({ url, uuid, secure, variableDelimiters })\n  endpoint = endpoint.set('protocol', List(schemes.map(methods.addDotsToScheme)))\n\n  const endpoints = {}\n  endpoints[uuid] = endpoint\n\n  return endpoints\n}\n\n/**\n * extracts the Parameter and Interface that represent the Content-Type of requests in the API.\n * @param {List<string>} contentTypes: a list of contentTypes that every resource uses or overrides.\n * @returns {Object} an Object that contains the Parameters and Interfaces generated in two separate\n * fields.\n */\nmethods.getParamsFromConsumes = (contentTypes = []) => {\n  if (contentTypes.length === 0) {\n    return {\n      consumesParams: {},\n      consumeInterfaces: {}\n    }\n  }\n\n  const uuid = 'globalConsumes'\n  const consumeInterface = new Interface({\n    name: 'apiRequestMediaType',\n    uuid: 'apiRequestMediaType',\n    level: 'request',\n    description: 'defines the common media type of requests in the API.'\n  })\n\n  const param = new Parameter({\n    uuid,\n    in: 'headers',\n    key: 'Content-Type',\n    name: 'Content Type Header',\n    description: 'describes the media type of the request',\n    type: 'string',\n    required: true,\n    constraints: List([\n      new Constraint.Enum(contentTypes)\n    ]),\n    interfaces: Map({\n      apiRequestMediaType: new Reference({\n        type: 'interface',\n        uuid: 'apiRequestMediaType'\n      })\n    })\n  })\n\n  const consumes = {}\n  consumes[uuid] = param\n\n  return {\n    consumesParams: consumes,\n    consumeInterfaces: {\n      apiRequestMediaType: consumeInterface\n    }\n  }\n}\n\n/**\n * extracts the Parameter and Interface that represent the Content-Type of responses in the API.\n * @param {List<string>} contentTypes: a list of contentTypes that every resource uses or overrides.\n * @returns {Object} an Object that contains the Parameters and Interfaces generated in two separate\n * fields.\n */\nmethods.getParamsFromProduces = (contentTypes = []) => {\n  if (contentTypes.length === 0) {\n    return {\n      consumesParams: {},\n      consumeInterfaces: {}\n    }\n  }\n\n  const uuid = 'globalProduces'\n  const produceInterface = new Interface({\n    name: 'apiResponseMediaType',\n    uuid: 'apiResponseMediaType',\n    level: 'response',\n    description: 'defines the common media type of responses in the API.'\n  })\n\n  const param = new Parameter({\n    uuid,\n    in: 'headers',\n    usedIn: 'response',\n    key: 'Content-Type',\n    name: 'Content Type Header',\n    description: 'describes the media type of the response',\n    type: 'string',\n    required: true,\n    constraints: List([\n      new Constraint.Enum(contentTypes)\n    ]),\n    interfaces: Map({\n      apiResponseMediaType: new Reference({\n        type: 'interface',\n        uuid: 'apiResponseMediaType'\n      })\n    })\n  })\n\n  const produces = {}\n  produces[uuid] = param\n\n  return {\n    producesParams: produces,\n    produceInterfaces: {\n      apiResponseMediaType: produceInterface\n    }\n  }\n}\n\n/**\n * converts a key value pair into a constraint with the help of the initial parameter if necessary,\n * like with exclusiveMinimum\n * @param {SwaggerParameterObject} param: the swagger parameter object we are extracting constraints\n * from.\n * @param {string} key: the name of the field we are evaluating\n * @param {any} value: the value of param[key]\n * @returns {Constraint<*>} the corresponding constraint\n */\nmethods.formatConstraint = (param, { key, value }) => {\n  if (key === 'exclusiveMinimum') {\n    return value ?\n      new Constraint.ExclusiveMinimum(param.minimum) :\n      new Constraint.Minimum(param.minimum)\n  }\n\n  if (key === 'exclusiveMaximum') {\n    return value ?\n      new Constraint.ExclusiveMaximum(param.maximum) :\n      new Constraint.Maximum(param.maximum)\n  }\n\n  const simpleConstraints = {\n    minimum: Constraint.Minimum,\n    maximum: Constraint.Maximum,\n    multipleOf: Constraint.MultipleOf,\n    minLength: Constraint.MinimumLength,\n    maxLength: Constraint.MaximumLength,\n    pattern: Constraint.Pattern,\n    minItems: Constraint.MinimumItems,\n    maxItems: Constraint.MaximumItems,\n    uniqueItems: Constraint.UniqueItems,\n    enum: Constraint.Enum,\n    schema: Constraint.JSONSchema\n  }\n\n  if (simpleConstraints[key]) {\n    return new simpleConstraints[key](value)\n  }\n\n  const unknownConstraint = {}\n  unknownConstraint[key] = value\n\n  return new Constraint.JSONSchema(unknownConstraint)\n}\n\n/**\n * checks whether the key of a key-value pair is a constraint.\n * @param {string} key: the key to test\n * @returns {boolean} true if it is a constraint, false otherwise\n */\nmethods.filterConstraintEntries = ({ key }) => {\n  return [\n    'minimum', 'maximum', 'exclusiveMinimum', 'exclusiveMaximum', 'multipleOf',\n    'minLength', 'maxLength', 'pattern',\n    'minItems', 'maxItems', 'uniqueItems',\n    'enum', 'schema'\n  ].indexOf(key) >= 0\n}\n\n/**\n * creates a List of Constraints out of a parameter.\n * @param {SwaggerParameterObject} parameter: the parameter to extract the constraints of\n * @returns {List<Constraint<*>>} the list of constraints the parameter imposes\n */\nmethods.getConstraintsFromParam = (parameter) => {\n  const paramEntries = entries(parameter)\n\n  const formatConstraints = currify(methods.formatConstraint, parameter)\n\n  const constraints = paramEntries\n    .filter(methods.filterConstraintEntries)\n    .map(formatConstraints)\n\n  return List(constraints)\n}\n\n/**\n * extracts applicableContexts from a SwaggerParameter location value\n * @param {string} location: the location of a swagger parameter\n * @returns {List<Parameter>} the corresponding applicableContexts\n */\nmethods.getApplicableContextsFromLocation = (location) => {\n  if (location !== 'formData') {\n    return List()\n  }\n\n  return List([\n    new Parameter({\n      key: 'Content-Type',\n      in: 'headers',\n      constraints: List([\n        new Constraint.Enum([\n          'application/x-www-form-urlencoded',\n          'multipart/form-data'\n        ])\n      ])\n    })\n  ])\n}\n\n/* eslint-disable max-statements */\n/**\n * converts a swagger parameter object into a Parameter Object\n * @param {Entry<string, SwaggerParameterObject>} parameterEntry: the entry to convert\n * @returns {Entry<string, Parameter>} a Parameter, stored in an entry format for easier\n * manipulation\n * TODO: Deal with file type appropriately\n * TODO: Deal with format metadata\n */\nmethods.convertParameterObjectIntoParameter = (parameterEntry) => {\n  const uuid = parameterEntry.key\n  const parameter = parameterEntry.value || {}\n\n  const { name, description, required, type } = parameter\n  const constraints = methods.getConstraintsFromParam(parameter)\n  const location = methods.mapParamLocationToParamContainerField(parameter.in)\n  const applicableContexts = methods.getApplicableContextsFromLocation(parameter.in)\n\n  const paramInstance = {\n    uuid,\n    in: location,\n    default: parameter.default || null,\n    key: parameter.in !== 'body' ? name || null : null,\n    name: name || null,\n    description: description || null,\n    required: required || false,\n    type: type || null,\n    constraints,\n    applicableContexts\n  }\n\n  if (parameter.type === 'array' && parameter.items) {\n    const { value } = methods.convertParameterObjectIntoParameter({\n      key: null,\n      value: parameter.items\n    })\n    paramInstance.value = value\n  }\n\n  const param = new Parameter(paramInstance)\n\n  return {\n    key: uuid,\n    value: param\n  }\n}\n/* eslint-enable max-statements */\n\n/**\n * converts a List of entries of swagger parameters into a map of Parameters using the entry key\n * as keys in the map.\n * @param {List<Entry<string, SwaggerParameterObject>>} parameters: the list of parameters to\n * convert, passed in an Entry format\n * @returns {Object<string, Parameter>} the corresponding list of Parameters\n */\nmethods.convertParameterObjectArrayIntoParameterMap = (parameters = []) => {\n  const paramMap = parameters\n    .map(methods.convertParameterObjectIntoParameter)\n    .reduce(convertEntryListInMap, {})\n\n  return paramMap\n}\n\n/**\n * extracts all globally shared Parameters in the swagger file. This checks for the consumes and\n * produces fields at the root level, as well as for the root level parameter field.\n * @param {List<string>} consumes: the content of the consumes fields, if it exists.\n * @param {List<string>} produces: the content of the produces fields, if it exists.\n * @param {Object<string, SwaggerParameterObject>} parameters: the content of the prameters field,\n * if it exists.\n * @returns {{parameters: Object<string, Parameter>, interfaces: Object<string, Interface>}} the\n * extracted shared parameters, as well as the shared Interfaces they implement\n */\nmethods.getSharedParameters = ({ consumes = [], produces = [], parameters = {} } = {}) => {\n  const { consumesParams, consumeInterfaces } = methods.getParamsFromConsumes(consumes)\n  const { producesParams, produceInterfaces } = methods.getParamsFromProduces(produces)\n  const sharedParams = methods.convertParameterObjectArrayIntoParameterMap(entries(parameters))\n\n  return {\n    sharedParameters: {\n      ...consumesParams, ...producesParams, ...sharedParams\n    },\n    parameterInterfaces: {\n      ...consumeInterfaces, ...produceInterfaces\n    }\n  }\n}\n\n/**\n * creates a Parameter with a JSON Schema as a Constraint and returns it in Entry format.\n * @param {Schema} schema: the JSON Schema to use\n * @returns {Entry<string, Parameter>} the Parameter, in Entry format\n */\nmethods.convertSchemaIntoParameterEntry = (schema) => {\n  const paramEntry = {\n    key: 'body',\n    value: new Parameter({\n      uuid: 'body',\n      usedIn: 'response',\n      constraints: new List([\n        new Constraint.JSONSchema(schema)\n      ])\n    })\n  }\n\n  return paramEntry\n}\n\n/**\n * updates a Parameter to state that it is used in the response, instead of the request (for shared\n * parameters)\n * @param {Parameter} param: the parameter to update\n * @returns {Parameter} the updated parameter\n */\nmethods.addUsedInResponseToParam = (param) => {\n  if (param instanceof Parameter) {\n    return param.set('usedIn', 'response')\n  }\n  return param\n}\n\n/**\n * creates a ParameterContainer from a swagger Response Object\n * @param {Schema} schema?: the JSON Schema of the Response Object, if it exists\n * @param {Object<string, HeaderObject>} headers: a map of headers used by the Response Object\n * @returns {ParameterContainer} the corresponding ParameterContainer, that has the schema saved in\n * the body field, and the header params in the header field\n */\nmethods.createResponseParameterContainer = ({ schema, headers }) => {\n  const containerInstance = {}\n\n  if (schema) {\n    const bodyEntry = methods.convertSchemaIntoParameterEntry(schema)\n    containerInstance.body = OrderedMap(convertEntryListInMap({}, bodyEntry))\n  }\n  else {\n    containerInstance.body = OrderedMap()\n  }\n\n  if (headers) {\n    const headerMap = methods.convertParameterObjectArrayIntoParameterMap(entries(headers))\n    containerInstance.headers = OrderedMap(headerMap).map(methods.addUsedInResponseToParam)\n  }\n  else {\n    containerInstance.header = OrderedMap()\n  }\n\n  return new ParameterContainer(containerInstance)\n}\n\n/**\n * converts an Entry-formatted Response Object into an Entry-format Response Record.\n * @param {string} key: the key of the Entry\n * @param {SwaggerResponseObject} value: the response object to convert\n * @returns {Entry<string, Response>} the corresponding Entry-formatted Response Record\n *\n * TODO: what about uuid ? should it be '#/responses/' +... like for parameters ?\n */\nmethods.convertResponseObjectIntoResponse = ({ key, value }) => {\n  if (value.$ref) {\n    const overlay = value.code ? new Response({ code: value.code }) : null\n    return {\n      key,\n      value: new Reference({\n        type: 'response',\n        uuid: value.$ref,\n        overlay\n      })\n    }\n  }\n\n  const container = methods.createResponseParameterContainer(value)\n  const responseInstance = {\n    code: value.code || null,\n    description: value.description || null,\n    parameters: container\n  }\n\n  const response = new Response(responseInstance)\n\n  return { key, value: response }\n}\n\n/**\n * converts a Swagger Response Definitions Object into a Map of Responses.\n * @param {SwaggerDefinitionsResponseObject} responses: a dictionary of responses to convert\n * @returns {Object<string, Response>} the corresponding Map of Response Record\n */\nmethods.getSharedResponses = ({ responses = {} } = {}) => {\n  return entries(responses)\n    .map(methods.convertResponseObjectIntoResponse)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * finds the type of authentication method\n * @param {SwaggerAuthObject} auth: the auth to find the type of\n * @returns {string} the type of auth.\n */\nmethods.getAuthType = (auth = {}) => auth.type || null\n\n/**\n * adds an Interface to an authInstance\n * @param {AuthSpec} authInstance: the authInstance to update\n * @param {Interface} $interface: the interface to add\n * @returns {AuthSpec} the updated authInstance\n */\nmethods.addInterfaceToAuthInstance = (authInstance, $interface) => {\n  const interfaces = {}\n  interfaces[$interface.get('name')] = $interface\n  authInstance.interfaces = new Map(interfaces)\n\n  return authInstance\n}\n\n/**\n * converts a Swagger Security Definition into a BasicAuth, including the potential interface it\n * implements.\n * @param {Interface?} interfaceUsingAuth: the Interface to apply, if it exists\n * @param {string} key: the key of the entry. Used to save the auth name\n * @param {string} description?: the description of the authentication, if it exists.\n * @returns {BasicAuth} the corresponding BasicAuth\n */\nmethods.convertBasicAuth = (interfaceUsingAuth, key, { description = null } = {}) => {\n  let authInstance = { description, authName: key }\n\n  if (interfaceUsingAuth) {\n    authInstance = methods.addInterfaceToAuthInstance(authInstance, interfaceUsingAuth)\n  }\n\n  return new Auth.Basic(authInstance)\n}\n\n/**\n * converts a Swagger Security Definition into a ApiKeyAuth, including the potential interface it\n * implements.\n * @param {Interface?} interfaceUsingAuth: the Interface to apply, if it exists\n * @param {string} key: the key of the entry. Used to save the auth name\n * @param {SwaggerSecurityDefinition} auth: the auth to convert\n * @returns {ApiKeyAuth} the corresponding ApiKeyAuth\n */\nmethods.convertApiKeyAuth = (interfaceUsingAuth, key, auth = {}) => {\n  const { description = null, name = null } = auth\n  let authInstance = { description, name, in: auth.in || null, authName: key }\n\n  if (interfaceUsingAuth) {\n    authInstance = methods.addInterfaceToAuthInstance(authInstance, interfaceUsingAuth)\n  }\n\n  return new Auth.ApiKey(authInstance)\n}\n\n/**\n * converts a Swagger Security Definition into an OAuth2Auth, including the potential interface it\n * implements.\n * @param {Interface?} interfaceUsingAuth: the Interface to apply, if it exists\n * @param {string} key: the key of the entry. Used to save the auth name\n * @param {SwaggerSecurityDefinition} auth: the auth to convert\n * @returns {OAuth2Auth} the corresponding OAuth2Auth\n *\n * TODO: fix scopes\n */\nmethods.convertOAuth2Auth = (interfaceUsingAuth, key, auth = {}) => {\n  const { description = null, flow = null, authorizationUrl = null, tokenUrl = null } = auth\n  const scopes = List(entries(auth.scopes || {}))\n  let authInstance = { description, flow, authorizationUrl, tokenUrl, scopes, authName: key }\n\n  if (interfaceUsingAuth) {\n    authInstance = methods.addInterfaceToAuthInstance(authInstance, interfaceUsingAuth)\n  }\n\n  return new Auth.OAuth2(authInstance)\n}\n\n/**\n * converts an Entry-formatted Security Definition Object into an Entry-formatted Auth Record,\n * taking into account the potential Interface this Auth Record implements.\n * @param {Object<string, Interface>} interfaces: a map of interfaces an Auth Record may implement.\n * @param {string} key: the key of the Entry\n * @param {SwaggerSecurityDefinitionObject} value: the auth object to convert\n * @returns {Entry<string, Auth?>} the corresponding Entry-formatted Auth Record\n */\nmethods.convertAuthObjectIntoAuth = (interfaces, { key, value }) => {\n  const authType = methods.getAuthType(value)\n\n  const authConverterMap = {\n    basic: methods.convertBasicAuth,\n    apiKey: methods.convertApiKeyAuth,\n    oauth2: methods.convertOAuth2Auth\n  }\n\n  if (authConverterMap[authType]) {\n    const interfaceUsingAuth = interfaces[key]\n    const auth = authConverterMap[authType](interfaceUsingAuth, key, value)\n\n    return { key, value: auth }\n  }\n\n  return { key, value: null }\n}\n\n/**\n * converts a swagger Security Definitions Object into a map of Auth Record,\n * taking into account the potential Interface this Auth Record implements.\n * @param {Object<string, Interface>} interfaces: a map of interfaces an Auth Record may implement.\n * @param {SwaggerSecurityDefinitionsObject} securityDefinitions: a map of security definitions to\n * convert in Auths.\n * @returns {Object<string, Auth?>} the corresponding map of Auth Record\n */\nmethods.getSharedAuths = (interfaces, { securityDefinitions }) => {\n  const convertAuthObjectEntryIntoAuth = currify(\n    methods.convertAuthObjectIntoAuth,\n    interfaces\n  )\n  return entries(securityDefinitions)\n    .map(convertAuthObjectEntryIntoAuth)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * converts an Entry-formatted Security Requirement into an Entry-formatted Interface\n * @param {string} key: the key of the Security Requirement Entry\n * @returns {Entry<string, Interface>} the corresponding Entry-formatted Interface\n */\nmethods.convertSecurityRequirementEntryIntoInterfaceEntry = ({ key, value }) => {\n  const underlay = value && value.length ?\n    new Auth.OAuth2({\n      scopes: List(value.map(scope => ({ key: scope, value: '' })))\n    }) :\n    null\n\n  return {\n    key,\n    value: new Interface({\n      name: key,\n      uuid: key,\n      level: 'auth',\n      underlay\n    })\n  }\n}\n\n/**\n * converts a swagger Security Requirement Object into a map of Interfaces\n * @param {SwaggerSecurityRequirementObject} security: the security requirement object to convert\n * @returns {Object<string, Interface>} the corresponding map of Interfaces\n *\n * TODO: overlayed values of interfaces are not saved at the moment\n */\nmethods.getSharedAuthInterfaces = ({ security = [] } = {}) => {\n  return security\n    .map(methods.convertSecurityRequirementEntryIntoInterfaceEntry)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * converts a JSONSchema into a Constraint Entry\n * @param {Entry<string, JSONSchema>} entry: the JSONSchema entry to convert\n * @returns {Entry<string, Constraint>} the corresponding Constraint entry\n */\nmethods.convertDefinitionIntoConstraint = ({ key, value }) => {\n  return { key, value: new Constraint.JSONSchema(value) }\n}\n\n/**\n * extracts shared Constraints from a SwaggerDefinitionsObject\n * @param {SwaggerObject} swagger: the object to extract the definitions from\n * @param {SwaggerDefinitionsObject} swagger.definitions: the definitions to convert into a\n * TypedStoreInstance\n * @returns {Object<string, Constraint>} the corresponding TypedStoreInstance for constraints\n */\nmethods.getSharedConstraints = ({ definitions = {} } = {}) => {\n  return entries(definitions)\n    .map(methods.convertDefinitionIntoConstraint)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts tags from all the operation objects associated with a resource.\n * @param {Object} entry: the entry holding the resource\n * @param {SwaggerResourceObject} entry.value: the resource from which to exptract the tags\n * @returns {Array<string>} an array of string containing all the tags this resource contains. Tags\n * can be duplicate.\n */\nmethods.extractTagsFromPathObject = ({ value: resource }) => {\n  return methods.getMethodsFromResourceObject(resource)\n    .map(({ value: operation }) => operation.tags || [])\n    .reduce(flatten, [])\n}\n\n/**\n * extracts tags from all the operation objects associated with all the resources of a swagger file.\n * @param {SwaggerObject} swagger: the swagger file from which to get all the resources\n * @param {SwaggerPathObject} swagger.paths: the object containing all the resources in a swagger\n * file.\n * @returns {Array<string>} an array of string containing all the tags this swagger file contains.\n * Tags can be duplicate.\n */\nmethods.extractTagsFromPathsObject = ({ paths = {} } = {}) => {\n  const tags = entries(paths)\n    .map(methods.extractTagsFromPathObject)\n    .reduce(flatten, [])\n\n  return tags\n}\n\n/**\n * converts a tag string into an interface representing the tag\n * @param {string} tag: the tag string to convert\n * @returns {Entry<string, Interface>} the corresponding Interface, as an entry.\n */\nmethods.convertTagStringIntoInterfaceEntry = (tag) => {\n  return {\n    key: tag,\n    value: new Interface({\n      name: tag,\n      uuid: tag,\n      level: 'request'\n    })\n  }\n}\n\n/**\n * creates shared tag Interfaces from a SwaggerObject\n * @param {SwaggerObject} swagger: the swagger object to extract the shared tags from\n * @returns {Object<string, Interface>} the corresponding TypedStoreInstance for interfaces\n */\nmethods.getTagInterfaces = (swagger) => {\n  const tags = methods.extractTagsFromPathsObject(swagger)\n  const tagSet = Array.from(new Set(tags))\n  return tagSet\n    .map(methods.convertTagStringIntoInterfaceEntry)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * creates a store holding shared objects.\n * @param {SwaggerObject} swagger: the swagger file to extract the shared object from.\n * @returns {Store} a store holding all globally shared objects.\n */\nmethods.getSimpleStore = (swagger = {}) => {\n  const sharedEndpoints = methods.getSharedEndpoints(swagger)\n  const sharedConstraints = methods.getSharedConstraints(swagger)\n  const { sharedParameters, parameterInterfaces } = methods.getSharedParameters(swagger)\n  const sharedResponses = methods.getSharedResponses(swagger)\n  const authInterfaces = methods.getSharedAuthInterfaces(swagger)\n  const sharedAuths = methods.getSharedAuths(authInterfaces, swagger)\n  const tagInterfaces = methods.getTagInterfaces(swagger)\n\n  const interfaces = { ...parameterInterfaces, ...authInterfaces, ...tagInterfaces }\n  return new Store({\n    endpoint: new OrderedMap(sharedEndpoints),\n    constraint: new OrderedMap(sharedConstraints),\n    parameter: new OrderedMap(sharedParameters),\n    response: new OrderedMap(sharedResponses),\n    auth: new OrderedMap(sharedAuths),\n    interface: new OrderedMap(interfaces)\n  })\n}\n\n/**\n * creates a Group holding the (flat) architecture of the Api doc.\n * @param {Object<string, SwaggerPathItemObject>} paths: the object to get the structure of.\n * @returns {Group} the corresponding group.\n *\n * TODO: improve that\n */\nmethods.getGroup = ({ paths }) => {\n  const children = entries(paths).map(({ key }) => {\n    return { key, value: key }\n  }).reduce(convertEntryListInMap, {})\n\n  return new Group({\n    id: null,\n    name: null,\n    description: 'All the requests',\n    children: new OrderedMap(children)\n  })\n}\n\n/**\n * creates an Api object based on the swagger object\n * @param {SwaggerObject} swagger: the swagger object to convert\n * @param {string?} url: the url we got the swagger file from, if we got it from remote\n * @returns {Api} the corresponding Api Record\n */\nmethods.createApi = (swagger = {}) => {\n  const info = methods.getInfo(swagger.info)\n  const store = methods.getSimpleStore(swagger)\n  const resources = methods.getResources(store, swagger)\n  const group = methods.getGroup(swagger)\n\n  const apiInstance = { info, store, resources, group }\n\n  return new Api(apiInstance)\n}\n\n/**\n * converts the content of a swagger file in an Api\n * @param {string} content: the content of the swagger file\n * @param {string} url?: the url of the swagger file, if it was loaded from a remote location\n * @param {Object} file?: an object representing the location of the file if it was loaded\n * locally. example of file object: { path: 'someAbsolutePath', name: 'someFileName'}\n * @returns {Api} the Api Record corresponding to the swagger file\n */\nmethods.parse = ({ options, item: swagger }) => {\n  if (!methods.isSwagger(swagger)) {\n    return methods.handleInvalidSwagger()\n  }\n\n  const api = methods.createApi(swagger)\n  return { options, api }\n}\n\nexport const __internals__ = methods\nexport default SwaggerParser\n"
  },
  {
    "path": "src/parsers/swagger/v2.0/__tests__/Parser.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { List, Map, OrderedMap } from 'immutable'\n\nimport Contact from '../../../../models/Contact'\nimport License from '../../../../models/License'\nimport Info from '../../../../models/Info'\nimport Api from '../../../../models/Api'\nimport Reference from '../../../../models/Reference'\nimport Store from '../../../../models/Store'\nimport Parameter from '../../../../models/Parameter'\nimport Constraint from '../../../../models/Constraint'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Auth from '../../../../models/Auth'\nimport Response from '../../../../models/Response'\nimport Interface from '../../../../models/Interface'\nimport URL from '../../../../models/URL'\nimport Request from '../../../../models/Request'\nimport Resource from '../../../../models/Resource'\nimport Group from '../../../../models/Group'\n\nimport Parser, { __internals__ } from '../Parser'\n\ndescribe('parsers/swagger/v2.0/Parser.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Parser }', () => {\n    describe('@detect', () => {\n      it('should call __internals__.detect', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const actual = Parser.detect()\n\n        expect(__internals__.detect).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.detect with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'detect').andReturn(expected)\n\n        const input = '1235124125412'\n        const actual = Parser.detect(input)\n\n        expect(__internals__.detect).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@getAPIName', () => {\n      it('should call __internals__.getAPIName', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const actual = Parser.getAPIName()\n\n        expect(__internals__.getAPIName).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.getAPIName with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'getAPIName').andReturn(expected)\n\n        const input = '1235124125412'\n        const actual = Parser.getAPIName(input)\n\n        expect(__internals__.getAPIName).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@parse', () => {\n      it('should call __internals__.parse', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const actual = Parser.parse()\n\n        expect(__internals__.parse).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.parse with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'parse').andReturn(expected)\n\n        const input = {\n          content: '...some swagger file'\n        }\n\n        const actual = Parser.parse(input)\n\n        expect(__internals__.parse).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@parse', () => {\n    it('should call isSwagger', () => {\n      spyOn(__internals__, 'isSwagger').andReturn(false)\n\n      const item = {\n        content: 'some content'\n      }\n\n      const input = { item }\n\n      try {\n        __internals__.parse(input)\n      }\n      catch (e) {\n        // do nothing\n      }\n\n      expect(__internals__.isSwagger).toHaveBeenCalledWith(item)\n    })\n\n    it('should call handleInvalidSwagger if isSwagger returns false', () => {\n      spyOn(__internals__, 'isSwagger').andReturn(false)\n      spyOn(__internals__, 'handleInvalidSwagger').andReturn(null)\n\n      const item = {\n        content: 'some content'\n      }\n      const input = { item }\n\n      try {\n        __internals__.parse(input)\n      }\n      catch (e) {\n        // do nothing\n      }\n\n      expect(__internals__.handleInvalidSwagger).toHaveBeenCalled()\n    })\n\n    it('should call createApi otherwise', () => {\n      const parsed = 1234\n\n      spyOn(__internals__, 'isSwagger').andReturn(true)\n      spyOn(__internals__, 'createApi').andReturn(parsed)\n\n      const item = {\n        content: 'some content'\n      }\n      const options = { test: 123, other: 234 }\n      const input = { options, item }\n\n      const expected = { options, api: parsed }\n      const actual = __internals__.parse(input)\n\n      expect(__internals__.createApi).toHaveBeenCalledWith(item)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@parseJSONorYAML', () => {\n    it('should parse JSON', () => {\n      const jsonInput = {\n        some: 'object',\n        other: 'field'\n      }\n\n      const input = JSON.stringify(jsonInput)\n      const expected = jsonInput\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should parse YAML', () => {\n      const input = `\n        types:\n          User:\n            type: object\n      `\n\n      const expected = {\n        types: {\n          User: {\n            type: 'object'\n          }\n        }\n      }\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null otherwise', () => {\n      const input = `{\n        !Yaml.Or.JSON\n      }`\n\n      const expected = null\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@handleUnkownFormat', () => {\n    it('should throw a SyntaxError', () => {\n      try {\n        __internals__.handleUnkownFormat()\n        expect(true).toEqual(false)\n      }\n      catch (e) {\n        expect(e).toBeA(SyntaxError)\n      }\n    })\n  })\n\n  describe('@isSwagger', () => {\n    it('should return true for a valid input', () => {\n      const input = {\n        swagger: '2.0',\n        info: {\n          title: 'some title'\n        },\n        paths: {}\n      }\n\n      const expected = true\n      const actual = __internals__.isSwagger(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false for an invalid input', () => {\n      const input = {\n        swagger: '2.0',\n        info: {\n          title: 'some title'\n        }\n        // missing paths object\n      }\n\n      const expected = false\n      const actual = __internals__.isSwagger(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@handleInvalidSwagger', () => {\n    it('should throw a SyntaxError', () => {\n      try {\n        __internals__.handleInvalidSwagger()\n        expect(true).toEqual(false)\n      }\n      catch (e) {\n        expect(e).toBeA(TypeError)\n      }\n    })\n  })\n\n  describe('@formatDetectionObject', () => {\n    it('should work', () => {\n      const score = 1241251\n\n      const expected = [ { version: 'v2.0', format: 'swagger', score } ]\n      const actual = __internals__.formatDetectionObject(score)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with default score', () => {\n      const expected = [ { version: 'v2.0', format: 'swagger', score: 0 } ]\n      const actual = __internals__.formatDetectionObject()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@detect', () => {\n    it('should call parseJSONorYAML', () => {\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(null)\n\n      const input = 'some random input'\n      __internals__.detect(input)\n\n      expect(__internals__.parseJSONorYAML).toHaveBeenCalledWith(input)\n    })\n\n    it('should call formatDetectionObject', () => {\n      const expected = 12313\n      spyOn(__internals__, 'formatDetectionObject').andReturn(expected)\n\n      const input = 'some random input'\n      const actual = __internals__.detect(input)\n\n      expect(__internals__.formatDetectionObject).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 0 if parseJSONorYAML returns null', () => {\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(null)\n      spyOn(__internals__, 'formatDetectionObject').andCall((score) => score)\n\n      const input = 'some random input'\n      const expected = 0\n      const actual = __internals__.detect(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 0.25 if v1.2', () => {\n      const parsed = { swagger: '1.2', apis: [] }\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(parsed)\n      spyOn(__internals__, 'formatDetectionObject').andCall((score) => score)\n\n      const input = 'some random input'\n      const expected = 0.25\n      const actual = __internals__.detect(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 1.00 if v2.0', () => {\n      const parsed = { swagger: '2.0', info: {}, paths: {} }\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(parsed)\n      spyOn(__internals__, 'formatDetectionObject').andCall((score) => score)\n\n      const input = 'some random input'\n      const expected = 1\n      const actual = __internals__.detect(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 0.75 if v3.0', () => {\n      const parsed = { swagger: '3.0', info: {}, paths: {} }\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(parsed)\n      spyOn(__internals__, 'formatDetectionObject').andCall((score) => score)\n\n      const input = 'some random input'\n      const expected = 0.75\n      const actual = __internals__.detect(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAPIName', () => {\n    it('should call parseJSONorYAML', () => {\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(null)\n\n      const input = 'some random input'\n      __internals__.getAPIName(input)\n\n      expect(__internals__.parseJSONorYAML).toHaveBeenCalledWith(input)\n    })\n\n    it('should return null if no title in info', () => {\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(null)\n      const input = 'some random input'\n\n      const expected = null\n      const actual = __internals__.getAPIName(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return title if it exists', () => {\n      const expected = 'my API title'\n      const parsed = {\n        info: {\n          title: expected\n        }\n      }\n\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(parsed)\n\n      const input = 'some random input'\n      const actual = __internals__.getAPIName(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContact', () => {\n    it('should return a Contact Record', () => {\n      const actual = __internals__.getContact()\n      expect(actual).toBeA(Contact)\n    })\n\n    it('should add all relevant fields to the Contact Record', () => {\n      const input = {\n        name: 'some name',\n        url: 'some url',\n        email: 'some email'\n      }\n\n      const expected = new Contact(input)\n      const actual = __internals__.getContact(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getLicense', () => {\n    it('should return a License Record', () => {\n      const actual = __internals__.getLicense()\n      expect(actual).toBeA(License)\n    })\n\n    it('should add all relevant fields to the License Record', () => {\n      const input = {\n        name: 'some name',\n        url: 'some url'\n      }\n\n      const expected = new License(input)\n      const actual = __internals__.getLicense(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getInfo', () => {\n    it('should return an Info Record', () => {\n      const actual = __internals__.getInfo()\n      expect(actual).toBeAn(Info)\n    })\n\n    it('should call getContact', () => {\n      spyOn(__internals__, 'getContact').andReturn(null)\n\n      __internals__.getInfo()\n\n      expect(__internals__.getContact).toHaveBeenCalled()\n    })\n\n    it('should call getLicense', () => {\n      spyOn(__internals__, 'getLicense').andReturn(null)\n\n      __internals__.getInfo()\n\n      expect(__internals__.getLicense).toHaveBeenCalled()\n    })\n\n    it('should add all relevant fields to the Info Record', () => {\n      spyOn(__internals__, 'getContact').andReturn(123)\n      spyOn(__internals__, 'getLicense').andReturn(321)\n\n      const input = {\n        contact: 123,\n        license: 321,\n        title: 'some title',\n        description: 'some desc',\n        termsOfService: 'some termsOfService',\n        version: 345\n      }\n\n      const expected = new Info({ ...input, tos: input.termsOfService })\n      const actual = __internals__.getInfo(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@fixExternalContextDependencies', () => {\n    it('should do nothing if the swagger file is fine', () => {\n      const swagger = {\n        host: 'some.host.com',\n        schemes: [ 'https' ]\n      }\n\n      const url = 'http://some.otherhost.com'\n\n      const expected = swagger\n      const actual = __internals__.fixExternalContextDependencies(swagger, url)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update the swagger host with the url if provided', () => {\n      const swagger = {\n        schemes: [ 'https' ]\n      }\n\n      const url = 'http://some.otherhost.com'\n\n      const expected = {\n        schemes: [ 'https' ],\n        host: 'some.otherhost.com'\n      }\n      const actual = __internals__.fixExternalContextDependencies(swagger, url)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update the swagger host with localhost if no url provided', () => {\n      const swagger = {\n        schemes: [ 'https' ]\n      }\n\n      const expected = {\n        schemes: [ 'https' ],\n        host: 'localhost'\n      }\n      const actual = __internals__.fixExternalContextDependencies(swagger, '')\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update the swagger schemes with the url if provided', () => {\n      const swagger = {\n        host: 'some.host.com'\n      }\n\n      const url = 'http://some.otherhost.com'\n\n      const expected = {\n        schemes: [ 'http' ],\n        host: 'some.host.com'\n      }\n      const actual = __internals__.fixExternalContextDependencies(swagger, url)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update the swagger schemes with http if no url provided', () => {\n      const swagger = {\n        host: 'some.host.com'\n      }\n\n      const expected = {\n        schemes: [ 'http' ],\n        host: 'some.host.com'\n      }\n      const actual = __internals__.fixExternalContextDependencies(swagger, '')\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getMethodsFromResourceObject', () => {\n    it('should return an array', () => {\n      const resource = { get: {}, put: {}, post: {}, test: {}, random: {} }\n      const actual = __internals__.getMethodsFromResourceObject(resource)\n\n      expect(actual).toBeAn(Array)\n    })\n\n    it('array items should be entries', () => {\n      const resource = { get: 123, put: 123, post: 123, test: 123, random: 123 }\n      const actual = __internals__.getMethodsFromResourceObject(resource)\n\n      actual.forEach(entry => {\n        expect(entry.key).toBeA('string')\n        expect(entry.value).toEqual(123)\n      })\n    })\n\n    it('entry keys should only be methods name', () => {\n      const resource = { get: 123, put: 123, post: 123, test: 123, random: 123 }\n      const actual = __internals__.getMethodsFromResourceObject(resource)\n\n      const keys = actual.map(({ key }) => key)\n      expect(keys).toExclude('test')\n      expect(keys).toExclude('random')\n    })\n\n    it('should not modify values of resource when filtering', () => {\n      const resource = { get: 415, put: 123, post: 32, test: 46854, random: 2352 }\n      const actual = __internals__.getMethodsFromResourceObject(resource)\n\n      actual.forEach(({ key, value }) => {\n        const obj = {}\n        obj[key] = value\n        expect(resource).toInclude(obj)\n      })\n    })\n  })\n\n  describe('@getParametersAndReferencesFromParameterArray', () => {\n    it('should split refs from params', () => {\n      const input = [\n        {\n          title: 'some ref',\n          $ref: '#/parameter/SomeParam'\n        },\n        {\n          title: 'some param',\n          name: 'param1',\n          in: 'query',\n          type: 'string'\n        },\n        {\n          title: 'some ref',\n          $ref: '#/parameter/SomeOtherParam'\n        },\n        {\n          title: 'some other param',\n          name: 'param2',\n          in: 'header',\n          type: 'string'\n        }\n      ]\n\n      const expected = {\n        references: [\n          {\n            key: '#/parameter/SomeParam',\n            value: {\n              title: 'some ref',\n              $ref: '#/parameter/SomeParam'\n            }\n          },\n          {\n            key: '#/parameter/SomeOtherParam',\n            value: {\n              title: 'some ref',\n              $ref: '#/parameter/SomeOtherParam'\n            }\n          }\n        ],\n        parameters: [\n          {\n            key: 'param1-query',\n            value: {\n              title: 'some param',\n              name: 'param1',\n              in: 'query',\n              type: 'string'\n            }\n          },\n          {\n            key: 'param2-header',\n            value: {\n              title: 'some other param',\n              name: 'param2',\n              in: 'header',\n              type: 'string'\n            }\n          }\n        ]\n      }\n\n      const actual = __internals__.getParametersAndReferencesFromParameterArray(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no args', () => {\n      const expected = {\n        references: [],\n        parameters: []\n      }\n\n      const actual = __internals__.getParametersAndReferencesFromParameterArray()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceObjectEntryIntoReferenceEntry', () => {\n    it('should work', () => {\n      const type = 'parameter'\n      const entry = { key: 123, value: 321 }\n\n      const expected = { key: 123, value: new Reference({ type, uuid: 123 }) }\n      const actual = __internals__.convertReferenceObjectEntryIntoReferenceEntry(type, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceArrayIntoReferenceMap', () => {\n    it('should call convertReferenceObjectEntryIntoReferenceEntry for each entry', () => {\n      spyOn(__internals__, 'convertReferenceObjectEntryIntoReferenceEntry').andCall((type, val) => {\n        return {\n          key: val,\n          value: val\n        }\n      })\n\n      const refs = [ 123, 321, 234 ]\n      const type = 'number'\n\n      __internals__.convertReferenceArrayIntoReferenceMap(type, refs)\n\n      expect(__internals__.convertReferenceObjectEntryIntoReferenceEntry.calls.length).toEqual(3)\n    })\n\n    it('should work if convertReferenceObjectEntryIntoReferenceEntry works', () => {\n      spyOn(__internals__, 'convertReferenceObjectEntryIntoReferenceEntry').andCall((type, val) => {\n        return {\n          key: val,\n          value: val\n        }\n      })\n\n      const refs = [ 123, 321, 234 ]\n      const type = 'number'\n\n      const expected = { '123': 123, '321': 321, '234': 234 }\n      const actual = __internals__.convertReferenceArrayIntoReferenceMap(type, refs)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const refs = [ { key: 123 }, { key: 321 } ]\n      const type = 'parameter'\n\n      const expected = {\n        '123': new Reference({\n          type, uuid: 123\n        }),\n        '321': new Reference({\n          type, uuid: 321\n        })\n      }\n      const actual = __internals__.convertReferenceArrayIntoReferenceMap(type, refs)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with default refs', () => {\n      const type = 'parameter'\n\n      const expected = {}\n      const actual = __internals__.convertReferenceArrayIntoReferenceMap(type)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateOperationEntryWithSharedParameters', () => {\n    it('should work', () => {\n      /* eslint-disable no-undefined */\n      const inputs = [\n        [ undefined, {} ],\n        [ undefined, { key: 'abc', value: 123 } ],\n        [ undefined, { key: 'abc', value: {} } ],\n        [ [], { key: 'abc', value: {} } ],\n        [ [ 123, 234 ], { key: 'abc', value: {} } ],\n        [ [ 123, 234 ], { key: 'abc', value: { parameters: 345 } } ],\n        [ [ 123, 234 ], { key: 'abc', value: { parameters: [] } } ],\n        [ [ 123, 234 ], { key: 'abc', value: { parameters: [ 345 ] } } ]\n      ]\n      const expected = [\n        { key: undefined, value: undefined },\n        { key: 'abc', value: 123 },\n        { key: 'abc', value: {} },\n        { key: 'abc', value: {} },\n        { key: 'abc', value: { parameters: [ 123, 234 ] } },\n        { key: 'abc', value: { parameters: [ 123, 234 ] } },\n        { key: 'abc', value: { parameters: [ 123, 234 ] } },\n        { key: 'abc', value: { parameters: [ 345, 123, 234 ] } }\n      ]\n      /* eslint-enable no-undefined */\n      const actual = inputs.map(\n        input => __internals__.updateOperationEntryWithSharedParameters(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getConsumesParamFromOperation', () => {\n    it('should work with defaults', () => {\n      const expected = {\n        consumeParameter: null,\n        consumeReference: null,\n        consumeInterface: null\n      }\n      const actual = __internals__.getConsumesParamFromOperation()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return nothing interesting if no global or local consumes', () => {\n      const store = new Store()\n      const operation = {}\n\n      const expected = {\n        consumeParameter: null,\n        consumeReference: null,\n        consumeInterface: null\n      }\n      const actual = __internals__.getConsumesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return local consumes if it exists', () => {\n      const store = new Store()\n      const operation = {\n        consumes: [ 'application/json' ]\n      }\n\n      const expected = {\n        consumeParameter: new Parameter({\n          uuid: 'Content-Type-header',\n          in: 'headers',\n          key: 'Content-Type',\n          name: 'Content Type Header',\n          description: 'describes the media type of the request',\n          type: 'string',\n          required: true,\n          constraints: List([\n            new Constraint.Enum([ 'application/json' ])\n          ])\n        }),\n        consumeReference: null,\n        consumeInterface: null\n      }\n      const actual = __internals__.getConsumesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should use global consumes if no local consumes exists', () => {\n      const globalParam = new Parameter({\n        name: 'global consume param'\n      })\n\n      const store = new Store({\n        parameter: new OrderedMap({ globalConsumes: globalParam })\n      })\n      const operation = {}\n\n      const expected = {\n        consumeParameter: null,\n        consumeReference: new Reference({ type: 'parameter', uuid: 'globalConsumes' }),\n        consumeInterface: null\n      }\n      const actual = __internals__.getConsumesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore global consumes if local consumes exists', () => {\n      const globalParam = new Parameter({\n        name: 'global consume param'\n      })\n\n      const store = new Store({\n        parameter: new OrderedMap({ globalConsumes: globalParam })\n      })\n      const operation = {\n        consumes: [ 'application/json' ]\n      }\n\n      const expected = {\n        consumeParameter: new Parameter({\n          uuid: 'Content-Type-header',\n          in: 'headers',\n          key: 'Content-Type',\n          name: 'Content Type Header',\n          description: 'describes the media type of the request',\n          type: 'string',\n          required: true,\n          constraints: List([\n            new Constraint.Enum([ 'application/json' ])\n          ])\n        }),\n        consumeReference: null,\n        consumeInterface: null\n      }\n      const actual = __internals__.getConsumesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getProducesParamFromOperation', () => {\n    it('should return nothing interesting if no global or local produces', () => {\n      const store = new Store()\n      const operation = {}\n\n      const expected = {\n        produceParameter: null,\n        produceInterface: null\n      }\n      const actual = __internals__.getProducesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return local produces if it exists', () => {\n      const store = new Store()\n      const operation = {\n        produces: [ 'application/json' ]\n      }\n\n      const expected = {\n        produceParameter: new Parameter({\n          uuid: 'Content-Type-header',\n          in: 'headers',\n          usedIn: 'response',\n          key: 'Content-Type',\n          name: 'Content Type Header',\n          description: 'describes the media type of the response',\n          type: 'string',\n          required: true,\n          constraints: List([\n            new Constraint.Enum([ 'application/json' ])\n          ])\n        }),\n        produceInterface: null\n      }\n      const actual = __internals__.getProducesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should use global consumes if no local produces exists', () => {\n      const globalParam = new Parameter({\n        name: 'global produce param'\n      })\n\n      const store = new Store({\n        parameter: new OrderedMap({ globalProduces: globalParam })\n      })\n      const operation = {}\n\n      const expected = {\n        produceParameter: new Reference({ type: 'parameter', uuid: 'globalProduces' }),\n        produceInterface: null\n      }\n      const actual = __internals__.getProducesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should ignore global produces if local consumes exists', () => {\n      const globalParam = new Parameter({\n        name: 'global produce param'\n      })\n\n      const store = new Store({\n        parameter: new OrderedMap({ globalProduces: globalParam })\n      })\n      const operation = {\n        produces: [ 'application/json' ]\n      }\n\n      const expected = {\n        produceParameter: new Parameter({\n          uuid: 'Content-Type-header',\n          usedIn: 'response',\n          in: 'headers',\n          key: 'Content-Type',\n          name: 'Content Type Header',\n          description: 'describes the media type of the response',\n          type: 'string',\n          required: true,\n          constraints: List([\n            new Constraint.Enum([ 'application/json' ])\n          ])\n        }),\n        produceInterface: null\n      }\n      const actual = __internals__.getProducesParamFromOperation(store, operation)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mapParamLocationToParamContainerField', () => {\n    it('should return null if badly-typed location', () => {\n      const location = 1241\n      const expected = null\n      const actual = __internals__.mapParamLocationToParamContainerField(location)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if no valid location', () => {\n      const location = '1241'\n      const expected = null\n      const actual = __internals__.mapParamLocationToParamContainerField(location)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const locations = [ 'path', 'header', 'query', 'body', 'formData' ]\n      const expected = [ 'path', 'headers', 'queries', 'body', 'body' ]\n      const actual = locations.map(location =>\n        __internals__.mapParamLocationToParamContainerField(location)\n      )\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addParameterToContainerBlock', () => {\n    it('should not crash if unknown location', () => {\n      const container = {\n        headers: {}\n      }\n\n      const entry = {\n        key: 'someKey',\n        value: new Parameter({\n          in: 'invalidLocation'\n        })\n      }\n\n      try {\n        __internals__.addParameterToContainerBlock(container, entry)\n        expect(true).toEqual(true)\n      }\n      catch (e) {\n        expect(false).toEqual(true)\n      }\n    })\n\n    it('should work', () => {\n      const container = {\n        headers: {}\n      }\n\n      const param = new Parameter({\n        in: 'headers'\n      })\n\n      const entry = {\n        key: 'someKey',\n        value: param\n      }\n\n      const expected = {\n        headers: {\n          someKey: param\n        }\n      }\n\n      const actual = __internals__.addParameterToContainerBlock(container, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@resolveReferenceFromKey', () => {\n    it('should work', () => {\n      const store = new Store({\n        parameter: new OrderedMap({\n          '123': 234\n        })\n      })\n\n      const type = 'parameter'\n\n      const entry = {\n        key: '123',\n        value: 'whatever'\n      }\n\n      const expected = {\n        key: '123',\n        value: 234\n      }\n\n      const actual = __internals__.resolveReferenceFromKey(store, type, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addReferenceToContainerBlock', () => {\n    it('should not crash if unknown location', () => {\n      const container = {\n        headers: {}\n      }\n\n      const entry = {\n        key: 'someKey',\n        value: new Parameter({\n          in: 'invalidLocation'\n        })\n      }\n\n      try {\n        __internals__.addReferenceToContainerBlock(container, entry)\n        expect(true).toEqual(true)\n      }\n      catch (e) {\n        expect(false).toEqual(true)\n      }\n    })\n\n    it('should work', () => {\n      const container = {\n        headers: {}\n      }\n\n      const param = new Parameter({\n        in: 'headers'\n      })\n\n      const entry = {\n        key: 'someKey',\n        value: param\n      }\n\n      const expected = {\n        headers: {\n          someKey: new Reference({\n            type: 'parameter',\n            uuid: 'someKey'\n          })\n        }\n      }\n\n      const actual = __internals__.addReferenceToContainerBlock(container, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterContainer', () => {\n    it('should work with defaults', () => {\n      const expected = new ParameterContainer()\n      const actual = __internals__.createParameterContainer()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should make expected calls for each param', () => {\n      spyOn(__internals__, 'addParameterToContainerBlock').andReturn({\n        headers: { '123': 321 }\n      })\n\n      spyOn(__internals__, 'resolveReferenceFromKey').andReturn({ value: 234 })\n\n      spyOn(__internals__, 'addReferenceToContainerBlock').andReturn({\n        headers: { '987': 789 }\n      })\n\n      const store = new Store()\n      const params = [ 1, 2, 3 ]\n      const refs = [ 4, 5, 6, 7 ]\n\n      __internals__.createParameterContainer(store, params, refs)\n\n      expect(__internals__.addParameterToContainerBlock.calls.length).toEqual(3)\n      expect(__internals__.resolveReferenceFromKey.calls.length).toEqual(4)\n      expect(__internals__.addReferenceToContainerBlock.calls.length).toEqual(4)\n    })\n\n    it('should work if underlying calls are correct', () => {\n      spyOn(__internals__, 'addParameterToContainerBlock').andReturn({\n        headers: { '123': 321 }\n      })\n\n      spyOn(__internals__, 'resolveReferenceFromKey').andReturn({ value: 234 })\n\n      spyOn(__internals__, 'addReferenceToContainerBlock').andReturn({\n        headers: { '987': 789 }\n      })\n\n      const store = new Store()\n      const params = [ 1, 2, 3 ]\n      const refs = [ 4, 5, 6, 7 ]\n\n      const expected = new ParameterContainer({\n        headers: new OrderedMap({ '987': 789 })\n      })\n      const actual = __internals__.createParameterContainer(store, params, refs)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const param1 = new Parameter({ in: 'headers', type: 'string' })\n      const param2 = new Parameter({ in: 'queries', type: 'number' })\n      const param3 = new Parameter({ in: 'queries', type: 'boolean' })\n\n      const store = new Store({\n        parameter: new OrderedMap({\n          param3: param3\n        })\n      })\n      const params = [ { key: 'param1', value: param1 }, { key: 'param2', value: param2 } ]\n      const refs = [ { key: 'param3' } ]\n\n      const expected = new ParameterContainer({\n        headers: new OrderedMap({\n          param1\n        }),\n        queries: new OrderedMap({\n          param2,\n          param3: new Reference({\n            type: 'parameter',\n            uuid: 'param3'\n          })\n        })\n      })\n      const actual = __internals__.createParameterContainer(store, params, refs)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getOverlayFromRequirement', () => {\n    it('should do nothing if auth is not OAuth2', () => {\n      const auth = new Auth.Basic()\n      const scopes = []\n\n      const expected = null\n      const actual = __internals__.getOverlayFromRequirement(auth, scopes)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return an OAuth2 with the correct scopes if auth is OAuth2', () => {\n      const auth = new Auth.OAuth2()\n      const scopes = [ 'read:any', 'write:self' ]\n\n      const expected = new Auth.OAuth2({\n        scopes: List([\n          {\n            key: 'read:any'\n          },\n          {\n            key: 'write:self'\n          }\n        ])\n      })\n      const actual = __internals__.getOverlayFromRequirement(auth, scopes)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if no scope provided', () => {\n      const auth = new Auth.OAuth2()\n\n      const expected = null\n      const actual = __internals__.getOverlayFromRequirement(auth)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAuthReferences', () => {\n    it('should call getOverlayFromRequirement for each requirement', () => {\n      spyOn(__internals__, 'getOverlayFromRequirement').andReturn(null)\n\n      const store = new Store()\n      const requirements = [\n        { petstore_auth: 123 },\n        { basic_auth: 321 }\n      ]\n\n      __internals__.getAuthReferences(store, requirements)\n\n      expect(__internals__.getOverlayFromRequirement.calls.length).toEqual(2)\n    })\n\n    it('should work', () => {\n      const store = new Store({\n        auth: new OrderedMap({\n          petstore_auth: new Auth.OAuth2({\n            scopes: List([\n              {\n                key: 'overriden',\n                value: 'by scopes in security requirements'\n              }\n            ])\n          }),\n          basic_auth: new Auth.Basic()\n        })\n      })\n\n      const requirements = [\n        { petstore_auth: [ 'read:any', 'write:self' ] },\n        { basic_auth: [ 'ignored' ] }\n      ]\n\n      const expected = List([\n        new Reference({\n          type: 'auth',\n          uuid: 'petstore_auth',\n          overlay: new Auth.OAuth2({\n            scopes: List([\n              {\n                key: 'read:any'\n              },\n              {\n                key: 'write:self'\n              }\n            ])\n          })\n        }),\n        new Reference({\n          type: 'auth',\n          uuid: 'basic_auth',\n          overlay: null\n        })\n      ])\n      const actual = __internals__.getAuthReferences(store, requirements)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const store = new Store({\n        auth: new OrderedMap({\n          petstore_auth: new Auth.OAuth2({\n            scopes: List([\n              {\n                key: 'overriden',\n                value: 'by scopes in security requirements'\n              }\n            ])\n          }),\n          basic_auth: new Auth.Basic()\n        })\n      })\n\n      const expected = List()\n      const actual = __internals__.getAuthReferences(store)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateParamsWithConsumeParameter', () => {\n    it('should work with defaults', () => {\n      spyOn(__internals__, 'getConsumesParamFromOperation').andReturn({})\n      const store = new Store()\n      const operation = {}\n\n      const expected = [ [], [] ]\n      const actual = __internals__.updateParamsWithConsumeParameter(store, operation)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no consume param', () => {\n      spyOn(__internals__, 'getConsumesParamFromOperation').andReturn({})\n      const store = new Store()\n      const operation = {}\n      const parameters = [ 123, 234 ]\n      const references = [ 345, 456 ]\n\n      const expected = [ [ 123, 234 ], [ 345, 456 ] ]\n      const actual = __internals__.updateParamsWithConsumeParameter(\n        store, operation, parameters, references\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getConsumesParamFromOperation', () => {\n      spyOn(__internals__, 'getConsumesParamFromOperation').andReturn({})\n\n      const store = new Store()\n      const operation = {}\n      const parameters = []\n      const references = []\n\n      __internals__.updateParamsWithConsumeParameter(store, operation, parameters, references)\n\n      expect(__internals__.getConsumesParamFromOperation).toHaveBeenCalledWith(store, operation)\n    })\n\n    it('should add parameter to parameters', () => {\n      spyOn(__internals__, 'getConsumesParamFromOperation').andReturn({\n        consumeParameter: new Parameter({ uuid: 123 })\n      })\n\n      const store = new Store()\n      const operation = {}\n      const parameters = []\n      const references = []\n\n      const expected = [\n        [\n          {\n            key: 123,\n            value: new Parameter({ uuid: 123 })\n          }\n        ],\n        []\n      ]\n      const actual = __internals__.updateParamsWithConsumeParameter(\n        store, operation, parameters, references\n      )\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should add reference to references', () => {\n      spyOn(__internals__, 'getConsumesParamFromOperation').andReturn({\n        consumeReference: new Reference({ uuid: 123 })\n      })\n\n      const store = new Store()\n      const operation = {}\n      const parameters = []\n      const references = []\n\n      const expected = [\n        [],\n        [\n          {\n            key: 123,\n            value: new Reference({ uuid: 123 })\n          }\n        ]\n      ]\n      const actual = __internals__.updateParamsWithConsumeParameter(\n         store, operation, parameters, references\n       )\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addCodeToResponseEntry', () => {\n    it('should work', () => {\n      const entry = {\n        key: 200,\n        value: { description: 'a response' }\n      }\n\n      const expected = {\n        key: 200,\n        value: {\n          description: 'a response',\n          code: 200\n        }\n      }\n\n      const actual = __internals__.addCodeToResponseEntry(entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateResponseReferenceWithProduceParameter', () => {\n    it('should create an overlay if none exists', () => {\n      const producesParameter = new Reference({\n        type: 'parameter', uuid: 'someRef'\n      })\n\n      const entry = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 123,\n          overlay: null\n        })\n      }\n\n      const expected = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 123,\n          overlay: new Response({\n            parameters: new ParameterContainer({\n              headers: new OrderedMap({\n                someRef: producesParameter\n              })\n            })\n          })\n        })\n      }\n\n      const actual = __internals__.updateResponseReferenceWithProduceParameter(\n        producesParameter, entry\n      )\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update the overlay if it already exists', () => {\n      const producesParameter = new Reference({\n        type: 'parameter', uuid: 'someRef'\n      })\n\n      const entry = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 123,\n          overlay: new Response({\n            code: 200,\n            parameters: new ParameterContainer({\n              headers: new OrderedMap({\n                abc: new Parameter()\n              })\n            })\n          })\n        })\n      }\n\n      const expected = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 123,\n          overlay: new Response({\n            code: 200,\n            parameters: new ParameterContainer({\n              headers: new OrderedMap({\n                abc: new Parameter(),\n                someRef: producesParameter\n              })\n            })\n          })\n        })\n      }\n\n      const actual = __internals__.updateResponseReferenceWithProduceParameter(\n        producesParameter, entry\n      )\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateResponseRecordWithProduceParameter', () => {\n    it('should work', () => {\n      const producesParameter = new Parameter({\n        type: 'string',\n        uuid: 'someUUID'\n      })\n\n      const entry = {\n        key: 'someResponseRef',\n        value: new Response({\n          parameters: new ParameterContainer({\n            queries: new OrderedMap({\n              '123': 321\n            })\n          })\n        })\n      }\n\n      const expected = {\n        key: 'someResponseRef',\n        value: new Response({\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              someUUID: producesParameter\n            }),\n            queries: new OrderedMap({\n              '123': 321\n            })\n          })\n        })\n      }\n\n      const actual = __internals__.updateResponseRecordWithProduceParameter(\n        producesParameter, entry\n      )\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no producesParameter', () => {\n      const producesParameter = null\n\n      const entry = {\n        key: 'someResponseRef',\n        value: new Response({\n          parameters: new ParameterContainer({\n            queries: new OrderedMap({\n              '123': 321\n            })\n          })\n        })\n      }\n\n      const expected = entry\n\n      const actual = __internals__.updateResponseRecordWithProduceParameter(\n        producesParameter, entry\n      )\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateResponsesWithProduceParameter', () => {\n    it('should do nothing if no producesParameter', () => {\n      const producesParameter = null\n      const entry = {\n        key: 'someKey',\n        value: new Response()\n      }\n      const expected = entry\n      const actual = __internals__.updateResponsesWithProduceParameter(producesParameter, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call updateResponseReferenceWithProduceParameter if entry is Reference', () => {\n      spyOn(__internals__, 'updateResponseReferenceWithProduceParameter').andReturn(123)\n\n      const producesParameter = new Parameter()\n      const entry = {\n        key: 'someKey',\n        value: new Reference()\n      }\n      const expected = 123\n      const actual = __internals__.updateResponsesWithProduceParameter(producesParameter, entry)\n\n      expect(__internals__.updateResponseReferenceWithProduceParameter).toHaveBeenCalledWith(\n        producesParameter, entry\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call updateResponseRecordWithProduceParameter if entry is Response Record', () => {\n      spyOn(__internals__, 'updateResponseRecordWithProduceParameter').andReturn(321)\n\n      const producesParameter = new Parameter()\n      const entry = {\n        key: 'someKey',\n        value: new Response()\n      }\n      const expected = 321\n      const actual = __internals__.updateResponsesWithProduceParameter(producesParameter, entry)\n\n      expect(__internals__.updateResponseRecordWithProduceParameter).toHaveBeenCalledWith(\n        producesParameter, entry\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const producesParameter = new Parameter({\n        uuid: 'abc',\n        type: 'string'\n      })\n      const entry = {\n        key: 'someKey',\n        value: new Response({\n          code: 200\n        })\n      }\n      const expected = {\n        key: 'someKey',\n        value: new Response({\n          code: 200,\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              abc: producesParameter\n            })\n          })\n        })\n      }\n      const actual = __internals__.updateResponsesWithProduceParameter(producesParameter, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getInterfacesFromTags', () => {\n    it('should work', () => {\n      const tags = [ 'abc', '123' ]\n      const expected = OrderedMap({\n        abc: new Interface({ name: 'abc', uuid: 'abc', level: 'request' }),\n        '123': new Interface({ name: '123', uuid: '123', level: 'request' })\n      })\n      const actual = __internals__.getInterfacesFromTags(tags)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const expected = OrderedMap()\n      const actual = __internals__.getInterfacesFromTags()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addEndpointOverlayFromOperation', () => {\n    it('should return a Reference', () => {\n      const operation = {}\n      const value = 'whatever'\n      const key = '123'\n\n      const actual = __internals__.addEndpointOverlayFromOperation(operation, value, key)\n      expect(actual).toBeA(Reference)\n    })\n\n    it('should put no overlay in Reference if no operation.schemes', () => {\n      const operation = {}\n      const value = 'whatever'\n      const key = '123'\n\n      const expected = new Reference({\n        type: 'endpoint',\n        uuid: '123'\n      })\n      const actual = __internals__.addEndpointOverlayFromOperation(operation, value, key)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should put an overlay in Reference if operation.schemes is defined', () => {\n      const operation = {\n        schemes: [ 'http', 'https' ]\n      }\n      const value = 'whatever'\n      const key = '123'\n\n      const expected = new Reference({\n        type: 'endpoint',\n        uuid: '123',\n        overlay: new URL({\n          variableDelimiters: List([ '{', '}' ])\n        }).set('protocol', List([ 'http:', 'https:' ]))\n      })\n      const actual = __internals__.addEndpointOverlayFromOperation(operation, value, key)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isMethodWithBody', () => {\n    it('should work', () => {\n      const inputs = [ 'get', 'put', 'post', 'patch', 'delete', 'options', 'trace' ]\n\n      const expected = [ false, true, true, true, true, true, false ]\n      const actual = inputs.map(__internals__.isMethodWithBody)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParameterContainerForOperation', () => {\n    /* eslint-disable max-statements */\n    it('should call all the expected methods', () => {\n      spyOn(__internals__, 'getParametersAndReferencesFromParameterArray').andReturn({\n        parameters: [ 1, 2, 3, 4 ],\n        references: [ 5 ]\n      })\n      spyOn(__internals__, 'convertParameterObjectIntoParameter').andReturn(123)\n      spyOn(__internals__, 'isMethodWithBody').andReturn(true)\n      spyOn(__internals__, 'updateParamsWithConsumeParameter').andReturn([ [ 12, 23 ], [ 34, 45 ] ])\n      spyOn(__internals__, 'createParameterContainer').andReturn(12345)\n\n      const store = new Store()\n      const operation = {\n        parameters: [ 6, 7, 8, 9 ]\n      }\n      const method = 'post'\n\n      const expected = 12345\n      const actual = __internals__.getParameterContainerForOperation(store, operation, method)\n\n      expect(__internals__.getParametersAndReferencesFromParameterArray).toHaveBeenCalledWith([\n        6, 7, 8, 9\n      ])\n      expect(__internals__.convertParameterObjectIntoParameter.calls.length).toEqual(4)\n      expect(__internals__.isMethodWithBody).toHaveBeenCalledWith(method)\n      expect(__internals__.updateParamsWithConsumeParameter).toHaveBeenCalledWith(\n        store, operation, [ 123, 123, 123, 123 ], [ 5 ]\n      )\n      expect(__internals__.createParameterContainer).toHaveBeenCalledWith(\n        store, [ 12, 23 ], [ 34, 45 ]\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with missing operation parameters', () => {\n      spyOn(__internals__, 'getParametersAndReferencesFromParameterArray').andReturn({\n        parameters: [ 1, 2, 3, 4 ],\n        references: [ 5 ]\n      })\n      spyOn(__internals__, 'convertParameterObjectIntoParameter').andReturn(123)\n      spyOn(__internals__, 'isMethodWithBody').andReturn(true)\n      spyOn(__internals__, 'updateParamsWithConsumeParameter').andReturn([ [ 12, 23 ], [ 34, 45 ] ])\n      spyOn(__internals__, 'createParameterContainer').andReturn(12345)\n\n      const store = new Store()\n      const operation = {}\n      const method = 'post'\n\n      const expected = 12345\n      const actual = __internals__.getParameterContainerForOperation(store, operation, method)\n\n      expect(__internals__.getParametersAndReferencesFromParameterArray).toHaveBeenCalledWith([])\n      expect(__internals__.convertParameterObjectIntoParameter.calls.length).toEqual(4)\n      expect(__internals__.isMethodWithBody).toHaveBeenCalledWith(method)\n      expect(__internals__.updateParamsWithConsumeParameter).toHaveBeenCalledWith(\n        store, operation, [ 123, 123, 123, 123 ], [ 5 ]\n      )\n      expect(__internals__.createParameterContainer).toHaveBeenCalledWith(\n        store, [ 12, 23 ], [ 34, 45 ]\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if method is not with body', () => {\n      spyOn(__internals__, 'getParametersAndReferencesFromParameterArray').andReturn({\n        parameters: [ 1, 2, 3, 4 ],\n        references: [ 5 ]\n      })\n      spyOn(__internals__, 'convertParameterObjectIntoParameter').andReturn(123)\n      spyOn(__internals__, 'isMethodWithBody').andReturn(false)\n      spyOn(__internals__, 'updateParamsWithConsumeParameter').andReturn([ [ 12, 23 ], [ 34, 45 ] ])\n      spyOn(__internals__, 'createParameterContainer').andReturn(12345)\n\n      const store = new Store()\n      const operation = {}\n      const method = 'get'\n\n      const expected = 12345\n      const actual = __internals__.getParameterContainerForOperation(store, operation, method)\n\n      expect(__internals__.getParametersAndReferencesFromParameterArray).toHaveBeenCalledWith([])\n      expect(__internals__.convertParameterObjectIntoParameter.calls.length).toEqual(4)\n      expect(__internals__.isMethodWithBody).toHaveBeenCalledWith(method)\n      expect(__internals__.updateParamsWithConsumeParameter).toNotHaveBeenCalled()\n      expect(__internals__.createParameterContainer).toHaveBeenCalledWith(\n        store, [ 123, 123, 123, 123 ], [ 5 ]\n      )\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n\n    xit('it should work', () => {\n      // TODO implement this test\n    })\n  })\n\n  describe('@getResponsesForOperation', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getProducesParamFromOperation').andCall(s => ({ produceParameter: s }))\n      spyOn(__internals__, 'addCodeToResponseEntry').andCall(r => r)\n      spyOn(__internals__, 'convertResponseObjectIntoResponse').andCall(r => r.value % 2 ? r : null)\n      spyOn(__internals__, 'updateResponsesWithProduceParameter').andCall((p, r) => {\n        if (r.value === p) {\n          return null\n        }\n\n        return r\n      })\n\n      const inputs = [\n        [ 123, {} ],\n        [ 123, { responses: { a: 123, b: 234, c: 345 } } ]\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap({ c: 345 })\n      ]\n      const actual = inputs.map(input => __internals__.getResponsesForOperation(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEndpointsForOperation', () => {\n    it('should call addOverlayToEndpoints for each endpoint in store', () => {\n      spyOn(__internals__, 'addEndpointOverlayFromOperation').andReturn('abc')\n      const store = new Store({\n        endpoint: new OrderedMap({\n          '123': 123,\n          '321': 321\n        })\n      })\n\n      const operation = {}\n\n      const expected = new OrderedMap({ '123': 'abc', '321': 'abc' })\n      const actual = __internals__.getEndpointsForOperation(store, operation)\n\n      expect(__internals__.addEndpointOverlayFromOperation.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRequestIdFromOperation', () => {\n    it('should return operationId if it exists', () => {\n      const operation = {\n        operationId: 123\n      }\n\n      const expected = 123\n      const actual = __internals__.getRequestIdFromOperation(operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if operationId does not exists', () => {\n      const operation = {}\n\n      const expected = null\n      const actual = __internals__.getRequestIdFromOperation(operation)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertOperationIntoRequest', () => {\n    /* eslint-disable max-statements */\n    it('should call all expected methods', () => {\n      spyOn(__internals__, 'getRequestIdFromOperation').andReturn(123)\n      spyOn(__internals__, 'getParameterContainerForOperation').andReturn(321)\n      spyOn(__internals__, 'getAuthReferences').andReturn(234)\n      spyOn(__internals__, 'getResponsesForOperation').andReturn(432)\n      spyOn(__internals__, 'getInterfacesFromTags').andReturn(345)\n      spyOn(__internals__, 'getEndpointsForOperation').andReturn(543)\n\n      const description = 'some desc'\n      const summary = 'someName'\n\n      const store = new Store()\n      const operation = { description, summary, security: [ 1, 2, 3 ], tags: [ 4, 5 ] }\n      const security = null\n      const entry = {\n        key: 'post',\n        value: operation\n      }\n\n      const expected = {\n        key: 'post',\n        value: new Request({\n          id: 123,\n          endpoints: 543,\n          name: summary,\n          description,\n          parameters: 321,\n          method: 'post',\n          auths: 234,\n          responses: 432,\n          interfaces: 345\n        })\n      }\n\n      const actual = __internals__.convertOperationIntoRequest(store, security, entry)\n\n      expect(__internals__.getRequestIdFromOperation).toHaveBeenCalledWith(operation)\n      expect(__internals__.getParameterContainerForOperation).toHaveBeenCalledWith(\n        store, operation, 'post'\n      )\n      expect(__internals__.getAuthReferences).toHaveBeenCalledWith(store, [ 1, 2, 3 ])\n      expect(__internals__.getResponsesForOperation).toHaveBeenCalledWith(store, operation)\n      expect(__internals__.getInterfacesFromTags).toHaveBeenCalledWith([ 4, 5 ])\n      expect(__internals__.getEndpointsForOperation).toHaveBeenCalledWith(store, operation)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getAuthReferences with empty array if no global or local security', () => {\n      spyOn(__internals__, 'getRequestIdFromOperation').andReturn(123)\n      spyOn(__internals__, 'getParameterContainerForOperation').andReturn(321)\n      spyOn(__internals__, 'getAuthReferences').andReturn(234)\n      spyOn(__internals__, 'getResponsesForOperation').andReturn(432)\n      spyOn(__internals__, 'getInterfacesFromTags').andReturn(345)\n      spyOn(__internals__, 'getEndpointsForOperation').andReturn(543)\n\n      const description = 'some desc'\n      const summary = 'someName'\n\n      const store = new Store()\n      const operation = { description, summary, tags: [ 4, 5 ] }\n      const security = null\n      const entry = {\n        key: 'post',\n        value: operation\n      }\n\n      const expected = {\n        key: 'post',\n        value: new Request({\n          id: 123,\n          endpoints: 543,\n          name: summary,\n          description,\n          parameters: 321,\n          method: 'post',\n          auths: 234,\n          responses: 432,\n          interfaces: 345\n        })\n      }\n\n      const actual = __internals__.convertOperationIntoRequest(store, security, entry)\n\n      expect(__internals__.getRequestIdFromOperation).toHaveBeenCalledWith(operation)\n      expect(__internals__.getParameterContainerForOperation).toHaveBeenCalledWith(\n        store, operation, 'post'\n      )\n      expect(__internals__.getAuthReferences).toHaveBeenCalledWith(store, [])\n      expect(__internals__.getResponsesForOperation).toHaveBeenCalledWith(store, operation)\n      expect(__internals__.getInterfacesFromTags).toHaveBeenCalledWith([ 4, 5 ])\n      expect(__internals__.getEndpointsForOperation).toHaveBeenCalledWith(store, operation)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      spyOn(__internals__, 'getRequestIdFromOperation').andReturn(123)\n      spyOn(__internals__, 'getParameterContainerForOperation').andReturn(321)\n      spyOn(__internals__, 'getAuthReferences').andReturn(234)\n      spyOn(__internals__, 'getResponsesForOperation').andReturn(432)\n      spyOn(__internals__, 'getInterfacesFromTags').andReturn(345)\n      spyOn(__internals__, 'getEndpointsForOperation').andReturn(543)\n\n      const store = new Store()\n      const operation = {}\n      const security = null\n      const entry = {\n        key: 'post',\n        value: operation\n      }\n\n      const expected = {\n        key: 'post',\n        value: new Request({\n          id: 123,\n          endpoints: 543,\n          parameters: 321,\n          method: 'post',\n          auths: 234,\n          responses: 432,\n          interfaces: 345\n        })\n      }\n\n      const actual = __internals__.convertOperationIntoRequest(store, security, entry)\n\n      expect(__internals__.getRequestIdFromOperation).toHaveBeenCalledWith(operation)\n      expect(__internals__.getParameterContainerForOperation).toHaveBeenCalledWith(\n        store, operation, 'post'\n      )\n      expect(__internals__.getAuthReferences).toHaveBeenCalledWith(store, [])\n      expect(__internals__.getResponsesForOperation).toHaveBeenCalledWith(store, operation)\n      expect(__internals__.getInterfacesFromTags).toHaveBeenCalledWith([])\n      expect(__internals__.getEndpointsForOperation).toHaveBeenCalledWith(store, operation)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getAuthReferences with global security if no local security', () => {\n      spyOn(__internals__, 'getRequestIdFromOperation').andReturn(123)\n      spyOn(__internals__, 'getParameterContainerForOperation').andReturn(321)\n      spyOn(__internals__, 'getAuthReferences').andReturn(234)\n      spyOn(__internals__, 'getResponsesForOperation').andReturn(432)\n      spyOn(__internals__, 'getInterfacesFromTags').andReturn(345)\n      spyOn(__internals__, 'getEndpointsForOperation').andReturn(543)\n\n      const description = 'some desc'\n      const summary = 'someName'\n\n      const store = new Store()\n      const operation = { description, summary, tags: [ 4, 5 ] }\n      const security = [ 1, 2, 3 ]\n      const entry = {\n        key: 'post',\n        value: operation\n      }\n\n      const expected = {\n        key: 'post',\n        value: new Request({\n          id: 123,\n          endpoints: 543,\n          name: summary,\n          description,\n          parameters: 321,\n          method: 'post',\n          auths: 234,\n          responses: 432,\n          interfaces: 345\n        })\n      }\n\n      const actual = __internals__.convertOperationIntoRequest(store, security, entry)\n\n      expect(__internals__.getRequestIdFromOperation).toHaveBeenCalledWith(operation)\n      expect(__internals__.getParameterContainerForOperation).toHaveBeenCalledWith(\n        store, operation, 'post'\n      )\n      expect(__internals__.getAuthReferences).toHaveBeenCalledWith(store, [ 1, 2, 3 ])\n      expect(__internals__.getResponsesForOperation).toHaveBeenCalledWith(store, operation)\n      expect(__internals__.getInterfacesFromTags).toHaveBeenCalledWith([ 4, 5 ])\n      expect(__internals__.getEndpointsForOperation).toHaveBeenCalledWith(store, operation)\n      expect(actual).toEqual(expected)\n    })\n\n    /* eslint-enable max-statements */\n  })\n\n  describe('@createReferencesForEndpoints', () => {\n    it('should work', () => {\n      const store = new Store({\n        endpoint: new OrderedMap({\n          '123': 123,\n          '321': 321\n        })\n      })\n\n      const expected = new OrderedMap({\n        '123': new Reference({ type: 'endpoint', uuid: '123' }),\n        '321': new Reference({ type: 'endpoint', uuid: '321' })\n      })\n\n      const actual = __internals__.createReferencesForEndpoints(store)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRequestsForResource', () => {\n    /* eslint-disable max-statements */\n    it('should call all expected methods', () => {\n      spyOn(__internals__, 'getMethodsFromResourceObject').andReturn([\n        {\n          key: 1,\n          value: 1\n        }, {\n          key: 2,\n          value: 2\n        }, {\n          key: 3,\n          value: 3\n        }\n      ])\n      spyOn(__internals__, 'updateOperationEntryWithSharedParameters').andReturn({\n        key: 123, value: 321\n      })\n      spyOn(__internals__, 'convertOperationIntoRequest').andReturn({\n        key: 321, value: 321\n      })\n\n      const store = new Store()\n      const security = null\n      const resourceObject = {\n        parameters: [ 1, 2, 3, 4 ]\n      }\n\n      const expected = { '321': 321 }\n      const actual = __internals__.getRequestsForResource(store, security, resourceObject)\n\n      expect(__internals__.getMethodsFromResourceObject).toHaveBeenCalledWith(resourceObject)\n      expect(__internals__.updateOperationEntryWithSharedParameters.calls.length).toEqual(3)\n      expect(__internals__.convertOperationIntoRequest.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      spyOn(__internals__, 'getMethodsFromResourceObject').andReturn([\n        {\n          key: 1,\n          value: 1\n        }, {\n          key: 2,\n          value: 2\n        }, {\n          key: 3,\n          value: 3\n        }\n      ])\n      spyOn(__internals__, 'updateOperationEntryWithSharedParameters').andReturn({\n        key: 123, value: 321\n      })\n      spyOn(__internals__, 'convertOperationIntoRequest').andReturn({\n        key: 321, value: 321\n      })\n\n      const store = new Store()\n      const security = null\n      const resourceObject = {}\n\n      const expected = { '321': 321 }\n      const actual = __internals__.getRequestsForResource(store, security, resourceObject)\n\n      expect(__internals__.getMethodsFromResourceObject).toHaveBeenCalledWith(resourceObject)\n      expect(__internals__.updateOperationEntryWithSharedParameters.calls.length).toEqual(3)\n      expect(__internals__.convertOperationIntoRequest.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@updatePathWithParametersFromOperations', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getParameterContainerForOperation').andCall((s, v, k) => {\n        return v ?\n          new ParameterContainer({\n            path: OrderedMap({\n              [k]: new Parameter({\n                key: k,\n                default: v\n              })\n            })\n          }) :\n          new ParameterContainer()\n      })\n      /* eslint-disable no-undefined */\n      const inputs = [\n        [ new Store(), new URL(), undefined ],\n        [ new Store(), new URL(), {} ],\n        [ new Store(), new URL(), { key: 'abc', value: 123 } ],\n        [\n          new Store(),\n          new URL({ url: 'https://echo.paw.cloud/user/123' }),\n          { key: 'abc', value: 123 }\n        ],\n        [\n          new Store(),\n          new URL({\n            url: 'https://echo.paw.cloud/user/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }),\n          { key: 'abc', value: 123 }\n        ],\n        [\n          new Store(),\n          new URL({\n            url: 'https://echo.paw.cloud/user/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }),\n          { key: 'userId', value: 123 }\n        ]\n      ]\n      /* eslint-enable no-undefined */\n\n      const expected = [\n        new URL(),\n        new URL(),\n        new URL(),\n        new URL({ url: 'https://echo.paw.cloud/user/123' }),\n        new URL({\n          url: 'https://echo.paw.cloud/user/{userId}',\n          variableDelimiters: List([ '{', '}' ])\n        }),\n        (new URL({\n          url: 'https://echo.paw.cloud/user/{userId}',\n          variableDelimiters: List([ '{', '}' ])\n        })).setIn([ 'pathname', 'parameter', 'value' ], List([\n          new Parameter({\n            type: 'string',\n            default: '/user/'\n          }),\n          new Parameter({\n            key: 'userId',\n            default: 123\n          }),\n          new Parameter({\n            type: 'string',\n            default: ''\n          })\n        ]))\n      ]\n      const actual = inputs.map(\n        input => __internals__.updatePathWithParametersFromOperations(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getResource', () => {\n    it('should work if underlying methods work', () => {\n      spyOn(__internals__, 'getRequestsForResource').andReturn({ a: 123 })\n      spyOn(__internals__, 'createReferencesForEndpoints').andReturn(321)\n      spyOn(__internals__, 'updatePathWithParametersFromOperations').andCall((s, p) => p)\n\n      const store = new Store()\n      const security = null\n      const paths = {}\n      const path = '/some/path'\n\n      const expected = new Resource({\n        path: new URL({\n          url: path,\n          variableDelimiters: List([ '{', '}' ])\n        }),\n        endpoints: 321,\n        uuid: path,\n        methods: Map({ a: 123 })\n      })\n\n      const actual = __internals__.getResource(store, security, paths, path)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getResources', () => {\n    it('should work if underlying methods work', () => {\n      spyOn(__internals__, 'getResource').andReturn(new Resource({ uuid: 123 }))\n\n      const store = new Store()\n      const swagger = {\n        paths: {\n          a: '123'\n        }\n      }\n\n      const expected = new OrderedMap({\n        '123': new Resource({ uuid: 123 })\n      })\n\n      const actual = __internals__.getResources(store, swagger)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      spyOn(__internals__, 'getResource').andReturn(new Resource({ uuid: 123 }))\n\n      const store = new Store()\n\n      const expected = new OrderedMap()\n\n      const actual = __internals__.getResources(store)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addDotsToScheme', () => {\n    it('should work', () => {\n      const inputs = [ 'http', 'https:', 'ns:urn' ]\n\n      const expected = [ 'http:', 'https:', 'ns:urn:' ]\n      const actual = inputs.map(__internals__.addDotsToScheme)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedEndpoints', () => {\n    it('should work with minimum info', () => {\n      const expected = {\n        base: new URL({\n          url: 'http://localhost/',\n          uuid: 'base',\n          secure: false,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      }\n      const actual = __internals__.getSharedEndpoints()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const swagger = {\n        schemes: [ 'https:' ],\n        host: 'some.host.com',\n        basePath: '/v2'\n      }\n\n      const expected = {\n        base: new URL({\n          url: 'https://some.host.com/v2',\n          uuid: 'base',\n          secure: true,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      }\n      const actual = __internals__.getSharedEndpoints(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with missing basePath', () => {\n      const swagger = {\n        schemes: [ 'https:' ],\n        host: 'some.host.com'\n      }\n\n      const expected = {\n        base: new URL({\n          url: 'https://some.host.com/',\n          uuid: 'base',\n          secure: true,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      }\n      const actual = __internals__.getSharedEndpoints(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with missing host', () => {\n      const swagger = {\n        schemes: [ 'https:' ]\n      }\n\n      const expected = {\n        base: new URL({\n          url: 'https://localhost/',\n          uuid: 'base',\n          secure: true,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      }\n      const actual = __internals__.getSharedEndpoints(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with everything missing', () => {\n      const swagger = {}\n\n      const expected = {\n        base: new URL({\n          url: 'http://localhost/',\n          uuid: 'base',\n          secure: false,\n          variableDelimiters: List([ '{', '}' ])\n        })\n      }\n      const actual = __internals__.getSharedEndpoints(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParamsFromConsumes', () => {\n    it('should work', () => {\n      const contentTypes = [ 'application/json', 'application/xml' ]\n      const expected = {\n        consumesParams: {\n          globalConsumes: new Parameter({\n            uuid: 'globalConsumes',\n            in: 'headers',\n            key: 'Content-Type',\n            name: 'Content Type Header',\n            description: 'describes the media type of the request',\n            type: 'string',\n            required: true,\n            constraints: List([\n              new Constraint.Enum(contentTypes)\n            ]),\n            interfaces: Map({\n              apiRequestMediaType: new Reference({\n                type: 'interface',\n                uuid: 'apiRequestMediaType'\n              })\n            })\n          })\n        },\n        consumeInterfaces: {\n          apiRequestMediaType: new Interface({\n            name: 'apiRequestMediaType',\n            uuid: 'apiRequestMediaType',\n            level: 'request',\n            description: 'defines the common media type of requests in the API.'\n          })\n        }\n      }\n\n      const actual = __internals__.getParamsFromConsumes(contentTypes)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      const expected = {\n        consumesParams: {},\n        consumeInterfaces: {}\n      }\n      const actual = __internals__.getParamsFromConsumes()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParamsFromProduces', () => {\n    it('should work', () => {\n      const contentTypes = [ 'application/json', 'application/xml' ]\n      const expected = {\n        producesParams: {\n          globalProduces: new Parameter({\n            usedIn: 'response',\n            uuid: 'globalProduces',\n            in: 'headers',\n            key: 'Content-Type',\n            name: 'Content Type Header',\n            description: 'describes the media type of the response',\n            type: 'string',\n            required: true,\n            constraints: List([\n              new Constraint.Enum(contentTypes)\n            ]),\n            interfaces: Map({\n              apiResponseMediaType: new Reference({\n                type: 'interface',\n                uuid: 'apiResponseMediaType'\n              })\n            })\n          })\n        },\n        produceInterfaces: {\n          apiResponseMediaType: new Interface({\n            name: 'apiResponseMediaType',\n            uuid: 'apiResponseMediaType',\n            level: 'response',\n            description: 'defines the common media type of responses in the API.'\n          })\n        }\n      }\n\n      const actual = __internals__.getParamsFromProduces(contentTypes)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      const expected = {\n        consumesParams: {},\n        consumeInterfaces: {}\n      }\n      const actual = __internals__.getParamsFromProduces()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@formatConstraint', () => {\n    it('should work with exclusiveMinimum', () => {\n      const param = {\n        minimum: 123,\n        exclusiveMinimum: true\n      }\n\n      const entry = {\n        key: 'exclusiveMinimum',\n        value: true\n      }\n\n      const expected = new Constraint.ExclusiveMinimum(123)\n      const actual = __internals__.formatConstraint(param, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with exclusiveMinimum = false', () => {\n      const param = {\n        minimum: 123,\n        exclusiveMinimum: false\n      }\n\n      const entry = {\n        key: 'exclusiveMinimum',\n        value: false\n      }\n\n      const expected = new Constraint.Minimum(123)\n      const actual = __internals__.formatConstraint(param, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with exclusiveMaximum', () => {\n      const param = {\n        maximum: 123,\n        exclusiveMaximum: true\n      }\n\n      const entry = {\n        key: 'exclusiveMaximum',\n        value: true\n      }\n\n      const expected = new Constraint.ExclusiveMaximum(123)\n      const actual = __internals__.formatConstraint(param, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with exclusiveMaximum = false', () => {\n      const param = {\n        maximum: 123,\n        exclusiveMaximum: false\n      }\n\n      const entry = {\n        key: 'exclusiveMaximum',\n        value: false\n      }\n\n      const expected = new Constraint.Maximum(123)\n      const actual = __internals__.formatConstraint(param, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should preserve unknown constraints', () => {\n      const param = {\n        custom: 234\n      }\n\n      const entry = {\n        key: 'custom',\n        value: 234\n      }\n\n      const expected = new Constraint.JSONSchema({ custom: 234 })\n      const actual = __internals__.formatConstraint(param, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work in general', () => {\n      const param = {}\n\n      const entries = [\n        {\n          key: 'minimum',\n          value: 12\n        },\n        {\n          key: 'maximum',\n          value: 12\n        },\n        {\n          key: 'multipleOf',\n          value: 12\n        },\n        {\n          key: 'minLength',\n          value: 12\n        },\n        {\n          key: 'maxLength',\n          value: 12\n        },\n        {\n          key: 'pattern',\n          value: '^.{12}$'\n        },\n        {\n          key: 'minItems',\n          value: 12\n        },\n        {\n          key: 'maxItems',\n          value: 12\n        },\n        {\n          key: 'uniqueItems',\n          value: 12\n        },\n        {\n          key: 'enum',\n          value: [ 12 ]\n        },\n        {\n          key: 'schema',\n          value: { enum: [ 12 ] }\n        }\n      ]\n\n      const expected = [\n        new Constraint.Minimum(12),\n        new Constraint.Maximum(12),\n        new Constraint.MultipleOf(12),\n        new Constraint.MinimumLength(12),\n        new Constraint.MaximumLength(12),\n        new Constraint.Pattern('^.{12}$'),\n        new Constraint.MinimumItems(12),\n        new Constraint.MaximumItems(12),\n        new Constraint.UniqueItems(12),\n        new Constraint.Enum([ 12 ]),\n        new Constraint.JSONSchema({ enum: [ 12 ] })\n      ]\n\n      const actual = entries.map((entry) => __internals__.formatConstraint(param, entry))\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@filterConstraintEntries', () => {\n    it('should work', () => {\n      const entries = [\n        { key: 'minimum' },\n        { key: 'maximum' },\n        { key: 'exclusiveMinimum' },\n        { key: 'exclusiveMaximum' },\n        { key: 'multipleOf' },\n        { key: 'minLength' },\n        { key: 'maxLength' },\n        { key: 'pattern' },\n        { key: 'minItems' },\n        { key: 'maxItems' },\n        { key: 'uniqueItems' },\n        { key: 'enum' },\n        { key: 'schema' },\n        { key: 'notAConstraint' },\n        { key: 'alsoNotAConstraint' }\n      ]\n\n      const expected = [\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        true,\n        false,\n        false\n      ]\n\n      const actual = entries.map(__internals__.filterConstraintEntries)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getConstraintsFromParam', () => {\n    it('should work', () => {\n      const param = {\n        maximum: 321,\n        minimum: 123,\n        multipleOf: 5\n      }\n\n      const expected = List([\n        new Constraint.Maximum(321),\n        new Constraint.Minimum(123),\n        new Constraint.MultipleOf(5)\n      ])\n\n      const actual = __internals__.getConstraintsFromParam(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getApplicableContextsFromLocation', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'application/json',\n        'formData'\n      ]\n      const expected = [\n        List(),\n        List(),\n        List([\n          new Parameter({\n            key: 'Content-Type',\n            in: 'headers',\n            constraints: List([\n              new Constraint.Enum([\n                'application/x-www-form-urlencoded',\n                'multipart/form-data'\n              ])\n            ])\n          })\n        ])\n      ]\n      const actual = inputs.map(input => __internals__.getApplicableContextsFromLocation(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterObjectIntoParameter', () => {\n    it('should work', () => {\n      const entry = {\n        key: 'UserId',\n        value: {\n          name: 'userId',\n          in: 'query',\n          type: 'integer',\n          description: 'the user id',\n          required: true,\n          maximum: 321,\n          minimum: 123,\n          multipleOf: 5,\n          default: 100\n        }\n      }\n\n      const expected = {\n        key: 'UserId',\n        value: new Parameter({\n          key: 'userId',\n          name: 'userId',\n          in: 'queries',\n          uuid: 'UserId',\n          description: 'the user id',\n          required: true,\n          type: 'integer',\n          default: 100,\n          constraints: List([\n            new Constraint.Maximum(321),\n            new Constraint.Minimum(123),\n            new Constraint.MultipleOf(5)\n          ])\n        })\n      }\n\n      const actual = __internals__.convertParameterObjectIntoParameter(entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with type array', () => {\n      const entry = {\n        key: 'UserIds',\n        value: {\n          name: 'userIds',\n          in: 'query',\n          type: 'array',\n          items: {\n            name: 'userId',\n            in: 'query',\n            type: 'integer',\n            description: 'the user id',\n            required: true,\n            maximum: 321,\n            minimum: 123,\n            multipleOf: 5,\n            default: 100\n          }\n        }\n      }\n\n      const expected = {\n        key: 'UserIds',\n        value: new Parameter({\n          in: 'queries',\n          key: 'userIds',\n          name: 'userIds',\n          uuid: 'UserIds',\n          type: 'array',\n          required: false,\n          value: new Parameter({\n            key: 'userId',\n            name: 'userId',\n            in: 'queries',\n            description: 'the user id',\n            required: true,\n            type: 'integer',\n            default: 100,\n            constraints: List([\n              new Constraint.Maximum(321),\n              new Constraint.Minimum(123),\n              new Constraint.MultipleOf(5)\n            ])\n          })\n        })\n      }\n\n      const actual = __internals__.convertParameterObjectIntoParameter(entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with minimum info', () => {\n      spyOn(__internals__, 'getConstraintsFromParam').andReturn(890)\n\n      const inputs = [\n        { key: null, value: null },\n        { key: 123, value: {} },\n        { key: 123, value: { name: 234, description: 345, required: 456, type: 567 } },\n        { key: 123, value: { name: 234, description: 345, required: 456, type: 567, in: 'query' } },\n        { key: 123, value: {\n          name: 234, description: 345, required: 456, type: 567, in: 678, default: 789\n        } },\n        { key: 123, value: {\n          name: 234, description: 345, required: 456, type: 567, in: 'body', default: 789\n        } }\n      ]\n      const expected = [\n        { key: null,\n          value: new Parameter({\n            uuid: null, key: null, name: null,\n            description: null, in: null, required: false,\n            type: null, default: null,\n            constraints: 890, applicableContexts: List()\n          })\n        },\n        { key: 123,\n          value: new Parameter({\n            uuid: 123, key: null, name: null,\n            description: null, in: null, required: false,\n            type: null, default: null,\n            constraints: 890, applicableContexts: List()\n          })\n        },\n        { key: 123,\n          value: new Parameter({\n            uuid: 123, key: 234, name: 234,\n            description: 345, in: null, required: 456,\n            type: 567, default: null,\n            constraints: 890, applicableContexts: List()\n          })\n        },\n        { key: 123,\n          value: new Parameter({\n            uuid: 123, key: 234, name: 234,\n            description: 345, in: 'queries', required: 456,\n            type: 567, default: null,\n            constraints: 890, applicableContexts: List()\n          })\n        },\n        { key: 123,\n          value: new Parameter({\n            uuid: 123, key: 234, name: 234,\n            description: 345, in: null, required: 456,\n            type: 567, default: 789,\n            constraints: 890, applicableContexts: List()\n          })\n        },\n        { key: 123,\n          value: new Parameter({\n            uuid: 123, key: null, name: 234,\n            description: 345, in: 'body', required: 456,\n            type: 567, default: 789,\n            constraints: 890, applicableContexts: List()\n          })\n        }\n      ]\n      const actual = inputs.map(input => __internals__.convertParameterObjectIntoParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterObjectArrayIntoParameterMap', () => {\n    it('should work with minimum info', () => {\n      const expected = {}\n      const actual = __internals__.convertParameterObjectArrayIntoParameterMap()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call convertParameterObjectIntoParameter for each entry', () => {\n      spyOn(__internals__, 'convertParameterObjectIntoParameter').andReturn({\n        key: '123',\n        value: 123\n      })\n\n      const params = [ 1, 2, 3 ]\n      const expected = { '123': 123 }\n      const actual = __internals__.convertParameterObjectArrayIntoParameterMap(params)\n\n      expect(__internals__.convertParameterObjectIntoParameter.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedParameters', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getParamsFromConsumes').andReturn({\n        consumesParams: { a: 123 },\n        consumeInterfaces: { d: 432 }\n      })\n      spyOn(__internals__, 'getParamsFromProduces').andReturn({\n        producesParams: { b: 321 },\n        produceInterfaces: { e: 345 }\n      })\n      spyOn(__internals__, 'convertParameterObjectArrayIntoParameterMap').andReturn({ c: 234 })\n\n      const swagger = {\n        consumes: [],\n        produces: [],\n        parameters: {}\n      }\n\n      const expected = {\n        sharedParameters: { a: 123, b: 321, c: 234 },\n        parameterInterfaces: { d: 432, e: 345 }\n      }\n      const actual = __internals__.getSharedParameters(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      spyOn(__internals__, 'getParamsFromConsumes').andReturn({\n        consumesParams: {},\n        consumeInterfaces: {}\n      })\n      spyOn(__internals__, 'getParamsFromProduces').andReturn({\n        producesParams: {},\n        produceInterfaces: {}\n      })\n      spyOn(__internals__, 'convertParameterObjectArrayIntoParameterMap').andReturn({})\n\n      const expected = {\n        sharedParameters: {},\n        parameterInterfaces: {}\n      }\n\n      const actual = __internals__.getSharedParameters()\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaIntoParameterEntry', () => {\n    it('should work', () => {\n      const schema = {\n        type: 'string'\n      }\n\n      const expected = {\n        key: 'body',\n        value: new Parameter({\n          usedIn: 'response',\n          uuid: 'body',\n          constraints: List([\n            new Constraint.JSONSchema(schema)\n          ])\n        })\n      }\n      const actual = __internals__.convertSchemaIntoParameterEntry(schema)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addUsedInResponseToParam', () => {\n    it('should work', () => {\n      const inputs = [\n        123,\n        null,\n        new Parameter(),\n        new Parameter({ usedIn: 'something' }),\n        new Parameter({ key: 123, name: 234, usedIn: 'something' })\n      ]\n      const expected = [\n        123,\n        null,\n        new Parameter({ usedIn: 'response' }),\n        new Parameter({ usedIn: 'response' }),\n        new Parameter({ key: 123, name: 234, usedIn: 'response' })\n      ]\n      const actual = inputs.map(input => __internals__.addUsedInResponseToParam(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResponseParameterContainer', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertSchemaIntoParameterEntry').andReturn({\n        key: '321', value: 321\n      })\n      spyOn(__internals__, 'convertParameterObjectArrayIntoParameterMap').andReturn({\n        '123': 123\n      })\n\n      const responseObj = {\n        schema: {},\n        headers: { a: 'bc' }\n      }\n\n      const expected = new ParameterContainer({\n        body: new OrderedMap({ '321': 321 }),\n        headers: new OrderedMap({ '123': 123 })\n      })\n\n      const actual = __internals__.createResponseParameterContainer(responseObj)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResponseObjectIntoResponse', () => {\n    it('should work with reference', () => {\n      const entry = {\n        key: 123,\n        value: {\n          code: 200,\n          $ref: 321\n        }\n      }\n\n      const expected = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 321,\n          overlay: new Response({ code: 200 })\n        })\n      }\n\n      const actual = __internals__.convertResponseObjectIntoResponse(entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with reference and no code', () => {\n      const entry = {\n        key: 123,\n        value: {\n          $ref: 321\n        }\n      }\n\n      const expected = {\n        key: 123,\n        value: new Reference({\n          type: 'response',\n          uuid: 321,\n          overlay: null\n        })\n      }\n\n      const actual = __internals__.convertResponseObjectIntoResponse(entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with response', () => {\n      const entry = {\n        key: 123,\n        value: {\n          code: 200,\n          description: 'desc'\n        }\n      }\n\n      const expected = {\n        key: 123,\n        value: new Response({\n          code: 200,\n          description: 'desc'\n        })\n      }\n\n      const actual = __internals__.convertResponseObjectIntoResponse(entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with response with no code', () => {\n      const entry = {\n        key: 123,\n        value: {}\n      }\n\n      const expected = {\n        key: 123,\n        value: new Response({\n          code: null,\n          description: null\n        })\n      }\n\n      const actual = __internals__.convertResponseObjectIntoResponse(entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedResponses', () => {\n    it('should work with defaults', () => {\n      const expected = {}\n\n      const actual = __internals__.getSharedResponses()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertResponseObjectIntoResponse').andReturn({\n        key: '321',\n        value: 321\n      })\n\n      const swagger = {\n        responses: {\n          a: 123\n        }\n      }\n\n      const expected = {\n        '321': 321\n      }\n\n      const actual = __internals__.getSharedResponses(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAuthType', () => {\n    it('should work with defaults', () => {\n      const expected = null\n      const actual = __internals__.getAuthType()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const auth = {\n        type: 'basic'\n      }\n\n      const expected = 'basic'\n      const actual = __internals__.getAuthType(auth)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addInterfaceToAuthInstance', () => {\n    it('should work', () => {\n      const authInstance = {\n        someKey: 123\n      }\n\n      const itf = new Interface({\n        name: 'someName'\n      })\n\n      const expected = {\n        someKey: 123,\n        interfaces: Map({\n          someName: itf\n        })\n      }\n\n      const actual = __internals__.addInterfaceToAuthInstance(authInstance, itf)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBasicAuth', () => {\n    it('should work with minimum info', () => {\n      const itf = null\n\n      const authName = 'basic_auth'\n\n      const expected = new Auth.Basic({\n        authName: 'basic_auth'\n      })\n\n      const actual = __internals__.convertBasicAuth(itf, authName)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const itf = new Interface({\n        name: 'someName'\n      })\n\n      const authInstance = {\n        description: 123\n      }\n\n      const authName = 'basic_auth'\n\n      const expected = new Auth.Basic({\n        description: 123,\n        authName: 'basic_auth',\n        interfaces: Map({\n          someName: itf\n        })\n      })\n\n      const actual = __internals__.convertBasicAuth(itf, authName, authInstance)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertApiKeyAuth', () => {\n    it('should work with minimum info', () => {\n      const itf = null\n\n      const authName = 'apikey_auth'\n\n      const expected = new Auth.ApiKey({\n        authName: 'apikey_auth'\n      })\n\n      const actual = __internals__.convertApiKeyAuth(itf, authName)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const itf = new Interface({\n        name: 'someName'\n      })\n\n      const authName = 'apikey_auth'\n\n      const authInstance = {\n        description: 123,\n        name: 'api_key'\n      }\n\n      const expected = new Auth.ApiKey({\n        description: 123,\n        name: 'api_key',\n        authName: 'apikey_auth',\n        interfaces: Map({\n          someName: itf\n        })\n      })\n\n      const actual = __internals__.convertApiKeyAuth(itf, authName, authInstance)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertOAuth2Auth', () => {\n    it('should work with minimum info', () => {\n      const itf = null\n\n      const authName = 'oauth2_auth'\n\n      const expected = new Auth.OAuth2({\n        authName: 'oauth2_auth'\n      })\n\n      const actual = __internals__.convertOAuth2Auth(itf, authName)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const itf = new Interface({\n        name: 'someName'\n      })\n\n      const authName = 'oauth2_auth'\n\n      const authInstance = {\n        description: 123,\n        flow: 321,\n        tokenUrl: 234,\n        authorizationUrl: 432\n      }\n\n      const expected = new Auth.OAuth2({\n        description: 123,\n        flow: 321,\n        tokenUrl: 234,\n        authorizationUrl: 432,\n        authName: 'oauth2_auth',\n        interfaces: Map({\n          someName: itf\n        })\n      })\n\n      const actual = __internals__.convertOAuth2Auth(itf, authName, authInstance)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertAuthObjectIntoAuth', () => {\n    it('should work with unknown authType', () => {\n      const itfs = []\n      const entry = {\n        key: 'petstore_auth',\n        value: {\n          type: 'x-custom'\n        }\n      }\n\n      const expected = {\n        key: 'petstore_auth',\n        value: null\n      }\n\n      const actual = __internals__.convertAuthObjectIntoAuth(itfs, entry)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const itfs = []\n      const entry = {\n        key: 'petstore_auth',\n        value: {\n          type: 'oauth2'\n        }\n      }\n\n      const expected = {\n        key: 'petstore_auth',\n        value: new Auth.OAuth2({\n          authName: 'petstore_auth'\n        })\n      }\n\n      const actual = __internals__.convertAuthObjectIntoAuth(itfs, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedAuths', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertAuthObjectIntoAuth').andReturn({\n        key: '123',\n        value: 123\n      })\n\n      const itfs = {}\n      const swagger = {\n        securityDefinitions: {\n          a: 321\n        }\n      }\n\n      const expected = { '123': 123 }\n      const actual = __internals__.getSharedAuths(itfs, swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSecurityRequirementEntryIntoInterfaceEntry', () => {\n    it('should work with underlay', () => {\n      const entry = { key: 123, value: [ 234, 345 ] }\n      const expected = {\n        key: 123,\n        value: new Interface({\n          name: 123,\n          uuid: 123,\n          level: 'auth',\n          underlay: new Auth.OAuth2({\n            scopes: List([ { key: 234, value: '' }, { key: 345, value: '' } ])\n          })\n        })\n      }\n      const actual = __internals__.convertSecurityRequirementEntryIntoInterfaceEntry(entry)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const entry = { key: 123 }\n      const expected = {\n        key: 123,\n        value: new Interface({\n          name: 123,\n          uuid: 123,\n          level: 'auth'\n        })\n      }\n      const actual = __internals__.convertSecurityRequirementEntryIntoInterfaceEntry(entry)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedAuthInterfaces', () => {\n    it('should work with minimum info', () => {\n      const expected = {}\n      const actual = __internals__.getSharedAuthInterfaces()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertSecurityRequirementEntryIntoInterfaceEntry').andReturn({\n        key: '123',\n        value: 123\n      })\n\n      const swagger = {\n        security: [\n          {\n            petstore_auth: []\n          }\n        ]\n      }\n\n      const expected = { '123': 123 }\n      const actual = __internals__.getSharedAuthInterfaces(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertDefinitionIntoConstraint', () => {\n    it('should work', () => {\n      const inputs = [\n        { key: null, value: null },\n        { key: 123, value: null },\n        { key: 123, value: { type: 'string' } }\n      ]\n      const expected = [\n        { key: null, value: new Constraint.JSONSchema(null) },\n        { key: 123, value: new Constraint.JSONSchema(null) },\n        { key: 123, value: new Constraint.JSONSchema({ type: 'string' }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertDefinitionIntoConstraint(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSharedConstraints', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertDefinitionIntoConstraint').andCall(({ key, value }) => {\n        return { key, value: value * 2 }\n      })\n      /* eslint-disable no-undefined */\n      const inputs = [\n        undefined,\n        {},\n        { definitions: {} },\n        { definitions: { a: 123, b: 234, c: 345 } }\n      ]\n      /* eslint-enable no-undefined */\n      const expected = [\n        {},\n        {},\n        {},\n        { a: 123 * 2, b: 234 * 2, c: 345 * 2 }\n      ]\n      const actual = inputs.map(input => __internals__.getSharedConstraints(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTagsFromPathObject', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getMethodsFromResourceObject').andCall(v => [\n        { value: { tags: v } }, { value: { tags: [ 234, 345 ] } }\n      ])\n      const inputs = [\n        { value: null },\n        { value: [ 123, 234 ] }\n      ]\n      const expected = [\n        [ 234, 345 ],\n        [ 123, 234, 234, 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTagsFromPathObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTagsFromPathsObject', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractTagsFromPathObject').andCall(({ value }) => value)\n      /* eslint-disable no-undefined */\n      const inputs = [\n        undefined,\n        {},\n        { paths: {} },\n        { paths: { a: [ 123, 234 ], b: [ 234 ], c: [ 123 ] } }\n      ]\n      /* eslint-enable no-undefined */\n      const expected = [\n        [],\n        [],\n        [],\n        [ 123, 234, 234, 123 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTagsFromPathsObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertTagStringIntoInterfaceEntry', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        'abc'\n      ]\n      const expected = [\n        { key: null, value: new Interface({ name: null, uuid: null, level: 'request' }) },\n        { key: 'abc', value: new Interface({ name: 'abc', uuid: 'abc', level: 'request' }) }\n      ]\n      const actual = inputs.map(input => __internals__.convertTagStringIntoInterfaceEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getTagInterfaces', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractTagsFromPathsObject').andCall(v => v)\n      spyOn(__internals__, 'convertTagStringIntoInterfaceEntry').andCall(v => {\n        return { key: v, value: v }\n      })\n      const inputs = [\n        [ 123, 234, 345 ],\n        [ 123, 234, 345, 234, 123 ]\n      ]\n      const expected = [\n        { '123': 123, '234': 234, '345': 345 },\n        { '123': 123, '234': 234, '345': 345 }\n      ]\n      const actual = inputs.map(input => __internals__.getTagInterfaces(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSimpleStore', () => {\n    it('should work with minimum info', () => {\n      const expected = new Store({\n        endpoint: OrderedMap({\n          base: new URL({\n            url: 'http://localhost/',\n            variableDelimiters: List([ '{', '}' ])\n          })\n          .set('secure', false)\n          .set('uuid', 'base')\n        })\n      })\n\n      const actual = __internals__.getSimpleStore()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying calls are correct', () => {\n      spyOn(__internals__, 'getSharedEndpoints').andReturn({ a: 123 })\n      spyOn(__internals__, 'getSharedParameters').andReturn({\n        sharedParameters: { b: 234 },\n        parameterInterfaces: { f: 678 }\n      })\n      spyOn(__internals__, 'getSharedResponses').andReturn({ c: 345 })\n      spyOn(__internals__, 'getSharedAuthInterfaces').andReturn({ d: 456 })\n      spyOn(__internals__, 'getSharedAuths').andReturn({ e: 567 })\n\n      const swagger = {}\n\n      const expected = new Store({\n        endpoint: OrderedMap({ a: 123 }),\n        parameter: OrderedMap({ b: 234 }),\n        response: OrderedMap({ c: 345 }),\n        auth: OrderedMap({ e: 567 }),\n        interface: OrderedMap({ f: 678, d: 456 })\n      })\n\n      const actual = __internals__.getSimpleStore(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGroup', () => {\n    it('should work', () => {\n      const swagger = {\n        paths: {\n          a: 123,\n          b: 321\n        }\n      }\n\n      const expected = new Group({\n        id: null,\n        name: null,\n        description: 'All the requests',\n        children: new OrderedMap({\n          a: 'a',\n          b: 'b'\n        })\n      })\n\n      const actual = __internals__.getGroup(swagger)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createApi', () => {\n    it('should return an Api', () => {\n      const actual = __internals__.createApi()\n      expect(actual).toBeAn(Api)\n    })\n\n    it('should call getInfo', () => {\n      spyOn(__internals__, 'getInfo').andReturn(new Info())\n\n      const info = {\n        title: 'some API title'\n      }\n\n      const input = {\n        info\n      }\n\n      __internals__.createApi(input)\n\n      expect(__internals__.getInfo).toHaveBeenCalledWith(info)\n    })\n\n    xit('should call getResources')\n  })\n})\n"
  },
  {
    "path": "src/parsers/template/v1.0/Parser.js",
    "content": "/**\n * This is a template to help speed up the writing of a parser.\n *\n * A Parser converts a standardized file that describe an Api according to a certain format into the\n * internal model of API-Flow. If you want to learn more about the internal model, you can find more\n * information in `src/README.md`\n *\n * This template follows a very simple strategy that is not necessarily the best nor the most\n * elegant but yields decent implementation results. The strategy is to try to follow as closely as\n * possible the model in which the conversion should be done, which for a Parser is the internal\n * model, and to pass along all the necessary parts of the source model to create the components\n * of the target model. For example, if your model separates responses from requests in a resource\n * layer, then these responses would be passed along for the creation of Requests, as Responses\n * are a nested component of Request in the internal model.\n *\n * We found that working against the target model instead of from the source model yielded fewer\n * bugs than the opposite. This is, however, just a recommendation.\n */\nimport { OrderedMap, List } from 'immutable'\nimport { convertEntryListInMap } from '../../../utils/fp-utils'\n\nimport Api from '../../../models/Api'\nimport Info from '../../../models/Info'\nimport Group from '../../../models/Group'\nimport Store from '../../../models/Store'\nimport Reference from '../../../models/Reference'\nimport Resource from '../../../models/Resource'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Auth from '../../../models/Auth'\nimport Request from '../../../models/Request'\n\nconst methods = {}\n\nexport const __meta__ = {\n  version: 'v1.0',\n  format: 'template'\n}\n\n/**\n * A fake Parser to use as a reference to create new Parsers rapidly\n */\nexport class TemplateParser {\n  static __meta__ = __meta__\n\n  /**\n   * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n   * @param {string} content: the content of the file to evaluate\n   * @returns {number} the corresponding score, between 0 and 1\n   */\n  static detect(content) {\n    return methods.detect(content)\n  }\n\n  /**\n   * tries to extract a title from a RAML file\n   * @param {string} content: the file to get the api title from\n   * @returns {string?} the title, if it was found\n   */\n  static getAPIName(content) {\n    return methods.getAPIName(content)\n  }\n\n  /**\n   * converts an item into an intermediate model representation\n   * @returns {Api} the corresponding Api Record\n   */\n  static parse() {\n    return methods.parse(...arguments)\n  }\n}\n\n/**\n * evaluates if the file is parsable by giving a score to the file depending on a few criteria.\n * @param {string} content: the content of the file to evaluate\n * @returns {number} the corresponding score, between 0 and 1\n */\nmethods.detect = (content) => {\n  const detection = {\n    format: __meta__.format,\n    version: __meta__.version,\n    score: 0\n  }\n\n  try {\n    const json = JSON.parse(content)\n    if (!json.info || !json.item) {\n      return [ detection ]\n    }\n\n    if (!json.info.name || !json.info.schema) {\n      return [ detection ]\n    }\n\n    detection.score = 1\n    return [ detection ]\n  }\n  catch (e) {\n    return [ detection ]\n  }\n}\n\n/**\n * tries to extract a title from a RAML file\n * @param {string} content: the file to get the api title from\n * @returns {string?} the title, if it was found\n */\nmethods.getAPIName = (content) => {\n  try {\n    const json = JSON.parse(content)\n    if (!json.info || !json.item) {\n      return null\n    }\n\n    if (!json.info.name || !json.info.schema) {\n      return null\n    }\n\n    return json.info.name || null\n  }\n  catch (e) {\n    return null\n  }\n}\n\n// ** BEGIN INFO **\n/**\n * extracts an Info `title` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `title` field.\n * @returns {{key: 'title', value: string}?} the corresponding title field, as a key-value pair\n */\nmethods.extractInfoTitle = () => null\n\n/**\n * extracts an Info `description` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `description` field.\n * @returns {{key: 'description', value: string}?} the corresponding description field, as a\n * key-value pair\n */\nmethods.extractInfoDescription = () => null\n\n/**\n * extracts an Info `termsOfService` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `termsOfService` field.\n * @returns {{key: 'termsOfService', value: string}?} the corresponding termsOfService field, as a\n * key-value pair\n */\nmethods.extractInfoTermsOfService = () => null\n\n/**\n * extracts an Info `contact` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `contact` field.\n * @returns {{key: 'contact', value: Contact}?} the corresponding contact field, as a key-value\n * pair\n *\n * Note that the contact field should be a Contact Record if it exists\n */\nmethods.extractInfoContact = () => null\n\n/**\n * extracts an Info `license` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `license` field.\n * @returns {{key: 'license', value: Contact}?} the corresponding license field, as a key-value\n * pair\n *\n * Note that the license field should be a License Record if it exists\n */\nmethods.extractInfoLicense = () => null\n\n/**\n * extracts an Info `version` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `version` field.\n * @returns {{key: 'version', value: string}?} the corresponding version field, as a key-value pair\n *\n * Note that this refers to the version of the Api that is being converted, not the version of the\n * parser used to parse it.\n */\nmethods.extractInfoVersion = () => null\n\n/**\n * creates all the fields that are needed to fully construct an Info Record.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * Info Record.\n * @returns {InfoInstance} an object holding all the information necessary to the instantiation of\n * an Info Record.\n */\nmethods.extractInfoInstance = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractInfoTitle(itemOrSubItem),\n    methods.extractInfoDescription(itemOrSubItem),\n    methods.extractInfoTermsOfService(itemOrSubItem),\n    methods.extractInfoContact(itemOrSubItem),\n    methods.extractInfoLicense(itemOrSubItem),\n    methods.extractInfoVersion(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts an Api `info` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `info` field.\n * @returns {{key: 'info', value: Info}} the corresponding info field, as a key-value\n * pair\n *\n * Note that the info field should be an Info Record\n */\nmethods.extractInfo = (itemOrSubItem) => {\n  const infoInstance = methods.extractInfoInstance(itemOrSubItem)\n\n  return { key: 'info', value: new Info(infoInstance) }\n}\n// ** END INFO **\n\n// ** BEGIN GROUP **\n/**\n * extracts a Group `id` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * `id` field.\n * @returns {{ key: 'id', value: (string|number) }?} the corresponding id field, as a key-value pair\n */\nmethods.extractGroupId = () => null\n\n/**\n * extracts a Group `name` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `name` field.\n * @returns {{key: 'name', value: string}?} the corresponding name field, as a key-value pair\n */\nmethods.extractGroupName = () => null\n\n/**\n * extracts a Group `description` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `description` field.\n * @returns {{key: 'description', value: string}?} the corresponding description field, as a\n * key-value pair\n */\nmethods.extractGroupDescription = () => null\n\n/**\n * extracts a Group `children` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `children` field.\n * @returns {{key: 'chidren', value: OrderedMap<string, string|Group>}} the corresponding children\n * field, as a key-value pair\n *\n * Note that children must be an OrderedMap of ids (string) to either resourceIds (string) or\n * sub-groups (Groups).\n */\nmethods.extractGroupChildren = () => null\n\n/**\n * creates all the fields that are needed to fully construct a Group Record.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * Group Record.\n * @returns {GroupInstance} an object holding all the information necessary to the instantiation of\n * a Group Record.\n */\nmethods.extractGroupInstance = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractGroupId(itemOrSubItem),\n    methods.extractGroupName(itemOrSubItem),\n    methods.extractGroupDescription(itemOrSubItem),\n    methods.extractGroupChildren(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts an Api `group` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `group` field.\n * @returns {{key: 'group', value: Group}} the corresponding group field, as a key-value\n * pair\n *\n * Note that the group field should be a Group Record\n */\nmethods.extractGroup = (itemOrSubItem) => {\n  const groupInstance = methods.extractGroupInstance(itemOrSubItem)\n\n  return { key: 'group', value: new Group(groupInstance) }\n}\n// ** END GROUP **\n\n// ** BEGIN STORE **\n/**\n * extracts a shared aws-v4 auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of an aws-v4 auth.\n * @returns {{key: string, value: AWSSig4Auth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedAWSSig4AuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.AWSSig4({\n      authName: auth_name,\n      key: settings.key || null,\n      secret: settings.secret || null,\n      region: settings.region || null,\n      service: settings.service || null\n    })\n  }\n}\n\n/**\n * extracts a shared basic auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of an basic auth.\n * @returns {{key: string, value: BasicAuth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedBasicAuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.Basic({\n      authName: auth_name,\n      username: settings.username || null,\n      password: settings.password || null\n    })\n  }\n}\n\n/**\n * extracts a shared digest auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of a digest auth.\n * @returns {{key: string, value: DigestAuth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedDigestAuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.Digest({\n      authName: auth_name,\n      username: settings.username || null,\n      password: settings.password || null\n    })\n  }\n}\n\n/**\n * extracts a shared hawk auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of a hawk auth.\n * @returns {{key: string, value: HawkAuth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedHawkAuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.Hawk({\n      authName: auth_name,\n      id: settings.id || null,\n      key: settings.key || null,\n      algorithm: settings.algorithm || null\n    })\n  }\n}\n\n/**\n * extracts a shared OAuth1 auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of an OAuth1 auth.\n * @returns {{key: string, value: OAuth1Auth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedOAuth1AuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.OAuth1({\n      authName: auth_name,\n      consumerSecret: settings.consumerSecret || null,\n      consumerKey: settings.consumerKey || null,\n      token: settings.token || null,\n      tokenSecret: settings.tokenSecret || null\n    })\n  }\n}\n\n/**\n * extracts a shared OAuth2 auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of an OAuth2 auth.\n * @returns {{key: string, value: OAuth2Auth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedOAuth2AuthFromAuth = (auth) => {\n  const key = auth.unique_identifying_key\n  const auth_name = auth.auth_name || auth.unique_indentifying_key\n  const settings = auth.settings\n  return {\n    key: key,\n    value: new Auth.OAuth2({\n      authName: auth_name,\n      authorizationUrl: settings.authorizationUrl || null,\n      tokenUrl: settings.tokenUrl || null\n    })\n  }\n}\n\n/* eslint-disable max-statements */\n/**\n * extracts a shared auth as a key-value entry\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of an auth.\n * @returns {{key: string, value: Auth}} the corresponding auth, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value. It is recommended that it be identical\n * to the authName field in the Auth Record\n */\nmethods.extractSharedAuthFromItemAuth = (auth) => {\n  if (auth.type === 'awsv4') {\n    return methods.extractSharedAWSSig4AuthFromAuth(auth)\n  }\n\n  if (auth.type === 'basic') {\n    return methods.extractSharedBasicAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'digest') {\n    return methods.extractSharedDigestAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'hawk') {\n    return methods.extractSharedHawkAuthFromAuth(auth)\n  }\n\n  if (auth.type === 'oauth1') {\n    return methods.extractSharedOAuth1AuthFromAuth(auth)\n  }\n\n  if (auth.type === 'oauth2') {\n    return methods.extractSharedOAuth2AuthFromAuth(auth)\n  }\n\n  if (auth.type === 'noauth') {\n    return null\n  }\n\n  return null\n}\n/* eslint-enable max-statements */\n\n/**\n * extracts all shared auth as a key-value pair for a TypedStore (aka OrderedMap)\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of\n * shared auths.\n * @returns {{key: 'auth', value: OrderedMap<string, Auth>}} the corresponding TypedStore, as a\n * key-value pair.\n */\nmethods.extractAuthTypedStore = (itemOrSubItem) => {\n  const auths = itemOrSubItem.auths\n    .map(methods.extractSharedAuthFromItemAuth)\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'auth', value: OrderedMap(auths) }\n}\n\n/**\n * extracts a shared parameter as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * parameter.\n * @returns {{key: string, value: Parameter}} the corresponding parameter, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value.\n */\nmethods.extractSharedParameterFromItemParameter = () => null\n\n/**\n * extracts all shared parameters as a key-value pair for a TypedStore (aka OrderedMap)\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of\n * shared parameters.\n * @returns {{key: 'parameter', value: OrderedMap<string, Parameter>}} the corresponding TypedStore,\n * as a key-value pair.\n */\nmethods.extractParameterTypedStore = (itemOrSubItem) => {\n  const parameters = itemOrSubItem.parameters\n    .map(methods.extractSharedParameterFromItemParameter)\n    .filter(v => !!v)\n\n  if (!parameters.length) {\n    return null\n  }\n\n  return { key: 'parameter', value: OrderedMap(parameters.reduce(convertEntryListInMap, {})) }\n}\n\n/**\n * extracts a shared endpoint as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * endpoint.\n * @returns {{key: string, value: URL}} the corresponding endpoint, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value.\n */\nmethods.extractSharedEndpointFromItemEndpoint = () => null\n\n/**\n * extracts all shared endpoints as a key-value pair for a TypedStore (aka OrderedMap)\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of\n * shared endpoints.\n * @returns {{key: 'endpoint', value: OrderedMap<string, URL>}} the corresponding TypedStore, as a\n * key-value pair.\n */\nmethods.extractEndpointTypedStore = (itemOrSubItem) => {\n  const endpoints = itemOrSubItem.endpoints\n    .map(methods.extractSharedEndpointFromItemEndpoint)\n    .filter(v => !!v)\n\n  if (!endpoints.length) {\n    return null\n  }\n\n  return { key: 'endpoint', value: OrderedMap(endpoints.reduce(convertEntryListInMap, {})) }\n}\n\n/**\n * extracts a shared constraint as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * constraint.\n * @returns {{key: string, value: Constraint}} the corresponding constraint, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value.\n */\nmethods.extractSharedConstraintFromItemConstraint = () => null\n\n/**\n * extracts all shared constraints as a key-value pair for a TypedStore (aka OrderedMap)\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of\n * shared constraints.\n * @returns {{key: 'constraint', value: OrderedMap<string, Constraint>}} the corresponding\n * TypedStore, as a key-value pair.\n */\nmethods.extractConstraintTypedStore = (itemOrSubItem) => {\n  const constraints = OrderedMap(itemOrSubItem.constraints || {})\n    .map(methods.extractSharedConstraintFromItemConstraint)\n\n  return { key: 'constraint', value: constraints }\n}\n\n/**\n * extracts a shared parameter as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * parameter.\n * @returns {{key: string, value: Parameter}} the corresponding parameter, as a key-value pair\n *\n * Note that the key should be a uniquely identifying value.\n */\nmethods.extractStoreInstance = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractParameterTypedStore(itemOrSubItem),\n    methods.extractEndpointTypedStore(itemOrSubItem),\n    methods.extractAuthTypedStore(itemOrSubItem),\n    methods.extractConstraintTypedStore(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts an Api `store` field as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `store` field.\n * @returns {{key: 'store', value: Store}} the corresponding store field, as a key-value pair\n *\n * Note that the store field should be a Store Record\n */\nmethods.extractStore = (itemOrSubItem) => {\n  const storeInstance = methods.extractStoreInstance(itemOrSubItem)\n  return { key: 'store', value: new Store(storeInstance) }\n}\n// ** END STORE **\n\n// ** BEGIN REQUEST **\n/**\n * extracts a Request `name` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `name` field.\n * @returns {{key: 'name', value: string}?} the corresponding group field, as a key-value\n * pair\n */\nmethods.extractRequestNameFromItem = () => null\n\n/**\n * extracts a Request `description` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `description` field.\n * @returns {{key: 'description', value: string}?} the corresponding description field, as a\n * key-value pair\n */\nmethods.extractRequestDescriptionFromItem = () => null\n\n/**\n * extracts a Request ParameterContainer `queries` block as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `queries` field.\n * @returns {{key: 'queries', value: OrderedMap<string, Parameter|Reference>}?} the corresponding\n * queries field, as a key-value pair\n *\n * Note that the queries block should be an OrderedMap of ids to either Parameter or Reference to\n * shared Parameters.\n */\nmethods.extractQueryBlockFromQueryParams = () => null\n\n/**\n * extracts a Request ParameterContainer `headers` block as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `headers` field.\n * @returns {{key: 'headers', value: OrderedMap<string, Parameter|Reference>}?} the corresponding\n * headers field, as a key-value pair\n *\n * Note that the headers block should be an OrderedMap of ids to either Parameter or Reference to\n * shared Parameters.\n */\nmethods.extractHeaderBlockFromHeaders = () => null\n\n/**\n * extracts a Request ParameterContainer `body` block as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `body` field.\n * @returns {{key: 'body', value: OrderedMap<string, Parameter|Reference>}?} the corresponding\n * body field, as a key-value pair\n *\n * Note that the body block should be an OrderedMap of ids to either Parameter or Reference to\n * shared Parameters.\n */\nmethods.extractBodyBlockFromBody = () => null\n\n/**\n * extracts a Request ParameterContainer instance\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * ParameterContainer field.\n * @returns {ParameterContainerInstance} an object holding all the information necessary to the\n * instantiation of a ParameterContainer Record.\n */\nmethods.extractRequestParameterContainerInstanceFromItem = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractQueryBlockFromQueryParams(itemOrSubItem.query),\n    methods.extractHeaderBlockFromHeaders(itemOrSubItem.header),\n    methods.extractBodyBlockFromBody(itemOrSubItem.body)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts a Request `parameters` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `parameters` field.\n * @returns {{key: 'parameters', value: ParameterContainer}} the corresponding parameters field, as\n * a key-value pair\n *\n * Note that the parameters block should be a ParameterContainer Record.\n */\nmethods.extractRequestParametersFromItem = (itemOrSubItem) => {\n  const key = 'parameters'\n  const parameterContainerInstance = methods.extractRequestParameterContainerInstanceFromItem(\n    itemOrSubItem\n  )\n\n  return { key, value: new ParameterContainer(parameterContainerInstance) }\n}\n\n/**\n * extracts a Request Auth Reference, if it is extractable\n * @param {ItemPart} auth - a part of the file that is relevant to the extraction of a\n * Reference.\n * @returns {Reference?} the corresponding auth References\n *\n * Note that the References uuid should be the uniquely identifying values used to saved shared\n * Auths in the Store.\n */\nmethods.extractAuthRefFromAuth = (auth) => {\n  return new Reference({\n    type: 'auth',\n    uuid: auth.unique_identifying_key\n  })\n}\n\n/**\n * extracts a Request `auths` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * `auths` field.\n * @returns {{key: 'auths', value: List<Reference?>}} the corresponding auths field, as\n * a key-value pair\n *\n * Note that the auths field should be a List of References or null values. If a null value is\n * included in the List of References, it means that this Request can be executed without\n * the need of an Authentication.\n */\nmethods.extractAuthsFromItem = (itemOrSubItem) => {\n  const auths = itemOrSubItem.auths\n    .map(methods.extractAuthRefFromAuth)\n  return { key: 'auths', value: List(auths) }\n}\n\n/**\n * extracts a Request `method` field as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * `method` field.\n * @returns {{key: 'method', value: string}} the corresponding method field, as\n * a key-value pair\n */\nmethods.extractRequestMethodFromItem = () => null\n\n/**\n * extracts a Request `endpoints` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * `endpoints` field.\n * @returns {{key: 'endpoints', value: OrderedMap<string, URL|Reference>}} the corresponding\n * endpoints field, as a key-value pair\n *\n * Note that the endpoints field should be an OrderedMap of string ids to URL Records or Reference\n * Records. We **strongly** advocate to only have shared endpoints and to only have References in\n * the OrderedMap.\n */\nmethods.RequestEndpointsFromItem = () => null\n\n/**\n * extracts a Request instance\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * Request Record.\n * @returns {RequestInstance} an object holding all the information necessary to the\n * instantiation of a Request Record.\n */\nmethods.extractRequestInstanceFromItem = (itemOrSubItem) => {\n  const kvs = [\n    methods.RequestEndpointsFromItem(itemOrSubItem),\n    methods.extractRequestNameFromItem(itemOrSubItem),\n    methods.extractRequestDescriptionFromItem(itemOrSubItem),\n    methods.extractRequestParametersFromItem(itemOrSubItem),\n    methods.extractRequestMethodFromItem(itemOrSubItem),\n    methods.extractAuthsFromItem(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts a Resource `methods` Request component as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * Request Record.\n * @returns {{key: string, value: Request}} the corresponding Request field, as a key-value pair\n *\n * Note that the Request field should be a Request Record. We recommend the key to be the method\n * of the Request (as API formats do not support polymorphism of request for a same method)\n */\nmethods.extractRequestFromItem = (itemOrSubItem) => {\n  const key = itemOrSubItem.method\n  const requestInstance = methods.extractRequestInstanceFromItem(itemOrSubItem)\n\n  return { key, value: new Request(requestInstance) }\n}\n// ** END REQUEST **\n\n// ** BEGIN RESOURCE **\n/**\n * extracts a Resource `endpoints` field as a key-value entry\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `endpoints` field.\n * @returns {{key: 'endpoints', value: OrderedMap<string, URL|Reference>}} the corresponding\n * endpoint field, as a key-value pair\n *\n * Note that the endpoints field should be an OrderedMap of string ids to URL Records or Reference\n * Records. We **strongly** recommend to only use Reference to shared endpoints, as this make a lot\n * of processing easier\n */\nmethods.extractResourceEndpointsFromItem = () => null\n\n/**\n * extracts a Resource `path` field as a key-value entry. The path field is represented by a URL\n * Record whose `pathname` field contains the path of the resource (e.g. the representation of\n * /users/{userId}/songs/:songId will be stored there)\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `path` field.\n * @returns {{key: 'path', value: URL}} the corresponding path field, as a\n * key-value pair\n *\n * Note that the path field should be a URL Record.\n */\nmethods.extractResourcePathFromItem = () => null\n\n/**\n * extracts a Resource `description` field as a key-value entry, if it is extractable\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `description` field.\n * @returns {{key: 'description', value: string}?} the corresponding description field, as a\n * key-value pair\n */\nmethods.extractResourceDescriptionFromItem = () => null\n\n/**\n * extracts a Resource `methods` field as a key-value entry, if it is extractable. This is where\n * Request Records are stored.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `methods` field.\n * @returns {{key: 'methods', value: OrderedMap<string, Request>}?} the corresponding methods field,\n * as a key-value pair\n *\n * Note that the methods fields should be an OrderedMap of string ids to Request Records.\n */\nmethods.extractResourceRequestsFromItem = (itemOrSubItem) => {\n  const requests = itemOrSubItem.requests\n    .map(methods.extractRequestFromItem)\n    .filter(v => !!v)\n\n  if (!requests.length) {\n    return null\n  }\n\n  return { key: 'methods', value: OrderedMap(requests.reduce(convertEntryListInMap, {})) }\n}\n\n/**\n * extracts a Resource instance\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * Resource Record.\n * @returns {ResourceInstance} an object holding all the information necessary to the\n * instantiation of a Resource Record.\n */\nmethods.extractResourceInstanceFromItemResource = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractResourceEndpointsFromItem(itemOrSubItem),\n    methods.extractResourcePathFromItem(itemOrSubItem),\n    methods.extractResourceDescriptionFromItem(itemOrSubItem),\n    methods.extractResourceRequestsFromItem(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts a Api `resources` component as a key-value entry, if it is extractable. This is where\n * Resource Records are stored.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * Resource Record.\n * @returns {{key: string, value: Resource}} the corresponding Resource Record, as a key-value pair\n *\n * Note that the methods fields should be an OrderedMap of string ids to Request Records.\n */\nmethods.extractResourceFromItemResource = (itemOrSubItem) => {\n  const key = itemOrSubItem.unique_identifying_key\n  const resourceInstance = methods.extractResourceInstanceFromItemResource(itemOrSubItem)\n  return { key, value: new Resource(resourceInstance) }\n}\n\n/**\n * extracts an Api `methods` field as a key-value entry, if it is extractable. This is where\n * Resources Records are stored in an Api.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of a\n * `resources` field.\n * @returns {{key: 'resources', value: OrderedMap<string, Resource>}?} the corresponding resources\n * field, as a key-value pair\n *\n * Note that the methods fields should be an OrderedMap of string ids to Request Records.\n */\nmethods.extractResources = (itemOrSubItem) => {\n  const resources = itemOrSubItem.resources\n    .map(methods.extractResourceFromItemResource)\n    .filter(v => !!v)\n\n  return { key: 'resources', value: OrderedMap(resources.reduce(convertEntryListInMap, {})) }\n}\n// ** END RESOURCE **\n\n/**\n * extracts an Api instance. This is the core element of the model.\n * @param {ItemPart} itemOrSubItem - a part of the file that is relevant to the extraction of an\n * Api Record.\n * @returns {ApiInstance} an object holding all the information necessary to the\n * instantiation of an Api Record.\n */\nmethods.extractApiInstance = (itemOrSubItem) => {\n  const kvs = [\n    methods.extractInfo(itemOrSubItem),\n    methods.extractGroup(itemOrSubItem),\n    methods.extractStore(itemOrSubItem),\n    methods.extractResources(itemOrSubItem)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\nmethods.parse = ({ options, item }) => {\n  const apiInstance = methods.extractApi(item)\n\n  return { options, api: new Api(apiInstance) }\n}\n\nexport const __internals__ = methods\nexport default TemplateParser\n"
  },
  {
    "path": "src/parsers/template/v1.0/__tests__/Parser.spec.js",
    "content": "// Write your tests here\n"
  },
  {
    "path": "src/serializers/api-blueprint/1A/Serializer.js",
    "content": "/**\n * An Api Blueprint 1A serializer.\n * This implementation has the following limitations:\n * - it does not link between data Structures and attributes, as attributes need to be in MSON\n * format\n * - attributes are not supported.\n * - authentication methods are not included because they require an example header, which is a mess\n * to implement and interpret\n * - no grouping\n *\n * NOTE: we allow use of undefined in this file as it works nicely with JSON.stringify, which drops\n * keys with a value of undefined.\n * ```\n * const swagger = { info, security }\n * ```\n * is easier to read than\n * ```\n * const swagger = { info }\n * if (security) {\n *   swagger.security = security\n * }\n * ```\n *\n */\n /* eslint-disable no-undefined */\nimport { List, OrderedMap } from 'immutable'\n\nimport Reference from '../../../models/Reference'\nimport Variable from '../../../models/Variable'\nimport URL from '../../../models/URL'\n\nimport { flatten } from '../../../utils/fp-utils'\n\nconst __meta__ = {\n  format: 'api-bluepint',\n  version: '1A'\n}\n\nconst methods = {}\n\n/**\n * A Serializer to convert Api Records into Api Blueprint 1A.\n */\nexport class ApiBlueprintSerializer {\n  static __meta__ = __meta__\n\n  /**\n   * serializes an Api into an Api Blueprint 1A formatted string\n   * @param {Api} api: the api to convert\n   * @returns {string} the corresponding api blueprint, as a string\n   */\n  static serialize(api) {\n    return methods.serialize(api)\n  }\n\n  /**\n   * returns a quality score for a content string wrt. to the collection v2 format.\n   * @param {String} content: the content of the file to analyze\n   * @returns {number} the quality of the content\n   */\n  static validate(content) {\n    return methods.validate(content)\n  }\n}\n\n/**\n * returns a quality score for a content string wrt. to the collection v2 format.\n * @param {String} content: the content of the file to analyze\n * @returns {number} the quality of the content\n */\nmethods.validate = () => {\n  return 0\n}\n\n/**\n * extracts an endpoint from the endpoint store, if any exists\n * @param {Api} api: the api to get the store from\n * @returns {URL|null} the corresponding endpoint\n */\nmethods.getRootHostFromEndpoint = (api) => {\n  const endpoint = api.getIn([ 'store', 'endpoint' ]).valueSeq().get(0)\n  return endpoint || null\n}\n\n/**\n * extracts an endpoint from the variable store, if any exists\n * @param {Api} api: the api to get the store from\n * @returns {URL|null} the corresponding endpoint\n */\nmethods.getRootHostFromVariable = (api) => {\n  const variable = api.getIn([ 'store', 'variable' ]).valueSeq().get(0)\n  if (!variable || !(variable instanceof Variable)) {\n    return null\n  }\n\n  const values = variable.get('values')\n  if (!values) {\n    return null\n  }\n\n  const value = values.valueSeq().get(0)\n  if (!value) {\n    return null\n  }\n\n  return new URL({ url: value })\n}\n\n/**\n * extracts a root endpoint from the Api (from either the endpoint store or from the variable store)\n * @param {Api} api: the api to get the store from\n * @returns {URL|null} the corresponding root endpoint\n */\nmethods.getRootHostForApi = (api) => {\n  const host = methods.getRootHostFromEndpoint(api) ||\n    methods.getRootHostFromVariable(api)\n\n  return host\n}\n\n/**\n * creates a format version section\n * @returns {ContentSection} the corresponding section that represents the format version\n */\nmethods.createFormatVersionSection = () => {\n  const section = {\n    type: 'content',\n    value: 'FORMAT: 1A'\n  }\n\n  return section\n}\n\n/**\n * create a format host section\n * @param {Api} api: the api from which to get a root endpoint\n * @returns {ContentSection|null} the corresponding section that represents the host of the api,\n * if it exists.\n */\nmethods.createFormatHostSection = (api) => {\n  const host = methods.getRootHostForApi(api)\n\n  if (!host) {\n    return null\n  }\n\n  const rootUrl = host.generate(List([ '{', '}' ]))\n\n  if (!rootUrl) {\n    return null\n  }\n\n  return {\n    type: 'content',\n    value: 'HOST: ' + rootUrl\n  }\n}\n\n/**\n * creates the metadata section of an ABP from an api.\n * @param {Api} api: the api from which to get the metadata pertaining to the ABP file\n * @returns {AbstractSection} the corresponding section that contains all the metadata about the ABP\n * file.\n */\nmethods.createMetadataSection = (api) => {\n  const section = {\n    type: 'metadata',\n    abstract: true,\n    content: [\n      methods.createFormatVersionSection(api),\n      methods.createFormatHostSection(api)\n    ].filter(v => !!v),\n    separator: '\\n'\n  }\n\n  return section\n}\n\n/**\n * creates the root title section of an ABP\n * @param {Api} api: the api whose title needs to be extracted\n * @returns {HeaderSection<1>} the corresponding section describing the title of the Api.\n */\nmethods.createRootTitleSection = (api) => {\n  const title = api.getIn([ 'info', 'title' ])\n\n  return {\n    type: 'header',\n    depth: 1,\n    value: {\n      abstract: true,\n      content: [ title || 'Unnamed API' ],\n      separator: ''\n    }\n  }\n}\n\n/**\n * creates a root description section of an ABP\n * @param {Api} api: the api whose description needs to be extracted\n * @returns {ContentSection|null} the corresponding section describing the api, if such description\n * exists\n */\nmethods.createRootDescriptionSection = (api) => {\n  const description = api.getIn([ 'info', 'description' ])\n\n  if (!description) {\n    return null\n  }\n\n  return {\n    type: 'content',\n    value: description\n  }\n}\n\n/**\n * creates an Api Name and Overview Section\n * @param {Api} api: the api from which to get the title and description\n * @returns {AbstractSection} the corresponding section containing the name and description of the\n * Api\n */\nmethods.createApiNameAndOverviewSection = (api) => {\n  const section = {\n    type: 'overview',\n    abstract: true,\n    content: [\n      methods.createRootTitleSection(api),\n      methods.createRootDescriptionSection(api)\n    ].filter(v => !!v),\n    separator: '\\n'\n  }\n\n  return section\n}\n\n/**\n * creates the resource group header section for an ABP.\n * We use the strategy of grouping all the resources together inside a single group, as truncating\n * a hierarchy of groups at the depth 1 only has a lot of meaning if the api was already grouped\n * based on semantics instead of paths, which is definitely not true for RAML.\n * @returns {HeaderSection} the corresponding section describing the header for the Group Resources\n */\nmethods.createResourceGroupHeaderSection = () => {\n  return {\n    type: 'header',\n    depth: 2,\n    value: {\n      abstract: true,\n      content: [ 'Group Resources' ],\n      separator: ''\n    }\n  }\n}\n\n/**\n * converts a resource into a resource entry based on the path value of the resource.\n * The idea is to use the path to group together resources that have the same paths.\n * @param {Resource} resource: the resource to convert into a resource entry\n * @returns {Entry<string, Resource>} the corresponding resource as an entry\n */\nmethods.convertResourceIntoResourceEntryBasedOnPath = (resource) => {\n  return {\n    key: resource.get('path').generate(List([ '{', '}' ])),\n    value: resource\n  }\n}\n\n/**\n * merges a resource entry in an accumulator based on whether the key/path is already present in\n * the object. If the key/path is already present in the accumulator, then we merge the `methods`\n * field of the resource contained in the accumulator with the new resource.\n * @param {Object} acc: the accumulator to update with the entry\n * @param {Entry} entry: the entry to merge with the accumulator\n * @param {string} entry.key: the path of the resource. This is used to merge resources that share\n * the same key\n * @param {Resource} entry.value: the resource to merge\n * @returns {Object} the updated accumulator\n */\nmethods.mergeResourceEntriesBasedOnKey = (acc, { key, value }) => {\n  if (!acc[key]) {\n    acc[key] = value\n    return acc\n  }\n\n  const $methods = OrderedMap().merge(acc[key].get('methods'), value.get('methods'))\n  acc[key] = acc[key].set('methods', $methods)\n  return acc\n}\n\n/**\n * merges the resources of an api together based on their paths.\n * @param {Api} api: the api from which to get the resource Map\n * @returns {OrderedMap<string, Resource>} the updated resource Map with merged resources based on\n * their path\n */\nmethods.getMergedResourcesBasedOnPathFromApi = (api) => {\n  const resources = api.get('resources')\n    .map(methods.convertResourceIntoResourceEntryBasedOnPath)\n    .reduce(methods.mergeResourceEntriesBasedOnKey, {})\n\n  return OrderedMap(resources)\n}\n\nmethods.deduplicateArray = (array) => Array.from(new Set(array))\n\nmethods.extractQueryParametersFromResourceWithDuplicates = (api, resource) => {\n  const store = api.get('store')\n  const queryParams = resource.get('methods')\n    .map(request => request.get('parameters'))\n    .map(paramContainer => paramContainer.resolve(store))\n    .map(paramContainer => paramContainer.get('queries').valueSeq().toArray())\n    .reduce(flatten, [])\n    .map(param => param.get('key'))\n    .filter(v => !!v)\n\n  return queryParams\n}\n\nmethods.extractQueryParametersFromResource = (api, resource) => {\n  const queryParams = methods.extractQueryParametersFromResourceWithDuplicates(api, resource)\n  const params = methods.deduplicateArray(queryParams)\n\n  return params\n}\n\n/**\n * extracts a QueryString section from a resource\n * @param {Api} api: the api containing the store to use to resolve shared parameters if needed\n * @param {Resource} resource: the resource to get the QueryString from\n * @returns {AbstractSection|null} the corresponding section that contains all the query parameters\n * as a string respecting ABP format\n */\nmethods.extractQueryStringFromResource = (api, resource) => {\n  const params = methods.extractQueryParametersFromResource(api, resource)\n\n  if (!params.length) {\n    return null\n  }\n\n  return {\n    type: 'query-params',\n    abstract: true,\n    content: [\n      '{?',\n      {\n        abstract: true,\n        content: params,\n        separator: ','\n      },\n      '}'\n    ],\n    separator: ''\n  }\n}\n\nmethods.createResourceTitleSectionContent = (api, resource) => {\n  const title = resource.get('name')\n  const path = resource.get('path').generate(List([ '{', '}' ]))\n  const queryString = methods.extractQueryStringFromResource(api, resource)\n\n  let fixedTitle = title\n  if (!title || title[0] === '/') {\n    fixedTitle = null\n  }\n\n  return [\n    fixedTitle,\n    fixedTitle ? ' [' : null,\n    path ? path.replace(/\\/+/, '/') : '/',\n    queryString,\n    fixedTitle ? ']' : null\n  ].filter(v => !!v)\n}\n\n/**\n * creates a Resource Title Section from a Resource.\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Resource} resource: the resource to get the title from\n * @returns {HeaderSection|null} the corresponding section that represents the title of the\n * resource, which is composed of the name of the resource, its path, and queryString, if they\n * exist.\n */\nmethods.createResourceTitleSection = (api, resource) => {\n  const content = methods.createResourceTitleSectionContent(api, resource)\n\n  if (!content.length) {\n    return null\n  }\n\n  const section = {\n    type: 'header',\n    depth: 3,\n    value: {\n      abstract: true,\n      content: content,\n      separator: ''\n    }\n  }\n\n  return section\n}\n\n/**\n * creates a resource description section from a Resource\n * @param {Resource} resource: the resource whose description needs extraction\n * @returns {ContentSection|null} the section containing the description of the resource, if it\n * exist.\n */\nmethods.createResourceDescriptionSection = (resource) => {\n  const description = resource.get('description')\n\n  if (!description) {\n    return null\n  }\n\n  return {\n    type: 'content',\n    value: description\n  }\n}\n\nmethods.createOperationTitleSectionContent = (operation) => {\n  const name = operation.get('name')\n  const method = operation.get('method')\n\n  if (!method) {\n    return []\n  }\n\n  return [\n    name,\n    name ? ' [' : null,\n    method.toUpperCase(),\n    name ? ']' : null\n  ].filter(v => !!v)\n}\n\n/**\n * creates an operation title section from an Operation/Request\n * @param {Request} operation: the operation from which to extract a title\n * @returns {HeaderSection|null} the section describing the title of the operation, which contains\n * the name and method of the operation\n */\nmethods.createOperationTitleSection = (operation) => {\n  const content = methods.createOperationTitleSectionContent(operation)\n\n  if (!content.length) {\n    return null\n  }\n\n  const section = {\n    type: 'header',\n    depth: 4,\n    value: {\n      abstract: true,\n      content: content,\n      separator: ''\n    }\n  }\n\n  return section\n}\n\n/**\n * creates an operation description section from an Operation/Request.\n * @param {Request} operation: the request from which to get a description\n * @returns {ContentSection|null} the corresponding content section containing the description of\n * the operation, if it exists.\n */\nmethods.createOperationDescriptionSection = (operation) => {\n  const description = operation.get('description')\n\n  if (!description) {\n    return null\n  }\n\n  return {\n    type: 'content',\n    value: description\n  }\n}\n\n/**\n * extracts the key of a Parameter as a content section.\n * @param {Parameter} parameter: the parameter to extract the key section from\n * @returns {ContentSection|null} the corresponding content section containing the key of the\n * parameter.\n */\nmethods.createParameterKeySegment = (parameter) => {\n  const key = parameter.get('key')\n\n  if (!key) {\n    return null\n  }\n\n  const section = {\n    abstract: true,\n    content: [ key ],\n    separator: ''\n  }\n\n  return section\n}\n\nmethods.createParameterOptionalSegmentContent = (schema, parameter) => {\n  const type = schema.type || parameter.get('type')\n  const optionalText = parameter.get('required') ? 'required' : 'optional'\n\n  return [ type, optionalText ].filter(v => !!v)\n}\n\n/**\n * creates a section that contains the optional fields used in the description of a parameter\n * @param {JSONSchema} schema: the JSON Schema representing the parameter\n * @param {Parameter} parameter: the parameter itself\n * @returns {AbstractSection|null} the section containing the optional fields of the description of\n * a parameter, in the expected format.\n */\nmethods.createParameterOptionalSegment = (schema, parameter) => {\n  const content = methods.createParameterOptionalSegmentContent(schema, parameter)\n\n  if (!content.length) {\n    return null\n  }\n\n  const section = {\n    abstract: true,\n    content: [\n      '(',\n      {\n        abstract: true,\n        content: content,\n        separator: ', '\n      },\n      ')'\n    ],\n    separator: ''\n  }\n\n  return section\n}\n\n/**\n * creates a section containing the description of a parameter.\n * @param {JSONSchema} schema: the schema representing the parameter\n * @param {Parameter} parameter: the parameter itself\n * @returns {AbstractSection|null} the corresponding description section\n */\nmethods.createParameterDescriptionSegment = (schema, parameter) => {\n  const description = schema.description || parameter.get('description')\n\n  if (!description) {\n    return null\n  }\n\n  const section = {\n    abstract: true,\n    content: [ '-', description ],\n    separator: ' '\n  }\n\n  return section\n}\n\n/**\n * creates the Payload section of a Parameter\n * @param {JSONSchema} schema: the JSON Schema representing a parameter\n * @param {Parameter} parameter: the parameter itself\n * @returns {AbstractSection|null} the section describing the payload associated with a Parameter\n */\nmethods.createParameterPayloadSection = (schema, parameter) => {\n  const section = {\n    abstract: true,\n    content: [\n      methods.createParameterKeySegment(parameter),\n      methods.createParameterOptionalSegment(schema, parameter),\n      methods.createParameterDescriptionSegment(schema, parameter)\n    ].filter(v => !!v),\n    separator: ' '\n  }\n\n  if (!section.content.length) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * converts a Parameter into a section\n * @param {Parameter} parameter: the parameter to convert\n * @returns {AbstractSection} the section that contains all the information relative to the\n * parameter\n */\nmethods.convertParameterIntoParamSection = (parameter) => {\n  if (!parameter) {\n    return null\n  }\n\n  const schema = parameter.getJSONSchema()\n\n  const section = {\n    type: 'parameter',\n    abstract: true,\n    content: [\n      methods.createParameterPayloadSection(schema, parameter),\n      methods.createOperationRequestSchemaAssetSection(schema)\n    ].filter(v => !!v),\n    separator: '\\n'\n  }\n\n  if (!section.content.length) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * extracts path parameters name from a Path\n * @param {URL} path: the path to extract the parameters from\n * @returns {Array<string>} the corresponding array that contains all the path parameters.\n */\nmethods.extractPathParamsFromPath = (path) => {\n  if (path.getIn([ 'pathname', 'parameter', 'superType' ]) !== 'sequence') {\n    return []\n  }\n\n  const sequence = path.getIn([ 'pathname', 'parameter', 'value' ])\n  if (!sequence || !sequence.size) {\n    return []\n  }\n\n  return sequence\n    .filter(param => param.get('key'))\n    .valueSeq()\n    .toArray()\n}\n\nmethods.createOperationParametersSectionContent = (path, container) => {\n  const queryParamSections = container\n    .get('queries')\n    .map(methods.convertParameterIntoParamSection)\n    .valueSeq()\n    .toJS()\n\n  const pathParamSections = methods.extractPathParamsFromPath(path)\n    .map(methods.convertParameterIntoParamSection)\n\n  return [ ...queryParamSections, ...pathParamSections ]\n}\n\n/**\n * creates the Parameters section for an operation\n * @param {URL} path: the path from which to get the path parameters\n * @param {ParameterContainer} container: the ParameterContainer that holds all the query\n * parameters. This container is already resolved and filtered based on a set of constraints.\n * @returns {AbstractSection|null} the corresponding section that contains all the information\n * pertaining to the query and path parameters\n */\nmethods.createOperationParametersSection = (path, container) => {\n  const paramSections = methods.createOperationParametersSectionContent(path, container)\n\n  if (!paramSections.length) {\n    return null\n  }\n\n  const section = {\n    type: 'list-item',\n    abstract: true,\n    content: [\n      'Parameters',\n      {\n        type: 'list',\n        depth: 2,\n        value: paramSections\n      }\n    ],\n    separator: '\\n'\n  }\n\n  return section\n}\n\n/**\n * extract a content type value from a list of constraints\n * @param {List<Parameter>} constraints: the list of constraints from which to extract the content\n * type parameters\n * @returns {string} the corresponding content type default value, iff there exists one content type\n * parameter.\n */\nmethods.extractContentTypeFromConstraints = (constraints) => {\n  const contentTypeParams = constraints\n    .filter(param => param.get('key') === 'Content-Type')\n\n  if (contentTypeParams.size !== 1) {\n    return null\n  }\n\n  return contentTypeParams.valueSeq().getIn([ 0, 'default' ]) || null\n}\n\n/**\n * creates the section associated with the title of an Operation Request section\n * @param {List<Parameter>} constraints: the constraints from which to extract the content-type\n * @returns {AbstractSection|ContentSection} the corresponding section that contains the title of\n * the Request section, with the associated content-type if it exists.\n */\nmethods.createOperationRequestTitleSection = (constraints) => {\n  const contentType = methods.extractContentTypeFromConstraints(constraints)\n\n  if (!contentType) {\n    return {\n      type: 'content',\n      value: 'Request'\n    }\n  }\n\n  return {\n    abstract: true,\n    content: [\n      'Request (',\n      contentType,\n      ')'\n    ],\n    separator: ''\n  }\n}\n\n/**\n * creates a partial asset section from a header Parameter.\n * @param {Parameter} parameter: the header to convert into a partial asset\n * @returns {string} the partial asset that describe the header.\n */\nmethods.convertHeaderParameterIntoHeaderSection = (parameter) => {\n  const name = parameter.get('key')\n  const schema = parameter.getJSONSchema()\n  const value = parameter.get('default') || schema.default || (schema.enum || [])[0] || null\n\n  return name + ': ' + value\n}\n\nmethods.getHeadersForOperationRequest = (constraints, container, method) => {\n  const headers = container.get('headers')\n\n  if (!headers.size) {\n    return null\n  }\n\n  const contentType = methods.extractContentTypeFromConstraints(constraints)\n  if (!contentType && (method || '').toLowerCase() !== 'get') {\n    return headers\n  }\n\n  const filteredHeaders = headers.filter(parameter => parameter.get('key') !== 'Content-Type')\n  if (!filteredHeaders.size) {\n    return null\n  }\n\n  return filteredHeaders\n}\n\n/**\n * creates the Headers Section and its payload from an Operation/Request ParameterContainer\n * @param {Api} api: the api used to resolve shared object, such as authentication methods\n * @param {List<Parameter>} constraints: the constraints used filter the ParameterContainer\n * @param {ParameterContainer} container: the ParameterContainer containing all the header\n * parameters.\n * @param {string?} method: the method associated with this operation request.\n * @returns {ListSection} the section that contains all the information pertaining to the headers\n * of the operation\n */\nmethods.createOperationRequestHeaderSection = (api, constraints, container, method) => {\n  const headers = methods.getHeadersForOperationRequest(constraints, container, method)\n\n  if (!headers) {\n    return null\n  }\n\n  const headersSection = headers.map(methods.convertHeaderParameterIntoHeaderSection)\n    .valueSeq()\n    .toJS()\n    .join('\\n')\n\n  return {\n    type: 'list',\n    depth: 2,\n    value: [\n      {\n        abstract: true,\n        content: [\n          'Headers',\n          {\n            type: 'asset',\n            depth: 4,\n            value: headersSection\n          }\n        ],\n        separator: '\\n'\n      }\n    ]\n  }\n}\n\n/**\n * creates an asset section representing a schema for an operation request section\n * @param {JSONSchema} schema: the JSON schema representing a parameter\n * @returns {AssetSection} the corresponding asset section that represent a JSON Schema\n */\nmethods.createOperationRequestSchemaAssetSection = (schema) => {\n  const section = {\n    type: 'asset',\n    depth: 4,\n    value: schema\n  }\n\n  return section\n}\n\n/**\n * extracts the JSON Schema for a single body parameter\n * @param {OrderedMap<string, Parameter>} bodyParams: a map of Parameters, that should be of size 1.\n * @returns {JSONSchema} the corresponding JSON Schema\n */\nmethods.getSchemaForSingleBodyParameter = (bodyParams) => {\n  const schema = bodyParams.valueSeq().get(0).getJSONSchema()\n\n  return schema\n}\n\n/**\n * extracts the JSON Schema for multiple body parameter\n * @param {OrderedMap<string, Parameter>} bodyParams: a map of Parameters to get the JSON Schemas\n * of.\n * @returns {JSONSchema} a JSONSchema describing an object with all the JSON Schemas as properties\n */\nmethods.getSchemaForMultipleBodyParameters = (bodyParams) => {\n  const properties = bodyParams\n    .map(param => param.getJSONSchema())\n    .reduce(($properties, schema, key) => {\n      const title = schema.title || schema['x-title'] || key\n      $properties[title] = schema\n      return $properties\n    }, {})\n\n  return { type: 'object', properties }\n}\n\n/**\n * extracts a JSON Schema from a Map of Parameters\n * @param {OrderedMap<string, Parameter>} bodyParams: a Map of Parameters to convert into a single\n * JSON Schema\n * @returns {JSONSchema|null} the corresponding JSON Schema\n */\nmethods.getSchemaFromBodyParameters = (bodyParams) => {\n  if (bodyParams.size === 1) {\n    return methods.getSchemaForSingleBodyParameter(bodyParams)\n  }\n\n  if (bodyParams.size > 1) {\n    return methods.getSchemaForMultipleBodyParameters(bodyParams)\n  }\n\n  return null\n}\n\n/**\n * create a Schema Section for an Operation Request\n * @param {ParameterContainer} container: a ParameterContainer from which to get the body parameters\n * @returns {ListSection} the corresponding section with its associated payload section that\n * describe the schema of the body of a request.\n */\nmethods.createOperationRequestSchemaSection = (container) => {\n  const bodyParams = container.get('body')\n\n  const schema = methods.getSchemaFromBodyParameters(bodyParams)\n\n  if (!schema) {\n    return null\n  }\n\n  const section = {\n    type: 'list',\n    depth: 2,\n    value: [\n      {\n        abstract: true,\n        content: [\n          'Schema',\n          methods.createOperationRequestSchemaAssetSection(schema)\n        ],\n        separator: '\\n'\n      }\n    ]\n  }\n\n  return section\n}\n\n/**\n * creates an action section from an Operation/Request\n * @param {Api} api: the api used to resolve shared objects\n * @param {List<Parameter>} constraints: the list of constraints used to filter the\n * ParameterContainer block of the Operation\n * @param {ParameterContainer} container: the parameter container, resolved and filtered based on\n * the list of constraints.\n * @param {Request} operation: the operation to use to create the Request action section.\n * @returns {AbstractSection|null} the corresponding `Request` section\n */\nmethods.createOperationRequestSection = (api, constraints, container, operation) => {\n  const method = operation.get('method')\n  const section = {\n    type: 'list-item',\n    abstract: true,\n    content: [\n      methods.createOperationRequestTitleSection(constraints),\n      methods.createOperationRequestHeaderSection(api, constraints, container, method),\n      methods.createOperationRequestSchemaSection(container)\n    ].filter(v => !!v),\n    separator: '\\n'\n  }\n\n  if (section.content.length < 2) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * creates a Response title section from a Response and a List of constraints\n * @param {Response} response: the response to use to extract the information pertaining to the\n * title of the Response action section\n * @param {List<Parameter>} constraints: the list of constraints used as a view for this response\n * @returns {AbstractSection|ContentSection} the corresponding title section\n */\nmethods.createOperationResponseTitleSection = (response, constraints) => {\n  const rawCode = parseInt(response.get('code'), 10)\n  const code = rawCode ? rawCode : 200\n  const contentType = methods.extractContentTypeFromConstraints(constraints)\n\n  if (!contentType) {\n    return {\n      type: 'content',\n      value: 'Response ' + code\n    }\n  }\n\n  return {\n    abstract: true,\n    content: [\n      'Response ',\n      code,\n      ' (',\n      contentType,\n      ')'\n    ],\n    separator: ''\n  }\n}\n\n/**\n * creates a response action section from a response\n * @param {Api} api: the api used to resolve shared parameters\n * @param {Response} response: the response to convert into a Response action section\n * @returns {AbstractSection|null} the corresponding response action section\n */\nmethods.createOperationResponseSection = (api, response) => {\n  if (!response) {\n    return null\n  }\n\n  const constraints = response.getIn([ 'contexts', 0, 'constraints' ]) || List()\n  const container = response.get('parameters').resolve(api.get('store')).filter(constraints)\n\n  const section = {\n    type: 'request',\n    abstract: true,\n    content: [\n      methods.createOperationResponseTitleSection(response, constraints),\n      methods.createOperationRequestHeaderSection(api, constraints, container, null),\n      methods.createOperationRequestSchemaSection(container)\n    ].filter(v => !!v),\n    separator: '\\n'\n  }\n\n  return section\n}\n\n/**\n * creates a default response section for requests that do not have responses\n * @returns {Array<ContentSection>} the corresponding array of response sections\n */\nmethods.createDefaultResponseSection = () => {\n  const section = {\n    type: 'content',\n    value: 'Response 200'\n  }\n\n  return [ section ]\n}\n\n/**\n * creates an array of response action sections from an Operation/Request\n * @param {Api} api: the api used to resolve shared objects\n * @param {Request} operation: the request from which to get the Responses\n * @returns {Array<AbstractSection|ContentSection>} the corresponding array of sections describing\n * the possible responses to an operation\n */\nmethods.createOperationResponseSections = (api, operation) => {\n  const responses = operation.get('responses')\n\n  const responseSections = responses\n    .map(response => {\n      if (response instanceof Reference) {\n        return api.getIn([ 'store', 'response', response.get('uuid') ])\n      }\n\n      return response\n    })\n    .map(response => methods.createOperationResponseSection(api, response))\n    .filter(v => !!v)\n    .valueSeq()\n    .toJS()\n\n  if (!responseSections.length) {\n    return methods.createDefaultResponseSection()\n  }\n\n  return responseSections\n}\n\n/**\n * creates the payload section associated with an Operation/Request\n * @param {Api} api: the api to use to resolve shared objects\n * @param {URL} path: the path of the operation. This is used to extract Parameters associated with\n * an operation\n * @param {Request} operation: the request to extract a payload section from\n * @returns {ListSection|null} the corresponding list section describing an Operation\n */\nmethods.createOperationContentSection = (api, path, operation) => {\n  const contextConstraints = operation.getIn([ 'contexts', 0, 'constraints' ]) || List()\n  const container = operation.get('parameters').resolve(api.get('store')).filter(contextConstraints)\n\n  const section = {\n    type: 'list',\n    depth: 0,\n    value: [\n      methods.createOperationParametersSection(path, container),\n      methods.createOperationRequestSection(api, contextConstraints, container, operation),\n      ...methods.createOperationResponseSections(api, operation)\n    ].filter(v => !!v)\n  }\n\n  if (!section.value.length) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * converts an Operation/Request into a section\n * @param {Api} api: the api used to resolve shared objects\n * @param {URL} path: the path associated with this operation\n * @param {Request} operation: the request itself\n * @returns {AbstractSection} the corresponding section\n */\nmethods.createOperationSection = (api, path, operation) => {\n  const section = {\n    type: 'operation',\n    abstract: true,\n    content: [\n      methods.createOperationTitleSection(operation),\n      methods.createOperationDescriptionSection(operation),\n      methods.createOperationContentSection(api, path, operation)\n    ].filter(v => !!v),\n    separator: '\\n\\n'\n  }\n\n  if (!section.content.length) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * creates an array of sections describing all the operations of a resource\n * @param {Api} api: the api used to resolve shared objects\n * @param {Resource} resource: the resource to get all the methods from\n * @returns {Array<AbstractSection>} the corresponding array of sections\n */\nmethods.createResourceOperationSections = (api, resource) => {\n  const path = resource.get('path')\n  return resource.get('methods')\n    .map(operation => methods.createOperationSection(api, path, operation))\n    .filter(v => !!v)\n    .valueSeq()\n    .toJS()\n}\n\n/**\n * converts a Resource into a section\n * @param {Api} api: the api used to resolve shared objects\n * @param {Resource} resource: the resource to convert\n * @returns {AbstractSection|null} the corresponding section\n */\nmethods.createResourceSection = (api, resource) => {\n  const section = {\n    type: 'resource',\n    abstract: true,\n    content: [\n      methods.createResourceTitleSection(api, resource),\n      methods.createResourceDescriptionSection(resource),\n      ...methods.createResourceOperationSections(api, resource)\n    ].filter(v => !!v),\n    separator: '\\n\\n'\n  }\n\n  if (!section.content.length) {\n    return null\n  }\n\n  return section\n}\n\n/**\n * extracts an array of sections representing all the resources associated with an Api.\n * @param {Api} api: the api to get the resources from\n * @returns {Array<AbstractSection|null>} the corresponding array of sections\n */\nmethods.createResourceSections = (api) => {\n  const resources = methods.getMergedResourcesBasedOnPathFromApi(api)\n\n  const resourcesSections = resources\n    .map((resource) => methods.createResourceSection(api, resource))\n    .valueSeq()\n    .toJS()\n\n  return resourcesSections\n}\n\n/**\n * creates the resource group section from an api\n * @param {Api} api: the api to get the resource group from\n * @returns {AbstractSection} the corresponding section\n */\nmethods.createResourceGroupSection = (api) => {\n  const section = {\n    type: 'resourceGroups',\n    abstract: true,\n    content: [\n      methods.createResourceGroupHeaderSection(),\n      ...methods.createResourceSections(api)\n    ],\n    separator: '\\n\\n'\n  }\n\n  return section\n}\n\n/**\n * creates the header section for the Data Structures section\n * @returns {HeaderSection} the corresponding header section\n */\nmethods.createDataStructuresHeaderSection = () => {\n  const section = {\n    type: 'header',\n    depth: 1,\n    value: 'Data Structures'\n  }\n\n  return section\n}\n\nmethods.createDataStructuresSectionContent = ({ key, value }) => {\n  const header = {\n    type: 'header',\n    depth: 2,\n    value: {\n      abstract: true,\n      content: [\n        key,\n        ' (',\n        value.type || 'object',\n        ')'\n      ],\n      separator: ''\n    }\n  }\n\n  const schema = {\n    type: 'asset',\n    depth: 2,\n    value: value\n  }\n\n  const section = {\n    abstract: true,\n    content: [\n      header,\n      schema\n    ],\n    separator: '\\n'\n  }\n\n  return section\n}\n\n/**\n * converts each shared constraint into a Data Structure Section\n * @param {Api} api: the api from which to get the shared constraints\n * @returns {Array<AbstractSection>} the corresponding sections\n */\nmethods.createDataStructureSections = (api) => {\n  const constraints = api.getIn([ 'store', 'constraint' ])\n\n  if (!constraints || !constraints.size) {\n    return []\n  }\n\n  const sections = constraints\n    .map((constraint, key) => ({ key, value: constraint.toJSONSchema() }))\n    .map(methods.createDataStructuresSectionContent)\n    .valueSeq()\n    .toJS()\n\n  return sections\n}\n\nmethods.createDataStructuresSection = (api) => {\n  const sections = methods.createDataStructureSections(api)\n\n  if (!sections.length) {\n    return null\n  }\n\n  const section = {\n    type: 'dataStructures',\n    abstract: true,\n    content: [\n      methods.createDataStructuresHeaderSection(),\n      ...sections\n    ],\n    separator: '\\n\\n'\n  }\n\n  return section\n}\n\n/**\n * converts an Api into a section\n * @param {Api} api: the api to convert\n * @returns {AbstractSection} the corresponding section\n */\nmethods.convertApiIntoSection = (api) => {\n  const sections = [\n    methods.createMetadataSection(api),\n    methods.createApiNameAndOverviewSection(api),\n    methods.createResourceGroupSection(api),\n    methods.createDataStructuresSection(api)\n  ].filter(v => !!v)\n\n  const section = {\n    abstract: true,\n    content: sections,\n    separator: '\\n\\n'\n  }\n\n  return section\n}\n\n/**\n * stringifies an AbstractSection\n * @param {AbstractSection} section: the section to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.stringifyAbstractSection = (section) => {\n  const sections = section.content.map(methods.stringifySection)\n  return sections.join(section.separator)\n}\n\n/**\n * stringifies a HeaderSection\n * @param {HeaderSection} section: the section to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.stringifyHeaderSection = (section) => {\n  const header = methods.stringifySection(section.value)\n\n  return (new Array(Math.max(section.depth, 1) + 1)).join('#') + ' ' + header\n}\n\n/**\n * stringifies a ListSection\n * @param {ListSection} section: the section to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.stringifyListSection = (section) => {\n  const prefix = (new Array(section.depth + 1)).join('  ') + '+ '\n  const list = section.value\n    .map(methods.stringifySection)\n    .map(listItemString => prefix + listItemString)\n\n  return list.join('\\n\\n')\n}\n\n/**\n * stringifies an AssetSection\n * @param {AssetSection} section: the section to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.stringifyAssetSection = (section) => {\n  const content = typeof section.value === 'string' ?\n    section.value :\n    JSON.stringify(section.value, null, 2)\n\n  const offset = new Array(section.depth + 1).join('  ')\n  const offsetContent = content.split('\\n')\n    .map(line => offset + line)\n    .join('\\n')\n  return '```\\n' + offsetContent + '\\n```'\n}\n\n/* eslint-disable max-statements */\n/**\n * stringifies a Section\n * @param {string|AbstractSection|ContentSection|HeaderSection|ListSection|AssetSection} section:\n * the section to convert into a string\n * @returns {string} the corresponding string\n */\nmethods.stringifySection = (section) => {\n  if (typeof section === 'string') {\n    return section\n  }\n\n  if (section.abstract) {\n    return methods.stringifyAbstractSection(section)\n  }\n\n  if (section.type === 'content') {\n    return section.value\n  }\n\n  if (section.type === 'header') {\n    return methods.stringifyHeaderSection(section)\n  }\n\n  if (section.type === 'list') {\n    return methods.stringifyListSection(section)\n  }\n\n  if (section.type === 'asset') {\n    return methods.stringifyAssetSection(section)\n  }\n\n  return JSON.stringify(section, null, 2)\n}\n/* eslint-enable max-statements */\n\n/**\n * serializes an Api into an api-blueprint formatted string\n * @param {Api} api: the api to convert\n * @returns {string} the corresponding swagger object, as a string\n */\nmethods.serialize = ({ api }) => {\n  const section = methods.convertApiIntoSection(api)\n  const serialized = methods.stringifySection(section)\n\n  return serialized + '\\n'\n}\n\nexport const __internals__ = methods\nexport default ApiBlueprintSerializer\n/* eslint-enable no-undefined */\n"
  },
  {
    "path": "src/serializers/api-blueprint/1A/__tests__/Serializer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List } from 'immutable'\n\nimport Api from '../../../../models/Api'\nimport Store from '../../../../models/Store'\nimport URL from '../../../../models/URL'\nimport URLComponent from '../../../../models/URLComponent'\nimport Variable from '../../../../models/Variable'\nimport Parameter from '../../../../models/Parameter'\nimport Constraint from '../../../../models/Constraint'\nimport Info from '../../../../models/Info'\nimport Resource from '../../../../models/Resource'\nimport Request from '../../../../models/Request'\nimport Reference from '../../../../models/Reference'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Response from '../../../../models/Response'\nimport Context from '../../../../models/Context'\n\n/*\nimport Group from '../../../../models/Group'\nimport Auth from '../../../../models/Auth'\n*/\n\nimport Serializer, { __internals__ } from '../Serializer'\n\ndescribe('serializers/api-blueprint/1A/Serializer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Serializer }', () => {\n    describe('@serialize', () => {\n      it('should call __internals__.serialize', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const actual = Serializer.serialize()\n\n        expect(__internals__.serialize).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.serialize with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.serialize(input)\n\n        expect(__internals__.serialize).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@validate', () => {\n      it('should call __internals__.validate', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const actual = Serializer.validate()\n\n        expect(__internals__.validate).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.validate with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.validate(input)\n\n        expect(__internals__.validate).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@validate', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        0\n      ]\n      const actual = inputs.map(input => __internals__.validate(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRootHostFromEndpoint', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({\n          store: new Store({\n            endpoint: OrderedMap({\n              a: new URL({\n                url: 'https://echo.paw.cloud',\n                variableDelimiters: List([ '{', '}' ])\n              })\n            })\n          })\n        })\n      ]\n      const expected = [\n        null,\n        new URL({\n          url: 'https://echo.paw.cloud',\n          variableDelimiters: List([ '{', '}' ])\n        })\n      ]\n      const actual = inputs.map(input => __internals__.getRootHostFromEndpoint(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRootHostFromVariable', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({\n          store: new Store({\n            variable: OrderedMap({\n              a: new Variable()\n            })\n          })\n        }),\n        new Api({\n          store: new Store({\n            variable: OrderedMap({\n              a: new Variable({\n                values: null\n              })\n            })\n          })\n        }),\n        new Api({\n          store: new Store({\n            variable: OrderedMap({\n              a: new Variable({\n                values: OrderedMap({\n                  default: 'https://echo.paw.cloud/'\n                })\n              })\n            })\n          })\n        })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        new URL({ url: 'https://echo.paw.cloud' })\n      ]\n      const actual = inputs.map(input => __internals__.getRootHostFromVariable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRootHostForApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRootHostFromEndpoint').andCall(({ e }) => e || null)\n      spyOn(__internals__, 'getRootHostFromVariable').andCall(({ v }) => v || null)\n\n      const inputs = [\n        { e: 123 },\n        { v: 234 }\n      ]\n      const expected = [\n        123,\n        234\n      ]\n      const actual = inputs.map(input => __internals__.getRootHostForApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createFormatVersionSection', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        {\n          type: 'content',\n          value: 'FORMAT: 1A'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createFormatVersionSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createFormatHostSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRootHostForApi').andCall(({ host }) => host)\n      const inputs = [\n        { host: null },\n        {\n          host: new URL({\n            url: 'https://echo.paw.cloud/{version}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        },\n        {\n          host: new URL({\n            url: 'https://echo.paw.cloud/{version}',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('pathname', new URLComponent({\n            componentName: 'pathname',\n            string: '/{version}',\n            parameter: new Parameter({\n              key: 'pathname',\n              name: 'pathname',\n              superType: 'sequence',\n              type: 'string',\n              value: List([\n                new Parameter({\n                  type: 'string',\n                  default: '/'\n                }),\n                new Parameter({\n                  key: 'version',\n                  type: 'string',\n                  constraints: List([\n                    new Constraint.Enum([ '2.1', '2.3' ])\n                  ])\n                })\n              ])\n            }),\n            variableDelimiters: List([ '{', '}' ])\n          }))\n        },\n        {\n          host: new URL({\n            url: 'https://echo.paw.cloud/{version}',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('pathname', new URLComponent({\n            componentName: 'pathname',\n            string: '/{version}',\n            parameter: new Parameter({\n              key: 'pathname',\n              name: 'pathname',\n              superType: 'sequence',\n              type: 'string',\n              value: List([\n                new Parameter({\n                  type: 'string',\n                  default: '/'\n                }),\n                new Parameter({\n                  key: 'version',\n                  type: 'string',\n                  default: '2.3',\n                  constraints: List([\n                    new Constraint.Enum([ '2.1', '2.3' ])\n                  ])\n                })\n              ])\n            }),\n            variableDelimiters: List([ '{', '}' ])\n          }))\n        },\n        {\n          host: new URL().set('slashes', false)\n        }\n      ]\n      const expected = [\n        null,\n        {\n          type: 'content',\n          value: 'HOST: https://echo.paw.cloud/{version}'\n        },\n        {\n          type: 'content',\n          value: 'HOST: https://echo.paw.cloud/{version}'\n        },\n        {\n          type: 'content',\n          value: 'HOST: https://echo.paw.cloud/{version}'\n        },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.createFormatHostSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createMetadataSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createFormatVersionSection').andCall(v => v % 2 ? v * 2 : null)\n      spyOn(__internals__, 'createFormatHostSection').andCall(v => v < 300 ? v * 3 : null)\n      const inputs = [\n        123,\n        234,\n        345\n      ]\n      const expected = [\n        {\n          type: 'metadata',\n          abstract: true,\n          content: [ 123 * 2, 123 * 3 ],\n          separator: '\\n'\n        },\n        {\n          type: 'metadata',\n          abstract: true,\n          content: [ 234 * 3 ],\n          separator: '\\n'\n        },\n        {\n          type: 'metadata',\n          abstract: true,\n          content: [ 345 * 2 ],\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createMetadataSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRootTitleSection', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({\n          info: new Info({ title: 'some title' })\n        })\n      ]\n      const expected = [\n        {\n          type: 'header',\n          depth: 1,\n          value: {\n            abstract: true,\n            content: [ 'Unnamed API' ],\n            separator: ''\n          }\n        },\n        {\n          type: 'header',\n          depth: 1,\n          value: {\n            abstract: true,\n            content: [ 'some title' ],\n            separator: ''\n          }\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createRootTitleSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRootDescriptionSection', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({\n          info: new Info({\n            description: 'some description'\n          })\n        })\n      ]\n      const expected = [\n        null,\n        {\n          type: 'content',\n          value: 'some description'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createRootDescriptionSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createApiNameAndOverviewSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createRootTitleSection').andCall(v => v % 2 ? v * 2 : null)\n      spyOn(__internals__, 'createRootDescriptionSection').andCall(v => v < 300 ? v * 3 : null)\n\n      const inputs = [\n        123,\n        234,\n        345\n      ]\n      const expected = [\n        {\n          type: 'overview',\n          abstract: true,\n          content: [ 123 * 2, 123 * 3 ],\n          separator: '\\n'\n        },\n        {\n          type: 'overview',\n          abstract: true,\n          content: [ 234 * 3 ],\n          separator: '\\n'\n        },\n        {\n          type: 'overview',\n          abstract: true,\n          content: [ 345 * 2 ],\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createApiNameAndOverviewSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceGroupHeaderSection', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        {\n          type: 'header',\n          depth: 2,\n          value: {\n            abstract: true,\n            content: [ 'Group Resources' ],\n            separator: ''\n          }\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createResourceGroupHeaderSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResourceIntoResourceEntryBasedOnPath', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource({\n          path: new URL({\n            url: 'https://echo.paw.cloud/{{version}}',\n            variableDelimiters: List([ '{{', '}}' ])\n          })\n        })\n      ]\n      const expected = [\n        {\n          key: 'https://echo.paw.cloud/{version}',\n          value: new Resource({\n            path: new URL({\n              url: 'https://echo.paw.cloud/{{version}}',\n              variableDelimiters: List([ '{{', '}}' ])\n            })\n          })\n        }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertResourceIntoResourceEntryBasedOnPath(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mergeResourceEntriesBasedOnKey', () => {\n    it('should work', () => {\n      const inputs = [\n        [ {}, { key: 'abc', value: 123 } ],\n        [\n          {\n            abc: new Resource({\n              description: 'preserved',\n              methods: OrderedMap({\n                a: 123\n              })\n            })\n          },\n          {\n            key: 'abc', value: new Resource({\n              description: 'dropped',\n              methods: OrderedMap({\n                b: 234\n              })\n            })\n          }\n        ],\n        [\n          {\n            abc: new Resource({\n              description: 'preserved',\n              methods: OrderedMap({\n                a: 123,\n                b: 234\n              })\n            })\n          },\n          {\n            key: 'abc', value: new Resource({\n              description: 'dropped',\n              methods: OrderedMap({\n                b: 345,\n                c: 456\n              })\n            })\n          }\n        ]\n      ]\n      const expected = [\n        { abc: 123 },\n        { abc: new Resource({\n          description: 'preserved',\n          methods: OrderedMap({\n            a: 123,\n            b: 234\n          })\n        }) },\n        { abc: new Resource({\n          description: 'preserved',\n          methods: OrderedMap({\n            a: 123,\n            b: 345,\n            c: 456\n          })\n        }) }\n      ]\n      const actual = inputs.map(input => __internals__.mergeResourceEntriesBasedOnKey(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getMergedResourcesBasedOnPathFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertResourceIntoResourceEntryBasedOnPath').andCall(v => v * 2)\n      spyOn(__internals__, 'mergeResourceEntriesBasedOnKey')\n        .andCall((a, v, k) => Object.assign(a, { [k]: v }))\n\n      const inputs = [\n        new Api(),\n        new Api({\n          resources: OrderedMap({\n            a: 123,\n            b: 234,\n            c: 345\n          })\n        })\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap({\n          a: 123 * 2,\n          b: 234 * 2,\n          c: 345 * 2\n        })\n      ]\n      const actual = inputs.map(input => __internals__.getMergedResourcesBasedOnPathFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryParametersFromResourceWithDuplicates', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Api(), new Resource() ],\n        [ new Api(), new Resource({\n          methods: OrderedMap({\n            a: new Request(),\n            b: new Request()\n          })\n        }) ],\n        [ new Api(), new Resource({\n          methods: OrderedMap({\n            a: new Request({\n              parameters: new ParameterContainer({\n                headers: OrderedMap({\n                  a1: new Parameter({ key: 'a1' }),\n                  a2: new Parameter({ key: 'a2' })\n                })\n              })\n            }),\n            b: new Request()\n          })\n        }) ],\n        [ new Api(), new Resource({\n          methods: OrderedMap({\n            a: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  a1: new Parameter({ key: 'a1' }),\n                  a2: new Parameter({ key: 'a2' })\n                })\n              })\n            }),\n            b: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  b1: new Parameter({ key: 'b1' }),\n                  b2: new Parameter({ key: 'b2' })\n                }),\n                headers: OrderedMap({\n                  b3: new Parameter({ key: 'b3' })\n                })\n              })\n            })\n          })\n        }) ],\n        [ new Api(), new Resource({\n          methods: OrderedMap({\n            a: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  a1: new Parameter({ key: 'a1' }),\n                  a2: new Parameter({ key: 'a2' }),\n                  // checks if duplicates are removed\n                  s1: new Parameter({ key: 's1' })\n                })\n              })\n            }),\n            b: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  b1: new Parameter({ key: 'b1' }),\n                  b2: new Parameter({ key: 'b2' }),\n                  s1: new Parameter({ key: 's1' })\n                }),\n                headers: OrderedMap({\n                  b3: new Parameter({ key: 'b3' })\n                })\n              })\n            })\n          })\n        }) ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              s2: new Parameter({ key: 's2' }),\n              s3: new Parameter({ key: 's3' }),\n              s4: new Parameter({ key: 's4' }),\n              s5: new Parameter({ key: 's5' })\n            })\n          })\n        }), new Resource({\n          methods: OrderedMap({\n            a: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  a1: new Parameter({ key: 'a1' }),\n                  a2: new Parameter({ key: 'a2' }),\n                  s1: new Parameter({ key: 's1' }),\n                  // checks if Reference are resolved correctly\n                  s2: new Reference({ type: 'parameter', uuid: 's2' }),\n                  // checks if multiple references pointing to the same param are not duplicated\n                  s3: new Reference({ type: 'parameter', uuid: 's3' }),\n                  // checks if a Param & Reference with the same resolved `key` are not duplicated\n                  s4: new Parameter({ key: 's4' })\n                })\n              })\n            }),\n            b: new Request({\n              parameters: new ParameterContainer({\n                queries: OrderedMap({\n                  b1: new Parameter({ key: 'b1' }),\n                  b2: new Parameter({ key: 'b2' }),\n                  s1: new Parameter({ key: 's1' }),\n                  s3: new Reference({ type: 'parameter', uuid: 's3' }),\n                  s4: new Reference({ type: 'parameter', uuid: 's4' })\n                }),\n                headers: OrderedMap({\n                  b3: new Parameter({ key: 'b3' })\n                })\n              })\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [],\n        [],\n        [ 'a1', 'a2', 'b1', 'b2' ],\n        [ 'a1', 'a2', 's1', 'b1', 'b2', 's1' ],\n        [ 'a1', 'a2', 's1', 's2', 's3', 's4', 'b1', 'b2', 's1', 's3', 's4' ]\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractQueryParametersFromResourceWithDuplicates(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@deduplicateArray', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 123, 123, 234, 345, 123, 234, 345, 234 ]\n      ]\n      const expected = [\n        [ 123, 234, 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.deduplicateArray(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryParametersFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryParametersFromResourceWithDuplicates')\n        .andCall((a, r) => [ a * 2, r * 2 ])\n      spyOn(__internals__, 'deduplicateArray').andCall(a => a.map(v => v * 3))\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        [ 123 * 2 * 3, 234 * 2 * 3 ]\n      ]\n      const actual = inputs.map(input => __internals__.extractQueryParametersFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryStringFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryParametersFromResource')\n        .andCall((a, r) => a ? [ a * 2, r * 2 ] : [])\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'query-params',\n          abstract: true,\n          content: [\n            '{?',\n            {\n              abstract: true,\n              content: [ 123 * 2, 234 * 2 ],\n              separator: ','\n            },\n            '}'\n          ],\n          separator: ''\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractQueryStringFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceTitleSectionContent', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryStringFromResource').andCall(a => a)\n\n      const inputs = [\n        [ null, new Resource({\n          name: null,\n          path: new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n        }) ],\n        [ null, new Resource({\n          name: '/customers/{userId}',\n          path: new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n        }) ],\n        [ null, new Resource({\n          name: 'User Operations',\n          path: new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n        }) ],\n        [ '{?graphql}', new Resource({\n          name: 'User Operations',\n          path: new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n        }) ],\n        [ '{?graphql}', new Resource({\n          path: new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n        }) ],\n        [ '{?graphql}', new Resource({\n          path: (new URL()).set('slashes', false)\n        }) ]\n      ]\n      const expected = [\n        [ '/users/{userId}' ],\n        [ '/users/{userId}' ],\n        [ 'User Operations', ' [', '/users/{userId}', ']' ],\n        [ 'User Operations', ' [', '/users/{userId}', '{?graphql}', ']' ],\n        [ '/users/{userId}', '{?graphql}' ],\n        [ '/', '{?graphql}' ]\n      ]\n      const actual = inputs.map(input => __internals__.createResourceTitleSectionContent(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceTitleSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createResourceTitleSectionContent')\n        .andCall((a, r) => a ? [ a * 2, r * 2 ] : [])\n\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'header',\n          depth: 3,\n          value: {\n            abstract: true,\n            content: [ 123 * 2, 234 * 2 ],\n            separator: ''\n          }\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createResourceTitleSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceDescriptionSection', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource(),\n        new Resource({\n          description: 'abc'\n        })\n      ]\n      const expected = [\n        null,\n        {\n          type: 'content',\n          value: 'abc'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createResourceDescriptionSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationTitleSectionContent', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({\n          name: 'get user by id'\n        }),\n        new Request({\n          method: 'get'\n        }),\n        new Request({\n          name: 'get user by id',\n          method: 'get'\n        })\n      ]\n      const expected = [\n        [],\n        [],\n        [ 'GET' ],\n        [ 'get user by id', ' [', 'GET', ']' ]\n      ]\n      const actual = inputs.map(input => __internals__.createOperationTitleSectionContent(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationTitleSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationTitleSectionContent')\n        .andCall(o => o.map(v => v * 2))\n\n      const inputs = [\n        [],\n        [ 123 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'header',\n          depth: 4,\n          value: {\n            abstract: true,\n            content: [ 123 * 2 ],\n            separator: ''\n          }\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationTitleSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationDescriptionSection', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({\n          description: 'abc'\n        })\n      ]\n      const expected = [\n        null,\n        { type: 'content', value: 'abc' }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationDescriptionSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterKeySegment', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter(),\n        new Parameter({\n          key: 'limit'\n        })\n      ]\n      const expected = [\n        null,\n        {\n          abstract: true,\n          content: [ 'limit' ],\n          separator: ''\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createParameterKeySegment(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterOptionalSegmentContent', () => {\n    it('should work', () => {\n      const inputs = [\n        [ {}, new Parameter() ],\n        [ {}, new Parameter({ type: 'string' }) ],\n        [ { type: 'number' }, new Parameter({ type: 'string' }) ],\n        [ { type: 'number' }, new Parameter({ type: 'string', required: true }) ]\n      ]\n      const expected = [\n        [ 'optional' ],\n        [ 'string', 'optional' ],\n        [ 'number', 'optional' ],\n        [ 'number', 'required' ]\n      ]\n      const actual = inputs.map(\n        input => __internals__.createParameterOptionalSegmentContent(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterOptionalSegment', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createParameterOptionalSegmentContent')\n        .andCall((s, p) => s ? [ s * 2, p * 2 ] : [])\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          abstract: true,\n          content: [\n            '(',\n            {\n              abstract: true,\n              content: [ 123 * 2, 234 * 2 ],\n              separator: ', '\n            },\n            ')'\n          ],\n          separator: ''\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createParameterOptionalSegment(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterDescriptionSegment', () => {\n    it('should work', () => {\n      const inputs = [\n        [ {}, new Parameter() ],\n        [ {}, new Parameter({ description: 'abc' }) ],\n        [ { description: 'def' }, new Parameter({ description: 'abc' }) ]\n      ]\n      const expected = [\n        null,\n        {\n          abstract: true,\n          content: [ '-', 'abc' ],\n          separator: ' '\n        },\n        {\n          abstract: true,\n          content: [ '-', 'def' ],\n          separator: ' '\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createParameterDescriptionSegment(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createParameterPayloadSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createParameterKeySegment').andCall(p => p ? p * 2 : null)\n      spyOn(__internals__, 'createParameterOptionalSegment').andCall((s, p) => s ? s + p : null)\n      spyOn(__internals__, 'createParameterDescriptionSegment').andCall((s, p) => s ? s * p : null)\n\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          abstract: true,\n          content: [\n            234 * 2,\n            123 + 234,\n            123 * 234\n          ].filter(v => !!v),\n          separator: ' '\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createParameterPayloadSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterIntoParamSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createParameterPayloadSection')\n        .andCall(s => s['x-title'] || null)\n      spyOn(__internals__, 'createOperationRequestSchemaAssetSection')\n        .andCall(s => s['x-title'] ? s['x-title'] * 2 : null)\n\n      const inputs = [\n        null,\n        new Parameter(),\n        new Parameter({ key: 123 })\n      ]\n      const expected = [\n        null,\n        null,\n        {\n          type: 'parameter',\n          abstract: true,\n          content: [\n            123,\n            123 * 2\n          ],\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.convertParameterIntoParamSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPathParamsFromPath', () => {\n    it('should work', () => {\n      const inputs = [\n        new URL({ url: '/users', variableDelimiters: List([ '{', '}' ]) }),\n        new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) }),\n        new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n          .set('pathname', new URLComponent({\n            parameter: new Parameter({ superType: 'sequence' })\n          })\n        ),\n        new URL({ url: '/users/{userId}', variableDelimiters: List([ '{', '}' ]) })\n          .set('pathname', new URLComponent({\n            parameter: new Parameter({ superType: 'sequence', value: List() })\n          })\n        )\n      ]\n      const expected = [\n        [],\n        [ new Parameter({\n          key: 'userId',\n          name: 'userId',\n          type: 'string',\n          default: 'userId'\n        }) ],\n        [],\n        []\n      ]\n      const actual = inputs.map(input => __internals__.extractPathParamsFromPath(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationParametersSectionContent', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoParamSection')\n        .andCall(v => v * 2)\n      spyOn(__internals__, 'extractPathParamsFromPath').andCall(a => a.map(v => v * 3))\n\n      const inputs = [\n        [ [], new ParameterContainer() ],\n        [ [], new ParameterContainer({\n          queries: OrderedMap({\n            a: 123,\n            b: 234\n          })\n        }) ],\n        [ [ 345 ], new ParameterContainer({\n          queries: OrderedMap({\n            a: 123,\n            b: 234\n          })\n        }) ]\n      ]\n\n      const expected = [\n        [],\n        [ 123 * 2, 234 * 2 ],\n        [ 123 * 2, 234 * 2, 345 * 2 * 3 ]\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.createOperationParametersSectionContent(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationParametersSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationParametersSectionContent')\n        .andCall((p, c) => p ? [ p * 2, c * 2 ] : [])\n\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'list-item',\n          abstract: true,\n          content: [\n            'Parameters',\n            {\n              type: 'list',\n              depth: 2,\n              value: [ 123 * 2, 234 * 2 ]\n            }\n          ],\n          separator: '\\n'\n        }\n      ]\n\n      const actual = inputs.map(input => __internals__.createOperationParametersSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractContentTypeFromConstraints', () => {\n    it('should work', () => {\n      const inputs = [\n        List(),\n        List([\n          new Parameter({ key: 'Accept', default: 'application/json' })\n        ]),\n        List([\n          new Parameter({ key: 'Accept', default: 'application/json' }),\n          new Parameter({ key: 'Content-Type', default: 'application/json' })\n        ]),\n        List([\n          new Parameter({ key: 'Accept', default: 'application/json' }),\n          new Parameter({ key: 'Content-Type', default: 'application/json' }),\n          new Parameter({ key: 'Content-Type', default: 'application/xml' })\n        ]),\n        List([\n          new Parameter({ key: 'Accept', default: 'application/json' }),\n          new Parameter({ key: 'Content-Type' })\n        ])\n      ]\n      const expected = [\n        null,\n        null,\n        'application/json',\n        null,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractContentTypeFromConstraints(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationRequestTitleSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractContentTypeFromConstraints').andCall(c => c ? c * 2 : null)\n\n      const inputs = [\n        null,\n        123\n      ]\n\n      const expected = [\n        {\n          type: 'content',\n          value: 'Request'\n        },\n        {\n          abstract: true,\n          content: [\n            'Request (',\n            123 * 2,\n            ')'\n          ],\n          separator: ''\n        }\n      ]\n\n      const actual = inputs.map(input => __internals__.createOperationRequestTitleSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertHeaderParameterIntoHeaderSection', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter(),\n        new Parameter({\n          key: 'Content-Type',\n          default: 'application/json',\n          constraints: List([\n            new Constraint.JSONSchema({ type: 'string', pattern: 'application/.*+?json' })\n          ])\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          constraints: List([\n            new Constraint.JSONSchema({ type: 'string', pattern: 'application/.*+?json' })\n          ])\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          constraints: List([\n            new Constraint.JSONSchema({\n              type: 'string',\n              default: 'application/json',\n              pattern: 'application/.*+?json'\n            })\n          ])\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          constraints: List([\n            new Constraint.JSONSchema({\n              type: 'string',\n              enum: [ 'application/json', 'application/xml' ]\n            })\n          ])\n        })\n      ]\n      const expected = [\n        'null: null',\n        'Content-Type: application/json',\n        'Content-Type: null',\n        'Content-Type: application/json',\n        'Content-Type: application/json'\n      ]\n      const actual = inputs.map(\n        input => __internals__.convertHeaderParameterIntoHeaderSection(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getHeadersForOperationRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractContentTypeFromConstraints').andCall(v => v)\n      const inputs = [\n        [ null, new ParameterContainer(), null ],\n        [ null, new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({ key: 'X-Origin' }),\n            b: new Parameter({ key: 'Content-Type' })\n          })\n        }), null ],\n        [ 'application/json', new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({ key: 'X-Origin' }),\n            b: new Parameter({ key: 'Content-Type' })\n          })\n        }), null ],\n        [ null, new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({ key: 'X-Origin' }),\n            b: new Parameter({ key: 'Content-Type' })\n          })\n        }), 'get' ],\n        [ 'application/json', new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({ key: 'X-Origin' }),\n            b: new Parameter({ key: 'Content-Type' })\n          })\n        }), 'post' ],\n        [ 'application/json', new ParameterContainer({\n          headers: OrderedMap({\n            b: new Parameter({ key: 'Content-Type' })\n          })\n        }), 'post' ]\n      ]\n      const expected = [\n        null,\n        OrderedMap({\n          a: new Parameter({ key: 'X-Origin' }),\n          b: new Parameter({ key: 'Content-Type' })\n        }),\n        OrderedMap({\n          a: new Parameter({ key: 'X-Origin' })\n        }),\n        OrderedMap({\n          a: new Parameter({ key: 'X-Origin' })\n        }),\n        OrderedMap({\n          a: new Parameter({ key: 'X-Origin' })\n        }),\n        null\n      ]\n      const actual = inputs.map(input => __internals__.getHeadersForOperationRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationRequestHeaderSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getHeadersForOperationRequest').andCall((cs, c, m) => {\n        return cs ? List([ cs * 2, c * 2, m * 2 ]) : null\n      })\n\n      spyOn(__internals__, 'convertHeaderParameterIntoHeaderSection').andCall(v => v * 3)\n\n      const inputs = [\n        [ null, null, null, null ],\n        [ 123, 234, 345, 456 ]\n      ]\n\n      const expected = [\n        null,\n        {\n          type: 'list',\n          depth: 2,\n          value: [\n            {\n              abstract: true,\n              content: [\n                'Headers',\n                {\n                  type: 'asset',\n                  depth: 4,\n                  value: [ 234 * 2 * 3, 345 * 2 * 3, 456 * 2 * 3 ].join('\\n')\n                }\n              ],\n              separator: '\\n'\n            }\n          ]\n        }\n      ]\n      const actual = inputs.map(\n        input => __internals__.createOperationRequestHeaderSection(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationRequestSchemaAssetSection', () => {\n    it('should work', () => {\n      const inputs = [\n        123\n      ]\n      const expected = [\n        {\n          type: 'asset',\n          depth: 4,\n          value: 123\n        }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.createOperationRequestSchemaAssetSection(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaForSingleBodyParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap({\n          a: new Parameter({\n            constraints: List([\n              new Constraint.JSONSchema({\n                type: 'string',\n                pattern: '[0-9a-f]{16}'\n              })\n            ])\n          })\n        })\n      ]\n      const expected = [\n        {\n          type: 'string',\n          pattern: '[0-9a-f]{16}'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaForSingleBodyParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaForMultipleBodyParameters', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({\n          a: new Parameter({\n            constraints: List([ new Constraint.JSONSchema({ pattern: '[0-9a-f]{16}' }) ])\n          }),\n          b: new Parameter({\n            key: 'b2',\n            constraints: List([ new Constraint.JSONSchema({ pattern: '[0-9a-f]{10}' }) ])\n          }),\n          c: new Parameter({\n            constraints: List([\n              new Constraint.JSONSchema({ title: 'c2', pattern: '[0-9a-f]{13}' })\n            ])\n          })\n        })\n      ]\n\n      const expected = [\n        { type: 'object', properties: {} },\n        { type: 'object', properties: {\n          a: { pattern: '[0-9a-f]{16}' },\n          b2: { pattern: '[0-9a-f]{10}', 'x-title': 'b2' },\n          c2: { pattern: '[0-9a-f]{13}', title: 'c2' }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaForMultipleBodyParameters(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromBodyParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaForSingleBodyParameter')\n        .andCall(p => p.map(v => v * 2).valueSeq().toJS())\n      spyOn(__internals__, 'getSchemaForMultipleBodyParameters')\n        .andCall(p => p.map(v => v * 3).valueSeq().toJS())\n\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({ a: 123 }),\n        OrderedMap({ a: 123, b: 234 })\n      ]\n      const expected = [\n        null,\n        [ 123 * 2 ],\n        [ 123 * 3, 234 * 3 ]\n      ]\n      const actual = inputs.map(input => __internals__.getSchemaFromBodyParameters(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationRequestSchemaSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getSchemaFromBodyParameters')\n        .andCall(p => p.valueSeq().get(0) * 2)\n      spyOn(__internals__, 'createOperationRequestSchemaAssetSection')\n        .andCall(v => v * 3)\n      const inputs = [\n        new ParameterContainer(),\n        new ParameterContainer({\n          body: OrderedMap({ a: 123 })\n        })\n      ]\n\n      const expected = [\n        null,\n        {\n          type: 'list',\n          depth: 2,\n          value: [\n            {\n              abstract: true,\n              content: [\n                'Schema',\n                123 * 2 * 3\n              ],\n              separator: '\\n'\n            }\n          ]\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationRequestSchemaSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationRequestSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationRequestTitleSection').andCall(c => c ? c * 2 : null)\n      spyOn(__internals__, 'createOperationRequestHeaderSection')\n        .andCall((a, cs, c, m) => a ? a + cs + c + m : null)\n      spyOn(__internals__, 'createOperationRequestSchemaSection')\n        .andCall(c => c ? c * 3 : null)\n\n      const inputs = [\n        [ null, null, null, new Request() ],\n        [ null, 234, null, new Request({ method: 456 }) ],\n        [ 123, 234, 345, new Request({ method: 456 }) ]\n      ]\n      const expected = [\n        null,\n        null,\n        {\n          type: 'list-item',\n          abstract: true,\n          content: [\n            234 * 2,\n            123 + 234 + 345 + 456,\n            345 * 3\n          ].filter(v => !!v),\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationRequestSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationResponseTitleSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractContentTypeFromConstraints').andCall(v => v)\n\n      const inputs = [\n        [ new Response(), null ],\n        [ new Response({ code: 404 }), null ],\n        [ new Response({ code: 404 }), 'application/json' ]\n      ]\n      const expected = [\n        {\n          type: 'content',\n          value: 'Response 200'\n        },\n        {\n          type: 'content',\n          value: 'Response 404'\n        },\n        {\n          abstract: true,\n          content: [ 'Response ', 404, ' (', 'application/json', ')' ],\n          separator: ''\n        }\n      ]\n      const actual = inputs.map(\n        input => __internals__.createOperationResponseTitleSection(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationResponseSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationResponseTitleSection')\n        .andCall((r, l) => l.size ? l.toJS().join(',') : null)\n      spyOn(__internals__, 'createOperationRequestHeaderSection')\n        .andCall((a, cs) => cs.size ? cs.map(v => v * 2).toJS().join(',') : null)\n      spyOn(__internals__, 'createOperationRequestSchemaSection')\n        .andReturn(456)\n      const inputs = [\n        [ new Api(), null ],\n        [ new Api(), new Response() ],\n        [ new Api(), new Response({\n          contexts: List([\n            new Context({\n              constraints: List([ 123, 234, 345 ])\n            })\n          ])\n        }) ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'request',\n          abstract: true,\n          content: [ 456 ],\n          separator: '\\n'\n        },\n        {\n          type: 'request',\n          abstract: true,\n          content: [ '123,234,345', '246,468,690', 456 ],\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationResponseSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDefaultResponseSection', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        [ {\n          type: 'content',\n          value: 'Response 200'\n        } ]\n      ]\n      const actual = inputs.map(input => __internals__.createDefaultResponseSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationResponseSections', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createDefaultResponseSection').andReturn([ 123 ])\n      spyOn(__internals__, 'createOperationResponseSection')\n        .andCall((a, r) => r ? r.get('code') * 2 : null)\n\n      const inputs = [\n        [ new Api(), new Request() ],\n        [ new Api({\n          store: new Store({\n            response: OrderedMap({\n              '500': new Response({ code: 500 })\n            })\n          })\n        }), new Request({\n          responses: OrderedMap({\n            '200': new Response({ code: 200 }),\n            '404': new Response({ code: 404 }),\n            '500': new Reference({ type: 'response', uuid: '500' }),\n            '600': new Reference({ type: 'response', uuid: '600' })\n          })\n        }) ]\n      ]\n      const expected = [\n        [ 123 ],\n        [ 400, 808, 1000 ]\n      ]\n      const actual = inputs.map(input => __internals__.createOperationResponseSections(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationContentSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationParametersSection').andCall(p => p ? p * 2 : null)\n      spyOn(__internals__, 'createOperationRequestSection')\n        .andCall((a, cs, c, o) => o.get('name') ? o.get('name') * 3 : null)\n      spyOn(__internals__, 'createOperationResponseSections')\n        .andCall((a, o) => o.get('name') ? [ o.get('name') * 4 ] : [])\n\n      const inputs = [\n        [ new Api(), null, new Request() ],\n        [ new Api(), 123, new Request({\n          name: 200,\n          contexts: List([ new Context({ constraints: List([ new Parameter({\n            key: 'Content-Type',\n            default: 'application/json'\n          }) ]) }) ])\n        }) ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'list',\n          depth: 0,\n          value: [ 123 * 2, 200 * 3, 200 * 4 ]\n        }\n      ]\n\n      const actual = inputs.map(input => __internals__.createOperationContentSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createOperationSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationTitleSection').andCall(o => o ? o * 2 : null)\n      spyOn(__internals__, 'createOperationDescriptionSection').andCall(o => o ? o * 3 : null)\n      spyOn(__internals__, 'createOperationContentSection')\n        .andCall((a, p, o) => a ? a + p + o : null)\n\n      const inputs = [\n        [ null, null, null ],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'operation',\n          abstract: true,\n          content: [ 345 * 2, 345 * 3, 123 + 234 + 345 ],\n          separator: '\\n\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createOperationSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceOperationSections', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createOperationSection').andCall((a, p, o) => a ? o + p : null)\n\n      const inputs = [\n        [ null, new Resource() ],\n        [\n          123,\n          new Resource({\n            path: 234,\n            methods: OrderedMap({ a: 345, b: 456 })\n          })\n        ]\n      ]\n      const expected = [\n        [],\n        [ 234 + 345, 234 + 456 ]\n      ]\n      const actual = inputs.map(input => __internals__.createResourceOperationSections(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createResourceTitleSection')\n        .andCall((a, r) => a ? a + r : null)\n      spyOn(__internals__, 'createResourceDescriptionSection')\n        .andCall(r => r * 2)\n      spyOn(__internals__, 'createResourceOperationSections')\n        .andCall(a => a ? [ a * 2 ] : [])\n\n      const inputs = [\n        [ null, null ],\n        [ 123, 234 ]\n      ]\n      const expected = [\n        null,\n        {\n          type: 'resource',\n          abstract: true,\n          content: [\n            123 + 234,\n            234 * 2,\n            123 * 2\n          ].filter(v => !!v),\n          separator: '\\n\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createResourceSection(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceSections', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getMergedResourcesBasedOnPathFromApi').andCall(v => v)\n      spyOn(__internals__, 'createResourceSection').andCall((a, r) => r * 2)\n\n      const inputs = [\n        OrderedMap({ a: 123, b: 234, c: 345 })\n      ]\n      const expected = [\n        [ 123 * 2, 234 * 2, 345 * 2 ]\n      ]\n      const actual = inputs.map(input => __internals__.createResourceSections(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createResourceGroupSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createResourceGroupHeaderSection')\n        .andReturn(123)\n      spyOn(__internals__, 'createResourceSections')\n        .andCall(a => [ a ])\n\n      const inputs = [\n        234\n      ]\n\n      const expected = [\n        {\n          type: 'resourceGroups',\n          abstract: true,\n          content: [\n            123,\n            234\n          ],\n          separator: '\\n\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createResourceGroupSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDataStructuresHeaderSection', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        {\n          type: 'header',\n          depth: 1,\n          value: 'Data Structures'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createDataStructuresHeaderSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDataStructuresSectionContent', () => {\n    it('should work', () => {\n      const inputs = [\n        { key: 'User', value: {} },\n        { key: 'address', value: { type: 'string' } }\n      ]\n      const expected = [\n        {\n          abstract: true,\n          content: [\n            {\n              type: 'header',\n              depth: 2,\n              value: {\n                abstract: true,\n                content: [\n                  'User',\n                  ' (',\n                  'object',\n                  ')'\n                ],\n                separator: ''\n              }\n            },\n            {\n              type: 'asset',\n              depth: 2,\n              value: {}\n            }\n          ],\n          separator: '\\n'\n        },\n        {\n          abstract: true,\n          content: [\n            {\n              type: 'header',\n              depth: 2,\n              value: {\n                abstract: true,\n                content: [\n                  'address',\n                  ' (',\n                  'string',\n                  ')'\n                ],\n                separator: ''\n              }\n            },\n            {\n              type: 'asset',\n              depth: 2,\n              value: { type: 'string' }\n            }\n          ],\n          separator: '\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createDataStructuresSectionContent(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDataStructureSections', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createDataStructuresSectionContent')\n        .andCall(({ value }) => value.default * 2)\n\n      const inputs = [\n        new Api(),\n        new Api({\n          store: new Store({\n            constraint: null\n          })\n        }),\n        new Api({\n          store: new Store({\n            constraint: OrderedMap({\n              a: new Constraint.JSONSchema({ type: 'number', default: 123 }),\n              b: new Constraint.JSONSchema({ type: 'number', default: 234 })\n            })\n          })\n        })\n      ]\n      const expected = [\n        [],\n        [],\n        [ 123 * 2, 234 * 2 ]\n      ]\n\n      const actual = inputs.map(input => __internals__.createDataStructureSections(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createDataStructuresSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createDataStructureSections')\n        .andCall(a => a ? [ a * 2 ] : [])\n      spyOn(__internals__, 'createDataStructuresHeaderSection')\n        .andReturn(234)\n\n      const inputs = [\n        null,\n        123\n      ]\n      const expected = [\n        null,\n        {\n          type: 'dataStructures',\n          abstract: true,\n          content: [ 234, 123 * 2 ],\n          separator: '\\n\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createDataStructuresSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertApiIntoSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createMetadataSection').andCall(a => a ? a * 2 : null)\n      spyOn(__internals__, 'createApiNameAndOverviewSection').andCall(a => a ? a * 3 : null)\n      spyOn(__internals__, 'createResourceGroupSection').andCall(a => a ? a * 4 : null)\n      spyOn(__internals__, 'createDataStructuresSection').andCall(a => a ? a * 5 : null)\n\n      const inputs = [\n        null,\n        123\n      ]\n      const expected = [\n        {\n          abstract: true,\n          content: [],\n          separator: '\\n\\n'\n        },\n        {\n          abstract: true,\n          content: [ 123 * 2, 123 * 3, 123 * 4, 123 * 5 ],\n          separator: '\\n\\n'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.convertApiIntoSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@stringifyAbstractSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'stringifySection').andCall(v => v * 2)\n\n      const inputs = [\n        { content: [], separator: '**' },\n        { content: [ 123, 234 ], separator: '**' }\n      ]\n      const expected = [\n        '',\n        '246**468'\n      ]\n      const actual = inputs.map(input => __internals__.stringifyAbstractSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@stringifyHeaderSection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'stringifySection').andCall(v => v * 2)\n\n      const inputs = [\n        { value: 123, depth: 1 },\n        { value: 234, depth: 3 },\n        { value: 234, depth: 0 }\n      ]\n      const expected = [\n        '# 246',\n        '### 468',\n        '# 468'\n      ]\n      const actual = inputs.map(input => __internals__.stringifyHeaderSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@stringifyListSection', () => {\n    it('should work', () => {\n      const inputs = [\n        { depth: 0, value: [ 123, 234 ] },\n        { depth: 1, value: [ 123, 234 ] },\n        { depth: 2, value: [ 123, 234 ] }\n      ]\n      const expected = [\n        '+ 123\\n\\n' +\n        '+ 234',\n        '  + 123\\n\\n' +\n        '  + 234',\n        '    + 123\\n\\n' +\n        '    + 234'\n      ]\n      const actual = inputs.map(input => __internals__.stringifyListSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@stringifyAssetSection', () => {\n    it('should work', () => {\n      const inputs = [\n        { value: 'abc', depth: 0 },\n        { value: { a: 123 }, depth: 2 }\n      ]\n      const expected = [\n        '```\\n' + 'abc' + '\\n```',\n        '```\\n' +\n        '    {\\n' +\n        '      \"a\": 123\\n' +\n        '    }' +\n        '\\n```'\n      ]\n      const actual = inputs.map(input => __internals__.stringifyAssetSection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@stringifySection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'stringifyAbstractSection').andCall(v => v.content * 2)\n      spyOn(__internals__, 'stringifyHeaderSection').andCall(v => v.value * 4)\n      spyOn(__internals__, 'stringifyListSection').andCall(v => v.value * 5)\n      spyOn(__internals__, 'stringifyAssetSection').andCall(v => v.value * 6)\n\n      const inputs = [\n        'abc',\n        { abstract: true, content: 123 },\n        { type: 'content', value: 234 },\n        { type: 'header', value: 345 },\n        { type: 'list', value: 456 },\n        { type: 'asset', value: 567 },\n        { type: 'weird', value: 678 }\n      ]\n      const expected = [\n        'abc',\n        123 * 2, 234, 345 * 4, 456 * 5, 567 * 6,\n        JSON.stringify({ type: 'weird', value: 678 }, null, 2)\n      ]\n      const actual = inputs.map(input => __internals__.stringifySection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@serialize', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertApiIntoSection').andCall(v => v * 2)\n      spyOn(__internals__, 'stringifySection').andCall(v => v * 3)\n\n      const inputs = [\n        { api: 123 }\n      ]\n      const expected = [\n        123 * 2 * 3 + '\\n'\n      ]\n      const actual = inputs.map(input => __internals__.serialize(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/serializers/internal/Serializer.js",
    "content": "const __meta__ = {\n  format: 'internal',\n  version: 'v1.0'\n}\n\nconst methods = {}\n\n/**\n * A Serializer to dump Api Records as JSON objects\n */\nexport class InternalSerializer {\n  static __meta__ = __meta__\n\n  /**\n   * dumps an Api Record\n   * @param {Api} api: the api to convert\n   * @returns {string} the corresponding dump object, as a string\n   */\n  static serialize(api) {\n    return methods.serialize(api)\n  }\n\n  /**\n   * returns a quality score for a content string wrt. to the intermediate model format.\n   * @param {String} content: the content of the file to analyze\n   * @returns {number} the quality of the content\n   */\n  static validate(content) {\n    return methods.validate(content)\n  }\n}\n\nmethods.serialize = ({ api }) => {\n  return JSON.stringify(api.toJS(), null, 2)\n}\n\nmethods.validate = () => {}\n\nexport const __internals__ = methods\nexport default InternalSerializer\n"
  },
  {
    "path": "src/serializers/paw/Serializer.js",
    "content": "/**\n * NOTE: We assume that contextual references have an overlay that contains the applicable contexts.\n */\n\nimport { List } from 'immutable'\nimport { DynamicValue, DynamicString, RecordParameter } from '../../mocks/PawShims'\n\nimport Api from '../../models/Api'\nimport Store from '../../models/Store'\nimport Auth from '../../models/Auth'\nimport Reference from '../../models/Reference'\nimport Parameter from '../../models/Parameter'\nimport Group from '../../models/Group'\n\nimport { currify } from '../../utils/fp-utils'\n\nconst __inputs__ = []\nconst __meta__ = {\n  format: 'paw',\n  version: 'v3.0'\n}\n\nconst methods = {}\n\n/**\n * A Serializer to import Api Records into Paw.\n */\nexport class PawSerializer {\n  static fileExtensions = [];\n\n  static __meta__ = __meta__\n  static inputs = __inputs__\n\n  /**\n   * imports an Api into a PawContext\n   * @param {PawContext} context: the paw context in which the api should be imported\n   * @param {Api} api: the api to convert\n   * @param {Array<Items>} items: the list of items that was passed to the serializer\n   * @param {PawOptions} options: contains a few options that can improve the user experience when\n   * importing in paw.\n   * @returns {boolean} whether the import was successful or not\n   */\n  static serialize({ options, api } = {}) {\n    return methods.serialize({ options, api })\n  }\n}\n\n/**\n * wraps a DynamicValue in a DynamicString\n * @param {DynamicValue} dv: the dv to wrapDV\n * @returns {DynamicString} the corresponding DynamicString\n */\nmethods.wrapDV = (dv) => new DynamicString(dv)\n\n/**\n * creates a JSON DynamicValue to wrap a JSON object.\n * @param {Object} json: the json object to wrap in a DV\n * @returns {DynamicValue} the corresponding JSON DynamicValue\n */\nmethods.createJSONDV = (json) => new DynamicValue('com.luckymarmot.JSONDynamicValue', {\n  json: JSON.stringify(json)\n})\n\n/**\n * creates a url-encoded body DynamicValue.\n * @param {Array<RecordParameter>} keyValues: the list of key-value pairs that store in the body dv.\n * @returns {DynamicValue} the corresponding dynamic value\n */\nmethods.createUrlEncodedBodyDV = (keyValues) => {\n  return new DynamicValue(\n  'com.luckymarmot.BodyFormKeyValueDynamicValue', {\n    keyValues: keyValues\n  })\n}\n\n/**\n * creates a multipart body DynamicValue.\n * @param {Array<RecordParameter>} keyValues: the list of key-value pairs that store in the body dv.\n * @returns {DynamicValue} the corresponding dynamic value\n */\nmethods.createMultipartBodyDV = (keyValues) => {\n  return new DynamicValue(\n    'com.luckymarmot.BodyMultipartFormDataDynamicValue', {\n      keyValues: keyValues\n    }\n  )\n}\n\n/**\n * creates a multiselector DynamicValue.\n * @param {Array<RecordParameter>} choices: the list of key-value pairs that store in the body dv.\n * @returns {DynamicValue} the corresponding dynamic value\n */\nmethods.createMultiSelectorDv = (choices) => {\n  return new DynamicValue('me.elliotchance.MultiSelectorDynamicValue', {\n    choices,\n    separator: ','\n  })\n}\n\n/**\n * extracts the title from an Api Record.\n * @param {Api} api: the api to get the name of.\n * @returns {string} the title of the api, or a default value if the api does not have any title\n */\nmethods.getTitleFromApi = (api) => api.getIn([ 'info', 'title' ]) || 'Imports'\n\n/**\n * creates a standard environment domain in which to store standard values, such as shared schemas,\n * parameters, endpoints and authentication methods.\n * @param {Context} context: the paw context in which to create the environment domain.\n * @param {Api} api: the api to import in Paw.\n * @returns {EnvironmentDomain} the newly created environment domain\n */\nmethods.createStandardEnvironmentDomain = (context, api) => {\n  const title = methods.getTitleFromApi(api)\n  return context.createEnvironmentDomain(title)\n}\n\n// assumes correctly formatted api\n/**\n * calculates the size of the standard environment domain. This is used to determine whether we\n * should create a domain or not.\n * @param {Api} api: the api to import in Paw.\n * @returns {integer} the number of values that would be stored in the environment domain.\n */\nmethods.getStandardEnvironmentDomainSize = (api) => {\n  const constraints = api.getIn([ 'store', 'constraint' ])\n  const endpoints = api.getIn([ 'store', 'endpoint' ])\n  const auths = api.getIn([ 'store', 'auth' ])\n  const parameters = api.getIn([ 'store', 'parameter' ])\n  // const responses = api.getIn([ 'store', 'response' ])\n\n  const size = constraints.size +\n    endpoints.size +\n    auths.size +\n    parameters.size\n    // +\n    // responses.size\n\n  return size\n}\n\n/**\n * tests whether an Api needs a standard environment domain to be fully imported in Paw\n * @param {Api} api: the api to import in Paw\n * @returns {boolean} whether a standard environment domain is needed.\n */\nmethods.needsStandardEnvironmentDomain = (api) => {\n  const size = methods.getStandardEnvironmentDomainSize(api)\n\n  return size > 0\n}\n\n/**\n * creates a Variable environment domain. This is used to import Variables with multiple contexts\n * into Paw.\n * @param {Context} context: the Paw context in which to create the environment domain\n * @param {Api} api: the api to import in Paw.\n * @returns {EnvironmentDomain} the newly created environment domain.\n *\n * NOTE: It needs to be separate from the standard domain because values imported in the standard\n * domain only have a single value possible, whereas variables can have multiple values whose\n * evaluation depend on the name of the context (Think switching between Postman Environments)\n */\nmethods.createVariableEnvironmentDomain = (context, api) => {\n  const title = methods.getTitleFromApi(api)\n  const domainName = 'Vars - ' + title\n  return context.createEnvironmentDomain(domainName)\n}\n\n/**\n * adds a Constraint as JSON DV to a domain.\n * @param {EnvironmentDomain} domain: the domain to add the constraint to.\n * @param {Environment} environment: the domain environment for which this value is applicable.\n * @param {Constraint} constraint: the constraint to add.\n * @param {string} key: the name of the constraint\n * @returns {EnvironmentVariable} the newly created environment variable\n */\nmethods.addConstraintToDomain = (domain, environment, constraint, key) => {\n  const variable = domain.createEnvironmentVariable(key)\n  const schema = constraint.toJSONSchema()\n  const dv = methods.createJSONDV(schema)\n  const ds = methods.wrapDV(dv)\n  variable.setValue(ds, environment)\n\n  return variable\n}\n\n/**\n * adds all constraints of a Constraint TypedStore into a domain.\n * @param {EnvironmentDomain} domain: the domain to add the constraints to.\n * @param {Environment} environment: the domain environment for which the constraints are\n * applicable.\n * @param {Api} api: the api to get the TypedStore from.\n * @returns {TypedStore}: a TypedStore of EnvironmentVariables representing constraints.\n */\nmethods.addConstraintsToDomain = (domain, environment, api) => {\n  const constraints = api.getIn([ 'store', 'constraint' ])\n  const addConstraint = currify(methods.addConstraintToDomain, domain, environment)\n\n  return constraints.map(addConstraint)\n}\n\n/**\n * removes ':' at the end of a protocol string\n * @param {string} protocol: the protocol to trim\n * @returns {string} the trimmed string\n */\nmethods.removeDotsFromProtocol = (protocol) => {\n  if (protocol[protocol.length - 1] === ':') {\n    return protocol.slice(0, protocol.length - 1)\n  }\n\n  return protocol\n}\n\n/**\n * converts a protocol string into a Record Parameter.\n * @param {string} protocol: the protocol to convert\n * @param {integer} index: the index of the protocol in the parent array. This is used to set the\n * first Record Parameter as enabled\n * @return {RecordParameter} the corresponding Record Parameter.\n */\nmethods.convertProtocolIntoRecordParameter = (protocol, index) => {\n  const stripped = methods.removeDotsFromProtocol(protocol)\n  const isEnabled = index === 0\n  return new RecordParameter(stripped, ', ', isEnabled)\n}\n\n/**\n * converts a protocol URLComponent into a DynamicValue.\n * @param {URLComponent} protocol: the url component to convert\n * @returns {DynamicValue} the corresponding DynamicValue.\n */\nmethods.createProtocolDV = (protocol) => {\n  if (!protocol || !protocol.size) {\n    return 'http'\n  }\n\n  if (protocol.size === 1) {\n    return methods.removeDotsFromProtocol(protocol.get(0))\n  }\n\n  const choices = protocol.map(methods.convertProtocolIntoRecordParameter).toJS()\n  return methods.createMultiSelectorDv(choices)\n}\n\n// TODO save parameters as document parameters when these finally exist in Paw\n/**\n * converts a urlComponent into a DynamicString or a standard string as a fallback.\n * @param {URLComponent} urlComponent: the urlComponent to convert\n * @return {string|DynamicString} the converted value\n */\nmethods.convertURLComponentToDynamicString = (urlComponent) => {\n  if (!urlComponent) {\n    return ''\n  }\n\n  return urlComponent.generate(List([ '{', '}' ]))\n}\n\n/**\n * converts an endpoint into a DynamicString.\n * @param {URL} endpoint: the endpoint to convert\n * @returns {DynamicString} the corresponding DynamicString\n */\nmethods.createEndpointDynamicString = (endpoint) => {\n  const protocol = methods.createProtocolDV(endpoint.get('protocol'))\n  const slashes = '://'\n  const hostname = methods.convertURLComponentToDynamicString(endpoint.get('hostname'))\n  const port = methods.convertURLComponentToDynamicString(endpoint.get('port'))\n  const portDots = port ? ':' : ''\n  const pathname = methods.convertURLComponentToDynamicString(endpoint.get('pathname'))\n  const cleanPathname = pathname[pathname.length - 1] === '/' ? pathname.slice(0, -1) : pathname\n\n  return new DynamicString(protocol, slashes, hostname, portDots, port, cleanPathname)\n}\n\n/**\n * adds an endpoint to a domain, as DynamicStrings\n * @param {EnvironmentDomain} domain: the domain to add the endpoint to.\n * @param {Environment} environment: the environment in which this endpoint value is applicable.\n * @param {URL} endpoint: the endpoint to add to the domain\n * @param {string} key: the name of the endpoint\n * @returns {EnvironmentVariable} the newly created environment variable.\n */\nmethods.addEndpointToDomain = (domain, environment, endpoint, key) => {\n  const variable = domain.createEnvironmentVariable(key)\n  const ds = methods.createEndpointDynamicString(endpoint)\n  variable.setValue(ds, environment)\n\n  return variable\n}\n\n/**\n * adds all endpoints from an Endpoint TypedStore to a domain.\n * @param {EnvironmentDomain} domain: the domain to add the endpoints to.\n * @param {Environment} environment: the environment in which these endpoints are applicable.\n * @param {Api} api: the api from which to get the Endpoint TypedStore.\n * @returns {TypedStore} a TypedStore of EnvironmentVariables representing endpoints.\n */\nmethods.addEndpointsToDomain = (domain, environment, api) => {\n  const endpoints = api.getIn([ 'store', 'endpoint' ])\n  const addEndpoint = currify(methods.addEndpointToDomain, domain, environment)\n\n  return endpoints.map(addEndpoint)\n}\n\n/**\n * adds a Parameter to a domain, as a DynamicString\n * @param {EnvironmentDomain} domain: the domain to add the parameter to.\n * @param {Environment} environment: the environment in which this parameter value is applicable.\n * @param {Parameter} parameter: the parameter to add to the domain\n * @param {string} key: the name of the endpoint\n * @returns {\n *   {\n *     variable: EnvironmentVariable,\n *     parameter: Parameter\n *   }\n * } an object containing the newly created environment variable, and its associated parameter.\n */\nmethods.addParameterToDomain = (domain, environment, parameter, key) => {\n  const variable = domain.createEnvironmentVariable(key)\n  const schema = parameter.getJSONSchema(false)\n  const dv = methods.createJSONDV(schema)\n  const ds = methods.wrapDV(dv)\n  variable.setValue(ds, environment)\n\n  return { variable, parameter }\n}\n\n/**\n * adds all parameters from a Parameter TypedStore to a domain.\n * @param {EnvironmentDomain} domain: the domain to add the parameters to.\n * @param {Environment} environment: the environment in which these parameters are applicable.\n * @param {Api} api: the api from which to get the Parameter TypedStore.\n * @returns {TypedStore} a TypedStore of EnvironmentVariables representing parameters.\n */\nmethods.addParametersToDomain = (domain, environment, api) => {\n  const parameters = api.getIn([ 'store', 'parameter' ])\n  const addParameter = currify(methods.addParameterToDomain, domain, environment)\n\n  return parameters.map(addParameter)\n}\n\n/**\n * converts a BasicAuth into its corresponding DynamicValue\n * @param {Auth} auth: the basic auth to convert\n * @returns {DynamicValue} the corresponding DynamicValue\n */\nmethods.convertBasicAuthIntoDynamicValue = (auth) => {\n  return new DynamicValue('com.luckymarmot.BasicAuthDynamicValue', {\n    username: auth.get('username') || '',\n    password: auth.get('password') || ''\n  })\n}\n\n/**\n * converts a DigestAuth into its corresponding DynamicValue\n * @param {Auth} auth: the basic auth to convert\n * @returns {DynamicValue} the corresponding DynamicValue\n */\nmethods.convertDigestAuthIntoDynamicValue = (auth) => {\n  return new DynamicValue('com.luckymarmot.PawExtensions.DigestAuthDynamicValue', {\n    username: auth.get('username') || '',\n    password: auth.get('password') || ''\n  })\n}\n\n/**\n * converts a OAuth1Auth into its corresponding DynamicValue\n * @param {Auth} auth: the basic auth to convert\n * @returns {DynamicValue} the corresponding DynamicValue\n */\nmethods.convertOAuth1AuthIntoDynamicValue = (auth) => {\n  return new DynamicValue('com.luckymarmot.OAuth1HeaderDynamicValue', {\n    callback: auth.get('callback') || '',\n    consumerSecret: auth.get('consumerSecret') || '',\n    tokenSecret: auth.get('tokenSecret') || '',\n    consumerKey: auth.get('consumerKey') || '',\n    algorithm: auth.get('algorithm') || '',\n    nonce: auth.get('nonce') || '',\n    additionalParameters: auth.get('additionalParameters') || '',\n    timestamp: auth.get('timestamp') || '',\n    token: auth.get('token') || ''\n  })\n}\n\n/**\n * converts a OAuth2Auth into its corresponding DynamicValue\n * @param {Auth} auth: the basic auth to convert\n * @returns {DynamicValue} the corresponding DynamicValue\n *\n * NOTE: not 100% sure that authorizationCode is equivalent to 'accessCode'. Might be 'password'.\n */\nmethods.convertOAuth2AuthIntoDynamicValue = (auth) => {\n  const grantType = {\n    accessCode: 0,\n    implicit: 1,\n    application: 2,\n    password: 3\n  }\n\n  return new DynamicValue('com.luckymarmot.OAuth2DynamicValue', {\n    authorizationURL: auth.get('authorizationUrl') || '',\n    accessTokenURL: auth.get('tokenUrl') || '',\n    grantType: grantType[auth.get('flow')] || 0,\n    scopes: auth.get('scopes').map(({ key }) => key).join(', ')\n  })\n}\n\n/**\n * converts an auth in its corresponding DynamicValue depending on the type of the auth.\n * @param {Auth} auth: the auth to convert\n * @returns {DynamicValue|''} the corresponding DynamicValue, or an empty string if there are no\n * equivalent for this auth in Paw.\n */\nmethods.convertAuthIntoDynamicValue = (auth) => {\n  if (auth instanceof Auth.Basic) {\n    return methods.convertBasicAuthIntoDynamicValue(auth)\n  }\n\n  if (auth instanceof Auth.Digest) {\n    return methods.convertDigestAuthIntoDynamicValue(auth)\n  }\n\n  if (auth instanceof Auth.OAuth1) {\n    return methods.convertOAuth1AuthIntoDynamicValue(auth)\n  }\n\n  if (auth instanceof Auth.OAuth2) {\n    return methods.convertOAuth2AuthIntoDynamicValue(auth)\n  }\n\n  return ''\n}\n\n/**\n * adds an Auth to a domain, as a DynamicString\n * @param {EnvironmentDomain} domain: the domain to add the auth to.\n * @param {Environment} environment: the environment in which this auth value is applicable.\n * @param {Auth} auth: the auth to add to the domain\n * @param {string} key: the name of the auth\n * @returns {{ variable: EnvironmentVariable, auth: Auth }} the newly created environment variable.\n */\nmethods.addAuthToDomain = (domain, environment, auth, key) => {\n  const variable = domain.createEnvironmentVariable(key)\n  const dv = methods.convertAuthIntoDynamicValue(auth)\n  const ds = methods.wrapDV(dv)\n  variable.setValue(ds, environment)\n\n  return { variable, auth }\n}\n\n/**\n * adds all auths from an Auth TypedStore to a domain.\n * @param {EnvironmentDomain} domain: the domain to add the auths to.\n * @param {Environment} environment: the environment in which these auths are applicable.\n * @param {Api} api: the api from which to get the Auth TypedStore.\n * @returns {TypedStore} a TypedStore of EnvironmentVariables representing auths.\n */\nmethods.addAuthsToDomain = (domain, environment, api) => {\n  const auths = api.getIn([ 'store', 'auth' ])\n  const addAuth = currify(methods.addAuthToDomain, domain, environment)\n\n  return auths.map(addAuth)\n}\n\n/**\n * adds all shared records (except for Variables) in a standard domain.\n * @param {EnvironmentDomain} domain: the domain in which to store the shared objects.\n * @param {Api} api: the api to get the shared objects from.\n * @returns {Store<*, TypedStore<*, EnvironmentVariable>>} a store containing the corresponding\n * environment variables for each shared object of the api.\n */\nmethods.addVariablesToStandardDomain = (domain, api) => {\n  const environment = domain.createEnvironment('Default')\n\n  const constraint = methods.addConstraintsToDomain(domain, environment, api)\n  const endpoint = methods.addEndpointsToDomain(domain, environment, api)\n  const parameter = methods.addParametersToDomain(domain, environment, api)\n  const auth = methods.addAuthsToDomain(domain, environment, api)\n\n  return new Store({ constraint, endpoint, parameter, auth })\n}\n\n/**\n * calculates the size of a potential domain dedicated to Variable records.\n * @param {Api} api: the api to get the shared variables from.\n * @returns {integer} the number of shared Variable records.\n */\nmethods.getVariableEnvironmentDomainSize = (api) => api.getIn([ 'store', 'variable' ]).size\n\n/**\n * tests whether this api needs an environment domain dedicated to Variable records.\n * @param {Api} api: the api to test.\n * @returns {boolean} whether this api requires an environment domain for Variables.\n */\nmethods.needsVariableEnvironmentDomain = (api) => {\n  const size = methods.getVariableEnvironmentDomainSize(api)\n\n  return size > 0\n}\n\n/**\n * updates an environment variable in a domain with a given value, for a given environment name.\n * @param {EnvironmentDomain} domain: the domain in which the variable is stored.\n * @param {EnvironmentVariable} variable: the variable to update\n * @param {string|DynamicString} value: the value to store in the variable\n * @param {string} envName: the name of the environment in which the value should be stored.\n * @returns {EnvironmentVariable} the updated variable.\n */\nmethods.updateEnvironmentVariableWithEnvironmentValue = (domain, variable, value, envName) => {\n  let environment = domain.getEnvironmentByName(envName)\n  if (!environment) {\n    environment = domain.createEnvironment(envName)\n  }\n  variable.setValue(value, environment)\n  return variable\n}\n\n/**\n * converts a Variable record into an environment variable.\n * @param {EnvironmentDomain} domain: the domain in which the variable is stored.\n * @param {Variable} variable: the variable record to convert.\n * @param {string} key: the name of the variable\n * @returns {EnvironmentVariable} the corresponding environment variable\n */\nmethods.convertVariableIntoEnvironmentVariable = (domain, variable, key) => {\n  const envVariable = domain.createEnvironmentVariable(key)\n  const updateVariable = currify(methods.updateEnvironmentVariableWithEnvironmentValue, domain)\n  return variable.get('values').reduce(updateVariable, envVariable)\n}\n\n/**\n * adds all shared Variables of an Api into a dedicated domain.\n * @param {EnvironmentDomain} domain: the domain in which to store the variables.\n * @param {Api} api: the api to get the variables from.\n * @returns {Store<*, TypedStore<*, EnvironmentVariable>>} the corresponding store which maps\n * references to environment variables.\n */\nmethods.addVariablesToVariableDomain = (domain, api) => {\n  const convertVariable = currify(methods.convertVariableIntoEnvironmentVariable, domain)\n  const vars = api.getIn([ 'store', 'variable' ]).map(convertVariable)\n\n  return new Store({\n    variable: vars\n  })\n}\n\n/**\n * creates and populates all the environment required by this Api.\n * @param {Context} context: the paw context to import the api in.\n * @param {Api} api: the api to get the shared objects from\n * @returns {Store<*, TypedStore<*, EnvironmentVariable>>} the corresponding store that maps\n * references to environment variables.\n */\nmethods.createEnvironments = (context, api) => {\n  let store = new Store()\n  if (methods.needsStandardEnvironmentDomain(api)) {\n    const domain = methods.createStandardEnvironmentDomain(context, api)\n    store = methods.addVariablesToStandardDomain(domain, api)\n  }\n\n  if (methods.needsVariableEnvironmentDomain(api)) {\n    const domain = methods.createVariableEnvironmentDomain(context, api)\n    const variableStore = methods.addVariablesToVariableDomain(domain, api)\n    store = store.set('variable', variableStore.get('variable'))\n  }\n\n  return store\n}\n\n/**\n * converts a sequence parameter into a DynamicString with variables for sub parameters.\n * @param {PawRequest} pawRequest: the paw request to which variables should be bound.\n * @param {Parameter} param: the sequence parameter to convert.\n * @returns {DynamicString} the corresponding dynamic string\n */\nmethods.convertSequenceParameterIntoVariableDS = (pawRequest, param) => {\n  const sequence = param.get('value')\n  const parameters = sequence.map((sub, index) => {\n    if (index % 2 === 0) {\n      return sub.generate(true)\n    }\n\n    return methods.convertParameterIntoVariableDS(pawRequest, sub)\n  }).toJS()\n\n  return new DynamicString(...parameters)\n}\n\n// TODO use store to resolve references inside sequence params\n/**\n * converts a Parameter into a variable.\n * @param {PawRequest} pawRequest: the paw request to which the variable should be bound.\n * @param {Parameter} param: the parameter to convert.\n * @returns {DynamicString} the corresponding dynamic string (that wraps a the variable dv)\n */\nmethods.convertParameterIntoVariableDS = (pawRequest, param) => {\n  if (param.get('superType') === 'sequence') {\n    return methods.convertSequenceParameterIntoVariableDS(pawRequest, param)\n  }\n\n  const schema = param.getJSONSchema(false)\n  const { name, value, description } = methods.getVariableArgumentsFromParameter(param)\n\n  const variable = pawRequest.addVariable(name, value, description)\n  variable.schema = JSON.stringify(schema)\n\n  const ds = variable.createDynamicString()\n  return ds\n}\n\n/**\n * converts a pathname urlComponent into a DynamicString.\n * @param {PawRequest} pawRequest: the paw request to which the possible variables should be bound.\n * @param {URLComponent} pathname: the URLComponent to convert. Note that although this process is\n * very similar to converting a Parameter, we do not create a variable named `pathname` with this\n * process, whereas we would with the other.\n * @returns {string|DynamicString} the corresponding DynamicString\n */\nmethods.convertPathnameIntoDynamicString = (pawRequest, pathname) => {\n  const param = pathname.get('parameter')\n  if (param.get('superType') === 'sequence') {\n    return methods.convertSequenceParameterIntoVariableDS(pawRequest, param)\n  }\n\n  return pathname.generate(List([ '{', '}' ]))\n}\n\n/**\n * converts an endpoint or a reference into a DynamicString.\n * @param {Store} store: the store to resolve reference with\n * @param {URL|Reference} endpoint: the URL or Reference to convert into a DynamicString\n * @returns {DynamicString} the corresponding dynamic string\n */\nmethods.convertEndpointOrReferenceIntoDS = (store, endpoint) => {\n  if (endpoint instanceof Reference) {\n    const variable = store.getIn([ 'endpoint', endpoint.get('uuid') ])\n    if (variable) {\n      return variable.createDynamicString()\n    }\n    return null\n  }\n\n  return methods.createEndpointDynamicString(endpoint)\n}\n\n/**\n * converts an array of DynamicStrings representing endpoints into a Variable (selects the 1st as\n * default value)\n * @param {PawRequest} pawRequest: the paw request to which the possible variables should be bound.\n * @param {Array<DynamicString>} endpoints: the array of endpoints that this request can use\n * @returns {DynamicValue<PawRequestVariable>} the corresponding DynamicValue\n */\nmethods.convertEndpointsDSArrayIntoVariableDV = (pawRequest, endpoints) => {\n  if (endpoints.length === 1) {\n    return endpoints[0]\n  }\n\n  const variable = pawRequest\n    .addVariable('endpoint', endpoints[0], 'the endpoint of this url')\n  variable.schema = JSON.stringify({ type: 'string', enum: endpoints })\n\n  const dv = variable.createDynamicValue()\n  return dv\n}\n\n// TODO deal with case where there's an overlay for the url\n/**\n * converts a map of endpoints and a path URL record into a DynamicString. This is used to create\n * the url in Paw.\n * @param {PawRequest} pawRequest: the paw request to which the possible variable should be bound.\n * @param {Store} store: the store of environment variables\n * @param {OrderedMap<*, URL>} endpoints: all the endpoints that this request can use.\n * @param {URL} path: the URL record representing the pathname of the request.\n * @returns {DynamicString} the corresponding dynamic string\n */\nmethods.convertEndpointsAndPathnameIntoDS = (pawRequest, store, endpoints, path) => {\n  const pathname = path.get('pathname')\n  const convertEndpointOrReference = currify(methods.convertEndpointOrReferenceIntoDS, store)\n\n  const converted = endpoints\n    .map(convertEndpointOrReference)\n    .filter(value => !!value)\n    .valueSeq()\n    .toJS()\n\n  const dv = methods.convertEndpointsDSArrayIntoVariableDV(pawRequest, converted)\n  const pathDs = methods.convertPathnameIntoDynamicString(pawRequest, pathname)\n\n  return new DynamicString(dv, pathDs)\n}\n\n/**\n * extracts the default value from a Parameter, as a string\n * @param {Parameter} parameter: the parameter to extract the default value from\n * @returns {string} the corresponding value\n */\nmethods.getDefaultValueFromParameter = (parameter) => {\n  const defaultValue = parameter.get('default')\n\n  if (typeof defaultValue === 'string') {\n    return defaultValue\n  }\n  else if (typeof defaultValue !== 'undefined' && defaultValue !== null) {\n    return JSON.stringify(defaultValue)\n  }\n\n  return ''\n}\n\n/**\n * extracts the name, value and description of a Parameter.\n * @param {Parameter} parameter: the parameter from which to extract the information\n * @returns {\n *   {\n *     name: string,\n *     value: string,\n *     description: string\n *   }\n * } the extracted informations\n */\nmethods.getVariableArgumentsFromParameter = (parameter) => {\n  const name = parameter.get('key') || ''\n  const value = methods.getDefaultValueFromParameter(parameter)\n  const schema = parameter.getJSONSchema()\n  const description = parameter.get('description') || schema.description || ''\n\n  return { name, value, description }\n}\n\n/**\n * converts Parameter from a Reference into a paw variable as a DynamicString\n * @param {PawRequest} pawRequest: the paw request to which the variable should be bound.\n * @param {Store} store: the store used to resolve the reference into an EnvironmentVariable\n * @param {Reference} reference: the reference to resolve to create the paw variable\n * @returns {Entry<string, string|DynamicString>} the corresponding DynamicString\n *\n * NOTE: We have to do this because Paw does not yet have document variables which would allow us\n * to simply reference them from the reference. What happens right now is that only the schema of\n * a shared parameter is saved in the environment variable instead of the full parameter.\n * Consequently, we have to resolve the reference to get the parameter (which is why the updated\n * TypedStore for parameters stores objects with both the environment variable and the parameter)\n * and create the variable at the request level, and then use the environment variable in the\n * schema of the variable.\n */\nmethods.convertParameterFromReference = (pawRequest, store, reference) => {\n  // TODO: use const { parameter, variable } = store.getIn(...) when ready\n  const { parameter } = store.getIn([ 'parameter', reference.get('uuid') ]) || {}\n  if (!parameter) {\n    return { key: '', value: '' }\n  }\n\n  const { name, value, description } = methods.getVariableArgumentsFromParameter(parameter)\n  const variableParam = pawRequest.addVariable(name, value, description)\n  // TODO replace this schema with variable.createDynamicString()\n  variableParam.schema = '{}'\n\n  return { key: name, value: variableParam.createDynamicString() }\n}\n\n/**\n * converts a Parameter or Reference to one into a DynamicString\n * @param {PawRequest} pawRequest: the paw request to which variables should be bound, should they\n * exist.\n * @param {Store} store: the store used to resolve the reference if parameterOrReference is a\n * Reference.\n * @param {Parameter|Reference} parameterOrReference: the record to convert into a DynamicString.\n * @returns {Entry<*, string|DynamicString>} the corresponding DynamicString, as an Entry\n */\nmethods.convertReferenceOrParameterToDsEntry = (pawRequest, store, parameterOrReference) => {\n  if (parameterOrReference instanceof Reference) {\n    return methods.convertParameterFromReference(pawRequest, store, parameterOrReference)\n  }\n\n  return {\n    key: parameterOrReference.get('key'),\n    value: methods.convertParameterIntoVariableDS(pawRequest, parameterOrReference)\n  }\n}\n\n/**\n * adds a DynamicString to the header of a request\n * @param {PawRequest} pawRequest: the paw request to which the header should be added.\n * @param {string} key: the name of the header\n * @param {string|DynamicString} value: the value of the header\n * @returns {PawRequest} the updated pawRequest\n */\nmethods.addHeaderToRequest = (pawRequest, { key, value }) => {\n  pawRequest.addHeader(key, value)\n  return pawRequest\n}\n\n/**\n * adds headers to a paw request.\n * @param {PawRequest} pawRequest: the paw request to which the headers should be added.\n * @param {Store} store: the store to use to resolve reference to Parameters.\n * @param {ParameterContainer} container: the container that holds all the headers\n * @returns {PawRequest} the update pawRequest\n */\nmethods.addHeadersToRequest = (pawRequest, store, container) => {\n  const convertHeaderParamOrRef = currify(\n    methods.convertReferenceOrParameterToDsEntry,\n    pawRequest, store\n  )\n  const headers = container.get('headers')\n  return headers\n    .map(convertHeaderParamOrRef)\n    .reduce(methods.addHeaderToRequest, pawRequest)\n}\n\n/**\n * adds a DynamicString to the url params of a request\n * @param {PawRequest} pawRequest: the paw request to which the url param should be added.\n * @param {string} key: the name of the url param\n * @param {string|DynamicString} value: the value of the url param\n * @returns {PawRequest} the updated pawRequest\n */\nmethods.addUrlParamToRequest = (pawRequest, { key, value }) => {\n  pawRequest.addUrlParameter(key, value)\n  return pawRequest\n}\n\n/**\n * adds url params to a paw request.\n * @param {PawRequest} pawRequest: the paw request to which the url params should be added.\n * @param {Store} store: the store to use to resolve reference to Parameters.\n * @param {ParameterContainer} container: the container that holds all the url params\n * @returns {PawRequest} the update pawRequest\n */\nmethods.addUrlParamsToRequest = (pawRequest, store, container) => {\n  const convertHeaderParamOrRef = currify(\n    methods.convertReferenceOrParameterToDsEntry,\n    pawRequest, store\n  )\n  const urlParams = container.get('queries')\n  return urlParams\n    .map(convertHeaderParamOrRef)\n    .reduce(methods.addUrlParamToRequest, pawRequest)\n}\n\n/**\n * tests whether a parameter can be used with a multipart/form-data context.\n * @param {Parameter} parameter: the parameter to test.\n * @returns {boolean} whether the parameter is usable in a multipart context\n */\nmethods.isParameterValidWithMultiPartContext = (parameter) => parameter.isValid(\n  new Parameter({\n    key: 'Content-Type',\n    default: 'multipart/form-data'\n  })\n)\n\n/**\n * tests whether a parameter can be used with a urlEncoded context.\n * @param {Parameter} parameter: the parameter to test.\n * @returns {boolean} whether the parameter is usable in a urlEncoded context\n */\nmethods.isParameterValidWithUrlEncodedContext = (parameter) => parameter.isValid(\n  new Parameter({\n    key: 'Content-Type',\n    default: 'application/x-www-form-urlencoded'\n  })\n)\n\n/**\n * tests whether a Parameter is a body or a formData parameter, by checking if it is restrained to\n * form-data or urlEncoded contexts.\n * @param {Parameter} parameter: the parameter to test\n * @return {boolean} true if it is a body param, false otherwise\n */\nmethods.isBodyParameter = (parameter) => {\n  if (parameter.get('in') !== 'body') {\n    return false\n  }\n\n  if (parameter.get('applicableContexts').size === 0) {\n    return true\n  }\n\n  const isFormData = methods.isParameterValidWithMultiPartContext(parameter)\n  const isUrlEncoded = methods.isParameterValidWithUrlEncodedContext(parameter)\n\n  return !isFormData && !isUrlEncoded\n}\n\n// TODO improve that with a JSF DV\n/**\n * sets the body of request as raw\n * @param {PawRequest} pawRequest: the paw request whose body should be set.\n * @param {Map<*, Parameter>} params: the body params that can be used in this context.\n * @returns {PawRequest} the updated paw request\n */\nmethods.setRawBody = (pawRequest, params) => {\n  const body = params.valueSeq().get(0)\n  pawRequest.body = new DynamicString(\n    new DynamicValue('com.luckymarmot.PawExtensions.JSONSchemaFakerDynamicValue', {\n      schema: JSON.stringify(body.getJSONSchema())\n    })\n  )\n\n  return pawRequest\n}\n\n/**\n * tests whether a context requires the content type to be url-encoded or not.\n * @param {Context} context: the context to test\n * @returns {boolean} returns true if it requires url-encoded Content-Type.\n */\nmethods.isContextWithUrlEncoded = (context) => {\n  return context\n    .get('constraints')\n    .filter((param) => param.get('default') === 'application/x-www-form-urlencoded').size > 0\n}\n\n/**\n * tests whether a context requires the content type to be multipart or not.\n * @param {Context} context: the context to test\n * @returns {boolean} returns true if it requires multipart Content-Type.\n */\nmethods.isContextWithMultiPart = (context) => {\n  return context\n    .get('constraints')\n    .filter((param) => param.get('default') === 'multipart/form-data').size > 0\n}\n\n/**\n * adds an Entry to a RecordParameter array.\n * @param {Array<RecordParameter>} kvList: the list of key-value RecordParameters to update.\n * @param {string} key: the name of the parameter\n * @param {string|DynamicString} value: the DynamicString corresponding to a parameter\n * @returns {Array<RecordParameter>} the updated array\n */\nmethods.addEntryToRecordParameterArray = (kvList, { key, value }) => {\n  kvList.push(new RecordParameter(key, value, true))\n  return kvList\n}\n\nmethods.getFormDataBody = (pawRequest, store, params, context) => {\n  const convertBodyParamOrRef = currify(\n    methods.convertReferenceOrParameterToDsEntry,\n    pawRequest, store\n  )\n\n  const isUrlEncoded = methods.isContextWithUrlEncoded(context)\n  const isFormData = methods.isContextWithMultiPart(context)\n\n  const keyValues = params\n    .map(convertBodyParamOrRef)\n    .reduce(methods.addEntryToRecordParameterArray, [])\n\n  if (isFormData) {\n    return methods.createMultipartBodyDV(keyValues)\n  }\n\n  if (isUrlEncoded) {\n    return methods.createUrlEncodedBodyDV(keyValues)\n  }\n\n  return ''\n}\n\n/**\n * sets the body of a request to a urlEncoded or multipart body\n * @param {PawRequest} pawRequest: the paw request to update\n * @param {Store} store: the store used to resolve potential references in the params\n * @param {Parameter|Reference} params: the parameters to add to the body\n * @param {Context} context: the context in which the body params are set\n * @returns {PawRequest} the update paw request\n */\nmethods.setFormDataBody = (pawRequest, store, params, context) => {\n  const body = methods.getFormDataBody(pawRequest, store, params, context)\n\n  pawRequest.body = methods.wrapDV(body)\n  return pawRequest\n}\n\n/**\n * adds body parameters to a paw request\n * @param {PawRequest} pawRequest: the paw request to update with a body\n * @param {Store} store: the store to use to resolve potential reference to parameters\n * @param {ParameterContainer} container: the parameter container that holds all the body parameters\n * @param {Context} context: the Context record that is being applied to the container\n * @returns {PawRequest} the updated paw request\n */\nmethods.addBodyToRequest = (pawRequest, store, container, context) => {\n  const bodyParams = container.get('body')\n\n  const rawBodyParams = bodyParams.filter(methods.isBodyParameter)\n  if (rawBodyParams.size > 0) {\n    return methods.setRawBody(pawRequest, rawBodyParams)\n  }\n\n  const formDataParams = bodyParams\n    .filter((param) => !methods.isBodyParameter(param))\n    .valueSeq()\n\n  if (formDataParams.size > 0 && context) {\n    return methods.setFormDataBody(pawRequest, store, formDataParams, context)\n  }\n\n  return pawRequest\n}\n\n/**\n * extracts a container from a Request record, as well as the corresponding context if it exists\n * @param {Request} request: the request to extract the container from\n * @returns {\n *   {\n *     container: ParameterContainer,\n *     requestContext: Context?\n *   }\n * } the corresponding object that holds both the container and its context\n */\nmethods.getContainerFromRequest = (request) => {\n  const context = request.getIn([ 'contexts', 0 ])\n  const container = request.get('parameters')\n  if (context) {\n    return { container: context.filter(container), requestContext: context }\n  }\n\n  return { container }\n}\n\n/**\n * converts an auth into a DynamicString from a reference.\n * @param {Store} store: the store to use to resolve the reference\n * @param {Reference} reference: the reference to an EnvironmentVariable representing an Auth.\n * @returns {{ variable: DynamicString, auth: Auth }} the corresponding DynamicString\n */\nmethods.convertAuthFromReference = (store, reference) => {\n  const { variable, auth } = store.getIn([ 'auth', reference.get('uuid') ])\n  const ds = variable.createDynamicString()\n  return { variable: ds, auth: auth }\n}\n\n/**\n * converts a reference or an auth into a DynamicString Entry.\n * @param {Store} store: the store used to resolve references\n * @param {Auth|Reference} authOrReference: the record to convert into a DynamicString\n * @returns {{ variable: DynamicString, auth: Auth }} the corresponding DynamicString\n */\nmethods.convertReferenceOrAuthToDsEntry = (store, authOrReference) => {\n  if (authOrReference instanceof Reference) {\n    return methods.convertAuthFromReference(store, authOrReference)\n  }\n\n  const dv = methods.convertAuthIntoDynamicValue(authOrReference)\n  return { variable: methods.wrapDV(dv), auth: authOrReference }\n}\n\n// TODO create Variable DS that has enum with all auth possible\n/**\n * sets the Auth DynamicString as am Authorization Header.\n * @param {PawRequest} pawRequest: the paw request to update\n * @param {Objecti} authData: the object containing the auth representation as a DynamicString and\n * the original auth Record.\n * @param {DynamicString} variable: the DynamicString representing an auth\n * @param {Auth} auth: the original auth\n * @returns {PawRequest} the update paw request\n */\nmethods.addAuthToRequest = (pawRequest, { variable, auth }) => {\n  let authName = 'Authorization'\n  if (auth instanceof Auth.ApiKey) {\n    authName = auth.get('name')\n  }\n  pawRequest.setHeader(authName, variable)\n  return pawRequest\n}\n\n/**\n * converts the auths of a request into DynamicStrings and adds them to a paw request.\n * @param {PawRequest} pawRequest: the paw request to update with all the auths\n * @param {Store} store: the store to use to resolve references\n * @param {Request} request: the request to get the auths from\n * @returns {PawRequest} the updated paw request\n */\nmethods.addAuthsToRequest = (pawRequest, store, request) => {\n  const convertAuthParamOrRef = currify(methods.convertReferenceOrAuthToDsEntry, store)\n  const auths = request.get('auths')\n  return auths\n    .map(convertAuthParamOrRef)\n    .reduce(methods.addAuthToRequest, pawRequest)\n}\n\n/* eslint-disable max-statements */\n/**\n * converts a request into a paw request\n * @param {PawContext} context: the paw context in which to create the paw request.\n * @param {Store} store: the store used to resolve references\n * @param {URL} path: the URL record representing the path of the method\n * @param {Request} request: the request to convert\n * @returns {PawRequest} the newly created request\n */\nmethods.convertRequestIntoPawRequest = (context, store, path, request) => {\n  const pathname = path.toURLObject(List([ '{', '}' ])).pathname\n  const name = request.get('name') || pathname\n  const method = (request.get('method') || 'get').toUpperCase()\n  const endpoints = request.get('endpoints')\n  const description = request.get('description') || ''\n\n  const pawRequest = context.createRequest(name, method, new DynamicString(), description)\n\n  const url = methods.convertEndpointsAndPathnameIntoDS(pawRequest, store, endpoints, path)\n  const { container, requestContext } = methods.getContainerFromRequest(request)\n  methods.addHeadersToRequest(pawRequest, store, container)\n  methods.addUrlParamsToRequest(pawRequest, store, container)\n  methods.addBodyToRequest(pawRequest, store, container, requestContext)\n  methods.addAuthsToRequest(pawRequest, store, request)\n\n\n  pawRequest.url = url\n  return pawRequest\n}\n/* eslint-enable max-statements */\n\n// NOTE: not sure this is the best idea\n/**\n * Converts a Resource into a RequestGroup of PawRequests\n * @param {PawContext} context: the context in which to create the resource group\n * @param {Store} store: the store used to resolve the references\n * @param {Resource} resource: the resource to convert\n * @returns {PawRequestGroup} the newly created request group\n */\nmethods.convertResourceIntoGroup = (context, store, resource) => {\n  const path = resource.get('path')\n  const pathname = path.toURLObject(List([ '{', '}' ])).pathname\n  const group = context.createRequestGroup(resource.get('name') || pathname)\n\n  const convertRequest = currify(\n    methods.convertRequestIntoPawRequest,\n    context, store, path\n  )\n\n  return resource.get('methods')\n    .map(convertRequest)\n    .reduce(($group, pawRequest) => {\n      $group.appendChild(pawRequest)\n      return $group\n    }, group)\n}\n\n/**\n * converts all Resources in an Api into request groups that hold paw requests\n * @param {PawContext} context: the context in which to extract all the resources as request groups\n * @param {Store} store: the store to use to resolve references\n * @param {Api} api: the api to extract all the resources from\n * @returns {OrderedMap<*, PawRequestGroup>} the corresponding map of paw request groups\n */\nmethods.createRequests = (context, store, api) => {\n  const convertResource = currify(methods.convertResourceIntoGroup, context, store)\n  const resources = api.get('resources').map(convertResource)\n\n  return resources\n}\n\n/**\n * converts a group into a PawRequestGroup\n * @param {PawContext} context: the paw context in which this group should be constructed\n * @param {OrderedMap<*, PawRequestGroup>} resources: the map of requests groups to insert\n * @param {Group} group: the group to convert into a PawRequestGroup\n * @param {string?} groupName: the name that should be used for the group. if no name is provided,\n * it will default to the name of the Group Record.\n * @returns {PawRequestGroup?} the corresponding paw request group, if it makes sense to create it.\n */\nmethods.createPawGroupFromGroup = (context, resources, group, groupName) => {\n  const name = groupName || group.get('name')\n  const children = group.get('children')\n    .map((groupOrRef) => methods.createGroups(context, resources, groupOrRef))\n    .filter(value => !!value)\n\n  if (children.size > 1) {\n    const pawGroup = context.createRequestGroup(name)\n    children.forEach(child => pawGroup.appendChild(child))\n    return pawGroup\n  }\n\n  if (children.size === 1) {\n    return children.valueSeq().get(0)\n  }\n\n  return null\n}\n\n/**\n * creates a layout of nested request groups based on the structure inside Group Records.\n * @param {PawContext} context: the paw context in which this layout should be constructed\n * @param {OrderedMap<*, PawRequestGroup>} resources: the map of requests groups to insert\n * @param {Group|PawRequestGroup} group: the group to process to set the layout up.\n * @param {string?} groupName: the name that should be used for the group. if no name is provided,\n * it will default to the name of the Group Record.\n * @returns {PawRequestGroup?} the corresponding layout of nested paw request groups\n */\nmethods.createGroups = (context, resources, group, groupName) => {\n  if (!group || !(group instanceof Group)) {\n    return null\n  }\n\n  return methods.createPawGroupFromGroup(context, resources, group, groupName)\n}\n\n/**\n * imports an Api into a PawContext\n * @param {PawContext} context: the paw context in which the api should be imported\n * @param {Api} api: the api to convert\n * @param {Array<Items>} items: the list of items that was passed to the serializer\n * @param {PawOptions} options: contains a few options that can improve the user experience when\n * importing in paw.\n * @returns {boolean} whether the import was successful or not\n */\nmethods.serialize = ({ options: { context } = {}, api = new Api() } = {}) => {\n  const store = methods.createEnvironments(context, api)\n  const resources = methods.createRequests(context, store, api)\n  methods.createGroups(context, resources, api.get('group'), methods.getTitleFromApi(api))\n  return true\n}\n\nexport const __internals__ = methods\nexport default PawSerializer\n"
  },
  {
    "path": "src/serializers/paw/__tests__/Serializer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List } from 'immutable'\n\nimport { DynamicString, DynamicValue, RecordParameter } from '../../../mocks/PawMocks'\n\nimport Api from '../../../models/Api'\nimport Info from '../../../models/Info'\nimport Store from '../../../models/Store'\nimport Constraint from '../../../models/Constraint'\nimport URLComponent from '../../../models/URLComponent'\nimport URL from '../../../models/URL'\nimport Parameter from '../../../models/Parameter'\nimport Auth from '../../../models/Auth'\nimport Variable from '../../../models/Variable'\nimport Reference from '../../../models/Reference'\nimport ParameterContainer from '../../../models/ParameterContainer'\nimport Context from '../../../models/Context'\nimport Request from '../../../models/Request'\nimport Resource from '../../../models/Resource'\nimport Group from '../../../models/Group'\n\nimport Serializer, { __internals__ } from '../Serializer'\n\ndescribe('serializers/paw/Serializer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Serializer }', () => {\n    describe('@serialize', () => {\n      it('should call __internals__.serialize', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const actual = Serializer.serialize()\n\n        expect(__internals__.serialize).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.serialize with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const args = { options: { context: 123, items: 321 }, api: 234 }\n        const actual = Serializer.serialize(args)\n\n        expect(__internals__.serialize).toHaveBeenCalledWith(args)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@wrapDV', () => {\n    it('should return a DynamicString', () => {\n      const dv = new DynamicValue('some.dv.name', {})\n      const actual = __internals__.wrapDV(dv)\n\n      expect(actual).toBeA(DynamicString)\n    })\n\n    it('should work', () => {\n      const dv = new DynamicValue('some.dv.name', {})\n      const expected = new DynamicString(dv)\n      const actual = __internals__.wrapDV(dv)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createJSONDV', () => {\n    it('should return a DynamicValue', () => {\n      const json = { some: 'json' }\n      const actual = __internals__.createJSONDV(json)\n\n      expect(actual).toBeA(DynamicValue)\n    })\n\n    it('should work', () => {\n      const json = { some: 'json' }\n      const expected = new DynamicValue('com.luckymarmot.JSONDynamicValue', {\n        json: '{\"some\":\"json\"}'\n      })\n      const actual = __internals__.createJSONDV(json)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createUrlEncodedBodyDV', () => {\n    it('should return a DynamicValue', () => {\n      const keyValues = [ new RecordParameter(123, 321, true) ]\n      const actual = __internals__.createUrlEncodedBodyDV(keyValues)\n\n      expect(actual).toBeA(DynamicValue)\n    })\n\n    it('should work', () => {\n      const keyValues = [ new RecordParameter(123, 321, true) ]\n      const expected = new DynamicValue(\n        'com.luckymarmot.BodyFormKeyValueDynamicValue', {\n          keyValues: keyValues\n        }\n      )\n      const actual = __internals__.createUrlEncodedBodyDV(keyValues)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createMultipartBodyDV', () => {\n    it('should return a DynamicValue', () => {\n      const keyValues = [ new RecordParameter(123, 321, true) ]\n      const actual = __internals__.createMultipartBodyDV(keyValues)\n\n      expect(actual).toBeA(DynamicValue)\n    })\n\n    it('should work', () => {\n      const keyValues = [ new RecordParameter(123, 321, true) ]\n      const expected = new DynamicValue(\n        'com.luckymarmot.BodyMultipartFormDataDynamicValue', {\n          keyValues: keyValues\n        }\n      )\n      const actual = __internals__.createMultipartBodyDV(keyValues)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createMultiSelectorDv', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        new DynamicValue('me.elliotchance.MultiSelectorDynamicValue', {\n          choices: [ 123, 234, 345 ],\n          separator: ','\n        })\n      ]\n      const actual = inputs.map(input => __internals__.createMultiSelectorDv(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getTitleFromApi', () => {\n    it('should work', () => {\n      const api = new Api({\n        info: new Info({\n          title: 'this should work'\n        })\n      })\n\n      const expected = 'this should work'\n      const actual = __internals__.getTitleFromApi(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no title', () => {\n      const api = new Api({\n        info: new Info({\n          title: null\n        })\n      })\n\n      const expected = 'Imports'\n      const actual = __internals__.getTitleFromApi(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createStandardEnvironmentDomain', () => {\n    it('should call getTitleFromApi', () => {\n      spyOn(__internals__, 'getTitleFromApi').andReturn('hello')\n\n      const context = {\n        createEnvironmentDomain: () => {}\n      }\n\n      spyOn(context, 'createEnvironmentDomain').andReturn('done')\n\n      const api = new Api()\n      __internals__.createStandardEnvironmentDomain(context, api)\n\n      expect(__internals__.getTitleFromApi).toHaveBeenCalledWith(api)\n    })\n\n    it('should call context.createEnvironmentDomain', () => {\n      spyOn(__internals__, 'getTitleFromApi').andReturn('hello')\n\n      const context = {\n        createEnvironmentDomain: () => {}\n      }\n\n      spyOn(context, 'createEnvironmentDomain').andReturn('done')\n\n      const api = new Api()\n\n      __internals__.createStandardEnvironmentDomain(context, api)\n\n      expect(context.createEnvironmentDomain).toHaveBeenCalledWith('hello')\n    })\n  })\n\n  describe('@getStandardEnvironmentDomainSize', () => {\n    it('should return 0 if no record in store', () => {\n      const api = new Api({\n        store: new Store()\n      })\n\n      const expected = 0\n      const actual = __internals__.getStandardEnvironmentDomainSize(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return 0 if only variable in store', () => {\n      const api = new Api({\n        store: new Store({\n          variable: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = 0\n      const actual = __internals__.getStandardEnvironmentDomainSize(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work otherwise', () => {\n      const api = new Api({\n        store: new Store({\n          endpoint: new OrderedMap({ abc: 123, cba: 321 }),\n          auth: new OrderedMap({ qwe: 234, ewq: 432 }),\n          variable: new OrderedMap({ asd: 345, dsa: 543 })\n        })\n      })\n\n      const expected = 4\n      const actual = __internals__.getStandardEnvironmentDomainSize(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@needsStandardEnvironmentDomain', () => {\n    it('should return false if domain size is 0', () => {\n      spyOn(__internals__, 'getStandardEnvironmentDomainSize').andReturn(0)\n      const api = new Api()\n\n      const expected = false\n      const actual = __internals__.needsStandardEnvironmentDomain(api)\n\n      expect(__internals__.getStandardEnvironmentDomainSize).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if domain size is 1 or more', () => {\n      spyOn(__internals__, 'getStandardEnvironmentDomainSize').andReturn(10)\n      const api = new Api()\n\n      const expected = true\n      const actual = __internals__.needsStandardEnvironmentDomain(api)\n\n      expect(__internals__.getStandardEnvironmentDomainSize).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createVariableEnvironmentDomain', () => {\n    it('should call getTitleFromApi', () => {\n      spyOn(__internals__, 'getTitleFromApi').andReturn('hello')\n\n      const context = {\n        createEnvironmentDomain: () => {}\n      }\n\n      spyOn(context, 'createEnvironmentDomain').andReturn('done')\n\n      const api = new Api()\n      __internals__.createVariableEnvironmentDomain(context, api)\n\n      expect(__internals__.getTitleFromApi).toHaveBeenCalledWith(api)\n    })\n\n    it('should call context.createEnvironmentDomain', () => {\n      spyOn(__internals__, 'getTitleFromApi').andReturn('hello')\n\n      const context = {\n        createEnvironmentDomain: () => {}\n      }\n\n      spyOn(context, 'createEnvironmentDomain').andReturn('done')\n\n      const api = new Api()\n\n      __internals__.createVariableEnvironmentDomain(context, api)\n\n      expect(context.createEnvironmentDomain).toHaveBeenCalledWith('Vars - hello')\n    })\n  })\n\n  describe('@addConstraintToDomain', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const domain = { createEnvironmentVariable: () => {} }\n      const environment = {}\n      const constraint = new Constraint.JSONSchema({ type: 'string' })\n      const key = 'User'\n\n      const variable = { setValue: () => {} }\n      spyOn(domain, 'createEnvironmentVariable').andReturn(variable)\n      spyOn(variable, 'setValue').andReturn(null)\n\n      spyOn(__internals__, 'createJSONDV').andCallThrough()\n      spyOn(__internals__, 'wrapDV').andReturn('123')\n\n      const expected = variable\n      const actual = __internals__.addConstraintToDomain(domain, environment, constraint, key)\n\n      expect(domain.createEnvironmentVariable).toHaveBeenCalledWith(key)\n      expect(__internals__.createJSONDV).toHaveBeenCalledWith({ type: 'string' })\n      expect(__internals__.wrapDV).toHaveBeenCalled()\n      expect(variable.setValue).toHaveBeenCalledWith('123', environment)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addConstraintsToDomain', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'addConstraintToDomain').andReturn('test')\n\n      const domain = {}\n      const environment = {}\n      const api = new Api({\n        store: new Store({\n          constraint: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = new OrderedMap({ abc: 'test', bca: 'test' })\n      const actual = __internals__.addConstraintsToDomain(domain, environment, api)\n\n      expect(__internals__.addConstraintToDomain.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@removeDotsFromProtocol', () => {\n    it('should work', () => {\n      const input = [ 'http', 'https:' ]\n\n      const expected = [ 'http', 'https' ]\n      const actual = input.map(__internals__.removeDotsFromProtocol)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertProtocolIntoRecordParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'http', 0 ],\n        [ 'https:', 1 ]\n      ]\n      const expected = [\n        new RecordParameter('http', ', ', true),\n        new RecordParameter('https', ', ', false)\n      ]\n\n      const actual = inputs.map(input => __internals__.convertProtocolIntoRecordParameter(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createProtocolDV', () => {\n    it('should work if no protocol', () => {\n      const protocol = null\n      const expected = 'http'\n      const actual = __internals__.createProtocolDV(protocol)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if single protocol', () => {\n      const protocol = List([ 'https:' ])\n      const expected = 'https'\n      const actual = __internals__.createProtocolDV(protocol)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if multiple protocol', () => {\n      spyOn(__internals__, 'convertProtocolIntoRecordParameter').andReturn(123)\n      spyOn(__internals__, 'createMultiSelectorDv').andReturn(321)\n\n      const protocol = List([ 'https:', 'http' ])\n      const expected = 321\n      const actual = __internals__.createProtocolDV(protocol)\n\n      expect(__internals__.convertProtocolIntoRecordParameter.calls.length).toEqual(2)\n      expect(__internals__.createMultiSelectorDv).toHaveBeenCalledWith([ 123, 123 ])\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertURLComponentToDynamicString', () => {\n    it('should work', () => {\n      const urlComponent = new URLComponent({\n        componentName: 'pathname',\n        string: '/some/path',\n        variableDelimiters: List([ '{', '}' ])\n      })\n\n      const expected = '/some/path'\n      const actual = __internals__.convertURLComponentToDynamicString(urlComponent)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createEndpointDynamicString', () => {\n    it('should work', () => {\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud/{version}/users',\n        variableDelimiters: List([ '{', '}' ])\n      })\n\n      const expected = new DynamicString(\n        'https',\n        '://',\n        'echo.paw.cloud',\n        '', '',\n        '/{version}/users'\n      )\n      const actual = __internals__.createEndpointDynamicString(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with port and dirty path', () => {\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud:8080/{version}/users/',\n        variableDelimiters: List([ '{', '}' ])\n      })\n\n      const expected = new DynamicString(\n        'https',\n        '://',\n        'echo.paw.cloud',\n        ':', '8080',\n        '/{version}/users'\n      )\n      const actual = __internals__.createEndpointDynamicString(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addEndpointToDomain', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const domain = { createEnvironmentVariable: () => {} }\n      const environment = {}\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud'\n      })\n      const key = 'server1'\n\n      const variable = { setValue: () => {} }\n      spyOn(domain, 'createEnvironmentVariable').andReturn(variable)\n      spyOn(variable, 'setValue').andReturn(null)\n\n      spyOn(__internals__, 'createEndpointDynamicString').andReturn('123')\n\n      const expected = variable\n      const actual = __internals__.addEndpointToDomain(domain, environment, endpoint, key)\n\n      expect(domain.createEnvironmentVariable).toHaveBeenCalledWith(key)\n      expect(__internals__.createEndpointDynamicString).toHaveBeenCalledWith(endpoint)\n      expect(variable.setValue).toHaveBeenCalledWith('123', environment)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addEndpointsToDomain', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'addEndpointToDomain').andReturn('test')\n\n      const domain = {}\n      const environment = {}\n      const api = new Api({\n        store: new Store({\n          endpoint: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = new OrderedMap({ abc: 'test', bca: 'test' })\n      const actual = __internals__.addEndpointsToDomain(domain, environment, api)\n\n      expect(__internals__.addEndpointToDomain.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addParameterToDomain', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const domain = { createEnvironmentVariable: () => {} }\n      const environment = {}\n      const parameter = new Parameter({ type: 'string' })\n      const key = 'User'\n\n      const variable = { setValue: () => {} }\n      spyOn(domain, 'createEnvironmentVariable').andReturn(variable)\n      spyOn(variable, 'setValue').andReturn(null)\n\n      spyOn(__internals__, 'createJSONDV').andCallThrough()\n      spyOn(__internals__, 'wrapDV').andReturn('123')\n\n      const expected = { variable, parameter }\n      const actual = __internals__.addParameterToDomain(domain, environment, parameter, key)\n\n      expect(domain.createEnvironmentVariable).toHaveBeenCalledWith(key)\n      expect(__internals__.createJSONDV).toHaveBeenCalledWith({ type: 'string' })\n      expect(__internals__.wrapDV).toHaveBeenCalled()\n      expect(variable.setValue).toHaveBeenCalledWith('123', environment)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addParametersToDomain', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'addParameterToDomain').andReturn('test')\n\n      const domain = {}\n      const environment = {}\n      const api = new Api({\n        store: new Store({\n          parameter: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = new OrderedMap({ abc: 'test', bca: 'test' })\n      const actual = __internals__.addParametersToDomain(domain, environment, api)\n\n      expect(__internals__.addParameterToDomain.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBasicAuthIntoDynamicValue', () => {\n    it('should work', () => {\n      const auth = new Auth.Basic({\n        username: 'user',\n        password: 'pass'\n      })\n\n      const expected = new DynamicValue('com.luckymarmot.BasicAuthDynamicValue', {\n        username: 'user',\n        password: 'pass'\n      })\n\n      const actual = __internals__.convertBasicAuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const auth = new Auth.Basic()\n\n      const expected = new DynamicValue('com.luckymarmot.BasicAuthDynamicValue', {\n        username: '',\n        password: ''\n      })\n\n      const actual = __internals__.convertBasicAuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertDigestAuthIntoDynamicValue', () => {\n    it('should work', () => {\n      const auth = new Auth.Digest({\n        username: 'user',\n        password: 'pass'\n      })\n\n      const expected = new DynamicValue('com.luckymarmot.PawExtensions.DigestAuthDynamicValue', {\n        username: 'user',\n        password: 'pass'\n      })\n\n      const actual = __internals__.convertDigestAuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const auth = new Auth.Digest()\n\n      const expected = new DynamicValue('com.luckymarmot.PawExtensions.DigestAuthDynamicValue', {\n        username: '',\n        password: ''\n      })\n\n      const actual = __internals__.convertDigestAuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertOAuth1AuthIntoDynamicValue', () => {\n    it('should work', () => {\n      const auth = new Auth.OAuth1({\n        callback: 'https://echo.paw.cloud/callback',\n        consumerSecret: 'consumerSecret',\n        tokenSecret: 'tokenSecret',\n        consumerKey: 'consumerKey',\n        algorithm: 'md5',\n        nonce: '12345',\n        additionalParameters: 'none',\n        timestamp: 'some date',\n        token: 'some token'\n      })\n\n      const expected = new DynamicValue('com.luckymarmot.OAuth1HeaderDynamicValue', {\n        callback: 'https://echo.paw.cloud/callback',\n        consumerSecret: 'consumerSecret',\n        tokenSecret: 'tokenSecret',\n        consumerKey: 'consumerKey',\n        algorithm: 'md5',\n        nonce: '12345',\n        additionalParameters: 'none',\n        timestamp: 'some date',\n        token: 'some token'\n      })\n\n      const actual = __internals__.convertOAuth1AuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with default', () => {\n      const auth = new Auth.OAuth1()\n\n      const expected = new DynamicValue('com.luckymarmot.OAuth1HeaderDynamicValue', {\n        callback: '',\n        consumerSecret: '',\n        tokenSecret: '',\n        consumerKey: '',\n        algorithm: '',\n        nonce: '',\n        additionalParameters: '',\n        timestamp: '',\n        token: ''\n      })\n\n      const actual = __internals__.convertOAuth1AuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertOAuth2AuthIntoDynamicValue', () => {\n    it('should work', () => {\n      const auth = new Auth.OAuth2({\n        authorizationUrl: 'https://echo.paw.cloud/auth-portal',\n        tokenUrl: 'https://echo.paw.cloud/token-portal',\n        flow: 'implicit',\n        scopes: List([ { key: 'write:self' } ])\n      })\n\n      const expected = new DynamicValue('com.luckymarmot.OAuth2DynamicValue', {\n        authorizationURL: 'https://echo.paw.cloud/auth-portal',\n        accessTokenURL: 'https://echo.paw.cloud/token-portal',\n        grantType: 1,\n        scopes: 'write:self'\n      })\n\n      const actual = __internals__.convertOAuth2AuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with defaults', () => {\n      const auth = new Auth.OAuth2()\n\n      const expected = new DynamicValue('com.luckymarmot.OAuth2DynamicValue', {\n        authorizationURL: '',\n        accessTokenURL: '',\n        grantType: 0,\n        scopes: ''\n      })\n\n      const actual = __internals__.convertOAuth2AuthIntoDynamicValue(auth)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertAuthIntoDynamicValue', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertBasicAuthIntoDynamicValue').andReturn(123)\n      spyOn(__internals__, 'convertDigestAuthIntoDynamicValue').andReturn(321)\n      spyOn(__internals__, 'convertOAuth1AuthIntoDynamicValue').andReturn(234)\n      spyOn(__internals__, 'convertOAuth2AuthIntoDynamicValue').andReturn(432)\n\n      const input = [\n        new Auth.Basic(),\n        new Auth.Digest(),\n        new Auth.OAuth1(),\n        new Auth.OAuth2(),\n        new Auth.Negotiate()\n      ]\n\n      const expected = [ 123, 321, 234, 432, '' ]\n      const actual = input.map(__internals__.convertAuthIntoDynamicValue)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addAuthToDomain', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const domain = { createEnvironmentVariable: () => {} }\n      const environment = {}\n      const auth = new Auth.Basic()\n      const key = 'basic_auth'\n\n      const variable = { setValue: () => {} }\n      spyOn(domain, 'createEnvironmentVariable').andReturn(variable)\n      spyOn(variable, 'setValue').andReturn(null)\n\n      spyOn(__internals__, 'convertAuthIntoDynamicValue').andReturn(123)\n      spyOn(__internals__, 'wrapDV').andReturn('123')\n\n      const expected = { variable, auth }\n      const actual = __internals__.addAuthToDomain(domain, environment, auth, key)\n\n      expect(domain.createEnvironmentVariable).toHaveBeenCalledWith(key)\n      expect(__internals__.convertAuthIntoDynamicValue).toHaveBeenCalledWith(auth)\n      expect(variable.setValue).toHaveBeenCalledWith('123', environment)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addAuthsToDomain', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'addAuthToDomain').andReturn('test')\n\n      const domain = {}\n      const environment = {}\n      const api = new Api({\n        store: new Store({\n          auth: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = new OrderedMap({ abc: 'test', bca: 'test' })\n      const actual = __internals__.addAuthsToDomain(domain, environment, api)\n\n      expect(__internals__.addAuthToDomain.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addVariablesToStandardDomain', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      const domain = { createEnvironment: () => {} }\n      spyOn(domain, 'createEnvironment').andReturn('env')\n\n      spyOn(__internals__, 'addConstraintsToDomain').andReturn(123)\n      spyOn(__internals__, 'addEndpointsToDomain').andReturn(321)\n      spyOn(__internals__, 'addParametersToDomain').andReturn(234)\n      spyOn(__internals__, 'addAuthsToDomain').andReturn(432)\n\n      const api = new Api()\n\n      const expected = new Store({\n        constraint: 123,\n        endpoint: 321,\n        parameter: 234,\n        auth: 432\n      })\n\n      const actual = __internals__.addVariablesToStandardDomain(domain, api)\n\n      expect(domain.createEnvironment).toHaveBeenCalled()\n      expect(__internals__.addConstraintsToDomain).toHaveBeenCalled()\n      expect(__internals__.addEndpointsToDomain).toHaveBeenCalled()\n      expect(__internals__.addParametersToDomain).toHaveBeenCalled()\n      expect(__internals__.addAuthsToDomain).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@getVariableEnvironmentDomainSize', () => {\n    it('should return 0 if variable TypedStore is empty', () => {\n      const api = new Api({\n        store: new Store()\n      })\n\n      const expected = 0\n      const actual = __internals__.getVariableEnvironmentDomainSize(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return the correct number otherwise', () => {\n      const api = new Api({\n        store: new Store({\n          variable: new OrderedMap({\n            abc: 123,\n            bca: 231\n          })\n        })\n      })\n\n      const expected = 2\n      const actual = __internals__.getVariableEnvironmentDomainSize(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@needsVariableEnvironmentDomain', () => {\n    it('should return false if size is 0', () => {\n      spyOn(__internals__, 'getVariableEnvironmentDomainSize').andReturn(0)\n\n      const api = new Api()\n      const expected = false\n      const actual = __internals__.needsVariableEnvironmentDomain(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if size is >= 1', () => {\n      spyOn(__internals__, 'getVariableEnvironmentDomainSize').andReturn(10)\n\n      const api = new Api()\n      const expected = true\n      const actual = __internals__.needsVariableEnvironmentDomain(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@updateEnvironmentVariableWithEnvironmentValue', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const domain = {\n        getEnvironmentByName: () => {},\n        createEnvironment: () => {}\n      }\n\n      const variable = {\n        setValue: () => {}\n      }\n\n      const value = '123'\n      const envName = '321'\n\n      spyOn(domain, 'getEnvironmentByName').andReturn(null)\n      spyOn(domain, 'createEnvironment').andReturn(432)\n      spyOn(variable, 'setValue').andReturn(345)\n\n      const expected = variable\n      const actual = __internals__.updateEnvironmentVariableWithEnvironmentValue(\n        domain, variable, value, envName\n      )\n\n      expect(domain.getEnvironmentByName).toHaveBeenCalled()\n      expect(domain.createEnvironment).toHaveBeenCalled()\n      expect(variable.setValue).toHaveBeenCalledWith(value, 432)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if env already exists', () => {\n      const domain = {\n        getEnvironmentByName: () => {},\n        createEnvironment: () => {}\n      }\n\n      const variable = {\n        setValue: () => {}\n      }\n\n      const value = '123'\n      const envName = '321'\n\n      spyOn(domain, 'getEnvironmentByName').andReturn(432)\n      spyOn(domain, 'createEnvironment').andReturn(null)\n      spyOn(variable, 'setValue').andReturn(345)\n\n      const expected = variable\n      const actual = __internals__.updateEnvironmentVariableWithEnvironmentValue(\n        domain, variable, value, envName\n      )\n\n      expect(domain.getEnvironmentByName).toHaveBeenCalled()\n      expect(domain.createEnvironment).toNotHaveBeenCalled()\n      expect(variable.setValue).toHaveBeenCalledWith(value, 432)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@convertVariableIntoEnvironmentVariable', () => {\n    it('should work', () => {\n      const domain = {\n        createEnvironmentVariable: () => {}\n      }\n\n      const variable = new Variable({\n        values: OrderedMap({\n          a: 321,\n          b: 123\n        })\n      })\n\n      const key = 'pet_name'\n\n      spyOn(domain, 'createEnvironmentVariable').andReturn(234)\n      spyOn(__internals__, 'updateEnvironmentVariableWithEnvironmentValue').andReturn(432)\n\n      const expected = 432\n      const actual = __internals__.convertVariableIntoEnvironmentVariable(domain, variable, key)\n\n      expect(__internals__.updateEnvironmentVariableWithEnvironmentValue.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addVariablesToVariableDomain', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertVariableIntoEnvironmentVariable').andReturn('test')\n      const domain = {}\n\n      const api = new Api({\n        store: new Store({\n          variable: OrderedMap({\n            a: 123, b: 312\n          })\n        })\n      })\n\n      const expected = new Store({\n        variable: OrderedMap({\n          a: 'test', b: 'test'\n        })\n      })\n\n      const actual = __internals__.addVariablesToVariableDomain(domain, api)\n\n      expect(__internals__.convertVariableIntoEnvironmentVariable.calls.length).toEqual(2)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createEnvironments', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'needsStandardEnvironmentDomain').andReturn(true)\n      spyOn(__internals__, 'createStandardEnvironmentDomain').andReturn(123)\n      spyOn(__internals__, 'addVariablesToStandardDomain').andReturn(new Store({\n        constraint: 234\n      }))\n\n      spyOn(__internals__, 'needsVariableEnvironmentDomain').andReturn(true)\n      spyOn(__internals__, 'createVariableEnvironmentDomain').andReturn(123)\n      spyOn(__internals__, 'addVariablesToVariableDomain').andReturn(new Store({\n        variable: 432\n      }))\n\n      const context = {}\n\n      const api = new Api({\n        store: new Store({\n          constraint: OrderedMap({\n            a: 123\n          }),\n          variable: OrderedMap({\n            b: 321\n          })\n        })\n      })\n\n      const expected = new Store({\n        constraint: 234,\n        variable: 432\n      })\n\n      const actual = __internals__.createEnvironments(context, api)\n\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n\n    it('should work if api does not need env domains', () => {\n      spyOn(__internals__, 'needsStandardEnvironmentDomain').andReturn(false)\n\n      spyOn(__internals__, 'needsVariableEnvironmentDomain').andReturn(false)\n\n      const context = {}\n\n      const api = new Api({\n        store: new Store({\n          constraint: OrderedMap({\n            a: 123\n          }),\n          variable: OrderedMap({\n            b: 321\n          })\n        })\n      })\n\n      const expected = new Store()\n      const actual = __internals__.createEnvironments(context, api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSequenceParameterIntoVariableDS', () => {\n    it('should work', () => {\n      const pawreq = {}\n\n      spyOn(__internals__, 'convertParameterIntoVariableDS').andReturn(123)\n\n      const param = new Parameter({\n        superType: 'sequence',\n        value: List([\n          new Parameter({ type: 'string', default: '/path' }),\n          new Parameter({\n            type: 'string',\n            constraints: List([ new Constraint.Enum([ 'simple', 'long' ]) ])\n          }),\n          new Parameter({ type: 'string', default: '/users' })\n        ])\n      })\n\n      const expected = new DynamicString('/path', 123, '/users')\n      const actual = __internals__.convertSequenceParameterIntoVariableDS(pawreq, param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterIntoVariableDS', () => {\n    it('should call convertSequenceParameterIntoVariableDS if superType is sequence', () => {\n      const pawReq = {}\n      const param = new Parameter({ superType: 'sequence' })\n\n      spyOn(__internals__, 'convertSequenceParameterIntoVariableDS').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.convertParameterIntoVariableDS(pawReq, param)\n\n      expect(__internals__.convertSequenceParameterIntoVariableDS).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    /* eslint-disable max-statements */\n    it('should create variable otherwise', () => {\n      const pawReq = {\n        addVariable: () => {}\n      }\n\n      const param = new Parameter({\n        key: 'user',\n        type: 'string',\n        constraints: List([ new Constraint.JSONSchema({ pattern: '^.{16}$' }) ])\n      })\n\n      const variable = {\n        createDynamicString: () => {}\n      }\n\n      spyOn(__internals__, 'getVariableArgumentsFromParameter').andReturn({\n        name: 'user',\n        value: 'somerandomstring',\n        description: 'dummy desc'\n      })\n\n      spyOn(pawReq, 'addVariable').andReturn(variable)\n\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.convertParameterIntoVariableDS(pawReq, param)\n\n      expect(__internals__.getVariableArgumentsFromParameter).toHaveBeenCalled()\n      expect(pawReq.addVariable).toHaveBeenCalled()\n      expect(variable.createDynamicString).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@convertPathnameIntoDynamicString', () => {\n    it('should return a string if param is not a sequence', () => {\n      const component = new URLComponent({\n        componentName: 'pathname',\n        string: '/paths',\n        variableDelimiters: List([ '{{', '}}' ])\n      })\n\n      const pawReq = {}\n\n      const expected = '/paths'\n      const actual = __internals__.convertPathnameIntoDynamicString(pawReq, component)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call convertSequenceParameterIntoVariableDS if superType is sequence', () => {\n      spyOn(__internals__, 'convertSequenceParameterIntoVariableDS').andReturn(123)\n\n      const component = new URLComponent({\n        componentName: 'pathname',\n        string: '/paths/{{pathId}}',\n        variableDelimiters: List([ '{{', '}}' ])\n      })\n\n      const pawReq = {}\n\n      const expected = 123\n      const actual = __internals__.convertPathnameIntoDynamicString(pawReq, component)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertEndpointOrReferenceIntoDS', () => {\n    it('should work is endpoint is reference', () => {\n      const variable = {\n        createDynamicString: () => {}\n      }\n\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const store = new Store({\n        endpoint: OrderedMap({\n          a: variable\n        })\n      })\n\n      const endpoint = new Reference({\n        uuid: 'a'\n      })\n\n      const expected = 123\n      const actual = __internals__.convertEndpointOrReferenceIntoDS(store, endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work is endpoint is reference and variable does not exist', () => {\n      const variable = {\n        createDynamicString: () => {}\n      }\n\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const store = new Store({\n        endpoint: OrderedMap({\n          b: variable\n        })\n      })\n\n      const endpoint = new Reference({\n        uuid: 'a'\n      })\n\n      const expected = null\n      const actual = __internals__.convertEndpointOrReferenceIntoDS(store, endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work is endpoint is url', () => {\n      spyOn(__internals__, 'createEndpointDynamicString').andReturn(123)\n\n      const store = new Store({\n        endpoint: 321\n      })\n\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud'\n      })\n\n      const expected = 123\n      const actual = __internals__.convertEndpointOrReferenceIntoDS(store, endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertEndpointsDSArrayIntoVariableDV', () => {\n    it('should return first item in endpoint array is array.length === 1', () => {\n      const pawRequest = {}\n      const endpoints = [ 123 ]\n      const expected = 123\n      const actual = __internals__.convertEndpointsDSArrayIntoVariableDV(pawRequest, endpoints)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should create variable otherwise', () => {\n      const variable = {\n        createDynamicValue: () => {}\n      }\n      spyOn(variable, 'createDynamicValue').andReturn(234)\n\n      const pawRequest = {\n        addVariable: () => {}\n      }\n      spyOn(pawRequest, 'addVariable').andReturn(variable)\n\n      const endpoints = [ 123, 321 ]\n      const expected = 234\n      const actual = __internals__.convertEndpointsDSArrayIntoVariableDV(pawRequest, endpoints)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertEndpointsAndPathnameIntoDS', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertEndpointOrReferenceIntoDS').andReturn(234)\n      spyOn(__internals__, 'convertEndpointsDSArrayIntoVariableDV').andReturn(432)\n      spyOn(__internals__, 'convertPathnameIntoDynamicString').andReturn(345)\n\n      const pawReq = {}\n      const store = new Store()\n      const endpoints = List([ 123, 321 ])\n      const path = new URL({\n        url: 'https://echo.paw.cloud'\n      })\n\n      const expected = new DynamicString(432, 345)\n      const actual = __internals__.convertEndpointsAndPathnameIntoDS(pawReq, store, endpoints, path)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('getDefaultValueFromParameter', () => {\n    it('should work', () => {\n      const param = new Parameter({\n        default: 123\n      })\n\n      const expected = '123'\n      const actual = __internals__.getDefaultValueFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if defaultValue is string', () => {\n      const param = new Parameter({\n        default: '123'\n      })\n\n      const expected = '123'\n      const actual = __internals__.getDefaultValueFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if defaultValue is null', () => {\n      const param = new Parameter({\n        default: null\n      })\n\n      const expected = ''\n      const actual = __internals__.getDefaultValueFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getVariableArgumentsFromParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getDefaultValueFromParameter').andReturn('123')\n      const param = new Parameter({\n        key: 'userId',\n        description: 'some userid desc',\n        default: 123\n      })\n\n      const expected = {\n        name: 'userId',\n        value: '123',\n        description: 'some userid desc'\n      }\n      const actual = __internals__.getVariableArgumentsFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if minimum info', () => {\n      spyOn(__internals__, 'getDefaultValueFromParameter').andReturn('123')\n      const param = new Parameter({\n        default: 123\n      })\n\n      const expected = {\n        name: '',\n        value: '123',\n        description: ''\n      }\n      const actual = __internals__.getVariableArgumentsFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if description in schema', () => {\n      spyOn(__internals__, 'getDefaultValueFromParameter').andReturn('123')\n      const param = new Parameter({\n        default: 123,\n        constraints: List([ new Constraint.JSONSchema({ description: 'some desc' }) ])\n      })\n\n      const expected = {\n        name: '',\n        value: '123',\n        description: 'some desc'\n      }\n      const actual = __internals__.getVariableArgumentsFromParameter(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterFromReference', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getVariableArgumentsFromParameter').andReturn({\n        name: 321,\n        value: 345,\n        description: 543\n      })\n      const variable = {\n        createDynamicString: () => {}\n      }\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const pawReq = {\n        addVariable: () => {}\n      }\n      spyOn(pawReq, 'addVariable').andReturn(variable)\n\n      const store = new Store({\n        parameter: OrderedMap({\n          a: {\n            parameter: 234,\n            variable: 432\n          }\n        })\n      })\n\n      const reference = new Reference({\n        uuid: 'a'\n      })\n\n      const expected = { key: 321, value: 123 }\n      const actual = __internals__.convertParameterFromReference(pawReq, store, reference)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if parameter is not found', () => {\n      spyOn(__internals__, 'getVariableArgumentsFromParameter').andReturn({\n        name: 321,\n        value: 345,\n        description: 543\n      })\n      const variable = {\n        createDynamicString: () => {}\n      }\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const pawReq = {\n        addVariable: () => {}\n      }\n      spyOn(pawReq, 'addVariable').andReturn(variable)\n\n      const store = new Store({\n        parameter: OrderedMap({\n          b: {\n            parameter: 234,\n            variable: 432\n          }\n        })\n      })\n\n      const reference = new Reference({\n        uuid: 'a'\n      })\n\n      const expected = { key: '', value: '' }\n      const actual = __internals__.convertParameterFromReference(pawReq, store, reference)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceOrParameterToDsEntry', () => {\n    it('should call convertParameterFromReference if param is reference', () => {\n      const pawReq = null\n      const store = null\n      const ref = new Reference()\n\n      spyOn(__internals__, 'convertParameterFromReference').andReturn({ key: 123, value: 321 })\n\n      const expected = { key: 123, value: 321 }\n      const actual = __internals__.convertReferenceOrParameterToDsEntry(pawReq, store, ref)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call convertParameterIntoVariableDS if param is Parameter', () => {\n      const pawReq = null\n      const store = null\n      const ref = new Parameter({\n        key: 123\n      })\n\n      spyOn(__internals__, 'convertParameterIntoVariableDS').andReturn(321)\n\n      const expected = { key: 123, value: 321 }\n      const actual = __internals__.convertReferenceOrParameterToDsEntry(pawReq, store, ref)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addHeaderToRequest', () => {\n    it('should work', () => {\n      const pawReq = { addHeader: () => {} }\n      spyOn(pawReq, 'addHeader').andReturn(123)\n\n      const headerEntry = { key: 123, value: 321 }\n      const expected = pawReq\n      const actual = __internals__.addHeaderToRequest(pawReq, headerEntry)\n\n      expect(pawReq.addHeader).toHaveBeenCalledWith(123, 321)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addHeadersToRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertReferenceOrParameterToDsEntry').andReturn({ key: 12, value: 21 })\n      spyOn(__internals__, 'addHeaderToRequest').andReturn(123)\n\n      const pawReq = null\n      const store = null\n      const container = new ParameterContainer({\n        headers: OrderedMap({\n          a: 234,\n          b: 432,\n          c: 345\n        })\n      })\n\n      const expected = 123\n      const actual = __internals__.addHeadersToRequest(pawReq, store, container)\n\n      expect(__internals__.convertReferenceOrParameterToDsEntry.calls.length).toEqual(3)\n      expect(__internals__.addHeaderToRequest.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addUrlParamToRequest', () => {\n    it('should work', () => {\n      const pawReq = { addUrlParameter: () => {} }\n      spyOn(pawReq, 'addUrlParameter').andReturn(123)\n\n      const headerEntry = { key: 123, value: 321 }\n      const expected = pawReq\n      const actual = __internals__.addUrlParamToRequest(pawReq, headerEntry)\n\n      expect(pawReq.addUrlParameter).toHaveBeenCalledWith(123, 321)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addUrlParamsToRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertReferenceOrParameterToDsEntry').andReturn({ key: 12, value: 21 })\n      spyOn(__internals__, 'addUrlParamToRequest').andReturn(123)\n\n      const pawReq = null\n      const store = null\n      const container = new ParameterContainer({\n        queries: OrderedMap({\n          a: 234,\n          b: 432,\n          c: 345\n        })\n      })\n\n      const expected = 123\n      const actual = __internals__.addUrlParamsToRequest(pawReq, store, container)\n\n      expect(__internals__.convertReferenceOrParameterToDsEntry.calls.length).toEqual(3)\n      expect(__internals__.addUrlParamToRequest.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isParameterValidWithMultiPartContext', () => {\n    it('should work', () => {\n      const input = [\n        new Parameter(),\n        new Parameter({\n          applicableContexts: List([\n            new Parameter({\n              key: 'Content-Type',\n              constraints: List([\n                new Constraint.Enum([ 'multipart/form-data' ])\n              ])\n            })\n          ])\n        }),\n        new Parameter({\n          applicableContexts: List([\n            new Parameter({\n              key: 'Accept',\n              constraints: List([\n                new Constraint.Enum([ 'multipart/form-data' ])\n              ])\n            })\n          ])\n        })\n      ]\n\n      const expected = [ true, true, false ]\n      const actual = input.map(__internals__.isParameterValidWithMultiPartContext)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isParameterValidWithUrlEncodedContext', () => {\n    it('should work', () => {\n      const input = [\n        new Parameter(),\n        new Parameter({\n          applicableContexts: List([\n            new Parameter({\n              key: 'Content-Type',\n              constraints: List([\n                new Constraint.Enum([ 'application/x-www-form-urlencoded' ])\n              ])\n            })\n          ])\n        }),\n        new Parameter({\n          applicableContexts: List([\n            new Parameter({\n              key: 'Accept',\n              constraints: List([\n                new Constraint.Enum([ 'multipart/form-data' ])\n              ])\n            })\n          ])\n        })\n      ]\n\n      const expected = [ true, true, false ]\n      const actual = input.map(__internals__.isParameterValidWithUrlEncodedContext)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isBodyParameter', () => {\n    it('should work', () => {\n      const input = [\n        new Parameter(),\n        new Parameter({ in: 'body' }),\n        new Parameter({\n          in: 'body',\n          applicableContexts: List([\n            new Parameter({\n              key: 'Content-Type',\n              constraints: List([\n                new Constraint.Enum([ 'application/json' ])\n              ])\n            })\n          ])\n        }),\n        new Parameter({\n          in: 'body',\n          applicableContexts: List([\n            new Parameter({\n              key: 'Content-Type',\n              constraints: List([\n                new Constraint.Enum([ 'application/x-www-form-urlencoded' ])\n              ])\n            })\n          ])\n        }),\n        new Parameter({\n          in: 'body',\n          applicableContexts: List([\n            new Parameter({\n              key: 'Content-Type',\n              constraints: List([\n                new Constraint.Enum([ 'multipart/form-data' ])\n              ])\n            })\n          ])\n        })\n      ]\n\n      const expected = [ false, true, true, false, false ]\n      const actual = input.map(__internals__.isBodyParameter)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@setRawBody', () => {\n    it('should work', () => {\n      const pawReq = {}\n      const params = List([\n        new Parameter({ type: 'integer', constraints: List([ new Constraint.Enum([ 123 ]) ]) })\n      ])\n\n      const expected = {\n        body: new DynamicString(\n          new DynamicValue('com.luckymarmot.PawExtensions.JSONSchemaFakerDynamicValue', {\n            schema: JSON.stringify({ enum: [ 123 ], type: 'integer' })\n          })\n        )\n      }\n\n      const actual = __internals__.setRawBody(pawReq, params)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isContextWithUrlEncoded', () => {\n    it('should work', () => {\n      const input = [\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'application/x-www-form-urlencoded'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'multipart/form-data'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'application/json'\n            })\n          ])\n        })\n      ]\n\n      const expected = [ true, false, false ]\n      const actual = input.map(__internals__.isContextWithUrlEncoded)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isContextWithMultiPart', () => {\n    it('should work', () => {\n      const input = [\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'application/x-www-form-urlencoded'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'multipart/form-data'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'application/json'\n            })\n          ])\n        })\n      ]\n\n      const expected = [ false, true, false ]\n      const actual = input.map(__internals__.isContextWithMultiPart)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addEntryToRecordParameterArray', () => {\n    it('should work', () => {\n      const kvList = [ 123 ]\n      const entry = { key: 234, value: 345 }\n      const expected = [ 123, new RecordParameter(234, 345, true) ]\n      const actual = __internals__.addEntryToRecordParameterArray(kvList, entry)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@setFormDataBody', () => {\n    /* eslint-disable max-statements */\n    it('should work with urlEncoded', () => {\n      const pawReq = {}\n      const store = new Store()\n      const params = [ 123, 321, 234, 432 ]\n      const context = new Context()\n\n      spyOn(__internals__, 'convertReferenceOrParameterToDsEntry').andReturn(123)\n      spyOn(__internals__, 'addEntryToRecordParameterArray').andReturn([ 123, 234, 345, 456, 567 ])\n\n      spyOn(__internals__, 'isContextWithUrlEncoded').andReturn(true)\n      spyOn(__internals__, 'isContextWithMultiPart').andReturn(false)\n\n      spyOn(__internals__, 'createUrlEncodedBodyDV').andReturn(678)\n      spyOn(__internals__, 'wrapDV').andReturn('test')\n\n      const expected = {\n        body: 'test'\n      }\n\n      const actual = __internals__.setFormDataBody(pawReq, store, params, context)\n\n      expect(__internals__.convertReferenceOrParameterToDsEntry.calls.length).toEqual(4)\n      expect(__internals__.addEntryToRecordParameterArray.calls.length).toEqual(4)\n      expect(__internals__.isContextWithUrlEncoded).toHaveBeenCalled()\n      expect(__internals__.isContextWithMultiPart).toHaveBeenCalled()\n      expect(__internals__.createUrlEncodedBodyDV).toHaveBeenCalled()\n      expect(__internals__.wrapDV).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with multipart', () => {\n      const pawReq = {}\n      const store = new Store()\n      const params = [ 123, 321, 234, 432 ]\n      const context = new Context()\n\n      spyOn(__internals__, 'convertReferenceOrParameterToDsEntry').andReturn(123)\n      spyOn(__internals__, 'addEntryToRecordParameterArray').andReturn([ 123, 234, 345, 456, 567 ])\n\n      spyOn(__internals__, 'isContextWithUrlEncoded').andReturn(false)\n      spyOn(__internals__, 'isContextWithMultiPart').andReturn(true)\n\n      spyOn(__internals__, 'createMultipartBodyDV').andReturn(678)\n      spyOn(__internals__, 'wrapDV').andReturn('test')\n\n      const expected = {\n        body: 'test'\n      }\n\n      const actual = __internals__.setFormDataBody(pawReq, store, params, context)\n\n      expect(__internals__.convertReferenceOrParameterToDsEntry.calls.length).toEqual(4)\n      expect(__internals__.addEntryToRecordParameterArray.calls.length).toEqual(4)\n      expect(__internals__.isContextWithUrlEncoded).toHaveBeenCalled()\n      expect(__internals__.isContextWithMultiPart).toHaveBeenCalled()\n      expect(__internals__.createMultipartBodyDV).toHaveBeenCalled()\n      expect(__internals__.wrapDV).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no valid content type', () => {\n      const pawReq = {}\n      const store = new Store()\n      const params = [ 123, 321, 234, 432 ]\n      const context = new Context()\n\n      spyOn(__internals__, 'convertReferenceOrParameterToDsEntry').andReturn(123)\n      spyOn(__internals__, 'addEntryToRecordParameterArray').andReturn([ 123, 234, 345, 456, 567 ])\n\n      spyOn(__internals__, 'isContextWithUrlEncoded').andReturn(false)\n      spyOn(__internals__, 'isContextWithMultiPart').andReturn(false)\n\n      spyOn(__internals__, 'wrapDV').andReturn('test')\n\n      const expected = {\n        body: 'test'\n      }\n\n      const actual = __internals__.setFormDataBody(pawReq, store, params, context)\n\n      expect(__internals__.convertReferenceOrParameterToDsEntry.calls.length).toEqual(4)\n      expect(__internals__.addEntryToRecordParameterArray.calls.length).toEqual(4)\n      expect(__internals__.isContextWithUrlEncoded).toHaveBeenCalled()\n      expect(__internals__.isContextWithMultiPart).toHaveBeenCalled()\n      expect(__internals__.wrapDV).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addBodyToRequest', () => {\n    it('should work with raw body params', () => {\n      const pawReq = {}\n      const store = new Store()\n      const container = new ParameterContainer({\n        body: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n      const context = new Context()\n\n      spyOn(__internals__, 'isBodyParameter').andReturn(true)\n      spyOn(__internals__, 'setRawBody').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.addBodyToRequest(pawReq, store, container, context)\n\n      expect(__internals__.setRawBody).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with formdata body params', () => {\n      const pawReq = {}\n      const store = new Store()\n      const container = new ParameterContainer({\n        body: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n      const context = new Context()\n\n      spyOn(__internals__, 'isBodyParameter').andReturn(false)\n      spyOn(__internals__, 'setFormDataBody').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.addBodyToRequest(pawReq, store, container, context)\n\n      expect(__internals__.setFormDataBody).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with formdata body params and no context', () => {\n      const pawReq = {}\n      const store = new Store()\n      const container = new ParameterContainer({\n        body: OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n      const context = null\n\n      spyOn(__internals__, 'isBodyParameter').andReturn(false)\n      spyOn(__internals__, 'setFormDataBody').andReturn(123)\n\n      const expected = pawReq\n      const actual = __internals__.addBodyToRequest(pawReq, store, container, context)\n\n      expect(__internals__.setFormDataBody).toNotHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no formdata body params and context', () => {\n      const pawReq = {}\n      const store = new Store()\n      const container = new ParameterContainer({\n        body: OrderedMap()\n      })\n      const context = new Context()\n\n      spyOn(__internals__, 'isBodyParameter').andReturn(false)\n      spyOn(__internals__, 'setFormDataBody').andReturn(123)\n\n      const expected = pawReq\n      const actual = __internals__.addBodyToRequest(pawReq, store, container, context)\n\n      expect(__internals__.setFormDataBody).toNotHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContainerFromRequest', () => {\n    it('should work with no context in request', () => {\n      const request = new Request({\n        parameters: new ParameterContainer({\n          headers: OrderedMap({ a: 123, b: 321 })\n        })\n      })\n\n      const expected = {\n        container: new ParameterContainer({\n          headers: OrderedMap({ a: 123, b: 321 })\n        })\n      }\n\n      const actual = __internals__.getContainerFromRequest(request)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with context in request', () => {\n      const request = new Request({\n        parameters: new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({\n              key: 'a',\n              applicableContexts: List([\n                new Parameter({\n                  key: 'a',\n                  constraints: List([ new Constraint.Enum([ 123, 321 ]) ])\n                })\n              ])\n            }),\n            b: new Parameter({\n              key: 'a',\n              applicableContexts: List([\n                new Parameter({\n                  key: 'a',\n                  constraints: List([ new Constraint.Enum([ 234, 432 ]) ])\n                })\n              ])\n            })\n          })\n        }),\n        contexts: List([\n          new Context({\n            constraints: List([\n              new Parameter({\n                key: 'a',\n                default: 123\n              })\n            ])\n          })\n        ])\n      })\n\n      const expected = {\n        container: new ParameterContainer({\n          headers: OrderedMap({\n            a: new Parameter({\n              key: 'a',\n              applicableContexts: List([\n                new Parameter({\n                  key: 'a',\n                  constraints: List([ new Constraint.Enum([ 123, 321 ]) ])\n                })\n              ])\n            })\n          })\n        }),\n        requestContext: new Context({\n          constraints: List([\n            new Parameter({\n              key: 'a',\n              default: 123\n            })\n          ])\n        })\n      }\n\n      const actual = __internals__.getContainerFromRequest(request)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertAuthFromReference', () => {\n    it('should work', () => {\n      const variable = { createDynamicString: () => {} }\n      spyOn(variable, 'createDynamicString').andReturn(123)\n\n      const store = new Store({\n        auth: OrderedMap({ a: { variable: variable, auth: 'my-auth' } })\n      })\n\n      const ref = new Reference({ uuid: 'a' })\n\n      const expected = { auth: 'my-auth', variable: 123 }\n      const actual = __internals__.convertAuthFromReference(store, ref)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceOrAuthToDsEntry', () => {\n    it('should work with reference', () => {\n      spyOn(__internals__, 'convertAuthFromReference').andReturn(123)\n      const store = new Store()\n      const ref = new Reference()\n\n      const expected = 123\n      const actual = __internals__.convertReferenceOrAuthToDsEntry(store, ref)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with auth', () => {\n      spyOn(__internals__, 'convertAuthIntoDynamicValue').andReturn(123)\n      spyOn(__internals__, 'wrapDV').andReturn('123')\n      const store = new Store()\n      const auth = new Auth.Basic()\n\n      const expected = { variable: '123', auth }\n      const actual = __internals__.convertReferenceOrAuthToDsEntry(store, auth)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addAuthToRequest', () => {\n    it('should work', () => {\n      const pawReq = { setHeader: () => {} }\n      spyOn(pawReq, 'setHeader').andReturn(123)\n      const authData = { variable: 'some dynamic string', auth: new Auth.Basic() }\n\n      const expected = pawReq\n      const actual = __internals__.addAuthToRequest(pawReq, authData)\n\n      expect(pawReq.setHeader).toHaveBeenCalledWith('Authorization', authData.variable)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with ApiKeys custom headers', () => {\n      const pawReq = { setHeader: () => {} }\n      spyOn(pawReq, 'setHeader').andReturn(123)\n      const authData = {\n        variable: 'some dynamic string',\n        auth: new Auth.ApiKey({ name: 'X-Auth-Token' })\n      }\n\n      const expected = pawReq\n      const actual = __internals__.addAuthToRequest(pawReq, authData)\n\n      expect(pawReq.setHeader).toHaveBeenCalledWith('X-Auth-Token', authData.variable)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addAuthsToRequest', () => {\n    it('should work', () => {\n      const pawReq = {}\n      const store = new Store()\n      const request = new Request({ auths: List([ 1, 2, 3, 4 ]) })\n\n      spyOn(__internals__, 'convertReferenceOrAuthToDsEntry').andReturn(123)\n      spyOn(__internals__, 'addAuthToRequest').andReturn(234)\n\n      const expected = 234\n      const actual = __internals__.addAuthsToRequest(pawReq, store, request)\n\n      expect(__internals__.convertReferenceOrAuthToDsEntry.calls.length).toEqual(4)\n      expect(__internals__.addAuthToRequest.calls.length).toEqual(4)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRequestIntoPawRequest', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const context = {\n        createRequest: () => {}\n      }\n      spyOn(context, 'createRequest').andReturn({})\n      spyOn(__internals__, 'convertEndpointsAndPathnameIntoDS').andReturn(123)\n      spyOn(__internals__, 'getContainerFromRequest').andReturn({ container: 1, requestContext: 2 })\n      spyOn(__internals__, 'addHeadersToRequest').andReturn(345)\n      spyOn(__internals__, 'addUrlParamsToRequest').andReturn(456)\n      spyOn(__internals__, 'addBodyToRequest').andReturn(567)\n      spyOn(__internals__, 'addAuthsToRequest').andReturn(678)\n\n      const store = new Store()\n      const path = new URL({\n        url: '/paths/simple'\n      })\n      const request = new Request()\n\n      const expected = {\n        url: 123\n      }\n\n      const actual = __internals__.convertRequestIntoPawRequest(context, store, path, request)\n\n      expect(__internals__.convertEndpointsAndPathnameIntoDS).toHaveBeenCalled()\n      expect(__internals__.getContainerFromRequest).toHaveBeenCalled()\n      expect(__internals__.addHeadersToRequest).toHaveBeenCalled()\n      expect(__internals__.addUrlParamsToRequest).toHaveBeenCalled()\n      expect(__internals__.addBodyToRequest).toHaveBeenCalled()\n      expect(__internals__.addAuthsToRequest).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@convertResourceIntoGroup', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      const context = { createRequestGroup: () => {} }\n      const group = { appendChild: () => {} }\n\n      spyOn(__internals__, 'convertRequestIntoPawRequest').andReturn(123)\n      spyOn(context, 'createRequestGroup').andReturn(group)\n      spyOn(group, 'appendChild').andReturn(123)\n\n      const store = new Store()\n      const resource = new Resource({\n        path: new URL({ url: '/paths/simple' }),\n        methods: OrderedMap({\n          get: 123,\n          post: 321,\n          put: 234\n        })\n      })\n\n      const expected = group\n      const actual = __internals__.convertResourceIntoGroup(context, store, resource)\n\n      expect(context.createRequestGroup).toHaveBeenCalled()\n      expect(__internals__.convertRequestIntoPawRequest.calls.length).toEqual(3)\n      expect(group.appendChild.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@createRequests', () => {\n    it('should work', () => {\n      const context = {}\n      const store = new Store()\n      const api = new Api({ resources: OrderedMap({ a: 1, b: 2, c: 3 }) })\n\n      spyOn(__internals__, 'convertResourceIntoGroup').andReturn(123)\n\n      const expected = OrderedMap({ a: 123, b: 123, c: 123 })\n      const actual = __internals__.createRequests(context, store, api)\n\n      expect(__internals__.convertResourceIntoGroup.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPawGroupFromGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createGroups').andCall((_, __, v) => {\n        return v % 2 ? v : null\n      })\n      const children = []\n      const inputs = [\n        [ {}, {}, new Group(), 'abc' ],\n        [ {}, {}, new Group({ name: 'def', children: OrderedMap({ a: 123, b: 234 }) }), 'abc' ],\n        [ {\n          createRequestGroup: (name) => {\n            return {\n              name, children, appendChild: (v) => children.push(v)\n            }\n          }\n        }, {}, new Group({ name: 'def', children: OrderedMap({ a: 123, b: 234, c: 345 }) }) ]\n      ]\n\n      const expected = [\n        null,\n        123,\n        { name: 'def', children: [ 123, 345 ], appendChild: (v) => children.push(v) }\n      ]\n\n      const actual = inputs.map(input => __internals__.createPawGroupFromGroup(...input))\n      expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected))\n    })\n  })\n\n  describe('@createGroups', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createPawGroupFromGroup').andCall((c, r, g, gn) => {\n        return gn\n      })\n\n      const inputs = [\n        [ {}, OrderedMap(), null, 'abc' ],\n        [ {}, OrderedMap(), 'some weird group', 'abc' ],\n        [ {}, OrderedMap(), new Group(), 'abc' ]\n      ]\n      const expected = [\n        null, null, 'abc'\n      ]\n\n      const actual = inputs.map(input => __internals__.createGroups(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@serialize', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createEnvironments').andReturn(123)\n      spyOn(__internals__, 'createRequests').andReturn(321)\n      spyOn(__internals__, 'createGroups').andReturn(123)\n      spyOn(__internals__, 'getTitleFromApi').andReturn('someTitle')\n\n      const context = {}\n      const api = new Api()\n      __internals__.serialize({ options: { context }, api })\n\n      expect(__internals__.createEnvironments).toHaveBeenCalledWith(context, api)\n      expect(__internals__.createRequests).toHaveBeenCalledWith(context, 123, api)\n      expect(__internals__.createGroups).toHaveBeenCalledWith(context, 321, null, 'someTitle')\n    })\n\n    it('should work with minimum info', () => {\n      const expected = true\n      const actual = __internals__.serialize()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/serializers/postman/v2.0/Serializer.js",
    "content": "/**\n * A Swagger v2 serializer.\n * This implementation has the following limitations:\n * - it will not create a global security field (securityDefinitions will be included though).\n * - it will not use the externalDocs, as this is field is still not supported\n * - the auths field in a Request **MUST** only be composed of References\n * - null Auth not supported at the moment\n *\n * NOTE: we allow use of undefined in this file as it works nicely with JSON.stringify, which drops\n * keys with a value of undefined.\n * ```\n * const swagger = { info, security }\n * ```\n * is easier to read than\n * ```\n * const swagger = { info }\n * if (security) {\n *   swagger.security = security\n * }\n * ```\n *\n * NOTE: we make the assumption that keys of a container are equal to the uuids of the objects it\n * holds.\n *\n * NOTE: we assume that keys of a response map are status codes\n * NOTE: we assume that keys of a methods map are method names.\n */\n /* eslint-disable no-undefined */\nimport { List, Map } from 'immutable'\n\nimport Group from '../../../models/Group'\nimport Reference from '../../../models/Reference'\nimport Auth from '../../../models/Auth'\n\nimport { convertEntryListInMap } from '../../../utils/fp-utils'\n\nconst __meta__ = {\n  format: 'postman-collection',\n  version: 'v2.0'\n}\n\nconst methods = {}\n\n/**\n * A Serializer to convert Api Records into Postman collections v2.\n */\nexport class PostmanSerializer {\n  static __meta__ = __meta__\n\n  /**\n   * serializes an Api into a Postman collection v2 formatted string\n   * @param {Api} api: the api to convert\n   * @returns {string} the corresponding postman collection, as a string\n   */\n  static serialize(api) {\n    return methods.serialize(api)\n  }\n\n  /**\n   * returns a quality score for a content string wrt. to the collection v2 format.\n   * @param {String} content: the content of the file to analyze\n   * @returns {number} the quality of the content\n   */\n  static validate(content) {\n    return methods.validate(content)\n  }\n}\n\n/**\n * returns a quality score for a content string wrt. to the collection v2 format.\n * @param {String} content: the content of the file to analyze\n * @returns {number} the quality of the content\n */\nmethods.validate = () => {\n  return 0\n}\n\n/**\n * extracts the info name field from an api.\n * @param {Api} api: the Api from which to get the title to use in the info name\n * @returns {Entry<string, string>} the corresponding entry\n */\nmethods.createInfoName = (api) => {\n  const title = api.getIn([ 'info', 'title' ]) || 'API-Flow export'\n\n  return { key: 'name', value: title }\n}\n\n/**\n * creates an entry that holds the schema info field\n * @returns {Entry<string, string>} the corresponding entry\n */\nmethods.createInfoSchema = () => {\n  const schemaUrl = 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json'\n  return { key: 'schema', value: schemaUrl }\n}\n\n/**\n * extracts the info description from an Api.\n * @param {Api} api: the Api from which to get the description\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createInfoDescription = (api) => {\n  const description = api.getIn([ 'info', 'description' ])\n  if (!description) {\n    return null\n  }\n\n  return { key: 'description', value: description }\n}\n\n/**\n * extracts the info version from the an Api.\n * @param {Api} api: the Api from which to get the version\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createInfoVersion = (api) => {\n  const version = api.getIn([ 'info', 'version' ])\n  if (!version) {\n    return null\n  }\n\n  return { key: 'version', value: version }\n}\n\n/**\n * creates a postman info object from an api\n * @param {Api} api: the Api to get the information from\n * @returns {Entry<string, PostmanInfo>} the corresponding entry\n */\nmethods.createInfo = (api) => {\n  const kvs = [\n    methods.createInfoName(api),\n    methods.createInfoSchema(),\n    methods.createInfoDescription(api),\n    methods.createInfoVersion(api)\n  ].filter(v => !!v)\n\n  return { key: 'info', value: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts the name of an Item from a Group or a Resource\n * @param {Group|Resource} groupOrResource: the group or resource whose name is to be extracted\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createItemName = (groupOrResource) => {\n  const name = groupOrResource.get('name')\n  if (!name) {\n    return null\n  }\n\n  return { key: 'name', value: name }\n}\n\n/**\n * extracts the description of an Item from a Group or a Resource\n * @param {Group|Resource} groupOrResource: the group or resource whose description is to be\n * extracted\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createItemDescription = (groupOrResource) => {\n  const description = groupOrResource.get('description')\n  if (!description) {\n    return null\n  }\n\n  return { key: 'description', value: description }\n}\n\n/**\n * extracts an endpoint out of a resource and a request, preferring the one from the request to the\n * one from the resource\n * @param {Resource} resource: the resource to get an endpoint from\n * @param {Request} request: the request to get an endpoint from\n * @returns {Endpoint?} the corresponding endpoint, if it exists\n */\nmethods.getEndpointOrReferenceFromResourceAndRequest = (resource, request) => {\n  const requestEndpoint = request.get('endpoints').valueSeq().get(0)\n  const resourceEndpoint = resource.get('endpoints').valueSeq().get(0)\n\n  if (requestEndpoint) {\n    return requestEndpoint\n  }\n\n  if (resourceEndpoint) {\n    return resourceEndpoint\n  }\n\n  return null\n}\n\n/**\n * extracts an endpoint url from a shared variable\n * @param {Variable} variable: the variable to convert into an endpoint url\n * @returns {string?} the corresponding url, if it exists\n */\nmethods.getEndpointFromVariable = (variable) => {\n  if (!variable) {\n    return null\n  }\n\n  const url = variable.get('values').valueSeq().get(0) || null\n  return url\n}\n\n/**\n * extracts an endpoint or an endpoint url from a reference (by fetching it in the store)\n * @param {Api} api: the api to use to resolve shared objects\n * @param {Reference} reference: the reference to use to resolve the endpoint\n * @returns {Endpoint?|string?} the corresponding endpoint or endpoint url, if it exists\n */\nmethods.getEndpointFromReference = (api, reference) => {\n  if (reference.get('type') === 'variable') {\n    const variable = api.getIn([ 'store', 'variable', reference.get('uuid') ])\n    return methods.getEndpointFromVariable(variable)\n  }\n\n  const type = reference.get('type') || 'endpoint'\n  const uuid = reference.get('uuid')\n\n  return api.getIn([ 'store', type, uuid ]) || null\n}\n\n/**\n * extracts a query parameter key value pair from a reference\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Reference} reference: the reference to use to resolve the query parameter\n * @returns {string?} the corresponding query parameter key value pair, as a string, if it exists\n */\nmethods.extractQueryKeyValuePairFromReference = (api, reference) => {\n  const resolved = api.getIn([ 'store', 'parameter', reference.get('uuid') ])\n\n  if (!resolved) {\n    return null\n  }\n\n  const key = resolved.get('key')\n  const value = '{{' + reference.get('uuid') + '}}'\n  return key + '=' + value\n}\n\n/**\n * extracts a query parameter key value pair from a parameter\n * @param {Parameter} param: the parameter to convert\n * @returns {string} the corresponding query parameter key value pair, as a string\n */\nmethods.extractQueryKeyValuePairFromParameter = (param) => {\n  const key = param.get('key')\n  const value = param.getJSONSchema().default || ''\n\n  return key + '=' + value\n}\n\n/**\n * extract a query parameter key value pair from a Parameter or a Reference\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Parameter|Reference} param: the Parameter or Reference to convert into a query parameter\n * @returns {string?} the corresponding query parameter key value pair, as a string, if it exists\n */\nmethods.extractQueryKeyValuePairFromParameterOrReference = (api, param) => {\n  if (param instanceof Reference) {\n    return methods.extractQueryKeyValuePairFromReference(api, param)\n  }\n\n  return methods.extractQueryKeyValuePairFromParameter(param)\n}\n\n/**\n * extracts a query string from a request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request to extract the query string from\n * @returns {string} the corresponding queryString\n */\nmethods.extractQueryStringFromRequest = (api, request) => {\n  const queryString = request.getIn([ 'parameters', 'queries' ])\n    .map(param => {\n      return methods.extractQueryKeyValuePairFromParameterOrReference(api, param)\n    })\n    .filter(v => !!v)\n    .valueSeq()\n    .toJS()\n    .join('&')\n\n  if (queryString === '') {\n    return queryString\n  }\n\n  return '?' + queryString\n}\n\n/**\n * merges together a base url with a path and a queryString\n * @param {string} baseUrl: the base url from the endpoint of a request/resoure\n * @param {string} path: the path of the resource this url belongs to\n * @param {string} queryString: the queryString associated with the request this url belongs to\n * @returns {Entry<string, string>} the corresponding complete url, as an Entry\n */\nmethods.combineUrlComponents = (baseUrl, path, queryString) => {\n  if (baseUrl[baseUrl.length - 1] === '/' && path[0] === '/' || path === '/') {\n    const url = baseUrl + path.slice(1)\n    return { key: 'url', value: url + queryString }\n  }\n\n  const url = baseUrl + path\n  return { key: 'url', value: url + queryString }\n}\n\n/**\n * extracts a url from an endpoint\n * @param {URL|string} endpoint: the endpoint to extract a url from\n * @returns {string} the corresponding url\n */\nmethods.extractBaseUrlFromEndpoint = (endpoint) => {\n  const baseUrl = typeof endpoint === 'string' ?\n    endpoint :\n    endpoint.generate(List([ '{{', '}}' ]))\n\n  return baseUrl\n}\n\n/**\n * extract a path from a resource\n * @param {Resource} resource: the resource to get the path from\n * @returns {string} the corresponding path\n */\nmethods.extractPathFromResource = (resource) => {\n  const pathname = resource.getIn([ 'path', 'pathname' ])\n\n  if (!pathname) {\n    return '/'\n  }\n\n  const path = pathname\n    .generate(List([ ':', '' ]))\n\n  return path\n}\n\n/**\n * creates a postman url entry from a request and its containing resource\n * @param {Api} api: the Api record to use to resolve shared objects\n * @param {Resource} resource: the resource from which to get the path and shared endpoints\n * @param {Request} request: the request from which to get the shared endpoints. It overrides the\n * ones from the Resource level\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createRequestUrl = (api, resource, request) => {\n  const endpointOrReference = methods.getEndpointOrReferenceFromResourceAndRequest(\n    resource, request\n  )\n\n  let endpoint = endpointOrReference\n  if (endpointOrReference instanceof Reference) {\n    endpoint = methods.getEndpointFromReference(api, endpointOrReference)\n  }\n\n  if (!endpoint) {\n    return null\n  }\n\n  const baseUrl = methods.extractBaseUrlFromEndpoint(endpoint)\n  const path = methods.extractPathFromResource(resource)\n  const queryString = methods.extractQueryStringFromRequest(api, request)\n\n  return methods.combineUrlComponents(baseUrl, path, queryString)\n}\n\n/**\n * converts an AWSSig4 auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'awsv4',\n *   awsv4: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromAWSSig4Auth = (auth) => {\n  const kvs = [\n    { key: 'accessKey', value: auth.get('key') },\n    { key: 'secretKey', value: auth.get('secret') },\n    { key: 'region', value: auth.get('region') },\n    { key: 'service', value: auth.get('service') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'awsv4' }\n  }\n\n  return { type: 'awsv4', awsv4: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * converts a Basic auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'basic',\n *   basic: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromBasicAuth = (auth) => {\n  const kvs = [\n    { key: 'username', value: auth.get('username') },\n    { key: 'password', value: auth.get('password') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'basic' }\n  }\n\n  return { type: 'basic', basic: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * converts a Digest auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'digest',\n *   digest: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromDigestAuth = (auth) => {\n  const kvs = [\n    { key: 'username', value: auth.get('username') },\n    { key: 'password', value: auth.get('password') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'digest' }\n  }\n\n  return { type: 'digest', digest: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * converts an Hawk auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'hawk',\n *   hawk: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromHawkAuth = (auth) => {\n  const kvs = [\n    { key: 'authId', value: auth.get('id') },\n    { key: 'authKey', value: auth.get('key') },\n    { key: 'algorithm', value: auth.get('algorithm') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'hawk' }\n  }\n\n  return { type: 'hawk', hawk: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * converts an OAuth1 auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'oauth1',\n *   oauth1: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromOAuth1Auth = (auth) => {\n  const kvs = [\n    { key: 'consumerSecret', value: auth.get('consumerSecret') },\n    { key: 'consumerKey', value: auth.get('consumerKey') },\n    { key: 'token', value: auth.get('token') },\n    { key: 'tokenSecret', value: auth.get('tokenSecret') },\n    { key: 'signatureMethod', value: auth.get('algorithm') },\n    { key: 'nonce', value: auth.get('nonce') },\n    { key: 'version', value: auth.get('version') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'oauth1' }\n  }\n\n  return { type: 'oauth1', oauth1: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * converts an OAuth2 auth into a postmanAuth property\n * @param {Auth} auth: the auth to convert\n * @returns {{\n *   type: 'oauth2',\n *   oauth2: Object\n * }} the corresponding postmanAuth property\n */\nmethods.createRequestAuthFromOAuth2Auth = (auth) => {\n  const kvs = [\n    { key: 'authUrl', value: auth.get('authorizationUrl') },\n    { key: 'accessTokenUrl', value: auth.get('tokenUrl') },\n    { key: 'scope', value: auth.get('scopes').map(({ key }) => key).join(' ') || null }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return { type: 'oauth2' }\n  }\n\n  return { type: 'oauth2', oauth2: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/* eslint-disable max-statements */\n/**\n * converts an Auth into a postmanAuth\n * @param {Auth} auth: the auth to convert\n * @returns {Entry<string, PostmanAuth>?} the corresponding postmanAuth entry, if it exists\n */\nmethods.createRequestAuthFromAuth = (auth) => {\n  let postmanAuth = null\n  if (auth instanceof Auth.AWSSig4) {\n    postmanAuth = methods.createRequestAuthFromAWSSig4Auth(auth)\n  }\n\n  if (auth instanceof Auth.Basic) {\n    postmanAuth = methods.createRequestAuthFromBasicAuth(auth)\n  }\n\n  if (auth instanceof Auth.Digest) {\n    postmanAuth = methods.createRequestAuthFromDigestAuth(auth)\n  }\n\n  if (auth instanceof Auth.Hawk) {\n    postmanAuth = methods.createRequestAuthFromHawkAuth(auth)\n  }\n\n  if (auth instanceof Auth.OAuth1) {\n    postmanAuth = methods.createRequestAuthFromOAuth1Auth(auth)\n  }\n\n  if (auth instanceof Auth.OAuth2) {\n    postmanAuth = methods.createRequestAuthFromOAuth2Auth(auth)\n  }\n\n  if (!postmanAuth) {\n    return null\n  }\n\n  return { key: 'auth', value: postmanAuth }\n}\n/* eslint-enable max-statements */\n\n/**\n * converts the Auths from a request into a postmanAuth\n * @param {Api} api: the Api from which to get the shared auth methods\n * @param {Request} request: the request from which to get the *potentially null* auth references\n * @returns {Entry<string, PostmanAuth>?} the corresponding postmanAuth entry, if it exists.\n */\nmethods.createRequestAuth = (api, request) => {\n  const auths = request.get('auths').valueSeq()\n\n  if (!auths.size) {\n    return null\n  }\n\n  const auth = auths.get(0)\n  if (!auth) {\n    return { key: 'auth', value: { type: 'noauth', noauth: {} } }\n  }\n\n  const authData = api.getIn([ 'store', 'auth', auth.get('uuid') ])\n  const postmanAuth = methods.createRequestAuthFromAuth(authData)\n\n  return postmanAuth || null\n}\n\n/**\n * extracts a PostmanMethod from a request\n * @param {Request} request: the request from which to extract the method\n * @returns {Entry<string, string>?} the corresponding entry, if it exists\n */\nmethods.createMethod = (request) => {\n  const method = request.get('method')\n  if (!method) {\n    return null\n  }\n\n  return { key: 'method', value: method.toUpperCase() }\n}\n\n/**\n * creates a Header from a reference\n * @param {Api} api: the api to use to resolve the shared parameters\n * @param {Reference} reference: the reference to convert into a header\n * @returns {Entry<string?, string>?} the corresponding header, formatted as an entry, if it exists\n */\nmethods.createHeaderFromReference = (api, reference) => {\n  const param = api.getIn([ 'store', 'parameter', reference.get('uuid') ])\n\n  if (!param) {\n    return null\n  }\n\n  const key = param.get('key')\n  const value = '{{' + reference.get('uuid') + '}}'\n\n  return { key, value }\n}\n\n/**\n * creates a header from a Parameter\n * @param {Parameter} param: the parameter to convert into a header\n * @returns {Entry<string, string>?} the corresponding header, formatted as an Entry, if it exists\n */\nmethods.createHeaderFromParameter = (param) => {\n  const key = param.get('key')\n\n  if (!key) {\n    return null\n  }\n\n  const schema = param.getJSONSchema()\n\n  if (schema.default) {\n    return { key, value: schema.default }\n  }\n\n  if (schema.enum) {\n    return { key, value: schema.enum[0] }\n  }\n\n  return { key, value: null }\n}\n\n/**\n * extracts a header from a Parameter or Reference\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Parameter|Reference} paramOrReference: the parameter or reference to convert into a\n * header\n * @returns {Entry<string?, string>?} the corresponding header, formatted as an Entry, if it exists\n */\nmethods.createHeaderFromParameterOrReference = (api, paramOrReference) => {\n  if (paramOrReference instanceof Reference) {\n    return methods.createHeaderFromReference(api, paramOrReference)\n  }\n\n  if (!paramOrReference || !paramOrReference.get('key')) {\n    return null\n  }\n\n  return methods.createHeaderFromParameter(paramOrReference)\n}\n\n/**\n * extracts a PostmanHeader from a request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request from which to extract the headers\n * @returns {Entry<string, PostmanHeader>?} the corresponding entry, if it exists\n */\nmethods.createHeader = (api, request) => {\n  const headers = request.getIn([ 'parameters', 'headers' ])\n    .map(header => methods.createHeaderFromParameterOrReference(api, header))\n    .filter(v => !!v)\n\n  if (!headers.size) {\n    return null\n  }\n\n  return { key: 'header', value: headers.valueSeq().toJS() }\n}\n\n/**\n * extracts content-type parameters from the headers of request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request to get the content-type parameters from\n * @returns {List<Parameter>} the corresponding List of Content-Type Parameters\n */\nmethods.getContentTypeParamsFromHeaders = (api, request) => {\n  const contentTypeHeaders = request.get('parameters')\n    .resolve(api.get('store'))\n    .get('headers')\n    .filter(header => header.get('key') === 'Content-Type')\n    .valueSeq()\n    .toList()\n\n  return contentTypeHeaders\n}\n\n/**\n * extracts content-type parameters from a context\n * @param {Context} context: the context to extract the content-type parameters from\n * @returns {List<Parameter>} the corresponding List of Content-Type Parameters\n */\nmethods.getContentTypeParamsFromContext = (context) => {\n  return context.get('constraints').filter(param => {\n    return param.get('key') === 'Content-Type' &&\n      param.get('in') === 'headers' &&\n      param.get('usedIn') === 'request'\n  })\n}\n\n/**\n * extracts content-type parameters from a context, or from the headers of a request, if the context\n * does not exist\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request to get the headers from\n * @param {Context?} context: the context to extract content-type parameters from\n * @returns {List<Parameter>} the corresponding list of content-type Parameters\n */\nmethods.getContentTypeParamsFromRequestOrContext = (api, request, context) => {\n  if (!context) {\n    return methods.getContentTypeParamsFromHeaders(api, request)\n  }\n\n  return methods.getContentTypeParamsFromContext(context)\n}\n\n/**\n * extracts a postman body mode from the `default` field of a schema\n * @param {JSONSchema} schema: the schema to extract the body mode from\n * @returns {'urlencoded'|'formdata'|'raw'} the corresponding body mode\n */\nmethods.createBodyModeFromSchemaDefault = (schema) => {\n  const modeMap = [\n    { key: 'application/x-www-form-urlencoded', value: 'urlencoded' },\n    { key: 'multipart/form-data', value: 'formdata' }\n  ]\n\n  const mode = modeMap\n    .filter(({ key }) => schema.default.match(key))\n    .map(({ value }) => value)[0]\n\n  return mode || 'raw'\n}\n\n/**\n * extracts a postman body mode from the `enum` field of a schema\n * @param {JSONSchema} schema: the schema to extract the body mode from\n * @returns {'urlencoded'|'formdata'|'raw'} the corresponding body mode\n */\nmethods.createBodyModeFromSchemaEnum = (schema) => {\n  const modeMap = [\n    { key: 'application/x-www-form-urlencoded', value: 'urlencoded' },\n    { key: 'multipart/form-data', value: 'formdata' }\n  ]\n\n  const mode = modeMap\n    .filter(({ key }) => {\n      return schema.enum.filter(contentType => contentType.match(key)).length > 0\n    })\n    .map(({ value }) => value)[0]\n\n  return mode || 'raw'\n}\n\n/**\n * extracts a postman body mode from a List of Content Type Parameters\n * @param {List<Parameter>} contentTypeParams: the List of Parameter from which to extract a body\n * mode\n * @returns {'urlencoded'|'formdata'|'raw'} the corresponding body mode\n */\nmethods.createBodyModeFromContentTypeParams = (contentTypeParams) => {\n  if (contentTypeParams.size !== 1) {\n    return 'raw'\n  }\n\n  const contentTypesConstraint = contentTypeParams.get(0)\n  const contentTypeSchema = contentTypesConstraint.getJSONSchema()\n\n  if (contentTypeSchema.default) {\n    return methods.createBodyModeFromSchemaDefault(contentTypeSchema)\n  }\n\n  if (contentTypeSchema.enum) {\n    return methods.createBodyModeFromSchemaEnum(contentTypeSchema)\n  }\n\n  return 'raw'\n}\n\n/**\n * extracts a PostmanBodyMode from a Context\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request from which to get the body parameters\n * @param {Context} context: the context from which to infer the body mode\n * @returns {'raw'|'formdata'|'urlencoded'} the corresponding body mode\n */\nmethods.createBodyMode = (api, request, context) => {\n  const contentTypeParams = methods.getContentTypeParamsFromRequestOrContext(api, request, context)\n  return methods.createBodyModeFromContentTypeParams(contentTypeParams)\n}\n\n/**\n * converts a Map of Body Parameters into a raw postman parameters string\n * @param {OrderedMap<string, Parameter>} params: the body parameters to convert into raw parameters\n * @returns {string} the corresponding raw parameters string\n */\nmethods.convertBodyParametersIntoRawParameters = (params) => {\n  const rawBody = params\n    .map(param => {\n      if (param.get('key')) {\n        return '{{' + param.get('key') + '}}'\n      }\n\n      return JSON.stringify(param.getJSONSchema(), null, 2)\n    })\n    .valueSeq()\n    .toJS()\n    .join('\\n')\n\n  return rawBody\n}\n\n/**\n * extracts a PostmanRawBody entry from a request in a specific context\n * @param {OrderedMap<string, Parameter>} bodyParams: the body parameters to convert into raw\n * parameters\n * @returns {Entry<string, PostmanRawBody>?} the corresponding entry, if it exists\n */\nmethods.createBodyFromRawMode = (bodyParams) => {\n  if (!bodyParams.size) {\n    return null\n  }\n\n  const rawBody = methods.convertBodyParametersIntoRawParameters(bodyParams)\n\n  return { key: 'raw', value: rawBody }\n}\n\n/**\n * extracts a PostmanUrlEncodedBody entry from a request in a specific context\n * @param {OrderedMap<string, Parameter>} bodyParams: the body parameters to convert into\n * postman url-encoded parameters\n * @returns {Entry<string, PostmanUrlEncodedBody>?} the corresponding entry, if it exists\n */\nmethods.createBodyFromUrlEncodedMode = (bodyParams) => {\n  const postmanParams = bodyParams.map(param => {\n    return {\n      key: param.get('key'),\n      value: param.get('default') || ('{{' + param.get('key') + '}}'),\n      enabled: true\n    }\n  }).valueSeq().toJS()\n\n  return { key: 'urlencoded', value: postmanParams }\n}\n\n/**\n * extracts a PostmanFormDataBody entry from a request in a specific context\n * @param {OrderedMap<string, Parameter>} bodyParams: the body parameters to convert into\n * postman url-encoded parameters\n * @returns {Entry<string, PostmanFormDataBody>?} the corresponding entry, if it exists\n */\nmethods.createBodyFromFormDataMode = (bodyParams) => {\n  const postmanParams = bodyParams.map(param => {\n    return {\n      key: param.get('key'),\n      value: param.get('default') || ('{{' + param.get('key') + '}}'),\n      enabled: true\n    }\n  }).valueSeq().toJS()\n\n  return { key: 'formdata', value: postmanParams }\n}\n\n/**\n * extracts a PostmanModalBody entry from a request in a specific context and mode\n * @param {OrderedMap<string, Parameter>} bodyParams: the body parameters to convert into\n * postman modal parameters (e.g. depending on the mode, they are converted differently)\n * @param {string} mode: the mode in which the body should be formatted\n * @returns {Entry<string, PostmanModalBody>?} the corresponding entry, if it exists\n */\nmethods.createBodyFromMode = (bodyParams, mode) => {\n  if (mode === 'raw') {\n    return methods.createBodyFromRawMode(bodyParams)\n  }\n\n  if (mode === 'urlencoded') {\n    return methods.createBodyFromUrlEncodedMode(bodyParams)\n  }\n\n  if (mode === 'formdata') {\n    return methods.createBodyFromFormDataMode(bodyParams)\n  }\n\n  return null\n}\n\n/**\n * prepares body parameters from a request based on a store and context\n * @param {Api} api: the api that holds the store used to resolve shared parameters\n * @param {Request} request: the request to extract the body parameters from\n * @param {Context?} context: the context to use to filter the body parameters\n * @returns {OrderedMap<string, Parameter>} the corresponding body parameters container block\n */\nmethods.getBodyParamsFromRequest = (api, request, context) => {\n  const constraints = context ? context.get('constraints') : List()\n  const bodyParams = request.get('parameters')\n    .resolve(api.get('store'))\n    .filter(constraints)\n    .get('body')\n\n  return bodyParams\n}\n\n/**\n * extracts a PostmanBody entry from a request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Request} request: the request from which to get the body parameters\n * @returns {Entry<string, PostmanBody>?} the corresponding entry, if it exists\n */\nmethods.createBody = (api, request) => {\n  const context = request.get('contexts').get(0)\n  const bodyParams = methods.getBodyParamsFromRequest(api, request, context)\n  const mode = methods.createBodyMode(api, request, context)\n\n  const kvs = [\n    { key: 'mode', value: mode },\n    methods.createBodyFromMode(bodyParams, mode)\n  ].filter(v => !!v)\n\n  if (kvs.length <= 1) {\n    return null\n  }\n\n  return { key: 'body', value: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts a PostmanRequest entry from a request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Resource} resource: the resource to use to generate the url\n * @param {Request} request: the request from which to get the body parameters\n * @returns {Entry<string, PostmanRequest>?} the corresponding entry, if it exists\n */\nmethods.createRequestFromRequest = (api, resource, request) => {\n  const kvs = [\n    methods.createRequestUrl(api, resource, request),\n    methods.createRequestAuth(api, request),\n    methods.createMethod(request),\n    methods.createHeader(api, request),\n    methods.createBody(api, request)\n  ].filter(v => !!v)\n\n  if (!kvs.length) {\n    return null\n  }\n\n  return { key: 'request', value: kvs.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts a PostmanItem from a request\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Resource} resource: the resource to use to generate the url for the request associated\n * with this item\n * @param {Request} request: the request from which to get the body parameters\n * @returns {PostmanItem} the corresponding PostmanItem\n */\nmethods.createItemFromRequest = (api, resource, request) => {\n  const kvs = [\n    methods.createItemName(request),\n    methods.createItemDescription(request),\n    methods.createRequestFromRequest(api, resource, request)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts an array of PostmanItems from a resource\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {Resource} resource: the resource to use to generate the PostmanItems\n * @returns {Array<PostmanItem>} the corresponding array of PostmanItems\n */\nmethods.createItemsFromResource = (api, resource) => {\n  const items = resource.get('methods')\n    .map(request => methods.createItemFromRequest(api, resource, request))\n    .valueSeq()\n    .toJS()\n\n  return items\n}\n\n/**\n * creates an Item Name from a Resource\n * @param {Resource} resource: the resource to extract a name from\n * @returns {Entry<string, string>} the corresponding name, as an Entry\n */\nmethods.createItemNameFromResource = (resource) => {\n  const name = resource.get('name') ||\n    resource.get('description') ||\n    resource.getIn([ 'path', 'pathname' ]).generate(List([ ':', '' ]))\n\n  return { key: 'name', value: name }\n}\n\n/**\n * extracts a PostmanItemGroup entry from an Api and a resourceId\n * @param {Api} api: the api to use to resolve shared parameters\n * @param {string} id: the resourceId to use to resolve the resource in the Api\n * @returns {Entry<string, PostmanItemGroup>?} the corresponding entry, if it exists\n */\nmethods.createItemGroupFromResource = (api, id) => {\n  const resource = api.getIn([ 'resources', id ])\n\n  if (!resource) {\n    return null\n  }\n\n  const kvs = [\n    methods.createItemNameFromResource(resource),\n    methods.createItemDescription(resource),\n    { key: 'item', value: methods.createItemsFromResource(api, resource) }\n  ].filter(v => !!v)\n\n  const result = kvs.reduce(convertEntryListInMap, {})\n  return result\n}\n\n/**\n * extracts a PostmanItem property as an entry from an Api and a Group or a Resource\n * @param {Api} api: the api to use to resolve shared objects\n * @param {Group|Resource} groupOrResource: the group or resource to convert into a\n * PostmanItemGroup\n * @returns {Entry<string, PostmanItemGroup>} the corresponding entry, if it exists\n */\nmethods.createItemGroupFromGroupOrResource = (api, groupOrResource) => {\n  if (groupOrResource instanceof Group) {\n    return methods.createItemGroup(api, groupOrResource)\n  }\n\n  return methods.createItemGroupFromResource(api, groupOrResource)\n}\n\n/**\n * extracts a PostmanItem property as an entry from an Api and a Group\n * @param {Api} api: the api to use to resolve shared objects\n * @param {Group} group: the group from which to convert into a PostmanItemGroupProperty\n * @returns {Entry<string, PostmanItemGroupProperty>} the corresponding entry, if it exists\n */\nmethods.createItemProp = (api, group) => {\n  const items = group.get('children')\n    .map(child => methods.createItemGroupFromGroupOrResource(api, child))\n    .filter(v => !!v)\n\n  return { key: 'item', value: items.valueSeq().toJS() }\n}\n\n/**\n * creates an PostmanItemGroup from an Api and a Group\n * @param {Api} api: the api to use to resolve shared objects\n * @param {Group} group: the group from which to convert into a PostmanItemGroup\n * @returns {Entry<string, PostmanItemGroup>} the corresponding entry\n */\nmethods.createItemGroup = (api, group) => {\n  const kvs = [\n    methods.createItemName(group),\n    methods.createItemDescription(group),\n    methods.createItemProp(api, group)\n  ].filter(v => !!v)\n\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * merges item groups that have the same name. This is done because there are no constraints on the\n * unicity of a Resource wrt to its name/description/path in Api.get('resources'). This unicity\n * principle would be violated by the Paw/Postman and curl parser otherwise\n * @param {Map<string, PostmanItemGroup>} namedMap: the accumulator map that is used to merge\n * item groups together\n * @param {PostmanItemGroup} itemGroup: the item group to merge or add to the accumulator\n * @returns {Map<string, PostmanItemGroup>} the updated accumulator\n */\nmethods.mergeItemGroupsWithSameName = (namedMap, itemGroup) => {\n  const namedItemGroup = namedMap.get(itemGroup.name)\n  if (namedItemGroup) {\n    namedItemGroup.item = [].concat(namedItemGroup.item || [], itemGroup.item || [])\n    return namedMap.set(itemGroup.name, namedItemGroup)\n  }\n\n  return namedMap.set(itemGroup.name, itemGroup)\n}\n\n/**\n * creates an PostmanRootItem from an Api\n * @param {Api} api: the api to use to extract groups\n * @returns {Entry<string, PostmanRootItem>} the corresponding entry\n */\nmethods.createRootItem = (api) => {\n  const group = api.get('group')\n\n  if (!group) {\n    return { key: 'item', value: [] }\n  }\n\n  const items = api.get('resources')\n    .map((_, id) => methods.createItemGroupFromResource(api, id))\n    .filter(v => !!v)\n    .reduce(methods.mergeItemGroupsWithSameName, Map())\n    .valueSeq()\n    .toJS()\n\n  return { key: 'item', value: items }\n}\n/*\nNOTE: This should be used once postman is capable of dealing with multiple nesting level\nmethods.createRootItem = (api) => {\n  const group = api.get('group')\n\n  if (!group) {\n    return { key: 'item', value: [] }\n  }\n\n  return { key: 'item', value: [ methods.createItemGroup(api, group) ] }\n}\n*/\n\n/**\n * converts a **shared** Parameter into a postman variable\n * @param {Parameter} param: the parameter to converts\n * @param {string} key: the key of the parameter in TypedStore that contains it (equals the uuid of\n * potential references to it)\n * @returns {PostmanVariable?} the corresponding postman variable, if it exists\n */\nmethods.convertParameterIntoVariable = (param, key) => {\n  const kvs = [\n    { key: 'id', value: key },\n    { key: 'value', value: param.get('default') },\n    { key: 'type', value: param.get('type') },\n    { key: 'name', value: param.get('key') }\n  ].filter(({ value }) => !!value)\n\n  if (!kvs.length) {\n    return null\n  }\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * creates an PostmanVariable from an Api\n * @param {Api} api: the api to use to resolve shared objects\n * @returns {Entry<string, PostmanVariable>?} the corresponding entry, if it exists\n */\nmethods.createVariable = (api) => {\n  const sharedParams = api.getIn([ 'store', 'parameter' ])\n\n  if (!sharedParams.size) {\n    return null\n  }\n\n  const variables = sharedParams\n    .map(methods.convertParameterIntoVariable)\n    .filter(v => !!v)\n    .valueSeq()\n    .toJS()\n\n  if (!variables.length) {\n    return null\n  }\n\n  return { key: 'variable', value: variables }\n}\n\n/**\n * creates a PostmanCollection from an Api\n * @param {Api} api: the api to use to convert into a PostmanCollection\n * @returns {Entry<string, PostmanCollection>} the corresponding entry\n */\nmethods.createPostmanCollection = (api) => {\n  const kvs = [\n    methods.createInfo(api),\n    methods.createRootItem(api),\n    methods.createVariable(api)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * serializes an Api into a Swagger formatted string\n * @param {Api} api: the api to convert\n * @returns {string} the corresponding swagger object, as a string\n */\nmethods.serialize = ({ api }) => {\n  try {\n    const postmanCollection = methods.createPostmanCollection(api)\n    const serialized = JSON.stringify(postmanCollection, null, 2)\n    return serialized\n  }\n  catch (e) {\n    throw e\n  }\n}\n\nexport const __internals__ = methods\nexport default PostmanSerializer\n/* eslint-enable no-undefined */\n"
  },
  {
    "path": "src/serializers/postman/v2.0/__tests__/Serializer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List } from 'immutable'\n\nimport Api from '../../../../models/Api'\nimport Info from '../../../../models/Info'\nimport Group from '../../../../models/Group'\nimport Resource from '../../../../models/Resource'\nimport Request from '../../../../models/Request'\nimport Variable from '../../../../models/Variable'\nimport Reference from '../../../../models/Reference'\nimport Store from '../../../../models/Store'\nimport Parameter from '../../../../models/Parameter'\nimport Constraint from '../../../../models/Constraint'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport URL from '../../../../models/URL'\nimport Auth from '../../../../models/Auth'\nimport Context from '../../../../models/Context'\n\nimport Serializer, { __internals__ } from '../Serializer'\n\ndescribe('serializers/swagger/v2.0/Serializer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Serializer }', () => {\n    describe('@serialize', () => {\n      it('should call __internals__.serialize', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const actual = Serializer.serialize()\n\n        expect(__internals__.serialize).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.serialize with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.serialize(input)\n\n        expect(__internals__.serialize).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@validate', () => {\n      it('should call __internals__.validate', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const actual = Serializer.validate()\n\n        expect(__internals__.validate).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.validate with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.validate(input)\n\n        expect(__internals__.validate).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@validate', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        0\n      ]\n      const actual = inputs.map(input => __internals__.validate(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createInfoName', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ title: 123 }) })\n      ]\n      const expected = [\n        { key: 'name', value: 'API-Flow export' },\n        { key: 'name', value: 'API-Flow export' },\n        { key: 'name', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.createInfoName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createInfoSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        {\n          key: 'schema',\n          value: 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json'\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createInfoSchema(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createInfoDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ description: 123 }) })\n      ]\n      const expected = [\n        null, null, { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.createInfoDescription(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createInfoVersion', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ version: 123 }) })\n      ]\n      const expected = [\n        null, null, { key: 'version', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.createInfoVersion(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createInfo', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({\n          title: 123,\n          version: 234,\n          description: 345\n        }) })\n      ]\n      const expected = [\n        {\n          key: 'info',\n          value: {\n            name: 'API-Flow export',\n            schema: 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json'\n          }\n        },\n        {\n          key: 'info',\n          value: {\n            name: 'API-Flow export',\n            schema: 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json'\n          }\n        },\n        {\n          key: 'info',\n          value: {\n            schema: 'https://schema.getpostman.com/json/collection/v2.0.0/collection.json',\n            name: 123,\n            version: 234,\n            description: 345\n          }\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createInfo(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemName', () => {\n    it('should work', () => {\n      const inputs = [\n        new Group(),\n        new Group({ name: 123 }),\n        new Resource(),\n        new Resource({ name: 234 }),\n        new Request(),\n        new Request({ name: 345 })\n      ]\n      const expected = [\n        null,\n        { key: 'name', value: 123 },\n        null,\n        { key: 'name', value: 234 },\n        null,\n        { key: 'name', value: 345 }\n      ]\n      const actual = inputs.map(input => __internals__.createItemName(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemDescription', () => {\n    it('should work', () => {\n      const inputs = [\n        new Group(),\n        new Group({ description: 123 }),\n        new Resource(),\n        new Resource({ description: 234 }),\n        new Request(),\n        new Request({ description: 345 })\n      ]\n      const expected = [\n        null,\n        { key: 'description', value: 123 },\n        null,\n        { key: 'description', value: 234 },\n        null,\n        { key: 'description', value: 345 }\n      ]\n      const actual = inputs.map(input => __internals__.createItemDescription(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEndpointOrReferenceFromResourceAndRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Resource(), new Request() ],\n        [ new Resource({\n          endpoints: OrderedMap({\n            base: 123,\n            dropped: 234\n          })\n        }), new Request() ],\n        [ new Resource(), new Request({\n          endpoints: OrderedMap({\n            base: 345,\n            dropped: 456\n          })\n        }) ],\n        [ new Resource({\n          endpoints: OrderedMap({\n            base: 123,\n            dropped: 234\n          })\n        }), new Request({\n          endpoints: OrderedMap({\n            base: 345,\n            dropped: 456\n          })\n        }) ]\n      ]\n      const expected = [\n        null, 123, 345, 345\n      ]\n      const actual = inputs.map(\n        input => __internals__.getEndpointOrReferenceFromResourceAndRequest(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEndpointFromVariable', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        new Variable(),\n        new Variable({\n          values: OrderedMap({ base: 123, dropped: 234 })\n        })\n      ]\n      const expected = [\n        null, null, 123\n      ]\n      const actual = inputs.map(input => __internals__.getEndpointFromVariable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEndpointFromReference', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getEndpointFromVariable').andCall(v => v + 1)\n      const inputs = [\n        [ new Api(), new Reference() ],\n        [ new Api(), new Reference({\n          uuid: 'base'\n        }) ],\n        [ new Api({\n          store: new Store({\n            endpoint: OrderedMap({\n              base: 123\n            })\n          })\n        }), new Reference({\n          uuid: 'base'\n        }) ],\n        [ new Api({\n          store: new Store({\n            endpoint: OrderedMap({\n              base: 123\n            })\n          })\n        }), new Reference({\n          type: 'endpoint',\n          uuid: 'base'\n        }) ],\n        [ new Api({\n          store: new Store({\n            variable: OrderedMap({\n              base: 234\n            })\n          })\n        }), new Reference({\n          type: 'variable',\n          uuid: 'base'\n        }) ],\n        [ new Api({\n          store: new Store({\n            endpoint: OrderedMap({\n              base: 123\n            }),\n            variable: OrderedMap({\n              base: 234\n            })\n          })\n        }), new Reference({\n          type: 'variable',\n          uuid: 'base'\n        }) ]\n      ]\n      const expected = [\n        null, null, 123, 123, 235, 235\n      ]\n      const actual = inputs.map(input => __internals__.getEndpointFromReference(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryKeyValuePairFromReference', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Api(), new Reference() ],\n        [ new Api(), new Reference({\n          uuid: 'param'\n        }) ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              param: new Parameter()\n            })\n          })\n        }), new Reference({\n          uuid: 'param'\n        }) ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              param: new Parameter({\n                key: 234\n              })\n            })\n          })\n        }), new Reference({\n          uuid: 'param'\n        }) ]\n      ]\n      const expected = [\n        null,\n        null,\n        'null={{param}}',\n        '234={{param}}'\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractQueryKeyValuePairFromReference(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryKeyValuePairFromParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter(),\n        new Parameter({\n          key: 123\n        }),\n        new Parameter({\n          key: 234,\n          default: 345\n        }),\n        new Parameter({\n          key: 456,\n          constraints: List([\n            new Constraint.JSONSchema({\n              type: 'integer',\n              default: 567\n            })\n          ])\n        })\n      ]\n      const expected = [\n        'null=',\n        '123=',\n        '234=345',\n        '456=567'\n      ]\n      const actual = inputs.map(input => __internals__.extractQueryKeyValuePairFromParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryKeyValuePairFromParameterOrReference', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryKeyValuePairFromParameter').andReturn(123)\n      spyOn(__internals__, 'extractQueryKeyValuePairFromReference').andReturn(234)\n\n      const inputs = [\n        [ new Api(), new Parameter() ],\n        [ new Api(), new Reference() ]\n      ]\n      const expected = [\n        123,\n        234\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractQueryKeyValuePairFromParameterOrReference(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryStringFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractQueryKeyValuePairFromParameterOrReference').andCall((a, p) => {\n        return p % 2 ? p : null\n      })\n\n      const inputs = [\n        [ new Api(), new Request() ],\n        [ new Api(), new Request({\n          parameters: new ParameterContainer({\n            queries: OrderedMap({\n              a: 123,\n              b: 234,\n              c: 345\n            })\n          })\n        }) ],\n        [ new Api(), new Request({\n          parameters: new ParameterContainer({\n            queries: OrderedMap({\n              b: 234\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        '', '?123&345', ''\n      ]\n      const actual = inputs.map(input => __internals__.extractQueryStringFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@combineUrlComponents', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'http://echo.paw.cloud', '/example', '?some=query&string' ],\n        [ 'http://echo.paw.cloud/', '/example', '?some=query&string' ]\n      ]\n      const expected = [\n        { key: 'url', value: 'http://echo.paw.cloud/example?some=query&string' },\n        { key: 'url', value: 'http://echo.paw.cloud/example?some=query&string' }\n      ]\n      const actual = inputs.map(\n        input => __internals__.combineUrlComponents(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBaseUrlFromEndpoint', () => {\n    it('should work', () => {\n      const inputs = [\n        'someEndpoint',\n        new URL({ url: 'https://example.com' }),\n        new URL({ url: 'https://example.com/{version}', variableDelimiters: List([ '{', '}' ]) })\n      ]\n      const expected = [\n        'someEndpoint',\n        'https://example.com/',\n        'https://example.com/{{version}}'\n      ]\n      const actual = inputs.map(input => __internals__.extractBaseUrlFromEndpoint(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractPathFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource(),\n        new Resource({\n          path: new URL({ url: '/songs/{songId}', variableDelimiters: List([ '{', '}' ]) })\n        })\n      ]\n      const expected = [\n        '/',\n        '/songs/:songId'\n      ]\n      const actual = inputs.map(input => __internals__.extractPathFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestUrl', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getEndpointOrReferenceFromResourceAndRequest').andCall((res, req) => {\n        const value = (req || res) + 1\n        return value === 1 ? null : value\n      })\n      spyOn(__internals__, 'getEndpointFromReference').andCall((a, e) => {\n        return e.get('uuid')\n      })\n\n      spyOn(__internals__, 'extractBaseUrlFromEndpoint').andCall(e => e * 2)\n      spyOn(__internals__, 'extractPathFromResource').andCall(r => (r || 100) * 3)\n      spyOn(__internals__, 'extractQueryStringFromRequest').andCall((a, r) => {\n        return (a || 0) + (r || 0)\n      })\n\n      spyOn(__internals__, 'combineUrlComponents').andCall((b, p, q) => {\n        return p + q - b\n      })\n\n      const inputs = [\n        // [ new Api(), new Resource(), new Request() ],\n        [ null, 234, 345 ],\n        [ 123, null, 345 ],\n        [ 123, 234, null ],\n        [ 123, null, null ]\n      ]\n      const expected = [\n        355, 76, 355, null\n      ]\n      const actual = inputs.map(input => __internals__.createRequestUrl(...input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      spyOn(__internals__, 'getEndpointOrReferenceFromResourceAndRequest').andCall((res, req) => {\n        const value = (req || res) + 1\n        return value === 1 ? null : new Reference({ uuid: value })\n      })\n      spyOn(__internals__, 'getEndpointFromReference').andCall((a, e) => {\n        return e.get('uuid')\n      })\n\n      spyOn(__internals__, 'extractBaseUrlFromEndpoint').andCall(e => e * 2)\n      spyOn(__internals__, 'extractPathFromResource').andCall(r => (r || 100) * 3)\n      spyOn(__internals__, 'extractQueryStringFromRequest').andCall((a, r) => {\n        return (a || 0) + (r || 0)\n      })\n\n      spyOn(__internals__, 'combineUrlComponents').andCall((b, p, q) => {\n        return p + q - b\n      })\n\n      const inputs = [\n        // [ new Api(), new Resource(), new Request() ],\n        [ null, 234, 345 ],\n        [ 123, null, 345 ],\n        [ 123, 234, null ],\n        [ 123, null, null ]\n      ]\n      const expected = [\n        355, 76, 355, null\n      ]\n      const actual = inputs.map(input => __internals__.createRequestUrl(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromAWSSig4Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.AWSSig4(),\n        new Auth.AWSSig4({\n          key: 123,\n          secret: 234,\n          region: 345,\n          service: 456\n        })\n      ]\n      const expected = [\n        { type: 'awsv4' },\n        { type: 'awsv4', awsv4: { accessKey: 123, secretKey: 234, region: 345, service: 456 } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromAWSSig4Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromBasicAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Basic(),\n        new Auth.Basic({\n          username: 123,\n          password: 234\n        })\n      ]\n      const expected = [\n        { type: 'basic' },\n        { type: 'basic', basic: { username: 123, password: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromBasicAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromDigestAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Digest(),\n        new Auth.Digest({\n          username: 123,\n          password: 234\n        })\n      ]\n      const expected = [\n        { type: 'digest' },\n        { type: 'digest', digest: { username: 123, password: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromDigestAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromHawkAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Hawk(),\n        new Auth.Hawk({\n          id: 123,\n          key: 234,\n          algorithm: 345\n        })\n      ]\n      const expected = [\n        { type: 'hawk' },\n        { type: 'hawk', hawk: { authId: 123, authKey: 234, algorithm: 345 } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromHawkAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromOAuth1Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.OAuth1(),\n        new Auth.OAuth1({\n          consumerSecret: 123,\n          consumerKey: 234,\n          token: 345,\n          tokenSecret: 456,\n          algorithm: 567,\n          nonce: 678,\n          version: 789\n        })\n      ]\n      const expected = [\n        { type: 'oauth1' },\n        { type: 'oauth1', oauth1: {\n          consumerSecret: 123,\n          consumerKey: 234,\n          token: 345,\n          tokenSecret: 456,\n          signatureMethod: 567,\n          nonce: 678,\n          version: 789\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromOAuth1Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromOAuth2Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.OAuth2(),\n        new Auth.OAuth2({\n          authorizationUrl: 123,\n          tokenUrl: 234,\n          scopes: List([ { key: 345 }, { key: 456 } ])\n        })\n      ]\n      const expected = [\n        { type: 'oauth2' },\n        { type: 'oauth2', oauth2: { authUrl: 123, accessTokenUrl: 234, scope: '345 456' } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuthFromOAuth2Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuthFromAuth', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createRequestAuthFromAWSSig4Auth').andReturn(123)\n      spyOn(__internals__, 'createRequestAuthFromBasicAuth').andReturn(234)\n      spyOn(__internals__, 'createRequestAuthFromDigestAuth').andReturn(345)\n      spyOn(__internals__, 'createRequestAuthFromHawkAuth').andReturn(456)\n      spyOn(__internals__, 'createRequestAuthFromOAuth1Auth').andReturn(567)\n      spyOn(__internals__, 'createRequestAuthFromOAuth2Auth').andReturn(678)\n\n      const inputs = [\n        new Auth.AWSSig4(),\n        new Auth.Basic(),\n        new Auth.Digest(),\n        new Auth.Hawk(),\n        new Auth.OAuth1(),\n        new Auth.OAuth2(),\n        new Auth.Custom()\n      ]\n\n      const expected = [\n        { key: 'auth', value: 123 },\n        { key: 'auth', value: 234 },\n        { key: 'auth', value: 345 },\n        { key: 'auth', value: 456 },\n        { key: 'auth', value: 567 },\n        { key: 'auth', value: 678 },\n        null\n      ]\n\n      const actual = inputs.map(input => __internals__.createRequestAuthFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestAuth', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createRequestAuthFromAuth').andCall(v => {\n        return v\n      })\n      const inputs = [\n        [ new Api(), new Request() ],\n        [ new Api(), new Request({\n          auths: List([ null ])\n        }) ],\n        [ new Api(), new Request({\n          auths: List([ new Reference({ uuid: 'auth' }) ])\n        }) ],\n        [\n          new Api({\n            store: new Store({\n              auth: OrderedMap({\n                auth: 123\n              })\n            })\n          }),\n          new Request({\n            auths: List([ new Reference({ uuid: 'auth' }) ])\n          })\n        ]\n      ]\n\n      const expected = [\n        null,\n        { key: 'auth', value: { type: 'noauth', noauth: {} } },\n        null,\n        123\n      ]\n      const actual = inputs.map(input => __internals__.createRequestAuth(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createMethod', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({\n          method: 'get'\n        })\n      ]\n      const expected = [\n        null,\n        { key: 'method', value: 'GET' }\n      ]\n      const actual = inputs.map(input => __internals__.createMethod(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeaderFromReference', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Api(), new Reference() ],\n        [ new Api(), new Reference({ uuid: 'abc' }) ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              abc: new Parameter({\n                key: 123\n              })\n            })\n          })\n        }), new Reference({ uuid: 'abc' }) ]\n      ]\n      const expected = [\n        null, null, { key: 123, value: '{{abc}}' }\n      ]\n      const actual = inputs.map(input => __internals__.createHeaderFromReference(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeaderFromParameter', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter(),\n        new Parameter({ key: 123 }),\n        new Parameter({\n          key: 234,\n          constraints: List([ new Constraint.JSONSchema({ default: 'abc' }) ])\n        }),\n        new Parameter({\n          key: 345,\n          constraints: List([ new Constraint.JSONSchema({ enum: [ 'def', 'ghi' ] }) ])\n        })\n      ]\n      const expected = [\n        null,\n        { key: 123, value: null },\n        { key: 234, value: 'abc' },\n        { key: 345, value: 'def' }\n      ]\n      const actual = inputs.map(input => __internals__.createHeaderFromParameter(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeaderFromParameterOrReference', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createHeaderFromReference').andReturn('ref')\n      spyOn(__internals__, 'createHeaderFromParameter').andReturn('param')\n\n      const inputs = [\n        [ new Api(), null ],\n        [ new Api(), new Reference() ],\n        [ new Api(), new Parameter() ],\n        [ new Api(), new Parameter({ key: 123 }) ]\n      ]\n      const expected = [\n        null,\n        'ref',\n        null,\n        'param'\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.createHeaderFromParameterOrReference(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createHeader', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createHeaderFromParameterOrReference').andCall((a, h) => {\n        return h % 2 ? null : a + h\n      })\n\n      const inputs = [\n        [ 123, new Request() ],\n        [ 123, new Request({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              abc: 234,\n              def: 345\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        null,\n        { key: 'header', value: [ 234 + 123 ] }\n      ]\n      const actual = inputs.map(input => __internals__.createHeader(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeParamsFromHeaders', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Api(), new Request() ],\n        [ new Api(), new Request({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              abc: new Parameter({\n                key: 'Accept'\n              }),\n              def: new Parameter({\n                key: 'Content-Type'\n              })\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        List(),\n        List([ new Parameter({ key: 'Content-Type' }) ])\n      ]\n      const actual = inputs.map(input => __internals__.getContentTypeParamsFromHeaders(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeParamsFromContext', () => {\n    it('should work', () => {\n      const inputs = [\n        new Context(),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Accept',\n              in: 'headers',\n              usedIn: 'request'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              in: 'headers',\n              usedIn: 'request'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              in: 'body',\n              usedIn: 'request'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              in: 'headers',\n              usedIn: 'response'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              in: 'headers',\n              usedIn: 'request',\n              value: 123\n            }),\n            new Parameter({\n              key: 'Accept',\n              in: 'headers',\n              usedIn: 'request'\n            }),\n            new Parameter({\n              key: 'Content-Type',\n              in: 'headers',\n              usedIn: 'request',\n              value: 234\n            })\n          ])\n        })\n      ]\n      const expected = [\n        List(),\n        List(),\n        List([\n          new Parameter({\n            key: 'Content-Type',\n            in: 'headers',\n            usedIn: 'request'\n          })\n        ]),\n        List(),\n        List(),\n        List([\n          new Parameter({\n            key: 'Content-Type',\n            in: 'headers',\n            usedIn: 'request',\n            value: 123\n          }),\n          new Parameter({\n            key: 'Content-Type',\n            in: 'headers',\n            usedIn: 'request',\n            value: 234\n          })\n        ])\n      ]\n      const actual = inputs.map(input => __internals__.getContentTypeParamsFromContext(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeParamsFromRequestOrContext', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getContentTypeParamsFromHeaders').andCall((a, r) => a + r)\n      spyOn(__internals__, 'getContentTypeParamsFromContext').andCall(c => c * 2)\n\n      const inputs = [\n        [ 123, 234, null ],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        123 + 234,\n        345 * 2\n      ]\n      const actual = inputs.map(\n        input => __internals__.getContentTypeParamsFromRequestOrContext(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyModeFromSchemaDefault', () => {\n    it('should work', () => {\n      const inputs = [\n        { default: 'application/json' },\n        { default: 'application/x-www-form-urlencoded' },\n        { default: 'application/x-www-form-urlencoded; charset=utf-8' },\n        { default: 'multipart/form-data' },\n        { default: 'multipart/form-data; boundary=__**__' }\n      ]\n      const expected = [\n        'raw',\n        'urlencoded',\n        'urlencoded',\n        'formdata',\n        'formdata'\n      ]\n      const actual = inputs.map(input => __internals__.createBodyModeFromSchemaDefault(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyModeFromSchemaEnum', () => {\n    it('should work', () => {\n      const inputs = [\n        { enum: [ 'application/json' ] },\n        { enum: [ 'application/json', 'application/xml' ] },\n        { enum: [ 'application/x-www-form-urlencoded' ] },\n        { enum: [ 'application/x-www-form-urlencoded', 'application/text' ] },\n        { enum: [ 'application/text', 'application/x-www-form-urlencoded' ] },\n        { enum: [ 'application/x-www-form-urlencoded; charset=utf-8' ] },\n        { enum: [ 'multipart/form-data' ] },\n        { enum: [ 'multipart/form-data', 'application/text' ] },\n        { enum: [ 'application/text', 'multipart/form-data' ] },\n        { enum: [ 'multipart/form-data; boundary=__**__' ] },\n        { enum: [ 'application/x-www-form-urlencoded', 'multipart/form-data' ] }\n      ]\n      const expected = [\n        'raw',\n        'raw',\n        'urlencoded',\n        'urlencoded',\n        'urlencoded',\n        'urlencoded',\n        'formdata',\n        'formdata',\n        'formdata',\n        'formdata',\n        'urlencoded'\n      ]\n      const actual = inputs.map(input => __internals__.createBodyModeFromSchemaEnum(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyModeFromContentTypeParams', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createBodyModeFromSchemaDefault').andCall(({ default: d }) => d)\n      spyOn(__internals__, 'createBodyModeFromSchemaEnum').andCall(({ enum: e }) => e[0])\n\n      const inputs = [\n        List(),\n        List([ new Parameter(), new Parameter() ]),\n        List([ new Parameter() ]),\n        List([ new Parameter({\n          default: 123\n        }) ]),\n        List([ new Parameter({\n          constraints: List([ new Constraint.Enum([ 234 ]) ])\n        }) ])\n      ]\n      const expected = [\n        'raw',\n        'raw',\n        'raw',\n        123,\n        234\n      ]\n      const actual = inputs.map(input => __internals__.createBodyModeFromContentTypeParams(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyMode', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getContentTypeParamsFromRequestOrContext').andCall((a, r, c) => {\n        return a + r + c\n      })\n      spyOn(__internals__, 'createBodyModeFromContentTypeParams').andCall(ct => ct * 2)\n\n      const inputs = [\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        (123 + 234 + 345) * 2\n      ]\n      const actual = inputs.map(input => __internals__.createBodyMode(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBodyParametersIntoRawParameters', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({\n          abc: new Parameter({\n            key: 123\n          }),\n          def: new Parameter({\n            constraints: List([ new Constraint.JSONSchema({ type: 'string', default: 'def' }) ])\n          })\n        })\n      ]\n      const expected = [\n        '',\n        '{{123}}\\n' + JSON.stringify({ type: 'string', default: 'def' }, null, 2)\n      ]\n      const actual = inputs.map(\n        input => __internals__.convertBodyParametersIntoRawParameters(input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyFromRawMode', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertBodyParametersIntoRawParameters').andReturn(123)\n\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({\n          abc: 123\n        })\n      ]\n      const expected = [\n        null,\n        { key: 'raw', value: 123 }\n      ]\n\n      const actual = inputs.map(input => __internals__.createBodyFromRawMode(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyFromUrlEncodedMode', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({\n          abc: new Parameter({\n            key: 123,\n            default: 234\n          }),\n          def: new Parameter({\n            key: 345\n          })\n        })\n      ]\n      const expected = [\n        { key: 'urlencoded', value: [] },\n        { key: 'urlencoded', value: [\n          { key: 123, value: 234, enabled: true },\n          { key: 345, value: '{{345}}', enabled: true }\n        ] }\n      ]\n      const actual = inputs.map(input => __internals__.createBodyFromUrlEncodedMode(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyFromFormDataMode', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap(),\n        OrderedMap({\n          abc: new Parameter({\n            key: 123,\n            default: 234\n          }),\n          def: new Parameter({\n            key: 345\n          })\n        })\n      ]\n      const expected = [\n        { key: 'formdata', value: [] },\n        { key: 'formdata', value: [\n          { key: 123, value: 234, enabled: true },\n          { key: 345, value: '{{345}}', enabled: true }\n        ] }\n      ]\n      const actual = inputs.map(input => __internals__.createBodyFromFormDataMode(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBodyFromMode', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createBodyFromRawMode').andCall(p => p * 2)\n      spyOn(__internals__, 'createBodyFromUrlEncodedMode').andCall(p => p * 3)\n      spyOn(__internals__, 'createBodyFromFormDataMode').andCall(p => p * 4)\n\n      const inputs = [\n        [ 123, 'raw' ],\n        [ 123, 'urlencoded' ],\n        [ 123, 'formdata' ],\n        [ 123, 'weird' ]\n      ]\n      const expected = [\n        123 * 2,\n        123 * 3,\n        123 * 4,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.createBodyFromMode(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getBodyParamsFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Api(), new Request(), null ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              abc: new Parameter({\n                key: 'userId',\n                default: '123'\n              })\n            })\n          })\n        }), new Request({\n          parameters: new ParameterContainer({\n            body: OrderedMap({\n              abc: new Reference({\n                type: 'parameter',\n                uuid: 'abc'\n              })\n            })\n          })\n        }), null ],\n        [ new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              abc: new Parameter({\n                key: 'userId',\n                default: '123'\n              }),\n              jkl: new Parameter({\n                key: 'productId',\n                default: '123',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([\n                      new Constraint.Enum([\n                        'application/xml'\n                      ])\n                    ])\n                  })\n                ])\n              })\n            })\n          })\n        }), new Request({\n          parameters: new ParameterContainer({\n            body: OrderedMap({\n              abc: new Reference({\n                type: 'parameter',\n                uuid: 'abc'\n              }),\n              def: new Parameter({\n                key: 'queryType',\n                default: 'serialized',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([\n                      'application/xml'\n                    ]) ])\n                  })\n                ])\n              }),\n              ghi: new Parameter({\n                key: 'limit',\n                default: '100',\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([\n                      'application/json'\n                    ]) ])\n                  })\n                ])\n              }),\n              jkl: new Reference({\n                type: 'parameter',\n                uuid: 'jkl'\n              })\n            })\n          })\n        }), new Context({\n          constraints: List([ new Parameter({\n            key: 'Content-Type',\n            default: 'application/json'\n          }) ])\n        }) ]\n      ]\n      const expected = [\n        OrderedMap(),\n        OrderedMap({\n          abc: new Parameter({\n            key: 'userId',\n            default: '123'\n          })\n        }),\n        OrderedMap({\n          abc: new Parameter({\n            key: 'userId',\n            default: '123'\n          }),\n          ghi: new Parameter({\n            key: 'limit',\n            default: '100',\n            applicableContexts: List([\n              new Parameter({\n                key: 'Content-Type',\n                constraints: List([ new Constraint.Enum([\n                  'application/json'\n                ]) ])\n              })\n            ])\n          })\n        })\n      ]\n      const actual = inputs.map(input => __internals__.getBodyParamsFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createBody', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getBodyParamsFromRequest').andCall((a, r, c) => {\n        return a + (c || 0)\n      })\n      spyOn(__internals__, 'createBodyMode').andCall((a, r, c) => {\n        return c ? c : a\n      })\n      spyOn(__internals__, 'createBodyFromMode').andCall((b, m) => {\n        return { key: b, value: m }\n      })\n\n      const inputs = [\n        [ 123, new Request() ],\n        [ 123, new Request({\n          contexts: List([ 234 ])\n        }) ]\n      ]\n      const expected = [\n        { key: 'body', value: { '123': 123, mode: 123 } },\n        { key: 'body', value: { [123 + 234 + '']: 234, mode: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.createBody(...input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no body', () => {\n      spyOn(__internals__, 'getBodyParamsFromRequest').andCall((a, r, c) => {\n        return a + (c || 0)\n      })\n      spyOn(__internals__, 'createBodyMode').andCall((a, r, c) => {\n        return c ? c : a\n      })\n      spyOn(__internals__, 'createBodyFromMode').andCall(() => {\n        return null\n      })\n\n      const inputs = [\n        [ 123, new Request() ],\n        [ 123, new Request({\n          contexts: List([ 234 ])\n        }) ]\n      ]\n      const expected = [\n        null,\n        null\n      ]\n      const actual = inputs.map(input => __internals__.createBody(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRequestFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createRequestUrl').andCall((a, res, req) => {\n        return !a ? null : { key: 'url', value: a + res + (req || 0) }\n      })\n\n      spyOn(__internals__, 'createRequestAuth').andCall((a, r) => {\n        if (!a) {\n          return null\n        }\n        return r ? { key: 'auth', value: a + r } : null\n      })\n\n      spyOn(__internals__, 'createMethod').andCall(r => {\n        return r ? { key: 'method', value: r * 2 } : null\n      })\n\n      spyOn(__internals__, 'createHeader').andCall((a, r) => {\n        if (!a) {\n          return null\n        }\n        return r ? { key: 'header', value: r * 3 } : { key: 'header', value: a * 3 }\n      })\n\n      spyOn(__internals__, 'createBody').andCall((a, r) => {\n        if (!a) {\n          return null\n        }\n        return r ? { key: 'body', value: r * 4 } : { key: 'body', value: a * 4 }\n      })\n\n      const inputs = [\n        [ null, null, null ],\n        [ 123, 234, null ],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        null,\n        { key: 'request', value: { url: 123 + 234, header: 123 * 3, body: 123 * 4 } },\n        { key: 'request', value: {\n          url: 123 + 234 + 345,\n          auth: 123 + 345,\n          method: 345 * 2,\n          header: 345 * 3,\n          body: 345 * 4\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.createRequestFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemName').andCall(r => {\n        return r ? { key: 'name', value: r * 2 } : null\n      })\n\n      spyOn(__internals__, 'createItemDescription').andCall(r => {\n        return r ? { key: 'description', value: r * 3 } : null\n      })\n\n      spyOn(__internals__, 'createRequestFromRequest').andCall((a, res, req) => {\n        if (!a) {\n          return null\n        }\n        return { key: 'request', value: a + res + (req || 0) }\n      })\n\n      const inputs = [\n        [ null, null, null ],\n        [ 123, 234, null ],\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        {},\n        { request: 123 + 234 },\n        { name: 345 * 2, description: 345 * 3, request: 123 + 234 + 345 }\n      ]\n      const actual = inputs.map(input => __internals__.createItemFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemsFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemFromRequest').andCall((a, res, req) => {\n        return a + req\n      })\n      const inputs = [\n        [ 123, new Resource() ],\n        [ 123, new Resource({\n          methods: OrderedMap({\n            abc: 234,\n            def: 345\n          })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [ 123 + 234, 123 + 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.createItemsFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemNameFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource({\n          name: 123\n        }),\n        new Resource({\n          description: 234\n        }),\n        new Resource({\n          path: new URL({\n            url: '/some/path/{pathId}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        })\n      ]\n      const expected = [\n        { key: 'name', value: 123 },\n        { key: 'name', value: 234 },\n        { key: 'name', value: '/some/path/:pathId' }\n      ]\n      const actual = inputs.map(input => __internals__.createItemNameFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemGroupFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemsFromResource').andCall((a, r) => r)\n\n      spyOn(__internals__, 'createItemNameFromResource').andCall(r => {\n        return r === 345 ? { key: 'name', value: r * 2 } : null\n      })\n\n      spyOn(__internals__, 'createItemDescription').andCall(r => {\n        return r === 345 ? { key: 'description', value: r * 3 } : null\n      })\n\n      const inputs = [\n        [ new Api(), 'abc' ],\n        [ new Api({\n          resources: OrderedMap({\n            abc: 123\n          })\n        }), 'abc' ],\n        [ new Api({\n          resources: OrderedMap({\n            abc: 234\n          })\n        }), 'abc' ],\n        [ new Api({\n          resources: OrderedMap({\n            abc: 345\n          })\n        }), 'abc' ]\n      ]\n      const expected = [\n        null,\n        { item: 123 },\n        { item: 234 },\n        { item: 345, name: 345 * 2, description: 345 * 3 }\n      ]\n      const actual = inputs.map(input => __internals__.createItemGroupFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemGroupFromGroupOrResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemGroup').andCall(a => a + 234)\n      spyOn(__internals__, 'createItemGroupFromResource').andCall(a => a + 345)\n\n      const inputs = [\n        [ 123, null ],\n        [ 123, new Group() ],\n        [ 123, 'someId' ]\n      ]\n      const expected = [\n        123 + 345,\n        123 + 234,\n        123 + 345\n      ]\n      const actual = inputs.map(input => __internals__.createItemGroupFromGroupOrResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemProp', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemGroupFromGroupOrResource')\n        .andCall((a, v) => v % 2 ? a + v : null)\n      const inputs = [\n        [ 123, new Group() ],\n        [ 123, new Group({\n          children: OrderedMap({ a: 123, b: 234, c: 345 })\n        }) ]\n      ]\n      const expected = [\n        { key: 'item', value: [] },\n        { key: 'item', value: [ 123 + 123, 123 + 345 ] }\n      ]\n      const actual = inputs.map(input => __internals__.createItemProp(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createItemGroup', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemName').andCall(v => ({ key: 'name', value: v }))\n      spyOn(__internals__, 'createItemDescription')\n        .andCall(v => ({ key: 'description', value: v * 2 }))\n      spyOn(__internals__, 'createItemProp').andCall((a, v) => ({ key: 'item', value: [ a + v ] }))\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        { name: 234, description: 234 * 2, item: [ 123 + 234 ] }\n      ]\n      const actual = inputs.map(input => __internals__.createItemGroup(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mergeItemGroupsWithSameName', () => {\n    it('should work', () => {\n      const inputs = [\n        [ OrderedMap(), { name: 'abc', item: [ 123 ] } ],\n        [ OrderedMap({ abc: { name: 'abc' } }), { name: 'abc' } ],\n        [ OrderedMap({ abc: { name: 'abc', item: [ 123 ] } }), { name: 'abc', item: [ 234 ] } ],\n        [ OrderedMap({ abc: { name: 'abc', item: [ 123 ] } }), { name: 'def', item: [ 234 ] } ]\n      ]\n      const expected = [\n        OrderedMap({\n          abc: {\n            name: 'abc',\n            item: [ 123 ]\n          }\n        }),\n        OrderedMap({\n          abc: {\n            name: 'abc',\n            item: []\n          }\n        }),\n        OrderedMap({\n          abc: {\n            name: 'abc',\n            item: [ 123, 234 ]\n          }\n        }),\n        OrderedMap({\n          abc: {\n            name: 'abc',\n            item: [ 123 ]\n          },\n          def: {\n            name: 'def',\n            item: [ 234 ]\n          }\n        })\n      ]\n      const actual = inputs.map(input => __internals__.mergeItemGroupsWithSameName(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRootItem', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createItemGroupFromResource').andCall((a, id) => {\n        if (id === 'a') {\n          return null\n        }\n\n        return { c: id }\n      })\n\n      spyOn(__internals__, 'mergeItemGroupsWithSameName').andCall((acc, { c }) => {\n        return acc.set('c', [].concat(acc.get('c', []), c))\n      })\n\n      const inputs = [\n        new Api(),\n        new Api({\n          group: new Group(),\n          resources: OrderedMap()\n        }),\n        new Api({\n          group: new Group(),\n          resources: OrderedMap({\n            a: 123,\n            b: 234,\n            c: 345\n          })\n        })\n      ]\n      const expected = [\n        { key: 'item', value: [] },\n        { key: 'item', value: [] },\n        { key: 'item', value: [ [ 'b', 'c' ] ] }\n      ]\n      const actual = inputs.map(input => __internals__.createRootItem(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterIntoVariable', () => {\n    it('should work', () => {\n      const inputs = [\n        [ new Parameter(), null ],\n        [ new Parameter(), 123 ],\n        [ new Parameter({\n          key: 'Content-Type',\n          default: 'application/json',\n          type: 'string'\n        }), 123 ]\n      ]\n      const expected = [\n        null,\n        { id: 123 },\n        { id: 123, value: 'application/json', type: 'string', name: 'Content-Type' }\n      ]\n      const actual = inputs.map(input => __internals__.convertParameterIntoVariable(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createVariable', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoVariable').andCall(v => v % 2 ? v * 2 : null)\n\n      const inputs = [\n        new Api(),\n        new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              a: 234,\n              b: 456,\n              c: 678\n            })\n          })\n        }),\n        new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              a: 123,\n              b: 234,\n              c: 345\n            })\n          })\n        })\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'variable', value: [ 123 * 2, 345 * 2 ] }\n      ]\n      const actual = inputs.map(input => __internals__.createVariable(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createPostmanCollection', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createInfo').andCall(a => a ? { key: 'info', value: a * 2 } : null)\n      spyOn(__internals__, 'createRootItem').andCall(a => a ? { key: 'item', value: a * 3 } : null)\n      spyOn(__internals__, 'createVariable').andCall(a => {\n        return a ? { key: 'variable', value: a * 4 } : null\n      })\n\n      const inputs = [\n        null,\n        123\n      ]\n      const expected = [\n        {},\n        { info: 123 * 2, item: 123 * 3, variable: 123 * 4 }\n      ]\n      const actual = inputs.map(input => __internals__.createPostmanCollection(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@serialize', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createPostmanCollection').andReturn({\n        serialized: 123\n      })\n\n      const inputs = [\n        { api: 123 }\n      ]\n      const expected = [\n        JSON.stringify({ serialized: 123 }, null, 2)\n      ]\n\n      const actual = inputs.map(input => __internals__.serialize(input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should throw if postmanCollection has circular reference', () => {\n      const a = { c: 123 }\n      const b = { a }\n      a.b = b\n      spyOn(__internals__, 'createPostmanCollection').andReturn(a)\n\n      const input = { api: 123 }\n      expect(() => __internals__.serialize(input)).toThrow()\n    })\n  })\n})\n"
  },
  {
    "path": "src/serializers/raml/v1.0/Serializer.js",
    "content": "import { List, OrderedMap } from 'immutable'\nimport yaml from 'js-yaml'\n\nimport { currify, flatten, entries, convertEntryListInMap } from '../../../utils/fp-utils'\nimport Auth from '../../../models/Auth'\nimport Reference from '../../../models/Reference'\nimport URL from '../../../models/URL'\n\nconst __meta__ = {\n  format: 'raml',\n  version: 'v1.0'\n}\n\nconst methods = {}\n\n// TODO move this to a better place\nmethods.getKeysFromRecord = (keyMap, record) => {\n  return entries(keyMap)\n    .map(({ key, value }) => ({ key, value: record.get(value) }))\n    .filter(({ value }) => !!value)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * A Serializer to convert Api Records into RAML v1.0.\n */\nexport class RAMLSerializer {\n  static __meta__ = __meta__\n\n  /**\n   * serializes an Api into a RAML v1.0 formatted string\n   * @param {Api} api: the api to convert\n   * @returns {string} the corresponding postman collection, as a string\n   */\n  static serialize(api) {\n    return methods.serialize(api)\n  }\n\n  /**\n   * returns a quality score for a content string wrt. to the RAML v1.0 format.\n   * @param {String} content: the content of the file to analyze\n   * @returns {number} the quality of the content\n   */\n  static validate(content) {\n    return methods.validate(content)\n  }\n}\n\nmethods.validate = () => {\n  return true\n}\n\n/**\n * extracts refs from an object field, given a key name. (used iteratively over all keys of an obj)\n * @param {Object} schema: the schema to extract the refs from.\n * @param {string} key: the key to test if it is a reference\n * @returns {Array<string>} the corresponding array of references\n */\nmethods.extractRefsFromObject = (schema, key) => {\n  if (key === '$ref') {\n    return [ schema[key] ]\n  }\n\n  return methods.getRefsFromSchema(schema[key])\n}\n\n/**\n * tests whether a schema object is array (or iterable)\n * @param {Object} schema: the schema to test whether it is an array or not\n * @returns {boolean} true if it is an array, false otherwise\n */\nmethods.isArray = (schema) => {\n  return Array.isArray(schema) || (\n    typeof schema !== 'string' && typeof schema[Symbol.iterator] === 'function'\n  )\n}\n\n/**\n * iterates over an array to extract refs from items.\n * @param {Array<*>} schema: the schema (array) to extract the references from\n * @returns {Array<string>} the corresponding references\n */\nmethods.getRefsFromArray = (schema) => {\n  return schema\n    .map(methods.getRefsFromSchema)\n    .reduce(flatten, [])\n}\n\n/**\n * extract refs from an object by iterating over every key\n * @param {Object} schema: the schema to extract refs from\n * @returns {Array<string>} the corresponding array of references\n */\nmethods.getRefsFromObject = (schema) => {\n  const keys = Object.keys(schema)\n  return keys\n    .map(currify(methods.extractRefsFromObject, schema))\n    .reduce(flatten, [])\n}\n\n/**\n * tests whether a schema is an object or not. (considers null as not an object)\n * @param {Object} schema: the schema to test the type of\n * @returns {boolean} true if it is null or not an object, false otherwise\n */\nmethods.isNonObjectType = (schema) => {\n  return !schema || typeof schema !== 'object'\n}\n\n/**\n * returns the references associated with non object types.\n * @returns {Array<string>} the corresponding array of references\n */\nmethods.getRefsFromNonObjectTypes = () => []\n\n/**\n * extracts the references from a schema.\n * @param {any} schema: the schema to extract references from. It can actually by a subset of a\n * schema. Hence the `any` type.\n * @returns {Array<string>} the corresponding array of references\n */\nmethods.getRefsFromSchema = (schema) => {\n  if (methods.isNonObjectType(schema)) {\n    return methods.getRefsFromNonObjectTypes(schema)\n  }\n\n  if (methods.isArray(schema)) {\n    return methods.getRefsFromArray(schema)\n  }\n\n  return methods.getRefsFromObject(schema)\n}\n\n/**\n * (recursively) tests whether a schema is convertible to a dataType, without checking the validity\n * of its references.\n * @param {any} schema: the schema to test the convertibilty of.\n * @returns {boolean} whether the schema itself is convertible or not\n */\nmethods.isConvertible = (schema) => {\n  if (methods.isNonObjectType(schema)) {\n    return true\n  }\n\n  if (methods.isArray(schema)) {\n    return schema\n      .map(methods.isConvertible)\n      .reduce((acc, bool) => acc && bool, true)\n  }\n\n  const keys = Object.keys(schema)\n  const isValid = keys.map(key => {\n    return [\n      'exclusiveMaximum',\n      'exclusiveMinimum',\n      'additionalItems',\n      'patternProperties',\n      'dependencies',\n      'oneOf',\n      'not'\n    ].indexOf(key) < 0\n  }).reduce((acc, bool) => acc && bool, true)\n\n  if (!isValid) {\n    return false\n  }\n\n  return keys.map(key => {\n    return methods.isConvertible(schema[key])\n  }).reduce((acc, bool) => acc && bool, true)\n}\n\n/**\n * infers wether an schema is of type object or not.\n * @param {Object} schema: the schema to infer the type of\n * @returns {boolean} whether it is a schema describing an object or not\n */\nmethods.isObjectType = (schema) => {\n  return typeof schema.properties !== 'undefined' ||\n    typeof schema.minProperties !== 'undefined' ||\n    typeof schema.maxProperties !== 'undefined' ||\n    typeof schema.discriminator !== 'undefined' ||\n    typeof schema.discriminatorValue !== 'undefined'\n}\n\n/**\n * infers wether an schema is of type array or not.\n * @param {Object} schema: the schema to infer the type of\n * @returns {boolean} whether it is a schema describing an array or not\n */\nmethods.isArrayType = (schema) => {\n  return typeof schema.items !== 'undefined' ||\n    typeof schema.uniqueItems !== 'undefined' ||\n    typeof schema.minItems !== 'undefined' ||\n    typeof schema.maxItems !== 'undefined'\n}\n\n/**\n * infers wether an schema is of type string or not.\n * @param {Object} schema: the schema to infer the type of\n * @returns {boolean} whether it is a schema describing a string or not\n */\nmethods.isStringType = (schema) => {\n  return typeof schema.pattern !== 'undefined' ||\n    typeof schema.maxLength !== 'undefined' ||\n    typeof schema.minLength !== 'undefined'\n}\n\n/**\n * infers wether an schema is of type number or not.\n * @param {Object} schema: the schema to infer the type of\n * @returns {boolean} whether it is a schema describing a number or not\n */\nmethods.isNumberType = (schema) => {\n  return typeof schema.minimum !== 'undefined' ||\n    typeof schema.maximum !== 'undefined' ||\n    typeof schema.multipleOf !== 'undefined'\n}\n\n/* eslint-disable max-statements */\n/**\n * extracts the RAML Basic type from a schema, infering it if necessary\n * @param {Object} schema: the schema to extract the type of\n * @returns {string} the corresponding RAML basic type\n */\nmethods.getType = (schema) => {\n  if (schema.type && schema.type !== 'null') {\n    return schema.type\n  }\n\n  if (schema.type === 'null') {\n    return 'nil'\n  }\n\n  if (methods.isObjectType(schema)) {\n    return 'object'\n  }\n\n  if (methods.isArrayType(schema)) {\n    return 'array'\n  }\n\n  if (methods.isStringType(schema)) {\n    return 'string'\n  }\n\n  if (methods.isNumberType(schema)) {\n    return 'number'\n  }\n\n  return 'any'\n}\n/* eslint-enable max-statements */\n\n/**\n * converts the items array of schemas of an array-typed schema into an array of DataTypes\n * @param {Array<Object>} items: the schemas that the items can respect in the array-typed schema\n * @returns {Array<string>} the corresponding array of DataTypes\n */\nmethods.convertSchemaItemsArrayIntoTypes = (items) => {\n  return items\n    .map(methods.getTypes)\n    .reduce(flatten, [])\n    .map(type => '(' + type + ')[]')\n}\n\n/**\n * converts the items schema of an array-typed schema into an array of DataTypes\n * @param {Object} items: the schema that the items must respect in the array-typed schema\n * @returns {Array<string>} the corresponding array of DataTypes\n */\nmethods.convertSchemaItemsObjectIntoTypes = (items) => {\n  return methods.getTypes(items).map(type => {\n    if (type.match(/\\|/)) {\n      return '(' + type + ')[]'\n    }\n    return type + '[]'\n  })\n}\n\n/**\n * extracts the DataTypes from a schema with an items property\n * @param {Array<Object> | Object} items: the items property of the schema\n * @returns {Array<string>} the corresponding DataTypes\n */\nmethods.convertSchemaItemsIntoTypes = (items) => {\n  if (methods.isArray(items)) {\n    return methods.convertSchemaItemsArrayIntoTypes(items)\n  }\n\n  return methods.convertSchemaItemsObjectIntoTypes(items)\n}\n\n/**\n * converts a schema allOf property into an array of DataTypes\n * @param {Array<Object>} allOf: the allOf property of the schema\n * @returns {Array<string>} the corresponding DataTypes\n */\nmethods.convertSchemaAllOfIntoTypes = (allOf) => {\n  return allOf\n    .map(methods.getTypes)\n    .reduce(flatten, [])\n}\n\n/**\n * converts a schema anyOf property into an Array of DataTypes\n * @param {Array<Object>} anyOf: the anyOf property of the schema\n * @returns {Array<string>} the corresponding DataTypes\n */\nmethods.convertSchemaAnyOfIntoTypes = (anyOf) => {\n  const anyOfType = anyOf\n    .map(methods.getTypes)\n    .reduce(flatten, [])\n    .join(' | ')\n  return [ anyOfType ]\n}\n\n/**\n * extracts the types out of a schema\n * @param {JSONSchema} schema: the schema to get the types of\n * @returns {Array<string>} the corresponding types\n */\nmethods.getTypes = (schema) => {\n  const baseType = methods.getType(schema)\n\n  if (schema.$ref) {\n    return [ schema.$ref.split('/')[2] ]\n  }\n\n  let types = [ baseType ]\n  if (schema.items) {\n    types = methods.convertSchemaItemsIntoTypes(schema.items)\n  }\n\n  if (schema.allOf) {\n    types = methods.convertSchemaAllOfIntoTypes(schema.allOf)\n  }\n  else if (schema.anyOf) {\n    types = methods.convertSchemaAnyOfIntoTypes(schema.anyOf)\n  }\n\n  return types\n}\n\n/**\n * applies simple common properties from the schema to the dataType, if they exists\n * @param {RamlDataType} dataType: the dataType to update with common properties\n * @param {JSONSchema} schema: the schema to get the common properties from\n * @returns {RamlDataType} the updated RAML dataType\n */\nmethods.applyCommonProps = (dataType, schema) => {\n  const commonProps = [\n    'minProperties',\n    'maxProperties',\n    'discriminator',\n    'discriminatorValue',\n    'additionalProperties',\n    'uniqueItems',\n    'minItems',\n    'maxItems',\n    'pattern',\n    'minLength',\n    'maxLength',\n    'maximum',\n    'minimum',\n    'multipleOf',\n    'enum',\n    'description'\n  ]\n\n  const keys = Object.keys(schema)\n  return keys\n    .filter(key => commonProps.indexOf(key) >= 0)\n    .map(key => ({ key, value: schema[key] }))\n    .reduce(($data, { key, value }) => {\n      $data[key] = value\n      return $data\n    }, dataType)\n}\n\n/**\n * adds the `items` properties to a RAML dataType if the schema has one.\n * @param {RamlDataType} dataType: the dataType to update\n * @param {JSONSchema} schema: the schema to extract the items properties from\n * @returns {RamlDataType} the updated RAML dataType\n */\nmethods.addItemsProp = (dataType, schema) => {\n  if (!schema.items || dataType.type.indexOf('array') < 0) {\n    return dataType\n  }\n\n  const types = methods.getTypes(schema.items)\n  if (types.length) {\n    dataType.items = types[0]\n  }\n  else {\n    dataType.items = types\n  }\n\n  return dataType\n}\n\n/**\n * adds the `propertes` properties to a RAML dataType if the schema has one.\n * @param {RamlDataType} dataType: the dataType to update\n * @param {JSONSchema} schema: the schema to extract the `properties` properties from\n * @returns {RamlDataType} the updated RAML dataType\n */\nmethods.addPropertiesProp = (dataType, schema) => {\n  if (!schema.properties) {\n    return dataType\n  }\n\n  const props = Object.keys(schema.properties)\n\n  if (!props.length) {\n    return dataType\n  }\n\n  dataType.properties = props\n    .map((prop) => {\n      return { key: prop, value: methods.convertSchemaToDataType(schema.properties[prop]) }\n    })\n    .reduce(($data, { key, value }) => {\n      if ((schema.required || []).indexOf(key) < 0) {\n        value.required = false\n      }\n\n      $data[key] = value\n      return $data\n    }, {})\n\n  return dataType\n}\n\n/**\n * converts a schema into a RAML dataType\n * @param {JSONSchema} schema: the schema to convert\n * @returns {RamlDataType} the corresponding RAML dataType\n */\nmethods.convertSchemaToDataType = (schema) => {\n  let dataType = {}\n\n  const types = methods.getTypes(schema)\n  if (types.length === 1) {\n    dataType.type = types[0]\n  }\n  else {\n    dataType.type = types\n  }\n\n  dataType = methods.applyCommonProps(dataType, schema)\n\n  dataType = methods.addItemsProp(dataType, schema)\n  dataType = methods.addPropertiesProp(dataType, schema)\n  // dataType = methods.addRequiredProp(dataType, schema)\n\n  return dataType\n}\n\n/**\n * dumps all dependencies of a schema in the `definitions` field of the schema, and stringifies it.\n * This is done for JSON Schemas that cannot be converted into dataTypes\n * @param {JSONSchema} _schema: the schema to dump as a string\n * @param {Array<string>} deps: an array representing the dependencies of the schema\n * @param {Map<string, { schema: JSONSchema }>} coreInfoMap: a Map containing all the schemas in the\n * Api.\n * @returns {string|JSONSchema} the corresponding string, except if the stringification failed, in\n * which case the object itself is dumped (this should not happen)\n */\nmethods.dumpJSONIntoDataType = (_schema, deps, coreInfoMap) => {\n  const schema = Object.assign({}, _schema)\n\n  if (deps.length) {\n    schema.definitions = deps\n      .map(dep => {\n        const { schema: depSchema = {} } = coreInfoMap.get(dep) || { schema: {} }\n        return ({ key: dep, value: depSchema })\n      })\n      .reduce(($defs, { key, value }) => {\n        $defs[key] = value\n        return $defs\n      }, {})\n  }\n\n  try {\n    return JSON.stringify(schema, null, 2)\n  }\n  catch (e) {\n    return schema\n  }\n}\n\n/**\n * recursively extracts all dependencies from the coreInfoMap based on the name of a schema or an\n * array of dependencies. (follows sub-dependencies until no new found)\n * @param {Map<string, { deps: Array<string> }>} coreInfoMap: a Map containing all the dependencies\n * for each schema\n * @param {Object<string, boolean>} depsMap: an accumulator that saves already found dependencies\n * (helps avoiding dependency cycles)\n * @param {string?} name: the name of the schema to get the dependencies of\n * @param {Array<string>?} $deps: an array of dependencies to use as a starting point\n * @returns {Object<string, boolean>} the updated accumulator (depsMap)\n */\nmethods.getAllDependencies = (coreInfoMap, depsMap, name, $deps) => {\n  const deps = $deps || (coreInfoMap.get(name) || {}).deps\n  depsMap[name] = true\n\n  if (!deps || !deps.length) {\n    return depsMap\n  }\n\n  return deps\n    .map(dep => dep.split('/')[2])\n    .filter(dep => !depsMap[dep])\n    .reduce((d, n) => methods.getAllDependencies(coreInfoMap, d, n), depsMap)\n}\n\n/*\n * Second Strategy (more advanced):\n * tries to find all the schemas that can't be converted or depend on a schema that can't\n */\n/**\n * marks a schema in a schema map, based on the name of the schema\n * @param {Map<string, { marked: boolean? }>} schemaMap: the map of schemas to update\n * @param {string} name: the name of the schema to mark\n * @returns {Map<string, { marked: boolean? }>} the updated schema map\n */\nmethods.markSchema = (schemaMap, name) => {\n  schemaMap.get(name).marked = true\n  return schemaMap\n}\n\n/**\n * unmarks all schemas in a schema map\n * @param {Object<string, { marked: boolean? }> } schemaMap: the map of schemas to update\n * @returns {Object<string, {marked: undefined }> } the updated schema map\n */\nmethods.unmarkSchemas = (schemaMap) => {\n  schemaMap.forEach((v) => {\n    delete v.marked\n  })\n\n  return schemaMap\n}\n\n/**\n * tests whether a schema and all its dependencies are convertible into dataTypes\n * @param {Map<string, { convertible: boolean, deps: Array<string>?} >} coreInfoMap: a map\n * containing informations about each schemas to convert.\n * @param {string?} name: the name of the schema to test\n * @param {{ convertible: boolean, deps: Array<string>? }?} optionalCoreInfo: an optional set of\n * information to use. If it is provided, it supersedes the data obtained from the name of the\n * schema.\n * @returns {boolean} whether the schema and all its dependencies are convertible\n */\nmethods.areSchemaAndDepsConvertible = (coreInfoMap, name, optionalCoreInfo) => {\n  const { convertible, deps = [] } = optionalCoreInfo ?\n    optionalCoreInfo :\n    (coreInfoMap.get(name) || {})\n\n  if (!convertible) {\n    return false\n  }\n\n  return deps\n    .map(dep => dep.split('/')[2])\n    .map(depName => {\n      if (typeof coreInfoMap.get(depName) === 'undefined') {\n        return true\n      }\n\n      if (coreInfoMap.get(depName).marked) {\n        return coreInfoMap.get(depName).convertible\n      }\n\n      const updatedCoreInfoMap = methods.markSchema(coreInfoMap, depName)\n      return methods.areSchemaAndDepsConvertible(updatedCoreInfoMap, depName)\n    })\n    .reduce((acc, bool) => acc && bool, true)\n}\n\n/**\n * extract core information from a schema, e.g. its convertibility into dataType, and its\n * dependencies\n * @param {JSONSchema} schema: the schema to get the core information from\n * @returns {{ deps: Array<string>?, convertible: boolean }} the corresponding core information\n */\nmethods.extractCoreInformationFromSchema = (schema) => {\n  const deps = methods.getRefsFromSchema(schema)\n  const convertible = methods.isConvertible(schema)\n\n  return { deps, convertible }\n}\n\n/**\n * extracts core information from a constraint. (e.g. itself, its corresponding schema, its\n * dependencies, its name and whether it is convertible into a dataType)\n * @param {Constraint} constraint: the constraint to extract the core information from\n * @param {string?} name: the name of the constraint, if it exists\n * @returns {{\n *   constraint: Constraint,\n *   schema: JSONSchema,\n *   deps: Array<string>?,\n *   convertible: boolean,\n *   name: string?\n * }} the corresponding core information about the constraint\n */\nmethods.extractCoreInformationFromConstraint = (constraint, name) => {\n  const schema = constraint.toJSONSchema()\n  const { deps, convertible } = methods.extractCoreInformationFromSchema(schema)\n\n  return { constraint, schema, deps, convertible, name }\n}\n\n/**\n * converts a core information about a constraint into a dataType\n * @param {{\n *   schema: JSONSchema,\n *   deps: Array<string>?,\n *   convertible: boolean,\n *   name: string?\n * }} coreInfo: the core information about a constraint\n * @param {string} key: the key of the coreInfo in the coreInfoMap. This is only present because\n * we are using this method in tandem with the standard `map` method.\n * @param {Map<string, coreInfo>} coreInfoMap: the coreInfo map from which to extract the data to\n * create the dataType\n * @returns {Entry<string, RamlDataType>} the corresponding dataType, as an Entry\n */\nmethods.extractDataTypeFromCoreInformation = (\n  { schema, name, deps, convertible }, key, coreInfoMap\n) => {\n  const isConvertible = methods.areSchemaAndDepsConvertible(\n    coreInfoMap, name, { deps, convertible }\n  )\n  const updatedCoreInfoMap = methods.unmarkSchemas(coreInfoMap)\n\n  let dataType\n  if (isConvertible) {\n    dataType = methods.convertSchemaToDataType(schema)\n  }\n  else {\n    const depsMap = methods.getAllDependencies(updatedCoreInfoMap, {}, name, deps)\n    delete depsMap[name]\n    const $deps = Object.keys(depsMap)\n    dataType = methods.dumpJSONIntoDataType(schema, $deps, coreInfoMap)\n  }\n\n  return {\n    key: name,\n    value: dataType\n  }\n}\n\n/**\n * extracts core information for each shared constraint in an Api.\n * @param {Api} api: the api to get the core information about shared constraints from\n * @returns {Map<string, coreInfo>} the corresponding coreInfo map\n */\nmethods.extractCoreInformationMapFromApi = (api) => {\n  const constraints = api.getIn([ 'store', 'constraint' ])\n\n  const coreInfoMap = constraints\n    .map(methods.extractCoreInformationFromConstraint)\n\n  return coreInfoMap\n}\n\n/**\n * extracts dataTypes from a coreInfoMap that represents all the shared constraints of an Api\n * @param {Map<string, coreInfo>} coreInfoMap: the coreInfo map that holds all the necessary\n * information about each constraint to create dataTypes\n * @returns {Entry<string, Object<string, RamlDataType>>} the shared dataTypes, in Entry format\n */\nmethods.extractDataTypesFromApi = (coreInfoMap) => {\n  const types = coreInfoMap\n    .map(methods.extractDataTypeFromCoreInformation)\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'types', value: types }\n}\n\n/**\n * extract the title from an Api\n * @param {Api} api: the api from which to get the title\n * @returns {Entry<string, string>?} the corresponding title, if it exists, in Entry format\n */\nmethods.extractTitleFromApi = (api) => {\n  const title = api.getIn([ 'info', 'title' ]) || null\n\n  if (!title) {\n    return null\n  }\n\n  return { key: 'title', value: title }\n}\n\n/**\n * extract the description from an Api\n * @param {Api} api: the api from which to get the description\n * @returns {Entry<string, string>?} the corresponding description, if it exists, in Entry format\n */\nmethods.extractDescriptionFromApi = (api) => {\n  const description = api.getIn([ 'info', 'description' ]) || null\n\n  if (!description) {\n    return null\n  }\n\n  return { key: 'description', value: description }\n}\n\n/**\n * extract the version from an Api\n * @param {Api} api: the api from which to get the version\n * @returns {Entry<string, string>?} the corresponding version, if it exists, in Entry format\n */\nmethods.extractVersionFromApi = (api) => {\n  const version = api.getIn([ 'info', 'version' ]) || null\n\n  if (!version) {\n    return null\n  }\n\n  return { key: 'version', value: version }\n}\n\nmethods.getBaseUriEndpoint = (api) => {\n  const endpoint = api.getIn([ 'store', 'endpoint' ]).valueSeq().get(0)\n\n  if (endpoint) {\n    return endpoint\n  }\n\n  const variable = api.getIn([ 'store', 'variable' ]).valueSeq().get(0)\n  if (!variable) {\n    return null\n  }\n\n  const firstValue = variable.get('values').valueSeq().get(0)\n  if (!firstValue) {\n    return null\n  }\n\n  return new URL({ url: firstValue })\n}\n\n/**\n * extract the baseUri from an Api\n * @param {Api} api: the api from which to get the baseUri\n * @returns {Entry<string, string>?} the corresponding baseUri, if it exists, in Entry format\n */\nmethods.extractBaseUriFromApi = (api) => {\n  const endpoint = methods.getBaseUriEndpoint(api)\n  if (!endpoint) {\n    return null\n  }\n\n  const url = endpoint.generate(List([ '{', '}' ]))\n\n  if (!url) {\n    return null\n  }\n\n  return { key: 'baseUri', value: url }\n}\n\n/**\n * extract the parameters from a urlComponent\n * @param {URLComponent} urlComponent: the component from which to get the parameters\n * @returns {List<Parameter>?} the corresponding list of parameters, if applicable\n */\nmethods.extractParametersFromURLComponent = (urlComponent) => {\n  if (!urlComponent) {\n    return null\n  }\n\n  const param = urlComponent.get('parameter')\n  if (!param || param.get('superType') !== 'sequence') {\n    return null\n  }\n\n  const sequence = param.get('value')\n  if (!sequence) {\n    return null\n  }\n\n  const params = sequence.filter($param => $param.get('key'))\n  return params\n}\n\n/**\n * converts a JSONSchema into a Named Parameter (aka: dataType)\n * @param {Map<string, coreInfo>} coreInfoMap: the map containing all information necessary to the\n * creation of DataTypes\n * @param {string} name: the name of the named parameter\n * @param {JSONSchema} schema: the schema to convert into a named parameter / dataType\n * @returns {Entry<string, RamlDataType>} the corresponding dataType, in Entry format\n */\nmethods.convertJSONSchemaIntoNamedParameter = (coreInfoMap, name, schema) => {\n  const { deps, convertible } = methods.extractCoreInformationFromSchema(schema)\n  return methods.extractDataTypeFromCoreInformation(\n    { deps, convertible, schema, name }, null, coreInfoMap\n  )\n}\n\n/**\n * converts a Parameter into a NamedParameter / dataType.\n * @param {Map<string, coreInfo>} coreInfoMap: the map containing all information necessary to the\n * creation of DataTypes\n * @param {Parameter} param: the parameter to convert\n * @returns {Entry<string, string>?} the corresponding dataType, if it exists, in Entry format\n */\nmethods.convertParameterIntoNamedParameter = (coreInfoMap, param) => {\n  if (!param) {\n    return null\n  }\n\n  const key = param.get('key')\n  const schema = param.getJSONSchema(false, false)\n\n  const namedParameter = methods.convertJSONSchemaIntoNamedParameter(coreInfoMap, key, schema)\n  return namedParameter\n}\n\n/**\n * extracts the base uri parameters from an Api.\n * @param {Map<string, coreInfo>} coreInfoMap: the map containing all information necessary to the\n * creation of DataTypes\n * @param {Api} api: the api to get the base uri and its parameter from\n * @returns {Entry<string, Object<string, RamlDataType>>?} the corresponding dataType, if it exists,\n * in Entry format.\n */\nmethods.extractBaseUriParametersFromApi = (coreInfoMap, api) => {\n  const endpoint = methods.getBaseUriEndpoint(api)\n  if (!endpoint) {\n    return null\n  }\n\n  const urlComponentNames = [ 'hostname', 'port', 'pathname' ]\n  const params = urlComponentNames\n    .map(name => methods.extractParametersFromURLComponent(endpoint.get(name)))\n    .filter(v => !!v)\n    .reduce(flatten, [])\n    .map((param) => methods.convertParameterIntoNamedParameter(coreInfoMap, param))\n    .filter(({ key }) => key.toLowerCase() !== 'version')\n\n  if (!params.length) {\n    return null\n  }\n\n  const paramMap = params.reduce(convertEntryListInMap, {})\n\n  return { key: 'baseUriParameters', value: paramMap }\n}\n\n/**\n * extracts the protocols from an Api\n * @param {Api} api: the api from which to get the shared protocols\n * @returns {Entry<string, Array<string>>?} the corresponding dataType, if it exists, in Entry\n * format\n */\nmethods.extractProtocolsFromApi = (api) => {\n  const endpoint = methods.getBaseUriEndpoint(api)\n  if (!endpoint) {\n    return null\n  }\n\n  const protocols = endpoint.get('protocol')\n  if (!protocols || !protocols.size) {\n    return null\n  }\n\n  const validProtocols = protocols\n    .filter(protocol => protocol.match(/https?:?/i))\n    .map(protocol => protocol.match(/(https?)/i)[1].toUpperCase())\n    .toJS()\n\n  if (!validProtocols || !validProtocols.length) {\n    return null\n  }\n\n  return { key: 'protocols', value: validProtocols }\n}\n\n/**\n * extracts the shared media type uuid from an Api. This uuid is defined iff there is exactly\n * one shared Content-Type header for requests in the whole Api.\n * @param {Api} api: the api to extract the global media type uuid from\n * @returns {string?} the corresponding uuid, if it exists\n */\nmethods.extractMediaTypeUUIDfromApi = (api) => {\n  const params = api.getIn([ 'store', 'parameter' ])\n  const contentTypeParams = params\n    .filter(param => param.get('key') === 'Content-Type' && param.get('usedIn') === 'request')\n\n  if (contentTypeParams.size !== 1) {\n    return null\n  }\n\n  const uuid = contentTypeParams.map((_, key) => key).valueSeq().get(0)\n  return uuid\n}\n\nmethods.extractMediaTypeFromContentTypeParameter = (contentTypeParam) => {\n  const defaultValue = contentTypeParam.get('default')\n  if (defaultValue) {\n    return { key: 'mediaType', value: defaultValue }\n  }\n\n  const enumValue = contentTypeParam.getJSONSchema().enum\n  if (enumValue) {\n    return { key: 'mediaType', value: [].concat(enumValue) }\n  }\n\n  return null\n}\n\n/**\n * extracts the shared media type from an Api. This media type is defined iff there is exactly\n * one shared Content-Type header for requests in the whole Api.\n * @param {Api} api: the api to extract the global media type from\n * @returns {Entry<string, string|Array<string>>?} the corresponding media type, if it exists, in\n * Entry format\n */\nmethods.extractMediaTypeFromApi = (api) => {\n  const params = api.getIn([ 'store', 'parameter' ])\n  const contentTypeParams = params\n    .filter(param => param.get('key') === 'Content-Type' && param.get('usedIn') === 'request')\n\n  if (contentTypeParams.size !== 1) {\n    return null\n  }\n\n  const contentTypeParam = contentTypeParams.valueSeq().get(0)\n  return methods.extractMediaTypeFromContentTypeParameter(contentTypeParam)\n}\n\n/**\n * extracts a RAMLMethodBase object from a request, with the help of a coreInfo map and of the\n * global mediaTypeUUID.\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Request} request: the request to convert into a RAMLMethodBase\n * @returns {RAMLMethodBase?} the corresponding RAMLMethodBase, if it exists\n */\nmethods.extractMethodBaseFromRequest = (mediaTypeUUID, coreInfoMap, request) => {\n  const kvs = [\n    methods.extractDisplayNameFromRequest(request),\n    methods.extractDescriptionFromRequest(request),\n    methods.extractQueryParametersFromRequest(coreInfoMap, request),\n    methods.extractHeadersFromRequest(coreInfoMap, request),\n    methods.extractBodyFromRequest(coreInfoMap, request),\n    methods.extractProtocolsFromRequest(request),\n    methods.extractIsFromRequest(mediaTypeUUID, request),\n    methods.extractSecuredByFromRequest(request),\n    methods.extractResponsesFromRequest(coreInfoMap, request)\n  ].filter(v => !!v)\n\n  if (!kvs.length) {\n    return null\n  }\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extracts a Traits from an Api, with the help of a coreInfo map and of the global mediaTypeUUID.\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Api} api: the api to get the shared request level interfaces to convert into RAMLTraits\n * @returns {Array<Entry<string, RAMLTrait>>} the corresponding array of Traits\n */\nmethods.extractTraitsFromInterfaces = (mediaTypeUUID, coreInfoMap, api) => {\n  const itfs = api.getIn([ 'store', 'interface' ])\n    .filter(itf => itf.get('level') === 'request')\n\n  const traits = itfs\n    .map(itf => {\n      if (!itf.get('underlay')) {\n        return {\n          key: itf.get('uuid'),\n          value: {}\n        }\n      }\n\n      return {\n        key: itf.get('uuid'),\n        value: methods.extractMethodBaseFromRequest(mediaTypeUUID, coreInfoMap, itf.get('underlay'))\n      }\n    })\n    .filter(({ value }) => !!value)\n\n  return traits.valueSeq().toJS()\n}\n\n/* eslint-disable max-statements */\n/**\n * extracts a RAMLMethodBase from a Parameter, with the help of a coreInfo map and of the global\n * mediaTypeUUID. This is done to represent shared Parameters (which do not have an exact match in\n * RAML)\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Parameter} parameter: the parameter to convert into a RAMLMethodBase\n * @returns {RAMLMethodBase?} the corresponding RAMLMethodBase if it exists\n */\nmethods.extractMethodBaseFromParameter = (coreInfoMap, parameter) => {\n  const location = parameter.get('in')\n  const locationMap = {\n    headers: 'headers',\n    queries: 'queryParameters'\n  }\n\n  const kv = methods.convertParameterIntoNamedParameter(coreInfoMap, parameter)\n\n  if (!kv) {\n    return null\n  }\n\n  if (locationMap[location]) {\n    return { [locationMap[location]]: { [kv.key]: kv.value } }\n  }\n\n  if (location === 'body') {\n    if (kv.key) {\n      return { body: { [kv.key]: kv.value } }\n    }\n\n    return { body: kv.value }\n  }\n\n  return null\n}\n/* eslint-disable max-statements */\n\n/**\n * extracts Traits from shared Parameters, with the help of a coreInfo map and of the global\n * mediaTypeUUID.\n * @param {string?} mediaTypeUUID: the uuid of the global mediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Api} api: the api from which to get the shared parameters\n * @returns {Array<Entry<string, RAMLMethodBase>>} the corresponding traits, as an array of Entries\n */\nmethods.extractTraitsFromParameters = (mediaTypeUUID, coreInfoMap, api) => {\n  const params = api.getIn([ 'store', 'parameter' ])\n  const traits = params\n    .filter((_, key) => key !== mediaTypeUUID)\n    .map((param, key) => ({\n      key,\n      value: methods.extractMethodBaseFromParameter(coreInfoMap, param)\n    }))\n    .filter(({ key, value }) => !!key && !!value)\n\n  return traits.valueSeq().toJS()\n}\n\n/**\n * extracts a MethodBase from a response\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary to\n * convert a schema into a RamlDataType\n * @param {Response} response: the response to convert into a MethodBase\n * @returns {RAMLMethodBase} the corresponding RAMLMethodBase, if it exists\n */\nmethods.extractMethodBaseFromResponse = (coreInfoMap, response) => {\n  const responseEntry = methods.extractResponsesFromRequest(coreInfoMap, OrderedMap({\n    responses: OrderedMap({\n      [response.get('code')]: response\n    })\n  }))\n\n  if (!responseEntry) {\n    return null\n  }\n\n  return { [responseEntry.key]: responseEntry.value }\n}\n\n/**\n * extract Traits from shared responses\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary to\n * convert a schema into a RamlDataType\n * @param {Api} api: the api from which to get the shared responses\n * @returns {Array<RAMLMethodBase>} the corresponding array of traits\n */\nmethods.extractTraitsFromSharedResponses = (coreInfoMap, api) => {\n  const responses = api.getIn([ 'store', 'response' ])\n  const traits = responses\n    .map((response, key) => ({\n      key: 'response_' + key,\n      value: methods.extractMethodBaseFromResponse(coreInfoMap, response)\n    }))\n    .filter(({ key, value }) => !!key && !!value)\n\n  return traits.valueSeq().toJS()\n}\n\n/**\n * extracts all possible Traits from an Api, with the help of a coreInfo map and of the global\n * mediaTypeUUID. This is done to represent shared Parameters (which do not have an exact match in\n * RAML)\n * @param {string?} mediaTypeUUID: the uuid of the global mediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Api} api: the api from which to get all possible Traits (from shared interfaces and\n * shared parameters)\n * @returns {Entry<string, Object<string, RAMLMethodBase>>?} the corresponding traits object,\n * if it exists, as an Entry\n */\nmethods.extractTraitsFromApi = (mediaTypeUUID, coreInfoMap, api) => {\n  const itfsTraits = methods.extractTraitsFromInterfaces(mediaTypeUUID, coreInfoMap, api)\n  const paramTraits = methods.extractTraitsFromParameters(mediaTypeUUID, coreInfoMap, api)\n  const responseTraits = methods.extractTraitsFromSharedResponses(coreInfoMap, api)\n\n  if (!itfsTraits.length && !paramTraits.length && !responseTraits.length) {\n    return null\n  }\n\n  const traits = [].concat(itfsTraits, paramTraits, responseTraits)\n\n  const traitMap = traits.reduce(convertEntryListInMap, {})\n\n  return { key: 'traits', value: traitMap }\n}\n\n/**\n * extracts all ResourceTypes from an Api, with the help of a coreInfo map and of the global\n * mediaTypeUUID. This is done to represent shared Parameters (which do not have an exact match in\n * RAML)\n * @param {string?} mediaTypeUUID: the uuid of the global mediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Api} api: the api from which to get all possible ResourceTypes.\n * @returns {Entry<string, Object<string, RAMLMethodBase>>?} the corresponding resourceTypes object,\n * if it exists, as an Entry\n */\nmethods.extractResourceTypesFromApi = (mediaTypeUUID, coreInfoMap, api) => {\n  const resourceTypeItfs = api.getIn([ 'store', 'interface' ])\n    .filter(itf => itf.get('level') === 'resource')\n\n  if (!resourceTypeItfs.size) {\n    return null\n  }\n\n  const resourceTypes = resourceTypeItfs\n    .map(itf => {\n      if (!itf.get('underlay')) {\n        /* eslint-disable no-undefined */\n        return {\n          key: itf.get('uuid'),\n          value: undefined\n        }\n        /* eslint-enable no-undefined */\n      }\n\n      return {\n        key: itf.get('uuid'),\n        value: methods.extractResourceFromResourceRecord(\n          mediaTypeUUID, coreInfoMap, itf.get('underlay')\n        )\n      }\n    })\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'resourceTypes', value: resourceTypes }\n}\n\n/**\n * extracts a Basic Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromBasicAuth = (auth) => {\n  const securityScheme = {\n    type: 'Basic Authentication'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n/**\n * extracts a Digest Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromDigestAuth = (auth) => {\n  const securityScheme = {\n    type: 'Digest Authentication'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n/**\n * extracts a describedBy section for a PassThroughSecurityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLDescribedByObject?} the corresponding describedBy object, if applicable\n */\nmethods.extractDescribedByForApiKeyAuth = (auth) => {\n  if (auth.get('in') === 'header') {\n    return {\n      headers: {\n        [auth.get('name')]: { type: 'string' }\n      }\n    }\n  }\n\n  if (auth.get('in') === 'query') {\n    return {\n      queryParameters: {\n        [auth.get('name')]: { type: 'string' }\n      }\n    }\n  }\n\n  return null\n}\n\n/**\n * extracts an ApiKey Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromApiKeyAuth = (auth) => {\n  const securityScheme = {\n    type: 'Pass Through'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  const describedBy = methods.extractDescribedByForApiKeyAuth(auth)\n  if (describedBy) {\n    securityScheme.describedBy = describedBy\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n// TODO signature\n/**\n * extracts an OAuth1 Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromOAuth1Auth = (auth) => {\n  const securityScheme = {\n    type: 'OAuth 1.0'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  securityScheme.settings = {\n    requestTokenUri: auth.get('requestTokenUri') || null,\n    authorizationUri: auth.get('authorizationUri') || null,\n    tokenCredentialsUri: auth.get('tokenCredentialsUri') || null\n  }\n\n  if (\n    auth.get('signature') &&\n    [ 'HMAC-SHA1', 'RSA-SHA1', 'PLAINTEXT' ].indexOf(auth.get('signature').toUpperCase()) >= 0\n  ) {\n    securityScheme.settings.signatures = [ auth.get('signature').toUpperCase() ]\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n// TODO scopes\n/**\n * extracts an OAuth2 Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromOAuth2Auth = (auth) => {\n  const securityScheme = {\n    type: 'OAuth 2.0'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  const grantMap = {\n    accessCode: 'authorization_code',\n    implicit: 'implicit',\n    application: 'client_credentials',\n    password: 'password'\n  }\n\n  securityScheme.settings = {\n    authorizationUri: auth.get('authorizationUrl') || null,\n    accessTokenUri: auth.get('tokenUrl') || null,\n    authorizationGrants: grantMap[auth.get('flow')] ? [ grantMap[auth.get('flow')] ] : []\n  }\n\n  if (auth.get('scopes') && auth.get('scopes').size) {\n    securityScheme.settings.scopes = auth.get('scopes').map(({ key }) => key).toJS()\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n/**\n * extracts an Hawk Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromHawkAuth = (auth) => {\n  const securityScheme = {\n    type: 'x-hawk'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  securityScheme.settings = {\n    id: auth.get('id') || null,\n    algorithm: auth.get('algorithm') || null\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n/**\n * extracts an AWSSig4Auth securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromAWSSig4Auth = (auth) => {\n  const securityScheme = {\n    type: 'x-aws-sig4'\n  }\n\n  const description = auth.get('description')\n  if (description) {\n    securityScheme.description = description\n  }\n\n  securityScheme.settings = {\n    region: auth.get('region') || null,\n    service: auth.get('service') || null\n  }\n\n  return { key: auth.get('authName'), value: securityScheme }\n}\n\n/**\n * extracts a securityScheme from an Auth\n * @param {Auth} auth: the auth to convert into a securityScheme\n * @returns {RAMLSecurityScheme} the corresponding securityScheme\n */\nmethods.extractSecuritySchemeFromAuth = (auth) => {\n  if (auth instanceof Auth.Basic) {\n    return methods.extractSecuritySchemeFromBasicAuth(auth)\n  }\n\n  if (auth instanceof Auth.Digest) {\n    return methods.extractSecuritySchemeFromDigestAuth(auth)\n  }\n\n  if (auth instanceof Auth.ApiKey) {\n    return methods.extractSecuritySchemeFromApiKeyAuth(auth)\n  }\n\n  if (auth instanceof Auth.OAuth1) {\n    return methods.extractSecuritySchemeFromOAuth1Auth(auth)\n  }\n\n  if (auth instanceof Auth.OAuth2) {\n    return methods.extractSecuritySchemeFromOAuth2Auth(auth)\n  }\n\n  if (auth instanceof Auth.Hawk) {\n    return methods.extractSecuritySchemeFromHawkAuth(auth)\n  }\n\n  if (auth instanceof Auth.AWSSig4) {\n    return methods.extractSecuritySchemeFromAWSSig4Auth(auth)\n  }\n\n  return null\n}\n\n/**\n * extracts securitySchemes from an Api\n * @param {Api} api: the api to get all the shared auths from\n * @returns {Entry<string, Object<string, RAMLSecurityScheme>>?} the corresponding securitySchemes,\n * if it exists, as an Entry\n */\nmethods.extractSecuritySchemesFromApi = (api) => {\n  const auths = api.getIn([ 'store', 'auth' ])\n\n  const securitySchemes = auths\n    .map(methods.extractSecuritySchemeFromAuth)\n    .filter(v => !!v)\n\n  if (!securitySchemes.size) {\n    return null\n  }\n\n  const securitySchemeMap = securitySchemes.reduce(convertEntryListInMap, {})\n\n  return { key: 'securitySchemes', value: securitySchemeMap }\n}\n\n// TODO implement this (args: api)\nmethods.extractSecuredByFromApi = () => null\n\n/**\n * extracts the displayName from a Request\n * @param {Request} request: the request to get the displayName from\n * @returns {Entry<string, string>?} the corresponding displayName, if it exists, as an Entry\n */\nmethods.extractDisplayNameFromRequest = (request) => {\n  const displayName = request.get('name') || null\n\n  if (!displayName) {\n    return null\n  }\n\n  return { key: 'displayName', value: displayName }\n}\n\n/**\n * extracts the description from a Request\n * @param {Request} request: the request to get the description from\n * @returns {Entry<string, string>?} the corresponding description, if it exists, as an Entry\n */\nmethods.extractDescriptionFromRequest = (request) => {\n  const description = request.get('description') || null\n\n  if (!description) {\n    return null\n  }\n\n  return { key: 'description', value: description }\n}\n\n/**\n * extracts the queryParameters from a Request\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo, that contains all that is\n * necessary to create DataTypes\n * @param {Request} request: the request to get the queryParameters from\n * @returns {Entry<string, Object<string, RamlDataType>>?} the corresponding queryParameters, if\n * they exist, as an Entry\n */\nmethods.extractQueryParametersFromRequest = (coreInfoMap, request) => {\n  const params = request.getIn([ 'parameters', 'queries' ])\n    .filter(param => !(param instanceof Reference))\n    .map((param) => {\n      return methods.convertParameterIntoNamedParameter(coreInfoMap, param)\n    })\n    .valueSeq()\n\n  if (!params.size) {\n    return null\n  }\n\n  const queryParameters = params.reduce(convertEntryListInMap, {})\n\n  return { key: 'queryParameters', value: queryParameters }\n}\n\n/**\n * extracts the headers from a Request\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo, that contains all that is\n * necessary to create DataTypes\n * @param {Request} request: the request to get the headers from\n * @returns {Entry<string, Object<string, RamlDataType>>?} the corresponding headers, if they\n * exist, as an Entry\n */\nmethods.extractHeadersFromRequest = (coreInfoMap, request) => {\n  const params = request.getIn([ 'parameters', 'headers' ])\n    .filter(param => !(param instanceof Reference))\n    .map((param) => {\n      return methods.convertParameterIntoNamedParameter(coreInfoMap, param)\n    })\n    .valueSeq()\n\n  if (!params.size) {\n    return null\n  }\n\n  const headers = params.reduce(convertEntryListInMap, {})\n\n  return { key: 'headers', value: headers }\n}\n\n/**\n * tests whether a Context is applicable to the body (i.e. has exactly one Content-Type constraint)\n * @param {Context} context: the context to test\n * @returns {boolean} true if it is applicable, false otherwise\n */\nmethods.isBodyContext = (context) => {\n  return context.get('constraints')\n    .filter(param => {\n      return param.get('key') === 'Content-Type' &&\n        param.get('usedIn') === 'request' &&\n        param.get('in') === 'headers'\n    })\n    .size === 1\n}\n\n/**\n * extracts all contexts that are applicable to the body from a request\n * @param {Request} request: the request to get the body contexts from\n * @returns {List<Context>?} the corresponding list of contexts, if it exists\n */\nmethods.getBodyContextsFromRequest = (request) => {\n  const bodyContexts = request.get('contexts').filter(methods.isBodyContext)\n  if (bodyContexts.size === 0) {\n    return null\n  }\n\n  return bodyContexts\n}\n\n/**\n * converts a single parameter body into a RAMLBody object (in the case where there are no contexts)\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Map<string, Parameter>} bodyParams: a map of body parameters to convert into a RAMLBody\n * object\n * @returns {Entry<string, RamlDataType>} the corresponding RAMLBody, as an Entry\n */\nmethods.extractSingleParameterFromRequestWithNoContext = (coreInfoMap, bodyParams) => {\n  const value = methods.convertParameterIntoNamedParameter(\n    coreInfoMap, bodyParams.valueSeq().get(0)\n  ).value\n\n  return { key: 'body', value }\n}\n\n/**\n * converts a multiple parameters body into a RAMLBody (in the case where there are no contexts)\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Map<string, Parameter>} bodyParams: a map of body parameters to convert into a RAMLBody\n * object\n * @returns {Entry<string, { properties: Object<string, RamlDataType> }>?} the corresponding\n * RAMLBody, if it exists, as an Entry\n */\nmethods.extractMultipleParametersFromRequestWithNoContext = (coreInfoMap, bodyParams) => {\n  const propsEntries = bodyParams.map(\n    (param) => methods.convertParameterIntoNamedParameter(coreInfoMap, param)\n  )\n\n  if (!propsEntries.size) {\n    return null\n  }\n\n  const properties = propsEntries.reduce(convertEntryListInMap, {})\n  const value = { properties }\n\n  return { key: 'body', value }\n}\n\n/**\n * converts a ParameterContainer `body` block into a RAMLBody (in the case where there are no\n * contexts)\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {ParameterContainer} paramContainer: the ParameterContainer from which to get the body\n * parameters to convert\n * @returns {Entry<string, RAMLBody>?} the corresponding RAMLBody, if it exists, as an Entry\n */\nmethods.extractBodyParamsFromRequestWithNoContext = (coreInfoMap, paramContainer) => {\n  const bodyParams = paramContainer.get('body')\n\n  if (!bodyParams.size) {\n    return null\n  }\n\n  if (bodyParams.size === 1) {\n    return methods.extractSingleParameterFromRequestWithNoContext(coreInfoMap, bodyParams)\n  }\n\n  return methods.extractMultipleParametersFromRequestWithNoContext(coreInfoMap, bodyParams)\n}\n\n/**\n * extracts the Content-Type from a context\n * @param {Context} context: the context from which to extract the Content-Type\n * @returns {string?} the corresponding Content-Type, if it exists\n */\nmethods.getContentTypeFromContext = (context) => {\n  return context.get('constraints')\n    .filter(param => {\n      return param.get('key') === 'Content-Type' &&\n        param.get('usedIn') === 'request' &&\n        param.get('in') === 'headers'\n    })\n    .map(param => param.get('default'))\n    .valueSeq().get(0) || null\n}\n\n/**\n * extracts the RAMLBody object for a specific Content-Type from a Parameter Container\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {ParameterContainer} paramContainer: the ParameterContainer from which to get the body\n * parameters to convert\n * @param {Context} context: the context from which to extract the Content-Type\n * @returns {Entry<string, RAMLBody>?} the corresponding RAMLBody, if it exists, as an Entry\n */\nmethods.extractBodyParamsFromRequestForContext = (coreInfoMap, paramContainer, context) => {\n  const contentType = methods.getContentTypeFromContext(context) || '*/*'\n\n  const bodyParams = paramContainer\n    .filter(context.get('constraints'))\n    .get('body')\n    .map(param => {\n      return methods.convertParameterIntoNamedParameter(coreInfoMap, param)\n    })\n    .valueSeq()\n\n  if (!bodyParams.size) {\n    return null\n  }\n\n  if (bodyParams.size === 1 && bodyParams.get(0).key === null) {\n    return { key: contentType, value: bodyParams.get(0).value }\n  }\n\n  return { key: contentType, value: bodyParams.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts the RAMLBodies from a Request with (multiple) context(s)\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {List<Context>} contexts: the contexts to use to generate the RAMLBodies\n * @param {ParameterContainer} paramContainer: the ParameterContainer from which to get the body\n * parameters to convert\n * @returns {Entry<string, RAMLBody | Object<string, RAMLBody>>?} the corresponding RAMLBody, if it\n * exists, as an Entry\n */\nmethods.extractBodyParamsFromRequestWithContexts = (coreInfoMap, contexts, paramContainer) => {\n  const bodies = contexts.map(context => {\n    return methods.extractBodyParamsFromRequestForContext(coreInfoMap, paramContainer, context)\n  })\n  .filter(v => !!v)\n\n  if (!bodies.size) {\n    return null\n  }\n\n  if (bodies.size === 1 && bodies.get(0).key === null) {\n    return { key: 'body', value: bodies.get(0).value }\n  }\n\n  return { key: 'body', value: bodies.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts a RAMLBody from a request.\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Request} request: the request from which to extract the RAMLBody\n * @returns {Entry<string, RAMLBody>?} the corresponding RAMLBody if it exists, as an Entry\n */\nmethods.extractBodyFromRequest = (coreInfoMap, request) => {\n  const paramContainer = request.get('parameters')\n  const bodyContexts = methods.getBodyContextsFromRequest(request)\n\n  if (!bodyContexts) {\n    return methods.extractBodyParamsFromRequestWithNoContext(coreInfoMap, paramContainer)\n  }\n\n  return methods.extractBodyParamsFromRequestWithContexts(coreInfoMap, bodyContexts, paramContainer)\n}\n\n// TODO fix that ugly code\n/**\n * extracts Protocols from a Request\n * @param {Request} request: the request to extract the protocols from\n * @returns {Entry<string, Array<string>>?} the extracted protocols, if they exist, as an Entry\n */\nmethods.extractProtocolsFromRequest = (request) => {\n  const protocols = request.get('endpoints')\n    .map(endpoint => {\n      if (endpoint instanceof Reference) {\n        return endpoint.get('overlay')\n      }\n\n      return endpoint\n    })\n    .filter(v => !!v)\n    .map(endpoint => {\n      return endpoint.get('protocol')\n    })\n    .filter(v => {\n      return !!v && v.filter(protocol => protocol.match(/https?:?/i)).size !== 0\n    })\n    .map(v => v\n      .filter(protocol => protocol.match(/https?:?/i))\n      .map(protocol => protocol.match(/(https?):?/i)[1].toUpperCase())\n    )\n    .valueSeq()\n    .get(0)\n\n  if (!protocols) {\n    return null\n  }\n\n  return { key: 'protocols', value: protocols.toJS() }\n}\n\n/**\n * extracts TraitRefs from Request parameters (ignoring the global mediaType reference)\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType. Used to filter out the\n * potential globalMediaType reference in the headers\n * @param {Request} request: the request from which to get the parameters. Only the References\n * matter for TraitRef extraction.\n * @returns {Array<string>} the corresponding array of TraitRef\n */\nmethods.extractTraitsFromRequestParameters = (mediaTypeUUID, request) => {\n  const paramContainer = request.get('parameters')\n\n  const headerTraits = paramContainer.get('headers')\n    .filter(param => param instanceof Reference && param.get('uuid') !== mediaTypeUUID)\n    .map(param => param.get('uuid'))\n    .valueSeq()\n    .toJS()\n\n  const queryParamTraits = paramContainer.get('queries')\n    .filter(param => param instanceof Reference)\n    .map(param => param.get('uuid'))\n    .valueSeq()\n    .toJS()\n\n  const bodyTraits = paramContainer.get('body')\n    .filter(param => param instanceof Reference)\n    .map(param => param.get('uuid'))\n    .valueSeq()\n    .toJS()\n\n  return [].concat(headerTraits, queryParamTraits, bodyTraits)\n}\n\n/**\n * extracts TraitRefs from the responses of a request\n * @param {Request} request: the request to extract the response trait references from\n * @returns {Seq<string>} the corresponding TraitRefs\n */\nmethods.extractTraitsFromResponses = (request) => {\n  const responses = request.get('responses')\n    .filter(response => response instanceof Reference)\n    .map(reference => 'response_' + (reference.get('uuid') || '').split('/').slice(-1))\n    .valueSeq()\n    .toList()\n\n  return responses\n}\n\n/**\n * extracts the RAML `is` field from a Request\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType. Used to filter out the unwanted\n * reference to the globalMediaType from the parameters of the request\n * @param {Request} request: the request from which to extract the `is` field\n * @returns {Entry<string, Array<string>>?} the corresponding `is` field, if it exists, as an Entry\n */\nmethods.extractIsFromRequest = (mediaTypeUUID, request) => {\n  const traits = request\n    .get('interfaces')\n    .map(itf => itf.get('uuid'))\n    .valueSeq()\n    .toList()\n\n  const paramTraits = methods.extractTraitsFromRequestParameters(mediaTypeUUID, request)\n  const responseTraits = methods.extractTraitsFromResponses(request)\n\n  if (!traits.size && !paramTraits.length && !responseTraits.size) {\n    return null\n  }\n\n  return { key: 'is', value: [].concat(traits.toJS(), paramTraits, responseTraits.toJS()) }\n}\n\n// TODO deal with overlay\n/**\n * extract securedBy from a Request\n * @param {Request} request: the request to extract the securedBy field from\n * @returns {Entry<string, Array<string|Object>>?} the corresponding securedBy field, if it exists,\n * as an Entry\n */\nmethods.extractSecuredByFromRequest = (request) => {\n  const auths = request.get('auths')\n    .filter(auth => auth instanceof Reference || auth === null)\n    .map(authRef => {\n      if (authRef === null) {\n        return authRef\n      }\n\n      const authRefName = authRef.get('uuid')\n      if (\n        !authRef.get('overlay') ||\n        !(authRef.get('overlay') instanceof Auth.OAuth2) ||\n        !authRef.getIn([ 'overlay', 'scopes' ]).size\n      ) {\n        return authRefName\n      }\n\n      return {\n        [authRefName]: {\n          scopes: authRef.getIn([ 'overlay', 'scopes' ])\n            .map(({ key }) => key)\n            .toJS()\n        }\n      }\n    })\n    .valueSeq()\n\n  if (!auths.size) {\n    return null\n  }\n\n  return { key: 'securedBy', value: auths.toJS() }\n}\n\n/**\n * extracts the description from a Response\n * @param {Response} response: the response to get the description from\n * @returns {Entry<string, string>?} the corresponding description, if it exists, as an Entry\n */\nmethods.extractDescriptionFromResponse = (response) => {\n  const description = response.get('description')\n\n  if (!description) {\n    return null\n  }\n\n  return { key: 'description', value: description }\n}\n\n/**\n * extracts the headers from a Response\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo, that contains all that is\n * necessary to create DataTypes\n * @param {Request} response: the response to get the headers from\n * @returns {Entry<string, Object<string, RamlDataType>>?} the corresponding headers, if they\n * exist, as an Entry\n */\nmethods.extractHeadersFromResponse = (coreInfoMap, response) => {\n  return methods.extractHeadersFromRequest(coreInfoMap, response)\n}\n\n/**\n * extracts a RAMLBody from a response.\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Request} response: the response from which to extract the RAMLBody\n * @returns {Entry<string, RAMLBody>?} the corresponding RAMLBody if it exists, as an Entry\n */\nmethods.extractBodyFromResponse = (coreInfoMap, response) => {\n  return methods.extractBodyFromRequest(coreInfoMap, response)\n}\n\n/**\n * extracts a RAMLResponse from a Response.\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Response} response: the response to convert\n * @returns {RAMLResponse?} the corresponding RAMLResponse, if it exists\n */\nmethods.extractResponseFromResponseRecord = (coreInfoMap, response) => {\n  const kvs = [\n    methods.extractDescriptionFromResponse(response),\n    methods.extractHeadersFromResponse(coreInfoMap, response),\n    methods.extractBodyFromResponse(coreInfoMap, response)\n  ].filter(v => !!v)\n\n  if (!kvs.length) {\n    return null\n  }\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * extract RAMLResponses from a Request\n * @param {Map<string, coreInfo>} coreInfoMap: a map of coreInfo containing all that is necessary\n * to create DataTypes\n * @param {Request} request: the request to get the responses from\n * @returns {Entry<string, Object<string, RAMLResponse>>?} the corresponding responses, it they\n * exist, as an Entry\n */\nmethods.extractResponsesFromRequest = (coreInfoMap, request) => {\n  const responses = request.get('responses')\n    .filter(response => !(response instanceof Reference))\n    .map(response => {\n      const code = response.get('code')\n      const key = parseInt(code, 10) ? code : '200'\n      const value = methods.extractResponseFromResponseRecord(coreInfoMap, response)\n\n      if (!value) {\n        return null\n      }\n\n      return { key, value }\n    })\n    .filter(v => !!v)\n\n  if (!responses.size) {\n    return null\n  }\n\n  return { key: 'responses', value: responses.reduce(convertEntryListInMap, {}) }\n}\n\n/**\n * extracts a RAMLMethod from a Request\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Request} request: the request to convert into a RAMLMethodBase\n * @returns {RAMLMethod?} the corresponding RAMLMethod, if it exists\n */\nmethods.extractMethodFromRequest = (mediaTypeUUID, coreInfoMap, request) => {\n  const methodBase = methods.extractMethodBaseFromRequest(mediaTypeUUID, coreInfoMap, request)\n  return methodBase\n}\n\n/**\n * extracts a RAMLMethod from a Request, in Entry format\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Request} request: the request to convert into a RAMLMethodBase\n * @returns {Entry<string, RAMLMethod>?} the corresponding RAMLMethod, if it exists, as an Entry\n */\nmethods.extractMethodEntryFromRequest = (mediaTypeUUID, coreInfoMap, request) => {\n  const key = request.get('method')\n  const value = methods.extractMethodFromRequest(mediaTypeUUID, coreInfoMap, request)\n\n  if (!value) {\n    return null\n  }\n\n  return { key, value }\n}\n\n/**\n * extract RAMLMethods from a Resource\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Resource} resource: the resource from which to get the methods to convert\n * @returns {Array<RAMLMethod>} the corresponding array of RAMLMethod\n */\nmethods.extractMethodsFromResource = (mediaTypeUUID, coreInfoMap, resource) => {\n  const requests = resource.get('methods')\n    .map((request) => methods.extractMethodEntryFromRequest(mediaTypeUUID, coreInfoMap, request))\n    .filter(v => !!v)\n\n  if (!requests.size) {\n    return []\n  }\n\n  return requests.valueSeq().toJS()\n}\n\n/**\n * extracts the displayName from a Resource\n * @param {Resource} resource: the resource to get the displayName from\n * @returns {Entry<string, string>?} the corresponding displayName, if it exists, as an Entry\n */\nmethods.extractDisplayNameFromResource = (resource) => {\n  const key = 'name'\n  const value = resource.get(key) || null\n\n  if (!value) {\n    return null\n  }\n\n  return { key: 'displayName', value }\n}\n\n/**\n * extracts the description from a Resource\n * @param {Resource} resource: the resource to get the description from\n * @returns {Entry<string, string>?} the corresponding description, if it exists, as an Entry\n */\nmethods.extractDescriptionFromResource = (resource) => {\n  const key = 'description'\n  const value = resource.get(key) || null\n\n  if (!value) {\n    return null\n  }\n\n  return { key, value }\n}\n\n/**\n * extracts the resourceTypeRef from a Resource\n * @param {Resource} resource: the resource to get the resourceTypeRef from\n * @returns {Entry<string, string>?} the corresponding resourceTypeRef, if it exists, as an Entry\n */\nmethods.extractTypeFromResource = (resource) => {\n  const type = resource.get('interfaces')\n    .filter(itf => itf instanceof Reference)\n    .map(itf => itf.get('uuid'))\n    .valueSeq()\n    .get(0)\n\n  if (!type) {\n    return null\n  }\n\n  return { key: 'type', value: type }\n}\n\n/**\n * extracts the uriParameters from a Resource\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Resource} resource: the resource to get the uriParameters from\n * @returns {Entry<string, Object<string, RamlDataType>>?} the corresponding uriParameters, if they\n * exist, as an Entry\n */\nmethods.extractUriParametersFromResource = (coreInfoMap, resource) => {\n  const pathParam = resource.getIn([ 'path', 'pathname', 'parameter' ])\n\n  if (!pathParam || pathParam.get('superType') !== 'sequence') {\n    return null\n  }\n\n  const sequence = pathParam.get('value')\n\n  const uriParams = sequence\n    .filter(param => !!param.get('key'))\n    .map(param => methods.convertParameterIntoNamedParameter(coreInfoMap, param))\n    .reduce(convertEntryListInMap, {})\n\n  return { key: 'uriParameters', value: uriParams }\n}\n\n/**\n * extracts a RAMLResource from a Resource\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Resource} resource: the resource to convert\n * @returns {RAMLResource} the corresponding RAMLResource\n */\nmethods.extractResourceFromResourceRecord = (mediaTypeUUID, coreInfoMap, resource) => {\n  const kvs = [\n    methods.extractDisplayNameFromResource(resource),\n    methods.extractDescriptionFromResource(resource),\n    methods.extractTypeFromResource(resource),\n    methods.extractUriParametersFromResource(coreInfoMap, resource),\n    ...methods.extractMethodsFromResource(mediaTypeUUID, coreInfoMap, resource)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * nests resources entries according to their key (which should be the evaluated path of the\n * resource)\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Array<Entry<string, Resource>>} resources: the array of resource entries, where the keys\n * are the paths of the resources\n * @returns {RAMLResource} the corresponding nested resources\n */\nmethods.nestResources = (mediaTypeUUID, coreInfoMap, resources) => {\n  let nested = {}\n  const subResources = {}\n  for (const resource of resources) {\n    if (!resource.key.length) {\n      nested = methods.extractResourceFromResourceRecord(mediaTypeUUID, coreInfoMap, resource.value)\n    }\n    else {\n      const relativeUri = '/' + (resource.key.shift() || '')\n      subResources[relativeUri] = subResources[relativeUri] || []\n      subResources[relativeUri].push(resource)\n    }\n  }\n\n  const relativeUris = Object.keys(subResources)\n  for (const relativeUri of relativeUris) {\n    nested[relativeUri] = methods.nestResources(\n      mediaTypeUUID, coreInfoMap, subResources[relativeUri]\n    )\n  }\n\n  return nested\n}\n\n/**\n * extracts RAMLResources from an Api\n * @param {string?} mediaTypeUUID: the uuid of the globalMediaType, if it exists\n * @param {Map<string, coreInfo>} coreInfoMap: a Map of coreInfo that holds all that is necessary\n * to convert a schema into a RamlDataType\n * @param {Api} api: the api to get the resources from\n * @returns {Array<Entry<string, RAMLResource>>} the corresponding RAMLResources, as entries\n */\nmethods.extractResourcesFromApi = (mediaTypeUUID, coreInfoMap, api) => {\n  const resourceKVs = api.get('resources')\n    .map(resource => {\n      return {\n        key: resource.get('path').get('pathname').generate(List([ '{', '}' ])).split('/').slice(1),\n        value: resource\n      }\n    })\n    .valueSeq()\n    .toJS()\n\n  const nested = methods.nestResources(mediaTypeUUID, coreInfoMap, resourceKVs)\n  return entries(nested)\n}\n\n/**\n * converts an Api into a RAMLModel\n * @param {Api} api: the api to convert\n * @returns {RAMLModel} the corresponding converted model\n */\nmethods.createRAMLJSONModel = (api) => {\n  const coreInfoMap = methods.extractCoreInformationMapFromApi(api)\n  const mediaTypeUUID = methods.extractMediaTypeUUIDfromApi(api)\n\n  const kvs = [\n    methods.extractTitleFromApi(api),\n    methods.extractDescriptionFromApi(api),\n    methods.extractVersionFromApi(api),\n    methods.extractBaseUriFromApi(api),\n    methods.extractBaseUriParametersFromApi(coreInfoMap, api),\n    methods.extractProtocolsFromApi(api),\n    methods.extractMediaTypeFromApi(api),\n    methods.extractDataTypesFromApi(coreInfoMap),\n    methods.extractTraitsFromApi(mediaTypeUUID, coreInfoMap, api),\n    methods.extractResourceTypesFromApi(mediaTypeUUID, coreInfoMap, api),\n    methods.extractSecuritySchemesFromApi(api),\n    methods.extractSecuredByFromApi(api),\n    ...methods.extractResourcesFromApi(mediaTypeUUID, coreInfoMap, api)\n  ].filter(v => !!v)\n\n  return kvs.reduce(convertEntryListInMap, {})\n}\n\n/**\n * corrects responses codes not being integers in the ramlRaml string. This is due to RAML imposing\n * that response codes be integers, while it is impossible to have non-string keys in an object.\n * @param {string} rawRaml: the raml string to fix\n * @returns {string} the raml string, with integer codes, instead of string ones\n */\nmethods.fixResponseCodes = (rawRaml) => {\n  return rawRaml.replace(/^(\\s*)'([0-9]{3})':$/gm, '$1$2:')\n}\n\n/**\n * serializes an Api into a RAML document\n * @param {Object} args: the args passed to the serializer\n * @returns {string} the corresponding RAML document\n */\nmethods.serialize = ({ api }) => {\n  const model = methods.createRAMLJSONModel(api)\n  const raw = '#%RAML 1.0\\n' + yaml.safeDump(JSON.parse(JSON.stringify(model)))\n  const serialized = methods.fixResponseCodes(raw)\n  return serialized\n}\n\nexport const __internals__ = methods\nexport default RAMLSerializer\n"
  },
  {
    "path": "src/serializers/raml/v1.0/__tests__/Serializer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { OrderedMap, List } from 'immutable'\n\nimport { convertEntryListInMap } from '../../../../utils/fp-utils'\n\nimport Api from '../../../../models/Api'\nimport Store from '../../../../models/Store'\nimport Constraint from '../../../../models/Constraint'\nimport Info from '../../../../models/Info'\nimport URL from '../../../../models/URL'\nimport URLComponent from '../../../../models/URLComponent'\nimport Parameter from '../../../../models/Parameter'\nimport Interface from '../../../../models/Interface'\nimport Resource from '../../../../models/Resource'\nimport Request from '../../../../models/Request'\nimport Auth from '../../../../models/Auth'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Context from '../../../../models/Context'\nimport Reference from '../../../../models/Reference'\nimport Response from '../../../../models/Response'\nimport Variable from '../../../../models/Variable'\n\nimport Serializer, { __internals__ } from '../Serializer'\n\ndescribe('serializers/raml/v1.0/Serializer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Serializer }', () => {\n    describe('@serialize', () => {\n      it('should call __internals__.serialize', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const actual = Serializer.serialize()\n\n        expect(__internals__.serialize).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.serialize with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.serialize(input)\n\n        expect(__internals__.serialize).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@validate', () => {\n      it('should call __internals__.validate', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const actual = Serializer.validate()\n\n        expect(__internals__.validate).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.validate with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.validate(input)\n\n        expect(__internals__.validate).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@getKeysFromRecord', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { s: 'store', res: 'resources' }, new Api({ store: null, resources: null }) ],\n        [ { s: 'store', res: 'resources' }, new Api({ store: 345, resources: null }) ],\n        [ { s: 'store', res: 'resources' }, new Api({ store: 345, resources: 456 }) ]\n      ]\n      const expected = [\n        {},\n        { s: 345 },\n        { s: 345, res: 456 }\n      ]\n      const actual = inputs.map(input => __internals__.getKeysFromRecord(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@validate', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        true\n      ]\n      const actual = inputs.map(input => __internals__.validate(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractRefsFromObject', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRefsFromSchema').andCall(v => v ? [ v * 3 ] : [ 12 ])\n\n      const inputs = [\n        [ { a: 123, $ref: 234 }, 'unknown' ],\n        [ { a: 123, $ref: 234 }, 'a' ],\n        [ { a: 123, $ref: 234 }, '$ref' ]\n      ]\n      const expected = [\n        [ 12 ], [ 369 ], [ 234 ]\n      ]\n\n      const actual = inputs.map(input => __internals__.extractRefsFromObject(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isArray', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        '123123123123',\n        123,\n        [ 123, 234, 345 ]\n      ]\n      const expected = [\n        false, false, false, true\n      ]\n      const actual = inputs.map(input => __internals__.isArray(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRefsFromArray', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRefsFromSchema').andCall((a) => a.map(v => v + 1))\n\n      const inputs = [\n        [],\n        [ [ 123 ] ],\n        [ [ 234, 345 ], [ 456, 567 ] ]\n      ]\n      const expected = [\n        [],\n        [ 124 ],\n        [ 235, 346, 457, 568 ]\n      ]\n      const actual = inputs.map(input => __internals__.getRefsFromArray(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRefsFromObject', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRefsFromSchema').andCall(a => a.map(v => v + 1))\n\n      const inputs = [\n        {},\n        { a: [ 123, 234 ], b: [ 345, 456 ] }\n      ]\n      const expected = [\n        [],\n        [ 124, 235, 346, 457 ]\n      ]\n      const actual = inputs.map(input => __internals__.getRefsFromObject(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isNonObjectType', () => {\n    it('should work', () => {\n      /* eslint-disable no-undefined */\n      const inputs = [\n        undefined,\n        null,\n        123,\n        '123',\n        [ 234 ],\n        { a: 345 }\n      ]\n      /* eslint-enable no-undefined */\n      const expected = [\n        true, true, true, true, false, false\n      ]\n      const actual = inputs.map(input => __internals__.isNonObjectType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRefsFromNonObjectTypes', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        []\n      ]\n      const actual = inputs.map(input => __internals__.getRefsFromNonObjectTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getRefsFromSchema', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRefsFromArray').andCall(a => a.map(v => v + 1))\n      spyOn(__internals__, 'getRefsFromObject').andReturn([ 568, 679, 780 ])\n      const inputs = [\n        null,\n        123,\n        '234',\n        [ 345, 456 ],\n        { b: 567, c: 678 }\n      ]\n      const expected = [\n        [],\n        [],\n        [],\n        [ 346, 457 ],\n        [ 568, 679, 780 ]\n      ]\n      const actual = inputs.map(input => __internals__.getRefsFromSchema(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isConvertible', () => {\n    it('should work', () => {\n      const inputs = [\n        // true\n        null,\n        123,\n        '234',\n        [ 345, 456 ],\n        { a: 456, b: 567 },\n        // false\n        { a: 456, b: 567, exclusiveMaximum: true },\n        { a: 456, b: 567, exclusiveMinimum: true },\n        { a: 456, b: 567, additionalItems: true },\n        { a: 456, b: 567, patternProperties: true },\n        { a: 456, b: 567, dependencies: true },\n        { a: 456, b: 567, oneOf: true },\n        { a: 456, b: 567, not: true },\n        // true\n        [ { a: 456, b: 567 }, { c: 678, d: 789 } ],\n        // false\n        [ { a: 456, b: 567, not: false }, { c: 678, d: 789 } ],\n        [ { a: 456, b: 567 }, { c: 678, d: 789, not: false } ],\n        // true\n        { a: 456, b: 567, c: { a: 456, b: 567 } },\n        // false\n        { a: 456, b: 567, c: { a: 456, b: 567, c: { a: 456, b: 567, not: true } } }\n      ]\n      const expected = [\n        true, true, true, true, true,\n        false, false, false, false, false, false, false,\n        true,\n        false, false,\n        true,\n        false\n      ]\n      const actual = inputs.map(input => __internals__.isConvertible(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isObjectType', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { a: 123, b: 234 },\n        { a: 123, b: 234, properties: 345 },\n        { a: 123, b: 234, minProperties: 345 },\n        { a: 123, b: 234, maxProperties: 345 },\n        { a: 123, b: 234, discriminator: 345 },\n        { a: 123, b: 234, discriminatorValue: 345 }\n      ]\n      const expected = [\n        false, false,\n        true, true, true, true, true\n      ]\n      const actual = inputs.map(input => __internals__.isObjectType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isArrayType', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { a: 123, b: 234 },\n        { a: 123, b: 234, items: 345 },\n        { a: 123, b: 234, uniqueItems: 345 },\n        { a: 123, b: 234, minItems: 345 },\n        { a: 123, b: 234, maxItems: 345 }\n      ]\n      const expected = [\n        false, false,\n        true, true, true, true\n      ]\n      const actual = inputs.map(input => __internals__.isArrayType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isStringType', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { a: 123, b: 234 },\n        { a: 123, b: 234, pattern: 345 },\n        { a: 123, b: 234, minLength: 345 },\n        { a: 123, b: 234, maxLength: 345 }\n      ]\n      const expected = [\n        false, false,\n        true, true, true\n      ]\n      const actual = inputs.map(input => __internals__.isStringType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isNumberType', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { a: 123, b: 234 },\n        { a: 123, b: 234, minimum: 345 },\n        { a: 123, b: 234, maximum: 345 },\n        { a: 123, b: 234, multipleOf: 345 }\n      ]\n      const expected = [\n        false, false,\n        true, true, true\n      ]\n      const actual = inputs.map(input => __internals__.isNumberType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getType', () => {\n    it('should work', () => {\n      const inputs = [\n        { type: 123 },\n        { type: 'null' },\n        { properties: 234 },\n        { minItems: 345 },\n        { pattern: 456 },\n        { minimum: 567 },\n        { something: 'else' }\n      ]\n      const expected = [\n        123, 'nil', 'object', 'array', 'string', 'number', 'any'\n      ]\n      const actual = inputs.map(input => __internals__.getType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaItemsArrayIntoTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(t => [ t.join(' | ') ])\n\n      const inputs = [\n        [ [ 123 ], [ 234, 345 ] ]\n      ]\n      const expected = [\n        [ '(123)[]', '(234 | 345)[]' ]\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaItemsArrayIntoTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaItemsObjectIntoTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(({ a }) => a.length ? [ a.join(' | ') ] : [])\n\n      const inputs = [\n        { a: [] },\n        { a: [ 123 ] },\n        { a: [ 234, 345 ] }\n      ]\n      const expected = [\n        [],\n        [ '123[]' ],\n        [ '(234 | 345)[]' ]\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaItemsObjectIntoTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaItemsIntoTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertSchemaItemsArrayIntoTypes').andCall(a => a[0] + 1)\n      spyOn(__internals__, 'convertSchemaItemsObjectIntoTypes').andCall(({ a }) => a + 1)\n\n      const inputs = [\n        [ 123 ],\n        { a: 234 }\n      ]\n      const expected = [\n        124, 235\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaItemsIntoTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaAllOfIntoTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(a => a.map(v => v + 1))\n\n      const inputs = [\n        [ [ 123, 234 ], [ 345, 456 ] ]\n      ]\n      const expected = [\n        [ 123 + 1, 234 + 1, 345 + 1, 456 + 1 ]\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaAllOfIntoTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaAnyOfIntoTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(a => a.map(v => v + 1))\n\n      const inputs = [\n        [ [ 123, 234 ], [ 345, 456 ] ]\n      ]\n      const expected = [\n        [ '124 | 235 | 346 | 457' ]\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaAnyOfIntoTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getTypes', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getType').andCall(({ type }) => type + 1)\n      spyOn(__internals__, 'convertSchemaItemsIntoTypes').andCall(v => [ v + 1 ])\n      spyOn(__internals__, 'convertSchemaAllOfIntoTypes').andCall(v => [ v + 1 ])\n      spyOn(__internals__, 'convertSchemaAnyOfIntoTypes').andCall(v => [ v + 1 ])\n\n      const inputs = [\n        { type: 456 },\n        { $ref: '#/definitions/User' },\n        { items: 123 },\n        { allOf: 234 },\n        { anyOf: 345 }\n      ]\n      const expected = [\n        [ 457 ],\n        [ 'User' ],\n        [ 124 ],\n        [ 235 ],\n        [ 346 ]\n      ]\n      const actual = inputs.map(input => __internals__.getTypes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@applyCommonProps', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { c: 345 }, { a: 123, b: 234 } ],\n        [ { c: 345 }, { a: 123, b: 234,\n          minProperties: 1,\n          maxProperties: 2,\n          discriminator: 3,\n          discriminatorValue: 4,\n          additionalProperties: 5,\n          uniqueItems: 6,\n          minItems: 7,\n          maxItems: 8,\n          pattern: 9,\n          minLength: 10,\n          maxLength: 11,\n          maximum: 12,\n          minimum: 13,\n          multipleOf: 14,\n          enum: 15,\n          description: 16\n        } ]\n      ]\n      const expected = [\n        { c: 345 },\n        {\n          c: 345,\n          minProperties: 1,\n          maxProperties: 2,\n          discriminator: 3,\n          discriminatorValue: 4,\n          additionalProperties: 5,\n          uniqueItems: 6,\n          minItems: 7,\n          maxItems: 8,\n          pattern: 9,\n          minLength: 10,\n          maxLength: 11,\n          maximum: 12,\n          minimum: 13,\n          multipleOf: 14,\n          enum: 15,\n          description: 16\n        }\n      ]\n      const actual = inputs.map(input => __internals__.applyCommonProps(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addItemsProp', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(({ types }) => types)\n\n      const inputs = [\n        [ { a: 123 }, {} ],\n        [ { a: 123, type: [ 'object' ] }, {} ],\n        [ { a: 123, type: [ 'array' ] }, {} ],\n        [ { a: 123, type: [ 'object' ] }, { items: { types: 456 } } ],\n        [ { a: 123, type: [ 'array' ] }, { items: { types: 456 } } ],\n        [ { a: 123, type: [ 'object' ] }, { items: { types: [ 234, 345 ] } } ],\n        [ { a: 123, type: [ 'array' ] }, { items: { types: [ 234, 345 ] } } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123, type: [ 'object' ] },\n        { a: 123, type: [ 'array' ] },\n        { a: 123, type: [ 'object' ] },\n        { a: 123, type: [ 'array' ], items: 456 },\n        { a: 123, type: [ 'object' ] },\n        { a: 123, type: [ 'array' ], items: 234 }\n      ]\n      const actual = inputs.map(input => __internals__.addItemsProp(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addPropertiesProp', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertSchemaToDataType').andCall(({ v }) => {\n        return { v: v + 1 }\n      })\n\n      const inputs = [\n        [ { a: 123 }, {} ],\n        [ { a: 123 }, { properties: {} } ],\n        [ { a: 123 }, { properties: { b: { v: 234 }, c: { v: 345 } } } ],\n        [ { a: 123 }, { properties: { b: { v: 234 }, c: { v: 345 } }, required: [ 'c' ] } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123 },\n        { a: 123, properties: { b: { v: 235, required: false }, c: { v: 346, required: false } } },\n        { a: 123, properties: { b: { v: 235, required: false }, c: { v: 346 } } }\n      ]\n      const actual = inputs.map(input => __internals__.addPropertiesProp(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertSchemaToDataType', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTypes').andCall(({ a }) => a ? a : [])\n      spyOn(__internals__, 'applyCommonProps').andCall((d) => { d.common = 1; return d })\n      spyOn(__internals__, 'addItemsProp').andCall((d) => { d.items = 2; return d })\n      spyOn(__internals__, 'addPropertiesProp').andCall((d) => { d.props = 3; return d })\n\n      const inputs = [\n        {},\n        { a: [ 123 ] },\n        { a: [ 234, 345 ] }\n      ]\n      const expected = [\n        { type: [], common: 1, items: 2, props: 3 },\n        { type: 123, common: 1, items: 2, props: 3 },\n        { type: [ 234, 345 ], common: 1, items: 2, props: 3 }\n      ]\n      const actual = inputs.map(input => __internals__.convertSchemaToDataType(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@dumpJSONIntoDataType', () => {\n    it('should work', () => {\n      const circular1 = {}\n      const circular2 = { circular1 }\n      circular1.circular2 = circular2\n      const container = { a: { circular1 } }\n\n      const inputs = [\n        [ {}, [], OrderedMap() ],\n        [ { a: 123 }, [], OrderedMap() ],\n        [ { a: 123 }, [ '234', '345' ], OrderedMap() ],\n        [ { a: 123 }, [ '234', '345' ], OrderedMap({\n          '234': 123,\n          '345': 234\n        }) ],\n        [ { a: 123 }, [ '234', '345' ], OrderedMap({\n          '234': { schema: 234 * 2 },\n          '345': { schema: 345 * 2 }\n        }) ],\n        [ container, [], OrderedMap() ]\n      ]\n      const expected = [\n        JSON.stringify({}, null, 2),\n        JSON.stringify({ a: 123 }, null, 2),\n        JSON.stringify({ a: 123, definitions: { '234': {}, '345': {} } }, null, 2),\n        JSON.stringify({ a: 123, definitions: { '234': {}, '345': {} } }, null, 2),\n        JSON.stringify({ a: 123, definitions: { '234': 234 * 2, '345': 345 * 2 } }, null, 2),\n        container\n      ]\n      const actual = inputs.map(input => __internals__.dumpJSONIntoDataType(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getAllDependencies', () => {\n    it('should work', () => {\n      const inputs = [\n        [ OrderedMap(), {}, 'a' ],\n        [ OrderedMap(), { a: true }, 'b' ],\n        [ OrderedMap({ b: {} }), { a: true }, 'b' ],\n        [ OrderedMap({ b: {} }), { a: true }, 'b' ],\n        [ OrderedMap({ b: { deps: [] } }), { a: true }, 'b' ],\n        [ OrderedMap({ b: { deps: [] } }), { a: true }, 'b' ],\n        [ OrderedMap({ b: { deps: [ '#/definitions/User' ] } }), { a: true }, 'b' ],\n        [ OrderedMap({ b: { deps: [ '#/definitions/User' ] } }), { a: true }, 'b' ],\n        [ OrderedMap({\n          b: { deps: [ '#/defs/c' ] },\n          c: { deps: [ '#/defs/d' ] }\n        }), { a: true }, 'b' ],\n        [ OrderedMap({\n          b: { deps: [ '#/defs/c' ] },\n          c: { deps: [ '#/defs/d' ] }\n        }), { a: true }, 'b' ]\n      ]\n      const expected = [\n        { a: true },\n        { a: true, b: true },\n        { a: true, b: true },\n        { a: true, b: true },\n        { a: true, b: true },\n        { a: true, b: true },\n        { a: true, b: true, User: true },\n        { a: true, b: true, User: true },\n        { a: true, b: true, c: true, d: true },\n        { a: true, b: true, c: true, d: true }\n      ]\n      const actual = inputs.map(input => __internals__.getAllDependencies(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@markSchema', () => {\n    it('should work', () => {\n      const inputs = [\n        [ OrderedMap({ a: { b: 123 } }), 'a' ]\n      ]\n      const expected = [\n        OrderedMap({ a: { b: 123, marked: true } })\n      ]\n      const actual = inputs.map(input => __internals__.markSchema(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@unmarkSchemas', () => {\n    it('should work', () => {\n      const inputs = [\n        OrderedMap({ a: { b: 123, marked: true }, c: { d: 234, marked: true } })\n      ]\n      const expected = [\n        OrderedMap({ a: { b: 123 }, c: { d: 234 } })\n      ]\n      const actual = inputs.map(input => __internals__.unmarkSchemas(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@areSchemaAndDepsConvertible', () => {\n    it('should work', () => {\n      const inputs = [\n        [ OrderedMap(), 'a' ],\n        [ OrderedMap({ a: {} }), 'a' ],\n        [ OrderedMap({ a: { convertible: false } }), 'a' ],\n        [ OrderedMap({ a: { convertible: true } }), 'a' ],\n        [ OrderedMap({ a: { convertible: true, deps: [] } }), 'a' ],\n        [ OrderedMap({\n          a: { convertible: true, deps: [ '#/def/b' ] },\n          b: { convertible: true }\n        }), 'a' ],\n        [ OrderedMap({\n          a: { convertible: true, deps: [ '#/def/b' ] },\n          b: { convertible: false }\n        }), 'a' ],\n        [ OrderedMap({\n          a: { convertible: true, deps: [ '#/def/c' ] },\n          b: { convertible: false }\n        }), 'a' ]\n      ]\n      const expected = [\n        false,\n        false,\n        false,\n        true,\n        true,\n        true,\n        false,\n        true\n      ]\n      const actual = inputs.map(input => __internals__.areSchemaAndDepsConvertible(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractCoreInformationFromConstraint', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getRefsFromSchema').andReturn(123)\n      spyOn(__internals__, 'isConvertible').andReturn(true)\n\n      const constraint = { toJSONSchema: () => ({ b: 234 }) }\n      const inputs = [\n        [ constraint, 'a' ]\n      ]\n      const expected = [\n        { constraint, schema: { b: 234 }, deps: 123, convertible: true, name: 'a' }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractCoreInformationFromConstraint(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDataTypeFromCoreInformation', () => {\n    it('should work', () => {\n      const api = new Api({ store: new Store({\n        constraint: OrderedMap({\n          User: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              pet: {\n                $ref: '#/definitions/Pet'\n              },\n              home: {\n                $ref: '#/definitions/Home'\n              },\n              car: {\n                $ref: '#/definitions/Car'\n              }\n            }\n          }),\n          Pet: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              home: {\n                $ref: '#/definitions/Home'\n              },\n              race: { type: 'string', enum: [ 'cat', 'dog' ] }\n            }\n          }),\n          Home: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              address: {\n                type: 'string'\n              },\n              postalCode: {\n                type: 'integer'\n              },\n              surface: {\n                type: 'number'\n              }\n            }\n          }),\n          Car: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              numberOfSeats: {\n                type: 'integer',\n                minimum: 0,\n                exclusiveMinimum: true\n              }\n            }\n          })\n        })\n      }) })\n      const coreInfo = __internals__.extractCoreInformationMapFromApi(api)\n\n      const inputs = [\n        [\n          {\n            schema: {\n              type: 'object',\n              properties: {\n                home: {\n                  $ref: '#/definitions/Home'\n                }\n              }\n            },\n            name: 'Pet',\n            deps: [ '#/defintions/Home' ],\n            convertible: true\n          },\n          'Pet',\n          coreInfo\n        ],\n        [\n          {\n            schema: {\n              type: 'object',\n              properties: {\n                numberOfSeats: {\n                  type: 'integer',\n                  exclusiveMinimum: true\n                }\n              }\n            },\n            name: 'Car',\n            deps: [],\n            convertible: false\n          },\n          'Car',\n          coreInfo\n        ],\n        [\n          {\n            schema: {\n              title: 'SimpleExternalSchema',\n              type: 'string',\n              pattern: '^[0-9a-f]{16}$'\n            },\n            name: 'SimpleExternalSchema',\n            deps: [],\n            convertible: true\n          },\n          null,\n          coreInfo\n        ],\n        [\n          {\n            schema: {\n              title: 'ExternalSchemaWithReference',\n              type: 'object',\n              properties: {\n                home: {\n                  $ref: '#/definitions/Home'\n                }\n              }\n            },\n            name: 'ExternalSchemaWithReference',\n            deps: [ '#/definitions/Home' ],\n            convertible: true\n          },\n          null,\n          coreInfo\n        ],\n        [\n          {\n            schema: {\n              title: 'ExternalJSONSchema',\n              type: 'object',\n              properties: {\n                car: {\n                  $ref: '#/definitions/Car'\n                }\n              }\n            },\n            name: 'ExternalJSONSchema',\n            deps: [ '#/definitions/Car' ],\n            convertible: true\n          },\n          null,\n          coreInfo\n        ]\n      ]\n      const expected = [\n        {\n          key: 'Pet',\n          value: { type: 'object', properties: { home: { type: 'Home', required: false } } } },\n        { key: 'Car', value: JSON.stringify({\n          type: 'object',\n          properties: {\n            numberOfSeats: {\n              type: 'integer',\n              exclusiveMinimum: true\n            }\n          }\n        }, null, 2) },\n        { key: 'SimpleExternalSchema', value: {\n          type: 'string',\n          pattern: '^[0-9a-f]{16}$'\n        } },\n        { key: 'ExternalSchemaWithReference', value: {\n          type: 'object',\n          properties: {\n            home: {\n              type: 'Home',\n              required: false\n            }\n          }\n        } },\n        { key: 'ExternalJSONSchema', value: JSON.stringify({\n          title: 'ExternalJSONSchema',\n          type: 'object',\n          properties: {\n            car: {\n              $ref: '#/definitions/Car'\n            }\n          },\n          definitions: {\n            Car: {\n              type: 'object',\n              properties: {\n                numberOfSeats: {\n                  type: 'integer',\n                  minimum: 0,\n                  exclusiveMinimum: true\n                }\n              }\n            }\n          }\n        }, null, 2) }\n      ]\n      const actual = inputs.map(input => __internals__.extractDataTypeFromCoreInformation(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDataTypeFromCoreInformation', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'areSchemaAndDepsConvertible').andCall((v, n) => n === 'a')\n      spyOn(__internals__, 'unmarkSchemas').andCall(c => c)\n\n      spyOn(__internals__, 'convertSchemaToDataType').andCall(s => s.a)\n      spyOn(__internals__, 'getAllDependencies').andReturn({ b: 'ignored', c: 345, d: 456 })\n      spyOn(__internals__, 'dumpJSONIntoDataType').andCall((s, d) => {\n        return [ s.b, ...d ].join(',')\n      })\n\n      const coreInformationData1 = { schema: { a: 123 }, name: 'a' }\n      const coreInformationData2 = { schema: { b: 234 }, name: 'b' }\n      const inputs = [\n        [ coreInformationData1, 'a', OrderedMap({\n          a: coreInformationData1,\n          b: coreInformationData2\n        }) ],\n        [ coreInformationData2, 'b', OrderedMap({\n          a: coreInformationData1,\n          b: coreInformationData2\n        }) ]\n      ]\n      const expected = [\n        { key: 'a', value: 123 },\n        { key: 'b', value: '234,c,d' }\n      ]\n      const actual = inputs.map(input => __internals__.extractDataTypeFromCoreInformation(...input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractDataTypesFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractDataTypeFromCoreInformation').andCall(\n        (v, k) => ({ key: k, value: v * 2 + 1 })\n      )\n\n      const inputs = [\n        OrderedMap({ a: 123, b: 234 })\n      ]\n      const expected = [\n        { key: 'types', value: { a: 247, b: 469 } }\n      ]\n      const actual = inputs.map(input => __internals__.extractDataTypesFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('it should work for real', () => {\n      const api = new Api({ store: new Store({\n        constraint: OrderedMap({\n          User: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              pet: {\n                $ref: '#/definitions/Pet'\n              },\n              home: {\n                $ref: '#/definitions/Home'\n              },\n              car: {\n                $ref: '#/definitions/Car'\n              }\n            }\n          }),\n          Pet: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              home: {\n                $ref: '#/definitions/Home'\n              },\n              race: { type: 'string', enum: [ 'cat', 'dog' ] }\n            }\n          }),\n          Home: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              address: {\n                type: 'string'\n              },\n              postalCode: {\n                type: 'integer'\n              },\n              surface: {\n                type: 'number'\n              }\n            }\n          }),\n          Car: new Constraint.JSONSchema({\n            type: 'object',\n            properties: {\n              make: {\n                type: 'string'\n              },\n              milage: {\n                type: 'number',\n                minimum: 0\n              },\n              numberOfSeats: {\n                type: 'integer',\n                minimum: 0,\n                exclusiveMinimum: true\n              }\n            }\n          })\n        })\n      }) })\n      const input = __internals__.extractCoreInformationMapFromApi(api)\n      const expected = { key: 'types', value: {\n        User: JSON.stringify({\n          type: 'object',\n          properties: {\n            pet: {\n              $ref: '#/definitions/Pet'\n            },\n            home: {\n              $ref: '#/definitions/Home'\n            },\n            car: {\n              $ref: '#/definitions/Car'\n            }\n          },\n          definitions: {\n            Pet: {\n              type: 'object',\n              properties: {\n                home: {\n                  $ref: '#/definitions/Home'\n                },\n                race: { type: 'string', enum: [ 'cat', 'dog' ] }\n              }\n            },\n            Home: {\n              type: 'object',\n              properties: {\n                address: {\n                  type: 'string'\n                },\n                postalCode: {\n                  type: 'integer'\n                },\n                surface: {\n                  type: 'number'\n                }\n              }\n            },\n            Car: {\n              type: 'object',\n              properties: {\n                make: {\n                  type: 'string'\n                },\n                milage: {\n                  type: 'number',\n                  minimum: 0\n                },\n                numberOfSeats: {\n                  type: 'integer',\n                  minimum: 0,\n                  exclusiveMinimum: true\n                }\n              }\n            }\n          }\n        }, null, 2),\n        Home: {\n          type: 'object',\n          properties: {\n            address: {\n              required: false,\n              type: 'string'\n            },\n            postalCode: {\n              required: false,\n              type: 'integer'\n            },\n            surface: {\n              required: false,\n              type: 'number'\n            }\n          }\n        },\n        Pet: {\n          type: 'object',\n          properties: {\n            home: {\n              required: false,\n              type: 'Home'\n            },\n            race: { type: 'string', enum: [ 'cat', 'dog' ], required: false }\n          }\n        },\n        Car: JSON.stringify({\n          type: 'object',\n          properties: {\n            make: {\n              type: 'string'\n            },\n            milage: {\n              type: 'number',\n              minimum: 0\n            },\n            numberOfSeats: {\n              type: 'integer',\n              minimum: 0,\n              exclusiveMinimum: true\n            }\n          }\n        }, null, 2)\n      } }\n      const actual = __internals__.extractDataTypesFromApi(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTitleFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ title: 123 }) })\n      ]\n      const expected = [\n        null, null, { key: 'title', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractTitleFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescriptionFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ description: 123 }) })\n      ]\n      const expected = [\n        null, null, { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractDescriptionFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractVersionFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ info: new Info() }),\n        new Api({ info: new Info({ version: 123 }) })\n      ]\n      const expected = [\n        null, null, { key: 'version', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractVersionFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBaseUriFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ endpoint: OrderedMap() }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          a: new URL({\n            url: 'https://echo.paw.cloud/base',\n            variableDelimiters: List([ '{', '}' ])\n          })\n          .set('protocol', List())\n          .set('slashes', false)\n          .set('hostname', null)\n          .set('port', null)\n          .set('pathname', null)\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          a: new URL({ url: 'https://echo.paw.cloud/base', variableDelimiters: List([ '{', '}' ]) })\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          a: new URL({ url: 'http://echo.paw.cloud/base', variableDelimiters: List([ '{', '}' ]) }),\n          b: new URL({ url: 'http://echo.paw.cloud/:v:', variableDelimiters: List([ ':' ]) }),\n          c: new URL({ url: 'https://echo.paw.cloud/base', variableDelimiters: List([ '{', '}' ]) })\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          a: new URL({ url: 'http://echo.paw.cloud/:v:', variableDelimiters: List([ ':' ]) }),\n          b: new URL({ url: 'http://echo.paw.cloud/base', variableDelimiters: List([ '{', '}' ]) }),\n          c: new URL({ url: 'https://echo.paw.cloud/base', variableDelimiters: List([ '{', '}' ]) })\n        }) }) })\n      ]\n      const expected = [\n        null, null, null, null,\n        { key: 'baseUri', value: 'https://echo.paw.cloud/base' },\n        { key: 'baseUri', value: 'http://echo.paw.cloud/base' },\n        { key: 'baseUri', value: 'http://echo.paw.cloud/{v}' }\n      ]\n      const actual = inputs.map(input => __internals__.extractBaseUriFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with variable', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ variable: OrderedMap() }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          a: new Variable({ name: 'a' })\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          a: new Variable({\n            name: 'a',\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base'\n            })\n          })\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          a: new Variable({\n            name: 'a',\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base',\n              fallback: 'http://echo.paw.cloud/fallback'\n            })\n          })\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          a: new Variable({\n            name: 'a',\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base',\n              fallback: 'http://echo.paw.cloud/fallback'\n            })\n          }),\n          b: new Variable({\n            name: 'b',\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/other',\n              fallback: 'http://echo.paw.cloud/otherfallback'\n            })\n          })\n        }) }) })\n      ]\n      const expected = [\n        null, null, null, null,\n        { key: 'baseUri', value: 'https://echo.paw.cloud/base' },\n        { key: 'baseUri', value: 'https://echo.paw.cloud/base' },\n        { key: 'baseUri', value: 'https://echo.paw.cloud/base' }\n      ]\n      const actual = inputs.map(input => __internals__.extractBaseUriFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractParametersFromURLComponent', () => {\n    it('should work', () => {\n      const inputs = [\n        new URLComponent(),\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/base',\n          variableDelimiters: List([ '{', '}' ])\n        }),\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/base/{userId}',\n          variableDelimiters: List([ '{', '}' ])\n        }).set('parameter', new Parameter({ superType: 'sequence' })),\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/base/{userId}',\n          variableDelimiters: List([ '{', '}' ])\n        }),\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/base/{userId}',\n          variableDelimiters: List([ '{', '}' ]),\n          parameter: new Parameter({\n            key: 'pathname',\n            name: 'pathname',\n            type: 'string',\n            constraints: List([ new Constraint.Enum([ '/base/123', '/base/234' ]) ])\n          })\n        }),\n        new URLComponent({\n          componentName: 'pathname',\n          string: '/base/{userId}',\n          variableDelimiters: List([ '{', '}' ]),\n          parameter: new Parameter({\n            key: 'pathname',\n            name: 'pathname',\n            type: 'string',\n            superType: 'sequence',\n            value: List([\n              new Parameter({ type: 'string', default: '/base/' }),\n              new Parameter({\n                key: 'userId',\n                name: 'User Id',\n                type: 'string',\n                constraints: List([ new Constraint.Enum([ '123', '234' ]) ])\n              })\n            ])\n          })\n        })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        List([\n          new Parameter({\n            key: 'userId',\n            name: 'userId',\n            type: 'string',\n            default: 'userId'\n          })\n        ]),\n        null,\n        List([\n          new Parameter({\n            key: 'userId',\n            name: 'User Id',\n            type: 'string',\n            constraints: List([ new Constraint.Enum([ '123', '234' ]) ])\n          })\n        ])\n      ]\n      const actual = inputs.map(input => __internals__.extractParametersFromURLComponent(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertJSONSchemaIntoNamedParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractCoreInformationFromSchema').andCall(s => {\n        s.deps = s.deps.reduce((a, b) => a + b, 0)\n        return s\n      })\n\n      spyOn(__internals__, 'extractDataTypeFromCoreInformation').andCall(\n        ({ deps, convertible, name }, key, core) => {\n          core.b = deps\n          core.c = convertible\n          core.n = name\n          return core\n        }\n      )\n\n      const inputs = [\n        [ { a: 123 }, 'application/json', { deps: [ 234, 345 ], convertible: true } ],\n        [ { a: 456 }, 'toto', { deps: [], convertible: false } ]\n      ]\n\n      const expected = [\n        { a: 123, b: 234 + 345, c: true, n: 'application/json' },\n        { a: 456, b: 0, c: false, n: 'toto' }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.convertJSONSchemaIntoNamedParameter(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterIntoNamedParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertJSONSchemaIntoNamedParameter').andCall((c, k, s) => {\n        return Object.assign({}, s || {}, c, { key: k })\n      })\n\n      const inputs = [\n        [ { a: 123 }, null ],\n        [ { a: 123 }, new Parameter({ key: 234 }) ],\n        [ { a: 123 }, new Parameter({\n          key: 345,\n          constraints: List([ new Constraint.JSONSchema({\n            type: 'string',\n            enum: [ 'abc', 'def' ]\n          }) ])\n        }) ]\n      ]\n      const expected = [\n        null,\n        { a: 123, key: 234, 'x-title': 234 },\n        { a: 123, key: 345, type: 'string', enum: [ 'abc', 'def' ], 'x-title': 345 }\n      ]\n      const actual = inputs.map(input => __internals__.convertParameterIntoNamedParameter(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBaseUriParametersFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, p) => {\n        return { key: p.get('key'), value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, new Api() ],\n        [ { a: 123 }, new Api({ store: new Store() }) ],\n        [ { a: 123 }, new Api({ store: new Store({ endpoint: OrderedMap() }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://echo.paw.cloud/base',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) }) }) ],\n        [ { a: 234 }, new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base',\n            variableDelimiters: List([ '{', '}' ])\n          }),\n          c: new URL({\n            url: 'https://echo.paw.cloud/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) }) }) ]\n      ]\n\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        { key: 'baseUriParameters', value: { sub: 123, port: 123, userId: 123 } },\n        { key: 'baseUriParameters', value: { sub: 234, port: 234 } }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractBaseUriParametersFromApi(...input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with variable', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, p) => {\n        return { key: p.get('key'), value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, new Api() ],\n        [ { a: 123 }, new Api({ store: new Store() }) ],\n        [ { a: 123 }, new Api({ store: new Store({ variable: OrderedMap() }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable()\n        }) }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({ default: 'https://echo.paw.cloud/base' })\n          })\n        }) }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base',\n              fallback: 'http://echo.paw.cloud/fallback'\n            })\n          })\n        }) }) }) ],\n        [ { a: 123 }, new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base'\n            })\n          }),\n          c: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base'\n            })\n          })\n        }) }) }) ]\n      ]\n\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        null,\n        null,\n        null\n      ]\n\n      const actual = inputs.map(input => __internals__.extractBaseUriParametersFromApi(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractProtocolsFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ variable: OrderedMap() }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable()\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({ default: 'https://echo.paw.cloud/base' })\n          })\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base',\n              fallback: 'http://echo.paw.cloud/fallback'\n            })\n          })\n        }) }) }),\n        new Api({ store: new Store({ variable: OrderedMap({\n          b: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base'\n            })\n          }),\n          c: new Variable({\n            values: OrderedMap({\n              default: 'https://echo.paw.cloud/base'\n            })\n          })\n        }) }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTPS' ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractProtocolsFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with enpoints', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ endpoint: OrderedMap() }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://echo.paw.cloud/base',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://echo.paw.cloud/base',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('protocol', List())\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('protocol', List([ 'http:', 'https:' ]))\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('protocol', List([ 'http:', 'https:', 'wss:' ]))\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('protocol', List([ 'ws:', 'wss:' ]))\n        }) }) }),\n        new Api({ store: new Store({ endpoint: OrderedMap({\n          b: new URL({\n            url: 'https://{sub}.paw.cloud:{port}/base',\n            variableDelimiters: List([ '{', '}' ])\n          }).set('protocol', List([ 'http:', 'https:' ])),\n          c: new URL({\n            url: 'https://echo.paw.cloud/base/{userId}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        null,\n        { key: 'protocols', value: [ 'HTTP', 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTP', 'HTTPS' ] },\n        null,\n        { key: 'protocols', value: [ 'HTTP', 'HTTPS' ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractProtocolsFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMediaTypeUUIDfromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          Irrelevant: new Parameter({\n            key: 'user',\n            default: '123'\n          })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          mediaType: new Parameter({\n            key: 'Content-Type',\n            default: '123'\n          })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          mediaType_1: new Parameter({\n            key: 'Content-Type',\n            default: '123'\n          }),\n          mediaType_2: new Parameter({\n            key: 'Content-Type',\n            default: '234'\n          })\n        }) }) })\n      ]\n      const expected = [\n        null,\n        null,\n        'mediaType',\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractMediaTypeUUIDfromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMediaTypeFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ parameter: OrderedMap() }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' }),\n          b: new Parameter({ key: 'Content-Type', default: 'application/json' })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' }),\n          b: new Parameter({ key: 'Content-Type', default: 'application/json' }),\n          c: new Parameter({ key: 'Content-Type', default: 'application/xml' })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' }),\n          b: new Parameter({ key: 'Content-Type', default: 'application/json' }),\n          c: new Parameter({ key: 'Content-Type', default: 'application/xml', usedIn: 'response' })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' }),\n          b: new Parameter({\n            key: 'Content-Type',\n            constraints: List([ new Constraint.Enum([ 'application/json', 'application/xml' ]) ])\n          })\n        }) }) }),\n        new Api({ store: new Store({ parameter: OrderedMap({\n          a: new Parameter({ key: 'Irrelevant' }),\n          b: new Parameter({\n            key: 'Content-Type',\n            constraints: List([ new Constraint.Pattern('application/.*') ])\n          })\n        }) }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        { key: 'mediaType', value: 'application/json' },\n        null,\n        { key: 'mediaType', value: 'application/json' },\n        { key: 'mediaType', value: [ 'application/json', 'application/xml' ] },\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractMediaTypeFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMethodBaseFromRequest', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'extractDisplayNameFromRequest')\n        .andCall(r => r ? { key: 'displayName', value: 123 } : null)\n      spyOn(__internals__, 'extractDescriptionFromRequest')\n        .andCall(r => r ? { key: 'description', value: 234 } : null)\n      spyOn(__internals__, 'extractQueryParametersFromRequest')\n        .andCall((c, r) => r ? { key: 'queryParameters', value: 345 } : null)\n      spyOn(__internals__, 'extractHeadersFromRequest')\n        .andCall((c, r) => r ? { key: 'headers', value: 456 } : null)\n      spyOn(__internals__, 'extractBodyFromRequest')\n        .andCall((c, r) => r ? { key: 'body', value: 567 } : null)\n      spyOn(__internals__, 'extractProtocolsFromRequest')\n        .andCall(r => r ? { key: 'protocols', value: 678 } : null)\n      spyOn(__internals__, 'extractIsFromRequest')\n        .andCall((m, r) => r ? { key: 'is', value: 789 } : null)\n      spyOn(__internals__, 'extractSecuredByFromRequest')\n        .andCall(r => r ? { key: 'securedBy', value: 890 } : null)\n      spyOn(__internals__, 'extractResponsesFromRequest')\n        .andCall((c, r) => r ? { key: 'responses', value: 901 } : null)\n\n      const inputs = [\n        [ null, null, null ],\n        [ null, null, {} ]\n      ]\n      const expected = [\n        null,\n        {\n          displayName: 123,\n          description: 234,\n          queryParameters: 345,\n          headers: 456,\n          body: 567,\n          protocols: 678,\n          is: 789,\n          securedBy: 890,\n          responses: 901\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodBaseFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractTraitsFromInterfaces', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodBaseFromRequest').andCall((m, c, v) => m + c + v)\n\n      const inputs = [\n        [ 123, 234, new Api() ],\n        [ 123, 234, new Api({\n          store: new Store({ interface: OrderedMap({\n            abc: new Interface({ uuid: 'abc', level: 'response' })\n          }) })\n        }) ],\n        [ 123, 234, new Api({\n          store: new Store({ interface: OrderedMap({\n            abc: new Interface({ uuid: 'abc', level: 'request' }),\n            def: new Interface({ uuid: 'def', level: 'request', underlay: 345 })\n          }) })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 'abc', value: {} }, { key: 'def', value: 123 + 234 + 345 } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromInterfaces(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMethodBaseFromParameter', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall((c) => {\n        if (!c) {\n          return null\n        }\n\n        if (c % 2 === 0) {\n          return { value: c * 3 }\n        }\n\n        return { key: c, value: c * 2 }\n      })\n      const inputs = [\n        [ null, new Parameter() ],\n        [ 123, new Parameter() ],\n        [ 123, new Parameter({ in: 'headers' }) ],\n        [ 123, new Parameter({ in: 'queries' }) ],\n        [ 123, new Parameter({ in: 'body' }) ],\n        [ 234, new Parameter({ in: 'body' }) ]\n      ]\n      const expected = [\n        null,\n        null,\n        { headers: { '123': 123 * 2 } },\n        { queryParameters: { '123': 123 * 2 } },\n        { body: { '123': 123 * 2 } },\n        { body: 234 * 3 }\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodBaseFromParameter(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTraitsFromParameters', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodBaseFromParameter').andCall((c, p) => {\n        return p % 2 ? null : p + c\n      })\n\n      const inputs = [\n        [ 'globalMediaType', 123, new Api() ],\n        [ 'globalMediaType', 123, new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              user: 234\n            })\n          })\n        }) ],\n        [ 'globalMediaType', 123, new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              user: 234,\n              globalMediaType: 345\n            })\n          })\n        }) ],\n        [ 'globalMediaType', 123, new Api({\n          store: new Store({\n            parameter: OrderedMap({\n              user: 234,\n              removed: 345,\n              song: 456\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [ { key: 'user', value: 123 + 234 } ],\n        [ { key: 'user', value: 123 + 234 } ],\n        [ { key: 'user', value: 123 + 234 }, { key: 'song', value: 123 + 456 } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromParameters(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMethodBaseFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResponsesFromRequest').andCall((c, req) => {\n        if (req.getIn([ 'responses', '200' ])) {\n          return { key: '200', value: c }\n        }\n\n        return null\n      })\n\n      const inputs = [\n        [ 123, new Response() ],\n        [ 123, new Response({ code: 200 }) ]\n      ]\n      const expected = [\n        null,\n        { '200': 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodBaseFromResponse(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTraitsFromSharedResponses', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodBaseFromResponse').andCall((c, r) => {\n        return r % 2 ? null : c + r\n      })\n      const inputs = [\n        [ 123, new Api() ],\n        [ 123, new Api({\n          store: new Store({\n            response: OrderedMap({\n              default: 234,\n              failure: 345\n            })\n          })\n        }) ],\n        [ 123, new Api({\n          store: new Store({\n            response: OrderedMap({\n              default: 234,\n              failure: 345,\n              internal: 456\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [ { key: 'response_default', value: 234 + 123 } ],\n        [\n          { key: 'response_default', value: 234 + 123 },\n          { key: 'response_internal', value: 456 + 123 }\n        ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromSharedResponses(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTraitsFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodBaseFromRequest').andCall((m, c, u) => {\n        if (!u) {\n          return null\n        }\n\n        return u.get('description')\n      })\n\n      spyOn(__internals__, 'extractTraitsFromParameters').andReturn([])\n\n      const inputs = [\n        [ { m: 123 }, { c: 234 }, new Api() ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store() }) ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store({ interface: OrderedMap() }) }) ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store({ interface: OrderedMap({\n          a: new Interface({ level: 'resource', uuid: 'a', underlay: new Resource() })\n        }) }) }) ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store({ interface: OrderedMap({\n          a: new Interface({ level: 'resource', uuid: 'a', underlay: new Resource() }),\n          b: new Interface({ level: 'request', uuid: 'b', underlay: null })\n        }) }) }) ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store({ interface: OrderedMap({\n          a: new Interface({ level: 'resource', uuid: 'a', underlay: new Resource() }),\n          b: new Interface({ level: 'request', uuid: 'b', underlay: null }),\n          c: new Interface({ level: 'request', uuid: 'c', underlay: new Request({\n            description: 123\n          }) })\n        }) }) }) ],\n        [ { m: 123 }, { c: 234 }, new Api({ store: new Store({ interface: OrderedMap({\n          a: new Interface({ level: 'resource', uuid: 'a', underlay: new Resource() }),\n          b: new Interface({ level: 'request', uuid: 'b', underlay: null }),\n          c: new Interface({ level: 'request', uuid: 'c', underlay: new Request({\n            description: 123\n          }) }),\n          d: new Interface({ level: 'request', uuid: 'd', underlay: new Request({\n            description: 234\n          }) })\n        }) }) }) ]\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        null,\n        { key: 'traits', value: { b: {} } },\n        { key: 'traits', value: { b: {}, c: 123 } },\n        { key: 'traits', value: { b: {}, c: 123, d: 234 } }\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromApi(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceTypesFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResourceFromResourceRecord').andCall((m, c, v) => m + c + v)\n\n      const inputs = [\n        [ 123, 234, new Api() ],\n        [ 123, 234, new Api({\n          store: new Store({\n            interface: OrderedMap({\n              Irrelevant: new Interface({ level: 'response' })\n            })\n          })\n        }) ],\n        [ 123, 234, new Api({\n          store: new Store({\n            interface: OrderedMap({\n              abc: new Interface({ uuid: 'abc', level: 'resource' }),\n              def: new Interface({ uuid: 'def', level: 'resource', underlay: 345 }),\n              ghi: new Interface({ uuid: 'ghi', level: 'resource', underlay: 456 })\n            })\n          })\n        }) ]\n      ]\n\n      /* eslint-disable no-undefined */\n      const expected = [\n        null,\n        null,\n        { key: 'resourceTypes', value: {\n          abc: undefined,\n          def: 123 + 234 + 345,\n          ghi: 123 + 234 + 456\n        } }\n      ]\n      /* eslint-enable no-undefined */\n\n      const actual = inputs.map(input => __internals__.extractResourceTypesFromApi(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromBasicAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Basic({ authName: 'basic_auth' }),\n        new Auth.Basic({ authName: 'basic_auth', description: '123' })\n      ]\n      const expected = [\n        { key: 'basic_auth', value: { type: 'Basic Authentication' } },\n        { key: 'basic_auth', value: { type: 'Basic Authentication', description: '123' } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromBasicAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromDigestAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Digest({ authName: 'digest_auth' }),\n        new Auth.Digest({ authName: 'digest_auth', description: '123' })\n      ]\n      const expected = [\n        { key: 'digest_auth', value: { type: 'Digest Authentication' } },\n        { key: 'digest_auth', value: { type: 'Digest Authentication', description: '123' } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromDigestAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescribedByForApiKeyAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.ApiKey({ authName: 'api_key' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123', in: 'header', name: 'abc' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123', in: 'query', name: 'abc' })\n      ]\n      const expected = [\n        null,\n        null,\n        { headers: { abc: { type: 'string' } } },\n        { queryParameters: { abc: { type: 'string' } } }\n      ]\n      const actual = inputs.map(input => __internals__.extractDescribedByForApiKeyAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromApiKeyAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.ApiKey({ authName: 'api_key' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123', in: 'header', name: 'abc' }),\n        new Auth.ApiKey({ authName: 'api_key', description: '123', in: 'query', name: 'abc' })\n      ]\n      const expected = [\n        { key: 'api_key', value: { type: 'Pass Through' } },\n        { key: 'api_key', value: { type: 'Pass Through', description: '123' } },\n        { key: 'api_key', value: { type: 'Pass Through',\n          description: '123',\n          describedBy: { headers: { abc: { type: 'string' } } }\n        } },\n        { key: 'api_key', value: { type: 'Pass Through',\n          description: '123',\n          describedBy: { queryParameters: { abc: { type: 'string' } } }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromApiKeyAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromOAuth1Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.OAuth1({ authName: 'oauth1' }),\n        new Auth.OAuth1({ authName: 'oauth1', description: '123' }),\n        new Auth.OAuth1({\n          authName: 'oauth1',\n          description: '123',\n          requestTokenUri: 'https://oauth.example.com/token'\n        }),\n        new Auth.OAuth1({\n          authName: 'oauth1',\n          description: '123',\n          authorizationUri: 'https://oauth.example.com/authorization',\n          tokenCredentialsUri: 'https://oauth.example.com/renew'\n        }),\n        new Auth.OAuth1({\n          authName: 'oauth1',\n          description: '123',\n          authorizationUri: 'https://oauth.example.com/authorization',\n          tokenCredentialsUri: 'https://oauth.example.com/renew',\n          signature: 'hmac-sha1'\n        })\n      ]\n      const expected = [\n        { key: 'oauth1', value: {\n          type: 'OAuth 1.0',\n          settings: {\n            requestTokenUri: null,\n            authorizationUri: null,\n            tokenCredentialsUri: null\n          }\n        } },\n        { key: 'oauth1', value: {\n          type: 'OAuth 1.0',\n          description: '123',\n          settings: {\n            requestTokenUri: null,\n            authorizationUri: null,\n            tokenCredentialsUri: null\n          }\n        } },\n        { key: 'oauth1', value: {\n          type: 'OAuth 1.0',\n          description: '123',\n          settings: {\n            requestTokenUri: 'https://oauth.example.com/token',\n            authorizationUri: null,\n            tokenCredentialsUri: null\n          }\n        } },\n        { key: 'oauth1', value: {\n          type: 'OAuth 1.0',\n          description: '123',\n          settings: {\n            requestTokenUri: null,\n            authorizationUri: 'https://oauth.example.com/authorization',\n            tokenCredentialsUri: 'https://oauth.example.com/renew'\n          }\n        } },\n        { key: 'oauth1', value: {\n          type: 'OAuth 1.0',\n          description: '123',\n          settings: {\n            requestTokenUri: null,\n            authorizationUri: 'https://oauth.example.com/authorization',\n            tokenCredentialsUri: 'https://oauth.example.com/renew',\n            signatures: [ 'HMAC-SHA1' ]\n          }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromOAuth1Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromOAuth2Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.OAuth2({ authName: 'oauth_2' }),\n        new Auth.OAuth2({ authName: 'oauth_2', description: '123' }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'accessCode'\n        }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'implicit'\n        }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'application'\n        }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'password'\n        }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'implicit',\n          authorizationUrl: 'https://oauth.example.com/portal',\n          tokenUrl: 'https://oauth.example.com/renew'\n        }),\n        new Auth.OAuth2({\n          authName: 'oauth_2',\n          description: '123',\n          flow: 'implicit',\n          authorizationUrl: 'https://oauth.example.com/portal',\n          tokenUrl: 'https://oauth.example.com/renew',\n          scopes: List([ { key: 'read:any', value: '' }, { key: 'write:self', value: '' } ])\n        })\n      ]\n      const expected = [\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: []\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: []\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: [ 'authorization_code' ]\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: [ 'implicit' ]\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: [ 'client_credentials' ]\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: null,\n            accessTokenUri: null,\n            authorizationGrants: [ 'password' ]\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: 'https://oauth.example.com/portal',\n            accessTokenUri: 'https://oauth.example.com/renew',\n            authorizationGrants: [ 'implicit' ]\n          }\n        } },\n        { key: 'oauth_2', value: {\n          type: 'OAuth 2.0',\n          description: '123',\n          settings: {\n            authorizationUri: 'https://oauth.example.com/portal',\n            accessTokenUri: 'https://oauth.example.com/renew',\n            authorizationGrants: [ 'implicit' ],\n            scopes: [ 'read:any', 'write:self' ]\n          }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromOAuth2Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromHawkAuth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.Hawk({\n          authName: 'hawk'\n        }),\n        new Auth.Hawk({\n          authName: 'hawk',\n          description: '123'\n        }),\n        new Auth.Hawk({\n          authName: 'hawk',\n          description: '123',\n          id: '234',\n          algorithm: 'md5'\n        })\n      ]\n      const expected = [\n        { key: 'hawk', value: {\n          type: 'x-hawk',\n          settings: {\n            id: null,\n            algorithm: null\n          }\n        } },\n        { key: 'hawk', value: {\n          type: 'x-hawk',\n          description: '123',\n          settings: {\n            id: null,\n            algorithm: null\n          }\n        } },\n        { key: 'hawk', value: {\n          type: 'x-hawk',\n          description: '123',\n          settings: {\n            id: '234',\n            algorithm: 'md5'\n          }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromHawkAuth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromAWSSig4Auth', () => {\n    it('should work', () => {\n      const inputs = [\n        new Auth.AWSSig4({\n          authName: 'aws_sig_4'\n        }),\n        new Auth.AWSSig4({\n          authName: 'aws_sig_4',\n          description: '123'\n        }),\n        new Auth.AWSSig4({\n          authName: 'aws_sig_4',\n          description: '123',\n          region: 'us-east-1',\n          service: 'lambda'\n        })\n      ]\n      const expected = [\n        { key: 'aws_sig_4', value: {\n          type: 'x-aws-sig4',\n          settings: {\n            region: null,\n            service: null\n          }\n        } },\n        { key: 'aws_sig_4', value: {\n          type: 'x-aws-sig4',\n          description: '123',\n          settings: {\n            region: null,\n            service: null\n          }\n        } },\n        { key: 'aws_sig_4', value: {\n          type: 'x-aws-sig4',\n          description: '123',\n          settings: {\n            region: 'us-east-1',\n            service: 'lambda'\n          }\n        } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromAWSSig4Auth(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuritySchemeFromAuth', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'extractSecuritySchemeFromBasicAuth').andReturn('Basic')\n      spyOn(__internals__, 'extractSecuritySchemeFromDigestAuth').andReturn('Digest')\n      spyOn(__internals__, 'extractSecuritySchemeFromApiKeyAuth').andReturn('ApiKey')\n      spyOn(__internals__, 'extractSecuritySchemeFromOAuth1Auth').andReturn('OAuth1')\n      spyOn(__internals__, 'extractSecuritySchemeFromOAuth2Auth').andReturn('OAuth2')\n      spyOn(__internals__, 'extractSecuritySchemeFromHawkAuth').andReturn('Hawk')\n      spyOn(__internals__, 'extractSecuritySchemeFromAWSSig4Auth').andReturn('AWSSig4')\n\n      const inputs = [\n        new Auth.Basic(),\n        new Auth.Digest(),\n        new Auth.ApiKey(),\n        new Auth.OAuth1(),\n        new Auth.OAuth2(),\n        new Auth.Hawk(),\n        new Auth.AWSSig4(),\n        new Auth.NTLM()\n      ]\n      const expected = [\n        'Basic',\n        'Digest',\n        'ApiKey',\n        'OAuth1',\n        'OAuth2',\n        'Hawk',\n        'AWSSig4',\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemeFromAuth(input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractSecuritySchemesFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractSecuritySchemeFromAuth').andCall((v, k) => {\n        if (v % 2) {\n          return { key: k, value: v }\n        }\n\n        return null\n      })\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store() }),\n        new Api({ store: new Store({ auth: OrderedMap() }) }),\n        new Api({ store: new Store({ auth: OrderedMap({\n          a: 123,\n          b: 234,\n          c: 345\n        }) }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'securitySchemes', value: { a: 123, c: 345 } }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuritySchemesFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuredByFromApi', () => {\n    it('should work', () => {\n      const inputs = [\n        null\n      ]\n      const expected = [\n        null\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuredByFromApi(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDisplayNameFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({ name: '123' })\n      ]\n      const expected = [\n        null,\n        { key: 'displayName', value: '123' }\n      ]\n      const actual = inputs.map(input => __internals__.extractDisplayNameFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescriptionFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({ description: '123' })\n      ]\n\n      const expected = [\n        null,\n        { key: 'description', value: '123' }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractDescriptionFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractQueryParametersFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, v) => {\n        return { key: v, value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, new Request() ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer()\n        }) ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              b: 234,\n              c: 345\n            })\n          })\n        }) ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              b: 234,\n              c: 345\n            }),\n            queries: OrderedMap({\n              d: 456,\n              e: 567\n            })\n          })\n        }) ]\n      ]\n\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'queryParameters', value: { '456': 123, '567': 123 } }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractQueryParametersFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeadersFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, v) => {\n        return { key: v, value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, new Request() ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer()\n        }) ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer({\n            queries: OrderedMap({\n              b: 234,\n              c: 345\n            })\n          })\n        }) ],\n        [ { a: 123 }, new Request({\n          parameters: new ParameterContainer({\n            queries: OrderedMap({\n              b: 234,\n              c: 345\n            }),\n            headers: OrderedMap({\n              d: 456,\n              e: 567\n            })\n          })\n        }) ]\n      ]\n\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'headers', value: { '456': 123, '567': 123 } }\n      ]\n      const actual = inputs.map(input => __internals__.extractHeadersFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isBodyContext', () => {\n    it('should work', () => {\n      const inputs = [\n        new Context(),\n        new Context({\n          constraints: List([\n            new Parameter({ key: 'If-Modified-Since', default: '2017-03-01', in: 'headers' })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({ key: 'Content-Type', default: 'application/json', in: 'body' })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({\n              key: 'Content-Type',\n              default: 'application/json',\n              in: 'headers',\n              usedIn: 'response'\n            })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({ key: 'Content-Type', default: 'application/json', in: 'headers' })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({ key: 'Content-Type', default: 'application/json', in: 'headers' }),\n            new Parameter({ key: 'Some-Other-Constraint', default: '123', in: 'headers' })\n          ])\n        }),\n        new Context({\n          constraints: List([\n            new Parameter({ key: 'Content-Type', default: 'application/json', in: 'headers' }),\n            new Parameter({ key: 'Content-Type', default: 'application/xml', in: 'headers' })\n          ])\n        })\n      ]\n      const expected = [\n        false, false, false, false, true, true, false\n      ]\n      const actual = inputs.map(input => __internals__.isBodyContext(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getBodyContextsFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'isBodyContext').andCall(c => c % 2)\n\n      const inputs = [\n        new Request(),\n        new Request({\n          contexts: List()\n        }),\n        new Request({\n          contexts: List([\n            123, 234, 345\n          ])\n        })\n      ]\n      const expected = [\n        null, null, List([ 123, 345 ])\n      ]\n      const actual = inputs.map(input => __internals__.getBodyContextsFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSingleParameterFromRequestWithNoContext', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(\n        ({ a }, v) => ({ value: a * v })\n      )\n\n      const inputs = [\n        [ { a: 123 }, OrderedMap({ b: 234 }) ]\n      ]\n      const expected = [\n        { key: 'body', value: 123 * 234 }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractSingleParameterFromRequestWithNoContext(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMultipleParametersFromRequestWithNoContext', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, v) => {\n        return { key: v, value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, OrderedMap() ],\n        [ { a: 123 }, OrderedMap({ a: 234, b: 345 }) ]\n      ]\n\n      const expected = [\n        null,\n        { key: 'body', value: { properties: { '234': 123, '345': 123 } } }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.extractMultipleParametersFromRequestWithNoContext(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyParamsFromRequestWithNoContext', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractSingleParameterFromRequestWithNoContext').andReturn(100)\n      spyOn(__internals__, 'extractMultipleParametersFromRequestWithNoContext').andReturn(200)\n\n      const inputs = [\n        [ { a: 123 }, new ParameterContainer() ],\n        [ { a: 123 }, new ParameterContainer({ body: OrderedMap({ a: 234 }) }) ],\n        [ { a: 123 }, new ParameterContainer({ body: OrderedMap({ a: 234, b: 345 }) }) ]\n      ]\n      const expected = [\n        null,\n        100,\n        200\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.extractBodyParamsFromRequestWithNoContext(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeFromContext', () => {\n    it('should work', () => {\n      const inputs = [\n        new Context(),\n        new Context({ constraints: List() }),\n        new Context({ constraints: List([\n          new Parameter({ key: 'Irrelevant', in: 'headers', default: 123 })\n        ]) }),\n        new Context({ constraints: List([\n          new Parameter({ key: 'Irrelevant', in: 'headers', default: 123 }),\n          new Parameter({ key: 'Content-Type', in: 'headers', default: 234 })\n        ]) }),\n        new Context({ constraints: List([\n          new Parameter({ key: 'Irrelevant', in: 'headers', default: 123 }),\n          new Parameter({ key: 'Content-Type', in: 'headers', usedIn: 'response', default: 345 })\n        ]) }),\n        new Context({ constraints: List([\n          new Parameter({ key: 'Irrelevant', in: 'headers', default: 234 }),\n          new Parameter({ key: 'Content-Type', in: 'queries', default: 456 })\n        ]) }),\n        new Context({ constraints: List([\n          new Parameter({ key: 'Irrelevant', in: 'headers', default: 123 }),\n          new Parameter({ key: 'Content-Type', in: 'headers', default: 234 }),\n          new Parameter({ key: 'Content-Type', in: 'headers', default: 567 })\n        ]) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        234,\n        null,\n        null,\n        234\n      ]\n      const actual = inputs.map(input => __internals__.getContentTypeFromContext(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyParamsFromRequestForContext', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall(({ a }, p) => {\n        return { key: p.get('default'), value: a }\n      })\n      const inputs = [\n        // null\n        [ { a: 123 }, new ParameterContainer(), new Context() ],\n        // { key: '*/*', value: { '234': 123 } }\n        [\n          { a: 123 },\n          new ParameterContainer({\n            body: OrderedMap({\n              a: new Parameter({\n                default: 234,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'json', 'xml' ]) ])\n                  })\n                ])\n              })\n            })\n          }),\n          new Context()\n        ],\n        // null\n        [\n          { a: 123 },\n          new ParameterContainer({\n            body: OrderedMap({\n              a: new Parameter({\n                default: 234,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'json', 'xml' ]) ])\n                  })\n                ])\n              })\n            })\n          }),\n          new Context({\n            constraints: List([\n              new Parameter({\n                key: 'Content-Type',\n                default: 'text'\n              })\n            ])\n          })\n        ],\n        // { key: 'json', value: { '234': 123 } }\n        [\n          { a: 123 },\n          new ParameterContainer({\n            body: OrderedMap({\n              a: new Parameter({\n                default: 234,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'json', 'xml' ]) ])\n                  })\n                ])\n              })\n            })\n          }),\n          new Context({\n            constraints: List([\n              new Parameter({\n                in: 'headers',\n                key: 'Content-Type',\n                default: 'json'\n              })\n            ])\n          })\n        ],\n        // { key: 'json', value: 123 }\n        [\n          { a: 123 },\n          new ParameterContainer({\n            body: OrderedMap({\n              a: new Parameter({\n                default: null,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'json', 'xml' ]) ])\n                  })\n                ])\n              })\n            })\n          }),\n          new Context({\n            constraints: List([\n              new Parameter({\n                in: 'headers',\n                key: 'Content-Type',\n                default: 'json'\n              })\n            ])\n          })\n        ],\n        // { key: 'json', value: { '234': 123 } }\n        [\n          { a: 123 },\n          new ParameterContainer({\n            body: OrderedMap({\n              a: new Parameter({\n                default: 234,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'json', 'xml' ]) ])\n                  })\n                ])\n              }),\n              b: new Parameter({\n                default: 345,\n                applicableContexts: List([\n                  new Parameter({\n                    key: 'Content-Type',\n                    constraints: List([ new Constraint.Enum([ 'xml', 'text' ]) ])\n                  })\n                ])\n              })\n            })\n          }),\n          new Context({\n            constraints: List([\n              new Parameter({\n                in: 'headers',\n                key: 'Content-Type',\n                default: 'json'\n              })\n            ])\n          })\n        ]\n      ]\n      const expected = [\n        null,\n        { key: '*/*', value: { '234': 123 } },\n        null,\n        { key: 'json', value: { '234': 123 } },\n        { key: 'json', value: 123 },\n        { key: 'json', value: { '234': 123 } }\n      ]\n      const actual = inputs.map(\n        input => __internals__.extractBodyParamsFromRequestForContext(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyParamsFromRequestWithContexts', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractBodyParamsFromRequestForContext').andCall(({ a }, p, c) => {\n        return p[c] ? { key: p[c], value: a } : null\n      })\n      const inputs = [\n        [ { a: 123 }, List(), { b: 234 } ],\n        [ { a: 123 }, List([ 'd' ]), { b: 234, c: 345 } ],\n        [ { a: 123 }, List([ 'b' ]), { b: 234, c: 345 } ],\n        [ { a: 123 }, List([ 'b', 'c' ]), { b: 234, c: 345 } ],\n        [ { a: 123 }, List([ 'b', 'c', 'd' ]), { b: 234, c: 345 } ]\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'body', value: { '234': 123 } },\n        { key: 'body', value: { '234': 123, '345': 123 } },\n        { key: 'body', value: { '234': 123, '345': 123 } }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.extractBodyParamsFromRequestWithContexts(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with null single body param', () => {\n      spyOn(__internals__, 'extractBodyParamsFromRequestForContext').andCall(({ a }, p, c) => {\n        return p[c] ? { key: null, value: a } : null\n      })\n      const inputs = [\n        [ { a: 123 }, List(), { b: 234 } ],\n        [ { a: 123 }, List([ 'd' ]), { b: 234, c: 345 } ],\n        [ { a: 123 }, List([ 'b' ]), { b: 234, c: 345 } ]\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'body', value: 123 }\n      ]\n\n      const actual = inputs.map(\n        input => __internals__.extractBodyParamsFromRequestWithContexts(...input)\n      )\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getBodyContextsFromRequest').andCall(r => {\n        return r.get('contexts').length ? r.get('contexts') : null\n      })\n\n      spyOn(__internals__, 'extractBodyParamsFromRequestWithNoContext').andCall(({ a }, p) => {\n        return p instanceof ParameterContainer ? null : { key: p.c, value: a }\n      })\n\n      spyOn(__internals__, 'extractBodyParamsFromRequestWithContexts').andCall(({ a }, c, p) => {\n        return { key: p[c[0]], value: a }\n      })\n\n      const inputs = [\n        [ { a: 123 }, new Request() ],\n        [ { a: 123 }, new Request({ parameters: { b: 234, c: 345 }, contexts: [] }) ],\n        [ { a: 123 }, new Request({ parameters: { b: 234, c: 345 }, contexts: [ 'b' ] }) ]\n      ]\n      const expected = [\n        null,\n        { key: 345, value: 123 },\n        { key: 234, value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractBodyFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractProtocolsFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({ endpoints: OrderedMap() }),\n        new Request({ endpoints: OrderedMap({\n          a: new Reference({ uuid: 'a' })\n        }) }),\n        new Request({ endpoints: OrderedMap({\n          a: new URL({ url: 'https://echo.paw.cloud/base' })\n        }) }),\n        new Request({ endpoints: OrderedMap({\n          a: new Reference({ uuid: 'a', overlay: new URL({ url: 'https://echo.paw.cloud/base' }) })\n        }) }),\n        new Request({ endpoints: OrderedMap({\n          a: new URL({ url: 'wss://echo.paw.cloud/socket' }),\n          b: new URL({ url: 'https://echo.paw.cloud/base' })\n        }) }),\n        new Request({ endpoints: OrderedMap({\n          a: new URL().set('protocol', List([ 'ws', 'http', 'wss' ])),\n          b: new URL({ url: 'https://echo.paw.cloud/base' })\n        }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTPS' ] },\n        { key: 'protocols', value: [ 'HTTP' ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractProtocolsFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTraitsFromRequestParameters', () => {\n    it('should work', () => {\n      const inputs = [\n        [ 'globalMediaType', new Request() ],\n        [ 'globalMediaType', new Request({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              a: new Parameter(),\n              b: new Reference({ uuid: 'globalMediaType' }),\n              c: new Reference({ uuid: 'someOtherRef' })\n            }),\n            queries: OrderedMap({\n              d: new Parameter(),\n              e: new Reference({ uuid: 'someAdditionalRef' })\n            }),\n            body: OrderedMap({\n              f: new Parameter(),\n              g: new Reference({ uuid: 'someFinalRef' })\n            })\n          })\n        }) ]\n      ]\n      const expected = [\n        [],\n        [ 'someOtherRef', 'someAdditionalRef', 'someFinalRef' ]\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromRequestParameters(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTraitsFromResponses', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({\n          responses: OrderedMap({\n            default: new Response(),\n            generic: new Reference({ uuid: '#/responses/ErrorResponse' }),\n            internal: new Reference({ uuid: 'InternalErrorResponse' }),\n            missingUUID: new Reference()\n          })\n        })\n      ]\n      const expected = [\n        List(),\n        List([ 'response_ErrorResponse', 'response_InternalErrorResponse', 'response_' ])\n      ]\n      const actual = inputs.map(input => __internals__.extractTraitsFromResponses(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractIsFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { m: 123 }, new Request() ],\n        [ { m: 123 }, new Request({ interfaces: OrderedMap() }) ],\n        [ { m: 123 }, new Request({ interfaces: OrderedMap({\n          a: new Reference({ uuid: 123 })\n        }) }) ],\n        [ { m: 123 }, new Request({ interfaces: OrderedMap({\n          a: new Reference({ uuid: 123 }),\n          b: new Interface({ uuid: 234 })\n        }) }) ]\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'is', value: [ 123 ] },\n        { key: 'is', value: [ 123, 234 ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractIsFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuredByFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({\n          auths: List([ new Auth.Basic() ])\n        }),\n        new Request({\n          auths: List([\n            null,\n            new Reference({ uuid: 'basic_auth' }),\n            new Reference({ uuid: 'basic_auth', overlay: new Auth.Basic({ username: 'john' }) }),\n            new Reference({ uuid: 'oauth_2_auth' }),\n            new Reference({ uuid: 'oauth_2_auth', overlay: new Auth.OAuth2({\n              flow: 'implicit'\n            }) }),\n            new Reference({ uuid: 'oauth_2_auth', overlay: new Auth.OAuth2({\n              scopes: List([ { key: 'read:any' }, { key: 'write:self' } ])\n            }) })\n          ])\n        })\n      ]\n      const expected = [\n        null,\n        null,\n        { key: 'securedBy', value: [\n          null,\n          'basic_auth',\n          'basic_auth',\n          'oauth_2_auth',\n          'oauth_2_auth',\n          { oauth_2_auth: { scopes: [ 'read:any', 'write:self' ] } }\n        ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuredByFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractSecuredByFromRequest', () => {\n    it('should work', () => {\n      const inputs = [\n        new Request(),\n        new Request({ auths: List() }),\n        new Request({ auths: List([ new Auth.Basic() ]) }),\n        new Request({ auths: List([ new Auth.Basic(), new Reference({ uuid: 123 }) ]) }),\n        new Request({ auths: List([ new Reference({ uuid: 123 }), new Reference({ uuid: 234 }) ]) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'securedBy', value: [ 123 ] },\n        { key: 'securedBy', value: [ 123, 234 ] }\n      ]\n      const actual = inputs.map(input => __internals__.extractSecuredByFromRequest(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescriptionFromResponse', () => {\n    it('should work', () => {\n      const inputs = [\n        new Response(),\n        new Response({ description: 123 })\n      ]\n      const expected = [\n        null,\n        { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractDescriptionFromResponse(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractHeadersFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractHeadersFromRequest').andCall((c, r) => c + r)\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        123 + 234\n      ]\n      const actual = inputs.map(input => __internals__.extractHeadersFromResponse(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractBodyFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractBodyFromRequest').andCall((c, r) => c + r)\n\n      const inputs = [\n        [ 123, 234 ]\n      ]\n      const expected = [\n        123 + 234\n      ]\n      const actual = inputs.map(input => __internals__.extractBodyFromResponse(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResponseFromResponseRecord', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractDescriptionFromResponse').andCall(({ desc }) => {\n        return desc ? { key: 'description', value: desc } : null\n      })\n\n      spyOn(__internals__, 'extractHeadersFromResponse').andCall(({ headers }) => {\n        return headers ? { key: 'headers', value: headers } : null\n      })\n\n      spyOn(__internals__, 'extractBodyFromResponse').andCall(({ body }) => {\n        return body ? { key: 'body', value: body } : null\n      })\n\n      const inputs = [\n        [ { headers: null, body: null }, { desc: null } ],\n        [ { headers: 123, body: 234 }, { desc: null } ],\n        [ { headers: null, body: null }, { desc: 345 } ],\n        [ { headers: 123, body: 234 }, { desc: 345 } ]\n      ]\n\n      const expected = [\n        null,\n        { headers: 123, body: 234 },\n        { description: 345 },\n        { description: 345, headers: 123, body: 234 }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractResponseFromResponseRecord(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResponsesFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResponseFromResponseRecord').andCall((c, r) => {\n        return r.get('description') ? r.get('description') + c : null\n      })\n\n      const inputs = [\n        [ 123, new Request() ],\n        [ 123, new Request({ responses: OrderedMap() }) ],\n        [ 123, new Request({ responses: OrderedMap({\n          '200': new Response({ code: 200, description: 234 })\n        }) }) ],\n        [ 123, new Request({ responses: OrderedMap({\n          '200': new Response({ code: 200, description: null })\n        }) }) ],\n        [ 123, new Request({ responses: OrderedMap({\n          '200': new Response({ code: 200, description: 234 }),\n          '400': new Response({ code: 400, description: null }),\n          '404': new Response({ code: 404, description: 345 })\n        }) }) ],\n        [ 123, new Request({ responses: OrderedMap({\n          default: new Response({ code: 'default', description: 234 }),\n          '400': new Response({ code: 400, description: null }),\n          '404': new Response({ code: 404, description: 345 })\n        }) }) ]\n      ]\n\n      const expected = [\n        null,\n        null,\n        { key: 'responses', value: { '200': 234 + 123 } },\n        null,\n        { key: 'responses', value: { '200': 234 + 123, '404': 345 + 123 } },\n        { key: 'responses', value: { '200': 234 + 123, '404': 345 + 123 } }\n      ]\n\n      const actual = inputs.map(input => __internals__.extractResponsesFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMethodFromRequest', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'extractDisplayNameFromRequest').andCall((r) => {\n        const key = 'displayName'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractDescriptionFromRequest').andCall((r) => {\n        const key = 'description'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractProtocolsFromRequest').andCall((r) => {\n        const key = 'protocols'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractIsFromRequest').andCall((_, r) => {\n        const key = 'is'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractSecuredByFromRequest').andCall((r) => {\n        const key = 'securedBy'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractQueryParametersFromRequest').andCall((c) => {\n        const key = 'queryParameters'\n        return c[key] ? { key, value: c[key] } : null\n      })\n\n      spyOn(__internals__, 'extractHeadersFromRequest').andCall((c) => {\n        const key = 'headers'\n        return c[key] ? { key, value: c[key] } : null\n      })\n\n      spyOn(__internals__, 'extractBodyFromRequest').andCall((c) => {\n        const key = 'body'\n        return c[key] ? { key, value: c[key] } : null\n      })\n\n      spyOn(__internals__, 'extractResponsesFromRequest').andCall((c) => {\n        const key = 'responses'\n        return c[key] ? { key, value: c[key] } : null\n      })\n\n      const inputs = [\n        [ {}, {}, {} ],\n        [\n          {},\n          { queryParameters: 678, headers: 789, body: 890, responses: 901 },\n          { displayName: 123, description: 234, protocols: 345, is: 456, securedBy: 567 }\n        ]\n      ]\n      const expected = [\n        null,\n        {\n          queryParameters: 678, headers: 789, body: 890, responses: 901,\n          displayName: 123, description: 234, protocols: 345, is: 456, securedBy: 567\n        }\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@extractMethodEntryFromRequest', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodFromRequest').andCall((m, c, r) => {\n        return r.get('method') ? c : null\n      })\n\n      const inputs = [\n        [ {}, 123, new Request() ],\n        [ {}, 123, new Request({ method: 234 }) ]\n      ]\n      const expected = [\n        null,\n        { key: 234, value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodEntryFromRequest(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractMethodsFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractMethodEntryFromRequest').andCall((m, c, r) => {\n        return r % 2 === 0 ? { key: r, value: c } : null\n      })\n\n      const inputs = [\n        [ {}, 123, new Resource() ],\n        [ {}, 123, new Resource({ methods: OrderedMap() }) ],\n        [ {}, 123, new Resource({ methods: OrderedMap({\n          get: 234,\n          post: 345,\n          delete: 456\n        }) }) ]\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: 234, value: 123 }, { key: 456, value: 123 } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractMethodsFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDisplayNameFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource(),\n        new Resource({ name: 123 })\n      ]\n      const expected = [\n        null,\n        { key: 'displayName', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractDisplayNameFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractDescriptionFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource(),\n        new Resource({ description: 123 })\n      ]\n      const expected = [\n        null,\n        { key: 'description', value: 123 }\n      ]\n      const actual = inputs.map(input => __internals__.extractDescriptionFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractTypeFromResource', () => {\n    it('should work', () => {\n      const inputs = [\n        new Resource(),\n        new Resource({ interfaces: OrderedMap() }),\n        new Resource({ interfaces: OrderedMap({\n          a: new Interface({ uuid: 123 }),\n          b: new Interface({ uuid: 234 })\n        }) }),\n        new Resource({ interfaces: OrderedMap({\n          a: new Interface({ uuid: 123 }),\n          b: new Reference({ uuid: 234 }),\n          c: new Reference({ uuid: 345 })\n        }) })\n      ]\n      const expected = [\n        null,\n        null,\n        null,\n        { key: 'type', value: 234 }\n      ]\n      const actual = inputs.map(input => __internals__.extractTypeFromResource(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractUriParametersFromResource', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterIntoNamedParameter').andCall((c, p) => {\n        return { key: p.get('key'), value: c }\n      })\n\n      const inputs = [\n        [ 123, new Resource() ],\n        [ 123, new Resource({\n          path: new URL({\n            url: 'https://echo.paw.cloud/users',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) ],\n        [ 123, new Resource({\n          path: new URL({\n            url: 'https://echo.paw.cloud/users/{userId}/products',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        }) ]\n      ]\n      const expected = [\n        null, null,\n        { key: 'uriParameters', value: { userId: 123 } }\n      ]\n      const actual = inputs.map(input => __internals__.extractUriParametersFromResource(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourceFromResourceRecord', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractDisplayNameFromResource').andCall((r) => {\n        const key = 'displayName'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractDescriptionFromResource').andCall((r) => {\n        const key = 'description'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractTypeFromResource').andCall((r) => {\n        const key = 'type'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractUriParametersFromResource').andCall((c, r) => {\n        const key = 'uriParameters'\n        return r[key] ? { key, value: r[key] } : null\n      })\n\n      spyOn(__internals__, 'extractMethodsFromResource').andCall((m, c) => {\n        const key = 'get'\n        return c[key] ? [ { key, value: c[key] } ] : []\n      })\n\n      const inputs = [\n        [ {}, {}, {} ],\n        [ {}, { get: 123 }, { displayName: 234, description: 345, type: 456, uriParameters: 567 } ]\n      ]\n      const expected = [\n        {},\n        { get: 123, displayName: 234, description: 345, type: 456, uriParameters: 567 }\n      ]\n      const actual = inputs.map(input => __internals__.extractResourceFromResourceRecord(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@nestResources', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractResourceFromResourceRecord').andCall((m, c, r) => {\n        return { [r]: c }\n      })\n\n      const inputs = [\n        [ {}, 123, [] ],\n        [ {}, 123, [ { key: [ '' ], value: 234 } ] ],\n        [ {}, 123, [ { key: [ 'paths' ], value: 234 } ] ],\n        [ {}, 123, [ { key: [ 'paths', '{pathId}' ], value: 345 } ] ],\n        [ {}, 123, [\n          { key: [ 'paths' ], value: 234 }, { key: [ 'paths', '{pathId}' ], value: 345 }\n        ] ]\n      ]\n      const expected = [\n        {},\n        { '/': { '234': 123 } },\n        { '/paths': { '234': 123 } },\n        { '/paths': { '/{pathId}': { '345': 123 } } },\n        { '/paths': { '234': 123, '/{pathId}': { '345': 123 } } }\n      ]\n      const actual = inputs.map(input => __internals__.nestResources(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractResourcesFromApi', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'nestResources').andCall((m, c, array) => {\n        return array\n          .map(({ key }) => ({\n            key: '/' + key.join('/'),\n            value: c\n          }))\n          .reduce(convertEntryListInMap, {})\n      })\n\n      const inputs = [\n        [ {}, 123, new Api() ],\n        [ {}, 123, new Api({ resources: OrderedMap() }) ],\n        [ {}, 123, new Api({ resources: OrderedMap({\n          a: new Resource({\n            path: new URL({ url: '/paths/{{pathId}}', variableDelimiters: List([ '{{', '}}' ]) })\n          }),\n          b: new Resource({\n            path: new URL({ url: '/paths', variableDelimiters: List([ '{{', '}}' ]) })\n          })\n        }) }) ]\n      ]\n      const expected = [\n        [],\n        [],\n        [ { key: '/paths/{pathId}', value: 123 }, { key: '/paths', value: 123 } ]\n      ]\n      const actual = inputs.map(input => __internals__.extractResourcesFromApi(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createRAMLJSONModel', () => {\n    /* eslint-disable max-statements */\n    it('should work', () => {\n      spyOn(__internals__, 'extractCoreInformationMapFromApi').andCall(a => {\n        const key = 'coreInfo'\n        return a[key] ? a[key] : null\n      })\n\n      spyOn(__internals__, 'extractMediaTypeUUIDfromApi').andCall(a => {\n        const key = 'mediaTypeUUID'\n        return a[key] ? a[key] : null\n      })\n\n      spyOn(__internals__, 'extractTitleFromApi').andCall(a => {\n        const key = 'title'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractDescriptionFromApi').andCall(a => {\n        const key = 'description'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractVersionFromApi').andCall(a => {\n        const key = 'version'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractBaseUriFromApi').andCall(a => {\n        const key = 'baseUri'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractBaseUriParametersFromApi').andCall((c, a) => {\n        const key = 'baseUriParameters'\n        return a[key] ? { key, value: a[key] + c } : null\n      })\n\n      spyOn(__internals__, 'extractProtocolsFromApi').andCall(a => {\n        const key = 'protocols'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractMediaTypeFromApi').andCall(a => {\n        const key = 'mediaType'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractDataTypesFromApi').andCall(c => {\n        return c ? { key: 'types', value: c * 2 } : null\n      })\n\n      spyOn(__internals__, 'extractTraitsFromApi').andCall((m, c, a) => {\n        const key = 'traits'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractResourceTypesFromApi').andCall((m, c, a) => {\n        const key = 'resourceTypes'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractSecuritySchemesFromApi').andCall(a => {\n        const key = 'securitySchemes'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractSecuredByFromApi').andCall(a => {\n        const key = 'securedBy'\n        return a[key] ? { key, value: a[key] + 1 } : null\n      })\n\n      spyOn(__internals__, 'extractResourcesFromApi').andCall((m, c, a) => {\n        const key = 'resources'\n        return a[key] ? [ { key, value: a[key] + c } ] : []\n      })\n\n      const inputs = [\n        {},\n        {\n          coreInfo: 123,\n          title: 234,\n          description: 345,\n          version: 456,\n          baseUri: 567,\n          baseUriParameters: 678,\n          protocols: 789,\n          mediaType: 890,\n          traits: 246,\n          resourceTypes: 357,\n          securitySchemes: 468,\n          securedBy: 579,\n          resources: 680\n        }\n      ]\n      const expected = [\n        {},\n        {\n          title: 234 + 1,\n          description: 345 + 1,\n          version: 456 + 1,\n          baseUri: 567 + 1,\n          baseUriParameters: 678 + 123,\n          protocols: 789 + 1,\n          mediaType: 890 + 1,\n          types: 123 * 2,\n          traits: 246 + 1,\n          resourceTypes: 357 + 1,\n          securitySchemes: 468 + 1,\n          securedBy: 579 + 1,\n          resources: 680 + 123\n        }\n      ]\n      const actual = inputs.map(input => __internals__.createRAMLJSONModel(input))\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@fixResponseCodes', () => {\n    it('should work', () => {\n      const inputs = [\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            description: some description that contains a triple digit - '123'\n        `,\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            responses:\n              '200':\n                description: 'some description'\n        `,\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            responses:\n              '200':\n                description: some description for '200' code that is not modified\n        `\n      ]\n\n      const expected = [\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            description: some description that contains a triple digit - '123'\n        `,\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            responses:\n              200:\n                description: 'some description'\n        `,\n        `\n        #%RAML 1.0\n        title: 'whatever'\n        /users:\n          get:\n            responses:\n              200:\n                description: some description for '200' code that is not modified\n        `\n      ]\n\n      const actual = inputs.map(input => __internals__.fixResponseCodes(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@serialize', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createRAMLJSONModel').andCall(a => a * 2)\n      spyOn(__internals__, 'fixResponseCodes').andCall(r => 'fixed:' + r.split('\\n')[1])\n\n      const inputs = [\n        { api: 123 },\n        { api: 234 }\n      ]\n      const expected = [\n        'fixed:246',\n        'fixed:468'\n      ]\n      const actual = inputs.map(input => __internals__.serialize(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/serializers/serializers.js",
    "content": "import { serializers } from 'api-flow-config'\n\nconst methods = {}\n\nmethods.extractVersion = (version) => {\n  const vStripped = version[0] === 'v' ? version.slice(1) : version\n  const [ major, minor, patch ] = vStripped.split('.')\n\n  const strippedPatch = (patch || '0').split('-')[0]\n\n  return {\n    major: parseInt(major || '0', 10),\n    minor: parseInt(minor || '0', 10),\n    patch: parseInt(strippedPatch || '0', 10)\n  }\n}\n\n/* eslint-disable max-statements */\nmethods.getNewestSerializerByFormat = (format) => {\n  const newest = serializers\n    .filter(serializer => serializer.format === format)\n    .reduce((best, serializer) => {\n      const bestVersion = methods.extractVersion(best.version)\n      const formatVersion = methods.extractVersion(serializer.version)\n\n      if (bestVersion.major < formatVersion.major) {\n        return serializer\n      }\n\n      if (bestVersion.major > formatVersion.major) {\n        return best\n      }\n\n      if (bestVersion.minor < formatVersion.minor) {\n        return serializer\n      }\n\n      if (bestVersion.minor > formatVersion.minor) {\n        return best\n      }\n\n      if (bestVersion.patch < formatVersion.patch) {\n        return serializer\n      }\n\n      if (bestVersion.patch > formatVersion.patch) {\n        return best\n      }\n    }, { version: 'v0.0.0' })[0]\n\n  if (newest.serialize) {\n    return newest\n  }\n\n  return null\n}\n/* eslint-enable max-statements */\n\nmethods.getSerializerByFormatAndVersion = ({ format, version }) => {\n  return serializers.filter(serializer => {\n    return serializer.__meta__.format === format && serializer.__meta__.version === version\n  })[0] || null\n}\n\nexport default methods\n"
  },
  {
    "path": "src/serializers/swagger/v2.0/Serializer.js",
    "content": "/**\n * A Swagger v2 serializer.\n * This implementation has the following limitations:\n * - it will not create a global security field (securityDefinitions will be included though).\n * - it will not use the externalDocs, as this is field is still not supported\n * - the auths field in a Request **MUST** only be composed of References\n * - null Auth not supported at the moment\n *\n * NOTE: we allow use of undefined in this file as it works nicely with JSON.stringify, which drops\n * keys with a value of undefined.\n * ```\n * const swagger = { info, security }\n * ```\n * is easier to read than\n * ```\n * const swagger = { info }\n * if (security) {\n *   swagger.security = security\n * }\n * ```\n *\n * NOTE: we make the assumption that keys of a container are equal to the uuids of the objects it\n * holds.\n *\n * NOTE: we assume that keys of a response map are status codes\n * NOTE: we assume that keys of a methods map are method names.\n */\n /* eslint-disable no-undefined */\nimport { List, Set } from 'immutable'\nimport yaml from 'js-yaml'\n\nimport Constraint from '../../../models/Constraint'\nimport Reference from '../../../models/Reference'\nimport Auth from '../../../models/Auth'\nimport Parameter from '../../../models/Parameter'\nimport URL from '../../../models/URL'\n\nimport { currify, entries, convertEntryListInMap, flatten } from '../../../utils/fp-utils'\n\nconst __meta__ = {\n  format: 'swagger',\n  version: 'v2.0'\n}\n\nconst methods = {}\n\n// TODO move this to a better place\nmethods.getKeysFromRecord = (keyMap, record) => {\n  return entries(keyMap)\n    .map(({ key, value }) => ({ key, value: record.get(value) }))\n    .filter(({ value }) => typeof value !== 'undefined' && value !== null)\n    .reduce(convertEntryListInMap, {})\n}\n\n/**\n * A Serializer to convert Api Records into Swagger v2.0.\n */\nexport class SwaggerSerializer {\n  static __meta__ = __meta__\n\n  /**\n   * serializes an Api into a Swagger v2.0 formatted string\n   * @param {Api} api: the api to convert\n   * @returns {string} the corresponding postman collection, as a string\n   */\n  static serialize(api) {\n    return methods.serialize(api)\n  }\n\n  /**\n   * returns a quality score for a content string wrt. to the Swagger v2.0 format.\n   * @param {String} content: the content of the file to analyze\n   * @returns {number} the quality of the content\n   */\n  static validate(content) {\n    return methods.validate(content)\n  }\n}\n\n/**\n * converts a string written in JSON or YAML format into an object\n * @param {string} str: the string to parse\n * @returns {Object?} the converted object, or null if str was not a JSON or YAML string\n */\nmethods.parseJSONorYAML = (str) => {\n  let parsed\n  try {\n    parsed = JSON.parse(str)\n  }\n  catch (jsonParseError) {\n    try {\n      parsed = yaml.safeLoad(str)\n    }\n    catch (yamlParseError) {\n      return null\n    }\n  }\n\n  return parsed\n}\n\n/* eslint-disable max-statements */\n/**\n * looks (simplistically) at a Swagger file and gives it a quality score between 0 and 1.\n * @param {SwaggerObject} swagger: the swagger file to analyze (here deconstructed)\n * @returns {number} the quality of the swagger file wrt. to the version 2 format\n *\n * TODO: add reasons for low scores. Maybe use the format:\n * {\n *   format: 'swagger',\n *   version: 'v2.0',\n *   score: [0-1],\n *   warnings: Array<string>\n * }\n */\nmethods.getQualityScore = ({\n  swagger,\n  info,\n  paths,\n  host,\n  schemes,\n  securityDefinitions,\n  definitions,\n  parameters\n}) => {\n  let score = 0\n  if (swagger !== '2.0' || !info || !paths) {\n    return score\n  }\n  const pathKeys = Object.keys(paths)\n  score = 1 - 1 / (pathKeys.length + 1)\n  score += host ? 0.1 : -0.1\n  score += schemes ? 0.1 : -0.1\n  score += securityDefinitions ? 0.1 : 0\n  score += definitions ? 0.1 : 0\n  score += parameters ? 0.1 : 0\n\n  score = Math.min(Math.max(score, 0), 1)\n  return score\n}\n/* eslint-enable max-statements */\n\n/**\n * returns a quality score for a content string wrt. to the swagger v2 format.\n * @param {String} content: the content of the file to analyze\n * @returns {number} the quality of the content\n */\nmethods.validate = (content) => {\n  const parsed = methods.parseJSONorYAML(content)\n  if (!parsed) {\n    return 0\n  }\n\n  return methods.getQualityScore(parsed)\n}\n\n/**\n * creates a swagger format object\n * @returns {string} the expected format object\n */\nmethods.getSwaggerFormatObject = () => {\n  return '2.0'\n}\n\n/**\n * creates a default info object\n * @returns {\n *   {\n *     title: string,\n *     version: string§\n *   }\n * } the default info object\n */\nmethods.getDefaultInfoObject = () => {\n  return {\n    title: 'Unknown API',\n    version: 'v0.0.0'\n  }\n}\n\n/**\n * creates a valid default contact object.\n * @returns {SwaggerContactObject} the default valid contact object\n */\nmethods.getDefaultContactObject = () => {\n  return {}\n}\n\n/**\n * extracts the swagger Contact object from an Info Record.\n * @param {Info} $info: the info record to get the contact from.\n * @returns {SwaggerContactObject} the corresponding contact object\n */\nmethods.getContactObject = ($info) => {\n  const $contact = $info.get('contact')\n  if (!$contact) {\n    return methods.getDefaultContactObject()\n  }\n\n  const keyMap = {\n    name: 'name',\n    url: 'url',\n    email: 'email'\n  }\n\n  return methods.getKeysFromRecord(keyMap, $contact)\n}\n\n/**\n * creates a valid default license object.\n * @returns {SwaggerLicenseObject} the default valid license object\n */\nmethods.getDefaultLicenseObject = () => {\n  return {\n    name: 'informal'\n  }\n}\n\n/**\n * extracts the swagger License object from an Info Record.\n * @param {Info} $info: the info record to get the license from.\n * @returns {SwaggerLicenseObject} the corresponding license object\n */\nmethods.getLicenseObject = ($info) => {\n  const $license = $info.get('license')\n  if (!$license || !$license.get('name')) {\n    return methods.getDefaultLicenseObject()\n  }\n\n  const keyMap = {\n    name: 'name',\n    url: 'url'\n  }\n\n  return methods.getKeysFromRecord(keyMap, $license)\n}\n\n/* eslint-disable max-statements */\n/**\n * extracts the swagger Info object from an api.\n * @param {Api} $api: the api to get the info from.\n * @returns {SwaggerInfoObject} the corresponding info object\n */\nmethods.getInfoObject = ($api) => {\n  const $info = $api.get('info')\n  if (!$info) {\n    return methods.getDefaultInfoObject()\n  }\n\n  const keyMap = {\n    title: 'title',\n    description: 'description',\n    termsOfService: 'tos',\n    version: 'version'\n  }\n\n  const info = methods.getKeysFromRecord(keyMap, $info)\n\n  if ($info.get('contact')) {\n    info.contact = methods.getContactObject($info)\n  }\n\n  if ($info.get('license')) {\n    info.license = methods.getLicenseObject($info)\n  }\n\n  if (!info.title) {\n    info.title = 'Unknown API'\n  }\n\n  if (!info.version) {\n    info.version = 'v0.0.0'\n  }\n\n  return info\n}\n/* eslint-enable max-statements */\n\n/**\n * tests whether a Record is a Reference or not\n * @param {Record} record: the record to test\n * @returns {boolean} true if it is a Reference, false otherwise\n */\nmethods.isReference = (record) => record instanceof Reference\n\n/**\n * extracts endpoint references from a resource\n * @param {Resource} resource: the resource from which to get the shared endpoints.\n * @returns {OrderedMap<string, Reference>} the references to shared enpoints from this resource\n */\nmethods.getEnpointsSharedByResource = (resource) => {\n  return resource.get('endpoints').filter(methods.isReference)\n}\n\n/**\n * extracts the Uuid of a reference\n * @param {Reference} reference: the reference to find the uuid of\n * @returns {string} the uuid of the reference\n */\nmethods.getUuidOfReference = (reference) => reference.get('uuid')\n\nmethods.getEndpointFromBestEntry = (api, { key }) => {\n  const sharedEndpoint = api.getIn([ 'store', 'endpoint', key ])\n  if (sharedEndpoint) {\n    return sharedEndpoint\n  }\n\n  const sharedVariable = api.getIn([ 'store', 'variable', key ])\n  if (!sharedVariable) {\n    return null\n  }\n\n  const firstValueInVariable = sharedVariable.get('values').valueSeq().get(0)\n  if (!firstValueInVariable) {\n    return null\n  }\n\n  return new URL({ url: firstValueInVariable })\n}\n\n/**\n * searches for the most used common endpoint.\n * @param {Api} api: the api to fnid the most common endpoint of.\n * @returns {URL} the most common endpoint, if there is one.\n */\nmethods.getMostCommonEndpoint = (api) => {\n  const resources = api.get('resources')\n\n  const bestEntry = resources\n    .valueSeq()\n    .map(methods.getEnpointsSharedByResource)\n    .flatten(true)\n    .map(methods.getUuidOfReference)\n    .countBy(v => v)\n    .reduce((best, value, key) => best.value > value ? best : { key, value }, {})\n\n  return methods.getEndpointFromBestEntry(api, bestEntry)\n}\n\n/**\n * removes `:` from the protocol if it ends with it.\n * @param {string} protocol: the protocol to strip.\n * @return {string} the normalized protocol\n */\nmethods.removeDotsFromProtocol = (protocol) => {\n  if (protocol[protocol.length - 1] === ':') {\n    return protocol.slice(0, protocol.length - 1)\n  }\n\n  return protocol\n}\n\n/**\n * gets the schemes of an enpoint.\n * @param {URL} endpoint: the endpoint to get the schemes of.\n * @returns {Array<string>} the corresponding schemes\n */\nmethods.getSchemesFromEndpoint = (endpoint) => {\n  return endpoint.get('protocol')\n    .map(methods.removeDotsFromProtocol)\n    .toJS()\n}\n\n/**\n * returns the host and pathname of an endpoint.\n * @param {URL} endpoint: the endpoint to get the host and pathname from.\n * @return {\n *   {\n *     host: string?,\n *     basePath: string?\n *   }\n * } the host and basePath associated with this endpoint\n *\n * TODO: the host and basePath string should not be templated. use generate instead of toURLObject\n */\nmethods.getHostAndBasePathFromEndpoint = (endpoint) => {\n  const delimiters = List([ '{', '}' ])\n  const urlObject = endpoint.toURLObject(delimiters)\n\n  return {\n    host: urlObject.host || undefined,\n    basePath: urlObject.pathname || undefined\n  }\n}\n\n/**\n * extracts endpoint related fields out of an Api Record.\n * @param {Api} api: the Api to get the protocol, host, and basePath from.\n * @returns {\n *   {\n *     schemes: Array<string>?,\n *     host: string?,\n *     basePath: string?\n *   }\n * } the global endpoint fields\n */\nmethods.getEndpointRelatedObjects = (api) => {\n  const endpoint = methods.getMostCommonEndpoint(api)\n  if (!endpoint) {\n    return {}\n  }\n\n  const schemes = methods.getSchemesFromEndpoint(endpoint)\n  const { host, basePath } = methods.getHostAndBasePathFromEndpoint(endpoint)\n\n  return { schemes, host, basePath }\n}\n\n/**\n * extracts shared JSON Schemas from the store of an API and returns them as a Definitions Object.\n * @param {Api} api: the api to get the JSON Schemas from\n * @returns {SwaggerDefinitionsObject} the definitions of this Api.\n */\nmethods.getDefinitions = (api) => {\n  const constraints = api.getIn([ 'store', 'constraint' ])\n    .filter(constraint => constraint instanceof Constraint.JSONSchema)\n    .map((constraint, key) => {\n      return { key, value: constraint.toJSONSchema() }\n    })\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(constraints).length === 0) {\n    return undefined\n  }\n\n  return constraints\n}\n\n/**\n * converts a Parameter or Reference into a SwaggerHeaderObject\n * @param {Store} store: the store to use to resolve references\n * @param {Parameter|Reference} parameterOrReference: the parameter or reference to convert.\n * @returns {SwaggerHeaderObject} the corresponding header object\n *\n * TODO: take contexts into account.\n */\nmethods.getHeaderFromHeaderParameterOrReference = (store, parameterOrReference) => {\n  let resolved = parameterOrReference\n  if (parameterOrReference instanceof Reference) {\n    resolved = store.getIn([ 'parameter', parameterOrReference.get('uuid') ])\n  }\n\n  if (!resolved || resolved.get('key') === 'Content-Type') {\n    return null\n  }\n\n  return methods.convertParameterToHeaderObject(resolved)\n}\n\n/**\n * extracts the headers of a response, and converts them into HeaderObjects.\n * @param {Store} store: the store to use to resolve references\n * @param {Response} response: the response to get the headers of.\n * @returns {SwaggerHeadersObject} the object holding all headers of the response\n *\n * TODO: take contexts into account.\n */\nmethods.getHeadersFromResponse = (store, response) => {\n  const headers = response.getIn([ 'parameters', 'headers' ])\n    .map((param) => methods.getHeaderFromHeaderParameterOrReference(store, param))\n    .filter(v => !!v)\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(headers).length === 0) {\n    return undefined\n  }\n\n  return headers\n}\n\n/**\n * extracts a Schema from a response.\n * @param {Response} response: the response to get a schema from\n * @returns {JSONSchema?} the corresponding json schema, if it exists.\n *\n * TODO: take contexts into account.\n */\nmethods.getSchemaFromResponse = (response) => {\n  const schema = response.getIn([ 'parameters', 'body' ])\n    .valueSeq()\n    .map(param => param.getJSONSchema(false))\n    .toJS()[0]\n\n  return schema\n}\n\n/**\n * converts a response record into a response object.\n * @param {Store} store: the store to use to resolve references\n * @param {string} key: the key of the response record in its container (either a store, or a\n * request)\n * @param {Response} value: the response record to convert into a response object\n * @returns {SwaggerResponseObject} the corresponding swagger response object.\n */\nmethods.convertResponseRecordToResponseObject = (store, { key, value }) => {\n  const response = {}\n\n  if (value.get('description')) {\n    response.description = value.get('description')\n  }\n  else {\n    response.description = 'no description was provided for this response'\n  }\n\n  response.headers = methods.getHeadersFromResponse(store, value)\n  response.schema = methods.getSchemaFromResponse(value)\n\n  return {\n    key,\n    value: response\n  }\n}\n\n/**\n * extract shared responses from an api and stores them in a Response Definitions Object.\n * @param {Api} api: the api to get the shared responses from.\n * @returns {SwaggerResponseDefinitionsObject} the corresponding response definitions object.\n */\nmethods.getResponseDefinitions = (api) => {\n  const store = api.get('store')\n\n  const convertResponseRecordToResponseObject = currify(\n    methods.convertResponseRecordToResponseObject, store\n  )\n\n  const responses = store.get('response')\n    .map((value, key) => ({ key, value }))\n    .map(convertResponseRecordToResponseObject)\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(responses).length === 0) {\n    return undefined\n  }\n\n  return responses\n}\n\n/**\n * converts a BasicAuth into a valid security definition.\n * @param {BasicAuth} auth: the auth to converts\n * @returns {SwaggerSecurityDefinitionObject} the corresponding security definition\n */\nmethods.convertBasicAuth = (auth) => {\n  const securityScheme = {\n    type: 'basic'\n  }\n\n  if (auth.get('description')) {\n    securityScheme.description = auth.get('description')\n  }\n\n  return {\n    key: auth.get('authName'),\n    value: securityScheme\n  }\n}\n\n/**\n * converts an ApiKeyAuth into a valid security definition.\n * @param {ApiKeyAuth} auth: the auth to converts\n * @returns {SwaggerSecurityDefinitionObject} the corresponding security definition\n */\nmethods.convertApiKeyAuth = (auth) => {\n  const keyMap = {\n    description: 'description',\n    name: 'name',\n    in: 'in'\n  }\n\n  const securityScheme = methods.getKeysFromRecord(keyMap, auth)\n  securityScheme.type = 'apiKey'\n\n  return {\n    key: auth.get('authName'),\n    value: securityScheme\n  }\n}\n\n/**\n * converts an OAuth2Auth into a valid security definition.\n * @param {OAuth2Auth} auth: the auth to converts\n * @returns {SwaggerSecurityDefinitionObject} the corresponding security definition\n */\nmethods.convertOAuth2Auth = (auth) => {\n  const keyMap = {\n    description: 'description',\n    flow: 'flow',\n    authorizationUrl: 'authorizationUrl',\n    tokenUrl: 'tokenUrl'\n  }\n\n  const securityScheme = methods.getKeysFromRecord(keyMap, auth)\n  securityScheme.type = 'oauth2'\n  securityScheme.scopes = auth.get('scopes').reduce(convertEntryListInMap, {})\n\n  return {\n    key: auth.get('authName'),\n    value: securityScheme\n  }\n}\n\n/**\n * converts an Auth into a valid security definition.\n * @param {Auth} auth: the auth to converts\n * @returns {SwaggerSecurityDefinitionObject?} the corresponding security definition\n *\n * TODO deal with unknown auth methods\n */\nmethods.convertAuthToSecurityRequirementEntry = (auth) => {\n  if (auth instanceof Auth.Basic) {\n    return methods.convertBasicAuth(auth)\n  }\n\n  if (auth instanceof Auth.ApiKey) {\n    return methods.convertApiKeyAuth(auth)\n  }\n\n  if (auth instanceof Auth.OAuth2) {\n    return methods.convertOAuth2Auth(auth)\n  }\n\n  return null\n}\n\n/**\n * gets shared auth methods from the api.\n * @param {Api} api: the api to get the shared authentication methods from.\n * @returns {SwaggerSecurityDefinitionsObject?} the corresponding security definitions object if it\n * should exist.\n */\nmethods.getSecurityDefinitions = (api) => {\n  const securityDefinitions = api.getIn([ 'store', 'auth' ])\n    .map(methods.convertAuthToSecurityRequirementEntry)\n    .filter(value => !!value)\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(securityDefinitions).length === 0) {\n    return undefined\n  }\n\n  return securityDefinitions\n}\n\n/**\n * converts a Parameter record into a Schema parameter (subset of the Parameter Object\n * implementation in swagger that only has certain fields, that are wildly different from the\n * more standard Parameter Object spec for query, path and header params)\n *\n * @param {Parameter} parameter: the parameter to convert into a schema parameter.\n * @param {string} key: the key of the Parameter in its container.\n * @returns {Entry<string, SwaggerSchemaParameterObject>} the corresponding parameter object.\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertParameterToSchemaParameter = (parameter, key) => {\n  const keyMap = {\n    description: 'description',\n    required: 'required'\n  }\n\n  const param = methods.getKeysFromRecord(keyMap, parameter)\n  param.schema = parameter.getJSONSchema(false)\n  param.in = 'body'\n\n  param.name = parameter.get('key') || parameter.get('name') || 'body'\n\n  return { key, value: param }\n}\n\n/**\n * tests whether a Parameter is a body or a formData parameter, by checking if it is restrained to\n * form-data or urlEncoded contexts.\n * @param {Parameter} parameter: the parameter to test\n * @return {boolean} true if it is a body param, false otherwise\n */\nmethods.isBodyParameter = (parameter) => {\n  if (parameter.get('in') !== 'body') {\n    return false\n  }\n\n  if (parameter.get('applicableContexts').size === 0) {\n    return true\n  }\n\n  const isFormData = parameter.isValid(\n    new Parameter({\n      key: 'Content-Type',\n      default: 'multipart/form-data'\n    })\n  )\n\n  const isUrlEncoded = parameter.isValid(\n    new Parameter({\n      key: 'Content-Type',\n      default: 'application/x-www-form-urlencoded'\n    })\n  )\n\n  return !isFormData && !isUrlEncoded\n}\n\n/**\n * maps a ParameterContainer location to a swagger location (for the parameter.in field)\n * @param {Parameter} parameter: the parameter to get the correct location for\n * @returns {'query'|'header'|'path'|'formData'?} the corresponding location\n *\n * NOTE: this method assumes that body parameters have been filtered to weed out Schema Parameters.\n */\nmethods.getParamLocation = (parameter) => {\n  const locationMap = {\n    queries: 'query',\n    headers: 'header',\n    path: 'path',\n    body: 'formData'\n  }\n\n  return locationMap[parameter.get('in')]\n}\n\n/**\n * returns common parameter fields that are used by parameters, items object, and headers object\n * @param {Parameter} parameter: the parameter to get the fields from\n * @returns {CommonParameterObject} the fields that are shared by all types of \"parameter\" objects.\n *\n * NOTE: the following fields are not included:\n *   - name\n *   - in\n *   - description\n *   - required\n */\nmethods.getCommonFieldsFromParameter = (parameter) => {\n  if (!parameter) {\n    return {}\n  }\n\n  const schema = parameter.getJSONSchema(false)\n  const {\n    type,\n    maximum, minimum, exclusiveMaximum, exclusiveMinimum, multipleOf,\n    maxLength, minLength, pattern,\n    maxItems, minItems, uniqueItems\n  } = schema\n\n  const commonFields = {\n    type: type !== 'object' ? type : 'string',\n    'x-real-type': type === 'object' ? type : undefined,\n    maximum, minimum, exclusiveMinimum, exclusiveMaximum, multipleOf,\n    maxLength, minLength, pattern,\n    maxItems, minItems, uniqueItems,\n    default: schema.default, enum: schema.enum\n  }\n\n  return commonFields\n}\n\n/**\n * converts a Parameter Object to a Swagger Items Object.\n * @param {Parameter} parameter: the parameter to convert\n * @returns {Entry<null, SwaggerItemsObject>} the corresponding items object.\n *\n * NOTE: this methods adds no fields to the common fields generated from the parameter.\n */\nmethods.convertParameterToItemsObject = (parameter) => {\n  if (parameter instanceof Reference) {\n    return { value: '#/parameters/' + parameter.get('uuid') }\n  }\n\n  const value = methods.getCommonFieldsFromParameter(parameter)\n\n  return { value }\n}\n\n/**\n * converts a Parameter Object to a Swagger Header Object.\n * @param {Parameter} parameter: the parameter to convert\n * @param {string} key: the key of the parameter in its container\n * @returns {Entry<string, SwaggerHeaderObject>} the corresponding header object.\n *\n * NOTE: this methods adds the following fields to the common fields from a parameter.\n *   - description\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertParameterToHeaderObject = (parameter) => {\n  const key = parameter.get('key')\n  const value = methods.getCommonFieldsFromParameter(parameter)\n\n  value.description = parameter.get('description') || undefined\n\n  return { key, value }\n}\n\n/**\n * converts a Parameter Object to a standard Swagger Parameter Object.\n * @param {Parameter} parameter: the parameter to convert\n * @param {string} key: the key of the parameter in its container\n * @returns {Entry<string, SwaggerParameterObject>} the corresponding parameter object.\n *\n * NOTE: this methods adds the following fields to the common fields from a parameter.\n *   - name\n *   - description\n *   - required\n *   - in\n *   - items (if type is array)\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertParameterToStandardParameterObject = (parameter, key) => {\n  const value = methods.getCommonFieldsFromParameter(parameter)\n\n  value.name = parameter.get('key') || undefined\n  value.description = parameter.get('description') || undefined\n  value.required = parameter.get('required') !== null ? parameter.get('required') : undefined\n  value.in = methods.getParamLocation(parameter)\n\n  if (value.type === 'array') {\n    const itemsEntry = methods.convertParameterToItemsObject(parameter.get('value'))\n    value.items = itemsEntry.value\n  }\n\n  return { key, value }\n}\n\n/**\n * converts a Parameter Object to a Swagger Parameter Object.\n * @param {Parameter} parameter: the parameter to convert\n * @param {string} key: the key of the parameter in its container\n * @returns {Entry<string, SwaggerParameterObject>} the corresponding parameter object.\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertParameterToParameterObject = (parameter, key) => {\n  if (methods.isBodyParameter(parameter)) {\n    return methods.convertParameterToSchemaParameter(parameter, key)\n  }\n\n  return methods.convertParameterToStandardParameterObject(parameter, key)\n}\n\n/**\n * gets the shared parameter defintions from an Api and stores them in a ParameterDefinitions Object\n * @param {Api} api: the api to get the shared parameters from\n * @returns {SwaggerParameterDefinitionsObject?} the corresponding parameter definition object, if\n * it should exist\n */\nmethods.getParameterDefinitions = (api) => {\n  const parameterDefinitions = api.getIn([ 'store', 'parameter' ])\n    .filter(param => !methods.isConsumesHeader(param) && !methods.isProducesHeader(param))\n    .map(methods.convertParameterToParameterObject)\n    .filter(value => !!value)\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(parameterDefinitions).length === 0) {\n    return undefined\n  }\n\n  return parameterDefinitions\n}\n\n/**\n * tests whether an interface can be used for tags or not. (the interface has to be at the request\n * or resource level to be applicable)\n * @param {Interface} itf: the interface to test\n * @returns {boolean} true if the itf can be converted in a tag.\n */\nmethods.isUseableAsTag = (itf) => {\n  return !!itf && (itf.get('level') === 'request' || itf.get('level') === 'resource')\n}\n\n/**\n * converts an Interface into a tag.\n * @param {Interface} itf: the interface to convert.\n * @returns {SwaggerTagObject} the corresponding tag\n */\nmethods.convertInterfaceToTagObject = (itf) => {\n  const keyMap = {\n    name: 'uuid',\n    description: 'description'\n  }\n\n  const tag = methods.getKeysFromRecord(keyMap, itf)\n\n  if (!tag.name) {\n    tag.name = 'unnamedTag'\n  }\n\n  return tag\n}\n\n/**\n * gets tag definitions from an api\n * @param {Api} api: the api to get the tags from\n * @returns {SwaggerTagDefinitionsObject} the corresponding tags\n *\n * NOTE: this only defines shared interfaces that are at the Resource or Request level.\n * This does not create a tag definition for non shared interfaces (which should be very rare)\n * This is however not an issue, since having a tag definition is not a requirement for tags defined\n * in an operation object\n */\nmethods.getTagDefinitions = (api) => {\n  const tagDefinitions = api.getIn([ 'store', 'interface' ])\n    .filter(methods.isUseableAsTag)\n    .map(methods.convertInterfaceToTagObject)\n    .valueSeq()\n    .toJS()\n\n  return tagDefinitions\n}\n\n/**\n * extracts the path from a Resource.\n * @param {Resource} resource: the resource to get the path from.\n * @returns {string?} the corresponding path\n */\nmethods.getPathFromResource = (resource) => {\n  const path = resource.get('path').toURLObject(List([ '{', '}' ])).pathname\n\n  if (path[0] !== '/') {\n    return '/' + path\n  }\n\n  return path\n}\n\n/**\n * converts an interface or reference into a tag string\n * @param {Interface|Reference} interfaceOrReference: the interface or reference to convert\n * @return {string} the corresponding tag string\n *\n * NOTE: a Tag string is different from a Tag Definition\n */\nmethods.convertInterfaceToTagString = (interfaceOrReference) => interfaceOrReference.get('uuid')\n\n/**\n * extracts all tags from a resource or request object\n * @param {Resource|Request} resourceOrRequest: the Resource or Request to get the tags from.\n * @returns {Array<string>} the corresponding tag strings.\n */\nmethods.getTagStrings = (resourceOrRequest) => {\n  return resourceOrRequest.get('interfaces')\n    .valueSeq()\n    .map(methods.convertInterfaceToTagString)\n    .filter(tag => !!tag)\n    .toJS()\n}\n\n/**\n * adds tags from a resource or a request to an operation\n * @param {Resource|Request} resourceOrRequest: the Resource or Request to get the tags from.\n * @param {SwaggerOperationObject} operation: the operation object to update\n * @returns {SwaggerOperationObject} the update operation object\n */\nmethods.addTagsToOperation = (resourceOrRequest, operation) => {\n  const tags = methods.getTagStrings(resourceOrRequest)\n\n  if (tags.length === 0) {\n    return operation\n  }\n\n  operation.tags = [].concat(operation.tags || [], tags)\n  return operation\n}\n\n/**\n * tests whether two array have the same objects, regardless of order or repetition.\n * @param {Array<*>} first: the first array to compare\n * @param {Array<*>} second: the second array to compare\n * @returns {boolean} returns true if both arrays have the same set of objects, returns false\n * otherwise\n */\nmethods.equalSet = (first, second) => {\n  return Set(first).equals(Set(second))\n}\n\n/**\n * extracts the consumes entry of an operation. Returns nothing if the consumes field is not defined\n * or if it is identical to the globally defined consumes field\n * @param {Array<string>} globalConsumes: the globally defined consumes field.\n * @param {ParameterContainer} container: the parameter container that holds the headers of this\n * request, which potentially include a Content-Type header.\n * @returns {Array<string>?} the corresponding consumes field\n */\nmethods.getConsumesEntry = (globalConsumes, container) => {\n  const headers = container.get('headers')\n  const consumes = methods.getContentTypeFromFilteredParams(headers, methods.isConsumesHeader)\n\n  if (consumes.length && !methods.equalSet(consumes, globalConsumes)) {\n    return Array.from(new Set(consumes))\n  }\n\n  return undefined\n}\n\n/**\n * extracts the produces entry of an operation. Returns nothing if the produces field is not defined\n * or if it is identical to the globally defined produces field\n * @param {Store} store: the store to use to resolve references\n * @param {Request} request: the request from which to get the responses and their respective\n * headers, which potentially include Content-Type headers.\n * @param {Array<string>} globalProduces: the globally defined produces field.\n * @returns {Array<string>?} the corresponding produces field\n */\nmethods.getProducesEntry = (store, request, globalProduces) => {\n  const produces = request.get('responses')\n    .map(response => response.get('parameters').resolve(store).get('headers'))\n    .map(headers => methods.getContentTypeFromFilteredParams(headers, methods.isProducesHeader))\n    .reduce(flatten, [])\n\n  if (produces.length && !methods.equalSet(produces, globalProduces)) {\n    return Array.from(new Set(produces))\n  }\n\n  return undefined\n}\n\n/**\n * converts a reference into a Parameter Reference Object, which in this case is just a $ref field\n * @param {Reference} reference: the reference to convert into a parameter reference object.\n * @returns {Entry<null, SwaggerReferenceObject>} the corresponding reference object.\n */\nmethods.convertReferenceToParameterObject = (reference) => {\n  return {\n    value: {\n      $ref: '#/parameters/' + reference.get('uuid')\n    }\n  }\n}\n\n/**\n * converts a Reference or a Parameter into a swagger parameter (reference) object.\n * @param {Parameter|Reference} parameterOrReference: the parameter or reference to convert,\n * @param {string} key: the key of the parameter in the container that holds it.\n * @returns {SwaggerReferenceObject|SwaggerParameterObject} the corresponding parameter object\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertReferenceOrParameterToParameterObject = (parameterOrReference, key) => {\n  if (parameterOrReference instanceof Reference) {\n    return methods.convertReferenceToParameterObject(parameterOrReference)\n  }\n\n  return methods.convertParameterToParameterObject(parameterOrReference, key)\n}\n\n/**\n * converts a Parameter Map into an array of swagger parameter or reference objects.\n * @param {OrderedMap<string, Parameter>} params: the parameters to convert\n * @returns {Array<SwaggerParameterObject|SwaggerReferenceObject>} the corresponding parameter or\n * reference objects.\n */\nmethods.convertParameterMapToParameterObjectArray = (params) => {\n  return params.map(methods.convertReferenceOrParameterToParameterObject)\n    .valueSeq()\n    .map(({ value }) => value)\n    .toJS()\n}\n\n/**\n * tests whether a Parameter or Reference is NOT a consumes header parameter.\n * @param {Store} store: the store to use to resolve references\n * @param {Parameter|Reference} parameterOrReference: the parameter or reference to test\n * @returns {boolean} false if it is a consumes header parameter, true otherwise\n */\nmethods.isParameterOrReferenceNotAConsumesHeader = (store, parameterOrReference) => {\n  let resolved = parameterOrReference\n  if (parameterOrReference instanceof Reference) {\n    resolved = store.getIn([ 'parameter', parameterOrReference.get('uuid') ])\n  }\n\n  return !methods.isConsumesHeader(resolved)\n}\n\n/**\n * extracts parameters from a request.\n * @param {Store} store: the store to use to resolve references\n * @param {Request} request: the request to get the parameters from.\n * @returns {Array<SwaggerParameterObject|SwaggerReferenceObject>} the corresponding parameter or\n * reference objects.\n *\n * NOTE: Due to the fact that swagger expects only one body parameter at most, and does not support\n * contexts, we have to split the body parameters to remove additional body params.\n *\n * TODO: this needs improvements\n */\nmethods.getParametersFromRequest = (store, request) => {\n  const headers = methods.convertParameterMapToParameterObjectArray(\n    request.getIn([ 'parameters', 'headers' ])\n      .filter((param) => methods.isParameterOrReferenceNotAConsumesHeader(store, param))\n  )\n  const queries = methods.convertParameterMapToParameterObjectArray(\n    request.getIn([ 'parameters', 'queries' ])\n  )\n  /*\n  const path = methods.convertParameterMapToParameterObjectArray(\n    request.getIn([ 'parameters', 'path' ])\n  )\n  */\n  const body = methods.convertParameterMapToParameterObjectArray(\n    request.getIn([ 'parameters', 'body' ])\n  )\n\n  const formData = body.filter((param) => param.in === 'formData')\n  // drops additional body params if there are more than one\n  const bodyParam = body.filter((param) => param.in === 'body').slice(0, 1)\n\n  return [].concat(headers, queries, formData, bodyParam)\n}\n\n/**\n * converts a reference object into a swagger response reference object.\n * @param {Reference} reference: the reference to converts\n * @param {string} key: the key of the reference in the container that holds it.\n * @returns {Entry<string, SwaggerResponseReferenceObject>} the corresponding response reference\n * object\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertReferenceToResponseObject = (reference, key) => {\n  return {\n    key,\n    value: {\n      $ref: '#/responses/' + reference.get('uuid')\n    }\n  }\n}\n\n/**\n * converts a reference or response record into a swagger response object\n * @param {Store} store: the store to use to resolve references\n * @param {Response|Reference} response: the response or reference to convert\n * @param {string} key: the key of the response in the container that holds it.\n * @returns {Entry<string, SwaggerResponseObject|SwaggerReferenceObject>} the corresponding response\n * or refernce object.\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n */\nmethods.convertReferenceOrResponseRecordToResponseObject = (store, response, key) => {\n  if (response instanceof Reference) {\n    return methods.convertReferenceToResponseObject(response, key)\n  }\n  return methods.convertResponseRecordToResponseObject(store, { value: response, key })\n}\n\n/**\n * extracts reponses from a request.\n * @param {Store} store: the store to use to resolve references\n * @param {Request} request: the request to get the responses from\n * @returns {Map<string, SwaggerResponseObject|SwaggerReferenceObject>} the corresponding object\n * that holds all the responses or references to globally defined responses.\n */\nmethods.getResponsesFromRequest = (store, request) => {\n  const convertReferenceOrResponseRecordToResponseObject = currify(\n    methods.convertReferenceOrResponseRecordToResponseObject, store\n  )\n  const responses = request.get('responses')\n    .map(convertReferenceOrResponseRecordToResponseObject)\n    .valueSeq()\n    .reduce(convertEntryListInMap, {})\n\n  if (Object.keys(responses).length === 0) {\n    return {\n      default: {\n        description: 'no response description was provided for this operation'\n      }\n    }\n  }\n\n  return responses\n}\n\n/**\n * extracts schemes from a request endpoint overlay. If the request has multiple endpoints, this\n * returns null, as it is complex to tell if the globally defined endpoint matches this one.\n * @param {Request} request: the request to get schemes from\n * @returns {Array<string>?} the corresponding schemes, should they exist\n */\nmethods.getSchemesFromRequestEndpointOverlay = (request) => {\n  const endpoints = request.get('endpoints')\n\n  if (endpoints.size !== 1) {\n    return undefined\n  }\n\n  const schemes = endpoints\n    .valueSeq()\n    .map(refOrUrl => refOrUrl.get('overlay'))\n    .filter($overlay => !!$overlay)\n    .map(methods.getSchemesFromEndpoint).get(0)\n\n  return schemes\n}\n\n/**\n * converts a reference to a Basic or an ApiKey record into a security requirement.\n * @param {string} name: the name of the auth method\n * @returns {SwaggerSecurityRequirementObject} the corresponding requirement object\n */\nmethods.getSecurityRequirementForBasicOrApiKeyAuth = (name) => {\n  const security = {}\n  security[name] = []\n  return security\n}\n\n/**\n * converts a reference to an OAuth2 record into a security requirement.\n * @param {string} name: the name of the auth method\n * @param {Reference} reference: the reference to converts\n * @returns {SwaggerSecurityRequirementObject} the corresponding requirement object\n */\nmethods.getSecurityRequirementForOAuth2Auth = (name, reference) => {\n  const overlay = reference.get('overlay')\n  const security = {}\n  let scopes = []\n  if (overlay) {\n    scopes = overlay.get('scopes').map(({ key }) => key).toJS()\n  }\n  security[name] = scopes\n  return security\n}\n\n/**\n * converts a Reference to an Auth record into a security requirement object.\n * @param {Store} store: the store from which to extract the referenced auth. It is used to infer\n * the type of auth the reference is pointing to.\n * @param {Reference} reference: the reference to convert.\n * @returns {SwaggerSecurityRequirementObject?} the corresponding requirement object, should it\n * exist.\n */\nmethods.getSecurityRequirementFromReference = (store, reference) => {\n  const name = reference.get('uuid')\n  const auth = store.getIn([ 'auth', name ])\n  if (auth instanceof Auth.Basic || auth instanceof Auth.ApiKey) {\n    return methods.getSecurityRequirementForBasicOrApiKeyAuth(name)\n  }\n  else if (auth instanceof Auth.OAuth2) {\n    return methods.getSecurityRequirementForOAuth2Auth(name, reference)\n  }\n\n  return null\n}\n\n/**\n * extracts security requirements from a request.\n * @param {Store} store: the store to use to resolve reference to shared auth records.\n * @param {Request} request: the request to get the security requirements from\n * @returns {Array<SwaggerSecurityRequirementObject>} the corresponding list of security\n * requirements for this request.\n */\nmethods.getSecurityRequirementsFromRequest = (store, request) => {\n  const auths = request.get('auths')\n\n  const convertReferenceIntoSecurityRequirements = currify(\n    methods.getSecurityRequirementFromReference, store\n  )\n\n  const securityReqs = auths\n    .filter(methods.isReference)\n    .map(convertReferenceIntoSecurityRequirements)\n    .filter(value => !!value)\n    .valueSeq()\n    .toJS()\n\n  return securityReqs\n}\n\n/* eslint-disable max-statements */\n/**\n * converts a Request into an operation object.\n * @param {Store} store: the store used to resolve shared objecst.\n * @param {\n *   {\n *     consumes: Array<string>?,\n *     produces: Array<string>?\n *   }\n * } _: an object holding the globally defined consumes and produces fields.\n * @param {Request} request: the request to convert into an operation object\n * @param {string} key: the key of the request in the container that holds it\n * @returns {SwaggerOperationObject} the corresponding operation object\n *\n * NOTE: This method has parameter as [value, key] instead of {key, value} because it is invoked\n * on an Immutable structure.\n *\n * TODO deal with reference at this level\n */\nmethods.convertRequestToOperationObject = (store, { consumes, produces }, request, key) => {\n  const tags = methods.getTagStrings(request)\n\n  const keyMap = {\n    summary: 'name',\n    description: 'description',\n    operationId: 'id'\n  }\n\n  const operation = methods.getKeysFromRecord(keyMap, request)\n\n  const resolvedContainer = request.get('parameters').resolve(store)\n  const $consumes = methods.getConsumesEntry(consumes, resolvedContainer)\n  const $produces = methods.getProducesEntry(store, request, produces)\n  const parameters = methods.getParametersFromRequest(store, request)\n  const schemes = methods.getSchemesFromRequestEndpointOverlay(request)\n  const security = methods.getSecurityRequirementsFromRequest(store, request)\n\n  if (tags.length) {\n    operation.tags = tags\n  }\n\n  if ($consumes) {\n    operation.consumes = $consumes\n  }\n\n  if ($produces) {\n    operation.produces = $produces\n  }\n\n  if (parameters.length) {\n    operation.parameters = parameters\n  }\n\n  operation.responses = methods.getResponsesFromRequest(store, request)\n\n  if (schemes) {\n    operation.schemes = schemes\n  }\n\n  if (security && security.length) {\n    operation.security = security\n  }\n\n  const value = operation\n  const method = request.get('method') || key\n  return { key: method.toLowerCase(), value }\n}\n/* eslint-enable max-statements */\n\n/**\n * adds path parameters to an operation object\n * @param {Parameter} pathParam: the Parameter representing the path\n * @param {SwaggerOperationObject} operation: the operation object to update\n * @returns {SwaggerOperationObject} the updated operation object\n */\nmethods.addPathParametersToOperation = (pathParam, operation) => {\n  if (!pathParam || pathParam.get('superType') !== 'sequence') {\n    return operation\n  }\n\n  const params = (pathParam.get('value') || List())\n    .filter(param => param.get('key'))\n    .map(methods.convertReferenceOrParameterToParameterObject)\n    .map(({ value }) => {\n      value.required = true\n      return value\n    })\n    .toJS()\n\n  operation.value = operation.value || {}\n  operation.value.parameters = (operation.value.parameters || []).concat(params)\n\n  return operation\n}\n\n/**\n * converts a Resource into a Path Item object\n * @param {Store} store: the store used to resolve shared objecst.\n * @param {\n *   {\n *     consumes: Array<string>?,\n *     produces: Array<string>?\n *   }\n * } globalContentTypes: an object holding the globally defined consumes and produces fields.\n * @param {Resource} resource: the request to convert into an operation object\n * @returns {SwaggerOperationObject} the corresponding operation object\n *\n * TODO deal with reference at this level\n */\nmethods.convertResourceToPathItemObject = (store, globalContentTypes, resource) => {\n  const key = methods.getPathFromResource(resource)\n  const pathParam = resource.getIn([ 'path', 'pathname', 'parameter' ])\n\n  const convertRequest = currify(methods.convertRequestToOperationObject, store, globalContentTypes)\n  const applyTags = currify(methods.addTagsToOperation, resource)\n  const applyPathParams = currify(methods.addPathParametersToOperation, pathParam)\n\n  const value = resource.get('methods')\n    .map(convertRequest)\n    .map(applyTags)\n    .map(applyPathParams)\n    .valueSeq()\n    .reduce(convertEntryListInMap, {})\n\n  return { key, value }\n}\n\n/**\n * merges resource objects together if need be\n * @param {Object<string, SwaggerPathObject>} resourceMap: the object containing all path\n * objects\n * @param {Entry} entry: a SwaggerPathObject as an Entry\n * @param {string} entry.key: the path of the SwaggerPathObject\n * @param {SwaggerPathObject} entry.value: the SwaggerPathObject to merge in the resourceMap\n * @returns {Object<string, SwaggerPathObject>} the updated resource map\n */\nmethods.mergeResourceObjects = (resourceMap, { key, value }) => {\n  if (resourceMap[key]) {\n    Object.assign(resourceMap[key], value)\n  }\n  else {\n    resourceMap[key] = value\n  }\n\n  return resourceMap\n}\n\n/**\n * extracts all the Resources of an Api to convert them into a Path Object.\n * @param {Api} api: the api to extract the resources to convert from.\n * @param {\n *   {\n *     consumes: Array<string>?,\n *     produces: Array<string>?\n *   }\n * } globalContentTypes: an object holding the globally defined consumes and produces fields.\n * @returns {SwaggerPathObject} the corresponding path object.\n *\n * NOTE: If multiple resources share the same path, the reducer will try to add as many operation\n * objects as possible to the final resource object, instead of replacing the resource object\n * with the new one. This is useful for non-resource dependent architecture, like Postman or Paw,\n * as this means that we can easily create resourceMaps that have multiple GETs for the same\n * endpoints.\n */\nmethods.getPathObject = (api, globalContentTypes) => {\n  const store = api.get('store')\n  const convertResource = currify(\n    methods.convertResourceToPathItemObject,\n    store,\n    globalContentTypes\n  )\n\n  const paths = api.get('resources')\n    .map(convertResource)\n    .reduce(methods.mergeResourceObjects, {})\n\n  return paths\n}\n\n/**\n * tests whether a parameter is applicable for the consumesHeader or not\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} whether the parameter is applicable or not\n */\nmethods.isConsumesHeader = (param) => {\n  return param.get('key') === 'Content-Type' &&\n    param.get('usedIn') === 'request' &&\n    param.get('in') === 'headers'\n}\n\n/**\n * tests whether a parameter is applicable for the producesHeader or not\n * @param {Parameter} param: the parameter to test\n * @returns {boolean} whether the parameter is applicable or not\n */\nmethods.isProducesHeader = (param) => {\n  return param.get('key') === 'Content-Type' &&\n    param.get('usedIn') === 'response' &&\n    param.get('in') === 'headers'\n}\n\n/**\n * extracts content types from a Content-Type Parameter\n * @param {Parameter} param: the parameter to extract the contentTypes from.\n * @returns {Array<string>} the corresponding content types\n */\nmethods.extractContentTypesFromParam = (param) => {\n  const schema = param.getJSONSchema(false)\n  if (schema.enum) {\n    return schema.enum.map(contentType => contentType.split(';')[0])\n  }\n\n  if (schema.default) {\n    return [ schema.default ].map(contentType => contentType.split(';')[0])\n  }\n\n  return []\n}\n\n/**\n * finds all content-types from a Map of parameter, according to a filter function. (The filter\n * function is a test for either produces or consumes applicability of the parameter)\n * @param {OrderedMap<string, Parameter>} paramMap: the map of parameters to get the content-types\n * from.\n * @param {Function} filterFunc: the function to use to filter applicable parameters.\n * @returns {Array<string>} the corresponding contentTypes.\n *\n * NOTE: this methods assumes that the paramMap is fully resolved and that there are no Reference\n * records in it.\n */\nmethods.getContentTypeFromFilteredParams = (paramMap, filterFunc) => {\n  const contentTypes = paramMap\n    .filter(filterFunc)\n    .map(methods.extractContentTypesFromParam)\n    .reduce((flatList, list) => flatList.concat(list), [])\n\n  return contentTypes\n}\n\n/**\n * extracts the globally defined content-type headers for requests.\n * @param {Api} api: the api to get the consumes field from.\n * @returns {Array<string>?} the corresponding globally defined consumes field.\n */\nmethods.getGlobalConsumes = (api) => {\n  const consumes = methods.getContentTypeFromFilteredParams(\n    api.getIn([ 'store', 'parameter' ]),\n    methods.isConsumesHeader\n  )\n\n  if (!consumes.length) {\n    return undefined\n  }\n\n  return consumes\n}\n\n/**\n * extracts the globally defined content-type headers for requests.\n * @param {Api} api: the api to get the consumes field from.\n * @returns {Array<string>?} the corresponding globally defined consumes field.\n */\nmethods.getGlobalProduces = (api) => {\n  const produces = methods.getContentTypeFromFilteredParams(\n    api.getIn([ 'store', 'parameter' ]),\n    methods.isProducesHeader\n  )\n\n  if (!produces.length) {\n    return undefined\n  }\n\n  return produces\n}\n\n/* eslint-disable max-statements */\n/**\n * converts an Api Record into a swagger v2 object, then stringifies it.\n * @param {Api} $api: the api to convert in a swagger v2 object\n * @returns {string} the corresponding swagger file content.\n *\n * TODO: add hostTemplates as a patterned field if there are more than one endpoint, or if the\n * endpoint is templated.\n * TODO: add global Security requirements ?\n */\nmethods.createSwaggerObject = ($api) => {\n  const swagger = methods.getSwaggerFormatObject()\n  const info = methods.getInfoObject($api)\n  const { schemes, host, basePath } = methods.getEndpointRelatedObjects($api)\n  const consumes = methods.getGlobalConsumes($api)\n  const produces = methods.getGlobalProduces($api)\n  const definitions = methods.getDefinitions($api)\n  const securityDefinitions = methods.getSecurityDefinitions($api)\n  const parameters = methods.getParameterDefinitions($api)\n  const responses = methods.getResponseDefinitions($api)\n  const tags = methods.getTagDefinitions($api)\n  const paths = methods.getPathObject($api, { consumes, produces })\n\n  return {\n    swagger,\n    info,\n    host,\n    schemes,\n    basePath,\n    consumes,\n    produces,\n    paths,\n    definitions,\n    parameters,\n    responses,\n    securityDefinitions,\n    tags\n  }\n}\n/* eslint-enable max-statements */\n\n/**\n * serializes an Api into a Swagger formatted string\n * @param {Api} api: the api to convert\n * @returns {string} the corresponding swagger object, as a string\n */\nmethods.serialize = ({ api }) => {\n  const swagger = methods.createSwaggerObject(api)\n  const serialized = JSON.stringify(swagger, null, 2)\n  return serialized\n}\n\nexport const __internals__ = methods\nexport default SwaggerSerializer\n/* eslint-enable no-undefined */\n"
  },
  {
    "path": "src/serializers/swagger/v2.0/__tests__/Serializer.spec.js",
    "content": "/* eslint-disable max-nested-callbacks */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { Record, OrderedMap, List } from 'immutable'\n\nimport Api from '../../../../models/Api'\nimport Info from '../../../../models/Info'\nimport Contact from '../../../../models/Contact'\nimport License from '../../../../models/License'\nimport Reference from '../../../../models/Reference'\nimport Parameter from '../../../../models/Parameter'\nimport Resource from '../../../../models/Resource'\nimport URL from '../../../../models/URL'\nimport URLComponent from '../../../../models/URLComponent'\nimport Store from '../../../../models/Store'\nimport Constraint from '../../../../models/Constraint'\nimport ParameterContainer from '../../../../models/ParameterContainer'\nimport Response from '../../../../models/Response'\nimport Auth from '../../../../models/Auth'\nimport Interface from '../../../../models/Interface'\nimport Request from '../../../../models/Request'\nimport Variable from '../../../../models/Variable'\n\nimport Serializer, { __internals__ } from '../Serializer'\n\ndescribe('serializers/swagger/v2.0/Serializer.js', () => {\n  afterEach(() => restoreSpies())\n  describe('{ Serializer }', () => {\n    describe('@serialize', () => {\n      it('should call __internals__.serialize', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const actual = Serializer.serialize()\n\n        expect(__internals__.serialize).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.serialize with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'serialize').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.serialize(input)\n\n        expect(__internals__.serialize).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n\n    describe('@validate', () => {\n      it('should call __internals__.validate', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const actual = Serializer.validate()\n\n        expect(__internals__.validate).toHaveBeenCalled()\n        expect(actual).toEqual(expected)\n      })\n\n      it('should call __internals__.validate with the correct arguments', () => {\n        const expected = 1234\n        spyOn(__internals__, 'validate').andReturn(expected)\n\n        const input = '123412312'\n        const actual = Serializer.validate(input)\n\n        expect(__internals__.validate).toHaveBeenCalledWith(input)\n        expect(actual).toEqual(expected)\n      })\n    })\n  })\n\n  describe('@getKeysFromRecord', () => {\n    it('should work', () => {\n      const Test = Record({ a: 123, b: 234, c: 345 })\n      const test = new Test({ a: 'abc', b: 987 })\n\n      const keyMap = {\n        newA: 'a',\n        newC: 'c'\n      }\n\n      const expected = {\n        newA: 'abc',\n        newC: 345\n      }\n\n      const actual = __internals__.getKeysFromRecord(keyMap, test)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@parseJSONorYAML', () => {\n    it('should parse JSON', () => {\n      const jsonInput = {\n        some: 'object',\n        other: 'field'\n      }\n\n      const input = JSON.stringify(jsonInput)\n      const expected = jsonInput\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should parse YAML', () => {\n      const input = `\n        types:\n          User:\n            type: object\n      `\n\n      const expected = {\n        types: {\n          User: {\n            type: 'object'\n          }\n        }\n      }\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null otherwise', () => {\n      const input = `{\n        !Yaml.Or.JSON\n      }`\n\n      const expected = null\n      const actual = __internals__.parseJSONorYAML(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getQualityScore', () => {\n    it('should work', () => {\n      const inputs = [\n        {},\n        { swagger: '1.2' },\n        { swagger: '2.0', info: {}, paths: {} },\n        { swagger: '2.0', info: {}, paths: { '/a': 1, '/b': 2, '/c': 3 } },\n        {\n          swagger: '2.0', info: {},\n          paths: { '/a': 1, '/b': 2, '/c': 3 },\n          host: 'd', schemes: 'e'\n        },\n        {\n          swagger: '2.0', info: {},\n          paths: { '/a': 1, '/b': 2, '/c': 3 },\n          host: 'd', schemes: 'e',\n          securityDefinitions: 'f', definitions: 'g', parameters: 'h'\n        }\n      ]\n\n      const expected = [\n        0,\n        0,\n        0,\n        0.55,\n        0.95,\n        1\n      ]\n\n      const actual = inputs.map(__internals__.getQualityScore)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@validate', () => {\n    it('should call parseJSONorYAML', () => {\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(null)\n\n      const input = 'not-some-swagger-file'\n\n      __internals__.validate(input)\n\n      expect(__internals__.parseJSONorYAML).toHaveBeenCalledWith(input)\n    })\n\n    it('should call getQualityScore if input can be parsed', () => {\n      const parsed = { some: 'fakeSwaggerFile' }\n      spyOn(__internals__, 'parseJSONorYAML').andReturn(parsed)\n      spyOn(__internals__, 'getQualityScore').andReturn(0)\n\n      const input = 'not-some-swagger-file'\n\n      __internals__.validate(input)\n\n      expect(__internals__.getQualityScore).toHaveBeenCalledWith(parsed)\n    })\n\n    it('should work', () => {\n      const input = JSON.stringify({\n        swagger: '2.0',\n        info: { title: 'some swagger file' },\n        paths: {\n          '/root': {\n            get: {}\n          }\n        },\n        host: 'some.host.com',\n        schemes: [ 'https' ]\n      })\n\n      const expected = 0.7\n      const actual = __internals__.validate(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSwaggerFormatObject', () => {\n    it('should work', () => {\n      const expected = '2.0'\n      const actual = __internals__.getSwaggerFormatObject()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getDefaultInfoObject', () => {\n    it('should work', () => {\n      const expected = {\n        title: 'Unknown API',\n        version: 'v0.0.0'\n      }\n      const actual = __internals__.getDefaultInfoObject()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getDefaultContactObject', () => {\n    it('should work', () => {\n      const expected = {}\n      const actual = __internals__.getDefaultContactObject()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContactObject', () => {\n    it('should call getDefaultContactObject if no contact', () => {\n      spyOn(__internals__, 'getDefaultContactObject').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.getContactObject(new Info())\n\n      expect(__internals__.getDefaultContactObject).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const input = new Info({\n        contact: new Contact({\n          name: 'someName',\n          url: 'someUrl',\n          email: 'someEmail'\n        })\n      })\n\n      const expected = {\n        name: 'someName',\n        url: 'someUrl',\n        email: 'someEmail'\n      }\n      const actual = __internals__.getContactObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getDefaultLicenseObject', () => {\n    it('should work', () => {\n      const expected = {\n        name: 'informal'\n      }\n      const actual = __internals__.getDefaultLicenseObject()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getLicenseObject', () => {\n    it('should call getDefaultLicenseObject if no license', () => {\n      spyOn(__internals__, 'getDefaultLicenseObject').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.getLicenseObject(new Info())\n\n      expect(__internals__.getDefaultLicenseObject).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const input = new Info({\n        license: new License({\n          name: 'someName',\n          url: 'someUrl'\n        })\n      })\n\n      const expected = {\n        name: 'someName',\n        url: 'someUrl'\n      }\n      const actual = __internals__.getLicenseObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getInfoObject', () => {\n    it('should call getDefaultInfoObject if no Info', () => {\n      spyOn(__internals__, 'getDefaultInfoObject').andReturn(123)\n\n      const expected = 123\n      const actual = __internals__.getInfoObject(\n        new Api({\n          info: null\n        })\n      )\n\n      expect(__internals__.getDefaultInfoObject).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getContactObject if info has contact', () => {\n      spyOn(__internals__, 'getContactObject').andReturn(123)\n      const input = new Api({\n        info: new Info({\n          contact: new Contact()\n        })\n      })\n\n      __internals__.getInfoObject(input)\n\n      expect(__internals__.getContactObject).toHaveBeenCalled()\n    })\n\n    it('should call getLicenseObject if info has license', () => {\n      spyOn(__internals__, 'getLicenseObject').andReturn(123)\n      const input = new Api({\n        info: new Info({\n          license: new License()\n        })\n      })\n\n      __internals__.getInfoObject(input)\n\n      expect(__internals__.getLicenseObject).toHaveBeenCalled()\n    })\n\n    it('should work', () => {\n      const input = new Api({\n        info: new Info({\n          title: 'some api',\n          description: 'some description',\n          tos: 'some tos',\n          version: 'v1',\n          contact: new Contact({\n            name: 'alex'\n          }),\n          license: new License({\n            name: 'MIT'\n          })\n        })\n      })\n\n      const expected = {\n        title: 'some api',\n        description: 'some description',\n        termsOfService: 'some tos',\n        version: 'v1',\n        contact: {\n          name: 'alex'\n        },\n        license: {\n          name: 'MIT'\n        }\n      }\n      const actual = __internals__.getInfoObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isReference', () => {\n    it('should work', () => {\n      const input = [\n        new Reference(),\n        new Parameter()\n      ]\n\n      const expected = [ true, false ]\n      const actual = input.map(__internals__.isReference)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEnpointsSharedByResource', () => {\n    it('should work', () => {\n      const input = new Resource({\n        endpoints: new OrderedMap({\n          test: new Reference(),\n          notaref: new URL({\n            url: 'https://echo.paw.cloud/base'\n          })\n        })\n      })\n\n      const expected = new OrderedMap({\n        test: new Reference()\n      })\n\n      const actual = __internals__.getEnpointsSharedByResource(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getUuidOfReference', () => {\n    it('should work', () => {\n      const reference = new Reference({ uuid: 1234 })\n      const expected = 1234\n      const actual = __internals__.getUuidOfReference(reference)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getMostCommonEndpoint', () => {\n    it('should work', () => {\n      const api = new Api({\n        resources: new OrderedMap({\n          a: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          }),\n          b: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          c: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          d: new Resource({\n            endpoints: new OrderedMap({\n              '432': new Reference({ uuid: '432' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          })\n        }),\n        store: new Store({\n          endpoint: new OrderedMap({\n            '123': 'expectedValue',\n            '321': 'incorrect',\n            '234': 'incorrect',\n            '432': 'incorrect'\n          })\n        })\n      })\n\n      const expected = 'expectedValue'\n      const actual = __internals__.getMostCommonEndpoint(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work return null if reference not found', () => {\n      const api = new Api({\n        resources: new OrderedMap({\n          a: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          }),\n          b: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          c: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          d: new Resource({\n            endpoints: new OrderedMap({\n              '432': new Reference({ uuid: '432' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          })\n        }),\n        store: new Store({\n          variable: new OrderedMap({\n            // missing '123' reference\n            '321': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '234': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '432': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            })\n          })\n        })\n      })\n\n      const expected = null\n      const actual = __internals__.getMostCommonEndpoint(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if selected variable has no value', () => {\n      const api = new Api({\n        resources: new OrderedMap({\n          a: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          }),\n          b: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          c: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          d: new Resource({\n            endpoints: new OrderedMap({\n              '432': new Reference({ uuid: '432' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          })\n        }),\n        store: new Store({\n          variable: new OrderedMap({\n            '123': new Variable({\n              values: OrderedMap()\n            }),\n            '321': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '234': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '432': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            })\n          })\n        })\n      })\n\n      const expected = null\n      const actual = __internals__.getMostCommonEndpoint(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with variables', () => {\n      const api = new Api({\n        resources: new OrderedMap({\n          a: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          }),\n          b: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          c: new Resource({\n            endpoints: new OrderedMap({\n              '123': new Reference({ uuid: '123' }),\n              '234': new Reference({ uuid: '234' })\n            })\n          }),\n          d: new Resource({\n            endpoints: new OrderedMap({\n              '432': new Reference({ uuid: '432' }),\n              '321': new Reference({ uuid: '321' })\n            })\n          })\n        }),\n        store: new Store({\n          variable: new OrderedMap({\n            '123': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud'\n              })\n            }),\n            '321': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '234': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            }),\n            '432': new Variable({\n              values: OrderedMap({\n                default: 'https://echo.paw.cloud/invalid'\n              })\n            })\n          })\n        })\n      })\n\n      const expected = new URL({ url: 'https://echo.paw.cloud' })\n      const actual = __internals__.getMostCommonEndpoint(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@removeDotsFromProtocol', () => {\n    it('should work', () => {\n      const input = [ 'http', 'https:' ]\n\n      const expected = [ 'http', 'https' ]\n      const actual = input.map(__internals__.removeDotsFromProtocol)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemesFromEndpoint', () => {\n    it('should work', () => {\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud/base'\n      }).set('protocol', List([ 'https:', 'http:' ]))\n\n      const expected = [ 'https', 'http' ]\n      const actual = __internals__.getSchemesFromEndpoint(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getHostAndBasePathFromEndpoint', () => {\n    it('should work', () => {\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud/base'\n      })\n\n      const expected = {\n        host: 'echo.paw.cloud',\n        basePath: '/base'\n      }\n      const actual = __internals__.getHostAndBasePathFromEndpoint(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with mininum info', () => {\n      const endpoint = new URL()\n\n      /* eslint-disable no-undefined */\n      const expected = {\n        host: undefined,\n        basePath: undefined\n      }\n      /* eslint-enable no-undefined */\n      const actual = __internals__.getHostAndBasePathFromEndpoint(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work without a basePath', () => {\n      const endpoint = new URL({\n        url: 'https://echo.paw.cloud'\n      })\n\n      const expected = {\n        host: 'echo.paw.cloud',\n        basePath: '/'\n      }\n      const actual = __internals__.getHostAndBasePathFromEndpoint(endpoint)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getEndpointRelatedObjects', () => {\n    it('should work if all the expected underlying methods are correct', () => {\n      spyOn(__internals__, 'getMostCommonEndpoint').andReturn(new URL())\n      spyOn(__internals__, 'getSchemesFromEndpoint').andReturn([ 'wss' ])\n      spyOn(__internals__, 'getHostAndBasePathFromEndpoint').andReturn({\n        host: 'someHost',\n        basePath: '/path'\n      })\n\n      const input = new Api()\n      const expected = {\n        schemes: [ 'wss' ],\n        host: 'someHost',\n        basePath: '/path'\n      }\n      const actual = __internals__.getEndpointRelatedObjects(input)\n\n      expect(__internals__.getMostCommonEndpoint).toHaveBeenCalled()\n      expect(__internals__.getSchemesFromEndpoint).toHaveBeenCalled()\n      expect(__internals__.getHostAndBasePathFromEndpoint).toHaveBeenCalled()\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no endpoint', () => {\n      spyOn(__internals__, 'getMostCommonEndpoint').andReturn(null)\n      spyOn(__internals__, 'getSchemesFromEndpoint').andReturn([ 'wss' ])\n      spyOn(__internals__, 'getHostAndBasePathFromEndpoint').andReturn({\n        host: 'someHost',\n        basePath: '/path'\n      })\n\n      const input = new Api()\n      const expected = {}\n      const actual = __internals__.getEndpointRelatedObjects(input)\n\n      expect(__internals__.getMostCommonEndpoint).toHaveBeenCalled()\n      expect(__internals__.getSchemesFromEndpoint).toNotHaveBeenCalled()\n      expect(__internals__.getHostAndBasePathFromEndpoint).toNotHaveBeenCalled()\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getDefinitions', () => {\n    it('should work', () => {\n      const api = new Api({\n        store: new Store({\n          constraint: new OrderedMap({\n            ignored: new Constraint.Enum([ 1, 2, 3 ]),\n            userId: new Constraint.JSONSchema({ type: 'integer', minimum: 0 }),\n            petName: new Constraint.JSONSchema({ type: 'string', pattern: '^.{3,10}$' })\n          })\n        })\n      })\n\n      const expected = {\n        userId: { type: 'integer', minimum: 0 },\n        petName: { type: 'string', pattern: '^.{3,10}$' }\n      }\n      const actual = __internals__.getDefinitions(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no definitions', () => {\n      const api = new Api()\n\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n      const actual = __internals__.getDefinitions(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getHeaderFromHeaderParameterOrReference', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertParameterToHeaderObject').andCall(p => p.get('default'))\n      const inputs = [\n        [ new Store(), new Parameter({ default: 123 }) ],\n        [ new Store(), new Reference({ uuid: 123 }) ],\n        [ new Store({\n          parameter: OrderedMap({\n            '123': new Parameter({ key: 'Content-Type' })\n          })\n        }), new Reference({ uuid: '123' }) ],\n        [ new Store({\n          parameter: OrderedMap({\n            '123': new Parameter({ key: 'Accept', default: 234 })\n          })\n        }), new Reference({ uuid: '123' }) ]\n      ]\n      const expected = [\n        123,\n        null,\n        null,\n        234\n      ]\n\n      const actual = inputs\n        .map(input => __internals__.getHeaderFromHeaderParameterOrReference(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getHeadersFromResponse', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getHeaderFromHeaderParameterOrReference').andCall((s, v) => {\n        return v % 2 ? null : { key: v, value: s + v }\n      })\n\n      const inputs = [\n        [ 123, new Response() ],\n        [ 123, new Response({\n          parameters: new ParameterContainer({\n            headers: OrderedMap({\n              a: 234,\n              b: 345,\n              c: 456\n            })\n          })\n        }) ]\n      ]\n\n      /* eslint-disable no-undefined */\n      const expected = [\n        undefined,\n        { '234': 123 + 234, '456': 123 + 456 }\n      ]\n      /* eslint-enable no-undefined */\n      const actual = inputs.map(input => __internals__.getHeadersFromResponse(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemaFromResponse', () => {\n    it('should work', () => {\n      const expected = {\n        type: 'string',\n        maxLength: 100\n      }\n\n      const response = new Response({\n        parameters: new ParameterContainer({\n          body: new OrderedMap({\n            '123': new Parameter({\n              constraints: new List([\n                new Constraint.JSONSchema(expected)\n              ])\n            })\n          })\n        })\n      })\n\n      const actual = __internals__.getSchemaFromResponse(response)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResponseRecordToResponseObject', () => {\n    it('should work', () => {\n      const store = new Store()\n      const entry = {\n        key: 123,\n        value: new Response({\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              userId: new Parameter({ key: 'userId', type: 'string' }),\n              petId: new Parameter({ key: 'petId', type: 'number' })\n            }),\n            body: new OrderedMap({\n              '123': new Parameter({\n                constraints: new List([\n                  new Constraint.JSONSchema({ type: 'string', maxLength: '140' })\n                ])\n              })\n            })\n          })\n        })\n      }\n\n      const expectedValue = {\n        description: 'no description was provided for this response',\n        headers: {\n          userId: { type: 'string' },\n          petId: { type: 'number' }\n        },\n        schema: {\n          type: 'string',\n          maxLength: '140'\n        }\n      }\n\n      const expected = {\n        key: 123,\n        value: expectedValue\n      }\n\n      const actual = __internals__.convertResponseRecordToResponseObject(store, entry)\n\n      /* the objects are not really equal, as the actual object has many undefined fields, like\n      * maximum\n      */\n      expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected))\n    })\n\n    it('should work with description', () => {\n      const store = new Store()\n      const entry = {\n        key: 123,\n        value: new Response({\n          description: 'some description',\n          parameters: new ParameterContainer({\n            headers: new OrderedMap({\n              userId: new Parameter({ key: 'userId', type: 'string' }),\n              petId: new Parameter({ key: 'petId', type: 'number' })\n            }),\n            body: new OrderedMap({\n              '123': new Parameter({\n                constraints: new List([\n                  new Constraint.JSONSchema({ type: 'string', maxLength: '140' })\n                ])\n              })\n            })\n          })\n        })\n      }\n\n      const expectedValue = {\n        description: 'some description',\n        headers: {\n          userId: { type: 'string' },\n          petId: { type: 'number' }\n        },\n        schema: {\n          type: 'string',\n          maxLength: '140'\n        }\n      }\n\n      const expected = {\n        key: 123,\n        value: expectedValue\n      }\n\n      const actual = __internals__.convertResponseRecordToResponseObject(store, entry)\n\n      /* the objects are not really equal, as the actual object has many undefined fields, like\n      * maximum\n      */\n      expect(JSON.stringify(actual)).toEqual(JSON.stringify(expected))\n    })\n  })\n\n  describe('@getResponseDefinitions', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertResponseRecordToResponseObject').andReturn({ key: 12, value: 1 })\n\n      const input = new Api({\n        store: new Store({\n          response: new OrderedMap({\n            a: new Response(),\n            b: new Response()\n          })\n        })\n      })\n      const expected = { '12': 1 }\n      const actual = __internals__.getResponseDefinitions(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no responses', () => {\n      const input = new Api()\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n      const actual = __internals__.getResponseDefinitions(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertBasicAuth', () => {\n    it('should work', () => {\n      const input = new Auth.Basic({\n        authName: 'basic_auth',\n        description: 'basic auth desc'\n      })\n      const expected = {\n        key: 'basic_auth',\n        value: {\n          type: 'basic',\n          description: 'basic auth desc'\n        }\n      }\n\n      const actual = __internals__.convertBasicAuth(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no description', () => {\n      const input = new Auth.Basic({\n        authName: 'basic_auth'\n      })\n      const expected = {\n        key: 'basic_auth',\n        value: {\n          type: 'basic'\n        }\n      }\n\n      const actual = __internals__.convertBasicAuth(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertApiKeyAuth', () => {\n    it('should work', () => {\n      const input = new Auth.ApiKey({\n        authName: 'apikey_auth',\n        description: 'apikey auth desc',\n        name: 'api_key',\n        in: 'query'\n      })\n      const expected = {\n        key: 'apikey_auth',\n        value: {\n          type: 'apiKey',\n          description: 'apikey auth desc',\n          name: 'api_key',\n          in: 'query'\n        }\n      }\n\n      const actual = __internals__.convertApiKeyAuth(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertOAuth2Auth', () => {\n    it('should work', () => {\n      const input = new Auth.OAuth2({\n        authName: 'oauth2_auth',\n        description: 'oauth 2 auth desc',\n        flow: 'implicit',\n        authorizationUrl: 'authurl',\n        tokenUrl: 'tokenurl',\n        scopes: List([ { key: 'write:self', value: 'some desc' } ])\n      })\n      const expected = {\n        key: 'oauth2_auth',\n        value: {\n          type: 'oauth2',\n          description: 'oauth 2 auth desc',\n          flow: 'implicit',\n          authorizationUrl: 'authurl',\n          tokenUrl: 'tokenurl',\n          scopes: {\n            'write:self': 'some desc'\n          }\n        }\n      }\n\n      const actual = __internals__.convertOAuth2Auth(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertAuthToSecurityRequirementEntry', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertBasicAuth').andReturn(123)\n      spyOn(__internals__, 'convertApiKeyAuth').andReturn(234)\n      spyOn(__internals__, 'convertOAuth2Auth').andReturn(345)\n\n      const inputs = [\n        new Auth.Basic(),\n        new Auth.ApiKey(),\n        new Auth.OAuth2(),\n        new Auth.Hawk()\n      ]\n      const expected = [\n        123, 234, 345, null\n      ]\n      const actual = inputs.map(input => __internals__.convertAuthToSecurityRequirementEntry(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSecurityDefinitions', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertAuthToSecurityRequirementEntry').andCall(v => {\n        return v % 2 ? { key: v, value: v * 2 } : null\n      })\n\n      const inputs = [\n        new Api(),\n        new Api({ store: new Store({ auth: OrderedMap({ a: 123, b: 234, c: 345 }) }) })\n      ]\n\n      /* eslint-disable no-undefined */\n      const expected = [\n        undefined,\n        { '123': 123 * 2, '345': 345 * 2 }\n      ]\n      /* eslint-enable no-undefined */\n\n      const actual = inputs.map(input => __internals__.getSecurityDefinitions(input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterToSchemaParameter', () => {\n    it('should work', () => {\n      const input = new Parameter({\n        type: 'string',\n        constraints: List([ new Constraint.Enum([ 'test', 'fake' ]) ])\n      })\n      const key = 123\n\n      const expected = {\n        key,\n        value: {\n          in: 'body',\n          required: false,\n          name: 'body',\n          schema: {\n            type: 'string',\n            enum: [ 'test', 'fake' ]\n          }\n        }\n      }\n      const actual = __internals__.convertParameterToSchemaParameter(input, key)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isBodyParameter', () => {\n    it('should return false if param not in body', () => {\n      const input = new Parameter({\n        in: 'header'\n      })\n\n      const expected = false\n      const actual = __internals__.isBodyParameter(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return true if param is in body and has no applicableContexts', () => {\n      const input = new Parameter({\n        in: 'body'\n      })\n\n      const expected = true\n      const actual = __internals__.isBodyParameter(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if param is in body and has ctxs that validate formData', () => {\n      const input = new Parameter({\n        in: 'body',\n        applicableContexts: List([\n          new Parameter({\n            key: 'Content-Type',\n            constraints: List([\n              new Constraint.Enum([\n                'application/x-www-form-urlencoded',\n                'multipart/form-data'\n              ])\n            ])\n          })\n        ])\n      })\n\n      const expected = false\n      const actual = __internals__.isBodyParameter(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return false if param is in body and has no ctxs that validate formData', () => {\n      const input = new Parameter({\n        in: 'body',\n        applicableContexts: List([\n          new Parameter({\n            key: 'Content-Type',\n            constraints: List([\n              new Constraint.Enum([\n                'application/json',\n                'application/xml'\n              ])\n            ])\n          })\n        ])\n      })\n\n      const expected = true\n      const actual = __internals__.isBodyParameter(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParamLocation', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter({ in: 'body' }),\n        new Parameter({ in: 'path' }),\n        new Parameter({ in: 'headers' }),\n        new Parameter({ in: 'queries' })\n      ]\n\n      const expected = [ 'formData', 'path', 'header', 'query' ]\n      const actual = inputs.map(__internals__.getParamLocation)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getCommonFieldsFromParameter', () => {\n    it('should work if no parameter', () => {\n      const input = null\n\n      const expected = {}\n\n      const actual = __internals__.getCommonFieldsFromParameter(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () => {\n      const input = new Parameter({\n        type: 'string',\n        default: 'test',\n        constraints: List([\n          new Constraint.ExclusiveMinimum(12),\n          new Constraint.ExclusiveMaximum(42),\n          new Constraint.MultipleOf(3),\n          new Constraint.MinimumLength(3),\n          new Constraint.MaximumLength(8),\n          new Constraint.Pattern('[12]{5}'),\n          new Constraint.MinimumItems(4),\n          new Constraint.MaximumItems(6),\n          new Constraint.UniqueItems(true),\n          new Constraint.Enum([ 1, 2, 3, 4 ])\n        ])\n      })\n\n      /* eslint-disable no-undefined */\n      const expected = {\n        type: 'string',\n        minimum: 12,\n        exclusiveMinimum: true,\n        maximum: 42,\n        exclusiveMaximum: true,\n        multipleOf: 3,\n        minLength: 3,\n        maxLength: 8,\n        pattern: '[12]{5}',\n        minItems: 4,\n        maxItems: 6,\n        uniqueItems: true,\n        enum: [ 1, 2, 3, 4 ],\n        default: 'test',\n        'x-real-type': undefined\n      }\n      /* eslint-enable no-undefined */\n\n      const actual = __internals__.getCommonFieldsFromParameter(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with type object', () => {\n      const input = new Parameter({\n        type: 'object',\n        default: { example: 'test' },\n        constraints: List([\n          new Constraint.ExclusiveMinimum(12),\n          new Constraint.ExclusiveMaximum(42),\n          new Constraint.MultipleOf(3),\n          new Constraint.MinimumLength(3),\n          new Constraint.MaximumLength(8),\n          new Constraint.Pattern('[12]{5}'),\n          new Constraint.MinimumItems(4),\n          new Constraint.MaximumItems(6),\n          new Constraint.UniqueItems(true),\n          new Constraint.Enum([ 1, 2, 3, 4 ])\n        ])\n      })\n\n      /* eslint-disable no-undefined */\n      const expected = {\n        type: 'string',\n        minimum: 12,\n        exclusiveMinimum: true,\n        maximum: 42,\n        exclusiveMaximum: true,\n        multipleOf: 3,\n        minLength: 3,\n        maxLength: 8,\n        pattern: '[12]{5}',\n        minItems: 4,\n        maxItems: 6,\n        uniqueItems: true,\n        enum: [ 1, 2, 3, 4 ],\n        default: { example: 'test' },\n        'x-real-type': 'object'\n      }\n      /* eslint-enable no-undefined */\n\n      const actual = __internals__.getCommonFieldsFromParameter(input)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterToItemsObject', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn(123)\n\n      const input = '123'\n      const expected = {\n        value: 123\n      }\n      const actual = __internals__.convertParameterToItemsObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with References', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn(123)\n\n      const input = new Reference({ uuid: 'User' })\n      const expected = {\n        value: '#/parameters/User'\n      }\n      const actual = __internals__.convertParameterToItemsObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterToHeaderObject', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn({ a: 321 })\n\n      const parameter = new Parameter({\n        key: 123,\n        description: 'test'\n      })\n\n      const expected = {\n        key: 123,\n        value: {\n          a: 321,\n          description: 'test'\n        }\n      }\n\n      const actual = __internals__.convertParameterToHeaderObject(parameter)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterToStandardParameter', () => {\n    it('should work with minimum info', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn({ a: 321 })\n\n      const parameter = new Parameter({ required: null })\n      const key = 123\n\n      /* eslint-disable no-undefined */\n      const expected = {\n        key,\n        value: {\n          a: 321,\n          description: undefined,\n          name: undefined,\n          required: undefined,\n          in: undefined\n        }\n      }\n      /* eslint-disable no-undefined */\n\n      const actual = __internals__.convertParameterToStandardParameterObject(parameter, key)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn({ a: 321 })\n\n      const parameter = new Parameter({\n        key: 'someParamName',\n        description: 'test',\n        required: true,\n        in: 'headers'\n      })\n      const key = 123\n\n      const expected = {\n        key,\n        value: {\n          a: 321,\n          description: 'test',\n          name: 'someParamName',\n          required: true,\n          in: 'header'\n        }\n      }\n\n      const actual = __internals__.convertParameterToStandardParameterObject(parameter, key)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with type array', () => {\n      spyOn(__internals__, 'getCommonFieldsFromParameter').andReturn({ a: 321, type: 'array' })\n      spyOn(__internals__, 'convertParameterToItemsObject').andCall(v => ({ value: v }))\n\n      const parameter = new Parameter({\n        key: 'someParamName',\n        description: 'test',\n        required: true,\n        type: 'array',\n        value: 234,\n        in: 'headers'\n      })\n      const key = 123\n\n      const expected = {\n        key,\n        value: {\n          a: 321,\n          type: 'array',\n          description: 'test',\n          name: 'someParamName',\n          required: true,\n          in: 'header',\n          items: 234\n        }\n      }\n\n      const actual = __internals__.convertParameterToStandardParameterObject(parameter, key)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterToParameterObject', () => {\n    it('should work if underlying methods are correct, and param is body', () => {\n      spyOn(__internals__, 'isBodyParameter').andReturn(true)\n      spyOn(__internals__, 'convertParameterToSchemaParameter').andReturn(123)\n      spyOn(__internals__, 'convertParameterToStandardParameterObject').andReturn(321)\n\n      const param = new Parameter()\n      const key = 1234\n\n      const expected = 123\n      const actual = __internals__.convertParameterToParameterObject(param, key)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct, and param is not body', () => {\n      spyOn(__internals__, 'isBodyParameter').andReturn(false)\n      spyOn(__internals__, 'convertParameterToSchemaParameter').andReturn(123)\n      spyOn(__internals__, 'convertParameterToStandardParameterObject').andReturn(321)\n\n      const param = new Parameter()\n      const key = 1234\n\n      const expected = 321\n      const actual = __internals__.convertParameterToParameterObject(param, key)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParameterDefinitions', () => {\n    it('should work if no parameters', () => {\n      spyOn(__internals__, 'isConsumesHeader').andReturn(false)\n      spyOn(__internals__, 'isProducesHeader').andReturn(false)\n      spyOn(__internals__, 'convertParameterToParameterObject').andReturn({\n        key: 123,\n        value: 321\n      })\n\n      const input = new Api()\n\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n\n      const actual = __internals__.getParameterDefinitions(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'isConsumesHeader').andReturn(false)\n      spyOn(__internals__, 'isProducesHeader').andReturn(false)\n      spyOn(__internals__, 'convertParameterToParameterObject').andReturn({\n        key: 123,\n        value: 321\n      })\n\n      const input = new Api({\n        store: new Store({\n          parameter: new OrderedMap({\n            a: 'b'\n          })\n        })\n      })\n\n      const expected = { '123': 321 }\n      const actual = __internals__.getParameterDefinitions(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isUseableAsTag', () => {\n    it('should work', () => {\n      const inputs = [\n        null,\n        new Interface({ level: 'request' }),\n        new Interface({ level: 'resource' }),\n        new Interface({ level: 'auth' }),\n        new Interface({ level: 'parameter' })\n      ]\n\n      const expected = [ false, true, true, false, false ]\n      const actual = inputs.map(__internals__.isUseableAsTag)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertInterfaceToTagObject', () => {\n    it('should work', () => {\n      const input = new Interface({\n        name: 'someItf',\n        uuid: 'someItf',\n        description: 'some desc'\n      })\n\n      const expected = {\n        name: 'someItf',\n        description: 'some desc'\n      }\n      const actual = __internals__.convertInterfaceToTagObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with unnamed tags', () => {\n      const input = new Interface({\n        description: 'some desc'\n      })\n\n      const expected = {\n        name: 'unnamedTag',\n        description: 'some desc'\n      }\n      const actual = __internals__.convertInterfaceToTagObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getTagDefinitions', () => {\n    it('should work', () => {\n      const api = new Api({\n        store: new Store({\n          interface: new OrderedMap({\n            a: new Interface({\n              name: 'user',\n              uuid: 'user',\n              level: 'request',\n              description: 'a user related request'\n            }),\n            b: new Interface({\n              name: 'pet',\n              uuid: 'pet',\n              level: 'resource',\n              description: 'a pet related request'\n            }),\n            c: new Interface({\n              name: 'high-security',\n              uuid: 'high-security',\n              level: 'auth',\n              description: 'a security related auth'\n            })\n          })\n        })\n      })\n\n      const expected = [\n        {\n          name: 'user',\n          description: 'a user related request'\n        },\n        {\n          name: 'pet',\n          description: 'a pet related request'\n        }\n      ]\n\n      const actual = __internals__.getTagDefinitions(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getPathFromResource', () => {\n    it('should work', () => {\n      const input = new Resource({\n        path: new URL({\n          url: '/my/path/{pathId}',\n          variableDelimiters: List([ '{', '}' ])\n        })\n      })\n\n      const expected = '/my/path/{pathId}'\n      const actual = __internals__.getPathFromResource(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work even if path not starting with /', () => {\n      const input = new Resource({\n        path: new URL().set(\n          'pathname',\n          new URLComponent({\n            componentName: 'pathname',\n            string: 'my/path/{pathId}',\n            variableDelimiters: List([ '{', '}' ])\n          })\n        )\n      })\n\n      const expected = '/my/path/{pathId}'\n      const actual = __internals__.getPathFromResource(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertInterfaceToTagString', () => {\n    it('should work', () => {\n      const input = new Reference({ uuid: 123 })\n      const expected = 123\n      const actual = __internals__.convertInterfaceToTagString(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getTagStrings', () => {\n    it('should work', () => {\n      const input = new Request({\n        interfaces: new OrderedMap({\n          a: new Interface({ uuid: 123 }),\n          b: new Reference({ uuid: 321 })\n        })\n      })\n\n      const expected = [ 123, 321 ]\n      const actual = __internals__.getTagStrings(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@addTagsToOperation', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'getTagStrings').andReturn([ 123, 321 ])\n\n      const request = new Request()\n      const operation = { tags: [ 234, 432 ] }\n\n      const expected = { tags: [ 234, 432, 123, 321 ] }\n      const actual = __internals__.addTagsToOperation(request, operation)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with empty tags field', () => {\n      spyOn(__internals__, 'getTagStrings').andReturn([ 123, 321 ])\n\n      const request = new Request()\n      const operation = {}\n\n      const expected = { tags: [ 123, 321 ] }\n      const actual = __internals__.addTagsToOperation(request, operation)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@equalSet', () => {\n    it('should work', () => {\n      const first = [ 1, 2, 3 ]\n      const second = [ 1, 3, 2 ]\n\n      const expected = true\n      const actual = __internals__.equalSet(first, second)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  /* eslint-disable no-undefined */\n  describe('@getConsumesEntry', () => {\n    it('should return undefined if no global or local consumes', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([])\n      const globalConsumes = undefined\n      const container = new ParameterContainer()\n\n      const actual = __internals__.getConsumesEntry(globalConsumes, container)\n\n      expect(actual).toNotExist()\n    })\n\n    it('should return undefined if local consumes equals global one', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 'a', 'b' ])\n      const globalConsumes = [ 'a', 'b' ]\n      const container = new ParameterContainer()\n\n      const actual = __internals__.getConsumesEntry(globalConsumes, container)\n\n      expect(actual).toNotExist()\n    })\n\n    it('should return local if different from global', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 'c', 'b' ])\n      const globalConsumes = [ 'a', 'b' ]\n      const container = new ParameterContainer()\n\n      const expected = [ 'c', 'b' ]\n      const actual = __internals__.getConsumesEntry(globalConsumes, container)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n  /* eslint-enable no-undefined */\n\n  /* eslint-disable no-undefined */\n  describe('@getProducesEntry', () => {\n    it('should return undefined if no global or local produces', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([])\n      const store = new Store()\n      const request = new Request()\n      const globalProduces = undefined\n\n      const actual = __internals__.getProducesEntry(store, request, globalProduces)\n\n      expect(actual).toNotExist()\n    })\n\n    it('should return undefined if local produces equals global one', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 'a', 'b' ])\n      const store = new Store()\n      const request = new Request({\n        responses: OrderedMap({\n          '200': new Response({\n            parameters: new ParameterContainer({\n              headers: OrderedMap({ a: 'a', b: 'b' })\n            })\n          })\n        })\n      })\n\n      const globalProduces = [ 'a', 'b' ]\n\n      const actual = __internals__.getProducesEntry(store, request, globalProduces)\n\n      expect(actual).toNotExist()\n    })\n\n    it('should return local if different from global', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 'c', 'b' ])\n      const store = new Store()\n      const request = new Request({\n        responses: OrderedMap({\n          '200': new Response({\n            parameters: new ParameterContainer({\n              headers: OrderedMap({ c: 'c', d: 'd' })\n            })\n          })\n        })\n      })\n      const globalProduces = [ 'a', 'b' ]\n\n      const expected = [ 'c', 'b' ]\n      const actual = __internals__.getProducesEntry(store, request, globalProduces)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n  /* eslint-enable no-undefined */\n\n  describe('@convertReferenceToParameterObject', () => {\n    it('should work', () => {\n      const input = new Reference({\n        uuid: '1234'\n      })\n\n      const expected = {\n        value: {\n          $ref: '#/parameters/1234'\n        }\n      }\n      const actual = __internals__.convertReferenceToParameterObject(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceOrParameterToParameterObject', () => {\n    it('should call convertReferenceToParameterObject if input is reference', () => {\n      spyOn(__internals__, 'convertReferenceToParameterObject').andReturn(123)\n\n      const input = new Reference()\n      const expected = 123\n      const actual = __internals__.convertReferenceOrParameterToParameterObject(input)\n\n      expect(__internals__.convertReferenceToParameterObject).toHaveBeenCalledWith(input)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call convertParameterToParameterObject if input is parameter', () => {\n      spyOn(__internals__, 'convertParameterToParameterObject').andReturn(321)\n\n      const input = new Parameter()\n      const key = 'abc'\n      const expected = 321\n      const actual = __internals__.convertReferenceOrParameterToParameterObject(input, key)\n\n      expect(__internals__.convertParameterToParameterObject).toHaveBeenCalledWith(input, key)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertParameterMapToParameterObjectArray', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertReferenceOrParameterToParameterObject').andReturn({ value: 123 })\n\n      const params = new OrderedMap({\n        a: 123,\n        b: 321,\n        c: 234\n      })\n\n      const expected = [ 123, 123, 123 ]\n      const actual = __internals__.convertParameterMapToParameterObjectArray(params)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@isParameterOrReferenceNotAConsumesHeader', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'isConsumesHeader').andCall(v => v ? v % 2 : false)\n      const inputs = [\n        [ new Store(), 123 ],\n        [ new Store(), new Reference({ uuid: 'abc' }) ],\n        [ new Store({ parameter: OrderedMap({ abc: 234 }) }), new Reference({ uuid: 'abc' }) ],\n        [ new Store({ parameter: OrderedMap({ abc: 345 }) }), new Reference({ uuid: 'abc' }) ]\n      ]\n      const expected = [\n        false,\n        true,\n        true,\n        false\n      ]\n      const actual = inputs\n        .map(input => __internals__.isParameterOrReferenceNotAConsumesHeader(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getParametersFromRequest', () => {\n    it('should call convertParameterMapToParameterObjectArray for each container block', () =>{\n      const test = { default: 123, in: 'formData' }\n      spyOn(__internals__, 'convertParameterMapToParameterObjectArray').andReturn([ test ])\n\n      const store = new Store()\n      const request = new Request({\n        parameters: new ParameterContainer()\n      })\n\n      const expected = [ test, test, test ]\n      const actual = __internals__.getParametersFromRequest(store, request)\n\n      expect(__internals__.convertParameterMapToParameterObjectArray.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return only one body param', () => {\n      let calls = 0\n      const buffer = { c: 234 }\n      const test = [ { a: 123, in: 'body' }, { b: 321, in: 'body' } ]\n      spyOn(__internals__, 'convertParameterMapToParameterObjectArray').andCall(() => {\n        calls += 1\n        if (calls === 3) {\n          return test\n        }\n        return buffer\n      })\n\n      const store = new Store()\n      const request = new Request({\n        parameters: new ParameterContainer()\n      })\n\n      const expected = [ buffer, buffer, { a: 123, in: 'body' } ]\n      const actual = __internals__.getParametersFromRequest(store, request)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work', () =>{\n      const test = { default: 123, in: 'formData' }\n      spyOn(__internals__, 'convertParameterMapToParameterObjectArray')\n        .andCall(v => v.valueSeq().toJS())\n      spyOn(__internals__, 'isParameterOrReferenceNotAConsumesHeader').andReturn(true)\n\n      const store = new Store()\n      const request = new Request({\n        parameters: new ParameterContainer({\n          headers: OrderedMap({\n            a: { default: 123, in: 'formData' }\n          })\n        })\n      })\n\n      const expected = [ test ]\n      const actual = __internals__.getParametersFromRequest(store, request)\n\n      expect(__internals__.convertParameterMapToParameterObjectArray.calls.length).toEqual(3)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceToResponseObject', () => {\n    it('should work', () => {\n      const input = new Reference({ uuid: '1234' })\n      const key = 'abc'\n      const expected = {\n        key,\n        value: {\n          $ref: '#/responses/1234'\n        }\n      }\n      const actual = __internals__.convertReferenceToResponseObject(input, key)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertReferenceOrResponseRecordToResponseObject', () => {\n    it('should call convertReferenceToResponseObject if input is reference', () => {\n      spyOn(__internals__, 'convertReferenceToResponseObject').andReturn(123)\n      const store = new Store()\n      const input = new Reference()\n      const key = 'abc'\n      const expected = 123\n      const actual = __internals__.convertReferenceOrResponseRecordToResponseObject(\n        store, input, key\n      )\n      expect(__internals__.convertReferenceToResponseObject).toHaveBeenCalledWith(input, key)\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call convertResponseRecordToResponseObject if input is response', () => {\n      spyOn(__internals__, 'convertResponseRecordToResponseObject').andReturn(123)\n      const store = new Store()\n      const input = new Response()\n      const key = 'abc'\n      const expected = 123\n      const actual = __internals__.convertReferenceOrResponseRecordToResponseObject(\n        store, input, key\n      )\n      expect(__internals__.convertResponseRecordToResponseObject)\n        .toHaveBeenCalledWith(store, { value: input, key })\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getResponsesFromRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertReferenceOrResponseRecordToResponseObject')\n        .andReturn({ key: 'abc', value: 123 })\n\n      const store = new Store()\n      const request = new Request({\n        responses: new OrderedMap({\n          a: 234,\n          b: 345\n        })\n      })\n\n      const expected = { abc: 123 }\n      const actual = __internals__.getResponsesFromRequest(store, request)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSchemesFromRequestEndpointOverlay', () => {\n    it('should return undefined if request has no endpoints', () => {\n      const request = new Request()\n      const actual = __internals__.getSchemesFromRequestEndpointOverlay(request)\n      expect(actual).toNotExist()\n    })\n\n    it('should return undefined if request has multiple endpoints', () => {\n      const request = new Request({\n        endpoints: new OrderedMap({\n          a: 123,\n          b: 321\n        })\n      })\n\n      const actual = __internals__.getSchemesFromRequestEndpointOverlay(request)\n      expect(actual).toNotExist()\n    })\n\n    it('should return undefined if endpoint has no overlay', () => {\n      const request = new Request({\n        endpoints: new OrderedMap({\n          a: new Reference({ uuid: 'a' })\n        })\n      })\n\n      const actual = __internals__.getSchemesFromRequestEndpointOverlay(request)\n      expect(actual).toNotExist()\n    })\n\n    it('should work otherwise', () => {\n      const request = new Request({\n        endpoints: new OrderedMap({\n          a: new Reference({\n            uuid: 'a',\n            overlay: new URL({\n              url: 'https://someHost.com/'\n            }).set('protocol', List([ 'https:', 'http' ]))\n          })\n        })\n      })\n\n      const expected = [ 'https', 'http' ]\n      const actual = __internals__.getSchemesFromRequestEndpointOverlay(request)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSecurityRequirementForBasicOrApiKeyAuth', () => {\n    it('should work', () => {\n      const name = 'basic_auth'\n      const expected = {\n        basic_auth: []\n      }\n      const actual = __internals__.getSecurityRequirementForBasicOrApiKeyAuth(name)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSecurityRequirementForOAuth2Auth', () => {\n    it('should work', () => {\n      const name = 'petstore_auth'\n      const reference = new Reference({\n        overlay: new Auth.OAuth2({\n          scopes: List([ { key: 'write:self' } ])\n        })\n      })\n\n      const expected = {\n        petstore_auth: [ 'write:self' ]\n      }\n      const actual = __internals__.getSecurityRequirementForOAuth2Auth(name, reference)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with no overlay', () => {\n      const name = 'petstore_auth'\n      const reference = new Reference()\n\n      const expected = {\n        petstore_auth: []\n      }\n      const actual = __internals__.getSecurityRequirementForOAuth2Auth(name, reference)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSecurityRequirementFromReference', () => {\n    it('should call getSecurityRequirementForBasicOrApiKeyAuth if referenced auth is basic', () => {\n      spyOn(__internals__, 'getSecurityRequirementForBasicOrApiKeyAuth').andReturn(123)\n\n      const store = new Store({\n        auth: new OrderedMap({\n          abc: new Auth.Basic()\n        })\n      })\n      const reference = new Reference({ uuid: 'abc' })\n\n      const expected = 123\n      const actual = __internals__.getSecurityRequirementFromReference(store, reference)\n\n      expect(__internals__.getSecurityRequirementForBasicOrApiKeyAuth).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getSecurityRequirementForBasicOrApiKeyAuth if refed auth is api-key', () => {\n      spyOn(__internals__, 'getSecurityRequirementForBasicOrApiKeyAuth').andReturn(123)\n\n      const store = new Store({\n        auth: new OrderedMap({\n          abc: new Auth.ApiKey()\n        })\n      })\n      const reference = new Reference({ uuid: 'abc' })\n\n      const expected = 123\n      const actual = __internals__.getSecurityRequirementFromReference(store, reference)\n\n      expect(__internals__.getSecurityRequirementForBasicOrApiKeyAuth).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should call getSecurityRequirementForOAuth2Auth if referenced auth is oauth2', () => {\n      spyOn(__internals__, 'getSecurityRequirementForOAuth2Auth').andReturn(123)\n\n      const store = new Store({\n        auth: new OrderedMap({\n          abc: new Auth.OAuth2()\n        })\n      })\n      const reference = new Reference({ uuid: 'abc' })\n\n      const expected = 123\n      const actual = __internals__.getSecurityRequirementFromReference(store, reference)\n\n      expect(__internals__.getSecurityRequirementForOAuth2Auth).toHaveBeenCalled()\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return null if auth not supported', () => {\n      const store = new Store({\n        auth: new OrderedMap({\n          abc: new Auth.Hawk()\n        })\n      })\n      const reference = new Reference({ uuid: 'abc' })\n\n      const expected = null\n      const actual = __internals__.getSecurityRequirementFromReference(store, reference)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getSecurityRequirementsFromRequest', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getSecurityRequirementFromReference').andReturn(123)\n\n      const request = new Request({\n        auths: new List([\n          new Reference(),\n          new Reference(),\n          'ignored because not a Reference',\n          new Reference()\n        ])\n      })\n\n      const expected = [ 123, 123, 123 ]\n      const actual = __internals__.getSecurityRequirementsFromRequest(null, request)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertRequestToOperationObject', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getTagStrings').andReturn([ 'pet', 'store' ])\n      spyOn(__internals__, 'getKeysFromRecord').andReturn({\n        summary: 'update a Pet',\n        description: 'updates a pet with some params',\n        operationId: 'updatePet'\n      })\n\n      spyOn(__internals__, 'getConsumesEntry').andReturn([ 'application/json' ])\n      spyOn(__internals__, 'getProducesEntry').andReturn([ 'application/xml' ])\n      spyOn(__internals__, 'getParametersFromRequest').andReturn([ {\n        in: 'query',\n        name: 'petId',\n        type: 'string'\n      } ])\n      spyOn(__internals__, 'getSchemesFromRequestEndpointOverlay').andReturn([ 'https' ])\n      spyOn(__internals__, 'getSecurityRequirementsFromRequest').andReturn([\n        {\n          petstore_auth: [ 'write:self' ]\n        }\n      ])\n      spyOn(__internals__, 'getResponsesFromRequest').andReturn({\n        '200': {\n          description: 'this method should return 200'\n        }\n      })\n\n      const store = new Store()\n      const globalInfo = {}\n      const request = new Request()\n      const key = '/some/path'\n\n      const expectedValue = {\n        tags: [ 'pet', 'store' ],\n        summary: 'update a Pet',\n        description: 'updates a pet with some params',\n        operationId: 'updatePet',\n        consumes: [ 'application/json' ],\n        produces: [ 'application/xml' ],\n        parameters: [\n          {\n            in: 'query',\n            name: 'petId',\n            type: 'string'\n          }\n        ],\n        schemes: [ 'https' ],\n        security: [\n          {\n            petstore_auth: [ 'write:self' ]\n          }\n        ],\n        responses: {\n          '200': {\n            description: 'this method should return 200'\n          }\n        }\n      }\n\n      const expected = { key, value: expectedValue }\n      const actual = __internals__.convertRequestToOperationObject(store, globalInfo, request, key)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if underlying methods are correct and with request method', () => {\n      spyOn(__internals__, 'getTagStrings').andReturn([ 'pet', 'store' ])\n      spyOn(__internals__, 'getKeysFromRecord').andReturn({\n        summary: 'update a Pet',\n        description: 'updates a pet with some params',\n        operationId: 'updatePet'\n      })\n\n      spyOn(__internals__, 'getConsumesEntry').andReturn([ 'application/json' ])\n      spyOn(__internals__, 'getProducesEntry').andReturn([ 'application/xml' ])\n      spyOn(__internals__, 'getParametersFromRequest').andReturn([ {\n        in: 'query',\n        name: 'petId',\n        type: 'string'\n      } ])\n      spyOn(__internals__, 'getSchemesFromRequestEndpointOverlay').andReturn([ 'https' ])\n      spyOn(__internals__, 'getSecurityRequirementsFromRequest').andReturn([\n        {\n          petstore_auth: [ 'write:self' ]\n        }\n      ])\n      spyOn(__internals__, 'getResponsesFromRequest').andReturn({\n        '200': {\n          description: 'this method should return 200'\n        }\n      })\n\n      const store = new Store()\n      const globalInfo = {}\n      const request = new Request({ method: 'Get' })\n      const key = 'put'\n\n      const expectedValue = {\n        tags: [ 'pet', 'store' ],\n        summary: 'update a Pet',\n        description: 'updates a pet with some params',\n        operationId: 'updatePet',\n        consumes: [ 'application/json' ],\n        produces: [ 'application/xml' ],\n        parameters: [\n          {\n            in: 'query',\n            name: 'petId',\n            type: 'string'\n          }\n        ],\n        schemes: [ 'https' ],\n        security: [\n          {\n            petstore_auth: [ 'write:self' ]\n          }\n        ],\n        responses: {\n          '200': {\n            description: 'this method should return 200'\n          }\n        }\n      }\n\n      const expected = { key: 'get', value: expectedValue }\n      const actual = __internals__.convertRequestToOperationObject(store, globalInfo, request, key)\n\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@addPathParametersToOperation', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'convertReferenceOrParameterToParameterObject').andCall(p => {\n        return { value: {\n          name: p.get('key'),\n          in: 'path',\n          default: p.get('default')\n        } }\n      })\n      const inputs = [\n        [ null, { a: 123 } ],\n        [ new Parameter(), { a: 123 } ],\n        [ new Parameter({ superType: 'sequence' }), { a: 123 } ],\n        [ new Parameter({\n          superType: 'sequence',\n          value: List([\n            new Parameter({ key: null, default: '/users/' }),\n            new Parameter({ key: 'userId', default: '123' })\n          ])\n        }), { a: 123 } ],\n        [ new Parameter({\n          superType: 'sequence',\n          value: List([\n            new Parameter({ key: null, default: '/users/' }),\n            new Parameter({ key: 'userId', default: '123' })\n          ])\n        }), { a: 123, value: { parameters: [ 123, 234 ] } } ]\n      ]\n      const expected = [\n        { a: 123 },\n        { a: 123 },\n        { a: 123, value: { parameters: [] } },\n        { a: 123, value: { parameters: [\n          { name: 'userId', in: 'path', required: true, default: '123' }\n        ] } },\n        { a: 123, value: { parameters: [\n          123, 234, { name: 'userId', in: 'path', required: true, default: '123' }\n        ] } }\n      ]\n      const actual = inputs.map(input => __internals__.addPathParametersToOperation(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertResourceToPathItemObject', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getPathFromResource').andReturn('/some/path')\n      spyOn(__internals__, 'addPathParametersToOperation').andCall((r, v) => v)\n\n      const store = new Store()\n      const globalInfo = {}\n      const resource = new Resource({\n        methods: new OrderedMap({\n          get: new Request(),\n          post: new Request(),\n          put: new Request()\n        })\n      })\n\n      const expected = {\n        key: '/some/path',\n        value: {\n          get: {\n            responses: {\n              default: {\n                description: 'no response description was provided for this operation'\n              }\n            }\n          },\n          post: {\n            responses: {\n              default: {\n                description: 'no response description was provided for this operation'\n              }\n            }\n          },\n          put: {\n            responses: {\n              default: {\n                description: 'no response description was provided for this operation'\n              }\n            }\n          }\n        }\n      }\n      const actual = __internals__.convertResourceToPathItemObject(store, globalInfo, resource)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@mergeResourceObjects', () => {\n    it('should work', () => {\n      const inputs = [\n        [ { a: { b: 123, c: 234 } }, { key: 'a', value: { c: 345, d: 456 } } ],\n        [ { a: { b: 123, c: 234 } }, { key: 'a', value: { d: 345, e: 456 } } ],\n        [ { a: { b: 123, c: 234 } }, { key: 'b', value: { c: 345, d: 456 } } ]\n      ]\n      const expected = [\n        { a: { b: 123, c: 345, d: 456 } },\n        { a: { b: 123, c: 234, d: 345, e: 456 } },\n        { a: { b: 123, c: 234 }, b: { c: 345, d: 456 } }\n      ]\n      const actual = inputs.map(input => __internals__.mergeResourceObjects(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getPathObject', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'convertResourceToPathItemObject').andReturn({ key: 'abc', value: 123 })\n      const api = new Api({\n        resources: new OrderedMap({\n          a: new Resource()\n        })\n      })\n\n      const expected = {\n        abc: 123\n      }\n\n      const actual = __internals__.getPathObject(api)\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('isConsumesHeader', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter({\n          key: 'Whatever'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'response'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'request',\n          in: 'query'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'request',\n          in: 'headers'\n        })\n      ]\n\n      const expected = [ false, false, false, true ]\n      const actual = inputs.map(__internals__.isConsumesHeader)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('isProducesHeader', () => {\n    it('should work', () => {\n      const inputs = [\n        new Parameter({\n          key: 'Whatever'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'request'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'response',\n          in: 'query'\n        }),\n        new Parameter({\n          key: 'Content-Type',\n          usedIn: 'response',\n          in: 'headers'\n        })\n      ]\n\n      const expected = [ false, false, false, true ]\n      const actual = inputs.map(__internals__.isProducesHeader)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@extractContentTypesFromParam', () => {\n    it('should work', () => {\n      const param = new Parameter({\n        constraints: List([\n          new Constraint.Enum([ 'application/json' ])\n        ])\n      })\n\n      const expected = [ 'application/json' ]\n      const actual = __internals__.extractContentTypesFromParam(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work with default', () => {\n      const param = new Parameter({\n        constraints: List([\n          new Constraint.JSONSchema({ default: '123' })\n        ])\n      })\n\n      const expected = [ '123' ]\n      const actual = __internals__.extractContentTypesFromParam(param)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no enum or default', () => {\n      const param = new Parameter({\n        constraints: List([\n          new Constraint.JSONSchema({ pattern: '123.*' })\n        ])\n      })\n\n      const expected = []\n      const actual = __internals__.extractContentTypesFromParam(param)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getContentTypeFromFilteredParams', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'extractContentTypesFromParam').andCall(v => [ v ])\n\n      const inputs = [\n        [ OrderedMap({ a: 123, b: 234, c: 345 }), (v) => v % 2 ]\n      ]\n      const expected = [\n        [ 123, 345 ]\n      ]\n      const actual = inputs.map(input => __internals__.getContentTypeFromFilteredParams(...input))\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGlobalConsumes', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 123 ])\n\n      const api = new Api()\n      const expected = [ 123 ]\n      const actual = __internals__.getGlobalConsumes(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no consumes header', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([])\n\n      const api = new Api()\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n      const actual = __internals__.getGlobalConsumes(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@getGlobalProduces', () => {\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([ 123 ])\n\n      const api = new Api()\n      const expected = [ 123 ]\n      const actual = __internals__.getGlobalProduces(api)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should work if no produces header', () => {\n      spyOn(__internals__, 'getContentTypeFromFilteredParams').andReturn([])\n\n      const api = new Api()\n      /* eslint-disable no-undefined */\n      const expected = undefined\n      /* eslint-enable no-undefined */\n      const actual = __internals__.getGlobalProduces(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@createSwaggerObject', () => {\n    /* eslint-disable max-statements */\n    it('should work if underlying methods are correct', () => {\n      spyOn(__internals__, 'getSwaggerFormatObject').andReturn(123)\n      spyOn(__internals__, 'getInfoObject').andReturn(321)\n      spyOn(__internals__, 'getEndpointRelatedObjects').andReturn({\n        schemes: 234,\n        host: 432,\n        basePath: 345\n      })\n      spyOn(__internals__, 'getGlobalConsumes').andReturn(543)\n      spyOn(__internals__, 'getGlobalProduces').andReturn(456)\n      spyOn(__internals__, 'getDefinitions').andReturn(654)\n      spyOn(__internals__, 'getSecurityDefinitions').andReturn(567)\n      spyOn(__internals__, 'getParameterDefinitions').andReturn(765)\n      spyOn(__internals__, 'getResponseDefinitions').andReturn(678)\n      spyOn(__internals__, 'getTagDefinitions').andReturn(876)\n      spyOn(__internals__, 'getPathObject').andReturn(789)\n\n      const api = new Api()\n      const expected = {\n        swagger: 123,\n        info: 321,\n        host: 432,\n        schemes: 234,\n        basePath: 345,\n        consumes: 543,\n        produces: 456,\n        paths: 789,\n        definitions: 654,\n        parameters: 765,\n        responses: 678,\n        securityDefinitions: 567,\n        tags: 876\n      }\n      const actual = __internals__.createSwaggerObject(api)\n      expect(actual).toEqual(expected)\n    })\n    /* eslint-enable max-statements */\n  })\n\n  describe('@serialize', () => {\n    it('should work', () => {\n      spyOn(__internals__, 'createSwaggerObject').andReturn({ a: 123 })\n      const api = new Api()\n\n      const expected = JSON.stringify({ a: 123 }, null, 2)\n      const actual = __internals__.serialize(api)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n"
  },
  {
    "path": "src/utils/__tests__/fp-utils.spec.js",
    "content": "/* eslint-disable require-jsdoc */\nimport expect, { spyOn, restoreSpies } from 'expect'\nimport { __internals__ } from '../fp-utils'\n\ndescribe('utils/fp-utils', () => {\n  afterEach(() => restoreSpies())\n  describe('@currify', () => {\n    it('should return a function', () => {\n      const f1 = (a, b, c) => a + b + c\n      const currified = __internals__.currify(f1, 2)\n      expect(currified).toBeA(Function)\n    })\n\n    it('should call original function', () => {\n      const stub = {\n        f1: (a, b, c) => a + b + c\n      }\n\n      spyOn(stub, 'f1').andCallThrough()\n\n      const currified = __internals__.currify(stub.f1, 2)\n      currified(3, 4)\n\n      expect(stub.f1).toHaveBeenCalledWith(2, 3, 4)\n    })\n\n    it('should call original function with correct parameters, in correct order', () => {\n      const stub = {\n        f1: (a, b, c) => a * b + c\n      }\n\n      const currified = __internals__.currify(stub.f1, 2)\n      const expected = 2 * 3 + 4\n      const actual = currified(3, 4)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@keys', () => {\n    it('should return an object keys', () => {\n      const input = { a: 123, b: 234 }\n      const expected = [ 'a', 'b' ]\n      const actual = __internals__.keys(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return an empty list if input is not an object', () => {\n      const input = 'some string'\n      const expected = []\n      const actual = __internals__.keys(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@values', () => {\n    it('should return an object values', () => {\n      const input = { a: 123, b: 234 }\n      const expected = [ 123, 234 ]\n      const actual = __internals__.values(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return an empty list if input is not an object', () => {\n      const input = 'some string'\n      const expected = []\n      const actual = __internals__.values(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@entries', () => {\n    it('should return an object entries', () => {\n      const input = { a: 123, b: 234 }\n      const expected = [ { key: 'a', value: 123 }, { key: 'b', value: 234 } ]\n      const actual = __internals__.entries(input)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should return an empty list if input is not an object', () => {\n      const input = 'some string'\n      const expected = []\n      const actual = __internals__.entries(input)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n\n  describe('@convertEntryListInMap', () => {\n    it('should return previous dict if no key and no value', () => {\n      const obj = { a: 123, b: 234 }\n      const expected = obj\n      const actual = __internals__.convertEntryListInMap(obj)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update dict if key and value', () => {\n      const obj = { a: 123, b: 234 }\n      const kv = { key: 'c', value: 345 }\n\n      const expected = {\n        a: 123, b: 234, c: 345\n      }\n      const actual = __internals__.convertEntryListInMap(obj, kv)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update dict if key and no value', () => {\n      const obj = { a: 123, b: 234 }\n      const kv = { key: 'c' }\n\n      /* eslint-disable no-undefined */\n      const expected = {\n        a: 123, b: 234, c: undefined\n      }\n      /* eslint-enable no-undefined */\n      const actual = __internals__.convertEntryListInMap(obj, kv)\n\n      expect(actual).toEqual(expected)\n    })\n\n    it('should update dict if value and no key', () => {\n      const obj = { a: 123, b: 234 }\n      const kv = { value: 345 }\n\n      const expected = {\n        a: 123, b: 234, undefined: 345\n      }\n      const actual = __internals__.convertEntryListInMap(obj, kv)\n\n      expect(actual).toEqual(expected)\n    })\n  })\n})\n/* eslint-enable require-jsdoc */\n"
  },
  {
    "path": "src/utils/fp-utils.js",
    "content": "/**\n * currifies a function with a partial list of arguments\n * @param {Function} uncurried: the function to currify\n * @param {Array<any>} params: a partial list of parameters to use with this function\n * @returns {Function} the currified function\n */\nexport const currify = (uncurried, ...params) => {\n  return (...otherParams) => {\n    return uncurried.apply(null, params.concat(otherParams))\n  }\n}\n\n/**\n * extracts the keys from an object\n * @param {Object|any?} obj: the object to get the keys from\n * @returns {Array<string>} the corresponding keys\n */\nexport const keys = (obj = {}) => {\n  if (typeof obj !== 'object') {\n    return []\n  }\n\n  return Object.keys(obj)\n}\n\n/**\n * extracts the values from an object\n * @param {Object|any?} obj: the object to get the values from\n * @returns {Array<*>} the corresponding values\n */\nexport const values = (obj) => keys(obj).map(key => obj[key])\n\n/**\n * extracts the key-value pairs from an object\n * @param {Object|any?} obj: the object to get the entries from\n * @returns {Array<{key: string, value: *}>} the corresponding entries\n */\nexport const entries = (obj) => keys(obj).map(key => ({ key, value: obj[key] }))\n\n/**\n * converts an array of key-value pairs into an Object (as a reducer)\n * @param {Object} obj: the object to update with a new key-value pair\n * @param {Entry} entry: the entry to insert in the object\n * @returns {Object} the updated object\n */\nexport const convertEntryListInMap = (obj, { key, value } = {}) => {\n  if (typeof key === 'undefined' && typeof value === 'undefined') {\n    return obj\n  }\n\n  obj[key] = value\n  return obj\n}\n\n/**\n * flattens an array of array into an array (as a reducer)\n * @param {Array<*>} f: the flat list to update with new elements\n * @param {Array<*>} l: the list to append to the flat list\n * @returns {Array<*>} the updated flat list\n */\nexport const flatten = (f, l) => [ ...f, ...l ]\n\nexport const __internals__ = { currify, keys, values, entries, convertEntryListInMap }\n"
  },
  {
    "path": "src/utils/gen-utils.js",
    "content": "export const __internals__ = {\n  date: null\n}\n\n/**\n * generates a random uuid\n * @returns {string} a uuid-v4 formatted string\n */\nexport const genUuid = () => {\n  let d = __internals__.date ? __internals__.date : new Date().getTime()\n  const $uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'\n        .replace(/[xy]/g, c => {\n          const r = (d + Math.random() * 16) % 16 | 0\n          d = Math.floor(d / 16)\n          return (c === 'x' ? r : r & 0x3 | 0x8).toString(16)\n        })\n  return $uuid\n}\n"
  },
  {
    "path": "testing/e2e/internal-apiblueprint-1a/e2e.spec.js",
    "content": "/* eslint-disable require-jsdoc */\nrequire('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected = '{}') => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'internal-v1.0--apiblueprint-1A') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.json'), actual)\n  }\n}\n\ndescribe('internal -> api-bluepint 1A', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'internal', version: 'v1.0' },\n            target: { format: 'api-bluepint', version: '1A' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/internal-apiblueprint-1a/test-case-0/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      },\n      \"pet\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"pet\",\n        \"uuid\": \"pet\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"store\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"store\",\n        \"uuid\": \"store\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"user\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"user\",\n        \"uuid\": \"user\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-apiblueprint-1a/test-case-0/output.json",
    "content": "FORMAT: 1A\nHOST: https://petstore.swagger.wordnik.com/v2\n\n# Swagger Petstore\nThis is a sample server Petstore server.\n\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\n\nFor this sample, you can use the api key `special-key` to test the authorization filters\n\n\n## Group Resources\n\n### /pets\n\n#### Add a new pet to the store [POST]\n\nThis is a fairly long description about the API request /pets with Method POST\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Pet\"\n        }\n```\n\n+ Response 405\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Update an existing pet [PUT]\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Pet\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/xml\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/xml\n```\n\n+ Response 405\n    + Headers\n```\n        Content-Type: application/xml\n```\n\n### /pets/findByStatus{?status}\n\n#### Finds Pets by status [GET]\n\nMultiple status values can be provided with comma seperated strings\n\n+ Parameters\n    + status (array, optional) - Status values that need to be considered for filter\n```\n        {\n          \"type\": \"array\",\n          \"x-title\": \"status\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Pet\"\n          }\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /pets/findByTags{?tags}\n\n#### Finds Pets by tags [GET]\n\nMuliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\n\n+ Parameters\n    + tags (array, optional) - Tags to filter by\n```\n        {\n          \"type\": \"array\",\n          \"x-title\": \"tags\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Pet\"\n          }\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /pets/{petId}\n\n#### Find pet by ID [GET]\n\nReturns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\n\n+ Parameters\n    + petId (integer, required) - ID of pet that needs to be fetched\n```\n        {\n          \"type\": \"integer\",\n          \"x-title\": \"petId\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Pet\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Updates a pet in the store with form data [POST]\n\n+ Parameters\n    + petId (integer, required) - ID of pet that needs to be fetched\n```\n        {\n          \"type\": \"integer\",\n          \"x-title\": \"petId\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        Content-Type: application/x-www-form-urlencoded\n```\n    + Schema\n```\n        {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\",\n              \"x-title\": \"name\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"x-title\": \"status\"\n            }\n          }\n        }\n```\n\n+ Response 405\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Deletes a pet [DELETE]\n\n+ Parameters\n    + petId (integer, required) - ID of pet that needs to be fetched\n```\n        {\n          \"type\": \"integer\",\n          \"x-title\": \"petId\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        api_key: null\n        Content-Type: application/json\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /stores/order\n\n#### Place an order for a pet [POST]\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Order\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Order\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /stores/order/{orderId}\n\n#### Find purchase order by ID [GET]\n\nFor valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\n\n+ Parameters\n    + orderId (string, required) - ID of pet that needs to be fetched\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"orderId\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/Order\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Delete purchase order by ID [DELETE]\n\nFor valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\n\n+ Parameters\n    + orderId (string, required) - ID of pet that needs to be fetched\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"orderId\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users\n\n#### Create user [POST]\n\nThis can only be done by the logged in user.\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/User\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users/createWithArray\n\n#### Creates list of users with given input array [POST]\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/User\"\n          }\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users/createWithList\n\n#### Creates list of users with given input array [POST]\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/User\"\n          }\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users/login{?username,password}\n\n#### Logs user into the system [GET]\n\n+ Parameters\n    + username (string, optional) - The user name for login\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"username\"\n        }\n```\n\n    + password (string, optional) - The password for login in clear text\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"password\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"type\": \"string\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users/logout\n\n#### Logs out current logged in user session [GET]\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n\n### /users/{username}\n\n#### Get user by user name [GET]\n\n+ Parameters\n    + username (string, required) - The name that needs to be fetched. Use user1 for testing.\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"username\"\n        }\n```\n\n+ Response 200\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/User\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Updated user [PUT]\n\nThis can only be done by the logged in user.\n\n+ Parameters\n    + username (string, required) - The name that needs to be fetched. Use user1 for testing.\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"username\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/User\"\n        }\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n#### Delete user [DELETE]\n\nThis can only be done by the logged in user.\n\n+ Parameters\n    + username (string, required) - The name that needs to be fetched. Use user1 for testing.\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"username\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 400\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 404\n    + Headers\n```\n        Content-Type: application/json\n```\n\n# Data Structures\n\n## User (object)\n```\n    {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"pet\": {\n          \"$ref\": \"#/definitions/Pet\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      }\n    }\n```\n\n## Category (object)\n```\n    {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n```\n\n## Pet (object)\n```\n    {\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\n        },\n        \"owner\": {\n          \"$ref\": \"#/definitions/User\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\"\n        }\n      }\n    }\n```\n\n## Tag (object)\n```\n    {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n```\n\n## Order (object)\n```\n    {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n```\n"
  },
  {
    "path": "testing/e2e/internal-apiblueprint-1a/test-case-1/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/api\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/entry\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs/{songId}\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-apiblueprint-1a/test-case-1/output.json",
    "content": "FORMAT: 1A\nHOST: http://{environment}.musicapi.com/{version}\n\n# World Music API\nThis is an example of a music API.\n\n## Group Resources\n\n### /api{?queryString}\n\n#### GET\n\nThis was loaded from api-library\n\n+ Parameters\n    + queryString (object, optional)\n```\n        {\n          \"type\": \"object\",\n          \"properties\": {\n            \"start\": {\n              \"type\": \"number\"\n            },\n            \"page-size\": {\n              \"type\": \"number\"\n            }\n          },\n          \"x-title\": \"queryString\"\n        }\n```\n\n+ Response 200\n\n#### POST\n\nThis is an awesome description\n\n+ Request (application/json)\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n        }\n```\n\n+ Response 200\n\n### /entry\n\n#### POST\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 200 (application/json)\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/AnotherEntry\"\n        }\n```\n\n#### GET\n\nreturns a list of entry\n\n+ Response 200 (application/json)\n    + Schema\n```\n        {\n          \"type\": \"object\"\n        }\n```\n\n### /songs{?genre,access_token}\n\nAccess to all songs inside the music world library.\n\n#### GET\n\nThis was loaded from songs-library\n\n+ Parameters\n    + genre (string, optional) - filter the songs by genre\n```\n        {\n          \"type\": \"string\",\n          \"description\": \"filter the songs by genre\",\n          \"x-title\": \"genre\"\n        }\n```\n\n    + access_token (string, optional)\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"access_token\"\n        }\n```\n\n+ Response 200\n\n#### POST\n\n+ Parameters\n    + access_token (string, optional)\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"access_token\"\n        }\n```\n\n+ Request\n    + Headers\n```\n        Content-Type: application/json\n```\n\n+ Response 200\n\n### /songs/{songId}\n\n#### GET\n\n+ Parameters\n    + songId (string, optional)\n```\n        {\n          \"type\": \"string\",\n          \"x-title\": \"songId\"\n        }\n```\n\n+ Response 200 (application/json)\n    + Schema\n```\n        {\n          \"$ref\": \"#/definitions/SongsLib.Song\"\n        }\n```\n\n# Data Structures\n\n## Entry (array)\n```\n    {\n      \"type\": \"array\",\n      \"items\": {\n        \"$ref\": \"#/definitions/Song\"\n      }\n    }\n```\n\n## Song (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"artist\": {\n          \"type\": \"string\"\n        }\n      }\n    }\n```\n\n## AnotherEntry (object)\n```\n    {\n      \"$ref\": \"#/definitions/Entry\",\n      \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n    }\n```\n\n## SpecialEntry (string)\n```\n    {\n      \"type\": \"string\",\n      \"pattern\": \"^.{12}$\"\n    }\n```\n\n## Toy (object)\n```\n    {\n      \"type\": \"object\",\n      \"minProperties\": 2,\n      \"maxProperties\": 8,\n      \"discriminator\": \"name\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"soft\": {\n          \"type\": \"boolean\",\n          \"x-examples\": [\n            true\n          ]\n        },\n        \"squiky\": {\n          \"type\": \"boolean\"\n        },\n        \"heavy\": {\n          \"type\": \"boolean\"\n        },\n        \"clean\": {\n          \"type\": \"boolean\"\n        },\n        \"purchaseDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateOnly\"\n        },\n        \"more\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateTime\"\n        },\n        \"final\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateTimeOnly\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"soft\",\n        \"squiky\",\n        \"heavy\",\n        \"clean\",\n        \"purchaseDate\",\n        \"more\",\n        \"final\"\n      ]\n    }\n```\n\n## $DateOnly (string)\n```\n    {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n      \"description\": \"full-date as defined in RFC#3339\"\n    }\n```\n\n## $DateTime (string)\n```\n    {\n      \"type\": \"string\",\n      \"description\": \"datetime\"\n    }\n```\n\n## $DateTimeOnly (string)\n```\n    {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n      \"description\": \"full-time as defined in RFC#3339\"\n    }\n```\n\n## Ball (object)\n```\n    {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Toy\"\n        }\n      ],\n      \"discriminatorValue\": \"ball\",\n      \"properties\": {\n        \"bouncinessFactor\": {\n          \"type\": \"number\",\n          \"minimum\": 0\n        }\n      },\n      \"required\": [\n        \"bouncinessFactor\"\n      ]\n    }\n```\n\n## Rope (object)\n```\n    {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Toy\"\n        }\n      ],\n      \"discriminatorValue\": \"rope\",\n      \"properties\": {\n        \"length\": {\n          \"type\": \"integer\",\n          \"enum\": [\n            \"10\",\n            \"20\",\n            \"50\",\n            \"100\"\n          ],\n          \"x-examples\": [\n            10\n          ]\n        }\n      },\n      \"required\": [\n        \"length\"\n      ]\n    }\n```\n\n## CommonToy (object)\n```\n    {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/Ball\"\n        },\n        {\n          \"$ref\": \"#/definitions/Rope\"\n        }\n      ]\n    }\n```\n\n## Treat (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"tastiness\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 1\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"tastiness\"\n      ]\n    }\n```\n\n## Pet (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"claws\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 4\n        },\n        \"color\": {\n          \"type\": \"string\",\n          \"minLength\": 7,\n          \"maxLength\": 7,\n          \"pattern\": \"^#[0-9a-f]{6}$\"\n        },\n        \"size\": {\n          \"type\": \"number\",\n          \"multipleOf\": 5\n        },\n        \"weigth\": {\n          \"type\": \"number\"\n        },\n        \"mostActiveAt\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$TimeOnly\"\n        },\n        \"owner\": {\n          \"$ref\": \"#/definitions/User\"\n        },\n        \"toys\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Toy\"\n          }\n        }\n      },\n      \"required\": [\n        \"claws\",\n        \"color\",\n        \"size\",\n        \"weigth\",\n        \"mostActiveAt\",\n        \"owner\",\n        \"toys\"\n      ]\n    }\n```\n\n## $TimeOnly (string)\n```\n    {\n      \"type\": \"string\",\n      \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n      \"description\": \"full-time as defined in RFC#3339\"\n    }\n```\n\n## Resident (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"address\"\n      ]\n    }\n```\n\n## Wild (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"location\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"location\"\n      ]\n    }\n```\n\n## FarmPet (object)\n```\n    {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Pet\"\n        },\n        {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Resident\"\n            },\n            {\n              \"$ref\": \"#/definitions/Wild\"\n            }\n          ]\n        }\n      ],\n      \"title\": \"Farm Pet\"\n    }\n```\n\n## ToyBox (array)\n```\n    {\n      \"type\": \"array\",\n      \"uniqueItems\": false,\n      \"minItems\": 1,\n      \"maxItems\": 15,\n      \"items\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/Toy\"\n          },\n          {\n            \"$ref\": \"#/definitions/Treat\"\n          }\n        ]\n      }\n    }\n```\n\n## BigToyBox (object)\n```\n    {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/ToyBox\"\n        }\n      ],\n      \"maxItems\": 100\n    }\n```\n\n## Photo (string)\n```\n    {\n      \"type\": \"string\",\n      \"$ref\": \"#/definitions/$File\"\n    }\n```\n\n## $File (string)\n```\n    {\n      \"type\": \"string\",\n      \"description\": \"file\",\n      \"pattern\": \"^[^\\u0000]*\\u0000$\"\n    }\n```\n\n## Album (array)\n```\n    {\n      \"type\": \"array\",\n      \"items\": {\n        \"$ref\": \"#/definitions/Photo\"\n      }\n    }\n```\n\n## Weird (object)\n```\n    {}\n```\n\n## Habitats (array)\n```\n    {\n      \"type\": \"array\",\n      \"items\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/Resident\"\n          },\n          {\n            \"$ref\": \"#/definitions/Wild\"\n          }\n        ]\n      }\n    }\n```\n\n## SeparateKinds (object)\n```\n    {\n      \"anyOf\": [\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Resident\"\n          }\n        },\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Wild\"\n          }\n        }\n      ]\n    }\n```\n\n## User (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"firstname\": {\n          \"type\": \"string\"\n        },\n        \"lastname\": {\n          \"type\": \"string\",\n          \"x-examples\": [\n            \"Doe\"\n          ]\n        },\n        \"pets\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FarmPet\"\n          }\n        },\n        \"box\": {\n          \"$ref\": \"#/definitions/ToyBox\"\n        },\n        \"albums\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Album\"\n          }\n        }\n      },\n      \"required\": [\n        \"firstname\"\n      ],\n      \"x-examples\": [\n        {\n          \"firstname\": \"John\"\n        }\n      ]\n    }\n```\n\n## SongsLib.Song (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"length\": {\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"title\",\n        \"length\"\n      ],\n      \"x-examples\": [\n        {\n          \"title\": \"My Song\",\n          \"length\": 12\n        },\n        {\n          \"title\": \"Last\",\n          \"length\": 3\n        }\n      ]\n    }\n```\n\n## SongsLib.Album (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"songs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SongsLib.Song\"\n          }\n        }\n      },\n      \"required\": [\n        \"title\",\n        \"songs\"\n      ]\n    }\n```\n\n## SongsLib.Musician (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"discography\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              },\n              {\n                \"$ref\": \"#/definitions/SongsLib.Album\"\n              }\n            ]\n          }\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"discography\"\n      ]\n    }\n```\n\n## ApiLib.RamlDataType (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"propString\": {\n          \"type\": \"string\"\n        },\n        \"propStringArray1\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"ideas\": {\n          \"type\": \"array\"\n        },\n        \"extIdeas\": {\n          \"properties\": {\n            \"createdBy\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"createdBy\"\n          ]\n        },\n        \"feedback\": {\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 255,\n          \"pattern\": \"[a-zA-Z\\\\s]*\",\n          \"x-examples\": [\n            \"very well made\"\n          ]\n        },\n        \"propNumber\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 32,\n          \"multipleOf\": 2\n        },\n        \"propInteger\": {\n          \"type\": \"integer\",\n          \"minimum\": 3,\n          \"maximum\": 5,\n          \"multipleOf\": 1\n        },\n        \"propBoolean\": {\n          \"type\": \"boolean\"\n        },\n        \"propDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n          \"x-examples\": [\n            \"2015-05-23\"\n          ]\n        },\n        \"userPicture\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$File\"\n        },\n        \"NilValue\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"comment\": {\n              \"$ref\": \"#/definitions/ApiLib.string?\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"comment\"\n          ]\n        },\n        \"CatOrDog\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ApiLib.Cat\"\n            },\n            {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            }\n          ]\n        },\n        \"CatAndDog\": {\n          \"$ref\": \"#/definitions/ApiLib.Dog\"\n        },\n        \"PossibleMeetingDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      },\n      \"required\": [\n        \"propString\",\n        \"propStringArray1\",\n        \"ideas\",\n        \"extIdeas\",\n        \"feedback\",\n        \"propNumber\",\n        \"propInteger\",\n        \"propBoolean\",\n        \"propDate\",\n        \"userPicture\",\n        \"NilValue\",\n        \"CatOrDog\",\n        \"CatAndDog\",\n        \"CatAndDog\",\n        \"PossibleMeetingDate\"\n      ]\n    }\n```\n\n## ApiLib.$DateOnly (string)\n```\n    {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n      \"description\": \"full-date as defined in RFC#3339\"\n    }\n```\n\n## ApiLib.$File (string)\n```\n    {\n      \"type\": \"string\",\n      \"description\": \"file\",\n      \"pattern\": \"^[^\\u0000]*\\u0000$\"\n    }\n```\n\n## ApiLib.Cat (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"color\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"color\"\n      ]\n    }\n```\n\n## ApiLib.Dog (object)\n```\n    {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"fangs\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"fangs\"\n      ]\n    }\n```\n\n## ApiLib.CustomDate (string)\n```\n    {\n      \"type\": \"string\",\n      \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n    }\n```\n"
  },
  {
    "path": "testing/e2e/internal-internal/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected) => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'internal-v1.0--internal-v1.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/input.json'), actual)\n  }\n}\n\ndescribe('internal -> internal', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/input.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'internal', version: 'v1.0' },\n            target: { format: 'internal', version: 'v1.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/internal-internal/test-case-0/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}"
  },
  {
    "path": "testing/e2e/internal-internal/test-case-1/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/api\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/entry\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs/{songId}\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}"
  },
  {
    "path": "testing/e2e/internal-postman2/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected = '{}') => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'internal-v1.0--postman-v2.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.json'), actual)\n  }\n}\n\ndescribe('internal -> postman v2', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'internal', version: 'v1.0' },\n            target: { format: 'postman', version: 'v2.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/internal-postman2/test-case-0/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      },\n      \"pet\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"pet\",\n        \"uuid\": \"pet\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"store\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"store\",\n        \"uuid\": \"store\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"user\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"user\",\n        \"uuid\": \"user\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-postman2/test-case-0/output.json",
    "content": "{\n  \"info\": {\n    \"name\": \"Swagger Petstore\",\n    \"schema\": \"https://schema.getpostman.com/json/collection/v2.0.0/collection.json\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"version\": \"1.0.0\"\n  },\n  \"item\": [\n    {\n      \"name\": \"/stores/order\",\n      \"item\": [\n        {\n          \"name\": \"Place an order for a pet\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/stores/order\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/Order\\\"\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users/logout\",\n      \"item\": [\n        {\n          \"name\": \"Logs out current logged in user session\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/logout\",\n            \"method\": \"GET\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users/createWithArray\",\n      \"item\": [\n        {\n          \"name\": \"Creates list of users with given input array\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/createWithArray\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"type\\\": \\\"array\\\",\\n  \\\"items\\\": {\\n    \\\"$ref\\\": \\\"#/definitions/User\\\"\\n  }\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/pets\",\n      \"item\": [\n        {\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n                \"scope\": \"write_pets read_pets\"\n              }\n            },\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"application/json\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/Pet\\\"\\n}\"\n            }\n          }\n        },\n        {\n          \"name\": \"Update an existing pet\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n                \"scope\": \"write_pets read_pets\"\n              }\n            },\n            \"method\": \"PUT\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"application/json\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/Pet\\\"\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/pets/:petId\",\n      \"item\": [\n        {\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets/:petId\",\n            \"method\": \"GET\"\n          }\n        },\n        {\n          \"name\": \"Updates a pet in the store with form data\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets/:petId\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"application/x-www-form-urlencoded\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"urlencoded\",\n              \"urlencoded\": [\n                {\n                  \"key\": \"name\",\n                  \"value\": \"{{name}}\",\n                  \"enabled\": true\n                },\n                {\n                  \"key\": \"status\",\n                  \"value\": \"{{status}}\",\n                  \"enabled\": true\n                }\n              ]\n            }\n          }\n        },\n        {\n          \"name\": \"Deletes a pet\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets/:petId\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n                \"scope\": \"write_pets read_pets\"\n              }\n            },\n            \"method\": \"DELETE\",\n            \"header\": [\n              {\n                \"key\": \"api_key\",\n                \"value\": null\n              },\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/pets/findByStatus\",\n      \"item\": [\n        {\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets/findByStatus?status=\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n                \"scope\": \"write_pets read_pets\"\n              }\n            },\n            \"method\": \"GET\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users/login\",\n      \"item\": [\n        {\n          \"name\": \"Logs user into the system\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/login?username=&password=\",\n            \"method\": \"GET\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/pets/findByTags\",\n      \"item\": [\n        {\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/pets/findByTags?tags=\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n                \"scope\": \"write_pets read_pets\"\n              }\n            },\n            \"method\": \"GET\"\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users/createWithList\",\n      \"item\": [\n        {\n          \"name\": \"Creates list of users with given input array\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/createWithList\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"type\\\": \\\"array\\\",\\n  \\\"items\\\": {\\n    \\\"$ref\\\": \\\"#/definitions/User\\\"\\n  }\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users\",\n      \"item\": [\n        {\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/User\\\"\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/users/:username\",\n      \"item\": [\n        {\n          \"name\": \"Get user by user name\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/:username\",\n            \"method\": \"GET\"\n          }\n        },\n        {\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/:username\",\n            \"method\": \"PUT\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/User\\\"\\n}\"\n            }\n          }\n        },\n        {\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/users/:username\",\n            \"method\": \"DELETE\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/stores/order/:orderId\",\n      \"item\": [\n        {\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/stores/order/:orderId\",\n            \"method\": \"GET\"\n          }\n        },\n        {\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"request\": {\n            \"url\": \"https://petstore.swagger.wordnik.com/v2/stores/order/:orderId\",\n            \"method\": \"DELETE\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalConsumes}}\"\n              }\n            ]\n          }\n        }\n      ]\n    }\n  ],\n  \"variable\": [\n    {\n      \"id\": \"globalConsumes\",\n      \"type\": \"string\",\n      \"name\": \"Content-Type\"\n    },\n    {\n      \"id\": \"globalProduces\",\n      \"type\": \"string\",\n      \"name\": \"Content-Type\"\n    }\n  ]\n}"
  },
  {
    "path": "testing/e2e/internal-postman2/test-case-1/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/api\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/entry\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs/{songId}\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-postman2/test-case-1/output.json",
    "content": "{\n  \"info\": {\n    \"name\": \"World Music API\",\n    \"schema\": \"https://schema.getpostman.com/json/collection/v2.0.0/collection.json\",\n    \"description\": \"This is an example of a music API.\",\n    \"version\": \"v1\"\n  },\n  \"item\": [\n    {\n      \"name\": \"/api\",\n      \"item\": [\n        {\n          \"description\": \"This was loaded from api-library\",\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/api?queryString=\",\n            \"auth\": {\n              \"type\": \"basic\"\n            },\n            \"method\": \"GET\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        },\n        {\n          \"description\": \"This is an awesome description\",\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/api\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"application/json\"\n              }\n            ],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"{\\n  \\\"$ref\\\": \\\"#/definitions/ApiLib.RamlDataType\\\"\\n}\"\n            }\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/entry\",\n      \"item\": [\n        {\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/entry\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        },\n        {\n          \"description\": \"returns a list of entry\",\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/entry\",\n            \"method\": \"GET\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/songs\",\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"item\": [\n        {\n          \"description\": \"This was loaded from songs-library\",\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/songs?genre=&access_token=\",\n            \"auth\": {\n              \"type\": \"oauth2\",\n              \"oauth2\": {\n                \"authUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n                \"accessTokenUrl\": \"https://api.dropbox.com/1/oauth2/token\"\n              }\n            },\n            \"method\": \"GET\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        },\n        {\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/songs?access_token=\",\n            \"method\": \"POST\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        }\n      ]\n    },\n    {\n      \"name\": \"/songs/{songId}\",\n      \"item\": [\n        {\n          \"request\": {\n            \"url\": \"http://{{environment}}.musicapi.com/{{version}}/songs/:songId\",\n            \"method\": \"GET\",\n            \"header\": [\n              {\n                \"key\": \"Content-Type\",\n                \"value\": \"{{globalMediaType}}\"\n              }\n            ]\n          }\n        }\n      ]\n    }\n  ],\n  \"variable\": [\n    {\n      \"id\": \"globalMediaType\",\n      \"type\": \"string\",\n      \"name\": \"Content-Type\"\n    }\n  ]\n}"
  },
  {
    "path": "testing/e2e/internal-raml1/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected = '{}') => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'internal-v1.0--raml-v1.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.raml'), actual)\n  }\n}\n\ndescribe('internal -> raml v1', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.raml'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'internal', version: 'v1.0' },\n            target: { format: 'raml', version: 'v1.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/internal-raml1/test-case-0/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      },\n      \"pet\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"pet\",\n        \"uuid\": \"pet\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"store\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"store\",\n        \"uuid\": \"store\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"user\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"user\",\n        \"uuid\": \"user\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-raml1/test-case-0/output.raml",
    "content": "#%RAML 1.0\ntitle: Swagger Petstore\ndescription: >\n  This is a sample server Petstore server.\n\n\n\n  [Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel\n  `#swagger` on irc.freenode.net.\n\n\n\n  For this sample, you can use the api key `special-key` to test the\n  authorization filters\nversion: 1.0.0\nbaseUri: 'https://petstore.swagger.wordnik.com/v2'\nprotocols:\n  - HTTP\n  - HTTPS\nmediaType:\n  - application/json\ntypes:\n  User:\n    type: object\n    properties:\n      id:\n        type: integer\n        required: false\n      username:\n        type: string\n        required: false\n      firstName:\n        type: string\n        required: false\n      pet:\n        type: Pet\n        required: false\n      lastName:\n        type: string\n        required: false\n      email:\n        type: string\n        required: false\n      password:\n        type: string\n        required: false\n      phone:\n        type: string\n        required: false\n      userStatus:\n        type: integer\n        description: User Status\n        required: false\n  Category:\n    type: object\n    properties:\n      id:\n        type: integer\n        required: false\n      name:\n        type: string\n        required: false\n  Pet:\n    type: object\n    properties:\n      id:\n        type: integer\n        required: false\n      category:\n        type: Category\n        required: false\n      name:\n        type: string\n      owner:\n        type: User\n        required: false\n      photoUrls:\n        type: 'string[]'\n      tags:\n        type: 'Tag[]'\n        required: false\n      status:\n        type: string\n        description: pet status in the store\n        required: false\n  Tag:\n    type: object\n    properties:\n      id:\n        type: integer\n        required: false\n      name:\n        type: string\n        required: false\n  Order:\n    type: object\n    properties:\n      id:\n        type: integer\n        required: false\n      petId:\n        type: integer\n        required: false\n      quantity:\n        type: integer\n        required: false\n      shipDate:\n        type: string\n        required: false\n      status:\n        type: string\n        description: Order Status\n        required: false\n      complete:\n        type: boolean\n        required: false\ntraits:\n  apiRequestMediaType: {}\n  pet: {}\n  store: {}\n  user: {}\n  globalProduces:\n    headers:\n      Content-Type:\n        type: string\n        enum:\n          - application/xml\nsecuritySchemes:\n  api_key:\n    type: Pass Through\n    describedBy:\n      headers:\n        api_key:\n          type: string\n  petstore_auth:\n    type: OAuth 2.0\n    description: the authentication method for the Petstore API\n    settings:\n      authorizationUri: 'http://petstore.swagger.wordnik.com/api/oauth/dialog'\n      accessTokenUri: null\n      authorizationGrants:\n        - implicit\n      scopes:\n        - write_pets\n        - read_pets\n/pets:\n  post:\n    displayName: Add a new pet to the store\n    description: This is a fairly long description about the API request /pets with Method POST\n    headers:\n      Content-Type:\n        type: string\n        enum:\n          - application/json\n          - application/xml\n    body:\n      type: Pet\n    protocols:\n      - HTTPS\n    is:\n      - pet\n    securedBy:\n      - petstore_auth:\n          scopes:\n            - write_pets\n            - read_pets\n    responses:\n      405:\n        description: Invalid input\n        headers:\n          Content-Type:\n            type: string\n            enum:\n              - application/json\n              - application/xml\n  put:\n    displayName: Update an existing pet\n    headers:\n      Content-Type:\n        type: string\n        enum:\n          - application/json\n          - application/xml\n    body:\n      type: Pet\n    is:\n      - pet\n    securedBy:\n      - petstore_auth:\n          scopes:\n            - write_pets\n            - read_pets\n    responses:\n      400:\n        description: Invalid ID supplied\n      404:\n        description: Pet not found\n      405:\n        description: Validation exception\n  /findByStatus:\n    get:\n      displayName: Finds Pets by status\n      description: Multiple status values can be provided with comma seperated strings\n      queryParameters:\n        status:\n          type: 'string[]'\n      is:\n        - pet\n      securedBy:\n        - petstore_auth:\n            scopes:\n              - write_pets\n              - read_pets\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: 'Pet[]'\n        400:\n          description: Invalid status value\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  /findByTags:\n    get:\n      displayName: Finds Pets by tags\n      description: 'Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.'\n      queryParameters:\n        tags:\n          type: 'string[]'\n      is:\n        - pet\n      securedBy:\n        - petstore_auth:\n            scopes:\n              - write_pets\n              - read_pets\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: 'Pet[]'\n        400:\n          description: Invalid tag value\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  '/{petId}':\n    uriParameters:\n      petId:\n        type: integer\n    get:\n      displayName: Find pet by ID\n      description: 'Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions'\n      is:\n        - pet\n      securedBy:\n        - api_key\n        - petstore_auth:\n            scopes:\n              - write_pets\n              - read_pets\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: Pet\n        400:\n          description: Invalid ID supplied\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n        404:\n          description: Pet not found\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n    post:\n      displayName: Updates a pet in the store with form data\n      headers:\n        Content-Type:\n          type: string\n          enum:\n            - application/x-www-form-urlencoded\n      body:\n        properties:\n          name:\n            type: string\n          status:\n            type: string\n      is:\n        - pet\n      securedBy:\n        - api_key\n        - petstore_auth:\n            scopes:\n              - write_pets\n              - read_pets\n      responses:\n        405:\n          description: Invalid input\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n    delete:\n      displayName: Deletes a pet\n      headers:\n        api_key:\n          type: string\n      is:\n        - pet\n      securedBy:\n        - petstore_auth:\n            scopes:\n              - write_pets\n              - read_pets\n      responses:\n        400:\n          description: Invalid pet value\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n/stores:\n  /order:\n    post:\n      displayName: Place an order for a pet\n      body:\n        type: Order\n      is:\n        - store\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: Order\n        400:\n          description: Invalid Order\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n    '/{orderId}':\n      uriParameters:\n        orderId:\n          type: string\n      get:\n        displayName: Find purchase order by ID\n        description: 'For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions'\n        is:\n          - store\n        responses:\n          200:\n            description: successful operation\n            headers:\n              Content-Type:\n                type: string\n                enum:\n                  - application/json\n                  - application/xml\n            body:\n              type: Order\n          400:\n            description: Invalid ID supplied\n            headers:\n              Content-Type:\n                type: string\n                enum:\n                  - application/json\n                  - application/xml\n          404:\n            description: Order not found\n            headers:\n              Content-Type:\n                type: string\n                enum:\n                  - application/json\n                  - application/xml\n      delete:\n        displayName: Delete purchase order by ID\n        description: For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\n        is:\n          - store\n        responses:\n          400:\n            description: Invalid ID supplied\n            headers:\n              Content-Type:\n                type: string\n                enum:\n                  - application/json\n                  - application/xml\n          404:\n            description: Order not found\n            headers:\n              Content-Type:\n                type: string\n                enum:\n                  - application/json\n                  - application/xml\n/users:\n  post:\n    displayName: Create user\n    description: This can only be done by the logged in user.\n    body:\n      type: User\n    is:\n      - user\n    responses:\n      200:\n        description: successful operation\n        headers:\n          Content-Type:\n            type: string\n            enum:\n              - application/json\n              - application/xml\n  /createWithArray:\n    post:\n      displayName: Creates list of users with given input array\n      body:\n        type: 'User[]'\n      is:\n        - user\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  /createWithList:\n    post:\n      displayName: Creates list of users with given input array\n      body:\n        type: 'User[]'\n      is:\n        - user\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  /login:\n    get:\n      displayName: Logs user into the system\n      queryParameters:\n        username:\n          type: string\n        password:\n          type: string\n      is:\n        - user\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: string\n        400:\n          description: Invalid username/password supplied\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  /logout:\n    get:\n      displayName: Logs out current logged in user session\n      is:\n        - user\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n  '/{username}':\n    uriParameters:\n      username:\n        type: string\n    get:\n      displayName: Get user by user name\n      is:\n        - user\n      responses:\n        200:\n          description: successful operation\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            type: User\n        400:\n          description: Invalid username supplied\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n        404:\n          description: User not found\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n    put:\n      displayName: Updated user\n      description: This can only be done by the logged in user.\n      body:\n        type: User\n      is:\n        - user\n      responses:\n        400:\n          description: Invalid user supplied\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n        404:\n          description: User not found\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n    delete:\n      displayName: Delete user\n      description: This can only be done by the logged in user.\n      is:\n        - user\n      responses:\n        400:\n          description: Invalid username supplied\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n        404:\n          description: User not found\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n"
  },
  {
    "path": "testing/e2e/internal-raml1/test-case-1/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/api\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/entry\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs/{songId}\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-raml1/test-case-1/output.raml",
    "content": "#%RAML 1.0\ntitle: World Music API\ndescription: This is an example of a music API.\nversion: v1\nbaseUri: 'http://{environment}.musicapi.com/{version}'\nbaseUriParameters:\n  environment:\n    type: string\n    enum:\n      - stg\n      - dev\n      - test\n      - prod\nprotocols:\n  - HTTP\n  - HTTPS\nmediaType:\n  - application/json\ntypes:\n  Entry:\n    type: 'Song[]'\n  Song:\n    type: object\n    properties:\n      title:\n        type: string\n        required: false\n      artist:\n        type: string\n        required: false\n  AnotherEntry:\n    type: Entry\n    description: >\n      # This is in Markdown\n\n      This is to see what the representation of this ~~Markdown~~ string is.\n\n      ## SubTitle\n\n      This is just another entry to **simulate** that you can add facets also on\n      JSON\n\n      schema defined types. Although you can only add documentation-based\n      facets.\n  SpecialEntry:\n    type: string\n    pattern: '^.{12}$'\n  Toy:\n    type: object\n    minProperties: 2\n    maxProperties: 8\n    discriminator: name\n    properties:\n      name:\n        type: string\n      soft:\n        type: boolean\n      squiky:\n        type: boolean\n      heavy:\n        type: boolean\n      clean:\n        type: boolean\n      purchaseDate:\n        type: $DateOnly\n      more:\n        type: $DateTime\n      final:\n        type: $DateTimeOnly\n  $DateOnly:\n    type: string\n    pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$'\n    description: 'full-date as defined in RFC#3339'\n  $DateTime:\n    type: string\n    description: datetime\n  $DateTimeOnly:\n    type: string\n    pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$'\n    description: 'full-time as defined in RFC#3339'\n  Ball:\n    type: Toy\n    discriminatorValue: ball\n    properties:\n      bouncinessFactor:\n        type: number\n        minimum: 0\n  Rope:\n    type: Toy\n    discriminatorValue: rope\n    properties:\n      length:\n        type: integer\n        enum:\n          - '10'\n          - '20'\n          - '50'\n          - '100'\n  CommonToy:\n    type: 'Ball | Rope'\n  Treat:\n    type: object\n    properties:\n      name:\n        type: string\n      tastiness:\n        type: number\n        minimum: 0\n        maximum: 1\n  Pet:\n    type: object\n    properties:\n      claws:\n        type: number\n        minimum: 0\n        maximum: 4\n      color:\n        type: string\n        minLength: 7\n        maxLength: 7\n        pattern: '^#[0-9a-f]{6}$'\n      size:\n        type: number\n        multipleOf: 5\n      weigth:\n        type: number\n      mostActiveAt:\n        type: $TimeOnly\n      owner:\n        type: User\n      toys:\n        type: 'Toy[]'\n  $TimeOnly:\n    type: string\n    pattern: '^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$'\n    description: 'full-time as defined in RFC#3339'\n  Resident:\n    type: object\n    properties:\n      address:\n        type: string\n  Wild:\n    type: object\n    properties:\n      location:\n        type: string\n  FarmPet:\n    type:\n      - Pet\n      - 'Resident | Wild'\n  ToyBox:\n    type: '(Toy | Treat)[]'\n    uniqueItems: false\n    minItems: 1\n    maxItems: 15\n  BigToyBox:\n    type: ToyBox\n    maxItems: 100\n  Photo:\n    type: $File\n  $File:\n    type: string\n    description: file\n    pattern: \"^[^\\0]*\\0$\"\n  Album:\n    type: 'Photo[]'\n  Weird:\n    type: any\n  Habitats:\n    type: '(Resident | Wild)[]'\n  SeparateKinds:\n    type: 'Resident[] | Wild[]'\n  User:\n    type: object\n    properties:\n      firstname:\n        type: string\n      lastname:\n        type: string\n        required: false\n      pets:\n        type: 'FarmPet[]'\n        required: false\n      box:\n        type: ToyBox\n        required: false\n      albums:\n        type: 'Album[]'\n        required: false\n  SongsLib.Song:\n    type: object\n    properties:\n      title:\n        type: string\n      length:\n        type: number\n  SongsLib.Album:\n    type: object\n    properties:\n      title:\n        type: string\n      songs:\n        type: 'SongsLib.Song[]'\n  SongsLib.Musician:\n    type: object\n    properties:\n      name:\n        type: string\n      discography:\n        type: '(SongsLib.Song | SongsLib.Album)[]'\n  ApiLib.RamlDataType:\n    type: object\n    properties:\n      propString:\n        type: string\n      propStringArray1:\n        type: 'string[]'\n      ideas:\n        type: array\n      extIdeas:\n        type: object\n        properties:\n          createdBy:\n            type: string\n      feedback:\n        type: string\n        minLength: 1\n        maxLength: 255\n        pattern: \"[a-zA-Z\\\\s]*\"\n      propNumber:\n        type: number\n        minimum: 0\n        maximum: 32\n        multipleOf: 2\n      propInteger:\n        type: integer\n        minimum: 3\n        maximum: 5\n        multipleOf: 1\n      propBoolean:\n        type: boolean\n      propDate:\n        type: ApiLib.$DateOnly\n      userPicture:\n        type: ApiLib.$File\n      NilValue:\n        type: object\n        properties:\n          name:\n            type: string\n          comment:\n            type: ApiLib.string?\n      CatOrDog:\n        type: 'ApiLib.Cat | ApiLib.Dog'\n      CatAndDog:\n        type: ApiLib.Dog\n      PossibleMeetingDate:\n        type: ApiLib.$DateOnly\n  ApiLib.$DateOnly:\n    type: string\n    pattern: '^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$'\n    description: 'full-date as defined in RFC#3339'\n  ApiLib.$File:\n    type: string\n    description: file\n    pattern: \"^[^\\0]*\\0$\"\n  ApiLib.Cat:\n    type: object\n    properties:\n      name:\n        type: string\n      color:\n        type: string\n  ApiLib.Dog:\n    type: object\n    properties:\n      name:\n        type: string\n      fangs:\n        type: string\n  ApiLib.CustomDate:\n    type: ApiLib.$DateOnly\ntraits:\n  trait_ApiLib.described:\n    description: This is an awesome description\n  trait_secured:\n    queryParameters:\n      access_token:\n        type: string\n    securedBy:\n      - custom_scheme\nresourceTypes:\n  resourceType_SongsLib.collectionfromSongsLib:\n    get:\n      description: This was loaded from songs-library\n  resourceType_ApiLib.collectionFromApiLib:\n    get:\n      description: This was loaded from api-library\n  resourceType_collection:\n    get:\n      description: 'returns a list of <<resourcePathName|!singularize>>'\n      securedBy:\n        - custom_scheme\n      responses:\n        200:\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n          body:\n            application/json:\n              type: object\nsecuritySchemes:\n  oauth_1_0:\n    type: OAuth 1.0\n    description: >\n      OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is\n      now preferred.\n    settings:\n      requestTokenUri: 'https://api.mysampleapi.com/1/oauth/request_token'\n      authorizationUri: 'https://api.mysampleapi.com/1/oauth/authorize'\n      tokenCredentialsUri: 'https://api.mysampleapi.com/1/oauth/access_token'\n      signatures:\n        - HMAC-SHA1\n  oauth_2_0:\n    type: OAuth 2.0\n    description: |\n      Dropbox supports OAuth 2.0 for authenticating all API requests.\n    settings:\n      authorizationUri: 'https://www.dropbox.com/1/oauth2/authorize'\n      accessTokenUri: 'https://api.dropbox.com/1/oauth2/token'\n      authorizationGrants:\n        - authorization_code\n  basic_api:\n    type: Basic Authentication\n    description: This is our super secure api auth\n/api:\n  displayName: /api\n  type: resourceType_ApiLib.collectionFromApiLib\n  get:\n    description: This was loaded from api-library\n    queryParameters:\n      queryString:\n        type: object\n        properties:\n          start:\n            type: number\n            required: false\n          page-size:\n            type: number\n            required: false\n    securedBy:\n      - ApiLib.basic_api\n  post:\n    description: This is an awesome description\n    headers:\n      Content-Type:\n        type: string\n        enum:\n          - application/json\n    body:\n      application/json:\n        type: ApiLib.RamlDataType\n    is:\n      - trait_ApiLib.described\n    securedBy:\n      - custom_scheme\n/entry:\n  displayName: /entry\n  type: resourceType_collection\n  post:\n    securedBy:\n      - custom_scheme\n    responses:\n      200:\n        headers:\n          Content-Type:\n            type: string\n            enum:\n              - application/json\n        body:\n          application/json:\n            type: AnotherEntry\n  get:\n    description: returns a list of entry\n    securedBy:\n      - custom_scheme\n    responses:\n      200:\n        headers:\n          Content-Type:\n            type: string\n            enum:\n              - application/json\n        body:\n          application/json:\n            type: object\n/songs:\n  displayName: /songs\n  description: Access to all songs inside the music world library.\n  type: resourceType_SongsLib.collectionfromSongsLib\n  get:\n    description: This was loaded from songs-library\n    queryParameters:\n      genre:\n        type: string\n        description: filter the songs by genre\n      access_token:\n        type: string\n    securedBy:\n      - oauth_2_0\n      - null\n  post:\n    queryParameters:\n      access_token:\n        type: string\n    securedBy:\n      - custom_scheme\n  '/{songId}':\n    displayName: '/songs/{songId}'\n    uriParameters:\n      songId:\n        type: string\n    get:\n      securedBy:\n        - custom_scheme\n      responses:\n        200:\n          headers:\n            Content-Type:\n              type: string\n              enum:\n                - application/json\n                - application/xml\n          body:\n            application/json:\n              type: SongsLib.Song\n            application/xml:\n              type: any\n"
  },
  {
    "path": "testing/e2e/internal-swagger2/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected = '{}') => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'internal-v1.0--swagger-v2.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.json'), actual)\n  }\n}\n\ndescribe('internal -> swagger v2', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'internal', version: 'v1.0' },\n            target: { format: 'swagger', version: 'v2.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/internal-swagger2/test-case-0/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-swagger2/test-case-0/output.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"termsOfService\": \"http://helloreverb.com/terms/\",\n    \"version\": \"1.0.0\",\n    \"contact\": {\n      \"name\": \"apiteam@wordnik.com\"\n    },\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    }\n  },\n  \"host\": \"petstore.swagger.wordnik.com\",\n  \"schemes\": [\n    \"http\",\n    \"https\"\n  ],\n  \"basePath\": \"/v2\",\n  \"consumes\": [\n    \"application/json\"\n  ],\n  \"produces\": [\n    \"application/xml\"\n  ],\n  \"paths\": {\n    \"/pets\": {\n      \"post\": {\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n        \"operationId\": \"addPet\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"schemes\": [\n          \"https\"\n        ],\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"summary\": \"Update an existing pet\",\n        \"operationId\": \"updatePet\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"405\": {\n            \"description\": \"Validation exception\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/findByStatus\": {\n      \"get\": {\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma seperated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"array\",\n            \"name\": \"status\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": false,\n            \"in\": \"query\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/findByTags\": {\n      \"get\": {\n        \"summary\": \"Finds Pets by tags\",\n        \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n        \"operationId\": \"findPetsByTags\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"array\",\n            \"name\": \"tags\",\n            \"description\": \"Tags to filter by\",\n            \"required\": false,\n            \"in\": \"query\",\n            \"items\": {\n              \"type\": \"string\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n        \"operationId\": \"getPetById\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          },\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"integer\",\n            \"name\": \"petId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      },\n      \"post\": {\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"operationId\": \"updatePetWithForm\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"name\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": true,\n            \"in\": \"formData\"\n          },\n          {\n            \"type\": \"string\",\n            \"name\": \"status\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": true,\n            \"in\": \"formData\"\n          },\n          {\n            \"type\": \"integer\",\n            \"name\": \"petId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          },\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"summary\": \"Deletes a pet\",\n        \"operationId\": \"deletePet\",\n        \"tags\": [\n          \"pet\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"api_key\",\n            \"required\": true,\n            \"in\": \"header\"\n          },\n          {\n            \"type\": \"integer\",\n            \"name\": \"petId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid pet value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/stores/order\": {\n      \"post\": {\n        \"summary\": \"Place an order for a pet\",\n        \"operationId\": \"placeOrder\",\n        \"tags\": [\n          \"store\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/stores/order/{orderId}\": {\n      \"get\": {\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"tags\": [\n          \"store\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        },\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"orderId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      },\n      \"delete\": {\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"tags\": [\n          \"store\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        },\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"orderId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      }\n    },\n    \"/users\": {\n      \"post\": {\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"Created user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/createWithArray\": {\n      \"post\": {\n        \"summary\": \"Creates list of users with given input array\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"List of user object\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/createWithList\": {\n      \"post\": {\n        \"summary\": \"Creates list of users with given input array\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"List of user object\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/login\": {\n      \"get\": {\n        \"summary\": \"Logs user into the system\",\n        \"operationId\": \"loginUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"username\",\n            \"description\": \"The user name for login\",\n            \"required\": false,\n            \"in\": \"query\"\n          },\n          {\n            \"type\": \"string\",\n            \"name\": \"password\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": false,\n            \"in\": \"query\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/users/logout\": {\n      \"get\": {\n        \"summary\": \"Logs out current logged in user session\",\n        \"operationId\": \"logoutUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/{username}\": {\n      \"get\": {\n        \"summary\": \"Get user by user name\",\n        \"operationId\": \"getUserByName\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        },\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"username\",\n            \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      },\n      \"put\": {\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"description\": \"Updated user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          },\n          {\n            \"type\": \"string\",\n            \"name\": \"username\",\n            \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"tags\": [\n          \"user\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        },\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"username\",\n            \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"pet\": {\n          \"$ref\": \"#/definitions/Pet\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\n        },\n        \"owner\": {\n          \"$ref\": \"#/definitions/User\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\"\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  },\n  \"securityDefinitions\": {\n    \"api_key\": {\n      \"name\": \"api_key\",\n      \"in\": \"header\",\n      \"type\": \"apiKey\"\n    },\n    \"petstore_auth\": {\n      \"description\": \"the authentication method for the Petstore API\",\n      \"flow\": \"implicit\",\n      \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n      \"type\": \"oauth2\",\n      \"scopes\": {\n        \"write_pets\": \"modify pets in your account\",\n        \"read_pets\": \"read your pets\"\n      }\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"apiRequestMediaType\",\n      \"description\": \"defines the common media type of requests in the API.\"\n    }\n  ]\n}"
  },
  {
    "path": "testing/e2e/internal-swagger2/test-case-1/input.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/api\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/entry\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"/songs/{songId}\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}\n"
  },
  {
    "path": "testing/e2e/internal-swagger2/test-case-1/output.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"version\": \"v1\"\n  },\n  \"host\": \"{environment}.musicapi.com\",\n  \"schemes\": [\n    \"http\",\n    \"https\"\n  ],\n  \"basePath\": \"/{version}\",\n  \"consumes\": [\n    \"application/json\"\n  ],\n  \"paths\": {\n    \"/api\": {\n      \"get\": {\n        \"description\": \"This was loaded from api-library\",\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"x-real-type\": \"object\",\n            \"name\": \"queryString\",\n            \"required\": false,\n            \"in\": \"query\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"no response description was provided for this operation\"\n          }\n        },\n        \"security\": [\n          {\n            \"ApiLib.basic_api\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"description\": \"This is an awesome description\",\n        \"tags\": [\n          \"trait_ApiLib.described\"\n        ],\n        \"parameters\": [\n          {\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n            },\n            \"in\": \"body\",\n            \"name\": \"body\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"no response description was provided for this operation\"\n          }\n        }\n      }\n    },\n    \"/entry\": {\n      \"post\": {\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"no description was provided for this response\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/AnotherEntry\"\n            }\n          }\n        }\n      },\n      \"get\": {\n        \"description\": \"returns a list of entry\",\n        \"produces\": [\n          \"application/json\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"no description was provided for this response\",\n            \"schema\": {\n              \"type\": \"object\"\n            }\n          }\n        }\n      }\n    },\n    \"/songs\": {\n      \"get\": {\n        \"description\": \"This was loaded from songs-library\",\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"genre\",\n            \"description\": \"filter the songs by genre\",\n            \"required\": false,\n            \"in\": \"query\"\n          },\n          {\n            \"type\": \"string\",\n            \"name\": \"access_token\",\n            \"required\": false,\n            \"in\": \"query\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"no response description was provided for this operation\"\n          }\n        },\n        \"security\": [\n          {\n            \"oauth_2_0\": []\n          }\n        ]\n      },\n      \"post\": {\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"access_token\",\n            \"required\": false,\n            \"in\": \"query\"\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"no response description was provided for this operation\"\n          }\n        }\n      }\n    },\n    \"/songs/{songId}\": {\n      \"get\": {\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"no description was provided for this response\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/SongsLib.Song\"\n            }\n          }\n        },\n        \"parameters\": [\n          {\n            \"type\": \"string\",\n            \"name\": \"songId\",\n            \"required\": true,\n            \"in\": \"path\"\n          }\n        ]\n      }\n    }\n  },\n  \"definitions\": {\n    \"Entry\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"$ref\": \"#/definitions/Song\"\n      }\n    },\n    \"Song\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"artist\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"AnotherEntry\": {\n      \"$ref\": \"#/definitions/Entry\",\n      \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n    },\n    \"SpecialEntry\": {\n      \"type\": \"string\",\n      \"pattern\": \"^.{12}$\"\n    },\n    \"Toy\": {\n      \"type\": \"object\",\n      \"minProperties\": 2,\n      \"maxProperties\": 8,\n      \"discriminator\": \"name\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"soft\": {\n          \"type\": \"boolean\",\n          \"x-examples\": [\n            true\n          ]\n        },\n        \"squiky\": {\n          \"type\": \"boolean\"\n        },\n        \"heavy\": {\n          \"type\": \"boolean\"\n        },\n        \"clean\": {\n          \"type\": \"boolean\"\n        },\n        \"purchaseDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateOnly\"\n        },\n        \"more\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateTime\"\n        },\n        \"final\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$DateTimeOnly\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"soft\",\n        \"squiky\",\n        \"heavy\",\n        \"clean\",\n        \"purchaseDate\",\n        \"more\",\n        \"final\"\n      ]\n    },\n    \"$DateOnly\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n      \"description\": \"full-date as defined in RFC#3339\"\n    },\n    \"$DateTime\": {\n      \"type\": \"string\",\n      \"description\": \"datetime\"\n    },\n    \"$DateTimeOnly\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n      \"description\": \"full-time as defined in RFC#3339\"\n    },\n    \"Ball\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Toy\"\n        }\n      ],\n      \"discriminatorValue\": \"ball\",\n      \"properties\": {\n        \"bouncinessFactor\": {\n          \"type\": \"number\",\n          \"minimum\": 0\n        }\n      },\n      \"required\": [\n        \"bouncinessFactor\"\n      ]\n    },\n    \"Rope\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Toy\"\n        }\n      ],\n      \"discriminatorValue\": \"rope\",\n      \"properties\": {\n        \"length\": {\n          \"type\": \"integer\",\n          \"enum\": [\n            \"10\",\n            \"20\",\n            \"50\",\n            \"100\"\n          ],\n          \"x-examples\": [\n            10\n          ]\n        }\n      },\n      \"required\": [\n        \"length\"\n      ]\n    },\n    \"CommonToy\": {\n      \"anyOf\": [\n        {\n          \"$ref\": \"#/definitions/Ball\"\n        },\n        {\n          \"$ref\": \"#/definitions/Rope\"\n        }\n      ]\n    },\n    \"Treat\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"tastiness\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 1\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"tastiness\"\n      ]\n    },\n    \"Pet\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"claws\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 4\n        },\n        \"color\": {\n          \"type\": \"string\",\n          \"minLength\": 7,\n          \"maxLength\": 7,\n          \"pattern\": \"^#[0-9a-f]{6}$\"\n        },\n        \"size\": {\n          \"type\": \"number\",\n          \"multipleOf\": 5\n        },\n        \"weigth\": {\n          \"type\": \"number\"\n        },\n        \"mostActiveAt\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$TimeOnly\"\n        },\n        \"owner\": {\n          \"$ref\": \"#/definitions/User\"\n        },\n        \"toys\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Toy\"\n          }\n        }\n      },\n      \"required\": [\n        \"claws\",\n        \"color\",\n        \"size\",\n        \"weigth\",\n        \"mostActiveAt\",\n        \"owner\",\n        \"toys\"\n      ]\n    },\n    \"$TimeOnly\": {\n      \"type\": \"string\",\n      \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n      \"description\": \"full-time as defined in RFC#3339\"\n    },\n    \"Resident\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"address\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"address\"\n      ]\n    },\n    \"Wild\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"location\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"location\"\n      ]\n    },\n    \"FarmPet\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/Pet\"\n        },\n        {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Resident\"\n            },\n            {\n              \"$ref\": \"#/definitions/Wild\"\n            }\n          ]\n        }\n      ],\n      \"title\": \"Farm Pet\"\n    },\n    \"ToyBox\": {\n      \"type\": \"array\",\n      \"uniqueItems\": false,\n      \"minItems\": 1,\n      \"maxItems\": 15,\n      \"items\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/Toy\"\n          },\n          {\n            \"$ref\": \"#/definitions/Treat\"\n          }\n        ]\n      }\n    },\n    \"BigToyBox\": {\n      \"allOf\": [\n        {\n          \"$ref\": \"#/definitions/ToyBox\"\n        }\n      ],\n      \"maxItems\": 100\n    },\n    \"Photo\": {\n      \"type\": \"string\",\n      \"$ref\": \"#/definitions/$File\"\n    },\n    \"$File\": {\n      \"type\": \"string\",\n      \"description\": \"file\",\n      \"pattern\": \"^[^\\u0000]*\\u0000$\"\n    },\n    \"Album\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"$ref\": \"#/definitions/Photo\"\n      }\n    },\n    \"Weird\": {},\n    \"Habitats\": {\n      \"type\": \"array\",\n      \"items\": {\n        \"anyOf\": [\n          {\n            \"$ref\": \"#/definitions/Resident\"\n          },\n          {\n            \"$ref\": \"#/definitions/Wild\"\n          }\n        ]\n      }\n    },\n    \"SeparateKinds\": {\n      \"anyOf\": [\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Resident\"\n          }\n        },\n        {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Wild\"\n          }\n        }\n      ]\n    },\n    \"User\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"firstname\": {\n          \"type\": \"string\"\n        },\n        \"lastname\": {\n          \"type\": \"string\",\n          \"x-examples\": [\n            \"Doe\"\n          ]\n        },\n        \"pets\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/FarmPet\"\n          }\n        },\n        \"box\": {\n          \"$ref\": \"#/definitions/ToyBox\"\n        },\n        \"albums\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Album\"\n          }\n        }\n      },\n      \"required\": [\n        \"firstname\"\n      ],\n      \"x-examples\": [\n        {\n          \"firstname\": \"John\"\n        }\n      ]\n    },\n    \"SongsLib.Song\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"length\": {\n          \"type\": \"number\"\n        }\n      },\n      \"required\": [\n        \"title\",\n        \"length\"\n      ],\n      \"x-examples\": [\n        {\n          \"title\": \"My Song\",\n          \"length\": 12\n        },\n        {\n          \"title\": \"Last\",\n          \"length\": 3\n        }\n      ]\n    },\n    \"SongsLib.Album\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"title\": {\n          \"type\": \"string\"\n        },\n        \"songs\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/SongsLib.Song\"\n          }\n        }\n      },\n      \"required\": [\n        \"title\",\n        \"songs\"\n      ]\n    },\n    \"SongsLib.Musician\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"discography\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              },\n              {\n                \"$ref\": \"#/definitions/SongsLib.Album\"\n              }\n            ]\n          }\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"discography\"\n      ]\n    },\n    \"ApiLib.RamlDataType\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"propString\": {\n          \"type\": \"string\"\n        },\n        \"propStringArray1\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"ideas\": {\n          \"type\": \"array\"\n        },\n        \"extIdeas\": {\n          \"properties\": {\n            \"createdBy\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"createdBy\"\n          ]\n        },\n        \"feedback\": {\n          \"type\": \"string\",\n          \"minLength\": 1,\n          \"maxLength\": 255,\n          \"pattern\": \"[a-zA-Z\\\\s]*\",\n          \"x-examples\": [\n            \"very well made\"\n          ]\n        },\n        \"propNumber\": {\n          \"type\": \"number\",\n          \"minimum\": 0,\n          \"maximum\": 32,\n          \"multipleOf\": 2\n        },\n        \"propInteger\": {\n          \"type\": \"integer\",\n          \"minimum\": 3,\n          \"maximum\": 5,\n          \"multipleOf\": 1\n        },\n        \"propBoolean\": {\n          \"type\": \"boolean\"\n        },\n        \"propDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n          \"x-examples\": [\n            \"2015-05-23\"\n          ]\n        },\n        \"userPicture\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$File\"\n        },\n        \"NilValue\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"comment\": {\n              \"$ref\": \"#/definitions/ApiLib.string?\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"comment\"\n          ]\n        },\n        \"CatOrDog\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/ApiLib.Cat\"\n            },\n            {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            }\n          ]\n        },\n        \"CatAndDog\": {\n          \"$ref\": \"#/definitions/ApiLib.Dog\"\n        },\n        \"PossibleMeetingDate\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      },\n      \"required\": [\n        \"propString\",\n        \"propStringArray1\",\n        \"ideas\",\n        \"extIdeas\",\n        \"feedback\",\n        \"propNumber\",\n        \"propInteger\",\n        \"propBoolean\",\n        \"propDate\",\n        \"userPicture\",\n        \"NilValue\",\n        \"CatOrDog\",\n        \"CatAndDog\",\n        \"CatAndDog\",\n        \"PossibleMeetingDate\"\n      ]\n    },\n    \"ApiLib.$DateOnly\": {\n      \"type\": \"string\",\n      \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n      \"description\": \"full-date as defined in RFC#3339\"\n    },\n    \"ApiLib.$File\": {\n      \"type\": \"string\",\n      \"description\": \"file\",\n      \"pattern\": \"^[^\\u0000]*\\u0000$\"\n    },\n    \"ApiLib.Cat\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"color\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"color\"\n      ]\n    },\n    \"ApiLib.Dog\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"name\": {\n          \"type\": \"string\"\n        },\n        \"fangs\": {\n          \"type\": \"string\"\n        }\n      },\n      \"required\": [\n        \"name\",\n        \"fangs\"\n      ]\n    },\n    \"ApiLib.CustomDate\": {\n      \"type\": \"string\",\n      \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n    }\n  },\n  \"securityDefinitions\": {\n    \"oauth_2_0\": {\n      \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n      \"flow\": \"accessCode\",\n      \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n      \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n      \"type\": \"oauth2\",\n      \"scopes\": {}\n    },\n    \"basic_api\": {\n      \"type\": \"basic\",\n      \"description\": \"This is our super secure api auth\"\n    }\n  },\n  \"tags\": [\n    {\n      \"name\": \"resourceType_SongsLib.collectionfromSongsLib\"\n    },\n    {\n      \"name\": \"resourceType_ApiLib.collectionFromApiLib\"\n    },\n    {\n      \"name\": \"resourceType_collection\"\n    },\n    {\n      \"name\": \"trait_ApiLib.described\"\n    },\n    {\n      \"name\": \"trait_secured\",\n      \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\"\n    }\n  ]\n}"
  },
  {
    "path": "testing/e2e/postman-collection2-internal/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected) => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'postman-collection-v2.0--internal-v1.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.json'), actual)\n  }\n}\n\ndescribe('postman collection v2 -> internal', () => {\n  for (let index = 0; index < 1; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'postman-collection', version: 'v2.0' },\n            target: { format: 'internal', version: 'v1.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.json')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/postman-collection2-internal/test-case-0/input.json",
    "content": "{\n  \"variables\": [],\n  \"info\": {\n    \"name\": \"Authentiq\",\n    \"_postman_id\": \"f508d2ef-0a7b-2a32-d814-85697ef419a3\",\n    \"schema\": \"https://schema.getpostman.com/json/collection/v2.0.0/collection.json\"\n  },\n  \"item\": [\n    {\n      \"name\": \"key\",\n      \"description\": \"Folder for key\",\n      \"item\": [\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key\",\n          \"request\": {\n            \"url\": \"https://6-dot-authentiqio.appspot.com/key\",\n            \"method\": \"POST\",\n            \"header\": [],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"Authentiq ID to register\"\n            },\n            \"description\": \"Register a new ID `JWT(sub, devtoken)`\\n\\nv5: `JWT(sub, pk, devtoken, ...)`\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\",\n          \"request\": {\n            \"url\": \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\",\n            \"method\": \"DELETE\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"Revoke an Authentiq ID using email & phone.\\n\\nIf called with `email` and `phone` only, a verification code \\nwill be sent by email. Do a second call adding `code` to \\ncomplete the revocation.\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"key\",\n                \":PK\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{PK}}\",\n                  \"id\": \"PK\"\n                }\n              ]\n            },\n            \"method\": \"GET\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"Get public details of an Authentiq ID.\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"key\",\n                \":PK\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{PK}}\",\n                  \"id\": \"PK\"\n                }\n              ]\n            },\n            \"method\": \"PUT\",\n            \"header\": [],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"Authentiq ID to register\"\n            },\n            \"description\": \"Update Authentiq ID by replacing the object.\\n\\nv4: `JWT(sub,email,phone)` to bind email/phone hash; \\n\\nv5: POST issuer-signed email & phone scopes\\nand PUT to update registration `JWT(sub, pk, devtoken, ...)`\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"key\",\n                \":PK\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{PK}}\",\n                  \"id\": \"PK\"\n                }\n              ]\n            },\n            \"method\": \"POST\",\n            \"header\": [],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"Authentiq ID to register\"\n            },\n            \"description\": \"update properties of an Authentiq ID.\\n(not operational in v4; use PUT for now)\\n\\nv5: POST issuer-signed email & phone scopes in\\na self-signed JWT\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"key\",\n                \":PK\"\n              ],\n              \"query\": [\n                {\n                  \"key\": \"secret\",\n                  \"value\": \"{{secret}}\"\n                }\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{PK}}\",\n                  \"id\": \"PK\"\n                }\n              ]\n            },\n            \"method\": \"DELETE\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"Revoke an Identity (Key) with a revocation secret\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"key\",\n                \":PK\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{PK}}\",\n                  \"id\": \"PK\"\n                }\n              ]\n            },\n            \"method\": \"HEAD\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"HEAD info on Authentiq ID\\n\"\n          },\n          \"response\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"login\",\n      \"description\": \"Folder for login\",\n      \"item\": [\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\",\n          \"request\": {\n            \"url\": \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\",\n            \"method\": \"POST\",\n            \"header\": [],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"Push Token.\"\n            },\n            \"description\": \"push sign-in request\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        }\n      ]\n    },\n    {\n      \"name\": \"scope\",\n      \"description\": \"Folder for scope\",\n      \"item\": [\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\",\n          \"request\": {\n            \"url\": \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\",\n            \"method\": \"POST\",\n            \"header\": [],\n            \"body\": {\n              \"mode\": \"raw\",\n              \"raw\": \"Claims of scope\"\n            },\n            \"description\": \"scope verification request\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"scope\",\n                \":job\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{job}}\",\n                  \"id\": \"job\"\n                }\n              ]\n            },\n            \"method\": \"GET\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"get the status / current content of a verification job\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"scope\",\n                \":job\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{job}}\",\n                  \"id\": \"job\"\n                }\n              ]\n            },\n            \"method\": \"PUT\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"authority updates a JWT with its signature\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"scope\",\n                \":job\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{job}}\",\n                  \"id\": \"job\"\n                }\n              ]\n            },\n            \"method\": \"POST\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"this is a scope confirmation\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"scope\",\n                \":job\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{job}}\",\n                  \"id\": \"job\"\n                }\n              ]\n            },\n            \"method\": \"DELETE\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"delete a verification job\"\n          },\n          \"response\": []\n        },\n        {\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"request\": {\n            \"url\": {\n              \"raw\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n              \"protocol\": \"https\",\n              \"auth\": {},\n              \"host\": [\n                \"6-dot-authentiqio\",\n                \"appspot\",\n                \"com\"\n              ],\n              \"path\": [\n                \"scope\",\n                \":job\"\n              ],\n              \"variable\": [\n                {\n                  \"value\": \"{{job}}\",\n                  \"id\": \"job\"\n                }\n              ]\n            },\n            \"method\": \"HEAD\",\n            \"header\": [],\n            \"body\": {},\n            \"description\": \"HEAD to get the status of a verification job\"\n          },\n          \"response\": []\n        }\n      ]\n    }\n  ]\n}\n"
  },
  {
    "path": "testing/e2e/postman-collection2-internal/test-case-0/output.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"https://6-dot-authentiqio.appspot.com/key\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/key\",\n        \"path\": \"/key\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/key\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/key\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key\",\n          \"description\": \"Register a new ID `JWT(sub, devtoken)`\\n\\nv5: `JWT(sub, pk, devtoken, ...)`\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {\n              \"raw\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"Authentiq ID to register\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/key\",\n        \"path\": \"/key\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/key\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/key\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\",\n          \"description\": \"Revoke an Authentiq ID using email & phone.\\n\\nIf called with `email` and `phone` only, a verification code \\nwill be sent by email. Do a second call adding `code` to \\ncomplete the revocation.\\n\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"email\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"email\",\n                \"name\": \"email\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/email\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"phone\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"phone\",\n                \"name\": \"phone\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/phone\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"code\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"code\",\n                \"name\": \"code\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/code\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/key/:PK\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/key/:PK\",\n        \"path\": \"/key/:PK\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/key/:PK\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/key/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"PK\",\n                \"name\": \"PK\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"PK\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"description\": \"Get public details of an Authentiq ID.\\n\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"description\": \"Update Authentiq ID by replacing the object.\\n\\nv4: `JWT(sub,email,phone)` to bind email/phone hash; \\n\\nv5: POST issuer-signed email & phone scopes\\nand PUT to update registration `JWT(sub, pk, devtoken, ...)`\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {\n              \"raw\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"Authentiq ID to register\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"description\": \"update properties of an Authentiq ID.\\n(not operational in v4; use PUT for now)\\n\\nv5: POST issuer-signed email & phone scopes in\\na self-signed JWT\\n\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {\n              \"raw\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"Authentiq ID to register\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"head\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"description\": \"HEAD info on Authentiq ID\\n\",\n          \"method\": \"head\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/key/:PK\",\n        \"path\": \"/key/:PK\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/key/:PK\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/key/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"PK\",\n                \"name\": \"PK\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"PK\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\",\n          \"description\": \"Revoke an Identity (Key) with a revocation secret\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"secret\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"secret\",\n                \"name\": \"secret\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/secret\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/login\",\n        \"path\": \"/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\",\n          \"description\": \"push sign-in request\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"callback\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"callback\",\n                \"name\": \"callback\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/callback\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {\n              \"raw\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"Push Token.\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/scope\",\n        \"path\": \"/scope\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/scope\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/scope\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\",\n          \"description\": \"scope verification request\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"test\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"test\",\n                \"name\": \"test\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/test\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {\n              \"raw\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"Claims of scope\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"https://6-dot-authentiqio.appspot.com/scope/:job\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": null,\n      \"endpoints\": {\n        \"6-dot-authentiqio.appspot.com/\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/scope/:job\",\n        \"path\": \"/scope/:job\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/scope/:job\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/scope/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"job\",\n                \"name\": \"job\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"job\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"description\": \"get the status / current content of a verification job\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"description\": \"authority updates a JWT with its signature\\nSee: https://github.com/skion/authentiq/wiki/JWT-Examples\\n\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"description\": \"this is a scope confirmation\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"description\": \"delete a verification job\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"head\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"6-dot-authentiqio.appspot.com/\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"6-dot-authentiqio.appspot.com/\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"https://6-dot-authentiqio.appspot.com/scope/:job\",\n          \"description\": \"HEAD to get the status of a verification job\",\n          \"method\": \"head\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"key\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": null,\n        \"name\": \"key\",\n        \"description\": \"Folder for key\",\n        \"children\": {\n          \"https://6-dot-authentiqio.appspot.com/key\": \"https://6-dot-authentiqio.appspot.com/key\",\n          \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\": \"https://6-dot-authentiqio.appspot.com/key?email={{email}}&phone={{phone}}&code={{code}}\",\n          \"https://6-dot-authentiqio.appspot.com/key/:PK\": \"https://6-dot-authentiqio.appspot.com/key/:PK\",\n          \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\": \"https://6-dot-authentiqio.appspot.com/key/:PK?secret={{secret}}\"\n        }\n      },\n      \"login\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": null,\n        \"name\": \"login\",\n        \"description\": \"Folder for login\",\n        \"children\": {\n          \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\": \"https://6-dot-authentiqio.appspot.com/login?callback={{callback}}\"\n        }\n      },\n      \"scope\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": null,\n        \"name\": \"scope\",\n        \"description\": \"Folder for scope\",\n        \"children\": {\n          \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\": \"https://6-dot-authentiqio.appspot.com/scope?test={{test}}\",\n          \"https://6-dot-authentiqio.appspot.com/scope/:job\": \"https://6-dot-authentiqio.appspot.com/scope/:job\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"email\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"email\"\n        }\n      },\n      \"phone\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"phone\"\n        }\n      },\n      \"code\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"code\"\n        }\n      },\n      \"secret\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"secret\"\n        }\n      },\n      \"callback\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"callback\"\n        }\n      },\n      \"test\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"title\": \"test\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"6-dot-authentiqio.appspot.com/\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"6-dot-authentiqio.appspot.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"6-dot-authentiqio.appspot.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"6-dot-authentiqio.appspot.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"href\": \"http://6-dot-authentiqio.appspot.com/\",\n        \"path\": \"/\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{{\",\n            \"}}\",\n            \":\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{{\",\n          \"}}\",\n          \":\"\n        ]\n      }\n    },\n    \"parameter\": {},\n    \"response\": {},\n    \"auth\": {},\n    \"interface\": {}\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Authentiq\",\n    \"description\": null,\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": null\n  }\n}"
  },
  {
    "path": "testing/e2e/raml1-internal/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected) => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual, index) => {\n  if (process.env.FIX === 'raml-v1.0--internal-v1.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './test-case-' + index + '/output.json'), actual)\n  }\n}\n\ndescribe('raml v1 -> internal', () => {\n  for (let index = 0; index < 2; index += 1) {\n    it('should match expected output for test case #' + index, (done) => {\n      const output = fs.readFileSync(\n        resolve(__dirname, './test-case-' + index + '/output.json'),\n        'utf-8'\n      ).toString()\n      // const item = { content: input }\n      /* eslint-disable no-console */\n      try {\n        const options = ApiFlow.setup({\n          options: {\n            source: { format: 'raml', version: 'v1.0' },\n            target: { format: 'internal', version: 'v1.0' }\n          }\n        })\n\n        ApiFlow\n        .transform({\n          options,\n          uri: 'file://' + resolve(__dirname, './test-case-' + index + '/input.raml')\n        })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized, index)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n      }\n      catch (e) {\n        console.error(e.stack)\n        expect(true).toEqual(false)\n        done()\n      }\n      /* eslint-enable no-console */\n    })\n  }\n})\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-0/input.raml",
    "content": "#%RAML 1.0\ntitle: Hello world # required title\nprotocols: [ HTTPS, HTTP ]\nbaseUri: https://{sub}.paw.cloud/\nbaseUriParameters:\n  sub:\n    type: string\n    enum: [ 'echo', 'app' ]\n/helloworld: # optional resource\n  get: # HTTP method declaration\n    queryParameters:\n      toto:\n        type: 'string'\n        enum: [ '123', '234' ]\n    responses: # declare a response\n      200: # HTTP status code\n        body: # declare content of response\n          application/json: # media type\n            type: | # structural definition of a response (schema or type)\n              {\n                \"title\": \"Hello world Response\",\n                \"type\": \"object\",\n                \"properties\": {\n                  \"message\": {\n                    \"type\": \"string\"\n                  }\n                }\n              }\n            example: # example how a response looks like\n              {\n                \"message\": \"Hello world\"\n              }\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-0/output.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"https://{sub}.paw.cloud/helloworld\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"https://{sub}.paw.cloud/helloworld\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/helloworld\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/helloworld\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"toto\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"toto\",\n                \"key\": \"toto\",\n                \"name\": \"toto\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"123\",\n                        \"234\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"title\": \"Hello world Response\",\n                          \"type\": \"object\",\n                          \"properties\": {\n                            \"message\": {\n                              \"type\": \"string\"\n                            }\n                          },\n                          \"x-examples\": [\n                            {\n                              \"message\": \"Hello world\"\n                            }\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/helloworld\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/helloworld\",\n        \"name\": \"/helloworld\",\n        \"description\": null,\n        \"children\": {\n          \"https://{sub}.paw.cloud/helloworld\": \"https://{sub}.paw.cloud/helloworld\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {},\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"https:\",\n          \"http:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{sub}.paw.cloud\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{sub}.paw.cloud\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"sub\",\n                \"key\": \"sub\",\n                \"name\": \"sub\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"echo\",\n                        \"app\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".paw.cloud\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"https://{sub}.paw.cloud/\",\n        \"path\": \"/\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {},\n    \"response\": {},\n    \"auth\": {},\n    \"interface\": {}\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Hello world\",\n    \"description\": null,\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": null\n  }\n}"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/examples/songs.xml",
    "content": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<song>\n  <title>str1234</title>\n  <artist>str1234</artist>\n</song>\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/input.raml",
    "content": "#%RAML 1.0\ntitle: World Music API\ndescription: This is an example of a music API.\nversion: v1\nbaseUri:\n  value: http://{environment}.musicapi.com/{version}\n  (rediractable): true\nbaseUriParameters:\n  environment:\n    type: string\n    enum: [ \"stg\", \"dev\", \"test\", \"prod\" ]\nprotocols: [  HTTP, HTTPS ]\nmediaType: [ application/json ]\ndocumentation:\n  - title: Getting Started\n    content: |\n      This is a getting started guide for the World Music API.\n  - title: Legal\n    content: See http://legal.musicapi.com\ntypes:\n  Entry: |\n    {\n      \"type\": \"array\",\n      \"items\": {\n        \"$ref\": \"#/definitions/Song\"\n      },\n      \"definitions\": {\n        \"Song\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      }\n    }\n  AnotherEntry:\n    type: Entry\n    description: |\n      # This is in Markdown\n      This is to see what the representation of this ~~Markdown~~ string is.\n      ## SubTitle\n      This is just another entry to **simulate** that you can add facets also on JSON\n      schema defined types. Although you can only add documentation-based facets.\n  SpecialEntry:\n    type: |\n      {\n        \"type\": \"string\",\n        \"pattern\": \"^.{12}$\"\n      }\n  Toy:\n    properties:\n      name: string\n      soft:\n        type: boolean\n        example: true\n      squiky: boolean\n      heavy: boolean\n      clean: boolean\n      purchaseDate: date-only\n      more: datetime\n      final: datetime-only\n    minProperties: 2\n    maxProperties: 8\n    discriminator: name\n  Ball:\n    type: Toy\n    properties:\n      bouncinessFactor:\n        type: number\n        format: int64\n        minimum: 0\n    discriminatorValue: ball\n  Rope:\n    type: Toy\n    properties:\n      length:\n        type: integer\n        enum: [ 10, 20, 50, 100 ]\n        example: 10\n    discriminatorValue: rope\n  CommonToy:\n    type: Ball | Rope\n  Treat:\n    facets:\n      vegan?: boolean\n      vegeterian: boolean\n    properties:\n      name: string\n      tastiness:\n        type: number\n        minimum: 0\n        maximum: 1\n  Pet:\n    properties:\n      claws:\n        type: number\n        minimum: 0\n        maximum: 4\n      color:\n        type: string\n        pattern: \"^#[0-9a-f]{6}$\"\n        minLength: 7\n        maxLength: 7\n      size:\n        type: number\n        multipleOf: 5\n      weigth:\n        type: number\n        format: float\n      mostActiveAt:\n        type: time-only\n      owner: User\n      toys: Toy[]\n  Resident:\n    properties:\n      address: string\n  Wild:\n    properties:\n      location: string\n  FarmPet:\n    displayName: 'Farm Pet'\n    type: [ Pet, Resident | Wild ]\n  ToyBox:\n    type: array\n    items: Toy | Treat\n    minItems: 1\n    maxItems: 15\n    uniqueItems: false\n  BigToyBox:\n    type: ToyBox\n    maxItems: 100\n  Photo:\n    type: file\n    fileTypes: [ 'image/jpeg', 'image/png' ]\n    maxLength: 1048576\n  Album:\n    type: array\n    items: Photo\n  Weird:\n    type: any\n  Habitats:\n    type: ( Resident | Wild )[]\n  SeparateKinds:\n    type: Resident[] | Wild[]\n  User:\n    properties:\n      firstname: string\n      lastname:\n        type: string\n        example: Doe\n        required: false\n      pets:\n        type: FarmPet[]\n        required: false\n      box:\n        type: ToyBox\n        required: false\n      albums:\n        type: Album[]\n        required: false\n    example:\n      firstname: John\n\ntraits:\n  secured: !include secured/accessToken.raml\n\nresourceTypes:\n  collection:\n    get:\n      description: returns a list of <<resourcePathName|!singularize>>\n      responses:\n        200:\n          body:\n            application/json:\n              schema: <<resourcePathName|!singularize|!uppercamelcase>>\n\n\nannotationTypes:\n  deprecated:\n    properties:\n      date: datetime\n      deprecatedBy: User\n      comment: nil | string\n  monitoringInterval:\n    type: integer\n    description: interval in seconds\n    example: 2\n  ready:\n    type: nil\n    description: markes a resource as ready\n    allowedTargets: Resource\n  info:\n    properties:\n      license:\n        type: string\n        enum: [ \"MIT\", \"Apache 2.0\" ]\n    allowedTargets: API\n  rediractable: boolean\n\n(info):\n  license: MIT\n\nsecuritySchemes:\n  oauth_1_0:\n    description: |\n      OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\n    type: OAuth 1.0\n    settings:\n      requestTokenUri: https://api.mysampleapi.com/1/oauth/request_token\n      authorizationUri: https://api.mysampleapi.com/1/oauth/authorize\n      tokenCredentialsUri: https://api.mysampleapi.com/1/oauth/access_token\n      signatures: [ 'HMAC-SHA1', 'PLAINTEXT' ]\n  oauth_2_0:\n    description: |\n      Dropbox supports OAuth 2.0 for authenticating all API requests.\n    type: OAuth 2.0\n    describedBy:\n      headers:\n        Authorization:\n          description: |\n             Used to send a valid OAuth 2 access token. Do not use\n             with the \"access_token\" query string parameter.\n          type: string\n      queryParameters:\n        access_token:\n          description: |\n             Used to send a valid OAuth 2 access token. Do not use with\n             the \"Authorization\" header.\n          type: string\n      responses:\n        401:\n          description: |\n              Bad or expired token. This can happen if the user or Dropbox\n              revoked or expired an access token. To fix, re-authenticate\n              the user.\n        403:\n          description: |\n              Bad OAuth request (wrong consumer key, bad nonce, expired\n              timestamp...). Unfortunately, re-authenticating the user won't help here.\n    settings:\n      authorizationUri: https://www.dropbox.com/1/oauth2/authorize\n      accessTokenUri: https://api.dropbox.com/1/oauth2/token\n      authorizationGrants: [ authorization_code, implicit, 'urn:ietf:params:oauth:grant-type:saml2-bearer' ]\n  custom_scheme:\n    description: |\n      A custom security scheme for authenticating requests.\n    type: x-custom\n    describedBy:\n      headers:\n        SpecialToken:\n          description: |\n            Used to send a custom token.\n          type: string\n      responses:\n        401:\n          description: |\n            Bad token.\n        403:\n\nsecuredBy: custom_scheme\n\nuses:\n  SongsLib: libraries/songs-library.raml\n  ApiLib: libraries/api-library.raml\n\n/api:\n  type: ApiLib.collectionFromApiLib\n  get:\n    securedBy: [ ApiLib.basic_api ]\n    queryString:\n      properties:\n        start?: number\n        page-size?: number\n  post:\n    is: [ ApiLib.described ]\n    body:\n      application/json:\n        type: ApiLib.RamlDataType\n/entry:\n  type:  collection\n  post:\n    responses:\n      200:\n        body: AnotherEntry\n/songs:\n  displayName: Songs\n  description:  Access to all songs inside the music world library.\n  (ready):\n  is: [ secured ]\n  type: SongsLib.collectionfromSongsLib\n  get:\n    securedBy: [ oauth_2_0, null ]\n    (monitoringInterval): 30\n    queryParameters:\n      genre:\n        description: filter the songs by genre\n  post:\n  /{songId}:\n    get:\n      (deprecated):\n        date: 2016-02-28T16:41:41.090Z\n        deprecatedBy:\n          firstname: Christian\n        comment: no comment\n      responses:\n        200:\n          body:\n            application/json:\n              type: SongsLib.Song\n            application/xml:\n              type: !include schemas/songs.xsd\n              example: !include examples/songs.xml\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/libraries/api-library.raml",
    "content": "#%RAML 1.0 Library\n\ntypes:\n  RamlDataType:\n    type: object\n    properties:\n      propString: string\n      propStringArray1: string[]\n      ideas:\n        type: array\n        items: !include ../schemas/idea.raml\n      extIdeas:\n        type: !include ../schemas/idea.raml\n        properties:\n          createdBy: string\n      feedback:\n        type: string\n        default: \"very nice\"\n        example: \"very well made\"\n        minLength: 1\n        maxLength: 255\n        pattern: \"[a-zA-Z\\\\s]*\"\n      propNumber:\n        type: number\n        minimum: 0\n        maximum: 32\n        format: int32\n        multipleOf: 2\n      propInteger:\n        type: integer\n        minimum: 3\n        maximum: 5\n        format: int8\n        multipleOf: 1\n      propBoolean: boolean\n      propDate:\n        type: date-only\n        example: 2015-05-23\n      userPicture:\n        type: file\n        fileTypes: ['image/jpeg', 'image/png']\n        maxLength: 307200\n      NilValue:\n        type: object\n        properties:\n          name:\n          comment: string?\n      CatOrDog: Cat | Dog\n      CatAndDog: [ Cat, Dog ]\n      PossibleMeetingDate:\n        type: CustomDate\n        noHolidays: true\n  Cat:\n    type: object\n    properties:\n      name: string\n      color: string\n  Dog:\n    type: object\n    properties:\n      name: string\n      fangs: string\n  CustomDate:\n    type: date-only\n    facets:\n      onlyFutureDates?: boolean # optional  in `PossibleMeetingDate`\n      noHolidays: boolean # required in `PossibleMeetingDate`\n\ntraits:\n  described:\n    description: 'This is an awesome description'\n\nresourceTypes:\n  collectionFromApiLib:\n    get:\n      description: 'This was loaded from api-library'\n\nsecuritySchemes:\n  basic_api:\n    type: Basic Authentication\n    description: 'This is our super secure api auth'\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/libraries/songs-library.raml",
    "content": "#%RAML 1.0 Library\n\ntypes:\n  Song:\n    properties:\n      title: string\n      length: number\n    examples:\n      song1:\n        strict: false\n        value:\n          title: \"My Song\"\n          length: 12\n      song2:\n        title: \"Last\"\n        length: 3\n  Album:\n    properties:\n      title: string\n      songs: Song[]\n  Musician:\n    properties:\n      name: string\n      discography: (Song | Album)[]\n\nresourceTypes:\n  collectionfromSongsLib:\n    get:\n      description: 'This was loaded from songs-library'\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/output.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"http://{environment}.musicapi.com/{version}/api\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/api\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/api\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/api\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from api-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"queryString\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"queryString\",\n                \"key\": \"queryString\",\n                \"name\": \"queryString\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"object\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"object\",\n                      \"properties\": {\n                        \"start\": {\n                          \"type\": \"number\"\n                        },\n                        \"page-size\": {\n                          \"type\": \"number\"\n                        }\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"ApiLib.basic_api\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"Content-Type\",\n                \"name\": \"Content-Type\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"application/json\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"application/json\",\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/ApiLib.RamlDataType\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [\n            {\n              \"_model\": {\n                \"name\": \"context.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"constraints\": [\n                {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": \"headers\",\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": \"Content-Type\",\n                  \"name\": \"Content-Type\",\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": null,\n                  \"format\": null,\n                  \"default\": \"application/json\",\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                }\n              ],\n              \"type\": null,\n              \"implements\": {}\n            }\n          ],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"trait_ApiLib.described\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"interface\",\n              \"uuid\": \"trait_ApiLib.described\",\n              \"overlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_ApiLib.collectionFromApiLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/entry\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/entry\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/entry\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/entry\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/AnotherEntry\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"returns a list of entry\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"object\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"object\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {\n        \"resourceType_collection\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_collection\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Songs\",\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/songs\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This was loaded from songs-library\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"genre\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"genre\",\n                \"key\": \"genre\",\n                \"name\": \"genre\",\n                \"description\": \"filter the songs by genre\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"description\": \"filter the songs by genre\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"oauth_2_0\",\n              \"overlay\": null\n            },\n            null\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": \"Access to all songs inside the music world library.\",\n      \"interfaces\": {\n        \"resourceType_SongsLib.collectionfromSongsLib\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"interface\",\n          \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n          \"overlay\": null\n        }\n      }\n    },\n    \"http://{environment}.musicapi.com/{version}/songs/{songId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": null,\n        \"protocol\": [],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": null,\n        \"path\": null,\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/songs/{songId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/songs/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": \"songId\",\n                \"name\": \"songId\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": false,\n        \"variableDelimiters\": [],\n        \"description\": null\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalMediaType\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": null,\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content-Type\",\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"application/json\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/json\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/SongsLib.Song\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  },\n                  \"application/xml\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"body\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"application/xml\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"x-xml\": \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n<xs:schema xmlns:xs=\\\"http://www.w3.org/2001/XMLSchema\\\"\\n  elementFormDefault=\\\"qualified\\\" attributeFormDefault=\\\"unqualified\\\">\\n  <xs:element name=\\\"song\\\">\\n    <xs:complexType>\\n      <xs:sequence>\\n        <xs:element name=\\\"title\\\" type=\\\"xs:string\\\" />\\n        <xs:element name=\\\"artist\\\" type=\\\"xs:string\\\" />\\n      </xs:sequence>\\n    </xs:complexType>\\n  </xs:element>\\n</xs:schema>\\n\",\n                          \"x-examples\": [\n                            \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\\n<song>\\n  <title>str1234</title>\\n  <artist>str1234</artist>\\n</song>\\n\"\n                          ]\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": null,\n                        \"usedIn\": \"request\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/xml\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    ],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/json\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                },\n                {\n                  \"_model\": {\n                    \"name\": \"context.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"constraints\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"parameter.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"in\": \"headers\",\n                      \"usedIn\": \"request\",\n                      \"uuid\": null,\n                      \"key\": \"Content-Type\",\n                      \"name\": \"Content-Type\",\n                      \"description\": null,\n                      \"examples\": [],\n                      \"type\": null,\n                      \"format\": null,\n                      \"default\": \"application/xml\",\n                      \"required\": false,\n                      \"superType\": null,\n                      \"value\": null,\n                      \"constraints\": [],\n                      \"applicableContexts\": [],\n                      \"interfaces\": {}\n                    }\n                  ],\n                  \"type\": null,\n                  \"implements\": {}\n                }\n              ],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": null,\n    \"children\": {\n      \"/api\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/api\",\n        \"name\": \"/api\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/api\": \"http://{environment}.musicapi.com/{version}/api\"\n        }\n      },\n      \"/entry\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/entry\",\n        \"name\": \"/entry\",\n        \"description\": null,\n        \"children\": {\n          \"http://{environment}.musicapi.com/{version}/entry\": \"http://{environment}.musicapi.com/{version}/entry\"\n        }\n      },\n      \"/songs\": {\n        \"_model\": {\n          \"name\": \"group.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"id\": \"/songs\",\n        \"name\": \"/songs\",\n        \"description\": null,\n        \"children\": {\n          \"/songs/{songId}\": {\n            \"_model\": {\n              \"name\": \"group.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"id\": \"/songs/{songId}\",\n            \"name\": \"/{songId}\",\n            \"description\": null,\n            \"children\": {\n              \"http://{environment}.musicapi.com/{version}/songs/{songId}\": \"http://{environment}.musicapi.com/{version}/songs/{songId}\"\n            }\n          },\n          \"http://{environment}.musicapi.com/{version}/songs\": \"http://{environment}.musicapi.com/{version}/songs\"\n        }\n      }\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"Entry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Song\"\n          }\n        }\n      },\n      \"Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"artist\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"AnotherEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"$ref\": \"#/definitions/Entry\",\n          \"description\": \"# This is in Markdown\\nThis is to see what the representation of this ~~Markdown~~ string is.\\n## SubTitle\\nThis is just another entry to **simulate** that you can add facets also on JSON\\nschema defined types. Although you can only add documentation-based facets.\\n\"\n        }\n      },\n      \"SpecialEntry\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^.{12}$\"\n        }\n      },\n      \"Toy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"minProperties\": 2,\n          \"maxProperties\": 8,\n          \"discriminator\": \"name\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"soft\": {\n              \"type\": \"boolean\",\n              \"x-examples\": [\n                true\n              ]\n            },\n            \"squiky\": {\n              \"type\": \"boolean\"\n            },\n            \"heavy\": {\n              \"type\": \"boolean\"\n            },\n            \"clean\": {\n              \"type\": \"boolean\"\n            },\n            \"purchaseDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateOnly\"\n            },\n            \"more\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTime\"\n            },\n            \"final\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$DateTimeOnly\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"soft\",\n            \"squiky\",\n            \"heavy\",\n            \"clean\",\n            \"purchaseDate\",\n            \"more\",\n            \"final\"\n          ]\n        }\n      },\n      \"$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"$DateTime\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"datetime\"\n        }\n      },\n      \"$DateTimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Ball\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"ball\",\n          \"properties\": {\n            \"bouncinessFactor\": {\n              \"type\": \"number\",\n              \"minimum\": 0\n            }\n          },\n          \"required\": [\n            \"bouncinessFactor\"\n          ]\n        }\n      },\n      \"Rope\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Toy\"\n            }\n          ],\n          \"discriminatorValue\": \"rope\",\n          \"properties\": {\n            \"length\": {\n              \"type\": \"integer\",\n              \"enum\": [\n                \"10\",\n                \"20\",\n                \"50\",\n                \"100\"\n              ],\n              \"x-examples\": [\n                10\n              ]\n            }\n          },\n          \"required\": [\n            \"length\"\n          ]\n        }\n      },\n      \"CommonToy\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"$ref\": \"#/definitions/Ball\"\n            },\n            {\n              \"$ref\": \"#/definitions/Rope\"\n            }\n          ]\n        }\n      },\n      \"Treat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"tastiness\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 1\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"tastiness\"\n          ]\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"claws\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 4\n            },\n            \"color\": {\n              \"type\": \"string\",\n              \"minLength\": 7,\n              \"maxLength\": 7,\n              \"pattern\": \"^#[0-9a-f]{6}$\"\n            },\n            \"size\": {\n              \"type\": \"number\",\n              \"multipleOf\": 5\n            },\n            \"weigth\": {\n              \"type\": \"number\"\n            },\n            \"mostActiveAt\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/$TimeOnly\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"toys\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Toy\"\n              }\n            }\n          },\n          \"required\": [\n            \"claws\",\n            \"color\",\n            \"size\",\n            \"weigth\",\n            \"mostActiveAt\",\n            \"owner\",\n            \"toys\"\n          ]\n        }\n      },\n      \"$TimeOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^([01][0-9]|20|21|22|23):[0-5][0-9]:([0-5][0-9]|60)(.[0-9]+)?$\",\n          \"description\": \"full-time as defined in RFC#3339\"\n        }\n      },\n      \"Resident\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"address\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"address\"\n          ]\n        }\n      },\n      \"Wild\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"location\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"location\"\n          ]\n        }\n      },\n      \"FarmPet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/Resident\"\n                },\n                {\n                  \"$ref\": \"#/definitions/Wild\"\n                }\n              ]\n            }\n          ],\n          \"title\": \"Farm Pet\"\n        }\n      },\n      \"ToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"uniqueItems\": false,\n          \"minItems\": 1,\n          \"maxItems\": 15,\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Toy\"\n              },\n              {\n                \"$ref\": \"#/definitions/Treat\"\n              }\n            ]\n          }\n        }\n      },\n      \"BigToyBox\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"allOf\": [\n            {\n              \"$ref\": \"#/definitions/ToyBox\"\n            }\n          ],\n          \"maxItems\": 100\n        }\n      },\n      \"Photo\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/$File\"\n        }\n      },\n      \"$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Photo\"\n          }\n        }\n      },\n      \"Weird\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {}\n      },\n      \"Habitats\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"anyOf\": [\n              {\n                \"$ref\": \"#/definitions/Resident\"\n              },\n              {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            ]\n          }\n        }\n      },\n      \"SeparateKinds\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"anyOf\": [\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Resident\"\n              }\n            },\n            {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Wild\"\n              }\n            }\n          ]\n        }\n      },\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\",\n              \"x-examples\": [\n                \"Doe\"\n              ]\n            },\n            \"pets\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/FarmPet\"\n              }\n            },\n            \"box\": {\n              \"$ref\": \"#/definitions/ToyBox\"\n            },\n            \"albums\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Album\"\n              }\n            }\n          },\n          \"required\": [\n            \"firstname\"\n          ],\n          \"x-examples\": [\n            {\n              \"firstname\": \"John\"\n            }\n          ]\n        }\n      },\n      \"SongsLib.Song\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"length\": {\n              \"type\": \"number\"\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"length\"\n          ],\n          \"x-examples\": [\n            {\n              \"title\": \"My Song\",\n              \"length\": 12\n            },\n            {\n              \"title\": \"Last\",\n              \"length\": 3\n            }\n          ]\n        }\n      },\n      \"SongsLib.Album\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"title\": {\n              \"type\": \"string\"\n            },\n            \"songs\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/SongsLib.Song\"\n              }\n            }\n          },\n          \"required\": [\n            \"title\",\n            \"songs\"\n          ]\n        }\n      },\n      \"SongsLib.Musician\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"discography\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"anyOf\": [\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Song\"\n                  },\n                  {\n                    \"$ref\": \"#/definitions/SongsLib.Album\"\n                  }\n                ]\n              }\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"discography\"\n          ]\n        }\n      },\n      \"ApiLib.RamlDataType\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"propString\": {\n              \"type\": \"string\"\n            },\n            \"propStringArray1\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"ideas\": {\n              \"type\": \"array\"\n            },\n            \"extIdeas\": {\n              \"properties\": {\n                \"createdBy\": {\n                  \"type\": \"string\"\n                }\n              },\n              \"required\": [\n                \"createdBy\"\n              ]\n            },\n            \"feedback\": {\n              \"type\": \"string\",\n              \"minLength\": 1,\n              \"maxLength\": 255,\n              \"pattern\": \"[a-zA-Z\\\\s]*\",\n              \"x-examples\": [\n                \"very well made\"\n              ]\n            },\n            \"propNumber\": {\n              \"type\": \"number\",\n              \"minimum\": 0,\n              \"maximum\": 32,\n              \"multipleOf\": 2\n            },\n            \"propInteger\": {\n              \"type\": \"integer\",\n              \"minimum\": 3,\n              \"maximum\": 5,\n              \"multipleOf\": 1\n            },\n            \"propBoolean\": {\n              \"type\": \"boolean\"\n            },\n            \"propDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\",\n              \"x-examples\": [\n                \"2015-05-23\"\n              ]\n            },\n            \"userPicture\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$File\"\n            },\n            \"NilValue\": {\n              \"type\": \"object\",\n              \"properties\": {\n                \"name\": {\n                  \"type\": \"string\"\n                },\n                \"comment\": {\n                  \"$ref\": \"#/definitions/ApiLib.string?\"\n                }\n              },\n              \"required\": [\n                \"name\",\n                \"comment\"\n              ]\n            },\n            \"CatOrDog\": {\n              \"anyOf\": [\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Cat\"\n                },\n                {\n                  \"$ref\": \"#/definitions/ApiLib.Dog\"\n                }\n              ]\n            },\n            \"CatAndDog\": {\n              \"$ref\": \"#/definitions/ApiLib.Dog\"\n            },\n            \"PossibleMeetingDate\": {\n              \"type\": \"string\",\n              \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n            }\n          },\n          \"required\": [\n            \"propString\",\n            \"propStringArray1\",\n            \"ideas\",\n            \"extIdeas\",\n            \"feedback\",\n            \"propNumber\",\n            \"propInteger\",\n            \"propBoolean\",\n            \"propDate\",\n            \"userPicture\",\n            \"NilValue\",\n            \"CatOrDog\",\n            \"CatAndDog\",\n            \"CatAndDog\",\n            \"PossibleMeetingDate\"\n          ]\n        }\n      },\n      \"ApiLib.$DateOnly\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"pattern\": \"^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$\",\n          \"description\": \"full-date as defined in RFC#3339\"\n        }\n      },\n      \"ApiLib.$File\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"description\": \"file\",\n          \"pattern\": \"^[^\\u0000]*\\u0000$\"\n        }\n      },\n      \"ApiLib.Cat\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"color\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"color\"\n          ]\n        }\n      },\n      \"ApiLib.Dog\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"name\": {\n              \"type\": \"string\"\n            },\n            \"fangs\": {\n              \"type\": \"string\"\n            }\n          },\n          \"required\": [\n            \"name\",\n            \"fangs\"\n          ]\n        }\n      },\n      \"ApiLib.CustomDate\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"type\": \"string\",\n          \"$ref\": \"#/definitions/ApiLib.$DateOnly\"\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"{environment}.musicapi.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"{environment}.musicapi.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"hostname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"environment\",\n                \"key\": \"environment\",\n                \"name\": \"environment\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"stg\",\n                        \"dev\",\n                        \"test\",\n                        \"prod\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \".musicapi.com\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://{environment}.musicapi.com/{version}\",\n        \"path\": \"/{version}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/{version}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"pathname\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"version\",\n                \"key\": \"version\",\n                \"name\": \"version\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\",\n                      \"enum\": [\n                        \"v1\"\n                      ]\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalMediaType\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": null,\n        \"key\": \"Content-Type\",\n        \"name\": \"Content-Type\",\n        \"description\": null,\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": false,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {}\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"oauth_1_0\": {\n        \"_model\": {\n          \"name\": \"oauth-1.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"OAuth 1.0 continues to be supported for all API requests, but OAuth 2.0 is now preferred.\\n\",\n        \"authName\": \"oauth_1_0\",\n        \"callback\": null,\n        \"consumerSecret\": null,\n        \"tokenSecret\": null,\n        \"consumerKey\": null,\n        \"algorithm\": null,\n        \"nonce\": null,\n        \"additionalParameters\": null,\n        \"timestamp\": null,\n        \"token\": null,\n        \"version\": null,\n        \"signature\": \"HMAC-SHA1\",\n        \"tokenCredentialsUri\": \"https://api.mysampleapi.com/1/oauth/access_token\",\n        \"requestTokenUri\": \"https://api.mysampleapi.com/1/oauth/request_token\",\n        \"authorizationUri\": \"https://api.mysampleapi.com/1/oauth/authorize\"\n      },\n      \"oauth_2_0\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"Dropbox supports OAuth 2.0 for authenticating all API requests.\\n\",\n        \"authName\": \"oauth_2_0\",\n        \"flow\": \"accessCode\",\n        \"authorizationUrl\": \"https://www.dropbox.com/1/oauth2/authorize\",\n        \"tokenUrl\": \"https://api.dropbox.com/1/oauth2/token\",\n        \"scopes\": []\n      },\n      \"custom_scheme\": {\n        \"_model\": {\n          \"name\": \"custom.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"A custom security scheme for authenticating requests.\\n\",\n        \"authName\": \"custom_scheme\",\n        \"setup\": null,\n        \"interfaces\": {}\n      },\n      \"ApiLib.basic_api\": {\n        \"_model\": {\n          \"name\": \"basic.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"This is our super secure api auth\",\n        \"authName\": \"basic_api\",\n        \"username\": null,\n        \"password\": null,\n        \"raw\": null,\n        \"interfaces\": {}\n      }\n    },\n    \"interface\": {\n      \"resourceType_SongsLib.collectionfromSongsLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"SongsLib.collectionfromSongsLib\",\n        \"uuid\": \"resourceType_SongsLib.collectionfromSongsLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from songs-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_ApiLib.collectionFromApiLib\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.collectionFromApiLib\",\n        \"uuid\": \"resourceType_ApiLib.collectionFromApiLib\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"This was loaded from api-library\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [],\n              \"responses\": {},\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"resourceType_collection\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"collection\",\n        \"uuid\": \"resourceType_collection\",\n        \"level\": \"resource\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"resource.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"name\": null,\n          \"uuid\": null,\n          \"endpoints\": {},\n          \"path\": null,\n          \"methods\": {\n            \"get\": {\n              \"_model\": {\n                \"name\": \"request.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"id\": null,\n              \"endpoints\": {\n                \"base\": {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"endpoint\",\n                  \"uuid\": \"base\",\n                  \"overlay\": null\n                }\n              },\n              \"name\": null,\n              \"description\": \"returns a list of <<resourcePathName|!singularize>>\",\n              \"method\": \"get\",\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {},\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"auths\": [\n                {\n                  \"_model\": {\n                    \"name\": \"reference.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"type\": \"auth\",\n                  \"uuid\": \"custom_scheme\",\n                  \"overlay\": null\n                }\n              ],\n              \"responses\": {\n                \"200\": {\n                  \"_model\": {\n                    \"name\": \"response.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"code\": \"200\",\n                  \"description\": null,\n                  \"examples\": null,\n                  \"parameters\": {\n                    \"_model\": {\n                      \"name\": \"parameter-container.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"headers\": {\n                      \"Content-Type\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"headers\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": null,\n                        \"key\": \"Content-Type\",\n                        \"name\": \"Content-Type\",\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"string\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"enum.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"enum\",\n                            \"value\": [\n                              \"application/json\"\n                            ]\n                          }\n                        ],\n                        \"applicableContexts\": [],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"queries\": {},\n                    \"body\": {\n                      \"application/json\": {\n                        \"_model\": {\n                          \"name\": \"parameter.core.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"in\": \"body\",\n                        \"usedIn\": \"response\",\n                        \"uuid\": \"application/json\",\n                        \"key\": null,\n                        \"name\": null,\n                        \"description\": null,\n                        \"examples\": [],\n                        \"type\": \"object\",\n                        \"format\": null,\n                        \"default\": null,\n                        \"required\": false,\n                        \"superType\": null,\n                        \"value\": null,\n                        \"constraints\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"json.constraint.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"name\": \"json\",\n                            \"value\": {\n                              \"type\": \"object\"\n                            }\n                          }\n                        ],\n                        \"applicableContexts\": [\n                          {\n                            \"_model\": {\n                              \"name\": \"parameter.core.models\",\n                              \"version\": \"0.1.0\"\n                            },\n                            \"in\": null,\n                            \"usedIn\": \"request\",\n                            \"uuid\": null,\n                            \"key\": \"Content-Type\",\n                            \"name\": \"Content-Type\",\n                            \"description\": null,\n                            \"examples\": [],\n                            \"type\": \"string\",\n                            \"format\": null,\n                            \"default\": null,\n                            \"required\": false,\n                            \"superType\": null,\n                            \"value\": null,\n                            \"constraints\": [\n                              {\n                                \"_model\": {\n                                  \"name\": \"enum.constraint.models\",\n                                  \"version\": \"0.1.0\"\n                                },\n                                \"name\": \"enum\",\n                                \"value\": [\n                                  \"application/json\"\n                                ]\n                              }\n                            ],\n                            \"applicableContexts\": [],\n                            \"interfaces\": {}\n                          }\n                        ],\n                        \"interfaces\": {}\n                      }\n                    },\n                    \"path\": {}\n                  },\n                  \"contexts\": [\n                    {\n                      \"_model\": {\n                        \"name\": \"context.core.models\",\n                        \"version\": \"0.1.0\"\n                      },\n                      \"constraints\": [\n                        {\n                          \"_model\": {\n                            \"name\": \"parameter.core.models\",\n                            \"version\": \"0.1.0\"\n                          },\n                          \"in\": \"headers\",\n                          \"usedIn\": \"request\",\n                          \"uuid\": null,\n                          \"key\": \"Content-Type\",\n                          \"name\": \"Content-Type\",\n                          \"description\": null,\n                          \"examples\": [],\n                          \"type\": null,\n                          \"format\": null,\n                          \"default\": \"application/json\",\n                          \"required\": false,\n                          \"superType\": null,\n                          \"value\": null,\n                          \"constraints\": [],\n                          \"applicableContexts\": [],\n                          \"interfaces\": {}\n                        }\n                      ],\n                      \"type\": null,\n                      \"implements\": {}\n                    }\n                  ],\n                  \"interfaces\": {}\n                }\n              },\n              \"timeout\": null,\n              \"tags\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"description\": null,\n          \"interfaces\": {}\n        }\n      },\n      \"trait_ApiLib.described\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"ApiLib.described\",\n        \"uuid\": \"trait_ApiLib.described\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": \"This is an awesome description\",\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      },\n      \"trait_secured\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"secured\",\n        \"uuid\": \"trait_secured\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"This trait can be used to apply an access token query parameter\\nto any resources or HTTP methods.\\n\",\n        \"underlay\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": null,\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": null,\n          \"description\": null,\n          \"method\": null,\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"access_token\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"access_token\",\n                \"key\": \"access_token\",\n                \"name\": \"access_token\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"string\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"custom_scheme\",\n              \"overlay\": null\n            }\n          ],\n          \"responses\": {},\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {}\n        }\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"World Music API\",\n    \"description\": \"This is an example of a music API.\",\n    \"tos\": null,\n    \"contact\": null,\n    \"license\": null,\n    \"version\": \"v1\"\n  }\n}"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/schemas/idea.raml",
    "content": "#%RAML 1.0 DataType\n\nproperties:\n  comment: string\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/schemas/songs.xsd",
    "content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"\n  elementFormDefault=\"qualified\" attributeFormDefault=\"unqualified\">\n  <xs:element name=\"song\">\n    <xs:complexType>\n      <xs:sequence>\n        <xs:element name=\"title\" type=\"xs:string\" />\n        <xs:element name=\"artist\" type=\"xs:string\" />\n      </xs:sequence>\n    </xs:complexType>\n  </xs:element>\n</xs:schema>\n"
  },
  {
    "path": "testing/e2e/raml1-internal/test-case-1/secured/accessToken.raml",
    "content": "#%RAML 1.0 Trait\n\nusage:  |\n  This trait can be used to apply an access token query parameter\n  to any resources or HTTP methods.\nqueryParameters:\n  access_token: string\n"
  },
  {
    "path": "testing/e2e/swagger2-internal/e2e.spec.js",
    "content": "require('colors')\nimport fs from 'fs'\nimport { resolve } from 'path'\n\n/* gen-utils normalization */\nimport seedrandom from 'seedrandom'\nseedrandom('swagger-e2e-seed', { global: true })\nimport { __internals__ } from '../../../src/utils/gen-utils'\n__internals__.date = new Date(1).getTime()\n/* end of gen-utils normalization */\n\nimport expect from 'expect'\nconst diff = require('diff')\n\nimport ApiFlow from '../../../src/api-flow'\n\nconst compare = (actual, expected) => {\n  const delta = diff.diffJson(actual, expected)\n  if (\n    delta.length === 1 &&\n    typeof delta[0].removed === 'undefined' &&\n    typeof delta[0].added === 'undefined'\n  ) {\n    return true\n  }\n\n  /* eslint-disable no-console */\n  console.log('\\x1b[42m' +\n    (new Array(6)).join('-------------\\n') + '\\x1b[0m')\n  delta.forEach(part => {\n    let color = 'grey'\n    if (part.added) {\n      color = 'green'\n    }\n    else if (part.removed) {\n      color = 'red'\n    }\n    process.stderr.write(part.value[color])\n  })\n  /* eslint-enable no-console */\n\n  return false\n}\n\nconst fixDiff = (actual) => {\n  if (process.env.FIX === 'swagger-v2.0--internal-v1.0') {\n    /* eslint-disable no-console */\n    console.log('updating spec')\n    /* eslint-enable no-console */\n    fs.writeFileSync(resolve(__dirname, './output.json'), actual)\n  }\n}\n\ndescribe('swagger v2 -> internal', () => {\n  it('should match expected output', (done) => {\n    // const input = fs.readFileSync(resolve(__dirname, './input.json'), 'utf-8').toString()\n    const output = fs.readFileSync(resolve(__dirname, './output.json'), 'utf-8').toString()\n    // const item = { content: input }\n    /* eslint-disable no-console */\n    try {\n      const options = ApiFlow.setup({\n        options: {\n          source: { format: 'swagger', version: 'v2.0' },\n          target: { format: 'internal', version: 'v1.0' }\n        }\n      })\n\n      ApiFlow\n        .transform({ options, uri: 'file://' + resolve(__dirname, './input.json') })\n        .then(serialized => {\n          const success = compare(serialized, output)\n          if (!success) {\n            done(new Error('found differences'))\n            return fixDiff(serialized)\n          }\n          done()\n        }, e => {\n          console.error('got err:\\n', e.stack)\n          done()\n        })\n        .catch()\n    }\n    catch (e) {\n      console.error(e.stack)\n      expect(true).toEqual(false)\n      done()\n    }\n    /* eslint-enable no-console */\n  })\n})\n"
  },
  {
    "path": "testing/e2e/swagger2-internal/input.json",
    "content": "{\n  \"swagger\": \"2.0\",\n  \"info\": {\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"version\": \"1.0.0\",\n    \"title\": \"Swagger Petstore\",\n    \"termsOfService\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"name\": \"apiteam@wordnik.com\"\n    },\n    \"license\": {\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    }\n  },\n  \"host\": \"petstore.swagger.wordnik.com\",\n  \"basePath\": \"/v2\",\n  \"schemes\": [\n    \"http\",\n    \"https\"\n  ],\n  \"consumes\": [\n    \"application/json\"\n  ],\n  \"produces\": [\n    \"application/xml\"\n  ],\n  \"paths\": {\n    \"/pets\": {\n      \"x-controller-setup\": {\n        \"params\": {\n          \"accept-any\": true\n        },\n        \"class\": \"PurchaseRouter\"\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Add a new pet to the store\",\n        \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n        \"operationId\": \"addPet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"schemes\": [\n          \"https\"\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      },\n      \"put\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Update an existing pet\",\n        \"description\": \"\",\n        \"operationId\": \"updatePet\",\n        \"consumes\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Pet object that needs to be added to the store\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          },\n          \"405\": {\n            \"description\": \"Validation exception\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/findByStatus\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by status\",\n        \"description\": \"Multiple status values can be provided with comma seperated strings\",\n        \"operationId\": \"findPetsByStatus\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"query\",\n            \"name\": \"status\",\n            \"description\": \"Status values that need to be considered for filter\",\n            \"required\": false,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid status value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/findByTags\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Finds Pets by tags\",\n        \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n        \"operationId\": \"findPetsByTags\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"query\",\n            \"name\": \"tags\",\n            \"description\": \"Tags to filter by\",\n            \"required\": false,\n            \"type\": \"array\",\n            \"items\": {\n              \"type\": \"string\"\n            },\n            \"collectionFormat\": \"multi\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Pet\"\n              }\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid tag value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/pets/{petId}\": {\n      \"get\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Find pet by ID\",\n        \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n        \"operationId\": \"getPetById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Pet\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Pet not found\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          },\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      },\n      \"post\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Updates a pet in the store with form data\",\n        \"description\": \"\",\n        \"operationId\": \"updatePetWithForm\",\n        \"consumes\": [\n          \"application/x-www-form-urlencoded\"\n        ],\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"description\": \"ID of pet that needs to be updated\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"formData\",\n            \"name\": \"name\",\n            \"description\": \"Updated name of the pet\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"formData\",\n            \"name\": \"status\",\n            \"description\": \"Updated status of the pet\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"405\": {\n            \"description\": \"Invalid input\"\n          }\n        },\n        \"security\": [\n          {\n            \"api_key\": []\n          },\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      },\n      \"delete\": {\n        \"tags\": [\n          \"pet\"\n        ],\n        \"summary\": \"Deletes a pet\",\n        \"description\": \"\",\n        \"operationId\": \"deletePet\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"header\",\n            \"name\": \"api_key\",\n            \"description\": \"\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"path\",\n            \"name\": \"petId\",\n            \"description\": \"Pet id to delete\",\n            \"required\": true,\n            \"type\": \"integer\",\n            \"format\": \"int64\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid pet value\"\n          }\n        },\n        \"security\": [\n          {\n            \"petstore_auth\": [\n              \"write_pets\",\n              \"read_pets\"\n            ]\n          }\n        ]\n      }\n    },\n    \"/stores/order\": {\n      \"post\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Place an order for a pet\",\n        \"description\": \"\",\n        \"operationId\": \"placeOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"order placed for purchasing the pet\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid Order\"\n          }\n        }\n      }\n    },\n    \"/stores/order/{orderId}\": {\n      \"get\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Find purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n        \"operationId\": \"getOrderById\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"description\": \"ID of pet that needs to be fetched\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/Order\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"store\"\n        ],\n        \"summary\": \"Delete purchase order by ID\",\n        \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n        \"operationId\": \"deleteOrder\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"orderId\",\n            \"description\": \"ID of the order that needs to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid ID supplied\"\n          },\n          \"404\": {\n            \"description\": \"Order not found\"\n          }\n        }\n      }\n    },\n    \"/users\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Create user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"createUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Created user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/createWithArray\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithArrayInput\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": false,\n            \"x-trace\": \"1242\",\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/createWithList\": {\n      \"post\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Creates list of users with given input array\",\n        \"description\": \"\",\n        \"operationId\": \"createUsersWithListInput\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"List of user object\",\n            \"required\": false,\n            \"schema\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/User\"\n              }\n            }\n          }\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/login\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs user into the system\",\n        \"description\": \"\",\n        \"operationId\": \"loginUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"query\",\n            \"name\": \"username\",\n            \"description\": \"The user name for login\",\n            \"required\": false,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"query\",\n            \"name\": \"password\",\n            \"description\": \"The password for login in clear text\",\n            \"required\": false,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"type\": \"string\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username/password supplied\"\n          }\n        }\n      }\n    },\n    \"/users/logout\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Logs out current logged in user session\",\n        \"description\": \"\",\n        \"operationId\": \"logoutUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"responses\": {\n          \"default\": {\n            \"description\": \"successful operation\"\n          }\n        }\n      }\n    },\n    \"/users/{username}\": {\n      \"get\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Get user by user name\",\n        \"description\": \"\",\n        \"operationId\": \"getUserByName\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"200\": {\n            \"description\": \"successful operation\",\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          },\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"put\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Updated user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"updateUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"description\": \"name that need to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          },\n          {\n            \"in\": \"body\",\n            \"name\": \"body\",\n            \"description\": \"Updated user object\",\n            \"required\": false,\n            \"schema\": {\n              \"$ref\": \"#/definitions/User\"\n            }\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid user supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      },\n      \"delete\": {\n        \"tags\": [\n          \"user\"\n        ],\n        \"summary\": \"Delete user\",\n        \"description\": \"This can only be done by the logged in user.\",\n        \"operationId\": \"deleteUser\",\n        \"produces\": [\n          \"application/json\",\n          \"application/xml\"\n        ],\n        \"parameters\": [\n          {\n            \"in\": \"path\",\n            \"name\": \"username\",\n            \"description\": \"The name that needs to be deleted\",\n            \"required\": true,\n            \"type\": \"string\"\n          }\n        ],\n        \"responses\": {\n          \"400\": {\n            \"description\": \"Invalid username supplied\"\n          },\n          \"404\": {\n            \"description\": \"User not found\"\n          }\n        }\n      }\n    }\n  },\n  \"securityDefinitions\": {\n    \"api_key\": {\n      \"type\": \"apiKey\",\n      \"name\": \"api_key\",\n      \"in\": \"header\"\n    },\n    \"petstore_auth\": {\n      \"type\": \"oauth2\",\n      \"description\": \"the authentication method for the Petstore API\",\n      \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n      \"flow\": \"implicit\",\n      \"scopes\": {\n        \"write_pets\": \"modify pets in your account\",\n        \"read_pets\": \"read your pets\"\n      }\n    }\n  },\n  \"definitions\": {\n    \"User\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"username\": {\n          \"type\": \"string\"\n        },\n        \"firstName\": {\n          \"type\": \"string\"\n        },\n        \"pet\": {\n          \"$ref\": \"#/definitions/Pet\"\n        },\n        \"lastName\": {\n          \"type\": \"string\"\n        },\n        \"email\": {\n          \"type\": \"string\"\n        },\n        \"password\": {\n          \"type\": \"string\"\n        },\n        \"phone\": {\n          \"type\": \"string\"\n        },\n        \"userStatus\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\",\n          \"description\": \"User Status\"\n        }\n      }\n    },\n    \"Category\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Pet\": {\n      \"required\": [\n        \"name\",\n        \"photoUrls\"\n      ],\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"category\": {\n          \"$ref\": \"#/definitions/Category\"\n        },\n        \"name\": {\n          \"type\": \"string\",\n          \"example\": \"doggie\"\n        },\n        \"owner\": {\n          \"$ref\": \"#/definitions/User\"\n        },\n        \"photoUrls\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"type\": \"string\"\n          }\n        },\n        \"tags\": {\n          \"type\": \"array\",\n          \"items\": {\n            \"$ref\": \"#/definitions/Tag\"\n          }\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"pet status in the store\"\n        }\n      }\n    },\n    \"Tag\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"name\": {\n          \"type\": \"string\"\n        }\n      }\n    },\n    \"Order\": {\n      \"properties\": {\n        \"id\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"petId\": {\n          \"type\": \"integer\",\n          \"format\": \"int64\"\n        },\n        \"quantity\": {\n          \"type\": \"integer\",\n          \"format\": \"int32\"\n        },\n        \"shipDate\": {\n          \"type\": \"string\",\n          \"format\": \"date-time\"\n        },\n        \"status\": {\n          \"type\": \"string\",\n          \"description\": \"Order Status\"\n        },\n        \"complete\": {\n          \"type\": \"boolean\"\n        }\n      }\n    }\n  }\n}\n"
  },
  {
    "path": "testing/e2e/swagger2-internal/output.json",
    "content": "{\n  \"_model\": {\n    \"name\": \"api.core.models\",\n    \"version\": \"0.1.0\"\n  },\n  \"resources\": {\n    \"/pets\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets\",\n        \"path\": \"/pets\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"addPet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"url.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"protocol\": [\n                  \"https:\"\n                ],\n                \"slashes\": true,\n                \"auth\": null,\n                \"host\": null,\n                \"port\": null,\n                \"hostname\": null,\n                \"href\": null,\n                \"path\": null,\n                \"pathname\": null,\n                \"query\": null,\n                \"search\": null,\n                \"hash\": null,\n                \"variableDelimiters\": [\n                  \"{\",\n                  \"}\"\n                ]\n              }\n            }\n          },\n          \"name\": \"Add a new pet to the store\",\n          \"description\": \"This is a fairly long description about the API request /pets with Method POST\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Update an existing pet\",\n          \"description\": null,\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/json\",\n                      \"application/xml\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Pet object that needs to be added to the store\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Pet\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Validation exception\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"globalProduces\": {\n                    \"_model\": {\n                      \"name\": \"reference.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"type\": \"parameter\",\n                    \"uuid\": \"globalProduces\",\n                    \"overlay\": null\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByStatus\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByStatus\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByStatus\",\n        \"path\": \"/pets/findByStatus\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByStatus\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByStatus\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByStatus\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by status\",\n          \"description\": \"Multiple status values can be provided with comma seperated strings\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"status-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-query\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Status values that need to be considered for filter\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid status value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/findByTags\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/findByTags\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/findByTags\",\n        \"path\": \"/pets/findByTags\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/findByTags\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/pets/findByTags\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"findPetsByTags\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Finds Pets by tags\",\n          \"description\": \"Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"tags-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"tags-query\",\n                \"key\": \"tags\",\n                \"name\": \"tags\",\n                \"description\": \"Tags to filter by\",\n                \"examples\": [],\n                \"type\": \"array\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": {\n                  \"_model\": {\n                    \"name\": \"parameter.core.models\",\n                    \"version\": \"0.1.0\"\n                  },\n                  \"in\": null,\n                  \"usedIn\": \"request\",\n                  \"uuid\": null,\n                  \"key\": null,\n                  \"name\": null,\n                  \"description\": null,\n                  \"examples\": [],\n                  \"type\": \"string\",\n                  \"format\": null,\n                  \"default\": null,\n                  \"required\": false,\n                  \"superType\": null,\n                  \"value\": null,\n                  \"constraints\": [],\n                  \"applicableContexts\": [],\n                  \"interfaces\": {}\n                },\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"array\",\n                          \"items\": {\n                            \"$ref\": \"#/definitions/Pet\"\n                          }\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid tag value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/pets/{petId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/pets/{petId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/pets/{petId}\",\n        \"path\": \"/pets/{petId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/pets/{petId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/pets/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getPetById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find pet by ID\",\n          \"description\": \"Returns a pet when ID < 10.  ID > 10 or nonintegers will simulate API error conditions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Pet\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Pet not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updatePetWithForm\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updates a pet in the store with form data\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"Content-Type-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"Content-Type-header\",\n                \"key\": \"Content-Type\",\n                \"name\": \"Content Type Header\",\n                \"description\": \"describes the media type of the request\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"enum.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"enum\",\n                    \"value\": [\n                      \"application/x-www-form-urlencoded\"\n                    ]\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"name-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"name-formData\",\n                \"key\": \"name\",\n                \"name\": \"name\",\n                \"description\": \"Updated name of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              },\n              \"status-formData\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"status-formData\",\n                \"key\": \"status\",\n                \"name\": \"status\",\n                \"description\": \"Updated status of the pet\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"request\",\n                    \"uuid\": null,\n                    \"key\": \"Content-Type\",\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/x-www-form-urlencoded\",\n                          \"multipart/form-data\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                ],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"ID of pet that needs to be updated\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"api_key\",\n              \"overlay\": null\n            },\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"405\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"405\",\n              \"description\": \"Invalid input\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deletePet\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Deletes a pet\",\n          \"description\": null,\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"api_key-header\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"headers\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"api_key-header\",\n                \"key\": \"api_key\",\n                \"name\": \"api_key\",\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"petId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"petId-path\",\n                \"key\": \"petId\",\n                \"name\": \"petId\",\n                \"description\": \"Pet id to delete\",\n                \"examples\": [],\n                \"type\": \"integer\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [\n            {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"auth\",\n              \"uuid\": \"petstore_auth\",\n              \"overlay\": {\n                \"_model\": {\n                  \"name\": \"oauth-2.auth.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"description\": null,\n                \"authName\": null,\n                \"flow\": null,\n                \"authorizationUrl\": null,\n                \"tokenUrl\": null,\n                \"scopes\": [\n                  {\n                    \"key\": \"write_pets\"\n                  },\n                  {\n                    \"key\": \"read_pets\"\n                  }\n                ]\n              }\n            }\n          ],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid pet value\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"pet\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"pet\",\n              \"uuid\": \"pet\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order\",\n        \"path\": \"/stores/order\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/stores/order\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"placeOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Place an order for a pet\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"order placed for purchasing the pet\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/Order\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid Order\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/stores/order/{orderId}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/stores/order/{orderId}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/stores/order/{orderId}\",\n        \"path\": \"/stores/order/{orderId}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/stores/order/{orderId}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/stores/order/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getOrderById\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Find purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions\",\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of pet that needs to be fetched\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/Order\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteOrder\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete purchase order by ID\",\n          \"description\": \"For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"orderId-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"orderId-path\",\n                \"key\": \"orderId\",\n                \"name\": \"orderId\",\n                \"description\": \"ID of the order that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid ID supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"Order not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"store\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"store\",\n              \"uuid\": \"store\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users\",\n        \"path\": \"/users\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Create user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Created user object\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithArray\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithArray\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithArray\",\n        \"path\": \"/users/createWithArray\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithArray\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithArray\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithArrayInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/createWithList\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/createWithList\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/createWithList\",\n        \"path\": \"/users/createWithList\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/createWithList\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/createWithList\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"post\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"createUsersWithListInput\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Creates list of users with given input array\",\n          \"description\": null,\n          \"method\": \"post\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"List of user object\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"type\": \"array\",\n                      \"items\": {\n                        \"$ref\": \"#/definitions/User\"\n                      }\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/login\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/login\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/login\",\n        \"path\": \"/users/login\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/login\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/login\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"loginUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs user into the system\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {\n              \"username-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-query\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The user name for login\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              \"password-query\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"queries\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"password-query\",\n                \"key\": \"password\",\n                \"name\": \"password\",\n                \"description\": \"The password for login in clear text\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"type\": \"string\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username/password supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/logout\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/logout\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/logout\",\n        \"path\": \"/users/logout\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/logout\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/users/logout\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"logoutUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Logs out current logged in user session\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {}\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"default\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"default\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    },\n    \"/users/{username}\": {\n      \"_model\": {\n        \"name\": \"resource.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": null,\n      \"uuid\": \"/users/{username}\",\n      \"endpoints\": {\n        \"base\": {\n          \"_model\": {\n            \"name\": \"reference.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"type\": \"endpoint\",\n          \"uuid\": \"base\",\n          \"overlay\": null\n        }\n      },\n      \"path\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"protocol\": [\n          null\n        ],\n        \"slashes\": null,\n        \"auth\": null,\n        \"host\": null,\n        \"port\": null,\n        \"hostname\": null,\n        \"href\": \"/users/{username}\",\n        \"path\": \"/users/{username}\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/users/{username}\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": null,\n            \"required\": false,\n            \"superType\": \"sequence\",\n            \"value\": [\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"/users/\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              },\n              {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": null,\n                \"usedIn\": \"request\",\n                \"uuid\": null,\n                \"key\": null,\n                \"name\": null,\n                \"description\": null,\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": \"\",\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            ],\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      },\n      \"methods\": {\n        \"get\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"getUserByName\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Get user by user name\",\n          \"description\": null,\n          \"method\": \"get\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {},\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be fetched. Use user1 for testing.\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"200\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"200\",\n              \"description\": \"successful operation\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {\n                  \"body\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": null,\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"body\",\n                    \"key\": null,\n                    \"name\": null,\n                    \"description\": null,\n                    \"examples\": [],\n                    \"type\": null,\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": false,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"json.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"json\",\n                        \"value\": {\n                          \"$ref\": \"#/definitions/User\"\n                        }\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"put\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"updateUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Updated user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"put\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {\n              \"body-body\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"body\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"body-body\",\n                \"key\": null,\n                \"name\": \"body\",\n                \"description\": \"Updated user object\",\n                \"examples\": [],\n                \"type\": null,\n                \"format\": null,\n                \"default\": null,\n                \"required\": false,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [\n                  {\n                    \"_model\": {\n                      \"name\": \"json.constraint.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"name\": \"json\",\n                    \"value\": {\n                      \"$ref\": \"#/definitions/User\"\n                    }\n                  }\n                ],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            },\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"name that need to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid user supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        },\n        \"delete\": {\n          \"_model\": {\n            \"name\": \"request.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"id\": \"deleteUser\",\n          \"endpoints\": {\n            \"base\": {\n              \"_model\": {\n                \"name\": \"reference.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"type\": \"endpoint\",\n              \"uuid\": \"base\",\n              \"overlay\": null\n            }\n          },\n          \"name\": \"Delete user\",\n          \"description\": \"This can only be done by the logged in user.\",\n          \"method\": \"delete\",\n          \"parameters\": {\n            \"_model\": {\n              \"name\": \"parameter-container.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"headers\": {\n              \"globalConsumes\": {\n                \"_model\": {\n                  \"name\": \"reference.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"type\": \"parameter\",\n                \"uuid\": \"globalConsumes\",\n                \"overlay\": null\n              }\n            },\n            \"queries\": {},\n            \"body\": {},\n            \"path\": {\n              \"username-path\": {\n                \"_model\": {\n                  \"name\": \"parameter.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"in\": \"path\",\n                \"usedIn\": \"request\",\n                \"uuid\": \"username-path\",\n                \"key\": \"username\",\n                \"name\": \"username\",\n                \"description\": \"The name that needs to be deleted\",\n                \"examples\": [],\n                \"type\": \"string\",\n                \"format\": null,\n                \"default\": null,\n                \"required\": true,\n                \"superType\": null,\n                \"value\": null,\n                \"constraints\": [],\n                \"applicableContexts\": [],\n                \"interfaces\": {}\n              }\n            }\n          },\n          \"contexts\": [],\n          \"auths\": [],\n          \"responses\": {\n            \"400\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"400\",\n              \"description\": \"Invalid username supplied\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            },\n            \"404\": {\n              \"_model\": {\n                \"name\": \"response.core.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"code\": \"404\",\n              \"description\": \"User not found\",\n              \"examples\": null,\n              \"parameters\": {\n                \"_model\": {\n                  \"name\": \"parameter-container.core.models\",\n                  \"version\": \"0.1.0\"\n                },\n                \"headers\": {\n                  \"Content-Type-header\": {\n                    \"_model\": {\n                      \"name\": \"parameter.core.models\",\n                      \"version\": \"0.1.0\"\n                    },\n                    \"in\": \"headers\",\n                    \"usedIn\": \"response\",\n                    \"uuid\": \"Content-Type-header\",\n                    \"key\": \"Content-Type\",\n                    \"name\": \"Content Type Header\",\n                    \"description\": \"describes the media type of the response\",\n                    \"examples\": [],\n                    \"type\": \"string\",\n                    \"format\": null,\n                    \"default\": null,\n                    \"required\": true,\n                    \"superType\": null,\n                    \"value\": null,\n                    \"constraints\": [\n                      {\n                        \"_model\": {\n                          \"name\": \"enum.constraint.models\",\n                          \"version\": \"0.1.0\"\n                        },\n                        \"name\": \"enum\",\n                        \"value\": [\n                          \"application/json\",\n                          \"application/xml\"\n                        ]\n                      }\n                    ],\n                    \"applicableContexts\": [],\n                    \"interfaces\": {}\n                  }\n                },\n                \"queries\": {},\n                \"body\": {},\n                \"path\": {}\n              },\n              \"contexts\": [],\n              \"interfaces\": {}\n            }\n          },\n          \"timeout\": null,\n          \"tags\": [],\n          \"interfaces\": {\n            \"user\": {\n              \"_model\": {\n                \"name\": \"interface.models\",\n                \"version\": \"0.1.0\"\n              },\n              \"name\": \"user\",\n              \"uuid\": \"user\",\n              \"level\": \"request\",\n              \"required\": false,\n              \"description\": null,\n              \"underlay\": null\n            }\n          }\n        }\n      },\n      \"description\": null,\n      \"interfaces\": {}\n    }\n  },\n  \"group\": {\n    \"_model\": {\n      \"name\": \"group.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"id\": null,\n    \"name\": null,\n    \"description\": \"All the requests\",\n    \"children\": {\n      \"/pets\": \"/pets\",\n      \"/pets/findByStatus\": \"/pets/findByStatus\",\n      \"/pets/findByTags\": \"/pets/findByTags\",\n      \"/pets/{petId}\": \"/pets/{petId}\",\n      \"/stores/order\": \"/stores/order\",\n      \"/stores/order/{orderId}\": \"/stores/order/{orderId}\",\n      \"/users\": \"/users\",\n      \"/users/createWithArray\": \"/users/createWithArray\",\n      \"/users/createWithList\": \"/users/createWithList\",\n      \"/users/login\": \"/users/login\",\n      \"/users/logout\": \"/users/logout\",\n      \"/users/{username}\": \"/users/{username}\"\n    }\n  },\n  \"store\": {\n    \"_model\": {\n      \"name\": \"store.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"variable\": {},\n    \"constraint\": {\n      \"User\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"firstName\": {\n              \"type\": \"string\"\n            },\n            \"pet\": {\n              \"$ref\": \"#/definitions/Pet\"\n            },\n            \"lastName\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"phone\": {\n              \"type\": \"string\"\n            },\n            \"userStatus\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\",\n              \"description\": \"User Status\"\n            }\n          }\n        }\n      },\n      \"Category\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Pet\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"required\": [\n            \"name\",\n            \"photoUrls\"\n          ],\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"category\": {\n              \"$ref\": \"#/definitions/Category\"\n            },\n            \"name\": {\n              \"type\": \"string\",\n              \"example\": \"doggie\"\n            },\n            \"owner\": {\n              \"$ref\": \"#/definitions/User\"\n            },\n            \"photoUrls\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"type\": \"string\"\n              }\n            },\n            \"tags\": {\n              \"type\": \"array\",\n              \"items\": {\n                \"$ref\": \"#/definitions/Tag\"\n              }\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"pet status in the store\"\n            }\n          }\n        }\n      },\n      \"Tag\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"name\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      },\n      \"Order\": {\n        \"_model\": {\n          \"name\": \"json.constraint.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"json\",\n        \"value\": {\n          \"properties\": {\n            \"id\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"petId\": {\n              \"type\": \"integer\",\n              \"format\": \"int64\"\n            },\n            \"quantity\": {\n              \"type\": \"integer\",\n              \"format\": \"int32\"\n            },\n            \"shipDate\": {\n              \"type\": \"string\",\n              \"format\": \"date-time\"\n            },\n            \"status\": {\n              \"type\": \"string\",\n              \"description\": \"Order Status\"\n            },\n            \"complete\": {\n              \"type\": \"boolean\"\n            }\n          }\n        }\n      }\n    },\n    \"endpoint\": {\n      \"base\": {\n        \"_model\": {\n          \"name\": \"url.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"uuid\": \"base\",\n        \"protocol\": [\n          \"http:\",\n          \"https:\"\n        ],\n        \"slashes\": true,\n        \"auth\": null,\n        \"host\": \"petstore.swagger.wordnik.com\",\n        \"port\": null,\n        \"hostname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"hostname\",\n          \"string\": \"petstore.swagger.wordnik.com\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"hostname\",\n            \"name\": \"hostname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"petstore.swagger.wordnik.com\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"href\": \"http://petstore.swagger.wordnik.com/v2\",\n        \"path\": \"/v2\",\n        \"pathname\": {\n          \"_model\": {\n            \"name\": \"url-component.models\",\n            \"version\": \"0.1.0\"\n          },\n          \"componentName\": \"pathname\",\n          \"string\": \"/v2\",\n          \"parameter\": {\n            \"_model\": {\n              \"name\": \"parameter.core.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"in\": null,\n            \"usedIn\": \"request\",\n            \"uuid\": null,\n            \"key\": \"pathname\",\n            \"name\": \"pathname\",\n            \"description\": null,\n            \"examples\": [],\n            \"type\": \"string\",\n            \"format\": null,\n            \"default\": \"/v2\",\n            \"required\": false,\n            \"superType\": null,\n            \"value\": null,\n            \"constraints\": [],\n            \"applicableContexts\": [],\n            \"interfaces\": {}\n          },\n          \"variableDelimiters\": [\n            \"{\",\n            \"}\"\n          ]\n        },\n        \"query\": null,\n        \"search\": null,\n        \"hash\": null,\n        \"secure\": true,\n        \"variableDelimiters\": [\n          \"{\",\n          \"}\"\n        ]\n      }\n    },\n    \"parameter\": {\n      \"globalConsumes\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"request\",\n        \"uuid\": \"globalConsumes\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the request\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/json\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiRequestMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiRequestMediaType\",\n            \"overlay\": null\n          }\n        }\n      },\n      \"globalProduces\": {\n        \"_model\": {\n          \"name\": \"parameter.core.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"in\": \"headers\",\n        \"usedIn\": \"response\",\n        \"uuid\": \"globalProduces\",\n        \"key\": \"Content-Type\",\n        \"name\": \"Content Type Header\",\n        \"description\": \"describes the media type of the response\",\n        \"examples\": [],\n        \"type\": \"string\",\n        \"format\": null,\n        \"default\": null,\n        \"required\": true,\n        \"superType\": null,\n        \"value\": null,\n        \"constraints\": [\n          {\n            \"_model\": {\n              \"name\": \"enum.constraint.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"name\": \"enum\",\n            \"value\": [\n              \"application/xml\"\n            ]\n          }\n        ],\n        \"applicableContexts\": [],\n        \"interfaces\": {\n          \"apiResponseMediaType\": {\n            \"_model\": {\n              \"name\": \"reference.models\",\n              \"version\": \"0.1.0\"\n            },\n            \"type\": \"interface\",\n            \"uuid\": \"apiResponseMediaType\",\n            \"overlay\": null\n          }\n        }\n      }\n    },\n    \"response\": {},\n    \"auth\": {\n      \"api_key\": {\n        \"_model\": {\n          \"name\": \"api-key.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": null,\n        \"authName\": \"api_key\",\n        \"name\": \"api_key\",\n        \"in\": \"header\",\n        \"key\": null\n      },\n      \"petstore_auth\": {\n        \"_model\": {\n          \"name\": \"oauth-2.auth.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"description\": \"the authentication method for the Petstore API\",\n        \"authName\": \"petstore_auth\",\n        \"flow\": \"implicit\",\n        \"authorizationUrl\": \"http://petstore.swagger.wordnik.com/api/oauth/dialog\",\n        \"tokenUrl\": null,\n        \"scopes\": [\n          {\n            \"key\": \"write_pets\",\n            \"value\": \"modify pets in your account\"\n          },\n          {\n            \"key\": \"read_pets\",\n            \"value\": \"read your pets\"\n          }\n        ]\n      }\n    },\n    \"interface\": {\n      \"apiRequestMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiRequestMediaType\",\n        \"uuid\": \"apiRequestMediaType\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": \"defines the common media type of requests in the API.\",\n        \"underlay\": null\n      },\n      \"apiResponseMediaType\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"apiResponseMediaType\",\n        \"uuid\": \"apiResponseMediaType\",\n        \"level\": \"response\",\n        \"required\": false,\n        \"description\": \"defines the common media type of responses in the API.\",\n        \"underlay\": null\n      },\n      \"pet\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"pet\",\n        \"uuid\": \"pet\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"store\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"store\",\n        \"uuid\": \"store\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      },\n      \"user\": {\n        \"_model\": {\n          \"name\": \"interface.models\",\n          \"version\": \"0.1.0\"\n        },\n        \"name\": \"user\",\n        \"uuid\": \"user\",\n        \"level\": \"request\",\n        \"required\": false,\n        \"description\": null,\n        \"underlay\": null\n      }\n    }\n  },\n  \"info\": {\n    \"_model\": {\n      \"name\": \"info.utils.models\",\n      \"version\": \"0.1.0\"\n    },\n    \"title\": \"Swagger Petstore\",\n    \"description\": \"This is a sample server Petstore server.\\n\\n[Learn about Swagger](http://swagger.wordnik.com) or join the IRC channel `#swagger` on irc.freenode.net.\\n\\nFor this sample, you can use the api key `special-key` to test the authorization filters\\n\",\n    \"tos\": \"http://helloreverb.com/terms/\",\n    \"contact\": {\n      \"_model\": {\n        \"name\": \"contact.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"apiteam@wordnik.com\",\n      \"url\": null,\n      \"email\": null\n    },\n    \"license\": {\n      \"_model\": {\n        \"name\": \"license.utils.models\",\n        \"version\": \"0.1.0\"\n      },\n      \"name\": \"Apache 2.0\",\n      \"url\": \"http://www.apache.org/licenses/LICENSE-2.0.html\"\n    },\n    \"version\": \"1.0.0\"\n  }\n}"
  },
  {
    "path": "testing/e2e-runner.js",
    "content": "import Mocha from 'mocha'\nimport chokidar from 'chokidar'\nimport path from 'path'\n\nconst configPath = path.join(__dirname, '../src/api-flow-config.js')\n\nconst Module = require('module')\nconst realResolve = Module._resolveFilename\nModule._resolveFilename = (request, parent) => {\n  if (request === 'api-flow-config') {\n    return configPath\n  }\n  const resolved = realResolve(request, parent)\n  return resolved\n}\n// Let's import and globalize testing tools so\n// there's no need to require them in each test\n\n// Environment setup (used by Babel as well, see .babelrc)\nprocess.env.NODE_ENV = 'test'\n\n\n/**\n * A helper function to run Mocha tests. Since Mocha doesn't support changing\n * tested files dynamically (except for adding), we need to clear require's\n * cache on every run and instantiate a new runner.\n */\nconst fileList = []\nfunction runSuite() {\n  Object.keys(require.cache).forEach(key => delete require.cache[key])\n  const mocha = new Mocha({ reporter: 'spec' })\n  fileList.forEach(filepath => mocha.addFile(filepath))\n  try {\n    mocha.run()\n    global.gc()\n  }\n  catch (e) {\n    /* eslint-disable no-console */\n    console.log('------------')\n    console.log('Failed with Error', e)\n    console.log('------------')\n    /* eslint-enable no-console */\n  }\n}\n\n/**\n * Chokidar watches all the files for any kind of change and calls the run function\n * from above. Read more: https://github.com/paulmillr/chokidar\n * @param  {string} a glob of files to watch\n * @param  {object} settings\n */\nchokidar.watch('testing/e2e/**/*.spec.js', { persistent: true })\n  .on('add', $path => fileList.push($path))\n  .on('change', () => runSuite())\n  .on('ready', () => runSuite())\n\nchokidar.watch('src/**/*.js', {\n  ignored: /\\.spec\\.js/,\n  persistent: true\n})\n  .on('change', () => runSuite())\n"
  },
  {
    "path": "testing/mocha-runner.js",
    "content": "import Mocha from 'mocha'\nimport chokidar from 'chokidar'\n\n// Let's import and globalize testing tools so\n// there's no need to require them in each test\n\n// Environment setup (used by Babel as well, see .babelrc)\nprocess.env.NODE_ENV = 'test'\n\n\n/**\n * A helper function to run Mocha tests. Since Mocha doesn't support changing\n * tested files dynamically (except for adding), we need to clear require's\n * cache on every run and instantiate a new runner.\n */\nconst fileList = []\nfunction runSuite() {\n  Object.keys(require.cache).forEach(key => delete require.cache[key])\n  const mocha = new Mocha({ reporter: 'spec' })\n  fileList.forEach(filepath => mocha.addFile(filepath))\n  try {\n    mocha.run()\n    if (global.gc) {\n      global.gc()\n    }\n    else {\n      /* eslint-disable no-console */\n      console.log('Garbage collection unavailable')\n      /* eslint-enable no-console */\n    }\n  }\n  catch (e) {\n    /* eslint-disable no-console */\n    console.log('------------')\n    console.log('Failed with Error', e.stack)\n    console.log('------------')\n    /* eslint-enable no-console */\n  }\n}\n\nconst blob = process.env.BLOB || 'src/**/*.spec.js'\n\n/**\n * Chokidar watches all the files for any kind of change and calls the run function\n * from above. Read more: https://github.com/paulmillr/chokidar\n * @param {string} glob: a glob of files to watch\n * @param {object} settings\n */\nchokidar.watch(blob, { persistent: true })\n  .on('add', path => fileList.push(path))\n  .on('change', () => runSuite())\n  .on('ready', () => runSuite())\n\nchokidar.watch('src/**/*.js', {\n  ignored: /\\.spec\\.js/,\n  persistent: true\n})\n  .on('change', () => runSuite())\n"
  },
  {
    "path": "testing/test-require-patch.js",
    "content": "import path from 'path'\n\nconst configPath = path.join(__dirname, '../src/api-flow-config.js')\n\nconst Module = require('module')\nconst realResolve = Module._resolveFilename\nModule._resolveFilename = (request, parent) => {\n  if (request === 'api-flow-config') {\n    return configPath\n  }\n  const resolved = realResolve(request, parent)\n  return resolved\n}\n"
  },
  {
    "path": "webpack.config.babel.js",
    "content": "import path from 'path'\n\nconst name = 'api-flow'\n\nconst production = process.env.NODE_ENV === 'production' // eslint-disable-line\n\nconst target = process.env.TARGET_ENV\n\nconst config = {\n  target: target,\n  entry: [\n    './src/runners/flow-' + target + '.js'\n  ],\n  output: {\n    path: path.join(__dirname,\n            './dist/' + target + '/'\n        ),\n    pathInfo: true,\n    publicPath: '/build/' + target + '/',\n    filename: name + '.js',\n    libraryTarget: 'umd'\n  },\n  module: {\n    loaders: [\n      {\n        loader: 'babel-loader',\n        include: [\n          path.resolve(__dirname, 'src')\n        ],\n        test: /\\.jsx?$/\n      },\n      {\n        loader: 'json-loader',\n        include: [\n          __dirname\n        ],\n        test: /\\.json$/\n      }\n    ],\n    noParse: /node_modules\\/json-schema\\/lib\\/validate\\.js/\n  },\n  node: {\n    fs: target === 'node' ? false : 'empty',\n    request: target === 'node' ? false : 'empty',\n    net: target === 'node' ? false : 'empty',\n    tls: target === 'node' ? false : 'empty'\n  }\n}\nmodule.exports = config\n"
  }
]