Skip to content

Commit 9084372

Browse files
refactor(openapi): rename models from def-* to their names
1 parent e3add8d commit 9084372

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,11 @@ const app: FastifyPluginAsync<AppOptions> = async (
113113
},
114114
},
115115
},
116+
refResolver: {
117+
buildLocalReference(json, baseUri, fragment, i) {
118+
return (json.$id as string) || `def-${i}`;
119+
},
120+
},
116121
});
117122
await fastify.register(import("@fastify/swagger-ui"));
118123
await fastify.register(import("@scalar/fastify-api-reference"));

0 commit comments

Comments
 (0)