├── .dockerignore ├── .eslintignore ├── .eslintrc.js ├── .github └── workflows │ ├── build.yml │ └── publish.yml ├── .gitignore ├── .husky └── pre-commit ├── .lintstagedrc.js ├── .nvmrc ├── .nycrc ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── docs └── README.md ├── lib ├── components │ ├── components.js │ ├── index.js │ ├── parameters │ │ └── structs.js │ ├── parser.js │ ├── responses │ │ └── structs.js │ ├── schemas │ │ └── structs.js │ ├── security-schemes │ │ └── structs.js │ └── structs.js ├── errors │ ├── cli-error-codes.js │ ├── openapi-schema-invalid-error.js │ ├── openapi-schema-malformed-error.js │ ├── openapi-schema-not-found-error.js │ └── parser-error.js ├── external-documentation │ ├── external-documentation.js │ ├── index.js │ ├── parser.js │ └── structs.js ├── info │ ├── index.js │ ├── info.js │ ├── parser.js │ └── structs.js ├── mocker │ └── express │ │ ├── request-handler.js │ │ └── server.js ├── open-api-mocker-cli.js ├── open-api-mocker.js ├── openapi │ ├── index.js │ ├── openapi.js │ ├── parser.js │ └── structs.js ├── paths │ ├── index.js │ ├── parser.js │ ├── path.js │ └── structs.js ├── response-generator │ └── index.js ├── schema-loaders │ ├── explicit-loader.js │ └── local-loader.js ├── schema-validator │ └── index.js ├── security-requirement │ ├── index.js │ ├── parser.js │ ├── security-requirement.js │ └── structs.js ├── servers │ ├── index.js │ ├── parser.js │ ├── server.js │ └── structs.js ├── structs │ └── reference.js ├── tags │ ├── index.js │ ├── parser.js │ ├── structs.js │ └── tag.js └── utils │ ├── enhance-struct-validation-error.js │ ├── extract-extensions.js │ ├── get-faker-locale.js │ ├── http-methods.js │ └── options-builder.js ├── nodemon.json ├── package.json └── tests ├── bootstrap.js ├── components ├── components.js ├── parameters-common.js ├── parameters-cookie.js ├── parameters-header.js ├── parameters-path.js ├── parameters-query.js ├── responses.js ├── security-schemes-api-key.js ├── security-schemes-common.js ├── security-schemes-http.js ├── security-schemes-oauth2.js └── security-schemes-open-id.js ├── errors └── errors.js ├── external-documentation └── external-documentation.js ├── info └── info.js ├── mocker └── express │ └── server.js ├── open-api-mocker.js ├── openapi └── openapi.js ├── paths └── path.js ├── resources └── pet-store.yml ├── response-generator └── index.js ├── schema-loaders └── local-loader.js ├── security-requirement └── security-requirement.js ├── servers └── servers.js ├── tags └── tags.js └── utils └── get-faker-locale.js /.dockerignore: -------------------------------------------------------------------------------- 1 | **/* -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.eslintrc.js -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/publish.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.github/workflows/publish.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.gitignore -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | npx --no-install lint-staged 4 | -------------------------------------------------------------------------------- /.lintstagedrc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.lintstagedrc.js -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /.nycrc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/.nycrc -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/README.md -------------------------------------------------------------------------------- /docs/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/docs/README.md -------------------------------------------------------------------------------- /lib/components/components.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/components.js -------------------------------------------------------------------------------- /lib/components/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/index.js -------------------------------------------------------------------------------- /lib/components/parameters/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/parameters/structs.js -------------------------------------------------------------------------------- /lib/components/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/parser.js -------------------------------------------------------------------------------- /lib/components/responses/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/responses/structs.js -------------------------------------------------------------------------------- /lib/components/schemas/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/schemas/structs.js -------------------------------------------------------------------------------- /lib/components/security-schemes/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/security-schemes/structs.js -------------------------------------------------------------------------------- /lib/components/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/components/structs.js -------------------------------------------------------------------------------- /lib/errors/cli-error-codes.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/errors/cli-error-codes.js -------------------------------------------------------------------------------- /lib/errors/openapi-schema-invalid-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/errors/openapi-schema-invalid-error.js -------------------------------------------------------------------------------- /lib/errors/openapi-schema-malformed-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/errors/openapi-schema-malformed-error.js -------------------------------------------------------------------------------- /lib/errors/openapi-schema-not-found-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/errors/openapi-schema-not-found-error.js -------------------------------------------------------------------------------- /lib/errors/parser-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/errors/parser-error.js -------------------------------------------------------------------------------- /lib/external-documentation/external-documentation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/external-documentation/external-documentation.js -------------------------------------------------------------------------------- /lib/external-documentation/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/external-documentation/index.js -------------------------------------------------------------------------------- /lib/external-documentation/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/external-documentation/parser.js -------------------------------------------------------------------------------- /lib/external-documentation/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/external-documentation/structs.js -------------------------------------------------------------------------------- /lib/info/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/info/index.js -------------------------------------------------------------------------------- /lib/info/info.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/info/info.js -------------------------------------------------------------------------------- /lib/info/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/info/parser.js -------------------------------------------------------------------------------- /lib/info/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/info/structs.js -------------------------------------------------------------------------------- /lib/mocker/express/request-handler.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/mocker/express/request-handler.js -------------------------------------------------------------------------------- /lib/mocker/express/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/mocker/express/server.js -------------------------------------------------------------------------------- /lib/open-api-mocker-cli.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/open-api-mocker-cli.js -------------------------------------------------------------------------------- /lib/open-api-mocker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/open-api-mocker.js -------------------------------------------------------------------------------- /lib/openapi/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/openapi/index.js -------------------------------------------------------------------------------- /lib/openapi/openapi.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/openapi/openapi.js -------------------------------------------------------------------------------- /lib/openapi/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/openapi/parser.js -------------------------------------------------------------------------------- /lib/openapi/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/openapi/structs.js -------------------------------------------------------------------------------- /lib/paths/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/paths/index.js -------------------------------------------------------------------------------- /lib/paths/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/paths/parser.js -------------------------------------------------------------------------------- /lib/paths/path.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/paths/path.js -------------------------------------------------------------------------------- /lib/paths/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/paths/structs.js -------------------------------------------------------------------------------- /lib/response-generator/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/response-generator/index.js -------------------------------------------------------------------------------- /lib/schema-loaders/explicit-loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/schema-loaders/explicit-loader.js -------------------------------------------------------------------------------- /lib/schema-loaders/local-loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/schema-loaders/local-loader.js -------------------------------------------------------------------------------- /lib/schema-validator/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/schema-validator/index.js -------------------------------------------------------------------------------- /lib/security-requirement/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/security-requirement/index.js -------------------------------------------------------------------------------- /lib/security-requirement/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/security-requirement/parser.js -------------------------------------------------------------------------------- /lib/security-requirement/security-requirement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/security-requirement/security-requirement.js -------------------------------------------------------------------------------- /lib/security-requirement/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/security-requirement/structs.js -------------------------------------------------------------------------------- /lib/servers/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/servers/index.js -------------------------------------------------------------------------------- /lib/servers/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/servers/parser.js -------------------------------------------------------------------------------- /lib/servers/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/servers/server.js -------------------------------------------------------------------------------- /lib/servers/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/servers/structs.js -------------------------------------------------------------------------------- /lib/structs/reference.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/structs/reference.js -------------------------------------------------------------------------------- /lib/tags/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/tags/index.js -------------------------------------------------------------------------------- /lib/tags/parser.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/tags/parser.js -------------------------------------------------------------------------------- /lib/tags/structs.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/tags/structs.js -------------------------------------------------------------------------------- /lib/tags/tag.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/tags/tag.js -------------------------------------------------------------------------------- /lib/utils/enhance-struct-validation-error.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/utils/enhance-struct-validation-error.js -------------------------------------------------------------------------------- /lib/utils/extract-extensions.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/utils/extract-extensions.js -------------------------------------------------------------------------------- /lib/utils/get-faker-locale.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/utils/get-faker-locale.js -------------------------------------------------------------------------------- /lib/utils/http-methods.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/utils/http-methods.js -------------------------------------------------------------------------------- /lib/utils/options-builder.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/lib/utils/options-builder.js -------------------------------------------------------------------------------- /nodemon.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/nodemon.json -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/package.json -------------------------------------------------------------------------------- /tests/bootstrap.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/bootstrap.js -------------------------------------------------------------------------------- /tests/components/components.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/components.js -------------------------------------------------------------------------------- /tests/components/parameters-common.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/parameters-common.js -------------------------------------------------------------------------------- /tests/components/parameters-cookie.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/parameters-cookie.js -------------------------------------------------------------------------------- /tests/components/parameters-header.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/parameters-header.js -------------------------------------------------------------------------------- /tests/components/parameters-path.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/parameters-path.js -------------------------------------------------------------------------------- /tests/components/parameters-query.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/parameters-query.js -------------------------------------------------------------------------------- /tests/components/responses.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/responses.js -------------------------------------------------------------------------------- /tests/components/security-schemes-api-key.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/security-schemes-api-key.js -------------------------------------------------------------------------------- /tests/components/security-schemes-common.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/security-schemes-common.js -------------------------------------------------------------------------------- /tests/components/security-schemes-http.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/security-schemes-http.js -------------------------------------------------------------------------------- /tests/components/security-schemes-oauth2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/security-schemes-oauth2.js -------------------------------------------------------------------------------- /tests/components/security-schemes-open-id.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/components/security-schemes-open-id.js -------------------------------------------------------------------------------- /tests/errors/errors.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/errors/errors.js -------------------------------------------------------------------------------- /tests/external-documentation/external-documentation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/external-documentation/external-documentation.js -------------------------------------------------------------------------------- /tests/info/info.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/info/info.js -------------------------------------------------------------------------------- /tests/mocker/express/server.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/mocker/express/server.js -------------------------------------------------------------------------------- /tests/open-api-mocker.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/open-api-mocker.js -------------------------------------------------------------------------------- /tests/openapi/openapi.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/openapi/openapi.js -------------------------------------------------------------------------------- /tests/paths/path.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/paths/path.js -------------------------------------------------------------------------------- /tests/resources/pet-store.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/resources/pet-store.yml -------------------------------------------------------------------------------- /tests/response-generator/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/response-generator/index.js -------------------------------------------------------------------------------- /tests/schema-loaders/local-loader.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/schema-loaders/local-loader.js -------------------------------------------------------------------------------- /tests/security-requirement/security-requirement.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/security-requirement/security-requirement.js -------------------------------------------------------------------------------- /tests/servers/servers.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/servers/servers.js -------------------------------------------------------------------------------- /tests/tags/tags.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/tags/tags.js -------------------------------------------------------------------------------- /tests/utils/get-faker-locale.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jormaechea/open-api-mocker/HEAD/tests/utils/get-faker-locale.js --------------------------------------------------------------------------------