@navios/openapi 0.7.0 → 0.9.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navios/openapi",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Oleksandr Hanzha",
|
|
6
6
|
"email": "alex@granted.name"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@navios/core": "^0.
|
|
15
|
+
"@navios/core": "^0.9.0",
|
|
16
16
|
"zod": "^3.25.0 || ^4.0.0"
|
|
17
17
|
},
|
|
18
18
|
"typings": "./lib/index.d.mts",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@navios/builder": "^0.5.
|
|
35
|
-
"@navios/core": "^0.
|
|
34
|
+
"@navios/builder": "^0.5.2",
|
|
35
|
+
"@navios/core": "^0.9.0",
|
|
36
36
|
"typescript": "^5.9.3",
|
|
37
37
|
"zod": "^4.2.1"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@navios/di": "^0.
|
|
40
|
+
"@navios/di": "^0.9.0",
|
|
41
41
|
"yaml": "^2.8.2",
|
|
42
42
|
"zod-openapi": "^5.4.5"
|
|
43
43
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { HandlerMetadata } from '@navios/core'
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from '@navios/core'
|
|
8
|
-
import { TestContainer } from '@navios/di'
|
|
3
|
+
import { Controller, extractControllerMetadata } from '@navios/core'
|
|
4
|
+
import { TestContainer } from '@navios/di/testing'
|
|
5
|
+
|
|
6
|
+
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
|
|
9
7
|
|
|
10
8
|
import {
|
|
11
9
|
ApiDeprecated,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { TestContainer } from '@navios/di/testing'
|
|
2
|
+
|
|
1
3
|
import { afterEach, beforeEach, describe, expect, it } from 'vitest'
|
|
2
4
|
import { z } from 'zod/v4'
|
|
3
5
|
|
|
4
|
-
import { TestContainer } from '@navios/di'
|
|
5
|
-
|
|
6
|
-
import { SchemaConverterService } from '../services/schema-converter.service.mjs'
|
|
7
6
|
import { PathBuilderService } from '../services/path-builder.service.mjs'
|
|
7
|
+
import { SchemaConverterService } from '../services/schema-converter.service.mjs'
|
|
8
8
|
|
|
9
9
|
describe('OpenAPI Services', () => {
|
|
10
10
|
let container: TestContainer
|
|
@@ -202,10 +202,9 @@ describe('OpenAPI Services', () => {
|
|
|
202
202
|
|
|
203
203
|
it('should extract multiple params', async () => {
|
|
204
204
|
const service = await container.get(PathBuilderService)
|
|
205
|
-
expect(
|
|
206
|
-
'userId',
|
|
207
|
-
|
|
208
|
-
])
|
|
205
|
+
expect(
|
|
206
|
+
service.extractUrlParamNames('/users/$userId/posts/$postId'),
|
|
207
|
+
).toEqual(['userId', 'postId'])
|
|
209
208
|
})
|
|
210
209
|
|
|
211
210
|
it('should return empty array for no params', async () => {
|