···11+---
22+"@hey-api/openapi-ts": minor
33+"openapi-ts-docs": minor
44+---
55+66+feat: allow choosing naming convention for types
+5
.changeset/gorgeous-cars-sort.md
···11+---
22+"@hey-api/openapi-ts": patch
33+---
44+55+fix: rename exportModels to types
+22-4
docs/openapi-ts/migrating.md
···54545555## v0.40.0
56565757-### Exported `enums.gen.ts` file
5858-5959-Enums are now re-exported from the main `index.ts` file. This enables a cleaner migration to v0.39.0.
6060-6157### Renamed `models.gen.ts` file
62586359`models.gen.ts` is now called `types.gen.ts`. If you use imports from `models.gen.ts`, you should be able to easily find and replace all instances.
···6662import type { Model } from 'client/models.gen' // [!code --]
6763import type { Model } from 'client/types.gen' // [!code ++]
6864```
6565+6666+### Renamed `exportModels`
6767+6868+This config option is now called `types`.
6969+7070+### PascalCase for types
7171+7272+You can now choose to export types using the PascalCase naming convention.
7373+7474+```js{5}
7575+export default {
7676+ input: 'path/to/openapi.json',
7777+ output: 'src/client',
7878+ types: {
7979+ name: 'PascalCase',
8080+ },
8181+}
8282+```
8383+8484+### Exported `enums.gen.ts` file
8585+8686+Enums are now re-exported from the main `index.ts` file.
69877088## v0.39.0
7189
+2-2
packages/openapi-ts/bin/index.js
···2222 .option('--dry-run [value]', 'Skip writing files to disk?')
2323 .option('--enums <value>', 'Export enum definitions (javascript, typescript)')
2424 .option('--exportCore [value]', 'Write core files to disk')
2525- .option('--exportModels [value]', 'Write models to disk')
2625 .option('--exportServices [value]', 'Write services to disk')
2726 .option('--format [value]', 'Process output folder with formatter?')
2827 .option('--lint [value]', 'Process output folder with linter?')
···3231 .option('--request <value>', 'Path to custom request file')
3332 .option('--schemas [value]', 'Write schemas to disk')
3433 .option('--serviceResponse [value]', 'Define shape of returned value from service calls')
3434+ .option('--types [value]', 'Write types to disk')
3535 .option('--useDateType [value]', 'Output Date instead of string for the format "date-time" in the models')
3636 .option('--useOptions [value]', 'Use options instead of arguments')
3737 .parse(process.argv)
···6666 userConfig = processParams(params, [
6767 'dryRun',
6868 'exportCore',
6969- 'exportModels',
7069 'exportServices',
7170 'format',
7271 'lint',
7372 'operationId',
7473 'schemas',
7474+ 'types',
7575 'useDateType',
7676 'useOptions',
7777 ]);
···11// This file is auto-generated by @hey-api/openapi-ts
2233+export const $camelCaseCommentWithBreaks = {
44+ description: `Testing multiline comments in string: First line
55+Second line
66+77+Fourth line`,
88+ type: 'integer',
99+} as const;
1010+311export const $CommentWithBreaks = {
412 description: `Testing multiline comments in string: First line
513Second line
···66 *
77 * Fourth line
88 */
99+export type camelCaseCommentWithBreaks = number;
1010+1111+/**
1212+ * Testing multiline comments in string: First line
1313+ * Second line
1414+ *
1515+ * Fourth line
1616+ */
917export type CommentWithBreaks = number;
10181119/**
···11// This file is auto-generated by @hey-api/openapi-ts
2233+export const $camelCaseCommentWithBreaks = {
44+ description: `Testing multiline comments in string: First line
55+Second line
66+77+Fourth line`,
88+ type: 'integer',
99+} as const;
1010+311export const $CommentWithBreaks = {
412 description: `Testing multiline comments in string: First line
513Second line
···66 *
77 * Fourth line
88 */
99+export type camelCaseCommentWithBreaks = number;
1010+1111+/**
1212+ * Testing multiline comments in string: First line
1313+ * Second line
1414+ *
1515+ * Fourth line
1616+ */
917export type CommentWithBreaks = number;
10181119/**
···66 *
77 * Fourth line
88 */
99+export type camelCaseCommentWithBreaks = number;
1010+1111+/**
1212+ * Testing multiline comments in string: First line
1313+ * Second line
1414+ *
1515+ * Fourth line
1616+ */
917export type CommentWithBreaks = number;
10181119/**
···11// This file is auto-generated by @hey-api/openapi-ts
2233+export const $camelCaseCommentWithBreaks = {
44+ description: `Testing multiline comments in string: First line
55+Second line
66+77+Fourth line`,
88+ type: 'integer',
99+} as const;
1010+311export const $CommentWithBreaks = {
412 description: `Testing multiline comments in string: First line
513Second line
···11// This file is auto-generated by @hey-api/openapi-ts
2233+export const $camelCaseCommentWithBreaks = {
44+ description: `Testing multiline comments in string: First line
55+Second line
66+77+Fourth line`,
88+ type: 'integer',
99+} as const;
1010+311export const $CommentWithBreaks = {
412 description: `Testing multiline comments in string: First line
513Second line
···66 *
77 * Fourth line
88 */
99+export type camelCaseCommentWithBreaks = number;
1010+1111+/**
1212+ * Testing multiline comments in string: First line
1313+ * Second line
1414+ *
1515+ * Fourth line
1616+ */
917export type CommentWithBreaks = number;
10181119/**
···11+// This file is auto-generated by @hey-api/openapi-ts
22+33+/**
44+ * Testing multiline comments in string: First line
55+ * Second line
66+ *
77+ * Fourth line
88+ */
99+export type CamelCaseCommentWithBreaks = number;