{"id":18484904,"url":"https://github.com/redocly/create-openapi-repo","last_synced_at":"2025-05-15T21:04:21.360Z","repository":{"id":33786510,"uuid":"58973101","full_name":"Redocly/create-openapi-repo","owner":"Redocly","description":"🤖 Generator for GH repo to help you manage the OpenAPI definition lifecycle","archived":false,"fork":false,"pushed_at":"2024-12-17T10:05:35.000Z","size":2000,"stargazers_count":684,"open_issues_count":20,"forks_count":109,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-05-09T05:23:39.911Z","etag":null,"topics":["api-documentation","gh-pages","openapi","openapi3","openapi31","swagger"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/Redocly.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,"zenodo":null}},"created_at":"2016-05-16T22:45:23.000Z","updated_at":"2025-05-01T18:47:16.000Z","dependencies_parsed_at":"2024-04-15T00:41:02.308Z","dependency_job_id":"dc53e7a8-548b-406f-b5db-8a1e8032cdd6","html_url":"https://github.com/Redocly/create-openapi-repo","commit_stats":{"total_commits":137,"total_committers":11,"mean_commits":"12.454545454545455","dds":0.3722627737226277,"last_synced_commit":"161759adcad7088192aa22fb0e85daf21188c025"},"previous_names":["rebilly/generator-openapi-repo"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redocly%2Fcreate-openapi-repo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redocly%2Fcreate-openapi-repo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redocly%2Fcreate-openapi-repo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Redocly%2Fcreate-openapi-repo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Redocly","download_url":"https://codeload.github.com/Redocly/create-openapi-repo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"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":["api-documentation","gh-pages","openapi","openapi3","openapi31","swagger"],"created_at":"2024-11-06T12:43:33.392Z","updated_at":"2025-05-15T21:04:21.334Z","avatar_url":"https://github.com/Redocly.png","language":"JavaScript","readme":"# create-openapi-repo\n\nA tool for generating multi-file OpenAPI definitions.\n\n[![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url]\n\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"./logo.png\" width=\"500px\"/\u003e\n\u003c/p\u003e\n\nNeed to write or contribute to an OpenAPI definition? `create-openapi-repo` can help with that!\n\n## Features\n\n - OpenAPI 3.0 support\n - Split an existing OpenAPI definition into multiple files\n - Bundle a multi-file definition into a single file\n - Validate your OpenAPI definition using our free [openapi-cli tool](https://github.com/redocly/openapi-cli)\n - Automate deployment of your API reference docs using CI/CD workflows\n - Maintain code samples as separate files\n - Live editing in your editor of choice :heart_eyes:\n\n## Examples\n- [Rebilly](https://github.com/Rebilly/RebillyAPI)\n- [Thingful](https://github.com/thingful/openapi-spec)\n\n## Prerequisites\n\nBefore you begin, make sure you have the following prerequisites:\n\n - [Node.js](https://nodejs.org/)\n - [Github repository](https://help.github.com/articles/create-a-repo/#create-a-new-repository-on-github) (new OpenAPI definitions only)\n\n## Installation\n\n1. Navigate to the location where you want to create the repository.\n2. Run one of the following commands:\n   - Install `create-openapi-repo` globally:\n\n        ```bash\n        npm install -g create-openapi-repo\n        ```\n\n   - Install `create-openapi-repo` using [`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b):\n\n        ```bash\n        npx create-openapi-repo\n        ```\n\n3. Follow the [interactive prompts](https://github.com/Redocly/create-openapi-repo#usage) to complete the installation.\n\n### Upgrading from a prior version\n\nTo upgrade from a prior version of `create-openapi-repo`, run the following command in the root folder of your repository:\n\n```bash\nnpx create-openapi-repo --migrate-2-3\n```\n\n**Note:** Plugins aren't included in the migration. You'll need to manually add them to the `transformers` folder.\n\n## Usage\n\n`create-openapi-repo` provides interactive prompts to help guide you through the installation process. Two basic workflows are supported:\n\n### Split an existing OpenAPI definition\n\nThe interactive prompts allow you to specify the path to the file on your local machine, as well as rename the API (optional). After you choose to proceed, `create-openapi-repo` initializes the repository and splits your OpenAPI definition into multiple files.\n\n### Create a new OpenAPI definition\n\nThe interactive prompts allow you to specify a name for the API and choose whether to create a sub-folder for code sample files. After you choose to proceed, `create-openapi-repo` initializes the repository and populates it with placeholder files and folders. \n\n## Directory structure\n\nThe directory structure will look similar to this:\n\n**Note:** You can modify the directory structure to meet your specific requirements.\n\n```\n    ├── .redocly.yaml\n    ├── LICENSE\n    ├── README.md\n    ├── docs\n    │   ├── favicon.png\n    │   └── index.html\n    ├── openapi\n    │   ├── README.md\n    │   ├── code_samples\n    │   │   ├── C#\n    │   │   │   └── echo\n    │   │   │       └── post.cs\n    │   │   ├── PHP\n    │   │   │   └── echo\n    │   │   │       └── post.php\n    │   │   └── README.md\n    │   ├── components\n    │   │   └── README.md\n    │   └── paths\n    │       └── README.md\n    └── package.json\n```\n\n - `.redocly.yaml`: Configuration file for defining settings for various Redocly tools, including the lint tool and reference docs engine.\n - `openapi`: Top-level folder that contains your OpenAPI definition, `openapi.yaml` entrypoint file, and sub-folders for `paths`, `components`, and `code_samples`.\n - `code_samples`: Folder for organizing code samples into sub-folders, such as C# and PHP.\n - `components`: Folder for organizing reusable components into sub-folders, such as `schema` and `response` objects.\n - `paths`: Folder for organizing path definitions. Each path should be referenced from the `openapi.yaml` entrypoint file.\n\n## Commands\n\nThe generated repository installs a dependency for our `redocly-cli` tool which supports the following commands:\n\n - `npm start`: Starts the preview server\n - `npm run build`: Bundles a multi-file OpenAPI definition into a single file\n - `npm test`: Validates the OpenAPI definition\n\n**Note:** Additional scripted shortcuts are defined in the repository's `package.json` file.\n\n## Contribute\n\nInterested in contributing to this project? Here are some ways you can support us:\n\n - Submit a pull request.\n - Star us on Github.\n - Tell a friend or colleague about us (or Tweet about us).\n - Write an article or blog post. Let us know by opening an issue with a link to the article.\n - Looking to build a modern documentation workflow? Our [commercial products](https://redoc.ly) can help you maintain and deploy API reference docs and developer portals.\n\n[npm-image]: https://badge.fury.io/js/generator-openapi-repo.svg\n[npm-url]: https://npmjs.org/package/generator-openapi-repo\n[daviddm-image]: https://david-dm.org/Rebilly/generator-openapi-repo.svg?theme=shields.io\n[daviddm-url]: https://david-dm.org/Rebilly/generator-openapi-repo\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredocly%2Fcreate-openapi-repo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredocly%2Fcreate-openapi-repo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredocly%2Fcreate-openapi-repo/lists"}