{"id":20471601,"url":"https://github.com/backbase/api-simulator","last_synced_at":"2025-10-04T18:01:34.198Z","repository":{"id":39626894,"uuid":"345700211","full_name":"Backbase/api-simulator","owner":"Backbase","description":"A service that's capable of registering itself in a service registry and simulate request handling based solely on an API specification and the examples it contains.","archived":false,"fork":false,"pushed_at":"2023-09-08T12:23:20.000Z","size":21445,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-06-30T14:54:21.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","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/Backbase.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-03-08T15:21:15.000Z","updated_at":"2024-06-28T10:49:34.000Z","dependencies_parsed_at":"2025-04-13T11:19:08.172Z","dependency_job_id":"bc657199-44f7-495d-9246-01787a591aa5","html_url":"https://github.com/Backbase/api-simulator","commit_stats":null,"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"purl":"pkg:github/Backbase/api-simulator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fapi-simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fapi-simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fapi-simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fapi-simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Backbase","download_url":"https://codeload.github.com/Backbase/api-simulator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Backbase%2Fapi-simulator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262801360,"owners_count":23366550,"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-15T14:16:45.197Z","updated_at":"2025-10-04T18:01:33.782Z","avatar_url":"https://github.com/Backbase.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Simulator\n\n## Description\n\nA service that's capable of registering itself in a service registry and do the following:\n- simulate request handling based solely on an API specification and the examples it contains with [Prism](https://github.com/stoplightio/prism)\n- simulate request handling based on stub mappings with [WireMock](http://wiremock.org/)\n\nThis allows simulating services that have not been implemented yet or will not be implemented by Backbase because\nthey're meant to be implemented by external parties such as integration APIs.\n\nIt's also possible to mock external dependencies so that performance tests provide consistent results and don't fail\nbecause of external dependency failures.\n\n## Requirements\n\n- an OpenAPI specification or stub mappings\n\n## Setup\n\nBuild it as a regular maven project with `mvn clean install`.\n\n## Configuration\n\nThe following properties are always configured:\n\n- `spring.application.name`: name of the service that you'll simulate, `card-manager` for example\n- `backbase.api.simulator.specAuthorizations.domain-name`: map of domain name to access token to download OpenAPI spec,\nreplace `domain-name` with the domain you'd like to configure\n\nOne of the following needs to be configured:\n\n- `backbase.api.simulator.spec`: OpenAPI specification file path or URL for Prism that will be simulated\n- `mappings directory`: directory containing stub mappings for WireMock\n\n## Known issues\n\nhttps://github.com/stoplightio/prism/issues/1578:\n\nPrism uses a non-configurable timeout of 5 seconds to download the OpenAPI specification and fails with the message\n`socket hang up` if the download takes longer than that, a workaround is to use a local file instead.\n\n## Execution with Prism\n\n### Preparation\n\nDownload an OpenAPI specification and copy it to `config/openapi.yaml`.\nIt's also possible to configure a URL so that the service can download it at startup.\n\n### Locally\n\nRun it as a Spring Boot application with working directory pointing to the root directory of this project.\nUse `com.backbase.api.simulator.Application` as main class, `local` profile and configure it with\n`config/application-local.yml` file.\n\n### Docker\n\nExecute the following command to generate a docker image:\n\n`mvn clean install jib:dockerBuild -Pdocker-image`\n\nThen you can run the service with:\n\n`docker run -v $(pwd)/config/openapi.yaml:/config/openapi.yaml --env-file ./config/env.list -p 8080:8080 --rm -it your-image-name`\n\n## Execution with WireMock\n\n### Preparation\n\nCreate stub mappings according to [WireMock's documentation](http://wiremock.org/docs/stubbing/).\n\nStub mappings must be in a directory called `mappings`.\n\n### Locally\n\nRun it as a Spring Boot application with working directory pointing to the root directory of this project.\nUse `com.backbase.api.simulator.Application` as main class, `local` profile and configure it with\n`config/application-local.yml` file.\n\n### Docker\n\nThe following docker-compose runs `api-simulator` with WireMock:\n\n```yaml\n  access-control:\n    image: harbor.backbase.eu/internal/api-simulator:${API_SIMULATOR_VERSION}\n    environment:\n      spring.application.name: access-control\n      backbase.api.simulator.mode: PERFORMANCE\n      backbase.api.simulator.port: 8080\n      server.port: 18080\n    volumes:\n      - ./performance/access-control:/config\n```\n\nWhere the directory `./performance/access-control/mappings` contains JSON stub mapping files.\n\n## Useful links\n\n- [Prism API server](https://github.com/stoplightio/prism)\n- [Browser extension to send custom headers in requests](https://bewisse.com/modheader/)\n- [WireMock on GitHub](https://github.com/wiremock/wiremock)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackbase%2Fapi-simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackbase%2Fapi-simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackbase%2Fapi-simulator/lists"}