{"id":19501193,"url":"https://github.com/gitbookio/openapi-autodoc","last_synced_at":"2025-04-25T23:31:04.994Z","repository":{"id":42058776,"uuid":"425053950","full_name":"GitbookIO/openapi-autodoc","owner":"GitbookIO","description":"Generate a GitBook Space from an OpenAPI spec","archived":false,"fork":false,"pushed_at":"2023-06-20T13:31:37.000Z","size":364,"stargazers_count":8,"open_issues_count":9,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-04T05:11:10.368Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GitbookIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-11-05T18:52:57.000Z","updated_at":"2024-01-21T15:34:24.000Z","dependencies_parsed_at":"2024-11-10T22:21:54.293Z","dependency_job_id":null,"html_url":"https://github.com/GitbookIO/openapi-autodoc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fopenapi-autodoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fopenapi-autodoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fopenapi-autodoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GitbookIO%2Fopenapi-autodoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GitbookIO","download_url":"https://codeload.github.com/GitbookIO/openapi-autodoc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250912660,"owners_count":21506865,"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":[],"created_at":"2024-11-10T22:11:48.273Z","updated_at":"2025-04-25T23:31:04.691Z","avatar_url":"https://github.com/GitbookIO.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPI Autodoc\n\nA Website and a CLI that generates documentation formatted for GitBook from an\nOpenAPI Specification\n\n## Usage\n\nMake sure you have a recent version of Node.js installed.\n\n### CLI\n\nIn your CLI run\n\n```sh\n$ npx @gitbook/openapi-autodoc -f ./path/to/my/openapi.yaml\n```\n\nThe CLI will generate documentation in your current working directory.\n\nUse the Git Sync feature of GitBook to push your generated docs to your GitBook\nSpace.\n\n### In a continuous integration environment\n\nYou can set up @gitbook/openapi-autodoc in your continuous integration\nenvironment to automatically generate documentation from an OpenAPI\nspecification in your repository, or one generated earlier in the build process.\n\nThis is intended to be used with GitBook Git Sync to keep your documentation up\nto date - so make sure to set up a Git Sync space first.\n\nEach CI environment differs, and we can't provide instructions for each one.\nHere, we try to provide general instructions that can be applied to whatever CI\nsolution you use.\n\n1. Make sure your CI can make a commit, and push to your repository. Since\n   the generated documentation must be stored in your repo, your CI will need to\n   push a commit containing the generated documentation.\n2. Install Node in your CI environment, if it's not already available.\n3. If necessary, generate your openapi spec.\n4. Run `npx @gitbook/openapi-autodoc -f ./path/to/my/openapi.yaml` in the root\n   directory of your repository.\n5. If your generated documentation files have changed, commit them and push them\n   to the repository. Files to look for are `.gitbook.yaml` and the `docs` folder.\n\nYour CI will likely be triggered by this commit.\n\n_Warning: If your OpenAPI spec is generated in a different way each time, this\nwill trigger an infinite CI loop. Make sure your OpenAPI spec is generated in\nexactly the same way each time - no timestamps, or random examples of\nparameters._\n\nWhen the second CI run finishes, GitBook Sync will automatically take the new\ngenerated documentation and push it to your GitBook Space.\n\n### Website\n\nThis repository also contains a website that can be used to generate a ZIP file\ncontaining the generated documentation. To run the website, run the following\ncommands:\n\n```sh\n$ npm install\n$ npm start\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fopenapi-autodoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitbookio%2Fopenapi-autodoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitbookio%2Fopenapi-autodoc/lists"}