- 
                Notifications
    You must be signed in to change notification settings 
- Fork 65
chore: Adjust openapi generator for azure spec #4953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
e596773
              b60c5e0
              365dc09
              de00b16
              f25ba53
              0fbc7a7
              b863309
              8033f3c
              7a3eb24
              46c77b1
              1f52a1b
              68569e2
              4e7fb90
              f36935a
              491b0f8
              aca3a1c
              79646c2
              7c8221b
              9a6fd9c
              7ebdab6
              847e2bc
              4a7c886
              6c1898e
              1a20736
              4e0c3d0
              e3c3f0a
              05716de
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -42,14 +42,6 @@ export function parseSchema( | |
| return parseArraySchema(schema, refs, options); | ||
| } | ||
|  | ||
| if ( | ||
| schema.type === 'object' || | ||
| schema.properties || | ||
| 'additionalProperties' in schema | ||
| ) { | ||
| return parseObjectSchema(schema, refs, options); | ||
| } | ||
|  | ||
| if (schema.enum?.length) { | ||
| return parseEnumSchema(schema, options); | ||
| } | ||
|  | @@ -59,13 +51,28 @@ export function parseSchema( | |
| } | ||
|  | ||
| if (schema.allOf?.length) { | ||
| if (schema.properties) { | ||
|          | ||
| logger.info( | ||
| 'Detected schema with allOf and properties in the same level. This was refactored to a schema with allOf only, also containing all the properties from the top level.' | ||
| ); | ||
| schema.allOf.push({ properties: schema.properties }); | ||
| delete schema.properties; | ||
| } | ||
| return parseXOfSchema(schema, refs, 'allOf', options); | ||
| } | ||
|  | ||
| if (schema.anyOf?.length) { | ||
| return parseXOfSchema(schema, refs, 'anyOf', options); | ||
| } | ||
|  | ||
| if ( | ||
|         
                  deekshas8 marked this conversation as resolved.
              Show resolved
            Hide resolved | ||
| schema.type === 'object' || | ||
| schema.properties || | ||
| 'additionalProperties' in schema | ||
| ) { | ||
| return parseObjectSchema(schema, refs, options); | ||
| } | ||
|  | ||
| if (schema.not) { | ||
| return { | ||
| not: parseSchema(schema.not, refs, options) | ||
|  | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
| * | ||
| * This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
| */ | ||
| import type { TestEntity } from './test-entity'; | ||
| /** | ||
| * Representation of the 'TestEntity2' schema. | ||
| */ | ||
| export type TestEntity2 = TestEntity & { | ||
| booleanProperty?: boolean; | ||
| } & Record<string, any>; | 
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
| * | ||
| * This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
| */ | ||
| import type { TestEntity } from './test-entity'; | ||
| /** | ||
| * Representation of the 'TestEntity2' schema. | ||
| */ | ||
| export type TestEntity2 = TestEntity & { | ||
| booleanProperty?: boolean; | ||
| } & Record<string, any>; | 
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
| * | ||
| * This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
| */ | ||
| import type { TestEntity } from './test-entity'; | ||
| /** | ||
| * Representation of the 'TestEntity3' schema. | ||
| */ | ||
| export type TestEntity3 = TestEntity & { | ||
| booleanProperty?: boolean; | ||
| } & Record<string, any>; | 
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| /* | ||
| * Copyright (c) 2024 SAP SE or an SAP affiliate company. All rights reserved. | ||
| * | ||
| * This is a generated file powered by the SAP Cloud SDK for JavaScript. | ||
| */ | ||
| import type { TestEntity } from './test-entity'; | ||
| /** | ||
| * Representation of the 'TestEntity3' schema. | ||
| */ | ||
| export type TestEntity3 = TestEntity & { | ||
| booleanProperty?: boolean; | ||
| } & Record<string, any>; | 
Uh oh!
There was an error while loading. Please reload this page.