{"id":21598805,"url":"https://github.com/ascendcorp/spring-restdocs-amqp","last_synced_at":"2025-03-18T11:40:25.406Z","repository":{"id":57717497,"uuid":"289876116","full_name":"ascendcorp/spring-restdocs-amqp","owner":"ascendcorp","description":"Rest docs extension for generate snippet from Spring Cloud Contract","archived":false,"fork":false,"pushed_at":"2020-08-24T08:53:24.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-24T17:46:11.869Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ascendcorp.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}},"created_at":"2020-08-24T08:51:10.000Z","updated_at":"2022-09-13T11:50:38.000Z","dependencies_parsed_at":"2022-09-10T18:02:56.228Z","dependency_job_id":null,"html_url":"https://github.com/ascendcorp/spring-restdocs-amqp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendcorp%2Fspring-restdocs-amqp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendcorp%2Fspring-restdocs-amqp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendcorp%2Fspring-restdocs-amqp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascendcorp%2Fspring-restdocs-amqp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascendcorp","download_url":"https://codeload.github.com/ascendcorp/spring-restdocs-amqp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244216054,"owners_count":20417543,"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-24T18:13:11.420Z","updated_at":"2025-03-18T11:40:25.384Z","avatar_url":"https://github.com/ascendcorp.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Rest Docs AMQP\n\n[![Apache 2.0](https://img.shields.io/github/license/micrometer-metrics/micrometer.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nSpring Rest Docs AMQP is extension for Spring Rest Docs and Spring Cloud Contract to generate snippet files from Contract, and we don't want repeat our self steps to manual create document specification of message schema. \n\nThis way, the message schema (snippet) is generated from Spring Cloud Contract testing in Aciidoctor format, and you can compile it to beautiful HTML or PDF document.\n\n\n## Pre-Requisite\n\nYour application implement Spring Cloud Contract with stub AMQP message configure.\n\n## Add test dependency \n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.ascendcorp\u003c/groupId\u003e\n    \u003cartifactId\u003espring-restdocs-amqp\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n    \u003cscope\u003etest\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n## Bind message processor \n\nInitial AMQP message post processor and bind with RabbitTemplate in contract test base class\n\n```java\n@Rule\npublic JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation(\"target/generated-snippets\");\n\n@Autowired\nRabbitTemplate rabbitTemplate;\n\n@Rule\npublic TestName testName = new TestName();\n``\n@Before\npublic void setup() {\n    String testName = this.testName.getMethodName();\n\n    AmqpMessagePostProcessor amqpMessagePostProcessor = new AmqpMessagePostProcessor(testName, restDocumentation, rabbitTemplate);\n    rabbitTemplate.setBeforePublishPostProcessors(amqpMessagePostProcessor);\n}\n```\n\nAfter run contract testing, the snippet file will be generated to target/generated-snippets/{methodName} folder\n\n\n\n-------------------------------------\n_Licensed under [Apache Software License 2.0](https://www.apache.org/licenses/LICENSE-2.0)_","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendcorp%2Fspring-restdocs-amqp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascendcorp%2Fspring-restdocs-amqp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascendcorp%2Fspring-restdocs-amqp/lists"}