{"id":20148569,"url":"https://github.com/hltech/vaunt","last_synced_at":"2026-03-06T06:31:11.729Z","repository":{"id":57724988,"uuid":"179324496","full_name":"HLTech/vaunt","owner":"HLTech","description":null,"archived":false,"fork":false,"pushed_at":"2019-08-19T15:06:50.000Z","size":231,"stargazers_count":10,"open_issues_count":7,"forks_count":1,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-23T21:46:01.820Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Groovy","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/HLTech.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":"2019-04-03T16:02:52.000Z","updated_at":"2021-11-09T12:04:06.000Z","dependencies_parsed_at":"2022-09-11T01:50:24.093Z","dependency_job_id":null,"html_url":"https://github.com/HLTech/vaunt","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HLTech%2Fvaunt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HLTech%2Fvaunt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HLTech%2Fvaunt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HLTech%2Fvaunt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HLTech","download_url":"https://codeload.github.com/HLTech/vaunt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103903,"owners_count":21048244,"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-13T22:38:09.583Z","updated_at":"2026-03-06T06:31:11.628Z","avatar_url":"https://github.com/HLTech.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vaunt\n\n[![Build Status](https://travis-ci.org/HLTech/vaunt.svg?branch=master)](https://travis-ci.org/HLTech/vaunt)\n[![Coverage Status](https://coveralls.io/repos/github/HLTech/vaunt/badge.svg?branch=master)](https://coveralls.io/github/HLTech/vaunt?branch=master)\n[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/HLTech/vaunt/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/HLTech/vaunt/?branch=master)\n\n## Table of Contents\n1. [**Overview**](#Overview)\n2. [**Idea**](#Idea)\n3. [**Built with**](#BuiltWith)\n4. [**Authors**](#Authors)\n5. [**License**](#License)\n\n## Overview \u003ca name=\"Overview\"\u003e\u003c/a\u003e\n\nThis repository contains toolkit to define and validate contracts in JMS\n\n## Idea \u003ca name=\"Idea\"\u003e\u003c/a\u003e\n\nThere are 3 most typical scenarios and any other scenario is a combination of these 3.\n\n\nScenario I:    Service 1 -\u003e Queue A -\u003e Service 2  \nScenario II:   Service 3 -\u003e Topic B -\u003e Service 4  \nScenario III:  Service 5 -\u003e Topic C -\u003e Queue D -\u003e Service 6  \n\nIn Scenario I Service 1 sends commands to Queue A. Service 2 handles these commands.  \nIn Scenario II Service 3 publishes events to Topic B. Service 4 listens to the events.  \nIn Scenario III Service 5 publishes events to Topic C. They are sent further to Queue D and Service 6 listens to the events. \n\nA provider is a service providing functionality to other services.  \nA consumer is a service depending on functionality provided by the provider.  \nWhat does it mean from the perspective of 3 specified scenarios?  \nIn scenario I Service 2 is the provider. It accepts commands (to perform a task) via its queue from Service 1, which is a consumer of its functionality.  \nIn scenario II Service 3 is the provider. Events generated by Service 3 are consumed by Service 4, therefore Service 4 is the consumer.  \nIn scenario III situation is similar like in scenario II. Queue D is an internal concern of Service 6. This scenario may be simplified to the following one:  \nScenario IIIb: Service 5 -\u003e Topic C -\u003e (Queue D) Service 6  \nAs a result, Service 5 is the provider, service 6 is the consumer.\n\nA contract contains:\n* Provider's JMS destination type: topic/queue/temporary queue\n* Provider's JMS destination name (omitted in case of temporary queues)\n* Message id (by default name of the class representing message, can be customized)\n* JSON schema of a message exchanged between consumer and provider\n\nCapabilities of a provider should contain the contract.  \nExpectations of a consumer should contain the contract and name of the provider.\n\nAnnotations @Consumer and @Provider should be used on messages exchanged between consumer and provider. One message can be\nannotated with multiple annotations For now classes representing messages should have the same name. Objects belonging to \nother via composition might have different names (ids).\n\nIt is possible to provide properties with JMS destination names.\n\nFields contained in message on provider side must be a superset of fields contained in message on consumer side. \nSame applies to enums. Enum on provider side can be represented by String as well.\nIt requires setting DeserializationFeature.READ_UNKNOWN_ENUM_VALUES_AS_NULL in ObjectMapper (or equivalent)\nin producer and @JsonIgnoreProperties(ignoreUnknown = true) (or equivalent) in case of Strings.\n\nVaunt-Generator does not use \"ref\" (i. e. uses inlining) with the exception of JsonSchema (threat of StackOverflow).\n\nCurrently Vaunt Validator supports BooleanSchema, IntegerSchema, NumberSchema, ObjectSchema, StringSchema, ArraySchema.\n\nVaunt validator validates in order how contract is specified i.e. when expectations are verified and no capabilities \nmatch them, then in results the most similar expectations and corresponding errors are displayed\n\n## Example of code snippet with test creating Vaunt contract\n```\n@SpringBootTest\nclass GenerateVauntIT extends Specification {\n\n    @Autowired\n    Environment env\n\n    @Autowired\n    private ApplicationContext applicationContext\n\n    @Subject\n    VauntGenerator vauntGenerator = new VauntGenerator()\n\n    def 'should generate vaunt file'() {\n        expect:\n            YAMLConfiguration config = new YAMLConfiguration()\n            config.read(new FileInputStream(\"src/main/resources/application.yml\"))\n\n            def props = new Properties()\n            for(String key : config.getKeys()) {\n                props.put(key, env.getProperty(key))\n            }\n\n            vauntGenerator.writeVauntFile('com.hltech.sample.component', 'sample-component', 'target/classes/static/vaunt', props)\n    }\n}\n```\n\n## Built with \u003ca name=\"BuiltWith\"\u003e\u003c/a\u003e\n\n* [Gradle](https://gradle.org/) - dependency management \u0026 build tool\n\n## Authors \u003ca name=\"Authors\"\u003e\u003c/a\u003e\n\n* **Filip Łazarski** - *Development* - [Felipe444](https://github.com/Felipe444)\n\n## License \u003ca name=\"License\"\u003e\u003c/a\u003e\n\nvaunt is [MIT licensed](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhltech%2Fvaunt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhltech%2Fvaunt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhltech%2Fvaunt/lists"}