Skip to content

Commit

Permalink
fix: allOf inside oneOf overwritten and not rendered
Browse files Browse the repository at this point in the history
fixes #660
  • Loading branch information
RomanHotsiy committed Oct 1, 2018
1 parent 533733b commit fe3383d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/services/models/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,10 @@ export class SchemaModel {
(variant, idx) =>
new SchemaModel(
parser,
// merge base schema into each of oneOf's subschemas
{
// merge base schema into each of oneOf's subschemas
...variant,
// variant may already have allOf so merge it to not get overwritten
...parser.mergeAllOf(variant, this.pointer + '/oneOf/' + idx),
allOf: [{ ...this.schema, oneOf: undefined, anyOf: undefined }],
} as OpenAPISchema,
this.pointer + '/oneOf/' + idx,
Expand Down

0 comments on commit fe3383d

Please sign in to comment.