{"id":50332969,"url":"https://github.com/rspereiratech/openapi-collection-generator-parent","last_synced_at":"2026-05-29T11:01:12.908Z","repository":{"id":356580137,"uuid":"1233029169","full_name":"rspereiratech/openapi-collection-generator-parent","owner":"rspereiratech","description":"Maven plugin that generates Postman and Insomnia collections from OpenAPI 3.x specs, integrated into the Maven build lifecycle.","archived":false,"fork":false,"pushed_at":"2026-05-08T17:21:56.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-08T19:22:47.399Z","etag":null,"topics":["api-tools","code-generation","insomnia","java","maven-plugin","openapi","openapi3","postman"],"latest_commit_sha":null,"homepage":"","language":null,"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/rspereiratech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-08T14:13:25.000Z","updated_at":"2026-05-08T17:21:59.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rspereiratech/openapi-collection-generator-parent","commit_stats":null,"previous_names":["rspereiratech/openapi-collection-generator-parent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rspereiratech/openapi-collection-generator-parent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-parent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-parent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-parent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-parent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rspereiratech","download_url":"https://codeload.github.com/rspereiratech/openapi-collection-generator-parent/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-parent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33648534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-tools","code-generation","insomnia","java","maven-plugin","openapi","openapi3","postman"],"created_at":"2026-05-29T11:01:11.833Z","updated_at":"2026-05-29T11:01:12.884Z","avatar_url":"https://github.com/rspereiratech.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPI Collection Generator\n\n[![Build](https://github.com/rspereiratech/openapi-collection-generator-parent/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/rspereiratech/openapi-collection-generator-parent/actions/workflows/build.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow)](LICENSE)\n![Java 17+](https://img.shields.io/badge/Java-17%2B-blue)\n![Maven 3.9+](https://img.shields.io/badge/Maven-3.9%2B-C71A36?logo=apachemaven\u0026logoColor=white)\n![OpenAPI 3.0](https://img.shields.io/badge/OpenAPI-3.0-6BA539?logo=openapiinitiative\u0026logoColor=white)\n![Swagger v3](https://img.shields.io/badge/Swagger-v3-85EA2D?logo=swagger\u0026logoColor=black)\n![Insomnia v4](https://img.shields.io/badge/Insomnia-v4-4000BF?logo=insomnia\u0026logoColor=white)\n[![Donate](https://img.shields.io/badge/Donate-NOWPayments-1A1A1A?logo=bitcoin\u0026logoColor=white)](https://nowpayments.io/donation/rspereiratech)\n\nA Maven plugin that generates API client collections from OpenAPI specifications.\n\n## Problem\n\nWorking with REST APIs often requires importing endpoints into tools like **Postman** or **Insomnia** for testing and development. Manually creating and maintaining these collections is tedious, error-prone, and quickly becomes outdated as APIs evolve.\n\n## Solution\n\n**OpenAPI Collection Generator** reads your OpenAPI (3.x) specification and automatically generates ready-to-import collection files for Postman and Insomnia. It integrates directly into the Maven build lifecycle, ensuring your collections are always in sync with your API definition.\n\n### Features\n\n- Generates **Postman v2.1** collections\n- Generates **Insomnia v4** exports\n- Supports generating **multiple formats** in a single execution\n- Configurable **output directory** and **file naming pattern**\n- Automatic **environment file** generation (e.g. server URLs)\n- Runs during the `generate-resources` phase by default\n\n## Module Structure\n\n| Module | Description |\n|---|---|\n| `openapi-collection-generator-parent` | Parent POM with shared dependency management |\n| `openapi-collection-generator-core` | Core library with generation orchestration, parsing, and writing |\n| `openapi-collection-generator-postman` | Postman collection generator |\n| `openapi-collection-generator-insomnia` | Insomnia collection generator |\n| `openapi-collection-generator-maven-plugin` | Maven plugin (thin wrapper over core) |\n\n## Usage\n\n### 1. Add the plugin to your `pom.xml`\n\n```xml\n\u003cbuild\u003e\n    \u003cplugins\u003e\n        \u003cplugin\u003e\n            \u003cgroupId\u003eio.github.rspereiratech\u003c/groupId\u003e\n            \u003cartifactId\u003eopenapi-collection-generator-maven-plugin\u003c/artifactId\u003e\n            \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n            \u003cexecutions\u003e\n                \u003cexecution\u003e\n                    \u003cgoals\u003e\n                        \u003cgoal\u003egenerate\u003c/goal\u003e\n                    \u003c/goals\u003e\n                    \u003cconfiguration\u003e\n                        \u003cformats\u003e\n                            \u003cformat\u003ePOSTMAN\u003c/format\u003e\n                            \u003cformat\u003eINSOMNIA\u003c/format\u003e\n                        \u003c/formats\u003e\n                        \u003ccollectionName\u003eMy_API\u003c/collectionName\u003e\n                    \u003c/configuration\u003e\n                \u003c/execution\u003e\n            \u003c/executions\u003e\n        \u003c/plugin\u003e\n    \u003c/plugins\u003e\n\u003c/build\u003e\n```\n\n### 2. Place your OpenAPI spec\n\nBy default, the plugin looks for the spec at:\n\n```\nsrc/main/resources/openapi.yaml\n```\n\n### 3. Run the build\n\n```bash\nmvn generate-resources\n```\n\nThis produces:\n\n```\ntarget/generated-collections/\n  My_API_postman.json\n  My_API_insomnia.json\n  My_API.Production.environment.json\n```\n\n## Configuration Reference\n\n| Parameter | Property | Default | Description |\n|---|---|---|---|\n| `specFile` | `openapi.spec` | `${project.basedir}/src/main/resources/openapi.yaml` | Path to the OpenAPI specification file |\n| `outputDirectory` | `openapi.outputDir` | `${project.build.directory}/generated-collections` | Output directory for generated files |\n| `formats` | `openapi.formats` | `POSTMAN` | List of formats to generate (`POSTMAN`, `INSOMNIA`) |\n| `collectionName` | `openapi.collectionName` | API title from spec | Name used in the output file name |\n| `baseUrl` | `openapi.baseUrl` | URL from spec | Base URL override for the collection |\n| `fileNamePattern` | `openapi.fileNamePattern` | `{name}_{format}.json` | Output file name pattern. Supports `{name}` and `{format}` placeholders |\n\n### File Name Pattern\n\nThe `fileNamePattern` parameter controls the output file name. Available placeholders:\n\n- `{name}` - replaced with the collection name (sanitized)\n- `{format}` - replaced with the format in lowercase (`postman`, `insomnia`)\n\nExamples:\n\n```xml\n\u003c!-- Default: My_API_postman.json --\u003e\n\u003cfileNamePattern\u003e{name}_{format}.json\u003c/fileNamePattern\u003e\n\n\u003c!-- Prefix style: postman_My_API.json --\u003e\n\u003cfileNamePattern\u003e{format}_{name}.json\u003c/fileNamePattern\u003e\n```\n\n\u003e **Note:** When generating multiple formats, the pattern **must** contain `{format}` to avoid file name collisions. The plugin will fail with a clear error message if this rule is violated.\n\n### Single Format\n\nTo generate only one format, specify a single entry:\n\n```xml\n\u003cformats\u003e\n    \u003cformat\u003ePOSTMAN\u003c/format\u003e\n\u003c/formats\u003e\n```\n\nWhen using a single format, the `{format}` placeholder is optional in the file name pattern.\n\n## Requirements\n\n- Java 17+\n- Maven 3.9+\n\n## Contributing\n\nContributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on reporting issues, setting up the development environment, and submitting pull requests.\n\n## Security\n\nIf you discover a security vulnerability, please follow the process described in [SECURITY.md](SECURITY.md). Do not open a public issue for security reports.\n\n## Support\n\n[![Donate](https://img.shields.io/badge/Donate-NOWPayments-1A1A1A?logo=bitcoin\u0026logoColor=white)](https://nowpayments.io/donation/rspereiratech)\n\nIf this project saves you time, consider supporting development\nvia [NOWPayments](https://nowpayments.io/donation/rspereiratech).\nEvery contribution helps keep it maintained — thank you!\n\n## License\n\n[MIT](LICENSE) © 2026 rspereiratech\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-parent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-parent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-parent/lists"}