{"id":15091458,"url":"https://github.com/readmeio/jest-expect-openapi","last_synced_at":"2025-04-12T06:31:33.436Z","repository":{"id":218137937,"uuid":"745705607","full_name":"readmeio/jest-expect-openapi","owner":"readmeio","description":"Jest/Vitest matcher for asserting valid OpenAPI definitions","archived":true,"fork":false,"pushed_at":"2025-03-04T21:29:59.000Z","size":575,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-03-26T01:51:13.663Z","etag":null,"topics":["jest","oas","openapi","vitest"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/readmeio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-19T23:11:18.000Z","updated_at":"2025-03-04T21:30:16.000Z","dependencies_parsed_at":"2024-08-01T18:30:22.640Z","dependency_job_id":"9e83450e-a407-494a-990a-54271157f0e0","html_url":"https://github.com/readmeio/jest-expect-openapi","commit_stats":{"total_commits":19,"total_committers":3,"mean_commits":6.333333333333333,"dds":"0.21052631578947367","last_synced_commit":"97e5ad13a89421cb7d4061fef307967c65984c1e"},"previous_names":["readmeio/jest-expect-openapi"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readmeio%2Fjest-expect-openapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readmeio%2Fjest-expect-openapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readmeio%2Fjest-expect-openapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/readmeio%2Fjest-expect-openapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/readmeio","download_url":"https://codeload.github.com/readmeio/jest-expect-openapi/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529575,"owners_count":21119534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jest","oas","openapi","vitest"],"created_at":"2024-09-25T10:41:13.047Z","updated_at":"2025-04-12T06:31:28.397Z","avatar_url":"https://github.com/readmeio.png","language":"TypeScript","readme":"# jest-expect-openapi\n\nA [Jest](https://jestjs.io/) custom matcher for asserting valid [OpenAPI](https://en.wikipedia.org/wiki/OpenAPI_Specification) definitions. Also supports [Vitest](https://vitest.dev/).\n\n[![npm](https://img.shields.io/npm/v/jest-expect-openapi)](https://npm.im/jest-expect-openapi) [![Build](https://github.com/readmeio/jest-expect-openapi/workflows/CI/badge.svg)](https://github.com/readmeio/jest-expect-openapi)\n\n\u003ca href=\"https://readme.com\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/readmeio/.github/main/oss-header-dark.png\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://raw.githubusercontent.com/readmeio/.github/main/oss-header.png\"\u003e\n  \u003cimg alt=\"ReadMe Open Source\" src=\"https://raw.githubusercontent.com/readmeio/.github/main/oss-header.png\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n## Installation\n\n```sh\nnpm install jest-expect-openapi --save-dev\n```\n\n## Usage\n\n```js\nimport toBeAValidOpenAPIDefinition from 'jest-expect-openapi';\n\nexpect.extend({ toBeAValidOpenAPIDefinition });\n\ntest('should be a valid OpenAPI definition', () =\u003e {\n  expect(oas).toBeAValidOpenAPIDefinition();\n});\n\ntest('should not be a valid OpenAPI definition', () =\u003e {\n  expect(invalidOas).not.toBeAValidOpenAPIDefinition();\n});\n```\n\nThe usage is nearly identical in Vitest:\n\n```js\nimport toBeAValidOpenAPIDefinition from 'jest-expect-openapi';\nimport { expect, test } from 'vitest';\n\nexpect.extend({ toBeAValidOpenAPIDefinition });\n\ntest('should be a valid OpenAPI definition', () =\u003e {\n  expect(oas).toBeAValidOpenAPIDefinition();\n});\n\ntest('should not be a valid OpenAPI definition', () =\u003e {\n  expect(invalidOas).not.toBeAValidOpenAPIDefinition();\n});\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadmeio%2Fjest-expect-openapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freadmeio%2Fjest-expect-openapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freadmeio%2Fjest-expect-openapi/lists"}