Skip to content

Commit

Permalink
refactor: remove useless pydantic.ConfigDict definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed May 25, 2024
1 parent e43ccd5 commit f15cbaa
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 14 deletions.
4 changes: 3 additions & 1 deletion pydantic_scim2/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@


class SCIM2Model(BaseModel):
model_config = ConfigDict(extra="allow", alias_generator=to_camel)
model_config = ConfigDict(
extra="allow", alias_generator=to_camel, populate_by_name=True
)
3 changes: 0 additions & 3 deletions pydantic_scim2/rfc7643/group.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
from typing import Optional

from pydantic import AnyUrl
from pydantic import ConfigDict
from pydantic import Field

from ..base import SCIM2Model
from .resource import Resource


class GroupMember(SCIM2Model):
model_config = ConfigDict(populate_by_name=True)

value: Optional[str] = None
display: Optional[str] = None
ref: Optional[AnyUrl] = Field(None, alias="$ref")
Expand Down
5 changes: 0 additions & 5 deletions pydantic_scim2/rfc7643/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
from typing import List
from typing import Optional

from pydantic import ConfigDict
from pydantic.alias_generators import to_camel

from ..base import SCIM2Model


Expand Down Expand Up @@ -64,8 +61,6 @@ class Meta(SCIM2Model):


class Resource(SCIM2Model):
model_config = ConfigDict(extra="allow", alias_generator=to_camel)

schemas: List[str]
"""The "schemas" attribute is a REQUIRED attribute and is an array of
Strings containing URIs that are used to indicate the namespaces of the
Expand Down
5 changes: 0 additions & 5 deletions pydantic_scim2/rfc7643/resource_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Optional

from pydantic import AnyUrl
from pydantic import ConfigDict
from pydantic import Field

from ..base import SCIM2Model
Expand All @@ -11,8 +10,6 @@


class SchemaExtension(SCIM2Model):
model_config = ConfigDict(extra="allow")

schema_: AnyUrl = Field(..., alias="schema")
"""The URI of a schema extension."""

Expand All @@ -28,8 +25,6 @@ class SchemaExtension(SCIM2Model):


class ResourceType(Resource):
model_config = ConfigDict(extra="allow")

schemas: List[str] = ["urn:ietf:params:scim:schemas:core:2.0:ResourceType"]

# Each SCIM resource (Users, Groups, etc.) includes the following
Expand Down

0 comments on commit f15cbaa

Please sign in to comment.