{"id":22615589,"url":"https://github.com/marcellodesales/swagger-client-package-repo-gen","last_synced_at":"2025-03-29T00:42:38.410Z","repository":{"id":47687832,"uuid":"310291915","full_name":"marcellodesales/swagger-client-package-repo-gen","owner":"marcellodesales","description":"Generates not only the stub classes, but also sets up the entire repo, including publishing artifacts","archived":false,"fork":false,"pushed_at":"2022-11-16T02:56:07.000Z","size":87,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-03T10:46:22.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/marcellodesales.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}},"created_at":"2020-11-05T12:29:08.000Z","updated_at":"2022-07-30T23:57:33.000Z","dependencies_parsed_at":"2023-01-23T08:15:54.216Z","dependency_job_id":null,"html_url":"https://github.com/marcellodesales/swagger-client-package-repo-gen","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fswagger-client-package-repo-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fswagger-client-package-repo-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fswagger-client-package-repo-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcellodesales%2Fswagger-client-package-repo-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcellodesales","download_url":"https://codeload.github.com/marcellodesales/swagger-client-package-repo-gen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246122247,"owners_count":20726822,"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-12-08T19:08:26.515Z","updated_at":"2025-03-29T00:42:38.391Z","avatar_url":"https://github.com/marcellodesales.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# What\n\nSwagger API Code generator and Git Repo Management for https://swagger.io/docs/open-source-tools/swagger-codegen/\n\n* Generates the Swagger API client files\n  * Provided by Swagger Codegen project\n  * Includes documentation in some cases\n  * https://github.com/swagger-api/swagger-codegen/blob/master/modules/swagger-codegen-maven-plugin/README.md\n  * https://www.baeldung.com/spring-boot-rest-client-swagger-codegen\n* Create a Git Repository based on the parameters provided\n  * [x] Gitlab Repo Creation and Updates, Gitlab Package Registry Updates\n  * [ ] Github Repo Creation and Updates, Github Package Registry updates\n* Creates stubs in the supported languages\n  * [x] Java -\u003e Maven\n  * [ ] Nodejs / Javascript -\u003e NPM\n  * [ ] Python -\u003e PyPi\n  * [x] Git -\u003e Flutter\n  * [ ] ...\n\n[![asciicast](https://asciinema.org/a/Efs9Dx1lPem7ezfAidJJSNGfa.svg)](https://asciinema.org/a/Efs9Dx1lPem7ezfAidJJSNGfa)\n\n# Why\n\n* It's faster to get started and test client implementations\n* It's a well-defined process and anyone can quickly iterate over it\n* All the client APIs are published to both the git repo and the component repo\n\n# How\n\n* Create an `input.env` file with parameters\n  * Use the `template-docker-compose.env`\n* Invoke `docker-compose` with it and profit\n\n# Setup\n\n1. Download a client swagger docs json file\n\n```console\n$ curl -o parking-plus.json https://demonstracao.parkingplus.com.br/servicos/v2/api-docs\n```\n\n2. Create the env file, say `parking-plus.env` with the properties for swagger gen to generate code\n\n\u003e **NOTE**: These files must be on the same dir\n\n```properties\n#####\n##### Swagger Gen Language settings\n#####\n\n# The name of the file downloaded from step 1 download\nSCHEMA_FILE_NAME=parking-plus.json\n\n#####\n##### Source-code specific generation\n#####\n\n# The target language to generate the code\nGENERATE_CLIENT_LANG=java\n\n# The target library to be used for the selected code\nGENERATE_CLIENT_WITH_LIBRARY=feign\n\n# The packages for the generation framework for api, invoker, model, in this case\n# java package where the code lives\nGENERATE_CLIENT_MODEL_PACKAGE=cash.super_.platform.client.parkingplus.model\nGENERATE_CLIENT_API_PACKAGE=cash.super_.platform.client.parkingplus.api\nGENERATE_CLIENT_INVOKER_PACKAGE=cash.super_.platform.client.parkingplus.invoker\n\n#####\n##### Swagger Gen Packaging settings\n#####\n\n# The group id used for the package, in this case, java \nGENERATE_CLIENT_GROUPID=cash.super_.platform.client\n\n# The name of the artifact of the package, in this case, java\nGENERATE_CLIENT_ARTIFACT=parking-plus-client\n\n# The version of the client... Will be SNAPSHOT by default\nGENERATE_CLIENT_VERSION=2.0.0\n\n#####\n##### Swagger Gen Packaging and Version control for pushing automatically\n#####\n\n# CI/CD Settings for packages like java to include pom.xml (git repo) for ssh push\nGENERATE_CLIENT_URL=https://gitlab.com/supercash/clients/parking-plus-client\nGENERATE_CLIENT_GIT_HOST=gitlab.com\nGENERATE_CLIENT_GIT_USER_REPO=supercash/clients/parking-plus-client\nGENERATE_CLIENT_GIT_BRANCH=develop\nGENERATE_CLIENT_GITLAB_PROJECT_ID=22268428\n\n# The committer information that's recorded in the commit of new changes\nGENERATE_CLIENT_AUTHOR_FULLNAME=Marcello de Sales\nGENERATE_CLIENT_AUTHOR_EMAIL=marcello.desales@gmail.com\n\n#####\n##### Controls to push to git repo or publish to maven directly\n#####\n\n# Push code to the git repo when generating\nGENERATE_CLIENT_GIT_PUSH=true\n\n# Publish to maven directly if not done by CI/CD\n# Uncomment if you don't have CI/CD to perform the publish\n#GENERATE_CLIENT_PUBLISH_TOKEN=XyV******du9r\n```\n\n# Running\n\n\u003e **ATTENTION**: Make sure to copy the template `template-docker-compose.env` and set your own variables.\n\n* Use docker-compose to run a container with the generation\n\n```console\n$ docker-compose --env-file parking-plus.env up --build\n```\n\n* Before running again, remove the previous container\n\n```console\n$ docker-compose --env-file parking-plus.env rm --force\nGoing to remove swagger-client-pacakge-repo-gen_swagger-client-repo-gen_1\nRemoving swagger-client-pacakge-repo-gen_swagger-client-repo-gen_1 ... done\n```\n\n# Development\n\n* Send a PR if there's any problem you encounter!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcellodesales%2Fswagger-client-package-repo-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcellodesales%2Fswagger-client-package-repo-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcellodesales%2Fswagger-client-package-repo-gen/lists"}