Skip to content

Commit 03e6ff3

Browse files
committed
Flatten model inheritance in OpenAPI spec as generator does not support using both allOf and additionalProperties
1 parent 9b55417 commit 03e6ff3

1 file changed

Lines changed: 64 additions & 56 deletions

File tree

public/swagger/openapi.yaml

Lines changed: 64 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -320,52 +320,56 @@ definitions:
320320
format: uuid
321321
Project:
322322
type: object
323-
allOf:
324-
- $ref: '#/definitions/Record'
325-
- properties:
326-
'@type':
327-
type: string
328-
enum:
329-
- 'Project'
330-
name:
331-
type: string
323+
properties:
324+
'@type':
325+
type: string
326+
enum:
327+
- 'Project'
328+
id:
329+
type: string
330+
format: uuid
331+
name:
332+
type: string
332333
Commit:
333334
type: object
334-
allOf:
335-
- $ref: '#/definitions/Record'
336-
- properties:
337-
'@type':
338-
type: string
339-
enum:
340-
- 'Commit'
341-
changes:
342-
type: array
343-
items:
344-
$ref: '#/definitions/ElementVersion'
345-
previousCommit:
346-
$ref: '#/definitions/Record'
335+
properties:
336+
'@type':
337+
type: string
338+
enum:
339+
- 'Commit'
340+
changes:
341+
type: array
342+
items:
343+
$ref: '#/definitions/ElementVersion'
344+
id:
345+
type: string
346+
format: uuid
347+
previousCommit:
348+
$ref: '#/definitions/Record'
347349
ElementVersion:
348350
type: object
349-
allOf:
350-
- $ref: '#/definitions/Record'
351-
- properties:
352-
'@type':
353-
type: string
354-
enum:
355-
- 'ElementVersion'
356-
data:
357-
$ref: '#/definitions/Element'
358-
identity:
359-
$ref: '#/definitions/ElementIdentity'
351+
properties:
352+
'@type':
353+
type: string
354+
enum:
355+
- 'ElementVersion'
356+
data:
357+
$ref: '#/definitions/Element'
358+
id:
359+
type: string
360+
format: uuid
361+
identity:
362+
$ref: '#/definitions/ElementIdentity'
360363
ElementIdentity:
361364
type: object
362-
allOf:
363-
- $ref: '#/definitions/Record'
364-
- properties:
365-
'@type':
366-
type: string
367-
enum:
368-
- 'ElementIdentity'
365+
properties:
366+
'@type':
367+
type: string
368+
enum:
369+
- 'ElementIdentity'
370+
id:
371+
type: string
372+
format: uuid
369373
Identified:
370374
type: object
371375
properties:
@@ -374,26 +378,30 @@ definitions:
374378
format: uuid
375379
Element:
376380
type: object
377-
allOf:
378-
- $ref: '#/definitions/Identified'
379-
- properties:
380-
'@type':
381-
type: string
381+
properties:
382+
'@type':
383+
type: string
384+
identifier:
385+
type: string
386+
format: uuid
382387
additionalProperties:
383388
type: object
384389
Relationship:
385390
type: object
386-
allOf:
387-
- $ref: '#/definitions/Element'
388-
- properties:
389-
source:
390-
type: array
391-
items:
392-
$ref: '#/definitions/Identified'
393-
target:
394-
type: array
395-
items:
396-
$ref: '#/definitions/Identified'
391+
properties:
392+
'@type':
393+
type: string
394+
identifier:
395+
type: string
396+
format: uuid
397+
source:
398+
type: array
399+
items:
400+
$ref: '#/definitions/Identified'
401+
target:
402+
type: array
403+
items:
404+
$ref: '#/definitions/Identified'
397405
Error:
398406
type: object
399407
properties:

0 commit comments

Comments
 (0)