Skip to content

Commit 28b0cf4

Browse files
authored
chore: bump to upstream version of openapi (#197)
* chore: bump to upstream version of openapi * chore(lint): biome format
1 parent 6e9c52d commit 28b0cf4

File tree

5 files changed

+108
-100
lines changed

5 files changed

+108
-100
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"homepage": "https://github.com/Unleash/unleash-proxy#readme",
4141
"dependencies": {
42-
"@unleash/express-openapi": "^0.3.0",
42+
"@wesleytodd/openapi": "^1.1.0",
4343
"compression": "^1.7.4",
4444
"cors": "^2.8.5",
4545
"express": "^4.21.0",

src/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/// <reference path="./types/openapi.d.ts" />
2-
31
import { createApp } from './app';
42
import Client from './client';
53
import { createProxyConfig } from './config';

src/openapi/openapi-service.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import openapi, { type IExpressOpenApi } from '@unleash/express-openapi';
1+
import openapi, { type IExpressOpenApi } from '@wesleytodd/openapi';
22
import type { Application, RequestHandler } from 'express';
33
import type { OpenAPIV3 } from 'openapi-types';
44
import { createOpenApiSchema } from '.';
@@ -30,7 +30,7 @@ export class OpenApiService {
3030
// and the OpenAPI SwaggerUI at `${this.docsPathPath}`.
3131
useDocs(app: Application): void {
3232
app.use(this.api);
33-
app.use(this.docsPath(), this.api.swaggerui);
33+
app.use(this.docsPath(), this.api.swaggerui());
3434
}
3535

3636
// Create request validation middleware

src/types/openapi.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Partial types for "@unleash/express-openapi".
2-
declare module '@unleash/express-openapi' {
2+
declare module '@wesleytodd/openapi' {
33
import type { RequestHandler } from 'express';
44

55
export interface IExpressOpenApi extends RequestHandler {
66
validPath: (operation: OpenAPIV3.OperationObject) => RequestHandler;
77
schema: (name: string, schema: OpenAPIV3.SchemaObject) => void;
8-
swaggerui: RequestHandler;
8+
swaggerui: () => RequestHandler;
99
}
1010

1111
export default function openapi(

0 commit comments

Comments
 (0)