fern icon indicating copy to clipboard operation
fern copied to clipboard

Support Sensitive data feature flags

Open aryehklein opened this issue 9 months ago • 1 comments

Which Fern component?

SDK Generator

How important is this?

P1 - High (Strongly needed)

What's the feature?

We would like fern to support tagging a field as sensitive in the fern api definition. We would want this to get consumed by the various generators (specifically by the ts, and python/fast api generator) and generate the model in such a way that the sensitive field would be masked out of the box when logging. See https://docs.pydantic.dev/2.0/usage/types/secrets/ for a possible approach for pydantic v2 (Ideally even pydantic v1 would be supported).

The use case this is meant to support is tagging things that are PII as sensitive to protect developers from accidentally logging them.

Any alternatives?

No response

Anything else? (Optional)

No response

Are you interested in contributing this feature?

No

aryehklein avatar Mar 10 '25 20:03 aryehklein

A dedicated sensitive tag is more appropriate here than a field attribute.

vikramnagwal avatar Mar 11 '25 17:03 vikramnagwal