Skip to content

Commit 167e935

Browse files
committed
wip
1 parent e4d95e8 commit 167e935

1 file changed

Lines changed: 26 additions & 27 deletions

File tree

packages/nestjs-zod/src/__e2e_tests__/openapi.test.ts

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -150,39 +150,38 @@ describe('basic query params', () => {
150150

151151
describe('issue#397', () => {
152152
test('cleans up description marker', async () => {
153-
class QueryParamsDto extends createZodDto(
154-
z
155-
.object({
156-
filter: z.string(),
157-
})
158-
.describe('My query params'),
159-
) {}
153+
class QueryParamsDto extends createZodDto(
154+
z
155+
.object({
156+
filter: z.string(),
157+
})
158+
.describe('My query params'),
159+
) {}
160160

161-
@Controller()
162-
class BookController {
163-
constructor() {}
161+
@Controller()
162+
class BookController {
163+
constructor() {}
164164

165-
@Get()
166-
getBooks(@Query() _query: QueryParamsDto) {
167-
return [];
168-
}
165+
@Get()
166+
getBooks(@Query() _query: QueryParamsDto) {
167+
return [];
169168
}
169+
}
170170

171-
const doc = await getSwaggerDoc(BookController, { cleanUp: true });
171+
const doc = await getSwaggerDoc(BookController, { cleanUp: true });
172172

173-
expect(get(doc, 'paths./.get.parameters')).toEqual([
174-
{
175-
in: 'query',
176-
name: 'filter',
177-
required: true,
178-
schema: {
179-
type: 'string',
180-
},
173+
expect(get(doc, 'paths./.get.parameters')).toEqual([
174+
{
175+
in: 'query',
176+
name: 'filter',
177+
required: true,
178+
schema: {
179+
type: 'string',
181180
},
182-
]);
183-
expect(JSON.stringify(doc)).not.toContain(PREFIX);
184-
},
185-
);
181+
},
182+
]);
183+
expect(JSON.stringify(doc)).not.toContain(PREFIX);
184+
});
186185
});
187186

188187
describe('unions', () => {

0 commit comments

Comments
 (0)