Skip to content

Commit 99ac594

Browse files
authored
Improve OpenAPI integration (#725)
1 parent 0b72286 commit 99ac594

File tree

17 files changed

+1529
-316
lines changed

17 files changed

+1529
-316
lines changed

.changeset/clean-pears-clap.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@gitbook/integration-openapi': patch
3+
'@gitbook/runtime': patch
4+
---
5+
6+
Update OpenAPI spec parsing and take order of tags in consideration

bun.lock

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,13 @@
344344
"dependencies": {
345345
"@gitbook/api": "*",
346346
"@gitbook/document": "*",
347+
"@gitbook/openapi-parser": "^2.0.0",
347348
"@gitbook/runtime": "*",
348-
"@scalar/openapi-parser": "^0.10.4",
349-
"@scalar/openapi-types": "^0.1.6",
350349
},
351350
"devDependencies": {
352351
"@gitbook/cli": "workspace:*",
353352
"@gitbook/tsconfig": "workspace:*",
353+
"bun-types": "^1.2.4",
354354
},
355355
},
356356
"integrations/pendo": {
@@ -551,7 +551,7 @@
551551
"name": "@gitbook/cli",
552552
"version": "0.20.1",
553553
"bin": {
554-
"gitbook": "./cli.js"
554+
"gitbook": "./cli.js",
555555
},
556556
"dependencies": {
557557
"@gitbook/api": "*",
@@ -917,6 +917,8 @@
917917

918918
"@gitbook/integration-zoominfo": ["@gitbook/integration-zoominfo@workspace:integrations/zoominfo"],
919919

920+
"@gitbook/openapi-parser": ["@gitbook/[email protected]", "", { "dependencies": { "@scalar/openapi-parser": "^0.10.4", "@scalar/openapi-types": "^0.1.6" } }, "sha512-jF2B+XeWpFLvIjCvczOlssJmSV/QHOmfp9j47xX8qTN/yX/QX+ApL5RWtM4Hggf7GvgbnEwXKuB2pLEhP0FjIA=="],
921+
920922
"@gitbook/runtime": ["@gitbook/runtime@workspace:packages/runtime"],
921923

922924
"@gitbook/tsconfig": ["@gitbook/tsconfig@workspace:packages/tsconfig"],
@@ -1243,7 +1245,7 @@
12431245

12441246
"builtins": ["[email protected]", "", { "dependencies": { "semver": "^7.0.0" } }, "sha512-SW9lzGTLvWTP1AY8xeAMZimqDrIaSdLQUcVr9DMef51niJ022Ri87SwRRKYm4A6iHfkPaiVUu/Duw2Wc4J7kKg=="],
12451247

1246-
"bun-types": ["bun-types@1.1.29", "", { "dependencies": { "@types/node": "~20.12.8", "@types/ws": "~8.5.10" } }, "sha512-En3/TzSPMPyl5UlUB1MHzHpcrZDakTm7mS203eLoX1fBoEa3PW+aSS8GAqVJ7Is/m34Z5ogL+ECniLY0uDaCPw=="],
1248+
"bun-types": ["bun-types@1.2.4", "", { "dependencies": { "@types/node": "*", "@types/ws": "~8.5.10" } }, "sha512-nDPymR207ZZEoWD4AavvEaa/KZe/qlrbMSchqpQwovPZCKc7pwMoENjEtHgMKaAjJhy+x6vfqSBA1QU3bJgs0Q=="],
12471249

12481250
"busboy": ["[email protected]", "", { "dependencies": { "streamsearch": "^1.1.0" } }, "sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA=="],
12491251

@@ -2351,12 +2353,12 @@
23512353

23522354
"@scalar/openapi-parser/ajv-formats": ["[email protected]", "", { "dependencies": { "ajv": "^8.0.0" } }, "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ=="],
23532355

2356+
"@types/bun/bun-types": ["[email protected]", "", { "dependencies": { "@types/node": "~20.12.8", "@types/ws": "~8.5.10" } }, "sha512-En3/TzSPMPyl5UlUB1MHzHpcrZDakTm7mS203eLoX1fBoEa3PW+aSS8GAqVJ7Is/m34Z5ogL+ECniLY0uDaCPw=="],
2357+
23542358
"@whatwg-node/fetch/urlpattern-polyfill": ["[email protected]", "", {}, "sha512-Qp95D4TPJl1kC9SKigDcqgyM2VDVO4RiJc2d4qe5GrYm+zbIQCWWKAFaJNQ4BhdFeDGwBmAxqJBwWSJDb9T3BQ=="],
23552359

23562360
"bl/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
23572361

2358-
"bun-types/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg=="],
2359-
23602362
"check-node-version/semver": ["[email protected]", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
23612363

23622364
"cliui/strip-ansi": ["[email protected]", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
@@ -2551,7 +2553,7 @@
25512553

25522554
"@miniflare/http-server/youch/cookie": ["[email protected]", "", {}, "sha512-aSWTXFzaKWkvHO1Ny/s+ePFpvKsPnjc551iI41v3ny/ow6tBG5Vd+FuqGNhh1LxOmVzOlGUriIlOaokOvhaStA=="],
25532555

2554-
"bun-types/@types/node/undici-types": ["undici-types@5.26.5", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="],
2556+
"@types/bun/bun-types/@types/node": ["@types/[email protected]", "", { "dependencies": { "undici-types": "~5.26.4" } }, "sha512-scnD59RpYD91xngrQQLGkE+6UrHUPzeKZWhhjBSa3HSkwjbQc38+q3RoIVEwxQGRw3M+j5hpNAM+lgV3cVormg=="],
25552557

25562558
"cliui/strip-ansi/ansi-regex": ["[email protected]", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
25572559

@@ -2663,6 +2665,8 @@
26632665

26642666
"@manypkg/find-root/find-up/locate-path/p-locate": ["[email protected]", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
26652667

2668+
"@types/bun/bun-types/@types/node/undici-types": ["[email protected]", "", {}, "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA=="],
2669+
26662670
"inquirer/ora/bl/buffer": ["[email protected]", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
26672671

26682672
"inquirer/ora/bl/readable-stream": ["[email protected]", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],

integrations/openapi/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
"scripts": {
66
"typecheck": "tsc --noEmit",
77
"check": "gitbook check",
8-
"publish-integrations-staging": "gitbook publish ."
8+
"publish-integrations-staging": "gitbook publish .",
9+
"test": "bun test"
910
},
1011
"dependencies": {
1112
"@gitbook/api": "*",
1213
"@gitbook/runtime": "*",
1314
"@gitbook/document": "*",
14-
"@scalar/openapi-parser": "^0.10.4",
15-
"@scalar/openapi-types": "^0.1.6"
15+
"@gitbook/openapi-parser": "^2.0.0"
1616
},
1717
"devDependencies": {
1818
"@gitbook/cli": "workspace:*",
19-
"@gitbook/tsconfig": "workspace:*"
19+
"@gitbook/tsconfig": "workspace:*",
20+
"bun-types": "^1.2.4"
2021
}
2122
}

0 commit comments

Comments
 (0)