···214214};
215215```
216216217217-## Format
217217+## Post Process
218218219219-To format your output folder contents, set `format` to a valid formatter.
219219+Post-processing allows you to run commands on the generated output folder after files are written. This is typically used to run formatters, linters, or other cleanup tools.
220220+221221+Commands are executed in order, and each command receives the output path via the `path` placeholder.
222222+223223+### Presets
224224+225225+You can use built-in presets for common tools:
220226221227::: code-group
222228223223-```js [disabled]
229229+```js [biome:format]
224230export default {
225231 input: 'hey-api/backend', // sign up at app.heyapi.dev
226232 output: {
227227- format: null, // [!code ++]
228233 path: 'src/client',
234234+ postProcess: ['biome:format'], // [!code ++]
229235 },
230236};
231237```
232238233233-```js [prettier]
239239+```js [biome:lint]
234240export default {
235241 input: 'hey-api/backend', // sign up at app.heyapi.dev
236242 output: {
237237- format: 'prettier', // [!code ++]
238243 path: 'src/client',
244244+ postProcess: ['biome:lint'], // [!code ++]
239245 },
240246};
241247```
242248243243-```js [biome]
249249+```js [eslint]
244250export default {
245251 input: 'hey-api/backend', // sign up at app.heyapi.dev
246252 output: {
247247- format: 'biome', // [!code ++]
248253 path: 'src/client',
254254+ postProcess: ['eslint'], // [!code ++]
249255 },
250256};
251257```
252258253253-:::
254254-255255-You can also prevent your output from being formatted by adding your output path to the formatter's ignore file.
256256-257257-## Lint
258258-259259-To lint your output folder contents, set `lint` to a valid linter.
260260-261261-::: code-group
262262-263263-```js [disabled]
259259+```js [oxfmt]
264260export default {
265261 input: 'hey-api/backend', // sign up at app.heyapi.dev
266262 output: {
267267- lint: null, // [!code ++]
268263 path: 'src/client',
264264+ postProcess: ['oxfmt'], // [!code ++]
269265 },
270266};
271267```
272268273273-```js [eslint]
269269+```js [oxlint]
274270export default {
275271 input: 'hey-api/backend', // sign up at app.heyapi.dev
276272 output: {
277277- lint: 'eslint', // [!code ++]
278273 path: 'src/client',
274274+ postProcess: ['oxlint'], // [!code ++]
279275 },
280276};
281277```
282278283283-```js [biome]
279279+```js [prettier]
284280export default {
285281 input: 'hey-api/backend', // sign up at app.heyapi.dev
286282 output: {
287287- lint: 'biome', // [!code ++]
288283 path: 'src/client',
284284+ postProcess: ['prettier'], // [!code ++]
289285 },
290286};
291287```
292288293293-```js [oxlint]
289289+:::
290290+291291+### Custom
292292+293293+You can also provide custom post processors:
294294+295295+<!-- prettier-ignore-start -->
296296+```js
294297export default {
295298 input: 'hey-api/backend', // sign up at app.heyapi.dev
296299 output: {
297297- lint: 'oxlint', // [!code ++]
298300 path: 'src/client',
301301+ postProcess: [{ // [!code ++]
302302+ command: 'dprint', // [!code ++]
303303+ args: ['fmt', '{{path}}'], // [!code ++]
304304+ }], // [!code ++]
299305 },
300306};
301307```
308308+<!-- prettier-ignore-end -->
302309303303-:::
304304-305305-You can also prevent your output from being linted by adding your output path to the linter's ignore file.
310310+You can skip processing by adding the output path to the tool’s ignore file (for example `.eslintignore` or `.prettierignore`).
306311307312## Name Conflicts
308313
+1-1
docs/openapi-ts/migrating.md
···1506150615071507### Removed `indent`
1508150815091509-This config option has been removed. Use a [code formatter](/openapi-ts/configuration#formatting) to modify the generated files code style according to your preferences.
15091509+This config option has been removed. Use a [code formatter](/openapi-ts/configuration/output#post-process) to modify the generated files code style according to your preferences.
1510151015111511## v0.27.24
15121512
···11export { getOutput } from './config';
22export { postprocessOutput } from './postprocess';
33-export type { Formatters, Linters, Output, UserOutput } from './types';
33+export type { Output, UserOutput } from './types';
···88import type { Casing, NameTransformer } from '~/utils/naming';
991010import type { NamingOptions } from '../shared';
1111+import type {
1212+ Formatters,
1313+ Linters,
1414+ PostProcessor,
1515+ PostProcessorPreset,
1616+ UserPostProcessor,
1717+} from './postprocess';
1118import type { SourceConfig, UserSourceConfig } from './source/types';
1212-1313-export type Formatters = 'biome' | 'prettier';
1414-1515-export type Linters = 'biome' | 'eslint' | 'oxlint';
16191720type ImportFileExtensions = '.js' | '.ts';
1821···7679 * Which formatter to use to process output folder?
7780 *
7881 * @default null
8282+ * @deprecated Use `postProcess` instead.
7983 */
8084 format?: Formatters | null;
8185 /**
···103107 * Which linter to use to process output folder?
104108 *
105109 * @default null
110110+ * @deprecated Use `postProcess` instead.
106111 */
107112 lint?: Linters | null;
108113 /**
···115120 */
116121 path: string;
117122 /**
123123+ * Post-processing commands to run on the output folder, executed in order.
124124+ *
125125+ * Use preset strings for common tools, or provide custom configurations.
126126+ *
127127+ * @example ['biome:lint', 'prettier']
128128+ * @example [{ command: 'dprint', args: ['fmt', '{{path}}'] }]
129129+ * @example ['eslint', { command: 'prettier', args: ['{{path}}', '--write'] }]
130130+ *
131131+ * @default []
132132+ */
133133+ postProcess?: ReadonlyArray<PostProcessorPreset | UserPostProcessor>;
134134+ /**
118135 * Whether `export * from 'module'` should be used when possible
119136 * instead of named exports.
120137 *
···214231 * The absolute path to the output folder.
215232 */
216233 path: string;
234234+ /**
235235+ * Post-processing commands to run on the output folder, executed in order.
236236+ */
237237+ postProcess: ReadonlyArray<PostProcessor>;
217238 /**
218239 * Whether `export * from 'module'` should be used when possible
219240 * instead of named exports.