Skip to content

Commit

Permalink
Merge pull request #35 from Authress/handle-readonly-properties
Browse files Browse the repository at this point in the history
ReadOnly properties should be set as Optional on creation of object. …
  • Loading branch information
wparad authored Sep 11, 2024
2 parents cd0702f + 9af673b commit 96a1764
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion authress/models/access_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class AccessRequest(BaseModel):
"""
The access requested by a user. # noqa: E501
"""
request_id: constr(strict=True, max_length=100, min_length=1) = Field(default=..., alias="requestId", description="Unique identifier for the request.")
request_id: Optional[constr(strict=True, max_length=100, min_length=1)] = Field(default=None, alias="requestId", description="Unique identifier for the request.")
last_updated: Optional[datetime] = Field(default=None, alias="lastUpdated", description="The expected last time the request was updated")
status: Optional[StrictStr] = Field(default=None, description="Current status of the access request.")
access: AccessTemplate = Field(...)
Expand Down
4 changes: 2 additions & 2 deletions authress/models/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Client(BaseModel):
"""
A client configuration. # noqa: E501
"""
client_id: StrictStr = Field(default=..., alias="clientId", description="The unique ID of the client.")
created_time: datetime = Field(default=..., alias="createdTime")
client_id: Optional[StrictStr] = Field(default=None, alias="clientId", description="The unique ID of the client.")
created_time: Optional[datetime] = Field(default=None, alias="createdTime")
name: Optional[constr(strict=True, max_length=128, min_length=0)] = Field(default=None, description="The name of the client")
options: Optional[ClientOptions] = None
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.")
Expand Down
4 changes: 2 additions & 2 deletions authress/models/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class Extension(BaseModel):
"""
Extension
"""
extension_id: constr(strict=True, max_length=64, min_length=1) = Field(default=..., alias="extensionId")
extension_id: Optional[constr(strict=True, max_length=64, min_length=1)] = Field(default=None, alias="extensionId")
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")
created_time: datetime = Field(default=..., alias="createdTime")
created_time: Optional[datetime] = Field(default=None, alias="createdTime")
application: Optional[ExtensionApplication] = None
client: Optional[ExtensionClient] = None
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 }")
Expand Down
2 changes: 1 addition & 1 deletion authress/models/extension_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ExtensionApplication(BaseModel):
"""
The extension's application configuration. The application contains the necessary information for users to log in to the extension. # noqa: E501
"""
application_id: StrictStr = Field(default=..., alias="applicationId", description="The unique ID of the application.")
application_id: Optional[StrictStr] = Field(default=None, alias="applicationId", description="The unique ID of the application.")
redirect_urls: Optional[conlist(constr(strict=True, max_length=1024), max_items=100, min_items=0)] = Field(default=None, alias="redirectUrls")
links: Optional[Links] = None
__properties = ["applicationId", "redirectUrls", "links"]
Expand Down
2 changes: 1 addition & 1 deletion authress/models/extension_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ExtensionClient(BaseModel):
"""
The extension's client configuration. # noqa: E501
"""
client_id: StrictStr = Field(default=..., alias="clientId", description="The unique ID of the client.")
client_id: Optional[StrictStr] = Field(default=None, alias="clientId", description="The unique ID of the client.")
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.")
links: Optional[Links] = None
__properties = ["clientId", "rateLimits", "links"]
Expand Down
2 changes: 1 addition & 1 deletion authress/models/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Invite(BaseModel):
"""
The user invite used to invite users to your application or to Authress as an admin. # noqa: E501
"""
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.")
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.")
tenant_id: Optional[constr(strict=True, max_length=128, min_length=0)] = Field(default=None, alias="tenantId")
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.")
links: Optional[AccountLinks] = None
Expand Down
1 change: 0 additions & 1 deletion docs/ClientAccessKey.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ A client access key configuration. The configuration contains information about
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key_id** | **str** | The unique ID of the client. | [optional] [readonly]
**client_id** | **str** | The unique ID of the client. | [readonly]
**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]
**generation_date** | **datetime** | | [optional] [readonly]
**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]
Expand Down

0 comments on commit 96a1764

Please sign in to comment.