Skip to content

Commit 564b809

Browse files
committed
Sync open source content 🐝 (from 7270ae1a1ca13a85e75bbf69308622890893f777)
1 parent 479bd28 commit 564b809

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

docs/customize/authentication/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ end
207207

208208
<Callout title="Note" type="info">
209209

210-
**Security hoisting:** In cases where global security is **not** defined, Speakeasy automatically hoists the most commonly occurring operation-level security to be considered global. This simplifies SDK usage.
210+
**Security hoisting:** In cases where global security is **not** defined, Speakeasy automatically hoists the most commonly occurring operation-level security to be considered global. This simplifies SDK usage. To opt out, set `auth.hoistGlobalSecurity: false` in your `gen.yaml`.
211211

212212
</Callout>
213213

docs/speakeasy-reference/generation/assets/gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ generation:
1515
securityFeb2025: true
1616
auth:
1717
OAuth2ClientCredentialsEnabled: true
18+
hoistGlobalSecurity: true
1819
baseServerUrl: "speakeasy.bar/public/api/"
1920
mockServer:
2021
disabled: true
21-
# Add language-specific configs here
22+
# Add language-specific configs here

docs/speakeasy-reference/generation/gen-yaml.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,23 @@ Includes specific fixes or features to be applied during SDK generation to avoid
113113
### auth
114114

115115
- `OAuth2ClientCredentialsEnabled`: Enables the generation of code for handling OAuth 2.0 client credentials for authentication, where possible. **Enterprise license only**.
116+
- `hoistGlobalSecurity`: When `true` (default), Speakeasy identifies the most commonly used operation-level security scheme and hoists it to global security if no global security is defined. Set to `false` to disable this behavior.
116117

117118
For detailed information about authentication configuration, see our [guide to customizing security and authentication](/docs/customize/authentication/configuration).
118119

119120
```yaml
120121
auth:
121122
OAuth2ClientCredentialsEnabled: true
123+
hoistGlobalSecurity: true
124+
```
125+
126+
#### Disable security hoisting
127+
128+
Set `hoistGlobalSecurity` to `false` to opt out:
129+
130+
```yaml
131+
auth:
132+
hoistGlobalSecurity: false
122133
```
123134

124135
### baseServerUrl

0 commit comments

Comments
 (0)