{"id":20357055,"url":"https://github.com/mariocandela/user-api","last_synced_at":"2026-04-17T11:32:20.667Z","repository":{"id":128987465,"uuid":"511253148","full_name":"mariocandela/user-api","owner":"mariocandela","description":"Public template Java Spring Microservice with OpenAPI and MongoDB","archived":false,"fork":false,"pushed_at":"2022-11-09T08:25:53.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-22T09:25:36.686Z","etag":null,"topics":["bdd","docker","java","mongodb","open-api-v3","spring-boot","spring-template","swagger-codegen","unittest"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mariocandela.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-07-06T18:38:00.000Z","updated_at":"2024-01-23T22:28:13.000Z","dependencies_parsed_at":"2023-03-13T11:26:56.689Z","dependency_job_id":null,"html_url":"https://github.com/mariocandela/user-api","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/mariocandela/user-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocandela%2Fuser-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocandela%2Fuser-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocandela%2Fuser-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocandela%2Fuser-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mariocandela","download_url":"https://codeload.github.com/mariocandela/user-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mariocandela%2Fuser-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31927782,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T10:35:34.458Z","status":"ssl_error","status_checked_at":"2026-04-17T10:35:09.472Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["bdd","docker","java","mongodb","open-api-v3","spring-boot","spring-template","swagger-codegen","unittest"],"created_at":"2024-11-14T23:19:10.088Z","updated_at":"2026-04-17T11:32:20.646Z","avatar_url":"https://github.com/mariocandela.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User-API (Spring boot example template) ![CI](https://github.com/mariocandela/user-api/actions/workflows/CI.yml/badge.svg) ![Docker](https://github.com/mariocandela/user-api/actions/workflows/docker-image.yml/badge.svg)\n\n[![Schermata-2022-07-10-alle-13-37-23.png](https://i.postimg.cc/zf80v4HX/Schermata-2022-07-10-alle-13-37-23.png)](https://i.postimg.cc/zf80v4HX/Schermata-2022-07-10-alle-13-37-23.png)\n\nExample Template: Java Spring, OpenAPI, MongoDB, Docker, Full local dev environment, Helm chart 🚀\n\n## Quick Start\n\nUsing [`docker-compose`](https://docs.docker.com/compose/)\n\n```bash\n$ docker-compose build\n$ docker-compose up -d\n ```\n \n Unit Test:\n\n```bash\n$ mvn test\n ```\n\n## Services\n\n- User API: http://localhost:8080/\n- Prometheus Open Metrics: http://localhost:8080/actuator/prometheus\n- Mongo Express UI: http://localhost:8888/\n- Mongodb: localhost:27017\n\n## How to invoke the Rest APIs?\n\nImport the file ```swagger/openapi.yaml``` in Postman\n\n## Features\n\n- OpenApi CodeGen integration Spec 3.0\n- Open Metrics Prometheus\n- Docker compose for full local dev environment(Java Spring, Mongo DB, Mongo Express)\n- Java Spring Container Docker with multistage build\n- Example BDD Unit Test\n- Continuous Integration Pipeline (Build Docker Image/Build/Unit Test on new Pull Request) on Github Actions\n- Helm chart, Kubernetes deploy\n\n### Example Open API User\n\n###### swagger/openapi.yaml\n\n```yaml\nopenapi: 3.0.0\ninfo:\n  version: 1.0.0\n  title: User API\n  description: Example Java Spring Microservice with OpenAPI and MongoDB\n\nservers:\n  - url: http://localhost:8080/\n\npaths:\n  /users:\n    get:\n      description: Returns a list of users\n      operationId: findUser\n      parameters:\n        - name: name\n          in: query\n          schema:\n            type: string\n        - name: surname\n          in: query\n          schema:\n            type: string\n      responses:\n        '200':\n          description: Successfully returned a list of users\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/User'\n        '400':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n\n    post:\n      description: Create a new User\n      operationId: createUser\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n      responses:\n        '201':\n          description: Successfully created a new user\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n        '422':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n\n  /users/{email}:\n    get:\n      description: Get User by key (email)\n      operationId: getUser\n      parameters:\n        - name: email\n          in: path\n          required: true\n          schema:\n            type: string\n\n      responses:\n        '200':\n          description: Successfully returned an user\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n\n        '400':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n        '404':\n          description: Not found User\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n    put:\n      description: Update User\n      operationId: updateUser\n      parameters:\n        - name: email\n          in: path\n          required: true\n          schema:\n            type: string\n      requestBody:\n        required: true\n        content:\n          application/json:\n            schema:\n              $ref: '#/components/schemas/User'\n\n      responses:\n        '200':\n          description: Successfully updated an user\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/User'\n\n        '400':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n        '404':\n          description: Not found User\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n    delete:\n      description: Delete User by Key\n      operationId: deleteUser\n      parameters:\n        - name: email\n          in: path\n          required: true\n          schema:\n            type: string\n\n      responses:\n        '200':\n          description: Successfully deleted an user\n\n        '400':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n        '404':\n          description: Not found User\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\n\n  /etl/import-csv:\n    post:\n      description: ETL Import Users by CSV file, example CSV line name#surname#email#address\n      operationId: importCSVUsers\n      requestBody:\n        content:\n          application/csv:\n            schema:\n              type: string\n              format: base64\n      responses:\n        '201':\n          description: Successfully imported CSV Users\n          content:\n            application/json:\n              schema:\n                type: array\n                items:\n                  $ref: '#/components/schemas/User'\n\n        '400':\n          description: Invalid request\n          content:\n            application/json:\n              schema:\n                $ref: '#/components/schemas/UserError'\ncomponents:\n  schemas:\n    User:\n      type: object\n      required:\n        - name\n        - surname\n        - email\n        - address\n      properties:\n        name:\n          type: string\n          minLength: 1\n        surname:\n          type: string\n          minLength: 1\n        email:\n          type: string\n          format: email\n          minLength: 1\n        address:\n          type: string\n          minLength: 1\n    UserError:\n      type: object\n      required:\n        - message\n      properties:\n        message:\n          type: string\n ```\n\n## Documentation\n\n- [API Docs](https://) #TODO\n\n## Contributing\n\nWelcomes contributions and project participation! There's a bunch of things you can do if you want to contribute! The [Contributor Guide](CONTRIBUTING.md) has all the information you need for everything from reporting bugs to contributing entire new features. Please don't hesitate to jump in if you'd like to, or even ask us questions if something isn't clear.\n\nAll participants and maintainers in this project are expected to follow [Code of Conduct](CODE_OF_CONDUCT.md), and just generally be excellent to each other.\n\nHappy hacking!\n\n## License\n\nThis project is licensed under [GNU GPL 3 License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariocandela%2Fuser-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmariocandela%2Fuser-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmariocandela%2Fuser-api/lists"}