···11+---
22+'@hey-api/openapi-ts': patch
33+---
44+55+fix(parser): add back support for regular expressions in input filters
+5
.changeset/two-files-call.md
···11+---
22+'@hey-api/openapi-ts': patch
33+---
44+55+fix(parser): extend input filters to handle reusable parameters and responses
+85-9
docs/openapi-ts/configuration.md
···197197198198### Operations
199199200200-Set `include` to match operations to be included or `exclude` to match operations to be excluded. When both rules match the same operation, `exclude` takes precedence over `include`.
200200+Set `include` to match operations to be included or `exclude` to match operations to be excluded. Both exact keys and regular expressions are supported. When both rules match the same operation, `exclude` takes precedence over `include`.
201201202202::: code-group
203203···206206 input: {
207207 filters: {
208208 operations: {
209209- include: ['GET /api/v1/foo'], // [!code ++]
209209+ include: ['GET /api/v1/foo', '/^[A-Z]+ /api/v1//'], // [!code ++]
210210 },
211211 },
212212 path: 'https://get.heyapi.dev/hey-api/backend',
···221221 input: {
222222 filters: {
223223 operations: {
224224- exclude: ['GET /api/v1/foo'], // [!code ++]
224224+ exclude: ['GET /api/v1/foo', '/^[A-Z]+ /api/v1//'], // [!code ++]
225225 },
226226 },
227227 path: 'https://get.heyapi.dev/hey-api/backend',
···290290291291### Schemas
292292293293-Set `include` to match schemas to be included or `exclude` to match schemas to be excluded. When both rules match the same schema, `exclude` takes precedence over `include`.
293293+Set `include` to match schemas to be included or `exclude` to match schemas to be excluded. Both exact keys and regular expressions are supported. When both rules match the same schema, `exclude` takes precedence over `include`.
294294295295::: code-group
296296···299299 input: {
300300 filters: {
301301 schemas: {
302302- include: ['Foo'], // [!code ++]
302302+ include: ['Foo', '/^Bar/'], // [!code ++]
303303 },
304304 },
305305 path: 'https://get.heyapi.dev/hey-api/backend',
···314314 input: {
315315 filters: {
316316 schemas: {
317317- exclude: ['Foo'], // [!code ++]
317317+ exclude: ['Foo', '/^Bar/'], // [!code ++]
318318+ },
319319+ },
320320+ path: 'https://get.heyapi.dev/hey-api/backend',
321321+ },
322322+ output: 'src/client',
323323+ plugins: ['@hey-api/client-fetch'],
324324+};
325325+```
326326+327327+:::
328328+329329+### Parameters
330330+331331+Set `include` to match parameters to be included or `exclude` to match parameters to be excluded. Both exact keys and regular expressions are supported. When both rules match the same parameter, `exclude` takes precedence over `include`.
332332+333333+::: code-group
334334+335335+```js [include]
336336+export default {
337337+ input: {
338338+ filters: {
339339+ parameters: {
340340+ include: ['QueryParameter', '/^MyQueryParameter/'], // [!code ++]
341341+ },
342342+ },
343343+ path: 'https://get.heyapi.dev/hey-api/backend',
344344+ },
345345+ output: 'src/client',
346346+ plugins: ['@hey-api/client-fetch'],
347347+};
348348+```
349349+350350+```js [exclude]
351351+export default {
352352+ input: {
353353+ filters: {
354354+ parameters: {
355355+ exclude: ['QueryParameter', '/^MyQueryParameter/'], // [!code ++]
318356 },
319357 },
320358 path: 'https://get.heyapi.dev/hey-api/backend',
···328366329367### Request Bodies
330368331331-Set `include` to match request bodies to be included or `exclude` to match request bodies to be excluded. When both rules match the same request body, `exclude` takes precedence over `include`.
369369+Set `include` to match request bodies to be included or `exclude` to match request bodies to be excluded. Both exact keys and regular expressions are supported. When both rules match the same request body, `exclude` takes precedence over `include`.
332370333371::: code-group
334372···337375 input: {
338376 filters: {
339377 requestBodies: {
340340- include: ['Payload'], // [!code ++]
378378+ include: ['Payload', '/^SpecialPayload/'], // [!code ++]
341379 },
342380 },
343381 path: 'https://get.heyapi.dev/hey-api/backend',
···352390 input: {
353391 filters: {
354392 requestBodies: {
355355- exclude: ['Payload'], // [!code ++]
393393+ exclude: ['Payload', '/^SpecialPayload/'], // [!code ++]
394394+ },
395395+ },
396396+ path: 'https://get.heyapi.dev/hey-api/backend',
397397+ },
398398+ output: 'src/client',
399399+ plugins: ['@hey-api/client-fetch'],
400400+};
401401+```
402402+403403+:::
404404+405405+### Responses
406406+407407+Set `include` to match responses to be included or `exclude` to match responses to be excluded. Both exact keys and regular expressions are supported. When both rules match the same response, `exclude` takes precedence over `include`.
408408+409409+::: code-group
410410+411411+```js [include]
412412+export default {
413413+ input: {
414414+ filters: {
415415+ responses: {
416416+ include: ['Foo', '/^Bar/'], // [!code ++]
417417+ },
418418+ },
419419+ path: 'https://get.heyapi.dev/hey-api/backend',
420420+ },
421421+ output: 'src/client',
422422+ plugins: ['@hey-api/client-fetch'],
423423+};
424424+```
425425+426426+```js [exclude]
427427+export default {
428428+ input: {
429429+ filters: {
430430+ responses: {
431431+ exclude: ['Foo', '/^Bar/'], // [!code ++]
356432 },
357433 },
358434 path: 'https://get.heyapi.dev/hey-api/backend',
···7979 * @default false
8080 */
8181 orphans?: boolean;
8282+ parameters?: {
8383+ /**
8484+ * Prevent parameters matching the `exclude` filters from being processed.
8585+ *
8686+ * In case of conflicts, `exclude` takes precedence over `include`.
8787+ *
8888+ * @example ['QueryParam']
8989+ */
9090+ exclude?: ReadonlyArray<string>;
9191+ /**
9292+ * Process only parameters matching the `include` filters.
9393+ *
9494+ * In case of conflicts, `exclude` takes precedence over `include`.
9595+ *
9696+ * @example ['QueryParam']
9797+ */
9898+ include?: ReadonlyArray<string>;
9999+ };
82100 /**
83101 * Should we preserve the key order when overwriting your input? This
84102 * option is disabled by default to improve performance.
···97115 exclude?: ReadonlyArray<string>;
98116 /**
99117 * Process only request bodies matching the `include` filters.
118118+ *
119119+ * In case of conflicts, `exclude` takes precedence over `include`.
120120+ *
121121+ * @example ['Foo']
122122+ */
123123+ include?: ReadonlyArray<string>;
124124+ };
125125+ responses?: {
126126+ /**
127127+ * Prevent responses matching the `exclude` filters from being processed.
128128+ *
129129+ * In case of conflicts, `exclude` takes precedence over `include`.
130130+ *
131131+ * @example ['Foo']
132132+ */
133133+ exclude?: ReadonlyArray<string>;
134134+ /**
135135+ * Process only responses matching the `include` filters.
100136 *
101137 * In case of conflicts, `exclude` takes precedence over `include`.
102138 *