{"id":25524849,"url":"https://github.com/spring-financial-group/jx3-openapi-generation","last_synced_at":"2026-02-16T23:46:50.111Z","repository":{"id":37081540,"uuid":"302657736","full_name":"spring-financial-group/jx3-openapi-generation","owner":"spring-financial-group","description":"Creates client packages from Open API spec ","archived":false,"fork":false,"pushed_at":"2026-02-02T16:41:38.000Z","size":20986,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-03T00:14:31.142Z","etag":null,"topics":["openapi","openapi-generator"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spring-financial-group.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-10-09T14:00:43.000Z","updated_at":"2026-02-02T14:45:49.000Z","dependencies_parsed_at":"2025-12-12T22:04:12.839Z","dependency_job_id":null,"html_url":"https://github.com/spring-financial-group/jx3-openapi-generation","commit_stats":null,"previous_names":[],"tags_count":271,"template":false,"template_full_name":null,"purl":"pkg:github/spring-financial-group/jx3-openapi-generation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-financial-group%2Fjx3-openapi-generation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-financial-group%2Fjx3-openapi-generation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-financial-group%2Fjx3-openapi-generation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-financial-group%2Fjx3-openapi-generation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spring-financial-group","download_url":"https://codeload.github.com/spring-financial-group/jx3-openapi-generation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spring-financial-group%2Fjx3-openapi-generation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29524662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T21:45:09.491Z","status":"ssl_error","status_checked_at":"2026-02-16T21:44:58.452Z","response_time":115,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["openapi","openapi-generator"],"created_at":"2025-02-19T20:16:31.274Z","updated_at":"2026-02-16T23:46:50.088Z","avatar_url":"https://github.com/spring-financial-group.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## jx3-openapi-generation\n\nThis repository contains code and configuration for generating client packages using the OpenAPI Generator tool.\nThe tool is wrapped in a Go CLI which is used for setting up the configuration for each language and pushing the generated\npackages to the relevant repositories.\n\nThe following languages currently are supported:\n\n| Language   | Argument     | Notes                                    |\n| ---------- | ------------ | ---------------------------------------- |\n| C#         | `csharp`     |                                          |\n| Java       | `java`       |                                          |\n| Angular    | `angular`    |                                          |\n| Typescript | `typescript` |                                          |\n| Python     | `python`     | **Not available for preview packages\\*** |\n| Golang     | `go`         | **Not available for preview packages\\*** |\n| Rust       | `rust`       |                                          |\n\n\\* Due to the way in which Go and Python packages are stored preview packages are not current supported so avoid\nusing these languages in any preview pipelines\n\n## Usage\n\nThe CLI is configured through environment variables. The following environment variables are required:\n\n| Variable Name        | Description                                                                                   |\n| -------------------- | --------------------------------------------------------------------------------------------- |\n| `SwaggerServiceName` | The name of the service to be used to generate .                                              |\n| `SpecPath`           | The path to the OpenAPI spec file. This is relative to the root of the repository.            |\n| `VERSION`            | The semvar version of the service. Used to keep the package version in step with the service. |\n| `REPO_OWNER`         | The owner of the service repository.                                                          |\n| `REPO_NAME`          | The name of the service repository.                                                           |\n| `GIT_TOKEN`          | Authorisation token used for pushing Python packages to a repository.                         |\n| `GIT_USER`           | The user to use for authenticating with GitHub                                                |\n\nThen to generate a package for a service, run the following command:\n\n```bash\njx3-openapi-generation generate \u003clanguages\u003e\n```\n\nwhere `\u003clanguages\u003e` is a space-separated list of languages to generate packages for.\n\n### Jenkins X\n\nTo call the CLI from a Jenkins X pipeline, add the following as the final step in the `release.yaml` or `pullrequest.yaml`\npipelines:\n\n```yaml\n- image: uses:spring-financial-group/jx3-openapi-generation/pipeline/generate-packages.yaml@master\n  name: \"\"\n  resources: {}\n```\n\nThe languages to generate packages for are configured by setting the environment variable `OutputLanguages` in the\nenvironment variables of the pipeline. The `SwaggerServiceName` \u0026 `SpecPath` variables are also required.\n\nNote that the other environment variables are set by default in JX pipelines so not required in your definition.\n\n```yaml\nenv:\n  - name: SwaggerServiceName\n    value: PetStoreService\n  - name: SpecPath\n    value: ./docs/swagger.json\n  - name: OutputLanguages\n    value: csharp angular java go typescript\n```\n\n#### Full Example\n\n```yaml\napiVersion: tekton.dev/v1beta1\nkind: PipelineRun\nmetadata:\n  name: pullrequest\nspec:\n  pipelineSpec:\n    tasks:\n    - name: from-build-pack\n      resources: {}\n      taskSpec:\n        metadata: {}\n        stepTemplate:\n          image: uses:jenkins-x/jx3-pipeline-catalog/tasks/go/pullrequest.yaml@versionStream\n          name: \"\"\n          resources:\n            limits: {}\n          workingDir: /workspace/source\n          env:\n          - name: SwaggerServiceName\n            value: PetStoreService\n          - name: SpecPath\n            value: ./docs/swagger.json\n          - name: OutputLanguages\n            value: csharp angular java\n        steps:\n        - image: uses:jenkins-x/jx3-pipeline-catalog/tasks/git-clone/git-clone-pr.yaml@versionStream\n          name: \"\"\n          resources: {}\n        - name: jx-variables\n          resources: {}\n        - name: build-make-build\n          resources: {}\n        - name: check-registry\n          resources: {}\n        - name: build-scan-push\n          resources: {}\n        - name: promote-jx-preview\n          resources: {}\n        - image: uses:spring-financial-group/jx3-openapi-generation/pipeline/generate-packages.yaml@master\n          name: \"\"\n          resources: {}\n  podTemplate: {}\n  serviceAccountName: tekton-bot\n  timeout: 1h0m0s\nstatus: {}\n```\n\n## Running Locally\n\nTo run the package locally you will need to do few prep steps before you can run the generation.\n\nOpen the service you wish to generate the packages for and ensure you have an OpenAPI specification file.\n\nThen set the required environment variables in your shell (or use an `.envrc` file with [direnv](https://direnv.net/) in the target repo folder).\n\nThe following environment variables are required:\n\n```\nVERSION=\"1.0.0\"\nREPO_OWNER=\"spring-financial-group\"\nREPO_NAME=\"mqube-something-service\"\nSwaggerServiceName=\"SomethingService\"\nSpecPath=\"./docs/openapi.json\"\nGIT_USER=\"your-git-username\"\nGIT_TOKEN=\"your-git-token\"\n```\n\nThen copy the `configs` directory from this repository to the root of the service repository.\n\nNext, open the `pkg/openapitools/config.go` and change the `ConfigsDir` to `\"./configs\"`.\nSince you want to run it locally you most likely want to view the generated packages, to do that you will need to comment out a line in `pkg/cmd/generate/generate_packages.go` that removes the temporary directory after generation look for `defer o.FileIO.DeferRemove(tmpDir)` in the `Run()` function.\n\nEach language generator has its own push logic, which will use your credentials to create a commit and push the generated package to the relevant repository. You want to ensure you have that code commented out before running the package generation locally, otherwise you will end up pushing - possibly - incompatible packages to the repositories.\n\nFINALLY. You are now ready to build the CLI. Run the following command to build the CLI in this repository folder:\n\n```bash\nmake build\n```\n\nThis will create the `jx3-openapi-generation` binary in the `build` directory.\n\nCopy the `jx3-openapi-generation` to the root folder of the target repository.\n\nThen run the following command to generate the packages:\n\n```bash\n./jx3-openapi-generation generate pkg python\n```\n\nYou may need to run `chmod +x ./jx3-openapi-generation` to make the binary executable first.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-financial-group%2Fjx3-openapi-generation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspring-financial-group%2Fjx3-openapi-generation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspring-financial-group%2Fjx3-openapi-generation/lists"}