Skip to content

Commit

Permalink
fix: update testkube swagger definition (#1861)
Browse files Browse the repository at this point in the history
While working on issue #1647 it came up that some of the already implemented properties from the Go code do not appear in the Swagger definition.
This commit makes sure that the newly generated models will not break old functionality.
  • Loading branch information
vLia committed Jul 20, 2022
1 parent 385afc7 commit e488121
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
37 changes: 32 additions & 5 deletions api/v1/testkube.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1802,7 +1802,7 @@ components:
description: test execution results
labels:
type: object
description: "test suite execution labels"
description: "test suite labels"
additionalProperties:
type: string
example:
Expand Down Expand Up @@ -1887,7 +1887,7 @@ components:
$ref: "#/components/schemas/TestSuiteStepExecutionSummary"
labels:
type: object
description: "test suite labels"
description: "test suite and execution labels"
additionalProperties:
type: string
example:
Expand Down Expand Up @@ -1990,6 +1990,9 @@ components:
name:
type: string
description: "execution name"
number:
type: int
description: "execution number"
envs:
type: object
description: "environment variables passed to executor"
Expand Down Expand Up @@ -2034,7 +2037,7 @@ components:
$ref: "#/components/schemas/ExecutionResult"
labels:
type: object
description: "test/testsuite labels"
description: "test and execution labels"
additionalProperties:
type: string
example:
Expand Down Expand Up @@ -2085,6 +2088,9 @@ components:
name:
type: string
description: execution name
number:
type: int
description: execution number
testName:
type: string
description: name of the test
Expand All @@ -2109,7 +2115,7 @@ components:
description: calculated test duration
labels:
type: object
description: "execution labels"
description: "test and execution labels"
additionalProperties:
type: string
example:
Expand Down Expand Up @@ -2237,6 +2243,8 @@ components:
required:
- type
- uri
- branch
- commit
properties:
type:
type: string
Expand All @@ -2251,7 +2259,7 @@ components:
description: branch/tag name for checkout
commit:
type: string
description: commit id (sha) for checkout
description: Commit id (sha) for checkout
path:
type: string
description: if needed we can checkout particular path (dir or file) in case of BIG/mono repositories
Expand All @@ -2273,6 +2281,17 @@ components:
testSuiteName:
type: string
description: unique test suite name (CRD Test suite name), if it's run as a part of test suite
number:
type: int
description: test execution number
executionLabels:
type: object
description: "test execution labels"
additionalProperties:
type: string
example:
users: "3"
prefix: "some-"
namespace:
type: string
description: test kubernetes namespace ("testkube" when not set)
Expand Down Expand Up @@ -2343,6 +2362,14 @@ components:
type: string
description: secret uuid
labels:
type: object
description: "test suite labels"
additionalProperties:
type: string
example:
users: "3"
prefix: "some-"
executionLabels:
type: object
description: "execution labels"
additionalProperties:
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/v1/testkube/model_execution_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ExecutionRequest struct {
// test execution number
Number int `json:"number,omitempty"`
// test execution labels
ExecutionLabels map[string]string
ExecutionLabels map[string]string `json:"executionLabels,omitempty"`
// test kubernetes namespace (\"testkube\" when not set)
Namespace string `json:"namespace,omitempty"`
// variables file content - need to be in format for particular executor (e.g. postman envs file)
Expand Down

0 comments on commit e488121

Please sign in to comment.