Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding custom information to generated pact json file #400

Closed
ghost opened this issue Apr 10, 2017 · 3 comments
Closed

Adding custom information to generated pact json file #400

ghost opened this issue Apr 10, 2017 · 3 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2017

Hi!

Is it somehow possible to add a custom metadata tag in the generated pact json file?

Something like this:

    "metadata": {
        "pact-specification": {
            "version": "2.0.0"
        },
        "pact-jvm": {
            "version": "3.3.6"
        },
        "internal-project-version": {
            "version": "34.A"
        }
    }

Yours
Carlo

@gammabowl
Copy link
Contributor

gammabowl commented Apr 11, 2017

we can add more tags in the DEFAULT_METADATA - but then you would have to compile and have your own jar version - or we could ask @uglyog if its fine and makes sense to add custom tags and we could put in a PR - https://github.com/DiUS/pact-jvm/blob/master/pact-jvm-model/src/main/groovy/au/com/dius/pact/model/BasePact.groovy#L18

@uglyog
Copy link
Member

uglyog commented Apr 14, 2017

It definitely makes sense. The point of the metadata map is to be able record any key-value pairs. The only important information in there is the specification version.

I would update the various DSLs to be able to add key-value pairs to the Pact metadata.

@uglyog
Copy link
Member

uglyog commented Jan 12, 2022

Released 4.3.4 with this change

@uglyog uglyog closed this as completed Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants