{"id":24417202,"url":"https://github.com/defra/btms-backend-stub","last_synced_at":"2026-05-18T15:35:27.008Z","repository":{"id":271864779,"uuid":"914810967","full_name":"DEFRA/btms-backend-stub","owner":"DEFRA","description":"Git repository for service btms-backend-stub","archived":false,"fork":false,"pushed_at":"2025-02-26T09:54:27.000Z","size":226,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-13T12:26:19.792Z","etag":null,"topics":["backend","cdp","dotnet","service"],"latest_commit_sha":null,"homepage":null,"language":"C#","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":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":"2025-01-10T10:59:28.000Z","updated_at":"2025-02-26T09:53:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"e4d0bc0b-8458-4c8c-84cc-21ce7632a663","html_url":"https://github.com/DEFRA/btms-backend-stub","commit_stats":null,"previous_names":["defra/btms-backend-stub"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/DEFRA/btms-backend-stub","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fbtms-backend-stub","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fbtms-backend-stub/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fbtms-backend-stub/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fbtms-backend-stub/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DEFRA","download_url":"https://codeload.github.com/DEFRA/btms-backend-stub/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DEFRA%2Fbtms-backend-stub/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266578709,"owners_count":23951150,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["backend","cdp","dotnet","service"],"created_at":"2025-01-20T08:15:53.908Z","updated_at":"2026-05-18T15:35:26.971Z","avatar_url":"https://github.com/DEFRA.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Defra BTMS Backend Stub\n\nThis service provides stubbed responses for specific BTMS requests.\n\n## Prerequisites\n\nThe solution requires:\n\n- .NET 9\n\n  ```bash\n  brew tap isen-ng/dotnet-sdk-versions\n  brew install --cask dotnet-sdk9\n  ```\n\n- Docker\n\n## Installation\n\n1. Clone this repository\n2. Install the required tools with `dotnet tool restore`\n3. Check the solution builds with `dotnet build`\n4. Check the service builds with `docker build .`\n\n## Running\n\n1. Run the application via Docker:\n   ```\n   docker build -t btms-backend-stub .\n   docker run -p 8085:8085 btms-backend-stub\n   ```\n2. Navigate to http://localhost:8085\n\n## Responses\n\nSee the Scenarios folder for all available responses. Examples are as follows:\n\nGet import notification updates (see [Utility Endpoints](#utility-endpoints)):\n```http request\nhttp://localhost:8085/api/import-notifications\n```\n\nGet individual import notification:\n```http request\nhttp://localhost:8085/api/import-notifications/CHEDA.GB.2024.4792831\n```\n\nGet individual movement:\n```http request\nhttp://localhost:8085/api/movements/24GBCUDNXBN1JNRAR5\n```\n\nGet individual goods movement:\n```http request\nhttp://localhost:8085/api/gmrs/GMRA00KBHFE0\n```\n\n## Utility Endpoints\n\nA utility endpoint has been provided that will generate the import notification updates content based on the import notifications available in the Scenarios folder. Please use this if you want to update the stub response for import notification updates.\n```http request\nhttp://localhost:8085/utility/import-notification-updates\n```\n\nCopy the output and save it over [btms-import-notification-updates.json](src/BtmsBackendStub/Scenarios/btms-import-notification-updates.json).\n\n## Development\n\nAny new scenarios should be added to the Scenarios folder and they will be included automatically.\n\nScenarios requiring specific configuration in code should be registered in the `WireMockHostedService`.\n\n## Testing\n\nRun the service via Docker and test the output is as expected.\n\n# Linting\n\nWe use [CSharpier](https://csharpier.com) to lint our code.\n\nYou can run the linter with `dotnet csharpier .`\n\n## License\n\nThis project is licensed under The Open Government Licence (OGL) Version 3.  \nSee the [LICENSE](./LICENSE) for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fbtms-backend-stub","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefra%2Fbtms-backend-stub","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefra%2Fbtms-backend-stub/lists"}