diff --git a/fern/products/api-def/openapi/auth.mdx b/fern/products/api-def/openapi/auth.mdx index 7aca361ce..6940b776e 100644 --- a/fern/products/api-def/openapi/auth.mdx +++ b/fern/products/api-def/openapi/auth.mdx @@ -218,6 +218,8 @@ auth-schemes: env: MY_CLIENT_SECRET ``` +[Set `omit: true` on `username` or `password`](/learn/sdks/reference/generators-yml#usernameomit-passwordomit) to remove it from the generated SDK. + diff --git a/fern/products/sdks/snippets/basic-auth-params.mdx b/fern/products/sdks/snippets/basic-auth-params.mdx index 8f408f3d2..6b8c3efdb 100644 --- a/fern/products/sdks/snippets/basic-auth-params.mdx +++ b/fern/products/sdks/snippets/basic-auth-params.mdx @@ -30,4 +30,7 @@ auth-schemes: Environment variable name that the SDK will automatically scan for the username or password value. When this environment variable is present, users don't need to explicitly provide the username parameter. Follow naming conventions like `YOUR_APP_USERNAME` or `SERVICE_CLIENT_ID`. + + + Use when your API expects only one half of the basic auth credential pair. When `true`, the field is removed from the generated SDK's public API. The omitted field is treated as an empty string when encoding the `Authorization` header (omitting `password` produces `base64("username:")`; omitting `username` produces `base64(":password")`). When both are omitted, the `Authorization` header is skipped entirely. \ No newline at end of file