Skip to content

Commit

Permalink
chore(oapi): move global inisight schema to separate object (#12456)
Browse files Browse the repository at this point in the history
## Motivation

So it's properly merged in parent object. Otherwise we end up with both
`properties` and `allOf` on the same level which doesn't play nicely
with parent project validator.

<!-- Why are we doing this change -->

## Implementation information

Move to separate object.

<!-- Explain how this was done and potentially alternatives considered
and discarded -->

## Supporting documentation

<!-- Is there a MADR? An Issue? A related PR? -->

xrel kumahq/ci-tools#59

<!--
> Changelog: skip
-->
<!--
Uncomment the above section to explicitly set a [`> Changelog:` entry
here](https://github.com/kumahq/kuma/blob/master/CONTRIBUTING.md#submitting-a-patch)?
-->

---------

Signed-off-by: slonka <[email protected]>
  • Loading branch information
slonka authored Jan 7, 2025
1 parent 67912cf commit 0adc887
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 25 deletions.
5 changes: 4 additions & 1 deletion api/openapi/specs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ components:
type: integer
description: Number of meshes
example: 3
GlobalInsight:
schemas-GlobalInsight:
type: object
title: GlobalInsight
description: Global Insight contains statistics for all main resources
Expand Down Expand Up @@ -433,6 +433,9 @@ components:
additionalProperties:
$ref: '#/components/schemas/ResourceStats'
description: A map of resource names to their corresponding statistics
GlobalInsight:
allOf:
- $ref: '#/components/schemas/schemas-GlobalInsight'
responses:
IndexResponse:
description: A response for the index endpoint
Expand Down
49 changes: 26 additions & 23 deletions api/openapi/types/zz_generated.api.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion docs/generated/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ components:
type: integer
description: Number of meshes
example: 3
GlobalInsight:
schemas-GlobalInsight:
type: object
title: GlobalInsight
description: Global Insight contains statistics for all main resources
Expand Down Expand Up @@ -2491,6 +2491,9 @@ components:
additionalProperties:
$ref: '#/components/schemas/ResourceStats'
description: A map of resource names to their corresponding statistics
GlobalInsight:
allOf:
- $ref: '#/components/schemas/schemas-GlobalInsight'
PolicyDescription:
type: object
required:
Expand Down

0 comments on commit 0adc887

Please sign in to comment.