Skip to content

Commit 96a1764

Browse files
authored
Merge pull request #35 from Authress/handle-readonly-properties
ReadOnly properties should be set as Optional on creation of object. …
2 parents cd0702f + 9af673b commit 96a1764

7 files changed

+8
-9
lines changed

authress/models/access_request.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class AccessRequest(BaseModel):
3131
"""
3232
The access requested by a user. # noqa: E501
3333
"""
34-
request_id: constr(strict=True, max_length=100, min_length=1) = Field(default=..., alias="requestId", description="Unique identifier for the request.")
34+
request_id: Optional[constr(strict=True, max_length=100, min_length=1)] = Field(default=None, alias="requestId", description="Unique identifier for the request.")
3535
last_updated: Optional[datetime] = Field(default=None, alias="lastUpdated", description="The expected last time the request was updated")
3636
status: Optional[StrictStr] = Field(default=None, description="Current status of the access request.")
3737
access: AccessTemplate = Field(...)

authress/models/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class Client(BaseModel):
3232
"""
3333
A client configuration. # noqa: E501
3434
"""
35-
client_id: StrictStr = Field(default=..., alias="clientId", description="The unique ID of the client.")
36-
created_time: datetime = Field(default=..., alias="createdTime")
35+
client_id: Optional[StrictStr] = Field(default=None, alias="clientId", description="The unique ID of the client.")
36+
created_time: Optional[datetime] = Field(default=None, alias="createdTime")
3737
name: Optional[constr(strict=True, max_length=128, min_length=0)] = Field(default=None, description="The name of the client")
3838
options: Optional[ClientOptions] = None
3939
rate_limits: Optional[conlist(ClientRateLimit, max_items=1, min_items=0)] = Field(default=None, alias="rateLimits", description="A list of the service client rate limits. Rate Limits can be used to prevent service clients from creating too many requests to your API. They can also limit the number of requests to Authress management APIs, or contain a maximum quota for a client before it is not longer allowed to make additional requests.")

authress/models/extension.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class Extension(BaseModel):
3131
"""
3232
Extension
3333
"""
34-
extension_id: constr(strict=True, max_length=64, min_length=1) = Field(default=..., alias="extensionId")
34+
extension_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(default=None, alias="extensionId")
3535
name: Optional[constr(strict=True, max_length=128, min_length=0)] = Field(default=None, description="The name of the extension. This name is visible in the Authress management portal")
36-
created_time: datetime = Field(default=..., alias="createdTime")
36+
created_time: Optional[datetime] = Field(default=None, alias="createdTime")
3737
application: Optional[ExtensionApplication] = None
3838
client: Optional[ExtensionClient] = None
3939
tags: Optional[Dict[str, constr(strict=True, max_length=128)]] = Field(default=None, description="The tags associated with this resource, this property is an map. { key1: value1, key2: value2 }")

authress/models/extension_application.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class ExtensionApplication(BaseModel):
3030
"""
3131
The extension's application configuration. The application contains the necessary information for users to log in to the extension. # noqa: E501
3232
"""
33-
application_id: StrictStr = Field(default=..., alias="applicationId", description="The unique ID of the application.")
33+
application_id: Optional[StrictStr] = Field(default=None, alias="applicationId", description="The unique ID of the application.")
3434
redirect_urls: Optional[conlist(constr(strict=True, max_length=1024), max_items=100, min_items=0)] = Field(default=None, alias="redirectUrls")
3535
links: Optional[Links] = None
3636
__properties = ["applicationId", "redirectUrls", "links"]

authress/models/extension_client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class ExtensionClient(BaseModel):
3131
"""
3232
The extension's client configuration. # noqa: E501
3333
"""
34-
client_id: StrictStr = Field(default=..., alias="clientId", description="The unique ID of the client.")
34+
client_id: Optional[StrictStr] = Field(default=None, alias="clientId", description="The unique ID of the client.")
3535
rate_limits: Optional[conlist(ClientRateLimit, max_items=1, min_items=0)] = Field(default=None, alias="rateLimits", description="A list of the service client rate limits. Rate Limits can be used to prevent service clients from creating too many requests to your API. They can also limit the number of requests to Authress management APIs, or contain a maximum quota for a client before it is not longer allowed to make additional requests.")
3636
links: Optional[Links] = None
3737
__properties = ["clientId", "rateLimits", "links"]

authress/models/invite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Invite(BaseModel):
3131
"""
3232
The user invite used to invite users to your application or to Authress as an admin. # noqa: E501
3333
"""
34-
invite_id: StrictStr = Field(default=..., alias="inviteId", description="The unique identifier for the invite. Use this ID to accept the invite. This parameter is ignored during invite creation.")
34+
invite_id: Optional[StrictStr] = Field(default=None, alias="inviteId", description="The unique identifier for the invite. Use this ID to accept the invite. This parameter is ignored during invite creation.")
3535
tenant_id: Optional[constr(strict=True, max_length=128, min_length=0)] = Field(default=None, alias="tenantId")
3636
statements: conlist(InviteStatement, max_items=100, min_items=0) = Field(default=..., description="A list of statements which match roles to resources. The invited user will all statements apply to them when the invite is accepted.")
3737
links: Optional[AccountLinks] = None

docs/ClientAccessKey.md

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ A client access key configuration. The configuration contains information about
66
Name | Type | Description | Notes
77
------------ | ------------- | ------------- | -------------
88
**key_id** | **str** | The unique ID of the client. | [optional] [readonly]
9-
**client_id** | **str** | The unique ID of the client. | [readonly]
109
**public_key** | **str** | Specify a public key on access key creation to bring your own private key. When left blank, Authress will automatically generate a private and public key pair and then return the private key as part of the request. This property holds the public key. | [optional]
1110
**generation_date** | **datetime** | | [optional] [readonly]
1211
**client_secret** | **str** | The unencoded OAuth client secret used with the OAuth endpoints to request a JWT using the `client_credentials` grant type. Pass the clientId and the clientSecret to the documented /tokens endpoint. | [optional] [readonly]

0 commit comments

Comments
 (0)