Skip to content

Do not restrict to canonical values #34

@azmeuk

Description

@azmeuk

RFC7643 §2.3.1 indicates that string types with canonical values defined can or cannot have other values, depending on the server configuration:

   Additionally, when "canonicalValues"
   is specified, service providers MAY restrict accepted values to the
   specified values.

In §7 it is indicated that values can be ignored:


      canonicalValues  A collection of suggested canonical values that
         MAY be used (e.g., "work" and "home").  In some cases, service
         providers MAY choose to ignore unsupported values.  OPTIONAL.

Currently scim2_models defines custom enums, but that makes pydantic enforce those values only.

https://github.com/yaal-coop/scim2-models/blob/56287ad73027f6e6825d41e0b0c6ef0a339f4f18/scim2_models/rfc7643/user.py#L44-L48

https://github.com/yaal-coop/scim2-models/blob/56287ad73027f6e6825d41e0b0c6ef0a339f4f18/scim2_models/rfc7643/user.py#L56-L57

In that situation scim2-models should accept both arbitrary and enum values.

Also, when #6 is implemented, scim2-models should generate dynamic enums.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions