fork of hey-api/openapi-ts because I need some additional things

Add test for readOnly types in nested response schemas

Co-authored-by: mrlubos <12529395+mrlubos@users.noreply.github.com>

+95
+8
packages/openapi-ts-tests/main/test/3.1.x.test.ts
··· 657 657 }, 658 658 { 659 659 config: createConfig({ 660 + input: 'transforms-read-write-response.yaml', 661 + output: 'transforms-read-write-response', 662 + plugins: ['@hey-api/typescript'], 663 + }), 664 + description: 'handles read-only types in nested response schemas', 665 + }, 666 + { 667 + config: createConfig({ 660 668 input: 'ref-type.json', 661 669 output: 'ref-type', 662 670 }),
+3
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-response/index.ts
··· 1 + // This file is auto-generated by @hey-api/openapi-ts 2 + 3 + export type * from './types.gen';
+41
packages/openapi-ts-tests/main/test/__snapshots__/3.1.x/transforms-read-write-response/types.gen.ts
··· 1 + // This file is auto-generated by @hey-api/openapi-ts 2 + 3 + export type ClientOptions = { 4 + baseUrl: `${string}://${string}` | (string & {}); 5 + }; 6 + 7 + export type ItemListResponse = { 8 + items: Array<Item>; 9 + }; 10 + 11 + export type Item = { 12 + /** 13 + * Server-generated ID 14 + */ 15 + readonly id: string; 16 + name: string; 17 + /** 18 + * Server-generated timestamp 19 + */ 20 + readonly created_at?: string; 21 + }; 22 + 23 + export type ItemWritable = { 24 + name: string; 25 + }; 26 + 27 + export type ItemListData = { 28 + body?: never; 29 + path?: never; 30 + query?: never; 31 + url: '/items'; 32 + }; 33 + 34 + export type ItemListResponses = { 35 + /** 36 + * Success 37 + */ 38 + 200: ItemListResponse; 39 + }; 40 + 41 + export type ItemListResponse2 = ItemListResponses[keyof ItemListResponses];
+43
specs/3.1.x/transforms-read-write-response.yaml
··· 1 + openapi: 3.0.3 2 + info: 3 + title: readOnly response test 4 + version: 1.0.0 5 + paths: 6 + /items: 7 + get: 8 + operationId: item_list 9 + responses: 10 + '200': 11 + description: Success 12 + content: 13 + application/json: 14 + schema: 15 + $ref: '#/components/schemas/ItemListResponse' 16 + components: 17 + schemas: 18 + ItemListResponse: 19 + type: object 20 + required: 21 + - items 22 + properties: 23 + items: 24 + type: array 25 + items: 26 + $ref: '#/components/schemas/Item' 27 + Item: 28 + type: object 29 + required: 30 + - id 31 + - name 32 + properties: 33 + id: 34 + type: string 35 + readOnly: true 36 + description: Server-generated ID 37 + name: 38 + type: string 39 + created_at: 40 + type: string 41 + format: date-time 42 + readOnly: true 43 + description: Server-generated timestamp