Skip to content

Commit ceff1f4

Browse files
committed
fix(store-types): omitempty fields on store type creation
1 parent dfea153 commit ceff1f4

File tree

2 files changed

+58
-57
lines changed

2 files changed

+58
-57
lines changed

.goreleaser.yml

Lines changed: 34 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,33 @@ before:
55
# this is just an example and not a requirement for provider building/publishing
66
- go mod tidy
77
builds:
8-
- env:
9-
# goreleaser does not work with CGO, it could also complicate
10-
# usage by users in CI/CD systems like Terraform Cloud where
11-
# they are unable to install libraries.
12-
- CGO_ENABLED=0
13-
mod_timestamp: '{{ .CommitTimestamp }}'
14-
flags:
15-
- -trimpath
16-
ldflags:
17-
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18-
goos:
19-
- freebsd
20-
- windows
21-
- linux
22-
- darwin
23-
goarch:
24-
- amd64
25-
- '386'
26-
- arm
27-
- arm64
28-
ignore:
29-
- goos: darwin
30-
goarch: '386'
31-
binary: '{{ .ProjectName }}_v{{ .Version }}'
8+
- env:
9+
# goreleaser does not work with CGO, it could also complicate
10+
# usage by users in CI/CD systems like Terraform Cloud where
11+
# they are unable to install libraries.
12+
- CGO_ENABLED=0
13+
mod_timestamp: '{{ .CommitTimestamp }}'
14+
flags:
15+
- -trimpath
16+
ldflags:
17+
- '-s -w -X main.version={{.Version}} -X main.commit={{.Commit}}'
18+
goos:
19+
- freebsd
20+
- windows
21+
- linux
22+
- darwin
23+
goarch:
24+
- amd64
25+
- '386'
26+
- arm
27+
- arm64
28+
ignore:
29+
- goos: darwin
30+
goarch: '386'
31+
binary: '{{ .ProjectName }}_v{{ .Version }}'
3232
archives:
33-
- format: zip
34-
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
33+
- format: zip
34+
name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}'
3535
checksum:
3636
extra_files:
3737
- glob: 'integration-manifest.json'
@@ -51,6 +51,7 @@ signs:
5151
- "--detach-sign"
5252
- "${artifact}"
5353
release:
54+
prerelease: auto
5455
extra_files:
5556
- glob: 'integration-manifest.json'
5657
name_template: '{{ .ProjectName }}_{{ .Version }}_manifest.json'
@@ -61,13 +62,13 @@ changelog:
6162
use: github
6263
filters:
6364
exclude:
64-
- '^test:'
65-
- '^chore'
66-
- 'merge conflict'
67-
- Merge pull request
68-
- Merge remote-tracking branch
69-
- Merge branch
70-
- go mod tidy
65+
- '^test:'
66+
- '^chore'
67+
- 'merge conflict'
68+
- Merge pull request
69+
- Merge remote-tracking branch
70+
- Merge branch
71+
- go mod tidy
7172
groups:
7273
- title: Dependency updates
7374
regexp: ".*(feat|fix)\\(deps\\)*:+.*$"

v2/api/store_type_models.go

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,30 @@ type CertificateStoreTypeGeneric struct {
2020
}
2121

2222
type CertificateStoreType struct {
23-
Name string `json:"Name"`
24-
ShortName string `json:"ShortName"`
25-
Capability string `json:"Capability"`
26-
StoreType int `json:"StoreType"`
27-
ImportType int `json:"ImportType"`
28-
LocalStore bool `json:"LocalStore"`
29-
SupportedOperations *StoreTypeSupportedOperations `json:"SupportedOperations"`
30-
Properties *[]StoreTypePropertyDefinition `json:"Properties"`
31-
EntryParameters *[]EntryParameter `json:"EntryParameters"`
32-
PasswordOptions *StoreTypePasswordOptions `json:"PasswordOptions"`
33-
StorePathType string `json:"StorePathType"`
34-
StorePathValue string `json:"StorePathValue"`
35-
PrivateKeyAllowed string `json:"PrivateKeyAllowed"`
36-
JobProperties *[]string `json:"JobProperties"`
37-
ServerRequired bool `json:"ServerRequired"`
38-
PowerShell bool `json:"PowerShell"`
39-
BlueprintAllowed bool `json:"BlueprintAllowed"`
40-
CustomAliasAllowed string `json:"CustomAliasAllowed"`
41-
ServerRegistration int `json:"ServerRegistration"`
42-
InventoryEndpoint string `json:"InventoryEndpoint"`
43-
InventoryJobType string `json:"InventoryJobType"`
44-
ManagementJobType string `json:"ManagementJobType"`
45-
DiscoveryJobType string `json:"DiscoveryJobType"`
46-
EnrollmentJobType string `json:"EnrollmentJobType"`
23+
Name string `json:"Name,omitempty"`
24+
ShortName string `json:"ShortName,omitempty"`
25+
Capability string `json:"Capability,omitempty"`
26+
StoreType int `json:"StoreType,omitempty"`
27+
ImportType int `json:"ImportType,omitempty"`
28+
LocalStore bool `json:"LocalStore,omitempty"`
29+
SupportedOperations *StoreTypeSupportedOperations `json:"SupportedOperations,omitempty"`
30+
Properties *[]StoreTypePropertyDefinition `json:"Properties,omitempty"`
31+
EntryParameters *[]EntryParameter `json:"EntryParameters,omitempty"`
32+
PasswordOptions *StoreTypePasswordOptions `json:"PasswordOptions,omitempty"`
33+
StorePathType string `json:"StorePathType,omitempty"`
34+
StorePathValue string `json:"StorePathValue,omitempty"`
35+
PrivateKeyAllowed string `json:"PrivateKeyAllowed,omitempty"`
36+
JobProperties *[]string `json:"JobProperties,omitempty"`
37+
ServerRequired bool `json:"ServerRequired,omitempty"`
38+
PowerShell bool `json:"PowerShell,omitempty"`
39+
BlueprintAllowed bool `json:"BlueprintAllowed,omitempty"`
40+
CustomAliasAllowed string `json:"CustomAliasAllowed,omitempty"`
41+
ServerRegistration int `json:"ServerRegistration,omitempty"`
42+
InventoryEndpoint string `json:"InventoryEndpoint,omitempty"`
43+
InventoryJobType string `json:"InventoryJobType,omitempty"`
44+
ManagementJobType string `json:"ManagementJobType,omitempty"`
45+
DiscoveryJobType string `json:"DiscoveryJobType,omitempty"`
46+
EnrollmentJobType string `json:"EnrollmentJobType,omitempty"`
4747
}
4848

4949
type CertStoreTypeResponseList []struct {

0 commit comments

Comments
 (0)