File tree Expand file tree Collapse file tree 6 files changed +19
-17
lines changed Expand file tree Collapse file tree 6 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 4141 "@fastify/static" : " ^8.3.0" ,
4242 "fastify-plugin" : " ^5.1.0" ,
4343 "js-yaml" : " ^4.1.1" ,
44- "swagger-ui-dist" : " ^5.30.2 "
44+ "swagger-ui-dist" : " ^5.30.3 "
4545 },
4646 "devDependencies" : {
47- "@cowtech/eslint-config" : " ^11.0.0 " ,
48- "@cowtech/typescript-config" : " ^0.2.2 " ,
47+ "@cowtech/eslint-config" : " ^11.1.3 " ,
48+ "@cowtech/typescript-config" : " ^0.2.5 " ,
4949 "@types/js-yaml" : " ^4.0.9" ,
5050 "@types/node" : " ^24.10.1" ,
5151 "@types/swagger-ui-dist" : " ^3.30.6" ,
5252 "c8" : " ^10.1.3" ,
53- "cleaner-spec-reporter" : " ^1.0.0 " ,
53+ "cleaner-spec-reporter" : " ^1.0.3 " ,
5454 "eslint" : " ^9.39.1" ,
5555 "fastify" : " ^5.6.2" ,
5656 "prettier" : " ^3.6.2" ,
Original file line number Diff line number Diff line change 1- import {
2- type FastifyError ,
3- type FastifyInstance ,
4- type FastifyPluginOptions ,
5- type FastifyReply ,
6- type FastifyRequest ,
7- type RouteOptions
1+ import type {
2+ FastifyError ,
3+ FastifyInstance ,
4+ FastifyPluginOptions ,
5+ FastifyReply ,
6+ FastifyRequest ,
7+ RouteOptions
88} from 'fastify'
9+ import type { Schema } from './spec.ts'
910import fastifyPlugin from 'fastify-plugin'
1011import { dump } from 'js-yaml'
11- import { buildSpec , type Schema } from './spec.ts'
12+ import { buildSpec } from './spec.ts'
1213import { addUI } from './ui.ts'
1314
1415export const plugin = fastifyPlugin (
Original file line number Diff line number Diff line change 1- import { type FastifyInstance , type FastifySchema , type RouteOptions } from 'fastify'
1+ import type { FastifyInstance , FastifySchema , RouteOptions } from 'fastify'
22
33type RouteConfig = Record < string , any >
44
Original file line number Diff line number Diff line change 1- import fastifyStatic from '@fastify/static'
2- import { type FastifyInstance , type FastifyReply , type FastifyRequest } from 'fastify'
1+ import type { FastifyInstance , FastifyReply , FastifyRequest } from 'fastify'
32import { readFileSync } from 'node:fs'
43import { resolve } from 'node:path'
4+ import fastifyStatic from '@fastify/static'
55import { getAbsoluteFSPath } from 'swagger-ui-dist'
66
77export function addUI ( instance : FastifyInstance , prefix : string ) : void {
Original file line number Diff line number Diff line change 1- import fastify , { type FastifyReply , type FastifyRequest } from 'fastify'
1+ import type { FastifyReply , FastifyRequest } from 'fastify'
22import { deepStrictEqual } from 'node:assert'
33import { test } from 'node:test'
4+ import fastify from 'fastify'
45import { plugin as fastifyOpenApiDocs } from '../src/index.ts'
56
67const openapi = {
Original file line number Diff line number Diff line change 1- import fastify from 'fastify'
21import { deepStrictEqual , ok } from 'node:assert'
32import { test } from 'node:test'
3+ import fastify from 'fastify'
44import { plugin as fastifyOpenApiDocs } from '../src/index.ts'
55
66test ( 'UI serving' , async ( ) => {
You can’t perform that action at this time.
0 commit comments