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

feat(mojaloop/#2704): core-services support for non-breaking backward api compatibility #436

Conversation

mdebarros
Copy link
Member

feat(mojaloop/#2704): core-services support for non-breaking backward api compatibility - mojaloop/project#2704

BREAKING CHANGE:

  • Config PROTOCOL_VERSIONS.CONTENT has now been modified to support backward compatibility for minor versions (i.e. v1.0 & 1.1) as follows:
  "PROTOCOL_VERSIONS": {
    "CONTENT": "1.1", <-- used when generating messages from the "SWITCH", and validate incoming FSPIOP API requests/callbacks CONTENT-TYPE headers
    "ACCEPT": {
      "DEFAULT": "1", <-- used when generating messages from the "SWITCH"
      "VALIDATELIST": [ <-- used to validate incoming FSPIOP API requests/callbacks ACCEPT headers
        "1",
        "1.0",
        "1.1"
      ]
    }
  },

to be consistent with the ACCEPT structure as follows:

  "PROTOCOL_VERSIONS": {
    "CONTENT": {
      "DEFAULT": "1.1", <-- used when generating messages from the "SWITCH"
      "VALIDATELIST": [ <-- used to validate incoming FSPIOP API requests/callbacks CONTENT-TYPE headers
        "1.1",
        "1.0"
      ]
    },
    "ACCEPT": {
      "DEFAULT": "1", <-- used when generating messages from the "SWITCH"
      "VALIDATELIST": [ <-- used to validate incoming FSPIOP API requests/callbacks ACCEPT headers
        "1",
        "1.0",
        "1.1"
      ]
    }
  },

… api compatibility

- updated default.json config for PROTOCOL_VERSIONS, and updated related usage based on mojaloop/project#2660 to accept a validationList for the content-type
- updated dependencies
- fixed audit issues
- fixed unit tests
@mdebarros mdebarros marked this pull request as ready for review March 3, 2022 13:24
@mdebarros mdebarros merged commit 5900e52 into mojaloop:master Mar 4, 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

Successfully merging this pull request may close these issues.

2 participants