{"id":16931864,"url":"https://github.com/mjarkk/openapicodegen","last_synced_at":"2026-05-15T22:05:42.810Z","repository":{"id":86742788,"uuid":"207751957","full_name":"mjarkk/openApiCodeGen","owner":"mjarkk","description":"Generate minimal javascript from a swagger file","archived":false,"fork":false,"pushed_at":"2019-09-11T07:39:09.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-15T10:06:38.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/mjarkk.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,"publiccode":null,"codemeta":null}},"created_at":"2019-09-11T07:36:47.000Z","updated_at":"2024-06-19T09:04:02.876Z","dependencies_parsed_at":"2023-03-08T08:30:44.232Z","dependency_job_id":null,"html_url":"https://github.com/mjarkk/openApiCodeGen","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/mjarkk%2FopenApiCodeGen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjarkk%2FopenApiCodeGen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjarkk%2FopenApiCodeGen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mjarkk%2FopenApiCodeGen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mjarkk","download_url":"https://codeload.github.com/mjarkk/openApiCodeGen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244731144,"owners_count":20500599,"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-10-13T20:44:53.204Z","updated_at":"2025-10-11T17:20:45.122Z","avatar_url":"https://github.com/mjarkk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `openApiCodeGen` Generate minimal javascript from a swagger file\nMade for swagger v2 and outputs javascript that just calles a helper function for fetching the data \n\n## How to use\n\n### Install\n```sh\ngo get github.com/mjarkk/openApiCodeGen\n```\n\n### Generate javascript\n```sh \n# Generate javascript and output it to the stdout\nopenApiCodeGen -in swagger.json\n\n# Generate javascript and place it in a file\nopenApiCodeGen -in swagger.json \u003e api.js\n```\n\n### Create the fetch function \nThe api file generated will reqeust a function `apiUtil.js`  \nThe `apiUtil.js` file needs to be in the same dir as the generated code  \n```js\n// apiUtil.js\n// apiFetcher is the function requested by the generated code\n\nexport const apiFetcher = async reqData =\u003e {\n  console.log(reqData)\n  /*{\n    params: ['firstParam', 'secondParam'],\n    method: \"POST\",\n    url: \"/api/v1/user/firstParam/edit/secondParam\",\n    body: {...},\n  }*/\n\n  return await fetch(reqData.url)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjarkk%2Fopenapicodegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmjarkk%2Fopenapicodegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmjarkk%2Fopenapicodegen/lists"}