{"id":15061095,"url":"https://github.com/Penify-dev/penify-oapi-code-gen","last_synced_at":"2025-10-25T09:31:20.437Z","repository":{"id":243274147,"uuid":"811956617","full_name":"SingularityX-ai/penify-oapi-code-gen","owner":"SingularityX-ai","description":"OpenAPI specification generator in NodeJS that can generate openapi-specs for multiple languages","archived":false,"fork":false,"pushed_at":"2024-08-08T22:02:44.000Z","size":40,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-18T10:22:02.963Z","etag":null,"topics":["csharp","go","golang","java","javascript","nodejs","ocaml","php","python","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/penify-oapi-codegen","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/SingularityX-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2024-06-07T16:36:32.000Z","updated_at":"2024-09-14T11:33:34.000Z","dependencies_parsed_at":"2024-10-12T21:20:43.040Z","dependency_job_id":null,"html_url":"https://github.com/SingularityX-ai/penify-oapi-code-gen","commit_stats":null,"previous_names":["sumansaurabh/api-code-generator","sumansaurabh/openapi-code-gen"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingularityX-ai%2Fpenify-oapi-code-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingularityX-ai%2Fpenify-oapi-code-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingularityX-ai%2Fpenify-oapi-code-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SingularityX-ai%2Fpenify-oapi-code-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SingularityX-ai","download_url":"https://codeload.github.com/SingularityX-ai/penify-oapi-code-gen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238117424,"owners_count":19419223,"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":["csharp","go","golang","java","javascript","nodejs","ocaml","php","python","typescript"],"created_at":"2024-09-24T23:09:11.234Z","updated_at":"2025-10-25T09:31:15.167Z","avatar_url":"https://github.com/SingularityX-ai.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Penify Open API Code Gen\n\n`penify-oapi-codegen` is a JavaScript library designed to convert OpenAPI schemas into various code examples. This tool simplifies the process of generating client libraries in different programming languages based on your API documentation.\n\n## Features\n\n- Convert OpenAPI schema to code examples in multiple languages.\n- Easy to use command-line interface.\n\n## Prerequisites\n\nBefore installing `penify-oapi-codegen`, ensure you have the following installed:\n\n- [Node.js](https://nodejs.org/) (version 12 or higher)\n- npm (Node package manager)\n\nAdditionally, you need to install `openapi-to-postmanv2` globally. This can be done using the following command:\n\n```bash\nnpm install -g openapi-to-postmanv2\n```\n\n## Installation\n\nTo install `penify-oapi-codegen`, run the following command:\n\n```bash\nnpm install penify-oapi-codegen\n```\n\n## Usage\n\nOnce installed, you can use `penify-oapi-codegen` from the command line to generate code examples from your OpenAPI schemas.\n\n### Generate Code Examples\n\n#### For all supported languages\n\nIt will generate OpenAPI schema for all possible language and variant.\n\n```bash\npenify-oapi-codegen -i path/to/your/openapi/schema.json -o path/to/output/schema_with_code.json\n```\n\n#### For Specific Language and Variant\n\n```bash\npenify-oapi-codegen -i path/to/your/openapi/schema.json -l language -v variant -o path/to/output/schema_with_code.json\n```\n\n#### Get all supported languages\n\n```bash\npenify-oapi-codegen -s\n```\n\n### Options\n\n- `-i, --input \u003cpath\u003e`: Path to the OpenAPI schema file (required).\n- `-l, --language \u003clanguage\u003e`: Programming language for the code example (optional).\n- `-v, --variant \u003cvariant\u003e`: Variant of the code generator for the specified language (optional).\n- `-o, --output \u003cpath\u003e`: Path to the output code example file (optional).\n- `-s,`: To show list of supported languages\n\n## Supported Code Generators\n\nThe tool supports generating code examples for the following languages and variants:\n\n| Language       | Variant        |\n|--------------- |----------------|\n| csharp         | RestSharp      |\n| curl           | cURL           |\n| go             | Native         |\n| http           | HTTP           |\n| java           | OkHttp         |\n| java           | Unirest        |\n| javascript     | Fetch          |\n| javascript     | jQuery         |\n| javascript     | XHR            |\n| c              | libcurl        |\n| nodejs         | Axios          |\n| nodejs         | Native         |\n| nodejs         | Request        |\n| nodejs         | Unirest        |\n| objective-c    | NSURLSession   |\n| ocaml          | Cohttp         |\n| php            | cURL           |\n| php            | HTTP_Request2  |\n| php            | pecl_http      |\n| powershell     | RestMethod     |\n| python         | http.client    |\n| python         | Requests       |\n| ruby           | Net::HTTP      |\n| shell          | Httpie         |\n| shell          | wget           |\n| swift          | URLSession     |\n\n## Examples\n\n### Example 1: Generate Python Requests Code Example\n\n```bash\npenify-oapi-codegen -s ./schemas/api.json -l python -v Requests -o ./examples/schema_python_requests_example.json\n```\n\n### Example 2: Generate JavaScript Fetch Code Example\n\n```bash\npenify-oapi-codegen -s ./schemas/api.json -l javascript -v Fetch -o ./examples/schema_js_fetch_example.json\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request with your changes.\n\n## License\n\nThis project is licensed under the ISC License.\n\n## Author\n\nsumansaurabh\n\n---\n\n*Footnote: This tool uses `openapi-to-postmanv2` for converting OpenAPI schemas. Please ensure it is installed globally.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPenify-dev%2Fpenify-oapi-code-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPenify-dev%2Fpenify-oapi-code-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPenify-dev%2Fpenify-oapi-code-gen/lists"}