@mojaloop/sdk-scheme-adapter 24.5.0 → 24.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
  # Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
2
+ ## [24.6.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.5.0...v24.6.0) (2025-03-24)
3
+
4
+
5
+ ### Features
6
+
7
+ * add ajv-formats package and integrate with OpenAPI backend validation ([#565](https://github.com/mojaloop/sdk-scheme-adapter/issues/565)) ([2de111c](https://github.com/mojaloop/sdk-scheme-adapter/commit/2de111c18cce717e8cb55fd50594d4a8b31b5ad3))
8
+
2
9
  ## [24.5.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v24.4.1...v24.5.0) (2025-03-23)
3
10
 
4
11
 
@@ -47,6 +47,7 @@
47
47
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
48
48
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
49
49
  "ajv": "8.17.1",
50
+ "ajv-formats": "3.0.1",
50
51
  "convict": "6.2.4",
51
52
  "express": "4.21.2",
52
53
  "openapi-backend": "5.11.1",
@@ -26,9 +26,9 @@
26
26
  --------------
27
27
  ******/
28
28
 
29
-
30
29
  import { ILogger } from '@mojaloop/logging-bc-public-types-lib';
31
30
  import Express, { Application } from 'express';
31
+ import addFormats from 'ajv-formats';
32
32
  import OpenAPIBackend from 'openapi-backend';
33
33
  import type { Request } from 'openapi-backend';
34
34
  import swaggerUi from 'swagger-ui-express';
@@ -75,6 +75,7 @@ export const CreateExpressServer =
75
75
  // API routes based on the swagger file
76
76
  const api = new OpenAPIBackend({
77
77
  definition: openApiSpecFilePath,
78
+ customizeAjv: ajv => addFormats(ajv),
78
79
  handlers: {
79
80
  ...Handlers,
80
81
  validationFail: async (c, _req: Express.Request, res: Express.Response) =>
@@ -45,6 +45,7 @@
45
45
  "@mojaloop/logging-bc-client-lib": "0.5.8",
46
46
  "@mojaloop/logging-bc-public-types-lib": "0.5.5",
47
47
  "@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
48
+ "ajv-formats": "3.0.1",
48
49
  "convict": "6.2.4",
49
50
  "express": "4.21.2",
50
51
  "openapi-backend": "5.11.1",
@@ -28,6 +28,7 @@
28
28
  ******/
29
29
  import { ILogger } from '@mojaloop/logging-bc-public-types-lib';
30
30
  import Express, { Application } from 'express';
31
+ import addFormats from 'ajv-formats';
31
32
  import OpenAPIBackend from 'openapi-backend';
32
33
  import type { Request } from 'openapi-backend';
33
34
  import swaggerUi from 'swagger-ui-express';
@@ -74,6 +75,7 @@ export const CreateExpressServer =
74
75
  // API routes based on the swagger file
75
76
  const api = new OpenAPIBackend({
76
77
  definition: openApiSpecFilePath,
78
+ customizeAjv: ajv => addFormats(ajv),
77
79
  handlers: {
78
80
  ...Handlers,
79
81
  validationFail: async (c, _req: Express.Request, res: Express.Response) =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mojaloop/sdk-scheme-adapter",
3
- "version": "24.5.0",
3
+ "version": "24.6.0",
4
4
  "description": "mojaloop sdk-scheme-adapter",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/mojaloop/sdk-scheme-adapter",