Skip to content

Commit d96a4cc

Browse files
Merge pull request #106 from StackVista/stac-23181
stac-23181: Restore query version for backwards compat
2 parents 38fe934 + 768455c commit d96a4cc

File tree

6 files changed

+71
-2
lines changed

6 files changed

+71
-2
lines changed

cmd/rbac/rbac_create_subject.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ func RunCreateSubjectCommand(args *CreateSubjectArgs) di.CmdWithApiFn {
4040
subject := stackstate_api.NewCreateSubject()
4141
if args.Scope != "" {
4242
subject.SetQuery(args.Scope)
43+
subject.SetVersion("0.0.1")
4344
}
4445

4546
resp, err := api.SubjectApi.CreateSubject(cli.Context, args.Subject).

cmd/rbac/rbac_create_subject_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ func TestCreateSubject(t *testing.T) {
4848

4949
otherExpectedSubject := stackstate_api.NewCreateSubject()
5050
otherExpectedSubject.SetQuery(SomeScope)
51+
otherExpectedSubject.SetVersion("0.0.1")
5152
assert.Equal(t, otherExpectedSubject, calls[0].PcreateSubject)
5253

5354
expectedStrings := []string{

generated/stackstate_api/api/openapi.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10715,12 +10715,17 @@ components:
1071510715
CreateSubject:
1071610716
example:
1071710717
query: query
10718+
version: version
1071810719
properties:
1071910720
query:
1072010721
type: string
10722+
version:
10723+
type: string
1072110724
type: object
1072210725
Query:
1072310726
type: string
10727+
Version:
10728+
type: string
1072410729
SubscriptionState:
1072510730
discriminator:
1072610731
propertyName: _type

generated/stackstate_api/docs/CreateSubject.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**Query** | Pointer to **string** | | [optional]
8+
**Version** | Pointer to **string** | | [optional]
89

910
## Methods
1011

@@ -50,6 +51,31 @@ SetQuery sets Query field to given value.
5051

5152
HasQuery returns a boolean if a field has been set.
5253

54+
### GetVersion
55+
56+
`func (o *CreateSubject) GetVersion() string`
57+
58+
GetVersion returns the Version field if non-nil, zero value otherwise.
59+
60+
### GetVersionOk
61+
62+
`func (o *CreateSubject) GetVersionOk() (*string, bool)`
63+
64+
GetVersionOk returns a tuple with the Version field if it's non-nil, zero value otherwise
65+
and a boolean to check if the value has been set.
66+
67+
### SetVersion
68+
69+
`func (o *CreateSubject) SetVersion(v string)`
70+
71+
SetVersion sets Version field to given value.
72+
73+
### HasVersion
74+
75+
`func (o *CreateSubject) HasVersion() bool`
76+
77+
HasVersion returns a boolean if a field has been set.
78+
5379

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

generated/stackstate_api/model_create_subject.go

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stackstate_openapi/openapi_version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
eb3e3df341ccfd167ed8c2e2c14b63a38be686b3
1+
d8fc5194c51017c8e938a1b54f94bdb8a857d6c8

0 commit comments

Comments
 (0)