{"id":26331483,"url":"https://github.com/iniva/modular-openapi-docs-boilerplate","last_synced_at":"2025-08-08T16:10:29.111Z","repository":{"id":55863317,"uuid":"132960655","full_name":"iniva/modular-openapi-docs-boilerplate","owner":"iniva","description":"Modular approach for Open API documentation","archived":false,"fork":false,"pushed_at":"2020-12-10T20:37:18.000Z","size":28,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-03-02T01:06:30.521Z","etag":null,"topics":["documentation","modular","nodejs","openapi","swagger"],"latest_commit_sha":null,"homepage":null,"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/iniva.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}},"created_at":"2018-05-10T22:27:28.000Z","updated_at":"2019-06-05T22:06:35.000Z","dependencies_parsed_at":"2022-08-15T08:00:55.786Z","dependency_job_id":null,"html_url":"https://github.com/iniva/modular-openapi-docs-boilerplate","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iniva%2Fmodular-openapi-docs-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iniva%2Fmodular-openapi-docs-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iniva%2Fmodular-openapi-docs-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iniva%2Fmodular-openapi-docs-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iniva","download_url":"https://codeload.github.com/iniva/modular-openapi-docs-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243801604,"owners_count":20350106,"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":["documentation","modular","nodejs","openapi","swagger"],"created_at":"2025-03-15T22:37:44.787Z","updated_at":"2025-08-08T16:10:29.101Z","avatar_url":"https://github.com/iniva.png","language":"JavaScript","readme":"# Modular Openapi Docs Boilerplate \u003c!-- omit in toc --\u003e\nModular approach for Open API documentation in NodeJS\n\n- [Installation](#installation)\n  - [Cloning](#cloning)\n  - [Downloading](#downloading)\n  - [Fancy Cloning](#fancy-cloning)\n- [Generate the documentation](#generate-the-documentation)\n- [Verifying the output](#verifying-the-output)\n- [Documentation](#documentation)\n  - [In Editors](#in-editors)\n  - [Local server](#local-server)\n\n## Installation\n\n### Cloning\n+ Clone this repo in another location and copy the `docs` folder\n\n### Downloading\n+ Same as cloning, but... downloading\n\n### Fancy Cloning\nFeeling lucky, punk? OK, go to your project root and do the following:\n```bash\n# Clone this repo into a 'docs' folder\ngit clone --depth 1 https://github.com/iniva/modular-openapi-docs-boilerplate docs\n\n# Switch to 'docs' folder\ncd docs\n\n# Remove everything except the documentation structure\ngit filter-branch --prune-empty --subdirectory-filter docs HEAD\n\n# Remove git related info (you might need sudo)\nrm -R .git\n```\n\n## Generate the documentation\n+ Add the `refs-compiler` and `debug` dev dependencies.\n  ```\n  # Using Yarn\n  yarn add refs-compiler debug -D\n\n  # Using NPM\n  npm i refs-compiler debug --save-dev\n  ```\n  \u003e **debug** is not really necessary. If you want, just edit `builder.js` and replace the _logger_ function with your own implementation. A `console.log` will be enough.\n+ Add a `build:docs` script\n  ```javascript\n  \"scripts\": {\n    \"build:docs\": \"DEBUG=docs* node docs/builder.js\"\n  }\n  ```\n+ Run the `build:docs` script. This will generate a file named `openapi.yaml` inside the `docs` folder\n\n## Verifying the output\nGo to [Swagger Editor](http://editor.swagger.io/) and paste the contents of `openapi.yaml` and check everything is as you expected. Make adjustments if necessary.\n\n## Documentation\nYou have some alternatives to view the documentation. All of them assumes you already have a local copy of this repository.\n\n### In Editors\nMost editors would let you open a local html into your preffered Browser. In **Webstorm** or **VSCode**, for example, you can go to `path/to/docs` and open the context menu (secondary click) over `index.html`:\n* Webstorm: select the option **Open in browser** and select your preferred one.\n* VSCode: select the option **Open in Default Browser** or **Open in Other Browsers** and select your preferred one.\n\n### Local server\nIn your terminal go to `path/to/docs` and run the following command:\n+ **NodeJS (using npx)**: Assuming you have NodeJS + NPM (\u003e= 5.2) installed.\n    ```bash\n    npx http-server -p 9090\n    ```\n+ **PHP**: Assuming you have PHP (\u003e= 5.6) installed.\n    ```bash\n    php -S 0.0.0.0:9090\n    ```\n+ **Python**: Assuming you have Python (\u003e= 2.7) installed.\n    ```bash\n    python -m SimpleHTTPServer 9090\n    ```\n+ Now open your [browser](http://localhost:9090)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiva%2Fmodular-openapi-docs-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finiva%2Fmodular-openapi-docs-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finiva%2Fmodular-openapi-docs-boilerplate/lists"}