{"id":13583464,"url":"https://github.com/tobilg/api2html","last_synced_at":"2025-04-06T10:10:57.652Z","repository":{"id":55769256,"uuid":"133497107","full_name":"tobilg/api2html","owner":"tobilg","description":"A CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via Shins/Widdershins.","archived":false,"fork":false,"pushed_at":"2023-09-21T15:53:44.000Z","size":287,"stargazers_count":119,"open_issues_count":7,"forks_count":25,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-30T09:06:29.703Z","etag":null,"topics":["api-documentation","asyncapi","openapi","openapi3","slate","static-site-generator","swagger-documentation"],"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/tobilg.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}},"created_at":"2018-05-15T10:03:41.000Z","updated_at":"2025-02-22T06:09:16.000Z","dependencies_parsed_at":"2024-04-08T18:58:06.738Z","dependency_job_id":"cebc569f-c954-4426-8022-aee121610aef","html_url":"https://github.com/tobilg/api2html","commit_stats":{"total_commits":47,"total_committers":12,"mean_commits":"3.9166666666666665","dds":0.4042553191489362,"last_synced_commit":"533476e50c886a5cf8a8553edf9cf2773f24ff72"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fapi2html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fapi2html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fapi2html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tobilg%2Fapi2html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tobilg","download_url":"https://codeload.github.com/tobilg/api2html/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247464220,"owners_count":20942970,"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","asyncapi","openapi","openapi3","slate","static-site-generator","swagger-documentation"],"created_at":"2024-08-01T15:03:29.964Z","updated_at":"2025-04-06T10:10:57.632Z","avatar_url":"https://github.com/tobilg.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","static-site-generator"],"sub_categories":[],"readme":"# api2html\nA CLI tool to transform Swagger/OpenAPI/AsyncAPI docs to beautiful HTML pages via [Shins](https://github.com/mermade/shins)/[Widdershins](https://github.com/mermade/widdershins).\n\nYou can find an example generated page at [http://tobilg.github.io/api2html/petstore/](http://tobilg.github.io/api2html/petstore/).\n\n## Installation\n\nTo install `api2html` globally, use\n\n```bash\n$ npm i api2html -g\n```\n\nYou can also install it to use as `devDependencies`, and use it locally via a `npm run` task in your `package.json`:\n\n```bash\n$ npm i api2html --save-dev\n```\n\nUsage in `package.json`:\n\n```javascript\n{\n  \"scripts\": {\n    \"api-docs\": \"node_modules/.bin/api2html -o docs/api.html -l shell,javascript--nodejs docs/openapi/api.yml\"\n  }\n}\n```\n\n## Usage\n\n### Available commands\n\n```bash\n$ api2html --help \nUsage: api2html [options] \u003csourcePath\u003e\n  \n  Options:\n    -V, --version                   output the version number\n    -r, --resolve \u003csource\u003e          resolve external dependencies, source should be a url or a path\n    -o, --out \u003coutputPath\u003e          output path for the resulting HTML document\n    -t, --theme \u003cthemeName\u003e         theme to use (see https://highlightjs.org/static/demo/ for a list)\n    -c, --customLogo \u003clogoPath\u003e     use custom logo at the respective path\n    -u, --customLogoUrl \u003clogoURL\u003e   url for the custom logo to point to\n    -C, --customCss                 use custom css\n    -P, --customCssPath \u003ccssPath\u003e   use custom css file\n    -i, --includes \u003cincludesList\u003e   comma-separated list of files to include\n    -l, --languages \u003clanguageList\u003e  comma-separated list of languages to use for the language tabs (out of shell, http, javascript, javascript--nodejs, ruby, python, java, go)\n    -N, --noCodeSamples             omit all code samples (overrides --languages)\n    -s, --search                    enable search\n    -S, --summary                   use summary instead of operationId for TOC\n    -b, --omitBody                  Omit top-level fake body parameter object\n    -R, --raw                       Show raw schemas in samples, not example values\n    -h, --help                      output usage information\n```\n\n### Usage examples\n\n#### Render OpenAPI v3 file as HTML\n\nThis will render the `api.yml` file in the current directory as `myapi.html` file in the current directory.\n\n```bash\n$ api2html -o myapi.html myapi.yml\n```\n\n#### Use custom logo\n\nThis will render the `api.yml` file in the current directory as `myapi.html` file in the same directory, and use the custom logo `mylogo.png`.\n\n```bash\n$ api2html -o myapi.html -c mylogo.png myapi.yml\n```\n\n#### Define which language examples should be generated\n\nThis will render the `api.yml` file in the current directory as `myapi.html` file in the same directory, and use `go` and `javascript` examples.\n\n```bash\n$ api2html -o myapi.html -l go,javascript myapi.yml\n```\n\n#### Use different syntax highlighter\n\nThis will render the `api.yml` file in the current directory as `myapi.html` file in the same directory, and use `go` and `javascript` examples, as well as a different syntax higlighter from [highlight.js](https://highlightjs.org/static/demo/).\n\n```bash\n$ api2html -o myapi.html -l go,javascript -t arta myapi.yml\n```\n\n#### Resolve external dependencies\n\nIf you add refs to external files in your source file, you can enable them by using `-r \u003csource\u003e`. The following command will resolve all your relative imports from the current directory.\n\n```bash\n$ api2html -o myapi.html -r ./ myapi.yml\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fapi2html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftobilg%2Fapi2html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftobilg%2Fapi2html/lists"}