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

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #1306 from hey-api/fix/experimental-parser-const

authored by

Lubos and committed by
GitHub
ceb932a8 242f7712

+46 -1
+7
packages/openapi-ts/test/3.1.x.spec.ts
··· 58 58 }, 59 59 { 60 60 config: createConfig({ 61 + input: 'const.json', 62 + output: 'const', 63 + }), 64 + description: 'handles const keyword', 65 + }, 66 + { 67 + config: createConfig({ 61 68 input: 'content-binary.json', 62 69 output: 'content-binary', 63 70 }),
+2
packages/openapi-ts/test/__snapshots__/3.1.x/const/index.ts
··· 1 + // This file is auto-generated by @hey-api/openapi-ts 2 + export * from './types.gen';
+10
packages/openapi-ts/test/__snapshots__/3.1.x/const/types.gen.ts
··· 1 + // This file is auto-generated by @hey-api/openapi-ts 2 + 3 + export type GetFooResponses = { 4 + /** 5 + * OK 6 + */ 7 + 200: 'First line.\n\nSecond line.\n\nPS: I love you.'; 8 + }; 9 + 10 + export type GetFooResponse = GetFooResponses[keyof GetFooResponses];
+1 -1
packages/openapi-ts/test/sample.cjs
··· 13 13 input: { 14 14 // include: 15 15 // '^(#/components/schemas/import|#/paths/api/v{api-version}/simple/options)$', 16 - path: './test/spec/3.0.x/content-binary.json', 16 + path: './test/spec/3.1.x/const.json', 17 17 // path: 'https://mongodb-mms-prod-build-server.s3.amazonaws.com/openapi/2caffd88277a4e27c95dcefc7e3b6a63a3b03297-v2-2023-11-15.json', 18 18 }, 19 19 // name: 'foo',
+26
packages/openapi-ts/test/spec/3.1.x/const.json
··· 1 + { 2 + "openapi": "3.1.0", 3 + "info": { 4 + "title": "OpenAPI 3.1.0 const example", 5 + "version": "1" 6 + }, 7 + "paths": { 8 + "/foo": { 9 + "get": { 10 + "responses": { 11 + "200": { 12 + "description": "OK", 13 + "content": { 14 + "application/json": { 15 + "schema": { 16 + "const": "First line.\n\nSecond line.\n\nPS: I love you.", 17 + "type": "string" 18 + } 19 + } 20 + } 21 + } 22 + } 23 + } 24 + } 25 + } 26 + }