{"id":27646235,"url":"https://github.com/znsio/specmatic-async-order-api-kotlin","last_synced_at":"2025-04-24T01:17:44.347Z","repository":{"id":282668571,"uuid":"949286916","full_name":"znsio/specmatic-async-order-api-kotlin","owner":"znsio","description":"Order API accepts request for an order which is created asynchronously.","archived":false,"fork":false,"pushed_at":"2025-04-17T12:19:31.000Z","size":7108,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-18T02:52:29.979Z","etag":null,"topics":["request-reply"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/znsio.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,"zenodo":null}},"created_at":"2025-03-16T05:09:52.000Z","updated_at":"2025-04-03T13:43:35.000Z","dependencies_parsed_at":"2025-04-10T12:21:28.071Z","dependency_job_id":"1ec38872-1dfb-43a4-a4a0-1fa17b75af92","html_url":"https://github.com/znsio/specmatic-async-order-api-kotlin","commit_stats":null,"previous_names":["znsio/specmatic-async-order-api-kotlin"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-async-order-api-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-async-order-api-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-async-order-api-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/znsio%2Fspecmatic-async-order-api-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/znsio","download_url":"https://codeload.github.com/znsio/specmatic-async-order-api-kotlin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250540898,"owners_count":21447428,"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":["request-reply"],"created_at":"2025-04-24T01:17:43.735Z","updated_at":"2025-04-24T01:17:44.341Z","avatar_url":"https://github.com/znsio.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# async-order-api\nOrder API accepts request for an order which is created asynchronously.\n1. Upon receiving request to create Order, it adds entry into SQL DB with status as `ACCEPTED`, sends a message on Kafka for further processing and responds with a `202`\n2. Eventually when it hears back on a separate Kafka topic about the status of the Order it updates the status of that Order in the SQL DB\n3. The service also exposes a `GET` endpoint so that API consumers can view the status of the Order\n\n## Specmatic Contract Test Setup\n1. We use OpenAPI spec to contract test on the HTTP interface which results in the application posting to a Kafka Broker\n2. And Specmatic Kafka Mock uses AsyncAPI spec to spin up a Mock Kafka Broker to received, validate and respond with appropriate messages\n  a. We are leveraging `request-reply` pattern in AsyncAPI here\n\n## How to run contract tests manually?\n\n1. Set up the specmatic kafka mock:\n```shell\n./setup-specmatic-kafka-mock.sh\n```\n2. Run the application:\n```shell\n./gradlew bootRun\n```\n\n3. Run the contract test:\n```shell\n./runContractTest.sh\n```\n\n4. Stop the application.\n\n5. Clean up the specmatic kafka mock once test run is complete:\n```shell\n./cleanup-specmatic-kafka-mock.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-async-order-api-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fznsio%2Fspecmatic-async-order-api-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fznsio%2Fspecmatic-async-order-api-kotlin/lists"}