Skip to content

Commit 35a3da4

Browse files
committed
- Reverted the change of making kty as optional.
1 parent 0733553 commit 35a3da4

5 files changed

Lines changed: 4 additions & 23 deletions

docs/OAuth2ClientJsonSigningKeyResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Name | Type | Description | Notes
1212
**links** | [**OAuthClientSecretLinks**](OAuthClientSecretLinks.md) | | [optional]
1313
**kid** | **str** | Unique identifier of the JSON Web Key in the OAuth 2.0 client's JWKS | [optional]
1414
**status** | **str** | Status of the OAuth 2.0 client JSON Web Key | [optional]
15-
**kty** | **str** | Cryptographic algorithm family for the certificate's key pair | [optional]
15+
**kty** | **str** | Cryptographic algorithm family for the certificate's key pair |
1616
**alg** | **str** | Algorithm used in the key | [optional]
1717
**use** | **str** | Acceptable use of the JSON Web Key | [optional]
1818

okta/models/o_auth2_client_json_signing_key_response.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@ class OAuth2ClientJsonSigningKeyResponse(BaseModel):
6868
status: Optional[StrictStr] = Field(
6969
default=None, description="Status of the OAuth 2.0 client JSON Web Key"
7070
)
71-
kty: Optional[StrictStr] = Field(
72-
default=None,
73-
description="Cryptographic algorithm family for the certificate's key pair",
71+
kty: StrictStr = Field(
72+
description="Cryptographic algorithm family for the certificate's key pair"
7473
)
7574
alg: Optional[StrictStr] = Field(
7675
default=None, description="Algorithm used in the key"
@@ -103,9 +102,6 @@ def status_validate_enum(cls, value):
103102
@field_validator("kty")
104103
def kty_validate_enum(cls, value):
105104
"""Validates the enum"""
106-
if value is None:
107-
return value
108-
109105
if value not in set(["RSA", "EC"]):
110106
raise ValueError("must be one of enum values ('RSA', 'EC')")
111107
return value
@@ -210,11 +206,6 @@ def to_dict(self) -> Dict[str, Any]:
210206
if self.kid is None and "kid" in self.model_fields_set:
211207
_dict["kid"] = None
212208

213-
# set to None if kty (nullable) is None
214-
# and model_fields_set contains the field
215-
if self.kty is None and "kty" in self.model_fields_set:
216-
_dict["kty"] = None
217-
218209
# set to None if alg (nullable) is None
219210
# and model_fields_set contains the field
220211
if self.alg is None and "alg" in self.model_fields_set:

okta/models/o_auth2_client_json_web_key_ec_response.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,6 @@ def to_dict(self) -> Dict[str, Any]:
135135
if self.kid is None and "kid" in self.model_fields_set:
136136
_dict["kid"] = None
137137

138-
# set to None if kty (nullable) is None
139-
# and model_fields_set contains the field
140-
if self.kty is None and "kty" in self.model_fields_set:
141-
_dict["kty"] = None
142-
143138
# set to None if alg (nullable) is None
144139
# and model_fields_set contains the field
145140
if self.alg is None and "alg" in self.model_fields_set:

okta/models/o_auth2_client_json_web_key_rsa_response.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,6 @@ def to_dict(self) -> Dict[str, Any]:
121121
if self.kid is None and "kid" in self.model_fields_set:
122122
_dict["kid"] = None
123123

124-
# set to None if kty (nullable) is None
125-
# and model_fields_set contains the field
126-
if self.kty is None and "kty" in self.model_fields_set:
127-
_dict["kty"] = None
128-
129124
# set to None if alg (nullable) is None
130125
# and model_fields_set contains the field
131126
if self.alg is None and "alg" in self.model_fields_set:

openapi/api.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70340,7 +70340,6 @@ components:
7034070340
type: string
7034170341
description: Cryptographic algorithm family for the certificate's key pair
7034270342
example: RSA
70343-
nullable: true
7034470343
enum:
7034570344
- RSA
7034670345
- EC
@@ -70363,6 +70362,7 @@ components:
7036370362
EC: '#/components/schemas/OAuth2ClientJsonWebKeyECResponse'
7036470363
required:
7036570364
- id
70365+
- kty
7036670366
OAuth2ClientJsonWebKeyECRequest:
7036770367
title: EC Signing Key
7036870368
description: An EC signing key

0 commit comments

Comments
 (0)