├── .eslintrc.json ├── .github └── workflows │ ├── codeql-analysis.yml │ ├── main.yml │ └── release.yml ├── .gitignore ├── .mocharc.js ├── .snyk ├── CHANGELOG.md ├── LICENSE ├── README.md ├── package.json ├── src ├── customKeywords │ ├── contentTypeValidation.js │ └── files.js ├── data_structures │ └── tree.js ├── index.js ├── parsers │ ├── open-api2.js │ └── open-api3.js ├── utils │ ├── ajv-utils.js │ ├── common.js │ ├── createContentTypeHeaders.js │ ├── fileLoaders.js │ ├── schema-preprocessor.js │ ├── schemaLoaders.js │ ├── schemaUtils.js │ ├── schemaValidators.js │ └── sourceResolver.js └── validators │ ├── DiscriminatorValidator.js │ ├── OneOfValidator.js │ ├── ResponseValidator.js │ ├── SimpleValidator.js │ ├── Validator.js │ ├── formatValidators.js │ ├── index.js │ └── validator-utils.js └── test ├── .eslintrc.json ├── openapi2 ├── general │ ├── options-test.js │ ├── pet-store-basepath.yaml │ └── pet-store-swagger.yaml ├── request │ ├── request-oas2-test.js │ └── yaml │ │ ├── custom-keywords-swagger.yaml │ │ ├── form-data-swagger.yaml │ │ ├── pet-store-swagger-formats.yaml │ │ ├── pet-store-swagger-inheritance.yaml │ │ ├── pet-store-swagger-with-base-path.yaml │ │ └── pet-store-swagger.yaml ├── response │ ├── response-oas2-test.js │ └── yaml │ │ ├── custom-keywords-response.yaml │ │ ├── pet-store-swagger-formats.yaml │ │ ├── pets-response-inheritance.yaml │ │ ├── pets-response-with-base-path.yaml │ │ └── pets-response.yaml └── utils │ └── schemaWrapper.js ├── openapi3 ├── general │ ├── external-ref │ │ ├── file-refs-paths-users.yaml │ │ ├── file-refs-paths.test.js │ │ ├── file-refs-paths.yaml │ │ ├── file-refs-permissions.json │ │ ├── file-refs-user.yaml │ │ ├── file-refs.test.js │ │ └── file-refs.yaml │ ├── formats-custom.yaml │ ├── formats.test.js │ ├── formats.yaml │ ├── general-oai3-test.js │ ├── nullable.test.js │ ├── nullable.yaml │ ├── pets-custom-content-type.yaml │ ├── pets-discriminator-allOf.yaml │ ├── pets-general-empty-servers.yaml │ ├── pets-general-no-servers.yaml │ ├── pets-general-relative-paths-too.yaml │ ├── pets-general.yaml │ ├── readOnlyWriteOnly.test.js │ └── readOnlyWriteOnly.yaml ├── request │ ├── pets-request.yaml │ └── request-oai3-test.js └── response │ ├── pets-response.yaml │ └── response-oai3-tests.js └── utils ├── schemaUtils-test.js └── specs └── openApi3SpecInvalid.yaml /.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.eslintrc.json -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.github/workflows/codeql-analysis.yml -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.github/workflows/main.yml -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.github/workflows/release.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.gitignore -------------------------------------------------------------------------------- /.mocharc.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.mocharc.js -------------------------------------------------------------------------------- /.snyk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/.snyk -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/README.md -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/package.json -------------------------------------------------------------------------------- /src/customKeywords/contentTypeValidation.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/customKeywords/contentTypeValidation.js -------------------------------------------------------------------------------- /src/customKeywords/files.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/customKeywords/files.js -------------------------------------------------------------------------------- /src/data_structures/tree.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/data_structures/tree.js -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/index.js -------------------------------------------------------------------------------- /src/parsers/open-api2.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/parsers/open-api2.js -------------------------------------------------------------------------------- /src/parsers/open-api3.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/parsers/open-api3.js -------------------------------------------------------------------------------- /src/utils/ajv-utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/ajv-utils.js -------------------------------------------------------------------------------- /src/utils/common.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/common.js -------------------------------------------------------------------------------- /src/utils/createContentTypeHeaders.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/createContentTypeHeaders.js -------------------------------------------------------------------------------- /src/utils/fileLoaders.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/fileLoaders.js -------------------------------------------------------------------------------- /src/utils/schema-preprocessor.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/schema-preprocessor.js -------------------------------------------------------------------------------- /src/utils/schemaLoaders.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/schemaLoaders.js -------------------------------------------------------------------------------- /src/utils/schemaUtils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/schemaUtils.js -------------------------------------------------------------------------------- /src/utils/schemaValidators.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/schemaValidators.js -------------------------------------------------------------------------------- /src/utils/sourceResolver.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/utils/sourceResolver.js -------------------------------------------------------------------------------- /src/validators/DiscriminatorValidator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/DiscriminatorValidator.js -------------------------------------------------------------------------------- /src/validators/OneOfValidator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/OneOfValidator.js -------------------------------------------------------------------------------- /src/validators/ResponseValidator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/ResponseValidator.js -------------------------------------------------------------------------------- /src/validators/SimpleValidator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/SimpleValidator.js -------------------------------------------------------------------------------- /src/validators/Validator.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/Validator.js -------------------------------------------------------------------------------- /src/validators/formatValidators.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/formatValidators.js -------------------------------------------------------------------------------- /src/validators/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/index.js -------------------------------------------------------------------------------- /src/validators/validator-utils.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/src/validators/validator-utils.js -------------------------------------------------------------------------------- /test/.eslintrc.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/.eslintrc.json -------------------------------------------------------------------------------- /test/openapi2/general/options-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/general/options-test.js -------------------------------------------------------------------------------- /test/openapi2/general/pet-store-basepath.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/general/pet-store-basepath.yaml -------------------------------------------------------------------------------- /test/openapi2/general/pet-store-swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/general/pet-store-swagger.yaml -------------------------------------------------------------------------------- /test/openapi2/request/request-oas2-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/request-oas2-test.js -------------------------------------------------------------------------------- /test/openapi2/request/yaml/custom-keywords-swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/custom-keywords-swagger.yaml -------------------------------------------------------------------------------- /test/openapi2/request/yaml/form-data-swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/form-data-swagger.yaml -------------------------------------------------------------------------------- /test/openapi2/request/yaml/pet-store-swagger-formats.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/pet-store-swagger-formats.yaml -------------------------------------------------------------------------------- /test/openapi2/request/yaml/pet-store-swagger-inheritance.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/pet-store-swagger-inheritance.yaml -------------------------------------------------------------------------------- /test/openapi2/request/yaml/pet-store-swagger-with-base-path.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/pet-store-swagger-with-base-path.yaml -------------------------------------------------------------------------------- /test/openapi2/request/yaml/pet-store-swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/request/yaml/pet-store-swagger.yaml -------------------------------------------------------------------------------- /test/openapi2/response/response-oas2-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/response-oas2-test.js -------------------------------------------------------------------------------- /test/openapi2/response/yaml/custom-keywords-response.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/yaml/custom-keywords-response.yaml -------------------------------------------------------------------------------- /test/openapi2/response/yaml/pet-store-swagger-formats.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/yaml/pet-store-swagger-formats.yaml -------------------------------------------------------------------------------- /test/openapi2/response/yaml/pets-response-inheritance.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/yaml/pets-response-inheritance.yaml -------------------------------------------------------------------------------- /test/openapi2/response/yaml/pets-response-with-base-path.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/yaml/pets-response-with-base-path.yaml -------------------------------------------------------------------------------- /test/openapi2/response/yaml/pets-response.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/response/yaml/pets-response.yaml -------------------------------------------------------------------------------- /test/openapi2/utils/schemaWrapper.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi2/utils/schemaWrapper.js -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs-paths-users.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs-paths-users.yaml -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs-paths.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs-paths.test.js -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs-paths.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs-paths.yaml -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs-permissions.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs-permissions.json -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs-user.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs-user.yaml -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs.test.js -------------------------------------------------------------------------------- /test/openapi3/general/external-ref/file-refs.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/external-ref/file-refs.yaml -------------------------------------------------------------------------------- /test/openapi3/general/formats-custom.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/formats-custom.yaml -------------------------------------------------------------------------------- /test/openapi3/general/formats.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/formats.test.js -------------------------------------------------------------------------------- /test/openapi3/general/formats.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/formats.yaml -------------------------------------------------------------------------------- /test/openapi3/general/general-oai3-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/general-oai3-test.js -------------------------------------------------------------------------------- /test/openapi3/general/nullable.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/nullable.test.js -------------------------------------------------------------------------------- /test/openapi3/general/nullable.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/nullable.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-custom-content-type.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-custom-content-type.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-discriminator-allOf.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-discriminator-allOf.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-general-empty-servers.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-general-empty-servers.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-general-no-servers.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-general-no-servers.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-general-relative-paths-too.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-general-relative-paths-too.yaml -------------------------------------------------------------------------------- /test/openapi3/general/pets-general.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/pets-general.yaml -------------------------------------------------------------------------------- /test/openapi3/general/readOnlyWriteOnly.test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/readOnlyWriteOnly.test.js -------------------------------------------------------------------------------- /test/openapi3/general/readOnlyWriteOnly.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/general/readOnlyWriteOnly.yaml -------------------------------------------------------------------------------- /test/openapi3/request/pets-request.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/request/pets-request.yaml -------------------------------------------------------------------------------- /test/openapi3/request/request-oai3-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/request/request-oai3-test.js -------------------------------------------------------------------------------- /test/openapi3/response/pets-response.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/response/pets-response.yaml -------------------------------------------------------------------------------- /test/openapi3/response/response-oai3-tests.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/openapi3/response/response-oai3-tests.js -------------------------------------------------------------------------------- /test/utils/schemaUtils-test.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/utils/schemaUtils-test.js -------------------------------------------------------------------------------- /test/utils/specs/openApi3SpecInvalid.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/PayU/api-schema-builder/HEAD/test/utils/specs/openApi3SpecInvalid.yaml --------------------------------------------------------------------------------