Skip to content

feat: add With methods to customize CoreAttribute characteristics#195

Merged
q-uint merged 1 commit intomasterfrom
feat/attribute-with-methods
Mar 24, 2026
Merged

feat: add With methods to customize CoreAttribute characteristics#195
q-uint merged 1 commit intomasterfrom
feat/attribute-with-methods

Conversation

@q-uint
Copy link
Collaborator

@q-uint q-uint commented Mar 24, 2026

Allow users to customize type-independent characteristics of pre-built schema attributes without rebuilding them from scratch. This enables use cases like making "emails" required in CoreUserSchema while reusing the existing attribute definition.

RFC 7643 Section 2.2 defines required as a per-attribute characteristic, and the /Schemas endpoint is meant to reflect the actual schema a service provider supports. The spec does not prohibit making additional attributes required beyond the defaults defined in Section 4.

Added methods: WithDescription, WithMutability, WithRequired, WithReturned. All return a copy, leaving the original unmodified.

Closes #176

Allow users to customize type-independent characteristics of pre-built
schema attributes without rebuilding them from scratch. This enables
use cases like making "emails" required in CoreUserSchema while reusing
the existing attribute definition.

Added methods: WithDescription, WithMutability, WithRequired,
WithReturned. All return a copy, leaving the original unmodified.
@q-uint q-uint merged commit 74aeaa1 into master Mar 24, 2026
8 checks passed
@q-uint q-uint deleted the feat/attribute-with-methods branch March 24, 2026 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose SetRequired(bool) method of CoreAttributes in CoreUserSchema

1 participant