{"id":15091511,"url":"https://github.com/oas-tools/oas-generator","last_synced_at":"2025-10-06T11:30:33.513Z","repository":{"id":43924216,"uuid":"134678864","full_name":"oas-tools/oas-generator","owner":"oas-tools","description":"NodeJS RESTful APIs scaffolding based OpenAPI 3.x specs using oas-tools and express.","archived":true,"fork":false,"pushed_at":"2022-08-15T00:25:20.000Z","size":3527,"stargazers_count":41,"open_issues_count":0,"forks_count":4,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-09-25T10:42:00.152Z","etag":null,"topics":["api","cli","express","nodejs","oas","openapi3","rest","scaffolding"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oas-tools.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-24T07:35:23.000Z","updated_at":"2023-01-27T22:17:58.000Z","dependencies_parsed_at":"2022-08-29T14:10:47.732Z","dependency_job_id":null,"html_url":"https://github.com/oas-tools/oas-generator","commit_stats":null,"previous_names":["isa-group/oas-generator"],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oas-tools%2Foas-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oas-tools%2Foas-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oas-tools%2Foas-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oas-tools%2Foas-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oas-tools","download_url":"https://codeload.github.com/oas-tools/oas-generator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877262,"owners_count":16554852,"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","cli","express","nodejs","oas","openapi3","rest","scaffolding"],"created_at":"2024-09-25T10:41:29.566Z","updated_at":"2025-10-06T11:30:33.093Z","avatar_url":"https://github.com/oas-tools.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e **Warning**\n\u003e\n\u003e This package is now included in [OAS Tools CLI](https://github.com/oas-tools/oas-cli). Check the [docs](https://oas-tools.github.io/docs/cli) for more info.\n\n# oas-generator\n\n[![Build Status](https://travis-ci.org/isa-group/oas-generator.svg?branch=master)](https://travis-ci.org/isa-group/oas-generator)\n[![dependencies Status](https://david-dm.org/isa-group/oas-generator/status.svg)](https://david-dm.org/isa-group/oas-generator)\n[![codecov](https://codecov.io/gh/isa-group/oas-generator/branch/master/graph/badge.svg)](https://codecov.io/gh/isa-group/oas-generator)\n[![Known Vulnerabilities](https://snyk.io/test/npm/oas-generator/badge.svg)](https://snyk.io/test/npm/oas-generator)\n[![Greenkeeper badge](https://badges.greenkeeper.io/isa-group/oas-generator.svg)](https://greenkeeper.io/)\n\n[![NPM](https://nodei.co/npm/oas-generator.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/oas-generator/)\n\nThis module provides NodeJS RESTfull APIs scaffolding based OpenAPI 3.x specs using [oas-tools](https://github.com/isa-group/oas-tools) and [express](https://github.com/expressjs/express). It is compatible with servers generated with the swagger-tool suite to help in the transition from pre-existing servers based on 2.x specs.\n\nWe have a 2 min. tutorial:\n\n\u003ca href=\"https://youtu.be/OZhtoXP2Gi4\" alt=\"oas-generator introduction (v2.0.6) - Click to Watch!\"\u003e\u003cimg src=\"https://i.imgur.com/fcqaWCq.jpg\" align=\"center\" width=\"300\" alt=\"oas-generator introduction (v2.0.6) - Click to Watch!\"\u003e\u003c/a\u003e\n\n\n## 1\\. Install oas-generator\n\n```bash\nnpm install oas-generator -g\n```\n\n## 2\\. Use oas-generator command\n\n### 2.1\\. Help\n\n```bash\n$ oas-generator --help\n\nUsage:  oas-generator \u003cOAS v3 file in YAML or JSON\u003e\n\n  Options:\n\n    -n, --projectName \u003cprojectName\u003e  Name for the generated folder\n    -z, --generateZip                Indicate whether the generated folder must be deleted after compression\n    -h, --help                       output usage information\n```\n\n### 2.2 Examples\n\nGenerate a NodeJS project: The following command wil create the code of a NodeJS application based on the OpenAPI Spec 3.x `docker-engine.yaml` and place its code in a folder by the name `generatedServer`.\n\n```bash\n$ oas-generator specs/docker-engine.yaml -n generatedServer\n```\n\nOnce the folder is created locate into it. Install dependencies and run it by doing npm start:\n\n```bash\n$ cd generatedServer\n$ npm start\n```\n\nNow your app is running on port 8080.\nYou can try the url [http://localhost:8080/v1.33/volumes](http://localhost:8080/v1.33/volumes)\n\nIn the folder `controllers` there will be a set of js files with the templates for each method specified in the spec that should be completed to have a fully working API.\n\nHappy coding! \n\n\n## License\n\nCopyright 2018, [ISA Group](http://www.isa.us.es), [University of Sevilla](http://www.us.es)\n\nFor technical inquiry please contact to [engineering team](./extra/team.md).\n\n[![ISA Group](http://www.isa.us.es/2.0/assets/img/theme/logo2.png)](http://www.isa.us.es)\n\nLicensed under the **Apache License, Version 2.0** (the \"[License](./LICENSE)\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foas-tools%2Foas-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foas-tools%2Foas-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foas-tools%2Foas-generator/lists"}