{"id":15091291,"url":"https://github.com/tsapporg/openapi-includer-cli","last_synced_at":"2026-01-05T04:49:44.947Z","repository":{"id":178217074,"uuid":"661517045","full_name":"tsapporg/openapi-includer-cli","owner":"tsapporg","description":"Add $includes keyword support to OpenAPI specs to include files for certain parts of the spec - like paths - which $ref normally does not support.","archived":false,"fork":false,"pushed_at":"2023-11-29T06:42:20.000Z","size":50587,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"aws-sample","last_synced_at":"2025-01-27T10:41:33.972Z","etag":null,"topics":["openapi","openapi-generator","openapi-spec","openapi-specification","openapi-v3"],"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/tsapporg.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","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":"2023-07-03T03:54:14.000Z","updated_at":"2023-07-07T04:03:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"13ff97ff-e4db-417d-a160-8f3c803a2406","html_url":"https://github.com/tsapporg/openapi-includer-cli","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"1bc75ecb3d37563008a36550560238adfdd11ba1"},"previous_names":["tsapporg/openapi-includer-cli"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsapporg%2Fopenapi-includer-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsapporg%2Fopenapi-includer-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsapporg%2Fopenapi-includer-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsapporg%2Fopenapi-includer-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsapporg","download_url":"https://codeload.github.com/tsapporg/openapi-includer-cli/tar.gz/refs/heads/aws-sample","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244945591,"owners_count":20536296,"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":["openapi","openapi-generator","openapi-spec","openapi-specification","openapi-v3"],"created_at":"2024-09-25T10:36:56.822Z","updated_at":"2026-01-05T04:49:44.894Z","avatar_url":"https://github.com/tsapporg.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# openapi-includer-cli\nAdd `$includes` keyword support to OpenAPI specs to include files for certain parts of the spec - like paths - which `$ref` [normally does not support](https://swagger.io/docs/specification/using-ref/).\n\nThis source code is experimental and therefore unpublished on NPM; install directly from Github.\n\nopenapi-includer-cli looks for arrays of `$includes` kewords in your root OpenAPI specification file and generates a single `_api.yaml` file from them with the included content. Define your API in YAML-compliant but not OpenAPI-compliant specs and then use other software that is Open-API compliant to continue from there.\n\n## Background\nYou currently can _not_ set paths outside of your root OpenAPI definition file. Because of this limitation - if you use multiple files to configure your OpenAPI definition - you must define _every_ API path twice (once in the referenced file and once in the root OpenAPI definition file):\n\n    paths:\n\t\t\t/cart:\n\t\t\t\t$ref: ./paths/shop.yaml#/~1cart\n\t\t\t...\n\nThis OpenAPI definition would also fail (it's invalid YAML as well):\n\n    paths:\n\t\t\t$ref: ./paths.shop.yaml\n\t\t\t$ref: ./paths.admin.yaml\n\nThis OpenAPI definition is valid but does not configure your API as you would expect:\n\n    paths:\n\t\t\t- $ref: ./paths.shop.yaml\n\t\t\t- $ref: ./paths.admin.yaml\n\nThis is where this software comes in.\n\n## Configure\nInclude other files in your main OpenAPI definition file:\n\n    paths:\n\t\t\t$includes: \n\t\t\t\t- ./paths.shop.yaml\n\t\t\t\t- ./paths.admin.yaml\n\nDuplicate routes will be klobbered and the last one wins.\n\n## Usage\nFrom a terminal, run:\n\n    npx ts-app-org/openapi-includer-cli \\\n\t\t\t--absolute-input-openapi-def-path=/abs/path/to/api.yaml \\\n\t\t\t--absolute-output-openapi-def-path=/abs/path/to/_api.yaml\n\nThis generates an `_api.yaml` file with the $included content.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsapporg%2Fopenapi-includer-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsapporg%2Fopenapi-includer-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsapporg%2Fopenapi-includer-cli/lists"}