@spikers/next-openapi-json-generator 1.1.0 → 1.1.1
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/dist/index.cjs +4 -1
- package/dist/index.js +4 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -415,7 +415,10 @@ function createRouteRecord(method, filePath, rootPath, apiData) {
|
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
417
|
function bundlePaths(source, storedSchemas) {
|
|
418
|
-
source.sort((a, b) =>
|
|
418
|
+
source.sort((a, b) => {
|
|
419
|
+
const methodComparison = a.method.localeCompare(b.method);
|
|
420
|
+
return methodComparison !== 0 ? methodComparison : a.path.localeCompare(b.path);
|
|
421
|
+
});
|
|
419
422
|
return source.reduce((collection, route) => ({
|
|
420
423
|
...collection,
|
|
421
424
|
[route.path]: {
|
package/dist/index.js
CHANGED
|
@@ -386,7 +386,10 @@ function createRouteRecord(method, filePath, rootPath, apiData) {
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
function bundlePaths(source, storedSchemas) {
|
|
389
|
-
source.sort((a, b) =>
|
|
389
|
+
source.sort((a, b) => {
|
|
390
|
+
const methodComparison = a.method.localeCompare(b.method);
|
|
391
|
+
return methodComparison !== 0 ? methodComparison : a.path.localeCompare(b.path);
|
|
392
|
+
});
|
|
390
393
|
return source.reduce((collection, route) => ({
|
|
391
394
|
...collection,
|
|
392
395
|
[route.path]: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spikers/next-openapi-json-generator",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "a Next.js plugin to generate OpenAPI documentation from route handlers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"next.js",
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@omer-x/eslint-config": "^2.1.2",
|
|
50
50
|
"@types/node": "^22.10.2",
|
|
51
|
+
"conventional-changelog-conventionalcommits": "^9.0.0",
|
|
51
52
|
"eslint": "^9.16.0",
|
|
52
53
|
"semantic-release": "^24.2.0",
|
|
53
54
|
"ts-jest": "^29.2.5",
|