Skip to content

Commit

Permalink
feat(mojaloop/#2704): core-services support for non-breaking backward…
Browse files Browse the repository at this point in the history
… api compatibility (#436)

feat(mojaloop/#2704): core-services support for non-breaking backward api compatibility - mojaloop/project#2704
- 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

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"
>       ]
>     }
>   },
> ```
  • Loading branch information
mdebarros authored Mar 4, 2022
1 parent d7a715a commit 5900e52
Show file tree
Hide file tree
Showing 11 changed files with 1,368 additions and 2,345 deletions.
108 changes: 24 additions & 84 deletions audit-resolve.json
Original file line number Diff line number Diff line change
@@ -1,109 +1,49 @@
{
"decisions": {
"1002401|@mojaloop/central-services-shared>widdershins>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1635503302625,
"expiresAt": 1638095298266
},
"1002401|@mojaloop/central-services-shared>widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1635503302625,
"expiresAt": 1638095298266
},
"1002865|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1635503303871,
"expiresAt": 1638095298266
},
"1002866|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1635503303871,
"expiresAt": 1638095298266
},
"1003019|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1635503305448,
"expiresAt": 1638095298266
},
"1004854|00unidentified>widdershins>openapi-sampler>json-pointer": {
"decision": "ignore",
"madeAt": 1638267080209,
"expiresAt": 1640859071746
},
"1004869|00unidentified>widdershins>swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1638267083058,
"expiresAt": 1640859071746
},
"1004869|00unidentified>widdershins>swagger2openapi>oas-validator>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1638267083058,
"expiresAt": 1640859071746
},
"1004946|00unidentified>widdershins>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1638267084882,
"expiresAt": 1640859071746
},
"1004946|00unidentified>widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1638267084882,
"expiresAt": 1640859071746
},
"1005383|00unidentified>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1638267086005,
"expiresAt": 1640859071746
},
"1005384|00unidentified>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1638267086005,
"expiresAt": 1640859071746
},
"1005534|00unidentified>widdershins>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1638267087119,
"expiresAt": 1640859071746
},
"1004854|@mojaloop/central-services-shared>widdershins>openapi-sampler>json-pointer": {
"decision": "ignore",
"madeAt": 1639467658896,
"expiresAt": 1642059653386
},
"1004869|@mojaloop/central-services-shared>widdershins>swagger2openapi>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1639467659885,
"expiresAt": 1642059653386
"madeAt": 1646314027498,
"expiresAt": 1648906020140
},
"1004869|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>better-ajv-errors>jsonpointer": {
"decision": "ignore",
"madeAt": 1639467659885,
"expiresAt": 1642059653386
"madeAt": 1646314027498,
"expiresAt": 1648906020140
},
"1004946|@mojaloop/central-services-shared>widdershins>yargs>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1639467660895,
"expiresAt": 1642059653386
"madeAt": 1646314028698,
"expiresAt": 1648906020140
},
"1004946|@mojaloop/central-services-shared>widdershins>yargs>cliui>string-width>strip-ansi>ansi-regex": {
"decision": "ignore",
"madeAt": 1639467660895,
"expiresAt": 1642059653386
"madeAt": 1646314028698,
"expiresAt": 1648906020140
},
"1005383|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1639467661956,
"expiresAt": 1642059653386
"madeAt": 1646314031153,
"expiresAt": 1648906020140
},
"1005384|@mojaloop/central-services-shared>shins>sanitize-html": {
"decision": "ignore",
"madeAt": 1639467661956,
"expiresAt": 1642059653386
"madeAt": 1646314031153,
"expiresAt": 1648906020140
},
"1005534|@mojaloop/central-services-shared>widdershins>yargs>yargs-parser": {
"decision": "ignore",
"madeAt": 1639467663011,
"expiresAt": 1642059653386
"madeAt": 1646314033221,
"expiresAt": 1648906020140
},
"1006886|@mojaloop/central-services-shared>shins>markdown-it": {
"decision": "ignore",
"madeAt": 1646314034388,
"expiresAt": 1648906020140
},
"1007017|@mojaloop/central-services-shared>widdershins>swagger2openapi>oas-validator>ajv": {
"decision": "ignore",
"madeAt": 1646314035466,
"expiresAt": 1648906020140
}
},
"rules": {},
Expand Down
9 changes: 8 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,18 @@
"CREATE_RETRY_INTERVAL_MILLIS": 200
},
"PROTOCOL_VERSIONS": {
"CONTENT": "1.1",
"CONTENT": {
"DEFAULT": "1.1",
"VALIDATELIST": [
"1.1",
"1.0"
]
},
"ACCEPT": {
"DEFAULT": "1",
"VALIDATELIST": [
"1",
"1.0",
"1.1"
]
}
Expand Down
10 changes: 0 additions & 10 deletions docker/central-ledger/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,6 @@
"CREATE_RETRY_INTERVAL_MILLIS": 200,
"DEBUG": false
},
"PROTOCOL_VERSIONS": {
"CONTENT": "1.1",
"ACCEPT": {
"DEFAULT": "1",
"VALIDATELIST": [
"1",
"1.1"
]
}
},
"MIGRATIONS": {
"DISABLED": false,
"RUN_DATA_MIGRATIONS": true
Expand Down
Loading

0 comments on commit 5900e52

Please sign in to comment.