{"id":25651301,"url":"https://github.com/psastras/swagger2aglio","last_synced_at":"2025-04-15T22:06:51.752Z","repository":{"id":46164276,"uuid":"62981749","full_name":"psastras/swagger2aglio","owner":"psastras","description":"Swagger static HTML documentation generator","archived":false,"fork":false,"pushed_at":"2024-07-13T07:15:45.000Z","size":1056,"stargazers_count":13,"open_issues_count":13,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-15T22:06:11.521Z","etag":null,"topics":["api","documentation","html","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/psastras.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":"2016-07-10T04:38:28.000Z","updated_at":"2024-04-02T00:03:24.000Z","dependencies_parsed_at":"2024-02-02T19:51:07.049Z","dependency_job_id":null,"html_url":"https://github.com/psastras/swagger2aglio","commit_stats":{"total_commits":28,"total_committers":2,"mean_commits":14.0,"dds":0.1071428571428571,"last_synced_commit":"42869876ecd28526a68814c07a93ccf188127f06"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psastras%2Fswagger2aglio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psastras%2Fswagger2aglio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psastras%2Fswagger2aglio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/psastras%2Fswagger2aglio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/psastras","download_url":"https://codeload.github.com/psastras/swagger2aglio/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249161344,"owners_count":21222474,"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","html","swagger"],"created_at":"2025-02-23T16:54:56.025Z","updated_at":"2025-04-15T22:06:51.332Z","avatar_url":"https://github.com/psastras.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Swagger to Aglio API Documentation\n\n[![Build Status](https://travis-ci.org/psastras/swagger2aglio.svg?branch=master)](https://travis-ci.org/psastras/swagger2aglio)\n[![Coverage Status](https://coveralls.io/repos/github/psastras/swagger2aglio/badge.svg?branch=master)](https://coveralls.io/github/psastras/swagger2aglio?branch=master)\n[![Code Climate](https://codeclimate.com/github/psastras/swagger2aglio/badges/gpa.svg)](https://codeclimate.com/github/psastras/swagger2aglio)\n[![npm version](https://badge.fury.io/js/swagger2aglio.svg)](https://badge.fury.io/js/swagger2aglio)\n[![Dependency Status](https://david-dm.org/psastras/swagger2aglio.svg)](https://david-dm.org/psastras/swagger2aglio)\n[![devDependency Status](https://david-dm.org/psastras/swagger2aglio/dev-status.svg)](https://david-dm.org/psastras/swagger2aglio#info=devDependencies)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nSwagger2Aglio is a REST API documentation generator.  It converts a Swagger API description into the API Blueprint\nformat and then to Aglio documentation.  The final output is a single static HTML page, easily served from any webserver.\n\nCurrently supports Swagger version 2.0.\n\n## Example Output\n\nThree column streak theme screenshot:\n\n![Three column streak theme screenshot](screenshot.png)\n\nExample output is generated from the IBM Watson API\n\n- [Default two column theme](https://rawgit.com/psastras/swagger2aglio/master/examples/default.html)\n\n  `swagger2aglio -i petstore_expanded.yml -o examples/default.html`\n\n- [Streak two column wide theme](https://rawgit.com/psastras/swagger2aglio/master/examples/streak_wide.html)\n\n  `swagger2aglio -i petstore_expanded.yml --theme-full-width -o examples/streak_wide.html`\n\n- [Slate two column wide theme](https://rawgit.com/psastras/swagger2aglio/master/examples/slate_wide.html)\n\n  `swagger2aglio -i petstore_expanded.yml --theme-full-width -o examples/slate_wide.html`\n\n- [Flatly three column theme](https://rawgit.com/psastras/swagger2aglio/master/examples/flatly_triple.html)\n\n  `swagger2aglio -i petstore_expanded.yml --theme-variables flatly --theme-template triple -o examples/flatly_triple.html`\n\n- [Slate three column theme](https://rawgit.com/psastras/swagger2aglio/master/examples/slate_triple.html)\n\n  `swagger2aglio -i petstore_expanded.yml --theme-variables slate --theme-template triple -o examples/slate_triple.html`\n\n## Installation and Usage\n\nThere are two ways to use swagger2aglio: as an executable or as a library for Node.js.\n\n### Executable\n\nInstall swagger2aglio via NPM. You need Node.js installed.\n\n```shell\nnpm install -g swagger2aglio\n```\n\nThen, start generating HTML.\n\n```shell\n# Default theme\nswagger2aglio -i input.yml -o output.html\n\n# Use three-column layout\nswagger2aglio -i input.yml --theme-template triple -o output.html\n\n# Built-in color scheme\nswagger2aglio --theme-variables slate -i input.yml -o output.html\n\n# Customize a built-in style\nswagger2aglio --theme-style default --theme-style ./my-style.less -i input.yml -o output.html\n```\n\n### Node.js Library\n\nYou can also use swagger2aglio as a library. First, install and save it as a dependency:\n\n```shell\nnpm install --save swagger2aglio\n```\n\nThen, convert some Swagger to HTML:\n\n```js\nvar swagger2aglio = require('swagger2aglio');\nvar options = {\n  input: './petstore_expanded.yml',\n  themeVariables: 'default'\n}\nswagger2aglio.convert(options, function (err, html) {\n    if (err) return console.log(err);\n\n    console.log(html);\n});\n```\n\n#### Reference\n\n##### swagger2aglio.convert (options, callback)\n\nRender a Swagger file to HTML. Available options are:\n\n| Option      | Type    | Default       | Description                           |\n| ----------- | ------- | ------------- | ------------------------------------- |\n| input       | string  |               | The input Swagger definition file     |\n| theme       | string  | `'default'`   | Theme name to load for rendering      |\n| noMinify    | boolean | `false`       | If false, does not minify output      |\n\nIn addition, the [default theme](https://github.com/danielgtaylor/aglio/tree/olio-theme) provides the following options:\n\n| Option           | Type   | Default   | Description                                  |\n| ---------------- | ------ | --------- | -------------------------------------------- |\n| themeVariables   | string | `default` | Built-in color scheme or path to LESS or CSS |\n| themeCondenseNav | bool   | `true`    | Condense single-action navigation links      |\n| themeFullWidth   | bool   | `false`   | Use the full page width                      |\n| themeTemplate    | string |           | Layout name or path to custom layout file    |\n| themeStyle       | string | `default` | Built-in style name or path to LESS or CSS   |\n\n## Development\n\nFor development, first clone the repository.  Then install dependencies:\n\n```shell\nnpm install\n```\n\nTo start the development hot reload server, run:\n\n```shell\nnpm run start\n```\n\nThen, in a browser go to [http://localhost:3000](http://localhost:3000) and select an example.\nChanges made to any of the Jade templates will be automatically reloaded and displayed in the browser.\n\n## License\n\nCopyright (c) 2016 Paul Sastrasinh","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsastras%2Fswagger2aglio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsastras%2Fswagger2aglio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsastras%2Fswagger2aglio/lists"}