{"id":50332961,"url":"https://github.com/rspereiratech/openapi-collection-generator-core","last_synced_at":"2026-05-29T11:01:11.942Z","repository":{"id":356575381,"uuid":"1233043807","full_name":"rspereiratech/openapi-collection-generator-core","owner":"rspereiratech","description":"Core library for generating API collections from OpenAPI specifications.","archived":false,"fork":false,"pushed_at":"2026-05-08T17:21:51.000Z","size":64,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-08T18:42:57.566Z","etag":null,"topics":["api","collection-generator","insomnia","java","openapi","openapi-spec","postman"],"latest_commit_sha":null,"homepage":"","language":"Java","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:30:44.000Z","updated_at":"2026-05-08T17:21:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rspereiratech/openapi-collection-generator-core","commit_stats":null,"previous_names":["rspereiratech/openapi-collection-generator-core"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rspereiratech/openapi-collection-generator-core","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rspereiratech","download_url":"https://codeload.github.com/rspereiratech/openapi-collection-generator-core/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rspereiratech%2Fopenapi-collection-generator-core/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","collection-generator","insomnia","java","openapi","openapi-spec","postman"],"created_at":"2026-05-29T11:01:10.803Z","updated_at":"2026-05-29T11:01:11.927Z","avatar_url":"https://github.com/rspereiratech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenAPI Collection Generator — Core\n\n[![Build](https://github.com/rspereiratech/openapi-collection-generator-core/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/rspereiratech/openapi-collection-generator-core/actions/workflows/build.yml)\n[![CodeQL](https://github.com/rspereiratech/openapi-collection-generator-core/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/rspereiratech/openapi-collection-generator-core/actions/workflows/codeql.yml)\n[![Java 17+](https://img.shields.io/badge/Java-17%2B-007396.svg)](https://adoptium.net/)\n[![Maven 3.8+](https://img.shields.io/badge/Maven-3.8%2B-C71A36.svg)](https://maven.apache.org/)\n[![OpenAPI 3.0](https://img.shields.io/badge/OpenAPI-3.0-6BA539.svg)](https://spec.openapis.org/oas/v3.0.3)\n[![Swagger Parser 2.x](https://img.shields.io/badge/Swagger%20Parser-2.x-85EA2D.svg)](https://github.com/swagger-api/swagger-parser)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Donate](https://img.shields.io/badge/Donate-NOWPayments-1A1A1A?logo=bitcoin\u0026logoColor=white)](https://nowpayments.io/donation/rspereiratech)\n\nCore library for generating API client collections (Postman, Insomnia) from an OpenAPI 3.x specification.\n\nThis module is the engine. It is meant to be embedded in higher-level tools (Maven plugin, CLI, Gradle plugin) that wire it up and expose a user-facing entry point.\n\n## Features\n\n- Reads OpenAPI 3.x specs (YAML/JSON) via `swagger-parser`\n- Generates collections in multiple formats from a single spec:\n  - Postman v2.1\n  - Insomnia v4\n- Generates per-format environment files (variables, servers, security placeholders)\n- Pluggable example generation for primitive, array, object, composed, and nullable schemas\n- Pluggable security injection: API key (header/query/cookie), Basic, Bearer, OAuth2\n- Extension processors for common `x-*` vendor extensions (`x-internal`, `x-beta`, `x-summary`, `x-deprecated-since`)\n- Deterministic ID generation for stable diffs across regenerations\n\n## Requirements\n\n- Java 17+\n- Maven 3.8+\n\n## Installation\n\nAdd the dependency to your `pom.xml`:\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.rspereiratech\u003c/groupId\u003e\n    \u003cartifactId\u003eopenapi-collection-generator-core\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0-SNAPSHOT\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Usage\n\nThe single entry point is `CollectionGenerationOrchestrator`. It runs the full pipeline: validate → parse → generate → write.\n\n```java\nGenerationRequest request = new GenerationRequest(\n        new File(\"openapi.yaml\"),\n        new File(\"build/collections\"),\n        List.of(CollectionFormat.POSTMAN, CollectionFormat.INSOMNIA),\n        \"My API\"\n);\n\nCollectionGenerationOrchestrator orchestrator = /* wire components */;\nList\u003cGenerationResult\u003e results = orchestrator.generate(request);\n```\n\nEach `GenerationResult` contains the generated collection file and any additional files (e.g. environment files).\n\n### File name pattern\n\n`GenerationRequest` accepts a `fileNamePattern` with `{name}` and `{format}` placeholders. When multiple formats are requested the pattern **must** include `{format}`, otherwise outputs would overwrite each other.\n\n## Architecture\n\nThe pipeline is composed of small, replaceable components — every stage is an interface so you can override behavior without forking:\n\n| Stage          | Contract                          | Default implementation             |\n|----------------|-----------------------------------|------------------------------------|\n| Load           | `SpecLoader`                      | `FileSpecLoader`                   |\n| Parse          | `OpenApiParser`                   | `SwaggerOpenApiParser`             |\n| Generate       | `CollectionGenerator` (per format)| via `CollectionGeneratorFactory`   |\n| Serialize      | `CollectionSerializer`            | `JacksonCollectionSerializer`      |\n| Write          | `CollectionWriter`                | `FileCollectionWriter`             |\n| Env. files     | `EnvironmentWriter`               | `FileEnvironmentWriter`            |\n\nSupporting subsystems:\n\n- **Examples** — `SchemaExampleGenerator` chain (primitive, array, object, composed, nullable)\n- **Security** — `SecurityInjectorFactory` selects an injector per scheme; defaults cover API key, Basic, Bearer, OAuth2\n- **Extensions** — `ExtensionProcessorChain` runs `ExtensionProcessor`s for vendor `x-*` keys\n- **Schema resolution** — `SchemaRefResolver` and `DiscriminatorResolver` for `$ref` and polymorphism\n- **IDs** — `IdGenerator` with deterministic and UUID-based implementations\n\n## Building\n\n```bash\nmvn clean install\n```\n\n## Documentation\n\nIn-depth docs live under [`docs/`](docs/README.md):\n\n- [architecture.md](docs/architecture.md) — pipeline, components, error handling\n- [configuration.md](docs/configuration.md) — `GenerationRequest`, `GenerationConfig`, file naming\n- [extensibility.md](docs/extensibility.md) — adding formats, injectors, processors\n- [security.md](docs/security.md) — security scheme handling\n- [extensions.md](docs/extensions.md) — `x-*` vendor extensions\n- [examples.md](docs/examples.md) — schema example generation\n\n## Contributing\n\nContributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, conventions, and the pull-request workflow.\n\n## Security\n\nFound a vulnerability? Don't open a public issue — see [SECURITY.md](SECURITY.md) for the disclosure process.\n\nFor internals on how the library handles authentication and secrets, see [docs/security.md](docs/security.md).\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\nReleased under the [MIT License](LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frspereiratech%2Fopenapi-collection-generator-core/lists"}