{"id":20038962,"url":"https://github.com/defra/rod-catch-returns-api","last_synced_at":"2025-05-05T07:32:24.681Z","repository":{"id":44500407,"uuid":"145827515","full_name":"DEFRA/rod-catch-returns-api","owner":"DEFRA","description":"Spring Data Rest API for Rod Catch Returns","archived":false,"fork":false,"pushed_at":"2025-03-17T15:27:29.000Z","size":605,"stargazers_count":2,"open_issues_count":5,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-08T19:08:14.656Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DEFRA.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2018-08-23T08:54:41.000Z","updated_at":"2025-03-17T15:27:32.000Z","dependencies_parsed_at":"2024-06-17T07:56:12.418Z","dependency_job_id":"259de2de-5757-4850-84e8-c90098721110","html_url":"https://github.com/DEFRA/rod-catch-returns-api","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/DEFRA%2Frod-catch-returns-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Frod-catch-returns-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Frod-catch-returns-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Frod-catch-returns-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/rod-catch-returns-api/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252458580,"owners_count":21751066,"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-11-13T10:34:29.669Z","updated_at":"2025-05-05T07:32:24.128Z","avatar_url":"https://github.com/DEFRA.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rod Catch Returns API\n[![Build Status](https://github.com/defra/rod-catch-returns-api/workflows/build.yml/badge.svg)](https://github.com/defra/rod-catch-returns-api/actions)\n[![Maintainability](https://api.codeclimate.com/v1/badges/5a286ee063b6b20e6129/maintainability)](https://codeclimate.com/github/DEFRA/rod-catch-returns-api/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/5a286ee063b6b20e6129/test_coverage)](https://codeclimate.com/github/DEFRA/rod-catch-returns-api/test_coverage)\n[![Licence](https://img.shields.io/badge/Licence-OGLv3-blue.svg)](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3)\n\nSpring Data REST API for Rod Catch Returns.\n\nWhen you purchase a migratory salmon and sea trout rod licence, you are legally required to submit a catch return, which is a log of the fish caught that season. Users are sent a paper copy of the catch return form with their licence, and also directed towards the catch return website.\n\nUsers are asked to submit details of the fish they caught (species, weight, number etc) and where they caught them.\n\nThis API provides validation and persistence capabilities for Rod Catch Returns data.\n\n\n## Cloning\nCloning via SSH from behind a corporate firewall which blocks port 22:\n```bash\ngit clone ssh://git@ssh.github.com:443/DEFRA/rod-catch-returns-api\n```\n\n## Prerequisites\n\n- Java 11\n- (Optional) Maven 3.54 or greater (or use the supplied mvnw wrapper)\n\n### Installing Java 11 on MacOS Catalina\n\nTo check your java version, do `java -version`. If you're not using v11, do:\n```bash\nsdk i java 11.0.2-open\n```\nFollowed by\n```bash\nsdk default java 11.0.2-open\n```\nTo default to Java 11.\nThis presumes you have sdkman installed, see here if you don't: https://sdkman.io/install\nThen add this to your shell config file (e.g. `.zshrc`):\n```\nexport SDKMAN_DIR=\"~/.sdkman\"\n[[ -s \"~/.sdkman/bin/sdkman-init.sh\" ]] \u0026\u0026 source \"~/.sdkman/bin/sdkman-init.sh\"\n```\n\n## Use with Visual Studio Code\n\nIf you're working with Visual Studio Code, you'll need some additional extensions:\n- Lombok Annotations Support\n- Spring Boot Tools\n- Maven for Java\n\n## Local Environment\n\nThe launches/docker-stack/rcr-local-services-stack.yml config exists to provide local Postgres and Redis instances:\n```bash\ndocker stack deploy -c launches/docker-stack/rcr-local-services-stack.yml rcr\n```\nCreate a local .env file:\n```bash\ncp .env.example .env \n```\nThen initialise the database:\n```bash\nlaunches/dbctl init\n```\nFinally, run the migrations:\n```bash\nlaunches/dbctl update\n```\nAfter this, you can launch in default profile rather than using the in-memory database\n\n## Launching via the spring-boot maven plugin (development use)\n\nRun with default profile (using configured database):\n```bash\nlaunches/serverctl run\n```\n\nRun with in-memory database for testing:\n```bash\nlaunches/serverctl run --spring.profiles.active=h2\n```\n\n## Compilation\n\n```bash\n./mvnw clean\n./mvnw compile\n```\n\n## Verifying changes\n\nTo run unit and integration tests:\n```bash\n./mvnw verify\n```\n\nFull verification with OWASP dependency security checks:\n```bash\n./mvnw -P full-verify verify\n```\n\n## Generating site reports\nTo generate all site reports to target/site:\n\n```bash\n./mvnw verify site\n```\n\nThis report includes:\n\n| Document          | Description |\n| ---               | ---         |\n|Javadoc            | Javadoc API documentation. |\n|Test Javadoc       | Test Javadoc API documentation.|\n|Surefire Report    | Report on the test results of the project.|\n|Failsafe Report\t| Report on the integration test results of the project. |\n|Checkstyle         | Report on coding style conventions.|\n|Source Xref        | HTML based, cross-reference version of Java source code.|\n|Test Source Xref\t| HTML based, cross-reference version of Java test source code.|\n|FindBugs\t        | Generates a source code report with the FindBugs Library.|\n|JaCoCo\t            | JaCoCo Coverage Report.|\n\n\nTo include the OWASP dependency security report:\n\n```bash\n./mvnw -P full-verify verify site\n```\n\nIn addition to the reports listed above, this includes:\n\n| Document          | Description |\n| ---               | ---         |\n|dependency-check\t|Generates a report providing details on any published vulnerabilities within project dependencies. This report is a best effort and may contain false positives and false negatives.|\n\n\n## Building a jar with an embedded server\n```bash\n./mvnw package\n```\n\n## Building a docker container image\n```bash\n./mvnw dockerfile:build\n```\nThe new image will be installed into the local docker repository under drp/rcr_api:latest\n\n## Configuration\n\n### App Config\nThis is done in src/main/resources/application.yml, which is setup for local development. These settings are overridden by values in the rod-catch-returns-deployments repo in GitLab. \nTo overwrite them locally, use an .env file in the root of the repo. Each setting can be overridden by following the nesting, but transforming each setting to uppercase and delimiting with an underscore. For example, to override this:\n```yaml\nhere:\n  is:\n    a:\n      setting: abc\n```\nPut this into an .env file:\n```\nHERE_IS_A_SETTING=def\n```\n\n### Database config\nThe liquibase database migrations are held in xml files, in src/main/resources/db/changelog. The naming convention is hopefully obvious, just continue suffixing a version number as new versions are published, and making sure the new migration file is referenced in the master file in the correct sequence. The master file is referenced by the liquibase.properties file.\n\n## Contributing to this project\n\nIf you have an idea you'd like to contribute please log an issue.\n\nAll contributions should be submitted via a pull request.\n\n## License\n\nTHIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:\n\nhttp://www.nationalarchives.gov.uk/doc/open-government-licence/version/3\n\nThe following attribution statement MUST be cited in your products and applications when using this information.\n\n\u003eContains public sector information licensed under the Open Government license v3\n\n### About the license\n\nThe Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.\n\nIt is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Frod-catch-returns-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Frod-catch-returns-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Frod-catch-returns-api/lists"}