Skip to content

Commit 350da8c

Browse files
committed
fix: Remove required fields that are optional in API responses
1 parent ce451b3 commit 350da8c

24 files changed

Lines changed: 1042 additions & 1518 deletions

.generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36435,9 +36435,6 @@ components:
3643536435
description: Groups to be included
3643636436
items:
3643736437
type: string
36438-
required:
36439-
- exclude
36440-
- include
3644136438
GroupMembershipsRequestSchema:
3644236439
type: object
3644336440
properties:
@@ -44353,9 +44350,6 @@ components:
4435344350
$ref: '#/components/schemas/GroupCondition'
4435444351
users:
4435544352
$ref: '#/components/schemas/UserCondition'
44356-
required:
44357-
- groups
44358-
- users
4435944353
PolicyPlatformOperatingSystemType:
4436044354
type: string
4436144355
x-okta-known-values:
@@ -47408,22 +47402,6 @@ components:
4740847402
subjectNameIdTemplate:
4740947403
type: string
4741047404
description: Template for app user's username when a user is assigned to the app
47411-
required:
47412-
- allowMultipleAcsEndpoints
47413-
- assertionSigned
47414-
- audience
47415-
- authnContextClassRef
47416-
- destination
47417-
- digestAlgorithm
47418-
- honorForceAuthn
47419-
- idpIssuer
47420-
- recipient
47421-
- requestCompressed
47422-
- responseSigned
47423-
- signatureAlgorithm
47424-
- ssoAcsUrl
47425-
- subjectNameIdFormat
47426-
- subjectNameIdTemplate
4742747405
SamlAssertionEncryption:
4742847406
description: Determines if the app supports encrypted assertions
4742947407
type: object
@@ -49543,11 +49521,6 @@ components:
4954349521
userNameSelector:
4954449522
type: string
4954549523
description: CSS selector for the **Username** field in the sign-in form (for three-field SWA apps with the `template_swa3field` app name definition)
49546-
required:
49547-
- buttonField
49548-
- passwordField
49549-
- usernameField
49550-
- url
4955149524
TacAuthenticatorEnrollment:
4955249525
type: object
4955349526
properties:
@@ -51147,9 +51120,6 @@ components:
5114751120
type: array
5114851121
items:
5114951122
type: string
51150-
required:
51151-
- exclude
51152-
- include
5115351123
UserCredentials:
5115451124
description: Specifies primary authentication and recovery credentials for a user. Credential types and requirements vary depending on the provider and security policy of the org.
5115551125
type: object
@@ -52126,9 +52096,6 @@ components:
5212652096
$ref: '#/components/schemas/UserIdentifierConditionEvaluatorPattern'
5212752097
type:
5212852098
$ref: '#/components/schemas/UserIdentifierType'
52129-
required:
52130-
- patterns
52131-
- type
5213252099
UserIdentifierType:
5213352100
description: What to match against, either user ID or an attribute in the user's Okta profile.
5213452101
type: string

.github/workflows/prepareReleaseBranch.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,12 @@ jobs:
3434
with:
3535
ref: ${{ github.event.inputs.branch }}
3636

37-
- name: Remove v2
38-
run: rm -rf okta openapi tests go.mod go.sum
39-
4037
- name: Setup node
4138
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610
4239
with:
4340
node-version: 16.16.0
4441

45-
- name: Install openapi generator
46-
run: npm install @openapitools/openapi-generator-cli -g
47-
48-
- name: Set openapi generator version
49-
run: openapi-generator-cli version-manager set 7.15.0
50-
51-
- name: Generate go client
52-
run: npx @openapitools/openapi-generator-cli generate -c ./.generator/config.yaml -i .generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml --skip-validate-spec
53-
54-
- run: make fmt
55-
56-
- run: make import
57-
58-
- run: cd okta/v6 && mv go.mod go.sum ../../
59-
60-
- run: cd okta && mv v6/* ./ && rm -rf v6
42+
- run: make generate
6143

6244
- name: Commit generated code
6345
uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,11 @@ test\:unit:
7676
go test -cover -coverpkg=./okta -failfast -race ./okta -test.v
7777

7878
generate:
79-
npx @openapitools/openapi-generator-cli generate -c ./.generator/config.yaml -i .generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml --skip-validate-spec
80-
79+
rm -rf okta openapi tests go.mod go.sum
80+
npm install @openapitools/openapi-generator-cli -g
81+
openapi-generator-cli version-manager set 7.15.0
82+
openapi-generator-cli generate -c ./.generator/config.yaml -i .generator/okta-management-APIs-oasv3-noEnums-inheritance.yaml --skip-validate-spec
83+
make fmt
84+
make import
85+
cd okta/v6 && mv go.mod go.sum ../../
86+
cd okta && mv v6/* ./ && rm -rf v6

okta/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Allows customers to easily access the Okta Management APIs
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: 5.1.0
9-
- Package version: 6.0.1
9+
- Package version: 6.0.2
1010
- Build package: org.openapitools.codegen.languages.GoClientCodegen
1111
For more information, please visit [https://developer.okta.com/](https://developer.okta.com/)
1212

okta/api/openapi.yaml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -57889,9 +57889,6 @@ components:
5788957889
items:
5789057890
type: string
5789157891
type: array
57892-
required:
57893-
- exclude
57894-
- include
5789557892
type: object
5789657893
GroupMembershipsRequestSchema:
5789757894
properties:
@@ -69161,9 +69158,6 @@ components:
6916169158
$ref: "#/components/schemas/GroupCondition"
6916269159
users:
6916369160
$ref: "#/components/schemas/UserCondition"
69164-
required:
69165-
- groups
69166-
- users
6916769161
type: object
6916869162
PolicyPlatformOperatingSystemType:
6916969163
type: string
@@ -73201,22 +73195,6 @@ components:
7320173195
description: Template for app user's username when a user is assigned to
7320273196
the app
7320373197
type: string
73204-
required:
73205-
- allowMultipleAcsEndpoints
73206-
- assertionSigned
73207-
- audience
73208-
- authnContextClassRef
73209-
- destination
73210-
- digestAlgorithm
73211-
- honorForceAuthn
73212-
- idpIssuer
73213-
- recipient
73214-
- requestCompressed
73215-
- responseSigned
73216-
- signatureAlgorithm
73217-
- ssoAcsUrl
73218-
- subjectNameIdFormat
73219-
- subjectNameIdTemplate
7322073198
type: object
7322173199
SamlAssertionEncryption:
7322273200
description: Determines if the app supports encrypted assertions
@@ -76341,11 +76319,6 @@ components:
7634176319
description: CSS selector for the **Username** field in the sign-in form
7634276320
(for three-field SWA apps with the `template_swa3field` app name definition)
7634376321
type: string
76344-
required:
76345-
- buttonField
76346-
- passwordField
76347-
- url
76348-
- usernameField
7634976322
type: object
7635076323
TacAuthenticatorEnrollment:
7635176324
example:
@@ -77778,9 +77751,6 @@ components:
7777877751
items:
7777977752
type: string
7778077753
type: array
77781-
required:
77782-
- exclude
77783-
- include
7778477754
type: object
7778577755
UserCredentials:
7778677756
description: Specifies primary authentication and recovery credentials for a
@@ -79191,9 +79161,6 @@ components:
7919179161
x-okta-known-values:
7919279162
- ATTRIBUTE
7919379163
- IDENTIFIER
79194-
required:
79195-
- patterns
79196-
- type
7919779164
type: object
7919879165
UserIdentifierType:
7919979166
description: "What to match against, either user ID or an attribute in the user's\

okta/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ var (
6868
)
6969

7070
const (
71-
VERSION = "6.0.1"
71+
VERSION = "6.0.2"
7272
AccessTokenCacheKey = "OKTA_ACCESS_TOKEN"
7373
DpopAccessTokenNonce = "DPOP_OKTA_ACCESS_TOKEN_NONCE"
7474
DpopAccessTokenPrivateKey = "DPOP_OKTA_ACCESS_TOKEN_PRIVATE_KEY"

okta/configuration.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ type Configuration struct {
165165
func NewConfiguration(conf ...ConfigSetter) (*Configuration, error) {
166166
cfg := &Configuration{
167167
DefaultHeader: make(map[string]string),
168-
UserAgent: fmt.Sprintf("okta-sdk-golang/%s golang/%s %s/%s", "6.0.1", runtime.Version(), runtime.GOOS, runtime.GOARCH),
168+
UserAgent: fmt.Sprintf("okta-sdk-golang/%s golang/%s %s/%s", "6.0.2", runtime.Version(), runtime.GOOS, runtime.GOARCH),
169169
Debug: false,
170170
Servers: ServerConfigurations{
171171
{

okta/docs/GroupCondition.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Exclude** | **[]string** | Groups to be excluded |
8-
**Include** | **[]string** | Groups to be included |
7+
**Exclude** | Pointer to **[]string** | Groups to be excluded | [optional]
8+
**Include** | Pointer to **[]string** | Groups to be included | [optional]
99

1010
## Methods
1111

1212
### NewGroupCondition
1313

14-
`func NewGroupCondition(exclude []string, include []string, ) *GroupCondition`
14+
`func NewGroupCondition() *GroupCondition`
1515

1616
NewGroupCondition instantiates a new GroupCondition object
1717
This constructor will assign default values to properties that have it defined,
@@ -45,6 +45,11 @@ and a boolean to check if the value has been set.
4545

4646
SetExclude sets Exclude field to given value.
4747

48+
### HasExclude
49+
50+
`func (o *GroupCondition) HasExclude() bool`
51+
52+
HasExclude returns a boolean if a field has been set.
4853

4954
### GetInclude
5055

@@ -65,6 +70,11 @@ and a boolean to check if the value has been set.
6570

6671
SetInclude sets Include field to given value.
6772

73+
### HasInclude
74+
75+
`func (o *GroupCondition) HasInclude() bool`
76+
77+
HasInclude returns a boolean if a field has been set.
6878

6979

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

okta/docs/PolicyPeopleCondition.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**Groups** | [**GroupCondition**](GroupCondition.md) | |
8-
**Users** | [**UserCondition**](UserCondition.md) | |
7+
**Groups** | Pointer to [**GroupCondition**](GroupCondition.md) | | [optional]
8+
**Users** | Pointer to [**UserCondition**](UserCondition.md) | | [optional]
99

1010
## Methods
1111

1212
### NewPolicyPeopleCondition
1313

14-
`func NewPolicyPeopleCondition(groups GroupCondition, users UserCondition, ) *PolicyPeopleCondition`
14+
`func NewPolicyPeopleCondition() *PolicyPeopleCondition`
1515

1616
NewPolicyPeopleCondition instantiates a new PolicyPeopleCondition object
1717
This constructor will assign default values to properties that have it defined,
@@ -45,6 +45,11 @@ and a boolean to check if the value has been set.
4545

4646
SetGroups sets Groups field to given value.
4747

48+
### HasGroups
49+
50+
`func (o *PolicyPeopleCondition) HasGroups() bool`
51+
52+
HasGroups returns a boolean if a field has been set.
4853

4954
### GetUsers
5055

@@ -65,6 +70,11 @@ and a boolean to check if the value has been set.
6570

6671
SetUsers sets Users field to given value.
6772

73+
### HasUsers
74+
75+
`func (o *PolicyPeopleCondition) HasUsers() bool`
76+
77+
HasUsers returns a boolean if a field has been set.
6878

6979

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

0 commit comments

Comments
 (0)