You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/* eslint-disable */
export default async () => {
const t = {};
return {
'@nestjs/swagger': {
models: [],
controllers: [
[
import('./app.controller'),
{ AppController: { getHello: { type: String } } },
],
[
import('./api/osrm/osrm.controller'),
{
OsrmController: {
getShortestTrip: {
summary:
'Calculates the shortest trip route between multiple points.\nThis endpoint solves the Traveling Salesman Problem (TSP) to find an optimal route.',
description:
'This method optimizes the route order to minimize total travel time/distance. It performs the following:\n1. Takes a set of points that need to be visited\n2. Determines the optimal order to visit these points\n3. Returns a route that visits all points in the optimized order\n\nThe route may or may not return to the starting point, based on the `roundtrip` option.',
type: Object,
},
getFastestRoute: {
summary:
'Calculates the fastest route between points in the exact order provided.\nUnlike getShortestTrip, this method preserves the input point order.',
description:
'This method finds the fastest route that visits all points in the specified order:\n1. Takes an ordered array of waypoints\n2. Calculates the fastest route visiting these points in sequence\n3. Returns detailed route information including turn-by-turn directions',
type: Object,
},
getNearestPoint: {
summary:
'Finds the nearest road segment to a given coordinate.\nUseful for snapping a point to the road network.',
description:
'This method helps align GPS coordinates with the actual road network:\n1. Takes a coordinate point\n2. Finds the nearest point on the road network\n3. Returns the snapped location and additional road segment information',
type: Object,
},
snap: {
summary:
'Snap a list of coordinates to the nearest points on the street network.',
type: Object,
},
getTable: {
summary:
'Computes the duration and/or distance of the fastest route between all pairs of supplied coordinates.\nThis endpoint returns a matrix of durations or distances or both between the coordinate pairs.',
description:
'This method calculates the fastest route durations and distances between all pairs of points:\n1. Takes an array of points\n2. Computes the duration and/or distance between each pair of points\n3. Returns a matrix of results',
type: Object,
},
getVectorTiles: {
summary:
'Retrieves vector tiles based on the provided options.',
type: Object,
},
},
},
],
],
},
};
};
Output error
> [email protected] _node /workspaces/mashrouk/apps/maps
> node -r tsconfig-paths/register -r dotenv/config --loader ts-node/esm --experimental-specifier-resolution=node --experimental-import-meta-resolve --no-warnings "src/generate-metadata.ts"
⠋ TSC Initializing type checker...
src/nest-swagger-metadata.ts:3:9 - error TS6133: 't' is declared but its value is never read.
3 const t = {};
~
ELIFECYCLE Command failed with exit code 1.
ELIFECYCLE Command failed with exit code 1.
* The terminal process "/bin/bash '-c', 'pnpm run prebuild'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Is there an existing issue for this?
Current behavior
for some reason the generated file contains
const t = {};
which makes PluginMetadataGenerator failssrc/generate-metadata.ts
run the generator
the generated metadata file:
nest-swagger-metadata.ts
Output error
I think the issue is caused by this line
https://github.com/nestjs/nest-cli/blob/e1f487ec02a80367d89b9f97b4b3feb6302241c5/lib/compiler/plugins/plugin-metadata-generator.ts#L118
Minimum reproduction code
.
Steps to reproduce
No response
Expected behavior
the metadata file is generated without errors, or the type checking is disabled for the auto generated files
Package version
11.0.3
NestJS version
11.0.5
Node.js version
v22.12.0
In which operating systems have you tested?
Other
No response
The text was updated successfully, but these errors were encountered: