Skip to content

Commit

Permalink
feature: update API V1 client
Browse files Browse the repository at this point in the history
Added search for environments and creation of test runs with the addition of an environment slug
  • Loading branch information
gibiw committed Jul 15, 2024
1 parent e5a5973 commit 421e569
Show file tree
Hide file tree
Showing 9 changed files with 260 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qase-api-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Qase TestOps API v1 Specification.
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.

- API version: 1.0.0
- Package version: 1.0.0
- Package version: 1.0.1
- Generator version: 7.4.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://qase.io](https://qase.io)
Expand Down
20 changes: 20 additions & 0 deletions qase-api-client/api_environments.go

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

52 changes: 52 additions & 0 deletions qase-api-client/docs/Defect.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Name | Type | Description | Notes
**MemberId** | Pointer to **int64** | Deprecated, use `author_id` instead. | [optional]
**AuthorId** | Pointer to **int64** | | [optional]
**ExternalData** | Pointer to **string** | | [optional]
**Runs** | Pointer to **[]int64** | | [optional]
**Results** | Pointer to **[]string** | | [optional]
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
**CreatedAt** | Pointer to **time.Time** | | [optional]
**UpdatedAt** | Pointer to **time.Time** | | [optional]
Expand Down Expand Up @@ -361,6 +363,56 @@ SetExternalData sets ExternalData field to given value.

HasExternalData returns a boolean if a field has been set.

### GetRuns

`func (o *Defect) GetRuns() []int64`

GetRuns returns the Runs field if non-nil, zero value otherwise.

### GetRunsOk

`func (o *Defect) GetRunsOk() (*[]int64, bool)`

GetRunsOk returns a tuple with the Runs field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetRuns

`func (o *Defect) SetRuns(v []int64)`

SetRuns sets Runs field to given value.

### HasRuns

`func (o *Defect) HasRuns() bool`

HasRuns returns a boolean if a field has been set.

### GetResults

`func (o *Defect) GetResults() []string`

GetResults returns the Results field if non-nil, zero value otherwise.

### GetResultsOk

`func (o *Defect) GetResultsOk() (*[]string, bool)`

GetResultsOk returns a tuple with the Results field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetResults

`func (o *Defect) SetResults(v []string)`

SetResults sets Results field to given value.

### HasResults

`func (o *Defect) HasResults() bool`

HasResults returns a boolean if a field has been set.

### GetTags

`func (o *Defect) GetTags() []TagValue`
Expand Down
8 changes: 6 additions & 2 deletions qase-api-client/docs/EnvironmentsAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ Name | Type | Description | Notes

## GetEnvironments

> EnvironmentListResponse GetEnvironments(ctx, code).Limit(limit).Offset(offset).Execute()
> EnvironmentListResponse GetEnvironments(ctx, code).Search(search).Slug(slug).Limit(limit).Offset(offset).Execute()
Get all environments

Expand All @@ -252,12 +252,14 @@ import (

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

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

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

Expand Down
36 changes: 36 additions & 0 deletions qase-api-client/docs/Run.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to [**[]CustomFieldValue**](CustomFieldValue.md) | | [optional]
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
**Cases** | Pointer to **[]int64** | | [optional]
**PlanId** | Pointer to **NullableInt64** | | [optional]

## Methods

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

HasCases returns a boolean if a field has been set.

### GetPlanId

`func (o *Run) GetPlanId() int64`

GetPlanId returns the PlanId field if non-nil, zero value otherwise.

### GetPlanIdOk

`func (o *Run) GetPlanIdOk() (*int64, bool)`

GetPlanIdOk returns a tuple with the PlanId field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetPlanId

`func (o *Run) SetPlanId(v int64)`

SetPlanId sets PlanId field to given value.

### HasPlanId

`func (o *Run) HasPlanId() bool`

HasPlanId returns a boolean if a field has been set.

### SetPlanIdNil

`func (o *Run) SetPlanIdNil(b bool)`

SetPlanIdNil sets the value for PlanId to be an explicit nil

### UnsetPlanId
`func (o *Run) UnsetPlanId()`

UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil

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

Expand Down
26 changes: 26 additions & 0 deletions qase-api-client/docs/RunCreate.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Name | Type | Description | Notes
**Cases** | Pointer to **[]int64** | | [optional]
**IsAutotest** | Pointer to **bool** | | [optional]
**EnvironmentId** | Pointer to **int64** | | [optional]
**EnvironmentSlug** | Pointer to **string** | | [optional]
**MilestoneId** | Pointer to **int64** | | [optional]
**PlanId** | Pointer to **int64** | | [optional]
**AuthorId** | Pointer to **int64** | | [optional]
Expand Down Expand Up @@ -183,6 +184,31 @@ SetEnvironmentId sets EnvironmentId field to given value.

HasEnvironmentId returns a boolean if a field has been set.

### GetEnvironmentSlug

`func (o *RunCreate) GetEnvironmentSlug() string`

GetEnvironmentSlug returns the EnvironmentSlug field if non-nil, zero value otherwise.

### GetEnvironmentSlugOk

`func (o *RunCreate) GetEnvironmentSlugOk() (*string, bool)`

GetEnvironmentSlugOk returns a tuple with the EnvironmentSlug field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetEnvironmentSlug

`func (o *RunCreate) SetEnvironmentSlug(v string)`

SetEnvironmentSlug sets EnvironmentSlug field to given value.

### HasEnvironmentSlug

`func (o *RunCreate) HasEnvironmentSlug() bool`

HasEnvironmentSlug returns a boolean if a field has been set.

### GetMilestoneId

`func (o *RunCreate) GetMilestoneId() int64`
Expand Down
36 changes: 36 additions & 0 deletions qase-api-client/docs/SearchResponseAllOfResultEntities.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Name | Type | Description | Notes
**CustomFields** | Pointer to [**[]CustomFieldValue**](CustomFieldValue.md) | | [optional]
**Tags** | Pointer to [**[]TagValue**](TagValue.md) | | [optional]
**Cases** | Pointer to **[]int64** | | [optional]
**PlanId** | Pointer to **NullableInt64** | | [optional]
**Hash** | Pointer to **string** | | [optional]
**Comment** | Pointer to **NullableString** | | [optional]
**Stacktrace** | Pointer to **NullableString** | | [optional]
Expand Down Expand Up @@ -496,6 +497,41 @@ SetCases sets Cases field to given value.

HasCases returns a boolean if a field has been set.

### GetPlanId

`func (o *SearchResponseAllOfResultEntities) GetPlanId() int64`

GetPlanId returns the PlanId field if non-nil, zero value otherwise.

### GetPlanIdOk

`func (o *SearchResponseAllOfResultEntities) GetPlanIdOk() (*int64, bool)`

GetPlanIdOk returns a tuple with the PlanId field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetPlanId

`func (o *SearchResponseAllOfResultEntities) SetPlanId(v int64)`

SetPlanId sets PlanId field to given value.

### HasPlanId

`func (o *SearchResponseAllOfResultEntities) HasPlanId() bool`

HasPlanId returns a boolean if a field has been set.

### SetPlanIdNil

`func (o *SearchResponseAllOfResultEntities) SetPlanIdNil(b bool)`

SetPlanIdNil sets the value for PlanId to be an explicit nil

### UnsetPlanId
`func (o *SearchResponseAllOfResultEntities) UnsetPlanId()`

UnsetPlanId ensures that no value is present for PlanId, not even an explicit nil
### GetHash

`func (o *SearchResponseAllOfResultEntities) GetHash() string`
Expand Down
47 changes: 47 additions & 0 deletions qase-api-client/model_run.go

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

Loading

0 comments on commit 421e569

Please sign in to comment.