Skip to content

Commit 8e12500

Browse files
committed
feature: update API V1 client
Added search for environments and creation of test runs with the addition of an environment slug
1 parent e5a5973 commit 8e12500

File tree

9 files changed

+260
-3
lines changed

9 files changed

+260
-3
lines changed

qase-api-client/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Qase TestOps API v1 Specification.
66
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
77

88
- API version: 1.0.0
9-
- Package version: 1.0.0
9+
- Package version: 1.0.1
1010
- Generator version: 7.4.0
1111
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1212
For more information, please visit [https://qase.io](https://qase.io)

qase-api-client/api_environments.go

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

qase-api-client/docs/Defect.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Name | Type | Description | Notes
1616
**MemberId** | Pointer to **int64** | Deprecated, use `author_id` instead. | [optional]
1717
**AuthorId** | Pointer to **int64** | | [optional]
1818
**ExternalData** | Pointer to **string** | | [optional]
19+
**Runs** | Pointer to **[]int64** | | [optional]
20+
**Results** | Pointer to **[]string** | | [optional]
1921
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
2022
**CreatedAt** | Pointer to **time.Time** | | [optional]
2123
**UpdatedAt** | Pointer to **time.Time** | | [optional]
@@ -361,6 +363,56 @@ SetExternalData sets ExternalData field to given value.
361363

362364
HasExternalData returns a boolean if a field has been set.
363365

366+
### GetRuns
367+
368+
`func (o *Defect) GetRuns() []int64`
369+
370+
GetRuns returns the Runs field if non-nil, zero value otherwise.
371+
372+
### GetRunsOk
373+
374+
`func (o *Defect) GetRunsOk() (*[]int64, bool)`
375+
376+
GetRunsOk returns a tuple with the Runs field if it's non-nil, zero value otherwise
377+
and a boolean to check if the value has been set.
378+
379+
### SetRuns
380+
381+
`func (o *Defect) SetRuns(v []int64)`
382+
383+
SetRuns sets Runs field to given value.
384+
385+
### HasRuns
386+
387+
`func (o *Defect) HasRuns() bool`
388+
389+
HasRuns returns a boolean if a field has been set.
390+
391+
### GetResults
392+
393+
`func (o *Defect) GetResults() []string`
394+
395+
GetResults returns the Results field if non-nil, zero value otherwise.
396+
397+
### GetResultsOk
398+
399+
`func (o *Defect) GetResultsOk() (*[]string, bool)`
400+
401+
GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise
402+
and a boolean to check if the value has been set.
403+
404+
### SetResults
405+
406+
`func (o *Defect) SetResults(v []string)`
407+
408+
SetResults sets Results field to given value.
409+
410+
### HasResults
411+
412+
`func (o *Defect) HasResults() bool`
413+
414+
HasResults returns a boolean if a field has been set.
415+
364416
### GetTags
365417

366418
`func (o *Defect) GetTags() []TagValue`

qase-api-client/docs/EnvironmentsAPI.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ Name | Type | Description | Notes
232232

233233
## GetEnvironments
234234

235-
> EnvironmentListResponse GetEnvironments(ctx, code).Limit(limit).Offset(offset).Execute()
235+
> EnvironmentListResponse GetEnvironments(ctx, code).Search(search).Slug(slug).Limit(limit).Offset(offset).Execute()
236236
237237
Get all environments
238238

@@ -252,12 +252,14 @@ import (
252252

253253
func main() {
254254
code := "code_example" // string | Code of project, where to search entities.
255+
search := "search_example" // string | A search string. Will return all environments with titles containing provided string. (optional)
256+
slug := "slug_example" // string | A search string. Will return all environments with slugs equal to provided string. (optional)
255257
limit := int32(56) // int32 | A number of entities in result set. (optional) (default to 10)
256258
offset := int32(56) // int32 | How many entities should be skipped. (optional) (default to 0)
257259

258260
configuration := openapiclient.NewConfiguration()
259261
apiClient := openapiclient.NewAPIClient(configuration)
260-
resp, r, err := apiClient.EnvironmentsAPI.GetEnvironments(context.Background(), code).Limit(limit).Offset(offset).Execute()
262+
resp, r, err := apiClient.EnvironmentsAPI.GetEnvironments(context.Background(), code).Search(search).Slug(slug).Limit(limit).Offset(offset).Execute()
261263
if err != nil {
262264
fmt.Fprintf(os.Stderr, "Error when calling `EnvironmentsAPI.GetEnvironments``: %v\n", err)
263265
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
@@ -283,6 +285,8 @@ Other parameters are passed through a pointer to a apiGetEnvironmentsRequest str
283285
Name | Type | Description | Notes
284286
------------- | ------------- | ------------- | -------------
285287

288+
**search** | **string** | A search string. Will return all environments with titles containing provided string. |
289+
**slug** | **string** | A search string. Will return all environments with slugs equal to provided string. |
286290
**limit** | **int32** | A number of entities in result set. | [default to 10]
287291
**offset** | **int32** | How many entities should be skipped. | [default to 0]
288292

qase-api-client/docs/Run.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**CustomFields** | Pointer to [**[]CustomFieldValue**](CustomFieldValue.md) | | [optional]
2020
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
2121
**Cases** | Pointer to **[]int64** | | [optional]
22+
**PlanId** | Pointer to **NullableInt64** | | [optional]
2223

2324
## Methods
2425

@@ -464,6 +465,41 @@ SetCases sets Cases field to given value.
464465

465466
HasCases returns a boolean if a field has been set.
466467

468+
### GetPlanId
469+
470+
`func (o *Run) GetPlanId() int64`
471+
472+
GetPlanId returns the PlanId field if non-nil, zero value otherwise.
473+
474+
### GetPlanIdOk
475+
476+
`func (o *Run) GetPlanIdOk() (*int64, bool)`
477+
478+
GetPlanIdOk returns a tuple with the PlanId field if it's non-nil, zero value otherwise
479+
and a boolean to check if the value has been set.
480+
481+
### SetPlanId
482+
483+
`func (o *Run) SetPlanId(v int64)`
484+
485+
SetPlanId sets PlanId field to given value.
486+
487+
### HasPlanId
488+
489+
`func (o *Run) HasPlanId() bool`
490+
491+
HasPlanId returns a boolean if a field has been set.
492+
493+
### SetPlanIdNil
494+
495+
`func (o *Run) SetPlanIdNil(b bool)`
496+
497+
SetPlanIdNil sets the value for PlanId to be an explicit nil
498+
499+
### UnsetPlanId
500+
`func (o *Run) UnsetPlanId()`
501+
502+
UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil
467503

468504
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
469505

qase-api-client/docs/RunCreate.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
1010
**Cases** | Pointer to **[]int64** | | [optional]
1111
**IsAutotest** | Pointer to **bool** | | [optional]
1212
**EnvironmentId** | Pointer to **int64** | | [optional]
13+
**EnvironmentSlug** | Pointer to **string** | | [optional]
1314
**MilestoneId** | Pointer to **int64** | | [optional]
1415
**PlanId** | Pointer to **int64** | | [optional]
1516
**AuthorId** | Pointer to **int64** | | [optional]
@@ -183,6 +184,31 @@ SetEnvironmentId sets EnvironmentId field to given value.
183184

184185
HasEnvironmentId returns a boolean if a field has been set.
185186

187+
### GetEnvironmentSlug
188+
189+
`func (o *RunCreate) GetEnvironmentSlug() string`
190+
191+
GetEnvironmentSlug returns the EnvironmentSlug field if non-nil, zero value otherwise.
192+
193+
### GetEnvironmentSlugOk
194+
195+
`func (o *RunCreate) GetEnvironmentSlugOk() (*string, bool)`
196+
197+
GetEnvironmentSlugOk returns a tuple with the EnvironmentSlug field if it's non-nil, zero value otherwise
198+
and a boolean to check if the value has been set.
199+
200+
### SetEnvironmentSlug
201+
202+
`func (o *RunCreate) SetEnvironmentSlug(v string)`
203+
204+
SetEnvironmentSlug sets EnvironmentSlug field to given value.
205+
206+
### HasEnvironmentSlug
207+
208+
`func (o *RunCreate) HasEnvironmentSlug() bool`
209+
210+
HasEnvironmentSlug returns a boolean if a field has been set.
211+
186212
### GetMilestoneId
187213

188214
`func (o *RunCreate) GetMilestoneId() int64`

qase-api-client/docs/SearchResponseAllOfResultEntities.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Name | Type | Description | Notes
1919
**CustomFields** | Pointer to [**[]CustomFieldValue**](CustomFieldValue.md) | | [optional]
2020
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
2121
**Cases** | Pointer to **[]int64** | | [optional]
22+
**PlanId** | Pointer to **NullableInt64** | | [optional]
2223
**Hash** | Pointer to **string** | | [optional]
2324
**Comment** | Pointer to **NullableString** | | [optional]
2425
**Stacktrace** | Pointer to **NullableString** | | [optional]
@@ -496,6 +497,41 @@ SetCases sets Cases field to given value.
496497

497498
HasCases returns a boolean if a field has been set.
498499

500+
### GetPlanId
501+
502+
`func (o *SearchResponseAllOfResultEntities) GetPlanId() int64`
503+
504+
GetPlanId returns the PlanId field if non-nil, zero value otherwise.
505+
506+
### GetPlanIdOk
507+
508+
`func (o *SearchResponseAllOfResultEntities) GetPlanIdOk() (*int64, bool)`
509+
510+
GetPlanIdOk returns a tuple with the PlanId field if it's non-nil, zero value otherwise
511+
and a boolean to check if the value has been set.
512+
513+
### SetPlanId
514+
515+
`func (o *SearchResponseAllOfResultEntities) SetPlanId(v int64)`
516+
517+
SetPlanId sets PlanId field to given value.
518+
519+
### HasPlanId
520+
521+
`func (o *SearchResponseAllOfResultEntities) HasPlanId() bool`
522+
523+
HasPlanId returns a boolean if a field has been set.
524+
525+
### SetPlanIdNil
526+
527+
`func (o *SearchResponseAllOfResultEntities) SetPlanIdNil(b bool)`
528+
529+
SetPlanIdNil sets the value for PlanId to be an explicit nil
530+
531+
### UnsetPlanId
532+
`func (o *SearchResponseAllOfResultEntities) UnsetPlanId()`
533+
534+
UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil
499535
### GetHash
500536

501537
`func (o *SearchResponseAllOfResultEntities) GetHash() string`

qase-api-client/model_run.go

Lines changed: 47 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)