{"id":22197800,"url":"https://github.com/onmax/openapi-graph-core","last_synced_at":"2025-03-24T23:34:11.372Z","repository":{"id":42661448,"uuid":"349407768","full_name":"onmax/openAPI-graph-core","owner":"onmax","description":"A TS library to manage large API projects defined by OpenAPIv3 specification.","archived":false,"fork":false,"pushed_at":"2023-03-05T22:42:32.000Z","size":2485,"stargazers_count":1,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-23T22:21:27.494Z","etag":null,"topics":["graph-structures","openapi3","ts-library"],"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/onmax.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}},"created_at":"2021-03-19T11:59:15.000Z","updated_at":"2022-11-11T03:27:33.000Z","dependencies_parsed_at":"2023-02-18T18:45:21.506Z","dependency_job_id":null,"html_url":"https://github.com/onmax/openAPI-graph-core","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2FopenAPI-graph-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2FopenAPI-graph-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2FopenAPI-graph-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/onmax%2FopenAPI-graph-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/onmax","download_url":"https://codeload.github.com/onmax/openAPI-graph-core/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245372220,"owners_count":20604487,"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":["graph-structures","openapi3","ts-library"],"created_at":"2024-12-02T14:23:47.164Z","updated_at":"2025-03-24T23:34:11.343Z","avatar_url":"https://github.com/onmax.png","language":"TypeScript","readme":"# OpenAPI-graph-core\n\nA TS library to manage large API projects defined by OpenAPIv3 specification.\n\n## Installation\n\nJust run\n\n\u003e npm install openapi-graph-core\n\nand you are good to go.\n\n## CLI\n\nThis `README.md` is only for the API of this library. You can check the cli to run it in the console [here](https://github.com/onmax/openAPI-graph-cli)\n\n## API\n\nOpenAPI-graph provide two major classes that are accesible called: [`OpenAPIGraphs`](#OpenAPIGraphs) and [`Analyzer`](#Analyzer).\n\n### OpenAPIGraphs\n\nThis class will create the graphs of the APIs. You can provide a root path, which will be used to look for the API specifications. For example, a valid root path if we use one of the examples would be:\n\n```javascript\nconst OpenAPIGrahCore = require('openapi-graph-core');\n\n(async () =\u003e {\n    const graphs = await new OpenAPIGrahCore.OpenAPIGraphs('./tests/resources/social-network').build()\n\n    /* It will return \n    \n    {\n        \"social-network.yaml\": { Omitting graph ... },\n        \"./posts/posts.yaml\": { Omitting graph ... },\n        \"./users/users.yaml\": { Omitting graph ... },\n    }\n    */\n})();\n```\n\n### Analyzer\n\nIt will analyze the graphs checking different conditions. You can initiazlie as follows (you need to initialize `OpenAPIGrahps`):\n\n```javascript\nconst OpenAPIGrahCore = require('openapi-graph-core');\n\n(async () =\u003e {\n    const graphs = await new OpenAPIGrahCore.OpenAPIGraphs('./tests/resources/social-network').build()\n    const analyzer = OpenAPIGrahCore.Analyzer(graphs)\n})();\n```\nFor now, these function have been developed:\n\n#### Unused schemas\n\n| Function                          | Description  | Returns  | \n|---|---|---|\n| getUnusedSchemas()                | It will check all the schemas declared but not being used in the components.schemas container  | [JSON](https://github.com/onmax/openapi-graph-types/blob/main/src/model/Analyzer.ts#L6)  |\n| getDeprecatedSchemasBeingUsed()   | It will check all the deprecated schemas declared being in used  | [JSON](https://github.com/onmax/openapi-graph-types/blob/main/src/model/Analyzer.ts#L7)  |\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fopenapi-graph-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fonmax%2Fopenapi-graph-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fonmax%2Fopenapi-graph-core/lists"}