Skip to content

Commit

Permalink
fix polymorphic response types
Browse files Browse the repository at this point in the history
  • Loading branch information
tlangs committed Jan 26, 2024
1 parent 56a69a0 commit bad8c29
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions src/main/resources/swagger/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4357,24 +4357,31 @@ components:
mapping:
flat: FilteredResourcesFlatResponse
hierarchical: FilteredResourcesHierarchicalResponse
oneOf:
- $ref: '#/components/schemas/FilteredResourcesFlatResponse'
- $ref: '#/components/schemas/FilteredResourcesHierarchicalResponse'
FilteredResourcesFlatResponse:
allOf:
- $ref: '#/components/schemas/FilteredResourceResponse'
- type: object
properties:
resources:
type: array
items:
$ref: '#/components/schemas/FilteredFlatResource'
type: object
properties:
format:
type: string
enum:
- flat
resources:
type: array
items:
$ref: '#/components/schemas/FilteredFlatResource'
FilteredResourcesHierarchicalResponse:
allOf:
- $ref: '#/components/schemas/FilteredResourceResponse'
- type: object
properties:
resources:
type: array
items:
$ref: '#/components/schemas/FilteredHierarchicalResource'
type: object
properties:
format:
type: string
enum:
- hierarchical
resources:
type: array
items:
$ref: '#/components/schemas/FilteredHierarchicalResource'
FilteredFlatResource:
type: object
properties:
Expand Down

0 comments on commit bad8c29

Please sign in to comment.