Skip to content

Commit

Permalink
fix: Swagger UI
Browse files Browse the repository at this point in the history
  • Loading branch information
ddeboer committed Jul 22, 2024
1 parent 531b0cc commit 6c44c46
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 0 additions & 1 deletion src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ export async function server(
},
})
.register(fastifySwaggerUi, {
baseDir: process.cwd(),
routePrefix: docsUrl,
})
.register(acceptsSerializer, {
Expand Down
9 changes: 1 addition & 8 deletions test/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,7 @@ describe('Server', () => {
url: '/',
headers: {Accept: '*/*'},
});
expect(redirect.statusCode).toEqual(302);

const response = await httpServer.inject({
method: 'GET',
url: redirect.headers.location?.toString(),
headers: {Accept: '*/*'},
});
expect(response.statusCode).toEqual(200);
expect(redirect.statusCode).toEqual(200);
});

it('rejects validation requests without URL', async () => {
Expand Down

0 comments on commit 6c44c46

Please sign in to comment.