Skip to content

Commit

Permalink
Prevent extra properties in all models.
Browse files Browse the repository at this point in the history
  • Loading branch information
wparad committed Sep 20, 2024
1 parent 7eadb6e commit 3902d33
Show file tree
Hide file tree
Showing 71 changed files with 73 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change log
This is the changelog for [Authress SDK](readme.md).

## 3.1 ##
* [Breaking] Throw validation error on setting a property that doesn't exist in any of the Authress DTO Models.

## 3.0 ##
* [Breaking] Added type checking everywhere - This means most models have breaking changes.
* [Breaking] Converted properties to be consistent across all generators
Expand Down
1 change: 1 addition & 0 deletions authress/models/access_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def status_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_record_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class AccessRecordAccount(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_record_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AccessRecordCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def status_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_request_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class AccessRequestCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_request_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def status_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/access_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class AccessTemplate(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class Account(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/account_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class AccountCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/account_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class AccountLinks(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/application_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ApplicationDelegation(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/authentication_token_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def session_duration_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/claim_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ClaimRequest(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Client(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/client_access_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def public_key_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/client_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class ClientCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/client_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ClientOptions(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/client_rate_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def quota_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/collection_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class CollectionLinks(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def connection_id_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ConnectionCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class ConnectionConditions(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def supported_content_type_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ConnectionDefaultConnectionProperties(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection_linking_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def type_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/connection_user_data_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def location_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Extension(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/extension_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ExtensionApplication(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/extension_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class ExtensionClient(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/extension_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class ExtensionCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def group_id_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/group_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ class GroupCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class Identity(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/identity_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class IdentityCollection(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/identity_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ class IdentityRequest(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def tenant_id_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/invite_statement.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class InviteStatement(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Link(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/linked_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def group_id_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Links(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/o_auth_authorize_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class OAuthAuthorizeResponse(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/o_auth_token_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def type_validate_enum(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/o_auth_token_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class OAuthTokenResponse(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/pagination.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class Pagination(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/pagination_next.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class PaginationNext(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/permission_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def user_id_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/permission_collection_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class PermissionCollectionAccount(BaseModel):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
1 change: 1 addition & 0 deletions authress/models/permission_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def action_validate_regular_expression(cls, value):

class Config:
"""Pydantic configuration"""
extra = 'forbid'
allow_population_by_field_name = True
validate_assignment = True

Expand Down
Loading

0 comments on commit 3902d33

Please sign in to comment.