pact-foundation / pact-support

Shared code for Pact gems
MIT License
7 stars 47 forks source link

Fix for generation of invalid json #113

Open dgsuarez opened 18 hours ago

dgsuarez commented 18 hours ago

Seems like the fix introduced in https://github.com/pact-foundation/pact-support/commit/f54a97c93fdaa3bd769b8963e290358143862070 has a couple of issues:

We've ran into the second issue, it's preventing us from upgrading since some of our pipelines fail.

The solution is hacky, it relies on the json being pretty formatted. In that case each line should have a single value, and the {} or [], with an extra , should be the last content in the line.

{
  "empty_array": [],
  "other": {
    "more": "fields"
  },
  "empty_hash": {}
}
YOU54F commented 5 hours ago

thanks @dgsuarez, appreciate the extra eyes and fix

could you update the commit to fix: desc as we use our commit messages in the release process to choose the correct version number.

without it, it won’t recognise the change at release time

dgsuarez commented 1 hour ago

Got it, done @YOU54F 👍