@postman/sdk-config 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +1 -3
  2. package/dist/index.cjs +882 -747
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +1 -1
  5. package/dist/index.d.ts +1 -1
  6. package/dist/index.js +882 -747
  7. package/dist/index.js.map +1 -1
  8. package/dist/sdk-config/index.cjs +644 -544
  9. package/dist/sdk-config/index.cjs.map +1 -1
  10. package/dist/sdk-config/index.d.cts +1 -1
  11. package/dist/sdk-config/index.d.ts +1 -1
  12. package/dist/sdk-config/index.js +644 -544
  13. package/dist/sdk-config/index.js.map +1 -1
  14. package/dist/sdk-config/v1/index.cjs +644 -544
  15. package/dist/sdk-config/v1/index.cjs.map +1 -1
  16. package/dist/sdk-config/v1/index.d.cts +581 -1047
  17. package/dist/sdk-config/v1/index.d.ts +581 -1047
  18. package/dist/sdk-config/v1/index.js +644 -544
  19. package/dist/sdk-config/v1/index.js.map +1 -1
  20. package/dist/sdk-config-ir/index.cjs +627 -541
  21. package/dist/sdk-config-ir/index.cjs.map +1 -1
  22. package/dist/sdk-config-ir/index.d.cts +1 -1
  23. package/dist/sdk-config-ir/index.d.ts +1 -1
  24. package/dist/sdk-config-ir/index.js +627 -541
  25. package/dist/sdk-config-ir/index.js.map +1 -1
  26. package/dist/sdk-config-ir/v1/index.cjs +627 -541
  27. package/dist/sdk-config-ir/v1/index.cjs.map +1 -1
  28. package/dist/sdk-config-ir/v1/index.d.cts +59 -17
  29. package/dist/sdk-config-ir/v1/index.d.ts +59 -17
  30. package/dist/sdk-config-ir/v1/index.js +627 -541
  31. package/dist/sdk-config-ir/v1/index.js.map +1 -1
  32. package/dist/{typescript-BdDv_kwT.d.cts → typescript-Chge0X4f.d.cts} +1 -2
  33. package/dist/{typescript-BdDv_kwT.d.ts → typescript-Chge0X4f.d.ts} +1 -2
  34. package/package.json +1 -1
  35. package/src/sdk-config/v1/README.md +15 -14
  36. package/src/sdk-config-ir/v1/README.md +29 -15
package/dist/index.js CHANGED
@@ -32,140 +32,152 @@ var hashAlgorithmSchema = z.enum(["sha1", "sha256", "sha384", "sha512"]);
32
32
  var encodingSchema = z.enum(["base64", "hex"]);
33
33
  var payloadComponentSchema = z.enum(["body", "timestamp", "notification-url", "message-id"]);
34
34
  var payloadFormatSchema = z.strictObject({
35
- components: z.array(payloadComponentSchema).min(1),
36
- delimiter: z.string().optional(),
35
+ components: z.array(payloadComponentSchema).min(1).describe("Payload components concatenated in declaration order before signing."),
36
+ delimiter: z.string().optional().describe("The delimiter inserted between payload components."),
37
37
  /**
38
38
  * Set when the body is a form-encoded parameter map that must be canonicalized before signing:
39
39
  * keys sorted, each key's values deduped and sorted, concatenated as key-value pairs.
40
40
  */
41
- bodySort: z.literal("alphabetical").optional()
41
+ bodySort: z.literal("alphabetical").optional().describe("Canonicalizes form body keys and values alphabetically before signing.")
42
42
  });
43
43
  var timestampSchema = z.strictObject({
44
- header: nonEmptyStringSchema,
45
- format: z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional(),
44
+ header: nonEmptyStringSchema.describe("The request header containing the signing timestamp."),
45
+ format: z.enum(["unix-seconds", "unix-millis", "iso8601"]).optional().describe("The timestamp format used in the signature payload."),
46
46
  /** Replay window in seconds. */
47
- tolerance: z.number().positive().optional()
47
+ tolerance: z.number().positive().optional().describe("The maximum accepted timestamp age, in seconds.")
48
48
  });
49
49
  var bodyHashLocationSchema = z.discriminatedUnion("type", [
50
50
  z.strictObject({
51
- type: z.literal("query-parameter"),
52
- name: nonEmptyStringSchema
51
+ type: z.literal("query-parameter").describe("Reads the body hash from a query parameter."),
52
+ name: nonEmptyStringSchema.describe("The query parameter containing the body hash.")
53
53
  })
54
54
  ]);
55
55
  var bodyHashBindingSchema = z.strictObject({
56
- algorithm: hashAlgorithmSchema,
57
- encoding: encodingSchema.optional(),
58
- location: bodyHashLocationSchema
56
+ algorithm: hashAlgorithmSchema.describe("The hash algorithm applied to the raw request body."),
57
+ encoding: encodingSchema.optional().describe("The encoding used for the body hash."),
58
+ location: bodyHashLocationSchema.describe("Where the expected body hash is read from.")
59
59
  });
60
60
  var urlNormalizationSchema = z.strictObject({
61
61
  /** Try the URL with and without an explicit default port. */
62
- portVariants: z.boolean().optional(),
62
+ portVariants: z.boolean().optional().describe("Whether verification tries URLs with and without an explicit default port."),
63
63
  /** Try the URL with the pre-RFC3986 query encoding (`+` for space, unescaped `*`). */
64
- legacyQueryEncoding: z.boolean().optional()
64
+ legacyQueryEncoding: z.boolean().optional().describe("Whether verification also tries legacy form-style query encoding.")
65
65
  }).refine(
66
66
  ({ portVariants, legacyQueryEncoding }) => portVariants === true || legacyQueryEncoding === true,
67
67
  { message: "url normalization must enable at least one variant" }
68
68
  );
69
69
  var webhookSignatureSchema = z.discriminatedUnion("type", [
70
70
  z.strictObject({
71
- type: z.literal("hmac"),
71
+ type: z.literal("hmac").describe("Identifies HMAC webhook signature verification."),
72
72
  /** Request header carrying the signature. */
73
- header: nonEmptyStringSchema,
74
- algorithm: hashAlgorithmSchema.optional(),
75
- encoding: encodingSchema.optional(),
73
+ header: nonEmptyStringSchema.describe("The request header containing the signature."),
74
+ algorithm: hashAlgorithmSchema.optional().describe("The HMAC hash algorithm."),
75
+ encoding: encodingSchema.optional().describe("The encoding used for the HMAC signature."),
76
76
  /** Stripped from the header value before comparison, e.g. `sha256=`. */
77
- signaturePrefix: z.string().optional(),
78
- payloadFormat: payloadFormatSchema.optional(),
79
- timestamp: timestampSchema.optional(),
80
- bodyHashBinding: bodyHashBindingSchema.optional(),
81
- urlNormalization: urlNormalizationSchema.optional()
77
+ signaturePrefix: z.string().optional().describe("A prefix removed from the signature header before comparison."),
78
+ payloadFormat: payloadFormatSchema.optional().describe("How the payload signed by the provider is assembled."),
79
+ timestamp: timestampSchema.optional().describe("Timestamp validation included in signature verification."),
80
+ bodyHashBinding: bodyHashBindingSchema.optional().describe("A separately transmitted hash that binds the raw body to the signed payload."),
81
+ urlNormalization: urlNormalizationSchema.optional().describe("Alternate notification URL forms accepted during verification.")
82
82
  })
83
83
  ]);
84
84
 
85
85
  // src/sdk-config-domain/v1/api.ts
86
86
  var authVariableSchema = z.strictObject({
87
- name: nonEmptyStringSchema.optional(),
88
- environmentVariable: nonEmptyStringSchema.optional(),
89
- description: z.string().optional(),
90
- omit: z.boolean().optional()
87
+ name: nonEmptyStringSchema.optional().describe("The parameter name exposed by the SDK."),
88
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the parameter."),
89
+ description: z.string().optional().describe(
90
+ "A description of the authentication parameter included in generated SDK documentation."
91
+ ),
92
+ omit: z.boolean().optional().describe("Whether the parameter is omitted from the SDK surface.")
91
93
  });
92
94
  var apiKeyAuthSchema = z.strictObject({
93
- id: nonEmptyStringSchema,
94
- type: z.literal("api-key"),
95
- location: z.enum(["header", "query", "cookie"]),
96
- name: nonEmptyStringSchema,
97
- prefix: nonEmptyStringSchema.optional(),
98
- environmentVariable: nonEmptyStringSchema.optional(),
99
- description: z.string().optional()
95
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
96
+ type: z.literal("api-key").describe("Identifies an API key authentication scheme."),
97
+ location: z.enum(["header", "query", "cookie"]).describe("Where the API key is sent on requests."),
98
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
99
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the API key value."),
100
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the API key."),
101
+ description: z.string().optional().describe(
102
+ "A description of the authentication scheme included in generated SDK documentation."
103
+ )
100
104
  });
101
105
  var bearerAuthSchema = z.strictObject({
102
- id: nonEmptyStringSchema,
103
- type: z.literal("bearer"),
104
- header: nonEmptyStringSchema.optional(),
105
- prefix: nonEmptyStringSchema.optional(),
106
- environmentVariable: nonEmptyStringSchema.optional(),
107
- description: z.string().optional()
106
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
107
+ type: z.literal("bearer").describe("Identifies a bearer token authentication scheme."),
108
+ header: nonEmptyStringSchema.optional().describe("The request header that carries the bearer token."),
109
+ prefix: nonEmptyStringSchema.optional().describe('The token prefix, such as "Bearer".'),
110
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the bearer token."),
111
+ description: z.string().optional().describe(
112
+ "A description of the authentication scheme included in generated SDK documentation."
113
+ )
108
114
  });
109
115
  var basicAuthSchema = z.strictObject({
110
- id: nonEmptyStringSchema,
111
- type: z.literal("basic"),
112
- username: authVariableSchema.optional(),
113
- password: authVariableSchema.optional(),
114
- description: z.string().optional()
116
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
117
+ type: z.literal("basic").describe("Identifies an HTTP Basic authentication scheme."),
118
+ username: authVariableSchema.optional().describe("The username parameter exposed by the SDK."),
119
+ password: authVariableSchema.optional().describe("The password parameter exposed by the SDK."),
120
+ description: z.string().optional().describe(
121
+ "A description of the authentication scheme included in generated SDK documentation."
122
+ )
115
123
  });
116
124
  var oauthScopeSchema = z.strictObject({
117
- name: nonEmptyStringSchema,
118
- description: z.string().optional()
125
+ name: nonEmptyStringSchema.describe("The OAuth scope value requested from the provider."),
126
+ description: z.string().optional().describe("A description of the OAuth scope included in generated SDK documentation.")
119
127
  });
120
128
  var oauthFlowSchema = z.discriminatedUnion("type", [
121
129
  z.strictObject({
122
- type: z.literal("authorization-code"),
123
- authorizationUrl: nonEmptyStringSchema,
124
- tokenUrl: nonEmptyStringSchema,
125
- refreshUrl: nonEmptyStringSchema.optional(),
126
- scopes: z.array(oauthScopeSchema).optional()
130
+ type: z.literal("authorization-code").describe("Uses the OAuth authorization code flow."),
131
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
132
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to exchange a code for tokens."),
133
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
134
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
127
135
  }),
128
136
  z.strictObject({
129
- type: z.literal("client-credentials"),
130
- tokenUrl: nonEmptyStringSchema,
131
- refreshUrl: nonEmptyStringSchema.optional(),
132
- scopes: z.array(oauthScopeSchema).optional()
137
+ type: z.literal("client-credentials").describe("Uses the OAuth client credentials flow."),
138
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
139
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
140
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
133
141
  }),
134
142
  z.strictObject({
135
- type: z.literal("implicit"),
136
- authorizationUrl: nonEmptyStringSchema,
137
- refreshUrl: nonEmptyStringSchema.optional(),
138
- scopes: z.array(oauthScopeSchema).optional()
143
+ type: z.literal("implicit").describe("Uses the OAuth implicit flow."),
144
+ authorizationUrl: nonEmptyStringSchema.describe("The URL used to authorize the client."),
145
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
146
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
139
147
  }),
140
148
  z.strictObject({
141
- type: z.literal("password"),
142
- tokenUrl: nonEmptyStringSchema,
143
- refreshUrl: nonEmptyStringSchema.optional(),
144
- scopes: z.array(oauthScopeSchema).optional()
149
+ type: z.literal("password").describe("Uses the OAuth resource owner password flow."),
150
+ tokenUrl: nonEmptyStringSchema.describe("The URL used to obtain access tokens."),
151
+ refreshUrl: nonEmptyStringSchema.optional().describe("The URL used to refresh access tokens."),
152
+ scopes: z.array(oauthScopeSchema).optional().describe("The scopes supported by this flow.")
145
153
  })
146
154
  ]);
147
155
  var oauth2AuthSchema = z.strictObject({
148
- id: nonEmptyStringSchema,
149
- type: z.literal("oauth2"),
150
- flows: z.array(oauthFlowSchema).min(1),
151
- clientId: authVariableSchema.optional(),
152
- clientSecret: authVariableSchema.optional(),
153
- tokenHeader: nonEmptyStringSchema.optional(),
154
- tokenPrefix: nonEmptyStringSchema.optional(),
155
- refreshBufferSeconds: z.number().nonnegative().optional(),
156
- description: z.string().optional()
156
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
157
+ type: z.literal("oauth2").describe("Identifies an OAuth 2.0 authentication scheme."),
158
+ flows: z.array(oauthFlowSchema).min(1).describe("The OAuth flows supported by the API."),
159
+ clientId: authVariableSchema.optional().describe("The OAuth client ID parameter exposed by the SDK."),
160
+ clientSecret: authVariableSchema.optional().describe("The OAuth client secret parameter exposed by the SDK."),
161
+ tokenHeader: nonEmptyStringSchema.optional().describe("The request header that carries the OAuth access token."),
162
+ tokenPrefix: nonEmptyStringSchema.optional().describe("The prefix added before the OAuth access token."),
163
+ refreshBufferSeconds: z.number().nonnegative().optional().describe("How early, in seconds, the client refreshes a token before it expires."),
164
+ description: z.string().optional().describe(
165
+ "A description of the authentication scheme included in generated SDK documentation."
166
+ )
157
167
  });
158
168
  var customAuthParameterSchema = z.strictObject({
159
- location: z.enum(["header", "query", "cookie"]),
160
- name: nonEmptyStringSchema,
161
- prefix: nonEmptyStringSchema.optional(),
162
- environmentVariable: nonEmptyStringSchema.optional()
169
+ location: z.enum(["header", "query", "cookie"]).describe("Where the custom authentication value is sent."),
170
+ name: nonEmptyStringSchema.describe("The header, query parameter, or cookie name."),
171
+ prefix: nonEmptyStringSchema.optional().describe("A prefix added before the parameter value."),
172
+ environmentVariable: nonEmptyStringSchema.optional().describe("The default environment variable for the parameter.")
163
173
  });
164
174
  var customAuthSchema = z.strictObject({
165
- id: nonEmptyStringSchema,
166
- type: z.literal("custom"),
167
- parameters: z.array(customAuthParameterSchema).min(1),
168
- description: z.string().optional()
175
+ id: nonEmptyStringSchema.describe("A unique identifier for this authentication scheme."),
176
+ type: z.literal("custom").describe("Identifies a custom authentication scheme."),
177
+ parameters: z.array(customAuthParameterSchema).min(1).describe("The request parameters that implement the custom scheme."),
178
+ description: z.string().optional().describe(
179
+ "A description of the authentication scheme included in generated SDK documentation."
180
+ )
169
181
  });
170
182
  var authSchemeSchema = z.discriminatedUnion("type", [
171
183
  apiKeyAuthSchema,
@@ -175,12 +187,12 @@ var authSchemeSchema = z.discriminatedUnion("type", [
175
187
  customAuthSchema
176
188
  ]);
177
189
  var authRequirementSchema = z.strictObject({
178
- schemes: z.array(nonEmptyStringSchema).min(1)
190
+ schemes: z.array(nonEmptyStringSchema).min(1).describe("Scheme identifiers that must be satisfied together.")
179
191
  });
180
192
  var authConfigSchema = z.strictObject({
181
- schemes: z.array(authSchemeSchema).min(1),
182
- requirements: z.array(authRequirementSchema).optional(),
183
- endpointSecurity: z.boolean().optional()
193
+ schemes: z.array(authSchemeSchema).min(1).describe("Authentication schemes offered by the API."),
194
+ requirements: z.array(authRequirementSchema).optional().describe("Valid combinations of authentication schemes."),
195
+ endpointSecurity: z.boolean().optional().describe("Whether generated endpoints expose their individual security requirements.")
184
196
  }).superRefine(({ requirements, schemes }, context) => {
185
197
  const schemeIds = /* @__PURE__ */ new Set();
186
198
  schemes.forEach(({ id }, index) => {
@@ -206,45 +218,45 @@ var authConfigSchema = z.strictObject({
206
218
  });
207
219
  });
208
220
  var environmentUrlSchema = z.strictObject({
209
- name: nonEmptyStringSchema,
210
- url: nonEmptyStringSchema,
211
- serverName: nonEmptyStringSchema.optional()
221
+ name: nonEmptyStringSchema.describe("The display name for this environment URL."),
222
+ url: nonEmptyStringSchema.describe("The base URL used for this environment entry."),
223
+ serverName: nonEmptyStringSchema.optional().describe("The source server represented by this URL.")
212
224
  });
213
225
  var environmentSchema = z.strictObject({
214
- name: nonEmptyStringSchema,
215
- urls: z.array(environmentUrlSchema).min(1),
216
- description: z.string().optional()
226
+ name: nonEmptyStringSchema.describe("The environment name exposed by the SDK."),
227
+ urls: z.array(environmentUrlSchema).min(1).describe("The base URLs available in this environment."),
228
+ description: z.string().optional().describe("A description of the environment included in generated SDK documentation.")
217
229
  });
218
230
  var headerSchema = z.strictObject({
219
- name: nonEmptyStringSchema,
220
- value: z.string().optional(),
221
- description: z.string().optional(),
222
- environmentVariable: nonEmptyStringSchema.optional()
231
+ name: nonEmptyStringSchema.describe("The HTTP header name."),
232
+ value: z.string().optional().describe("A fixed value for the generated header."),
233
+ description: z.string().optional().describe("A description of the header included in generated SDK documentation."),
234
+ environmentVariable: nonEmptyStringSchema.optional().describe("The environment variable used to populate the header.")
223
235
  });
224
236
  var environmentVariableSchema = z.strictObject({
225
- name: nonEmptyStringSchema,
226
- description: z.string().optional(),
227
- defaultValue: z.string().optional()
237
+ name: nonEmptyStringSchema.describe("The environment variable name exposed by the SDK."),
238
+ description: z.string().optional().describe("A description of the environment variable included in generated SDK documentation."),
239
+ defaultValue: z.string().optional().describe("The default value used when the variable is unset.")
228
240
  });
229
241
  var apiConfigSchema = z.strictObject({
230
- baseUrl: z.string().default(""),
231
- environments: z.array(environmentSchema).default([]),
232
- environmentVariables: z.array(environmentVariableSchema).default([]),
233
- defaultEnvironment: nonEmptyStringSchema.optional(),
234
- auth: authConfigSchema.optional(),
235
- headers: z.array(headerSchema).optional(),
242
+ baseUrl: z.string().default("").describe("The default base URL used by the generated client."),
243
+ environments: z.array(environmentSchema).default([]).describe("Named API environments and their base URLs."),
244
+ environmentVariables: z.array(environmentVariableSchema).default([]).describe("Environment variables exposed through generated client configuration."),
245
+ defaultEnvironment: nonEmptyStringSchema.optional().describe("The environment selected when a caller does not choose one."),
246
+ auth: authConfigSchema.optional().describe("Authentication supported by the API."),
247
+ headers: z.array(headerSchema).optional().describe("Headers added to generated API requests."),
236
248
  /**
237
249
  * Selects the named `x-fern-audiences`.
238
250
  *
239
251
  * Absent means all audiences. A present empty array selects no tagged audience: untagged nodes
240
252
  * remain included, while every audience-tagged node is excluded.
241
253
  */
242
- audiences: z.array(nonEmptyStringSchema).optional(),
254
+ audiences: z.array(nonEmptyStringSchema).optional().describe("Named API audiences included in the generated SDK."),
243
255
  /**
244
256
  * How the API signs the webhooks it sends, enabling a generated verification helper. API-wide, and
245
257
  * independent of whether any webhook is modeled — see {@link webhookSignatureSchema}.
246
258
  */
247
- webhookSignature: webhookSignatureSchema.optional()
259
+ webhookSignature: webhookSignatureSchema.optional().describe("How generated helpers verify webhook signatures from the API.")
248
260
  });
249
261
 
250
262
  // src/sdk-config/v1/api.ts
@@ -253,16 +265,16 @@ var sdkConfigV1AuthConfigSchema = authConfigSchema;
253
265
  var sdkConfigV1ApiConfigSchema = apiConfigSchema;
254
266
  var sdkConfigV1WebhookSignatureSchema = webhookSignatureSchema;
255
267
  var retryOverrideShape = {
256
- enabled: z.boolean().optional(),
257
- maxAttempts: z.number().int().min(1).optional(),
258
- retryDelayMs: z.number().nonnegative().optional(),
259
- maxDelayMs: z.number().nonnegative().optional(),
260
- jitterMs: z.number().nonnegative().optional(),
261
- backoffFactor: z.number().positive().optional(),
262
- statusCodes: z.array(z.number().int().min(100).max(599)).optional(),
263
- methods: z.array(nonEmptyStringSchema).optional(),
264
- statusCodeProfile: z.enum(["legacy", "recommended"]).optional(),
265
- maxRetryAfterDelayMs: z.number().nonnegative().optional()
268
+ enabled: z.boolean().optional().describe("Whether the generated client retries failed requests."),
269
+ maxAttempts: z.number().int().min(1).optional().describe("The maximum total request attempts, including the initial attempt."),
270
+ retryDelayMs: z.number().nonnegative().optional().describe("The initial delay between retry attempts, in milliseconds."),
271
+ maxDelayMs: z.number().nonnegative().optional().describe("The maximum backoff delay between attempts, in milliseconds."),
272
+ jitterMs: z.number().nonnegative().optional().describe("The maximum random jitter added to retry delays, in milliseconds."),
273
+ backoffFactor: z.number().positive().optional().describe("The multiplier applied to the delay after each failed attempt."),
274
+ statusCodes: z.array(z.number().int().min(100).max(599)).optional().describe("HTTP status codes that are eligible for retries."),
275
+ methods: z.array(nonEmptyStringSchema).optional().describe("HTTP methods that are eligible for retries."),
276
+ statusCodeProfile: z.enum(["legacy", "recommended"]).optional().describe("The built-in retryable status-code policy."),
277
+ maxRetryAfterDelayMs: z.number().nonnegative().optional().describe("The longest Retry-After delay the client will honor, in milliseconds.")
266
278
  };
267
279
  function validateRetryDelays({
268
280
  maxDelayMs,
@@ -279,27 +291,29 @@ function validateRetryDelays({
279
291
  var clientRetryOverrideSchema = z.strictObject(retryOverrideShape).superRefine(validateRetryDelays);
280
292
  var retryConfigSchema = z.strictObject({
281
293
  ...retryOverrideShape,
282
- enabled: z.boolean().default(true),
283
- maxAttempts: z.number().int().min(1).default(3),
284
- retryDelayMs: z.number().nonnegative().default(150),
285
- maxDelayMs: z.number().nonnegative().default(5e3),
286
- jitterMs: z.number().nonnegative().default(50),
287
- backoffFactor: z.number().positive().default(2),
288
- methods: z.array(nonEmptyStringSchema).default(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS"]),
289
- maxRetryAfterDelayMs: z.number().nonnegative().default(6e4)
294
+ enabled: z.boolean().default(true).describe("Whether the generated client retries failed requests."),
295
+ maxAttempts: z.number().int().min(1).default(3).describe("The maximum total request attempts, including the initial attempt."),
296
+ retryDelayMs: z.number().nonnegative().default(150).describe("The initial delay between retry attempts, in milliseconds."),
297
+ maxDelayMs: z.number().nonnegative().default(5e3).describe("The maximum backoff delay between attempts, in milliseconds."),
298
+ jitterMs: z.number().nonnegative().default(50).describe("The maximum random jitter added to retry delays, in milliseconds."),
299
+ backoffFactor: z.number().positive().default(2).describe("The multiplier applied to the delay after each failed attempt."),
300
+ methods: z.array(nonEmptyStringSchema).default(["GET", "PUT", "DELETE", "HEAD", "OPTIONS"]).describe("HTTP methods that are eligible for retries."),
301
+ maxRetryAfterDelayMs: z.number().nonnegative().default(6e4).describe("The longest Retry-After delay the client will honor, in milliseconds.")
290
302
  }).superRefine(validateRetryDelays);
291
303
  var constructorParameterSchema = z.strictObject({
292
- name: nonEmptyStringSchema,
293
- example: z.string().optional(),
294
- description: z.string().optional(),
295
- required: z.boolean().optional()
304
+ name: nonEmptyStringSchema.describe("The parameter name in the generated client constructor."),
305
+ example: z.string().optional().describe("An example value shown in generated documentation."),
306
+ description: z.string().optional().describe(
307
+ "A description of the constructor parameter included in generated SDK documentation."
308
+ ),
309
+ required: z.boolean().optional().describe("Whether callers must provide the parameter.")
296
310
  });
297
311
  var parameterStyleSchema = z.enum(["wrapped", "inline", "language-default"]);
298
312
  var tokenRefreshConfigSchema = z.strictObject({
299
- enabled: z.boolean(),
300
- endpoint: nonEmptyStringSchema.optional(),
301
- accessTokenField: nonEmptyStringSchema.optional(),
302
- refreshTokenField: nonEmptyStringSchema.optional()
313
+ enabled: z.boolean().describe("Whether the client can exchange refresh tokens."),
314
+ endpoint: nonEmptyStringSchema.optional().describe("The API endpoint used to refresh tokens."),
315
+ accessTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed access token."),
316
+ refreshTokenField: nonEmptyStringSchema.optional().describe("The response field containing the refreshed refresh token.")
303
317
  }).superRefine(({ enabled, endpoint }, context) => {
304
318
  if (enabled && endpoint === void 0) {
305
319
  context.addIssue({
@@ -309,27 +323,48 @@ var tokenRefreshConfigSchema = z.strictObject({
309
323
  });
310
324
  }
311
325
  });
326
+ var idempotencyKeyGenerationSchema = z.strictObject({
327
+ enabled: z.boolean().describe("Whether the client generates an idempotency key when the caller supplies none."),
328
+ headerName: nonEmptyStringSchema.optional().describe("The header that carries the generated key. Generators default to Idempotency-Key."),
329
+ methods: z.array(nonEmptyStringSchema).optional().describe("HTTP methods that receive a generated key. Generators default to POST and PUT.")
330
+ });
331
+ var userAgentConfigSchema = z.strictObject({
332
+ template: nonEmptyStringSchema.optional().describe(
333
+ "The User-Agent product token, resolved at generation time. Supports the {packageName}, {version}, {language}, {generatorVersion}, {organization}, and {apiName} placeholders."
334
+ ),
335
+ includePlatformInfo: z.boolean().optional().describe(
336
+ "Whether the User-Agent carries operating system, architecture, and runtime details, as `{product} ({os}; {arch}) {runtime}/{runtimeVersion}`."
337
+ ),
338
+ allowAppInfo: z.boolean().optional().describe(
339
+ "Whether callers can pass application info that is appended to the User-Agent as a `{name}/{version} ({comment})` product token."
340
+ )
341
+ });
312
342
  var clientOverrideShape = {
313
- retry: clientRetryOverrideSchema.optional(),
314
- responseHeaders: z.boolean().optional(),
315
- responseValidation: z.boolean().optional(),
316
- multiTenant: z.boolean().optional(),
317
- additionalConstructorParameters: z.array(constructorParameterSchema).optional(),
318
- timeoutMs: z.union([z.number().nonnegative(), z.literal("infinity")]).optional(),
319
- requestParameterStyle: parameterStyleSchema.optional(),
320
- pathParameterStyle: parameterStyleSchema.optional(),
321
- filePropertyStyle: parameterStyleSchema.optional(),
322
- useDefaultRequestParameterValues: z.boolean().optional(),
323
- respectOptionalRequestBody: z.boolean().optional(),
324
- tokenRefresh: tokenRefreshConfigSchema.optional()
343
+ retry: clientRetryOverrideSchema.optional().describe("Retry behavior for generated API requests."),
344
+ responseHeaders: z.boolean().optional().describe("Whether generated operations expose HTTP response headers."),
345
+ responseValidation: z.boolean().optional().describe("Whether the client validates API responses against the schema."),
346
+ multiTenant: z.boolean().optional().describe("Whether the client exposes configuration for tenant-specific API access."),
347
+ additionalConstructorParameters: z.array(constructorParameterSchema).optional().describe("Additional parameters added to the generated client constructor."),
348
+ timeoutMs: z.union([z.number().nonnegative(), z.literal("infinity")]).optional().describe('The default request timeout in milliseconds, or "infinity" for no timeout.'),
349
+ requestParameterStyle: parameterStyleSchema.optional().describe("Whether generated operation parameters are wrapped or passed inline."),
350
+ pathParameterStyle: parameterStyleSchema.optional().describe("Whether generated path parameters are wrapped or passed inline."),
351
+ filePropertyStyle: parameterStyleSchema.optional().describe("Whether generated file properties are wrapped or passed inline."),
352
+ useDefaultRequestParameterValues: z.boolean().optional().describe("Whether schema defaults are applied to omitted request parameters."),
353
+ respectOptionalRequestBody: z.boolean().optional().describe("Whether an optional request body remains optional in generated methods."),
354
+ tokenRefresh: tokenRefreshConfigSchema.optional().describe("Refresh-token behavior for the generated client."),
355
+ idempotencyKeyGeneration: idempotencyKeyGenerationSchema.optional().describe("Automatic idempotency keys on eligible requests."),
356
+ userAgent: userAgentConfigSchema.optional().describe("The User-Agent header the generated client sends."),
357
+ offsetSemantics: z.enum(["item-index", "page-index"]).optional().describe(
358
+ "How an offset-paginated endpoint advances: by the number of items returned, or by one page."
359
+ )
325
360
  };
326
361
  var clientConfigOverrideSchema = z.strictObject(clientOverrideShape);
327
362
  var clientConfigSchema = z.strictObject({
328
363
  ...clientOverrideShape,
329
- retry: retryConfigSchema.prefault({}),
330
- responseHeaders: z.boolean().default(false),
331
- multiTenant: z.boolean().default(false),
332
- additionalConstructorParameters: z.array(constructorParameterSchema).default([])
364
+ retry: retryConfigSchema.prefault({}).describe("Retry behavior for generated API requests."),
365
+ responseHeaders: z.boolean().default(false).describe("Whether generated operations expose HTTP response headers."),
366
+ multiTenant: z.boolean().default(false).describe("Whether the client exposes configuration for tenant-specific API access."),
367
+ additionalConstructorParameters: z.array(constructorParameterSchema).default([]).describe("Additional parameters added to the generated client constructor.")
333
368
  });
334
369
 
335
370
  // src/sdk-config/v1/client.ts
@@ -344,75 +379,75 @@ var composerPackageNameSchema = nonEmptyStringSchema.regex(
344
379
  'Composer package name must be a lowercase "vendor/package" name'
345
380
  );
346
381
  var authorSchema = z.strictObject({
347
- name: nonEmptyStringSchema,
348
- email: z.email().optional(),
349
- url: nonEmptyStringSchema.optional()
382
+ name: nonEmptyStringSchema.describe("The package author name."),
383
+ email: z.email().optional().describe("The package author email address."),
384
+ url: nonEmptyStringSchema.optional().describe("The package author website.")
350
385
  });
351
386
  var developerSchema = z.strictObject({
352
- name: nonEmptyStringSchema,
353
- email: z.email().optional(),
354
- organization: nonEmptyStringSchema.optional(),
355
- organizationUrl: nonEmptyStringSchema.optional()
387
+ name: nonEmptyStringSchema.describe("The package developer name."),
388
+ email: z.email().optional().describe("The package developer email address."),
389
+ organization: nonEmptyStringSchema.optional().describe("The developer organization name."),
390
+ organizationUrl: nonEmptyStringSchema.optional().describe("The developer organization website.")
356
391
  });
357
392
  var licenseSchema = z.strictObject({
358
- type: nonEmptyStringSchema,
359
- name: nonEmptyStringSchema.optional(),
360
- url: nonEmptyStringSchema.optional(),
361
- path: nonEmptyStringSchema.optional()
393
+ type: nonEmptyStringSchema.describe("The license identifier or license type."),
394
+ name: nonEmptyStringSchema.optional().describe("The human-readable license name."),
395
+ url: nonEmptyStringSchema.optional().describe("The URL containing the license text."),
396
+ path: nonEmptyStringSchema.optional().describe("The path to a custom license file.")
362
397
  });
363
398
  var dependencySourceSchema = z.discriminatedUnion("type", [
364
399
  z.strictObject({
365
- type: z.literal("registry"),
366
- registry: nonEmptyStringSchema.optional()
400
+ type: z.literal("registry").describe("Resolves the dependency from a package registry."),
401
+ registry: nonEmptyStringSchema.optional().describe("The registry used to resolve the dependency.")
367
402
  }),
368
403
  z.strictObject({
369
- type: z.literal("git"),
370
- url: nonEmptyStringSchema,
371
- ref: nonEmptyStringSchema.optional(),
372
- subdirectory: nonEmptyStringSchema.optional()
404
+ type: z.literal("git").describe("Resolves the dependency from a Git repository."),
405
+ url: nonEmptyStringSchema.describe("The Git repository URL."),
406
+ ref: nonEmptyStringSchema.optional().describe("The Git branch, tag, or commit to use."),
407
+ subdirectory: nonEmptyStringSchema.optional().describe("The package subdirectory within the Git repository.")
373
408
  }),
374
409
  z.strictObject({
375
- type: z.literal("path"),
376
- path: nonEmptyStringSchema
410
+ type: z.literal("path").describe("Resolves the dependency from a local path."),
411
+ path: nonEmptyStringSchema.describe("The local path containing the dependency.")
377
412
  })
378
413
  ]);
379
414
  var dependencySchema = z.strictObject({
380
- name: nonEmptyStringSchema,
381
- version: nonEmptyStringSchema.optional(),
382
- source: dependencySourceSchema.optional(),
383
- packageName: nonEmptyStringSchema.optional(),
384
- features: z.array(nonEmptyStringSchema).optional(),
385
- extras: z.array(nonEmptyStringSchema).optional(),
386
- optional: z.boolean().optional(),
387
- defaultFeatures: z.boolean().optional(),
388
- environmentMarker: nonEmptyStringSchema.optional()
415
+ name: nonEmptyStringSchema.describe("The dependency name used by the package manager."),
416
+ version: nonEmptyStringSchema.optional().describe("The dependency version requirement."),
417
+ source: dependencySourceSchema.optional().describe("A non-default source for the dependency."),
418
+ packageName: nonEmptyStringSchema.optional().describe("The source package name when it differs from the dependency alias."),
419
+ features: z.array(nonEmptyStringSchema).optional().describe("Cargo features enabled for this dependency."),
420
+ extras: z.array(nonEmptyStringSchema).optional().describe("Python extras enabled for this dependency."),
421
+ optional: z.boolean().optional().describe("Whether the dependency is optional."),
422
+ defaultFeatures: z.boolean().optional().describe("Whether the dependency enables its default Cargo features."),
423
+ environmentMarker: nonEmptyStringSchema.optional().describe("A Python environment marker that conditions this dependency.")
389
424
  }).refine(({ source, version }) => source !== void 0 || version !== void 0, {
390
425
  message: "dependency must define a version or a source"
391
426
  });
392
427
  var projectUrlSchema = z.strictObject({
393
- label: nonEmptyStringSchema,
394
- url: nonEmptyStringSchema
428
+ label: nonEmptyStringSchema.describe("The label displayed for the project link."),
429
+ url: nonEmptyStringSchema.describe("The project link URL.")
395
430
  });
396
431
  var packageConfigSchema = z.strictObject({
397
- packageName: nonEmptyStringSchema.optional(),
398
- moduleName: nonEmptyStringSchema.optional(),
399
- modulePath: goModulePathSchema.optional(),
400
- namespace: nonEmptyStringSchema.optional(),
401
- groupId: nonEmptyStringSchema.optional(),
402
- artifactId: nonEmptyStringSchema.optional(),
403
- description: z.string().optional(),
404
- repository: nonEmptyStringSchema.optional(),
405
- homepage: nonEmptyStringSchema.optional(),
406
- documentationUrl: nonEmptyStringSchema.optional(),
407
- authors: z.array(authorSchema).optional(),
408
- developers: z.array(developerSchema).optional(),
409
- license: licenseSchema.optional(),
410
- keywords: z.array(nonEmptyStringSchema).optional(),
411
- classifiers: z.array(nonEmptyStringSchema).optional(),
412
- projectUrls: z.array(projectUrlSchema).optional(),
413
- extraDependencies: z.array(dependencySchema).optional(),
414
- extraDevDependencies: z.array(dependencySchema).optional(),
415
- extraPeerDependencies: z.array(dependencySchema).optional()
432
+ packageName: nonEmptyStringSchema.optional().describe("The package name used by the target language registry."),
433
+ moduleName: nonEmptyStringSchema.optional().describe("The generated module or import name when it differs from the package name."),
434
+ modulePath: goModulePathSchema.optional().describe("The Go module path used for imports and publishing."),
435
+ namespace: nonEmptyStringSchema.optional().describe("The namespace or package prefix for generated code."),
436
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier."),
437
+ artifactId: nonEmptyStringSchema.optional().describe("The Maven artifact identifier."),
438
+ description: z.string().optional().describe("The package description used in generated metadata."),
439
+ repository: nonEmptyStringSchema.optional().describe("The source repository for the generated SDK."),
440
+ homepage: nonEmptyStringSchema.optional().describe("The package homepage URL."),
441
+ documentationUrl: nonEmptyStringSchema.optional().describe("The package documentation URL."),
442
+ authors: z.array(authorSchema).optional().describe("Authors credited in package metadata."),
443
+ developers: z.array(developerSchema).optional().describe("Developers credited in package metadata."),
444
+ license: licenseSchema.optional().describe("License metadata for the generated package."),
445
+ keywords: z.array(nonEmptyStringSchema).optional().describe("Search keywords for package metadata."),
446
+ classifiers: z.array(nonEmptyStringSchema).optional().describe("Package classifiers used by registries such as PyPI."),
447
+ projectUrls: z.array(projectUrlSchema).optional().describe("Labeled project links for package metadata."),
448
+ extraDependencies: z.array(dependencySchema).optional().describe("Additional runtime dependencies added to the generated package."),
449
+ extraDevDependencies: z.array(dependencySchema).optional().describe("Additional development dependencies added to the generated package."),
450
+ extraPeerDependencies: z.array(dependencySchema).optional().describe("Additional peer dependencies added to the generated package.")
416
451
  });
417
452
  var httpMethodSchema = z.enum([
418
453
  "GET",
@@ -426,34 +461,34 @@ var httpMethodSchema = z.enum([
426
461
  "CONNECT"
427
462
  ]);
428
463
  var readmeEndpointSchema = z.strictObject({
429
- method: httpMethodSchema,
430
- path: nonEmptyStringSchema,
431
- stream: z.boolean().optional()
464
+ method: httpMethodSchema.describe("The HTTP method of the documented endpoint."),
465
+ path: nonEmptyStringSchema.describe("The endpoint path used in generated examples."),
466
+ stream: z.boolean().optional().describe("Whether the example uses the streaming response API.")
432
467
  });
433
468
  var readmeCustomSectionSchema = z.strictObject({
434
- title: nonEmptyStringSchema,
435
- content: z.string()
469
+ title: nonEmptyStringSchema.describe("The heading displayed for this README section."),
470
+ content: z.string().describe("The Markdown content of this README section.")
436
471
  });
437
472
  var readmeConfigSchema = z.strictObject({
438
- apiName: nonEmptyStringSchema.optional(),
439
- introduction: z.string().optional(),
440
- apiReferenceLink: nonEmptyStringSchema.optional(),
441
- bannerLink: nonEmptyStringSchema.optional(),
442
- disabledSections: z.array(nonEmptyStringSchema).optional(),
443
- customSections: z.array(readmeCustomSectionSchema).optional(),
444
- defaultEndpoint: readmeEndpointSchema.optional(),
445
- features: z.record(z.string(), z.array(readmeEndpointSchema)).optional()
473
+ apiName: nonEmptyStringSchema.optional().describe("The API name displayed in the README."),
474
+ introduction: z.string().optional().describe("Custom introductory Markdown for the README."),
475
+ apiReferenceLink: nonEmptyStringSchema.optional().describe("The URL linked as the API reference."),
476
+ bannerLink: nonEmptyStringSchema.optional().describe("The destination URL for the README banner."),
477
+ disabledSections: z.array(nonEmptyStringSchema).optional().describe("Generated README sections to omit."),
478
+ customSections: z.array(readmeCustomSectionSchema).optional().describe("Additional sections inserted into the README."),
479
+ defaultEndpoint: readmeEndpointSchema.optional().describe("The endpoint used for the primary README example."),
480
+ features: z.record(z.string(), z.array(readmeEndpointSchema)).optional().describe("Named feature groups and the endpoints demonstrated by each group.")
446
481
  });
447
482
  var snippetsConfigSchema = z.strictObject({
448
- enabled: z.boolean(),
449
- format: z.enum(["md", "json"]).optional(),
450
- outputPath: nonEmptyStringSchema.optional()
483
+ enabled: z.boolean().describe("Whether standalone usage snippets are generated."),
484
+ format: z.enum(["md", "json"]).optional().describe("The output format for generated snippets."),
485
+ outputPath: nonEmptyStringSchema.optional().describe("The output path for generated snippet files.")
451
486
  });
452
487
  var docsConfigSchema = z.strictObject({
453
- readme: readmeConfigSchema.optional(),
454
- snippets: snippetsConfigSchema.optional(),
455
- referenceBaseUrl: nonEmptyStringSchema.optional(),
456
- includeApiReference: z.boolean().optional()
488
+ readme: readmeConfigSchema.optional().describe("README content and example configuration."),
489
+ snippets: snippetsConfigSchema.optional().describe("Standalone usage snippet generation."),
490
+ referenceBaseUrl: nonEmptyStringSchema.optional().describe("The base URL used for links to generated API reference files."),
491
+ includeApiReference: z.boolean().optional().describe("Whether API reference documentation is included in the SDK output.")
457
492
  });
458
493
 
459
494
  // src/sdk-config/v1/docs.ts
@@ -1252,16 +1287,10 @@ function finishOutputMapping(mapping, outputMode, sourcePath, state, index) {
1252
1287
  for (const path of collectLeafPaths(outputMode, sourcePath)) {
1253
1288
  if (path[path.length - 1] === "_visit") consume(state, path);
1254
1289
  }
1255
- const legacyGenerateFullProject = isObject(outputMode) ? outputMode.generateFullProject : void 0;
1256
- const generationShape = typeof legacyGenerateFullProject === "boolean" ? { generation: { ...mapping.generation, generateFullProject: legacyGenerateFullProject } } : {};
1257
- if (typeof legacyGenerateFullProject === "boolean") {
1258
- consume(state, [...sourcePath, "generateFullProject"]);
1259
- }
1260
1290
  const unsupported = collectUnsupported(outputMode, sourcePath, state);
1261
1291
  const hasCredentials = unsupported.some((diagnostic) => isCredentialPath(diagnostic.path));
1262
1292
  return {
1263
1293
  ...mapping,
1264
- ...generationShape,
1265
1294
  unsupportedFields: [
1266
1295
  ...state.credentialDiagnostics ?? [],
1267
1296
  ...hasCredentials ? [
@@ -1332,6 +1361,9 @@ function outputDiagnostic(path, index) {
1332
1361
  homepageLink: {
1333
1362
  sdkConfigPath: ["targets", index, "package", "homepage"],
1334
1363
  suggestedAction: "Set target.package.homepage manually to a valid URL."
1364
+ },
1365
+ generateFullProject: {
1366
+ suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
1335
1367
  }
1336
1368
  };
1337
1369
  const fieldGuidance = field ? guidance[field] : void 0;
@@ -1465,59 +1497,48 @@ function deepEqual(left, right) {
1465
1497
  return false;
1466
1498
  }
1467
1499
  var namingConfigSchema = z.strictObject({
1468
- clientName: nonEmptyStringSchema.optional(),
1469
- exportedClientName: nonEmptyStringSchema.optional(),
1470
- environmentTypeName: nonEmptyStringSchema.optional(),
1471
- apiErrorName: nonEmptyStringSchema.optional(),
1472
- baseErrorName: nonEmptyStringSchema.optional(),
1473
- pagerName: nonEmptyStringSchema.optional(),
1500
+ clientName: nonEmptyStringSchema.optional().describe("The generated client class name."),
1501
+ exportedClientName: nonEmptyStringSchema.optional().describe("The client name exported from the generated package."),
1502
+ environmentTypeName: nonEmptyStringSchema.optional().describe("The generated type name for API environments."),
1503
+ apiErrorName: nonEmptyStringSchema.optional().describe("The generated API error class name."),
1504
+ baseErrorName: nonEmptyStringSchema.optional().describe("The generated base error class name."),
1505
+ pagerName: nonEmptyStringSchema.optional().describe("The generated pagination helper name."),
1474
1506
  /** Apply Fern's initialism-aware casing rules when deriving generated identifiers. */
1475
- smartCasing: z.boolean().optional(),
1507
+ smartCasing: z.boolean().optional().describe("Whether generated identifiers use initialism-aware casing."),
1476
1508
  /** Preserve a word boundary after digits when Fern smart casing is enabled. */
1477
- smartCasingDigitWordBoundary: z.boolean().optional()
1509
+ smartCasingDigitWordBoundary: z.boolean().optional().describe("Whether smart casing preserves a word boundary after digits.")
1478
1510
  });
1479
1511
 
1480
1512
  // src/sdk-config/v1/generation.ts
1481
1513
  var customerGenerationAssetSchema = z.discriminatedUnion("type", [
1482
- z.strictObject({ type: z.literal("path"), location: relativePathSchema }),
1483
- z.strictObject({ type: z.literal("url"), location: nonEmptyStringSchema })
1514
+ z.strictObject({
1515
+ type: z.literal("path").describe("Loads the generation asset from a relative path."),
1516
+ location: relativePathSchema.describe("The relative path to the generation asset.")
1517
+ }),
1518
+ z.strictObject({
1519
+ type: z.literal("url").describe("Loads the generation asset from a URL."),
1520
+ location: nonEmptyStringSchema.describe("The URL of the generation asset.")
1521
+ })
1484
1522
  ]);
1485
- var hookDependencySchema = z.strictObject({
1486
- name: nonEmptyStringSchema,
1487
- version: nonEmptyStringSchema,
1488
- groupId: nonEmptyStringSchema.optional()
1489
- });
1490
- var hooksConfigSchema = z.strictObject({
1491
- enabled: z.boolean(),
1492
- source: customerGenerationAssetSchema.optional(),
1493
- dependencies: z.array(hookDependencySchema).optional()
1494
- });
1495
1523
  var customCodeConfigSchema = z.strictObject({
1496
- enabled: z.boolean(),
1497
- source: customerGenerationAssetSchema.optional(),
1498
- conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional(),
1499
- trackChanges: z.boolean().optional(),
1500
- protectedFiles: z.array(nonEmptyStringSchema).optional()
1524
+ enabled: z.boolean().describe("Whether customer-authored code is merged into generated output."),
1525
+ source: customerGenerationAssetSchema.optional().describe("The source containing customer-authored code."),
1526
+ conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
1527
+ trackChanges: z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
1528
+ protectedFiles: z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
1501
1529
  });
1502
- var workflowConfigSchema = z.strictObject({
1503
- path: relativePathSchema,
1504
- outputName: nonEmptyStringSchema.optional()
1530
+ var analyticsHeaderSchema = z.strictObject({
1531
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
1532
+ value: z.string().describe("The literal telemetry header value.")
1505
1533
  });
1506
- var analyticsHeaderSchema = z.union([
1507
- z.strictObject({ name: nonEmptyStringSchema, value: z.string() }),
1508
- z.strictObject({
1509
- name: nonEmptyStringSchema,
1510
- valueRef: nonEmptyStringSchema
1511
- })
1512
- ]);
1513
1534
  var analyticsConfigSchema = z.strictObject({
1514
- enabled: z.boolean(),
1515
- endpoint: nonEmptyStringSchema.optional(),
1516
- exporter: z.enum(["otlp-http", "console"]).optional(),
1517
- headers: z.array(analyticsHeaderSchema).optional(),
1518
- batchSize: z.number().int().positive().optional(),
1519
- scheduledDelayMs: z.number().nonnegative().optional(),
1520
- exportTimeoutMs: z.number().nonnegative().optional()
1535
+ enabled: z.boolean().describe("Whether generated clients export usage telemetry."),
1536
+ endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
1537
+ exporter: z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
1538
+ headers: z.array(analyticsHeaderSchema).optional().describe("Headers sent by the telemetry exporter."),
1539
+ batchSize: z.number().int().positive().optional().describe("The maximum spans in each export batch."),
1540
+ scheduledDelayMs: z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
1541
+ exportTimeoutMs: z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
1521
1542
  }).superRefine(({ enabled, endpoint }, context) => {
1522
1543
  if (enabled && endpoint === void 0) {
1523
1544
  context.addIssue({
@@ -1528,73 +1549,63 @@ var analyticsConfigSchema = z.strictObject({
1528
1549
  }
1529
1550
  });
1530
1551
  var wireTestsSchema = z.strictObject({
1531
- enabled: z.boolean(),
1532
- exclusions: z.array(nonEmptyStringSchema).optional(),
1533
- fallbackToGeneratedErrorExamples: z.boolean().optional(),
1534
- fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional()
1552
+ enabled: z.boolean().describe("Whether wire-level request and response tests are generated."),
1553
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
1554
+ fallbackToGeneratedErrorExamples: z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
1555
+ fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
1535
1556
  });
1536
1557
  var unitTestsSchema = z.strictObject({
1537
- enabled: z.boolean(),
1538
- mode: z.enum(["core-runtime", "schema-driven", "both"]).optional(),
1539
- exclusions: z.array(nonEmptyStringSchema).optional()
1558
+ enabled: z.boolean().describe("Whether SDK unit tests are generated."),
1559
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
1540
1560
  });
1541
1561
  var streamsSchema = z.strictObject({
1542
- enabled: z.boolean(),
1543
- responseType: z.enum(["wrapper", "native", "web"]).optional(),
1544
- fileResponseType: z.enum(["stream", "binary-response"]).optional(),
1545
- defaultChunkSizeBytes: z.number().int().positive().optional()
1562
+ enabled: z.boolean().describe("Whether generated clients expose streaming response APIs."),
1563
+ responseType: z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
1564
+ fileResponseType: z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
1565
+ defaultChunkSizeBytes: z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
1546
1566
  });
1547
1567
  var layoutConfigSchema = z.strictObject({
1548
- outputDirectory: z.enum(["project-root", "source-root"]).optional(),
1549
- packagePath: nonEmptyStringSchema.optional()
1568
+ outputDirectory: z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
1569
+ packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
1550
1570
  });
1551
1571
  var serializationConfigSchema = z.strictObject({
1552
- enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
1553
- additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
1554
- inlineTypes: z.boolean().optional(),
1555
- omitUndefined: z.boolean().optional()
1572
+ enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
1573
+ additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
1574
+ inlineTypes: z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
1575
+ omitUndefined: z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
1556
1576
  });
1557
1577
  var generationConfigOverrideShape = {
1558
- includeWatermark: z.boolean().optional(),
1559
- ai: z.boolean().optional(),
1560
- includeOptionalSnippetParameters: z.boolean().optional(),
1561
- buildAllModels: z.boolean().optional(),
1562
- inferServiceNames: z.boolean().optional(),
1563
- includeDeprecatedOperations: z.boolean().optional(),
1564
- multipleResponses: z.boolean().optional(),
1565
- /** Generate the entire SDK project, including package manifests and publishable artifacts. */
1566
- generateFullProject: z.boolean().optional(),
1567
- devContainer: z.boolean().optional(),
1568
- allowMockClient: z.boolean().optional(),
1569
- ignoreFiles: z.array(nonEmptyStringSchema).optional(),
1570
- reservedKeywords: z.array(nonEmptyStringSchema).optional(),
1571
- hooks: hooksConfigSchema.optional(),
1572
- customCode: customCodeConfigSchema.optional(),
1573
- workflows: z.array(workflowConfigSchema).optional(),
1574
- customQueryPaths: z.array(relativePathSchema).optional(),
1575
- analytics: analyticsConfigSchema.optional(),
1576
- wireTests: wireTestsSchema.optional(),
1577
- unitTests: unitTestsSchema.optional(),
1578
- webSockets: z.boolean().optional(),
1579
- streams: streamsSchema.optional(),
1580
- naming: namingConfigSchema.optional(),
1581
- layout: layoutConfigSchema.optional(),
1582
- serialization: serializationConfigSchema.optional()
1578
+ includeOptionalSnippetParameters: z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
1579
+ buildAllModels: z.boolean().optional().describe("Whether models not referenced by operations are also generated."),
1580
+ inferServiceNames: z.boolean().optional().describe("Whether service names are inferred from API structure."),
1581
+ includeDeprecatedOperations: z.boolean().optional().describe("Whether deprecated API operations are generated."),
1582
+ multipleResponses: z.boolean().optional().describe("Whether operations model multiple successful response types."),
1583
+ devContainer: z.boolean().optional().describe("Whether development-container configuration is generated."),
1584
+ allowMockClient: z.boolean().optional().describe("Whether a mock API client is included in the generated SDK."),
1585
+ ignoreFiles: z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
1586
+ reservedKeywords: z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
1587
+ customCode: customCodeConfigSchema.optional().describe("Customer-authored code merge configuration."),
1588
+ customQueryPaths: z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
1589
+ analytics: analyticsConfigSchema.optional().describe("Generated client telemetry configuration."),
1590
+ wireTests: wireTestsSchema.optional().describe("Wire-level request and response test generation."),
1591
+ unitTests: unitTestsSchema.optional().describe("SDK unit-test generation."),
1592
+ webSockets: z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
1593
+ streams: streamsSchema.optional().describe("Streaming response generation behavior."),
1594
+ naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
1595
+ layout: layoutConfigSchema.optional().describe("Generated project and source layout."),
1596
+ serialization: serializationConfigSchema.optional().describe("Generated model serialization behavior.")
1583
1597
  };
1584
1598
  var sdkConfigV1GenerationConfigOverrideSchema = z.strictObject(
1585
1599
  generationConfigOverrideShape
1586
1600
  );
1587
1601
  var sdkConfigV1GenerationConfigSchema = z.strictObject({
1588
1602
  ...generationConfigOverrideShape,
1589
- includeWatermark: z.boolean().default(false),
1590
- ai: z.boolean().default(false),
1591
- buildAllModels: z.boolean().default(false),
1592
- inferServiceNames: z.boolean().default(false),
1593
- includeDeprecatedOperations: z.boolean().default(true),
1594
- multipleResponses: z.boolean().default(false),
1595
- generateFullProject: z.boolean().default(false),
1596
- devContainer: z.boolean().default(false),
1597
- allowMockClient: z.boolean().default(false)
1603
+ buildAllModels: z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
1604
+ inferServiceNames: z.boolean().default(false).describe("Whether service names are inferred from API structure."),
1605
+ includeDeprecatedOperations: z.boolean().default(true).describe("Whether deprecated API operations are generated."),
1606
+ multipleResponses: z.boolean().default(false).describe("Whether operations model multiple successful response types."),
1607
+ devContainer: z.boolean().default(false).describe("Whether development-container configuration is generated."),
1608
+ allowMockClient: z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK.")
1598
1609
  });
1599
1610
  var commonGenerationKeys = new Set(Object.keys(generationConfigOverrideShape));
1600
1611
  function splitSdkConfigV1TargetGeneration(generation) {
@@ -1616,78 +1627,97 @@ var sdkConfigV1PublishRegistrySchema = z.enum([
1616
1627
  "composer"
1617
1628
  ]);
1618
1629
  var mavenSignatureSchema = z.strictObject({
1619
- keyId: nonEmptyStringSchema,
1620
- password: nonEmptyStringSchema,
1621
- secretKey: nonEmptyStringSchema
1630
+ keyId: nonEmptyStringSchema.describe(
1631
+ "The signing key identifier, or an environment expression that resolves to it."
1632
+ ),
1633
+ password: nonEmptyStringSchema.describe(
1634
+ "The signing key password, or an environment expression that resolves to it."
1635
+ ),
1636
+ secretKey: nonEmptyStringSchema.describe(
1637
+ "The armored secret key, or an environment expression that resolves to it."
1638
+ )
1622
1639
  });
1623
1640
  var commonPublishShape = {
1624
- url: nonEmptyStringSchema.optional(),
1625
- releaseBranch: nonEmptyStringSchema.optional(),
1626
- tolerateRepublish: z.boolean().optional()
1641
+ url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
1642
+ releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
1643
+ tolerateRepublish: z.boolean().optional().describe("Whether an already-published package version is treated as non-fatal.")
1627
1644
  };
1628
1645
  var sdkConfigV1PublishConfigSchema = z.discriminatedUnion("registry", [
1629
1646
  z.strictObject({
1630
- registry: z.literal("npm"),
1631
- token: nonEmptyStringSchema.optional(),
1647
+ registry: z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
1648
+ token: nonEmptyStringSchema.optional().describe("The npm registry token, or an environment expression that resolves to it."),
1649
+ ...commonPublishShape
1650
+ }),
1651
+ z.strictObject({
1652
+ registry: z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
1653
+ username: nonEmptyStringSchema.optional().describe("The PyPI username, or an environment expression that resolves to it."),
1654
+ password: nonEmptyStringSchema.optional().describe("The PyPI password or token, or an environment expression that resolves to it."),
1655
+ ...commonPublishShape
1656
+ }),
1657
+ z.strictObject({
1658
+ registry: z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
1659
+ username: nonEmptyStringSchema.optional().describe("The Maven username, or an environment expression that resolves to it."),
1660
+ password: nonEmptyStringSchema.optional().describe("The Maven password, or an environment expression that resolves to it."),
1661
+ signature: mavenSignatureSchema.optional().describe("Credentials used to sign Maven artifacts."),
1662
+ ...commonPublishShape
1663
+ }),
1664
+ z.strictObject({
1665
+ registry: z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
1632
1666
  ...commonPublishShape
1633
1667
  }),
1634
1668
  z.strictObject({
1635
- registry: z.literal("pypi"),
1636
- username: nonEmptyStringSchema.optional(),
1637
- password: nonEmptyStringSchema.optional(),
1669
+ registry: z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
1638
1670
  ...commonPublishShape
1639
1671
  }),
1640
1672
  z.strictObject({
1641
- registry: z.literal("maven"),
1642
- username: nonEmptyStringSchema.optional(),
1643
- password: nonEmptyStringSchema.optional(),
1644
- signature: mavenSignatureSchema.optional(),
1673
+ registry: z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
1674
+ token: nonEmptyStringSchema.optional().describe("The Cargo registry token, or an environment expression that resolves to it."),
1645
1675
  ...commonPublishShape
1646
1676
  }),
1647
- z.strictObject({ registry: z.literal("nuget"), ...commonPublishShape }),
1648
- z.strictObject({ registry: z.literal("rubygems"), ...commonPublishShape }),
1649
1677
  z.strictObject({
1650
- registry: z.literal("crates"),
1651
- token: nonEmptyStringSchema.optional(),
1678
+ registry: z.literal("go").describe("Publishes the SDK as a Go module."),
1652
1679
  ...commonPublishShape
1653
1680
  }),
1654
- z.strictObject({ registry: z.literal("go"), ...commonPublishShape }),
1655
- z.strictObject({ registry: z.literal("composer"), ...commonPublishShape })
1681
+ z.strictObject({
1682
+ registry: z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
1683
+ ...commonPublishShape
1684
+ })
1656
1685
  ]);
1657
1686
  var reviewersSchema = z.strictObject({
1658
- teams: z.array(nonEmptyStringSchema).optional(),
1659
- users: z.array(nonEmptyStringSchema).optional()
1687
+ teams: z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
1688
+ users: z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
1660
1689
  });
1661
1690
  var githubCredentialsSchema = z.strictObject({
1662
- username: nonEmptyStringSchema.optional(),
1663
- password: nonEmptyStringSchema.optional(),
1664
- token: nonEmptyStringSchema.optional(),
1665
- apiKey: nonEmptyStringSchema.optional()
1691
+ username: nonEmptyStringSchema.optional().describe("The username used to authenticate with the GitHub host."),
1692
+ password: nonEmptyStringSchema.optional().describe("The password used to authenticate with the GitHub host."),
1693
+ token: nonEmptyStringSchema.optional().describe("A token used to authenticate with the GitHub host."),
1694
+ apiKey: nonEmptyStringSchema.optional().describe("An API key used to authenticate with the GitHub host.")
1666
1695
  });
1667
1696
  var githubOutputSchema = z.strictObject({
1668
- repository: nonEmptyStringSchema,
1669
- host: nonEmptyStringSchema.optional(),
1670
- branch: nonEmptyStringSchema.optional(),
1671
- mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
1672
- reviewers: reviewersSchema.optional(),
1673
- /** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
1674
- credentials: githubCredentialsSchema.optional(),
1675
- privateRepository: z.boolean().optional()
1697
+ repository: nonEmptyStringSchema.describe(
1698
+ "The GitHub repository that receives generated files."
1699
+ ),
1700
+ host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
1701
+ branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
1702
+ mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
1703
+ reviewers: reviewersSchema.optional().describe("Reviewers requested for generated pull requests."),
1704
+ credentials: githubCredentialsSchema.optional().describe("Credentials used to authenticate GitHub delivery."),
1705
+ privateRepository: z.boolean().optional().describe("Whether the destination repository is private.")
1676
1706
  });
1677
1707
  var filesOutputSchema = z.strictObject({
1678
- delivery: z.literal("files"),
1679
- path: nonEmptyStringSchema.optional(),
1680
- publish: sdkConfigV1PublishConfigSchema.optional()
1708
+ delivery: z.literal("files").describe("Writes the generated SDK to a directory."),
1709
+ path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
1710
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1681
1711
  });
1682
1712
  var zipOutputSchema = z.strictObject({
1683
- delivery: z.literal("zip"),
1684
- fileName: nonEmptyStringSchema.optional(),
1685
- publish: sdkConfigV1PublishConfigSchema.optional()
1713
+ delivery: z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
1714
+ fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
1715
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1686
1716
  });
1687
1717
  var githubDeliverySchema = z.strictObject({
1688
- delivery: z.literal("github"),
1689
- github: githubOutputSchema,
1690
- publish: sdkConfigV1PublishConfigSchema.optional()
1718
+ delivery: z.literal("github").describe("Delivers the generated SDK to GitHub."),
1719
+ github: githubOutputSchema.describe("GitHub repository delivery settings."),
1720
+ publish: sdkConfigV1PublishConfigSchema.optional().describe("Optional package registry publication.")
1691
1721
  });
1692
1722
  var sdkConfigV1OutputConfigSchema = z.discriminatedUnion(
1693
1723
  "delivery",
@@ -1699,29 +1729,33 @@ var sdkConfigV1OutputConfigSchema = z.discriminatedUnion(
1699
1729
  var sdkConfigV1DependencySchema = dependencySchema;
1700
1730
  var sdkConfigV1PackageConfigSchema = packageConfigSchema;
1701
1731
  var sdkConfigV1ReplayConfigSchema = z.strictObject({
1702
- enabled: z.boolean()
1732
+ enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
1703
1733
  });
1704
1734
  var apiImportSettingsSchema = z.strictObject({
1705
- respectNullableSchemas: z.boolean().optional(),
1706
- titleAsSchemaName: z.boolean().optional(),
1707
- coerceEnumsToLiterals: z.boolean().optional(),
1708
- idiomaticRequestNames: z.boolean().optional(),
1709
- wrapReferencesToNullableInOptional: z.boolean().optional(),
1710
- coerceOptionalSchemasToNullable: z.boolean().optional(),
1711
- pathParameterOrder: z.enum(["url-order", "spec-order"]).optional(),
1712
- onlyIncludeReferencedSchemas: z.boolean().optional(),
1713
- objectQueryParameters: z.boolean().optional(),
1714
- typeDatesAsStrings: z.boolean().optional(),
1715
- groupMultiApiEnvironments: z.boolean().optional(),
1716
- ignoreTags: z.boolean().optional(),
1717
- disambiguateRequestNames: z.boolean().optional(),
1718
- respectReadonlySchemas: z.boolean().optional(),
1719
- discriminatedUnionV2: z.boolean().optional(),
1720
- undiscriminatedUnionsWithLiterals: z.boolean().optional(),
1721
- inlineAllOfSchemas: z.boolean().optional(),
1722
- resolveSchemaCollisions: z.boolean().optional(),
1723
- asyncApiMessageNaming: z.enum(["v1", "v2"]).optional(),
1724
- defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional()
1735
+ respectNullableSchemas: z.boolean().optional().describe("Whether nullable schemas remain nullable in generated types."),
1736
+ titleAsSchemaName: z.boolean().optional().describe("Whether a schema title can determine the generated type name."),
1737
+ coerceEnumsToLiterals: z.boolean().optional().describe("Whether single-value enums are imported as literal values."),
1738
+ idiomaticRequestNames: z.boolean().optional().describe("Whether request types use concise, idiomatic generated names."),
1739
+ wrapReferencesToNullableInOptional: z.boolean().optional().describe("Whether nullable schema references are also treated as optional."),
1740
+ coerceOptionalSchemasToNullable: z.boolean().optional().describe("Whether optional properties are represented as nullable required properties."),
1741
+ pathParameterOrder: z.enum(["url-order", "spec-order"]).optional().describe("Whether path parameters follow their URL order or specification order."),
1742
+ onlyIncludeReferencedSchemas: z.boolean().optional().describe("Whether unreferenced schemas are omitted from the generated SDK."),
1743
+ objectQueryParameters: z.boolean().optional().describe("Whether object-valued query parameters are preserved as objects."),
1744
+ typeDatesAsStrings: z.boolean().optional().describe("Whether date and date-time schemas are generated as strings."),
1745
+ groupMultiApiEnvironments: z.boolean().optional().describe(
1746
+ "Whether environments from multiple API sources are merged into shared named groups."
1747
+ ),
1748
+ ignoreTags: z.boolean().optional().describe("Whether API tags are ignored when organizing generated resources."),
1749
+ disambiguateRequestNames: z.boolean().optional().describe("Whether colliding request type names are automatically disambiguated."),
1750
+ respectReadonlySchemas: z.boolean().optional().describe(
1751
+ "Whether read-only properties are modeled separately for request and response types."
1752
+ ),
1753
+ discriminatedUnionV2: z.boolean().optional().describe("Whether oneOf and anyOf schemas use the newer discriminator inference rules."),
1754
+ undiscriminatedUnionsWithLiterals: z.boolean().optional().describe("Whether literal-bearing unions remain undiscriminated during import."),
1755
+ inlineAllOfSchemas: z.boolean().optional().describe("Whether schemas composed with allOf are inlined when possible."),
1756
+ resolveSchemaCollisions: z.boolean().optional().describe("Whether colliding imported schema names are resolved automatically."),
1757
+ asyncApiMessageNaming: z.enum(["v1", "v2"]).optional().describe("The naming strategy used for messages imported from AsyncAPI."),
1758
+ defaultIntegerFormat: z.enum(["int32", "int64", "uint32", "uint64"]).optional().describe("The integer format used when a schema does not declare one.")
1725
1759
  });
1726
1760
  var sourceSpecTypeSchema = z.enum([
1727
1761
  "openapi",
@@ -1733,27 +1767,30 @@ var sourceSpecTypeSchema = z.enum([
1733
1767
 
1734
1768
  // src/sdk-config/v1/source.ts
1735
1769
  var sourceSpecShape = {
1736
- id: nonEmptyStringSchema,
1737
- type: sourceSpecTypeSchema,
1738
- name: nonEmptyStringSchema.optional(),
1739
- namespace: nonEmptyStringSchema.optional(),
1740
- apiImportSettings: apiImportSettingsSchema.optional(),
1741
- overlays: z.array(relativePathSchema).optional(),
1742
- overrides: z.array(relativePathSchema).optional()
1770
+ id: nonEmptyStringSchema.describe("A unique identifier for this API source."),
1771
+ type: sourceSpecTypeSchema.describe("The API description format of this source."),
1772
+ name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
1773
+ namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
1774
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
1775
+ overlays: z.array(relativePathSchema).optional().describe("Relative paths to overlays applied to this source in order."),
1776
+ overrides: z.array(relativePathSchema).optional().describe("Relative paths to source override files applied in order.")
1743
1777
  };
1744
1778
  var sdkConfigV1SourceSpecSchema = z.union(
1745
1779
  [
1746
- z.strictObject({ ...sourceSpecShape, path: relativePathSchema }),
1747
1780
  z.strictObject({
1748
1781
  ...sourceSpecShape,
1749
- url: z.url({ protocol: /^https?$/ })
1782
+ path: relativePathSchema.describe("The relative path to the API source file.")
1783
+ }),
1784
+ z.strictObject({
1785
+ ...sourceSpecShape,
1786
+ url: z.url({ protocol: /^https?$/ }).describe("The HTTP or HTTPS URL of the API source file.")
1750
1787
  })
1751
1788
  ],
1752
1789
  { error: "source spec must contain exactly one locator: path or HTTP(S) url" }
1753
1790
  );
1754
1791
  var sdkConfigV1SourceConfigSchema = z.strictObject({
1755
- specs: z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec"),
1756
- apiImportSettings: apiImportSettingsSchema.optional()
1792
+ specs: z.array(sdkConfigV1SourceSpecSchema).min(1, "source.specs must contain at least one source spec").describe("API source files in authoritative processing order."),
1793
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
1757
1794
  }).superRefine(({ specs }, context) => {
1758
1795
  const seenIds = /* @__PURE__ */ new Set();
1759
1796
  specs.forEach(({ id }, index) => {
@@ -1768,79 +1805,80 @@ var sdkConfigV1SourceConfigSchema = z.strictObject({
1768
1805
  });
1769
1806
  });
1770
1807
  var cliGenerationConfigSchema = z.strictObject({
1771
- paginationParameters: z.array(nonEmptyStringSchema).optional(),
1772
- skills: z.boolean().optional()
1808
+ paginationParameters: z.array(nonEmptyStringSchema).optional().describe("Request parameter names treated as pagination controls by the CLI."),
1809
+ skills: z.boolean().optional().describe("Whether the generated CLI includes skills that teach AI agents to invoke commands.")
1773
1810
  });
1774
1811
  var csharpGenerationConfigSchema = z.strictObject({
1775
- useOptionalWrapper: z.boolean().optional(),
1776
- simplifyObjectDictionaries: z.boolean().optional(),
1777
- explicitNamespaces: z.boolean().optional(),
1778
- rootNamespaceForCoreClasses: z.boolean().optional(),
1779
- includeExceptionHandler: z.boolean().optional(),
1780
- experimentalExplicitNullableOptional: z.boolean().optional()
1812
+ useOptionalWrapper: z.boolean().optional().describe("Whether optional values use an explicit Optional wrapper."),
1813
+ simplifyObjectDictionaries: z.boolean().optional().describe("Whether object schemas with arbitrary values use simplified dictionary types."),
1814
+ explicitNamespaces: z.boolean().optional().describe("Whether generated resource groups use explicit nested namespaces."),
1815
+ rootNamespaceForCoreClasses: z.boolean().optional().describe("Whether shared client classes are emitted in the root namespace."),
1816
+ includeExceptionHandler: z.boolean().optional().describe("Whether generated client operations use a configurable exception handler."),
1817
+ experimentalExplicitNullableOptional: z.boolean().optional().describe(
1818
+ "Whether optional nullable properties distinguish omitted values from explicit nulls."
1819
+ )
1781
1820
  });
1782
1821
  var goGenerationConfigSchema = z.strictObject({
1783
- legacyComplexModels: z.boolean().optional(),
1822
+ legacyComplexModels: z.boolean().optional().describe("Whether complex models use the legacy Go representation."),
1784
1823
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
1785
- smartCasing: z.boolean().optional(),
1824
+ smartCasing: z.boolean().optional().describe("Whether generated Go names capitalize common initialisms."),
1786
1825
  /** Overrides the fern root-client constructor independently from the client type name. */
1787
- clientConstructorName: nonEmptyStringSchema.optional(),
1788
- unionVersion: z.enum(["v0", "v1"]).optional(),
1789
- includeLegacyClientOptions: z.boolean().optional()
1826
+ clientConstructorName: nonEmptyStringSchema.optional().describe("The generated root-client constructor name."),
1827
+ unionVersion: z.enum(["v0", "v1"]).optional().describe("The representation used for generated Go unions."),
1828
+ includeLegacyClientOptions: z.boolean().optional().describe("Whether the client retains legacy constructor option helpers.")
1790
1829
  });
1791
1830
  var jvmGenerationConfigSchema = z.strictObject({
1792
- packageLayout: z.enum(["flat", "nested"]).optional(),
1793
- useLocalDateForDates: z.boolean().optional(),
1794
- collapseOptionalNullable: z.boolean().optional(),
1795
- gradleDistributionUrl: z.string().min(1).optional(),
1796
- gradlePluginManagement: z.string().optional(),
1797
- gradleCentralDependencyManagement: z.boolean().optional(),
1831
+ packageLayout: z.enum(["flat", "nested"]).optional().describe("Whether generated JVM packages use a flat or nested resource layout."),
1832
+ useLocalDateForDates: z.boolean().optional().describe("Whether date-only values use LocalDate instead of OffsetDateTime."),
1833
+ collapseOptionalNullable: z.boolean().optional().describe("Whether optional nullable values collapse into a single nullable representation."),
1834
+ gradleDistributionUrl: z.string().min(1).optional().describe("The Gradle distribution URL written to the generated wrapper."),
1835
+ gradlePluginManagement: z.string().optional().describe("Plugin management configuration added to the generated Gradle settings."),
1836
+ gradleCentralDependencyManagement: z.boolean().optional().describe("Whether dependency versions are managed centrally in the Gradle project."),
1798
1837
  /** Selects co-located async methods or a separate async client surface. */
1799
- asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional()
1838
+ asyncStyle: z.enum(["dedicated-client", "twin-methods"]).optional().describe("Whether asynchronous operations use a separate client or co-located methods.")
1800
1839
  });
1801
1840
 
1802
1841
  // src/sdk-config-domain/v1/language/java.ts
1803
1842
  var javaGenerationConfigSchema = jvmGenerationConfigSchema.extend({
1804
- includeKotlinSnippets: z.boolean().optional()
1843
+ includeKotlinSnippets: z.boolean().optional().describe("Whether Java SDK documentation includes Kotlin usage snippets.")
1805
1844
  });
1806
1845
 
1807
1846
  // src/sdk-config-domain/v1/language/kotlin.ts
1808
1847
  var kotlinGenerationConfigSchema = jvmGenerationConfigSchema;
1809
1848
  var compilerOptionsSchema = z.strictObject({
1810
- target: nonEmptyStringSchema.optional(),
1811
- module: nonEmptyStringSchema.optional(),
1812
- lib: z.array(nonEmptyStringSchema).optional()
1849
+ target: nonEmptyStringSchema.optional().describe("The JavaScript language target passed to TypeScript."),
1850
+ module: nonEmptyStringSchema.optional().describe("The module format passed to TypeScript."),
1851
+ lib: z.array(nonEmptyStringSchema).optional().describe("The runtime library definitions passed to TypeScript.")
1813
1852
  });
1814
1853
  var packageScriptSchema = z.strictObject({
1815
- name: nonEmptyStringSchema,
1816
- command: nonEmptyStringSchema
1854
+ name: nonEmptyStringSchema.describe("The package script name."),
1855
+ command: nonEmptyStringSchema.describe("The command executed by the package script.")
1817
1856
  });
1818
1857
  var httpClientSchema = z.strictObject({
1819
- name: z.enum(["axios", "fetch"])
1858
+ name: z.enum(["axios", "fetch"]).describe("The HTTP client used by generated TypeScript code.")
1820
1859
  });
1821
1860
  var typescriptGenerationConfigSchema = z.strictObject({
1822
- typescriptVersion: nonEmptyStringSchema.optional(),
1823
- zodVersion: nonEmptyStringSchema.optional(),
1824
- compilerOptions: compilerOptionsSchema.optional(),
1825
- httpClient: httpClientSchema.optional(),
1826
- packageManager: z.enum(["pnpm", "yarn"]).optional(),
1827
- /** e.g. `1.22.22` — from the customer's own `config.packageJson.packageManager` (`yarn@1.22.22`). */
1828
- packageManagerVersion: nonEmptyStringSchema.optional(),
1829
- testFramework: z.enum(["jest", "vitest"]).optional(),
1830
- namingStrategy: z.enum(["base", "originalPropertyNames"]).optional(),
1831
- bundle: z.boolean().optional(),
1832
- exportClassDefault: z.boolean().optional(),
1861
+ typescriptVersion: nonEmptyStringSchema.optional().describe("The TypeScript version used by the generated project."),
1862
+ zodVersion: nonEmptyStringSchema.optional().describe("The Zod version used by generated runtime schemas."),
1863
+ compilerOptions: compilerOptionsSchema.optional().describe("TypeScript compiler options for the generated project."),
1864
+ httpClient: httpClientSchema.optional().describe("The HTTP client used by generated TypeScript code."),
1865
+ packageManager: z.enum(["pnpm", "yarn"]).optional().describe("The package manager used by the generated project."),
1866
+ packageManagerVersion: nonEmptyStringSchema.optional().describe("The package manager version used by the generated project."),
1867
+ testFramework: z.enum(["jest", "vitest"]).optional().describe("The test framework used by generated tests."),
1868
+ namingStrategy: z.enum(["base", "originalPropertyNames"]).optional().describe("How schema property names are converted into TypeScript identifiers."),
1869
+ bundle: z.boolean().optional().describe("Whether the generated package includes bundled output."),
1870
+ exportClassDefault: z.boolean().optional().describe("Whether the client class is also exported as the default export."),
1833
1871
  /** Name of the top-level namespace export emitted by Fern-compatible TypeScript SDKs. */
1834
- namespaceExportName: nonEmptyStringSchema.optional(),
1835
- consolidateTypeFiles: z.boolean().optional(),
1836
- allowCustomFetcher: z.boolean().optional(),
1837
- useBrandedStringAliases: z.boolean().optional(),
1838
- useLegacyExports: z.boolean().optional(),
1839
- useBigInt: z.boolean().optional(),
1840
- serdeLayer: z.boolean().optional(),
1872
+ namespaceExportName: nonEmptyStringSchema.optional().describe("The top-level namespace export name."),
1873
+ consolidateTypeFiles: z.boolean().optional().describe("Whether generated types are consolidated into fewer source files."),
1874
+ allowCustomFetcher: z.boolean().optional().describe("Whether callers can supply a custom fetch implementation."),
1875
+ useBrandedStringAliases: z.boolean().optional().describe("Whether string aliases are emitted as distinct branded types."),
1876
+ useLegacyExports: z.boolean().optional().describe("Whether the package emits the legacy export layout."),
1877
+ useBigInt: z.boolean().optional().describe("Whether 64-bit integer values are represented with bigint."),
1878
+ serdeLayer: z.boolean().optional().describe("Whether generated models use Fern serialization and deserialization helpers."),
1841
1879
  /** Ship only the ESM build (drops CJS) to avoid the Node dual-package hazard. */
1842
- esmOnly: z.boolean().optional(),
1843
- scripts: z.array(packageScriptSchema).optional()
1880
+ esmOnly: z.boolean().optional().describe("Whether the package emits only ECMAScript modules."),
1881
+ scripts: z.array(packageScriptSchema).optional().describe("Additional scripts added to the generated package manifest.")
1844
1882
  });
1845
1883
 
1846
1884
  // src/sdk-config-domain/v1/language/mcp.ts
@@ -1855,172 +1893,183 @@ var mcpAvailabilityStatuses = [
1855
1893
  "LEGACY"
1856
1894
  ];
1857
1895
  var mcpToolFilterSchema = z.strictObject({
1858
- include: z.array(nonEmptyStringSchema).optional(),
1859
- exclude: z.array(nonEmptyStringSchema).optional()
1896
+ include: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly included as MCP tools."),
1897
+ exclude: z.array(nonEmptyStringSchema).optional().describe("Operations explicitly excluded from MCP tools.")
1860
1898
  });
1861
1899
  var mcpToolsetNameSchema = nonEmptyStringSchema.refine(
1862
1900
  (name) => name !== "default" && /^[a-z0-9-]+$/.test(name),
1863
1901
  'toolset names must match [a-z0-9-]+ and cannot be "default"'
1864
1902
  );
1865
1903
  var mcpGenerationConfigSchema = typescriptGenerationConfigSchema.extend({
1866
- serverName: nonEmptyStringSchema.optional(),
1867
- serverDescription: nonEmptyStringSchema.optional(),
1868
- excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional(),
1869
- tools: mcpToolFilterSchema.optional(),
1870
- toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional()
1904
+ serverName: nonEmptyStringSchema.optional().describe("The name advertised by the generated MCP server."),
1905
+ serverDescription: nonEmptyStringSchema.optional().describe("The description advertised by the generated MCP server."),
1906
+ excludeAvailability: z.array(z.enum(mcpAvailabilityStatuses)).optional().describe("Operation availability statuses excluded from MCP tool generation."),
1907
+ tools: mcpToolFilterSchema.optional().describe("Global operation filters for generated MCP tools."),
1908
+ toolsets: z.record(mcpToolsetNameSchema, mcpToolFilterSchema).optional().describe("Named MCP toolsets and the operation filters for each toolset.")
1871
1909
  });
1872
1910
  var phpGenerationConfigSchema = z.strictObject({
1873
- propertyAccess: z.enum(["public", "private"]).optional(),
1874
- generateClientInterfaces: z.boolean().optional()
1911
+ propertyAccess: z.enum(["public", "private"]).optional().describe("The visibility of generated PHP model properties."),
1912
+ generateClientInterfaces: z.boolean().optional().describe("Whether interfaces are generated for PHP client classes.")
1875
1913
  });
1876
1914
  var pythonClientSchema = z.strictObject({
1877
- fileName: nonEmptyStringSchema.optional(),
1878
- exportedFileName: nonEmptyStringSchema.optional()
1915
+ fileName: nonEmptyStringSchema.optional().describe("The source file name for the Python client."),
1916
+ exportedFileName: nonEmptyStringSchema.optional().describe("The file name used when exporting the Python client.")
1879
1917
  });
1880
1918
  var pydanticConfigSchema = z.strictObject({
1881
- versionCompatibility: z.enum(["v1", "v2", "both", "v1-on-v2"]).optional(),
1882
- frozen: z.boolean().optional(),
1883
- requireOptionalFields: z.boolean().optional(),
1884
- unionNaming: z.enum(["v0", "v1"]).optional(),
1885
- useFieldAliases: z.boolean().optional()
1919
+ versionCompatibility: z.enum(["v1", "v2", "both", "v1-on-v2"]).optional().describe("The Pydantic major versions supported by generated models."),
1920
+ frozen: z.boolean().optional().describe("Whether generated Pydantic models are immutable."),
1921
+ requireOptionalFields: z.boolean().optional().describe("Whether Optional fields remain required unless they declare a default."),
1922
+ unionNaming: z.enum(["v0", "v1"]).optional().describe("The naming strategy for generated union types."),
1923
+ useFieldAliases: z.boolean().optional().describe("Whether Pydantic field aliases preserve wire names.")
1886
1924
  });
1887
1925
  var additionalInitExportSchema = z.strictObject({
1888
- from: nonEmptyStringSchema,
1889
- imports: z.array(nonEmptyStringSchema).min(1)
1926
+ from: nonEmptyStringSchema.describe("The module from which names are re-exported."),
1927
+ imports: z.array(nonEmptyStringSchema).min(1).describe("Names re-exported from the module.")
1890
1928
  });
1891
1929
  var pythonGenerationConfigSchema = z.strictObject({
1892
- pythonVersion: nonEmptyStringSchema.optional(),
1893
- pydanticVersion: nonEmptyStringSchema.optional(),
1894
- pydantic: pydanticConfigSchema.optional(),
1895
- client: pythonClientSchema.optional(),
1930
+ pythonVersion: nonEmptyStringSchema.optional().describe("The Python version targeted by the generated project."),
1931
+ pydanticVersion: nonEmptyStringSchema.optional().describe("The Pydantic dependency version requirement."),
1932
+ pydantic: pydanticConfigSchema.optional().describe("Pydantic model-generation behavior."),
1933
+ client: pythonClientSchema.optional().describe("Python client file naming."),
1896
1934
  /** Default followed by generated sync and async HTTP clients when the caller does not override it. */
1897
- followRedirectsByDefault: z.boolean().optional(),
1935
+ followRedirectsByDefault: z.boolean().optional().describe("Whether generated HTTP clients follow redirects by default."),
1898
1936
  /** Chunk size passed to Python byte-stream iterators. */
1899
- defaultBytesStreamChunkSize: z.number().int().positive().optional(),
1937
+ defaultBytesStreamChunkSize: z.number().int().positive().optional().describe("The default byte-stream iterator chunk size."),
1900
1938
  /** Python interpreter recursion limit installed by the generated package at import time. */
1901
- recursionLimit: z.number().int().gt(1e3).optional(),
1939
+ recursionLimit: z.number().int().gt(1e3).optional().describe("The Python recursion limit installed when the generated package is imported."),
1902
1940
  /** Published Python extras, keyed by extra name with package dependency names as values. */
1903
- extras: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema)).optional(),
1904
- alwaysInitializeOptionals: z.boolean().optional(),
1905
- useTypedDictRequests: z.boolean().optional(),
1906
- additionalInitExports: z.array(additionalInitExportSchema).optional()
1941
+ extras: z.record(nonEmptyStringSchema, z.array(nonEmptyStringSchema)).optional().describe("Published Python extras and their dependency names."),
1942
+ alwaysInitializeOptionals: z.boolean().optional().describe("Whether optional model fields are initialized even when omitted."),
1943
+ useTypedDictRequests: z.boolean().optional().describe("Whether request bodies are generated as TypedDict types."),
1944
+ additionalInitExports: z.array(additionalInitExportSchema).optional().describe("Additional names re-exported from the package initializer.")
1907
1945
  });
1908
1946
  var rubyGenerationConfigSchema = z.strictObject({
1909
- requirePaths: z.array(nonEmptyStringSchema).optional()
1947
+ requirePaths: z.array(nonEmptyStringSchema).optional().describe("Ruby load paths included in the generated gem specification.")
1910
1948
  });
1911
1949
  var rustGenerationConfigSchema = z.strictObject({
1912
1950
  /**
1913
1951
  * Rust type for datetime primitives. `offset` maps to `DateTime<FixedOffset>` and preserves the
1914
1952
  * timezone the payload carried; `utc` maps to `DateTime<Utc>` and normalizes to UTC.
1915
1953
  */
1916
- dateTimeType: z.enum(["offset", "utc"]).optional(),
1954
+ dateTimeType: z.enum(["offset", "utc"]).optional().describe("Whether datetime values preserve their offset or normalize to UTC."),
1917
1955
  /** Uppercase common initialisms in generated names (`UserID` rather than `UserId`). */
1918
- capitalizeInitialisms: z.boolean().optional(),
1956
+ capitalizeInitialisms: z.boolean().optional().describe("Whether generated Rust names capitalize common initialisms."),
1919
1957
  /** Cargo features, mapping a feature name to the dependencies or features it enables. */
1920
- features: z.record(z.string(), z.array(nonEmptyStringSchema)).optional(),
1958
+ features: z.record(z.string(), z.array(nonEmptyStringSchema)).optional().describe("Cargo features and the dependencies or features each enables."),
1921
1959
  /** Overrides which features make up Cargo's `default` feature set. */
1922
- defaultFeatures: z.array(nonEmptyStringSchema).optional()
1960
+ defaultFeatures: z.array(nonEmptyStringSchema).optional().describe("Cargo features included in the crate default feature set.")
1923
1961
  });
1924
1962
  var swiftGenerationConfigSchema = z.strictObject({
1925
- moduleName: nonEmptyStringSchema.optional(),
1926
- nullableAsOptional: z.boolean().optional()
1963
+ moduleName: nonEmptyStringSchema.optional().describe("The Swift module name for the generated package."),
1964
+ nullableAsOptional: z.boolean().optional().describe("Whether nullable values are represented as Swift optionals.")
1927
1965
  });
1928
1966
  var planModifierSourceSchema = z.discriminatedUnion("enabled", [
1929
- z.strictObject({ enabled: z.literal(true), sourceDir: nonEmptyStringSchema }),
1930
- z.strictObject({ enabled: z.literal(false) })
1967
+ z.strictObject({
1968
+ enabled: z.literal(true).describe("Enables custom Terraform plan modifiers."),
1969
+ sourceDir: nonEmptyStringSchema.describe(
1970
+ "The directory containing custom plan modifier source files."
1971
+ )
1972
+ }),
1973
+ z.strictObject({
1974
+ enabled: z.literal(false).describe("Disables custom Terraform plan modifiers.")
1975
+ })
1931
1976
  ]);
1932
1977
  var planModifiersSchema = z.strictObject({
1933
- resources: planModifierSourceSchema,
1934
- attributes: planModifierSourceSchema
1978
+ resources: planModifierSourceSchema.describe("Custom plan modifiers for generated resources."),
1979
+ attributes: planModifierSourceSchema.describe("Custom plan modifiers for generated attributes.")
1935
1980
  });
1936
1981
  var providerSchemaSchema = z.strictObject({
1937
- addressKey: nonEmptyStringSchema,
1938
- authTokenKey: nonEmptyStringSchema
1982
+ addressKey: nonEmptyStringSchema.describe(
1983
+ "The provider attribute used to configure the API address."
1984
+ ),
1985
+ authTokenKey: nonEmptyStringSchema.describe(
1986
+ "The provider attribute used to configure the authentication token."
1987
+ )
1939
1988
  });
1940
1989
  var terraformGenerationConfigSchema = z.strictObject({
1941
- providerName: nonEmptyStringSchema.optional(),
1942
- providerVersion: nonEmptyStringSchema.optional(),
1943
- providerModulePath: goModulePathSchema.optional(),
1944
- mockAcceptance: z.boolean().optional(),
1945
- hideComputedDiff: z.boolean().optional(),
1946
- providerSchema: providerSchemaSchema.optional(),
1947
- planModifiers: planModifiersSchema.optional()
1990
+ providerName: nonEmptyStringSchema.optional().describe("The Terraform provider name."),
1991
+ providerVersion: nonEmptyStringSchema.optional().describe("The generated Terraform provider version."),
1992
+ providerModulePath: goModulePathSchema.optional().describe("The Go module path for the generated provider."),
1993
+ mockAcceptance: z.boolean().optional().describe("Whether acceptance tests use a mock API server."),
1994
+ hideComputedDiff: z.boolean().optional().describe("Whether computed-only changes are hidden from Terraform plans."),
1995
+ providerSchema: providerSchemaSchema.optional().describe("Names of provider-level configuration attributes."),
1996
+ planModifiers: planModifiersSchema.optional().describe("Custom plan modifier source configuration.")
1948
1997
  });
1949
1998
 
1950
1999
  // src/sdk-config/v1/target.ts
1951
2000
  var targetOverrideShape = {
1952
- generatorVersion: exactSemverSchema.optional(),
1953
- sdkName: nonEmptyStringSchema.optional(),
1954
- sdkVersion: nonEmptyStringSchema.optional(),
1955
- client: sdkConfigV1ClientConfigOverrideSchema.optional(),
1956
- docs: sdkConfigV1DocsConfigSchema.optional(),
1957
- package: sdkConfigV1PackageConfigSchema.optional(),
1958
- output: sdkConfigV1OutputConfigSchema.optional()
2001
+ generatorVersion: exactSemverSchema.optional().describe("The exact generator version used for this target."),
2002
+ sdkName: nonEmptyStringSchema.optional().describe("An SDK name that overrides the root value for this target."),
2003
+ sdkVersion: nonEmptyStringSchema.optional().describe("An SDK version that overrides the root value for this target."),
2004
+ client: sdkConfigV1ClientConfigOverrideSchema.optional().describe("Client settings that override root client configuration for this target."),
2005
+ docs: sdkConfigV1DocsConfigSchema.optional().describe("Documentation settings that override root documentation for this target."),
2006
+ package: sdkConfigV1PackageConfigSchema.optional().describe("Package metadata that overrides root package configuration for this target."),
2007
+ output: sdkConfigV1OutputConfigSchema.optional().describe("Output configuration that replaces the root output for this target.")
1959
2008
  };
1960
2009
  var sdkConfigV1TargetSchema = z.discriminatedUnion("language", [
1961
2010
  z.strictObject({
1962
- language: z.literal("typescript"),
1963
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional(),
2011
+ language: z.literal("typescript").describe("Generates a TypeScript SDK."),
2012
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(typescriptGenerationConfigSchema.shape).optional().describe("Common and TypeScript-specific generation settings for this target."),
1964
2013
  ...targetOverrideShape
1965
2014
  }),
1966
2015
  z.strictObject({
1967
- language: z.literal("python"),
1968
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional(),
2016
+ language: z.literal("python").describe("Generates a Python SDK."),
2017
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(pythonGenerationConfigSchema.shape).optional().describe("Common and Python-specific generation settings for this target."),
1969
2018
  ...targetOverrideShape
1970
2019
  }),
1971
2020
  z.strictObject({
1972
- language: z.literal("java"),
1973
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional(),
2021
+ language: z.literal("java").describe("Generates a Java SDK."),
2022
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(javaGenerationConfigSchema.shape).optional().describe("Common and Java-specific generation settings for this target."),
1974
2023
  ...targetOverrideShape
1975
2024
  }),
1976
2025
  z.strictObject({
1977
- language: z.literal("kotlin"),
1978
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional(),
2026
+ language: z.literal("kotlin").describe("Generates a Kotlin SDK."),
2027
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(kotlinGenerationConfigSchema.shape).optional().describe("Common and Kotlin-specific generation settings for this target."),
1979
2028
  ...targetOverrideShape
1980
2029
  }),
1981
2030
  z.strictObject({
1982
- language: z.literal("go"),
1983
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional(),
2031
+ language: z.literal("go").describe("Generates a Go SDK."),
2032
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(goGenerationConfigSchema.shape).optional().describe("Common and Go-specific generation settings for this target."),
1984
2033
  ...targetOverrideShape
1985
2034
  }),
1986
2035
  z.strictObject({
1987
- language: z.literal("csharp"),
1988
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional(),
2036
+ language: z.literal("csharp").describe("Generates a C# SDK."),
2037
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(csharpGenerationConfigSchema.shape).optional().describe("Common and C#-specific generation settings for this target."),
1989
2038
  ...targetOverrideShape
1990
2039
  }),
1991
2040
  z.strictObject({
1992
- language: z.literal("php"),
1993
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional(),
2041
+ language: z.literal("php").describe("Generates a PHP SDK."),
2042
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(phpGenerationConfigSchema.shape).optional().describe("Common and PHP-specific generation settings for this target."),
1994
2043
  ...targetOverrideShape
1995
2044
  }),
1996
2045
  z.strictObject({
1997
- language: z.literal("ruby"),
1998
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional(),
2046
+ language: z.literal("ruby").describe("Generates a Ruby SDK."),
2047
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rubyGenerationConfigSchema.shape).optional().describe("Common and Ruby-specific generation settings for this target."),
1999
2048
  ...targetOverrideShape
2000
2049
  }),
2001
2050
  z.strictObject({
2002
- language: z.literal("rust"),
2003
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional(),
2051
+ language: z.literal("rust").describe("Generates a Rust SDK."),
2052
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(rustGenerationConfigSchema.shape).optional().describe("Common and Rust-specific generation settings for this target."),
2004
2053
  ...targetOverrideShape
2005
2054
  }),
2006
2055
  z.strictObject({
2007
- language: z.literal("swift"),
2008
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional(),
2056
+ language: z.literal("swift").describe("Generates a Swift SDK."),
2057
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(swiftGenerationConfigSchema.shape).optional().describe("Common and Swift-specific generation settings for this target."),
2009
2058
  ...targetOverrideShape
2010
2059
  }),
2011
2060
  z.strictObject({
2012
- language: z.literal("cli"),
2013
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional(),
2061
+ language: z.literal("cli").describe("Generates a command-line interface."),
2062
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(cliGenerationConfigSchema.shape).optional().describe("Common and CLI-specific generation settings for this target."),
2014
2063
  ...targetOverrideShape
2015
2064
  }),
2016
2065
  z.strictObject({
2017
- language: z.literal("mcp"),
2018
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional(),
2066
+ language: z.literal("mcp").describe("Generates an MCP server."),
2067
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(mcpGenerationConfigSchema.shape).optional().describe("Common and MCP-specific generation settings for this target."),
2019
2068
  ...targetOverrideShape
2020
2069
  }),
2021
2070
  z.strictObject({
2022
- language: z.literal("terraform"),
2023
- generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional(),
2071
+ language: z.literal("terraform").describe("Generates a Terraform provider."),
2072
+ generation: sdkConfigV1GenerationConfigOverrideSchema.extend(terraformGenerationConfigSchema.shape).optional().describe("Common and Terraform-specific generation settings for this target."),
2024
2073
  ...targetOverrideShape
2025
2074
  })
2026
2075
  ]);
@@ -2113,19 +2162,21 @@ function validateTargetPublishing(target, targetIndex, globalPackage, globalOutp
2113
2162
  );
2114
2163
  }
2115
2164
  var sdkConfigV1Schema = z.strictObject({
2116
- schemaVersion: z.literal(SDK_CONFIG_V1_SCHEMA_VERSION),
2117
- sdkName: nonEmptyStringSchema,
2118
- sdkVersion: nonEmptyStringSchema.default("1.0.0"),
2119
- apiVersion: nonEmptyStringSchema.optional(),
2120
- source: sdkConfigV1SourceConfigSchema,
2121
- api: sdkConfigV1ApiConfigSchema.prefault({}),
2122
- client: sdkConfigV1ClientConfigSchema.prefault({}),
2123
- package: sdkConfigV1PackageConfigSchema.prefault({}),
2124
- output: sdkConfigV1OutputConfigSchema.optional(),
2125
- replay: sdkConfigV1ReplayConfigSchema.optional(),
2126
- docs: sdkConfigV1DocsConfigSchema.prefault({}),
2127
- generation: sdkConfigV1GenerationConfigSchema.prefault({}),
2128
- targets: z.array(sdkConfigV1TargetSchema).min(1)
2165
+ schemaVersion: z.literal(SDK_CONFIG_V1_SCHEMA_VERSION).describe("The version of the customer-facing SDK Config schema."),
2166
+ sdkName: nonEmptyStringSchema.describe("The default name used for generated SDKs."),
2167
+ sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The default version assigned to generated SDKs."),
2168
+ apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the generated SDKs."),
2169
+ source: sdkConfigV1SourceConfigSchema.describe(
2170
+ "The API descriptions used to generate the SDKs."
2171
+ ),
2172
+ api: sdkConfigV1ApiConfigSchema.prefault({}).describe("Shared API behavior for every target."),
2173
+ client: sdkConfigV1ClientConfigSchema.prefault({}).describe("Shared generated-client behavior for every target."),
2174
+ package: sdkConfigV1PackageConfigSchema.prefault({}).describe("Package metadata inherited by every target."),
2175
+ output: sdkConfigV1OutputConfigSchema.optional().describe("The default output delivery and publication configuration."),
2176
+ replay: sdkConfigV1ReplayConfigSchema.optional().describe("Generation replay behavior shared by every target."),
2177
+ docs: sdkConfigV1DocsConfigSchema.prefault({}).describe("Documentation settings inherited by every target."),
2178
+ generation: sdkConfigV1GenerationConfigSchema.prefault({}).describe("Generation settings inherited by every target."),
2179
+ targets: z.array(sdkConfigV1TargetSchema).min(1).describe("Language targets to generate; each language may appear once.")
2129
2180
  }).superRefine(({ output, package: globalPackage, targets }, context) => {
2130
2181
  const configuredLanguages = /* @__PURE__ */ new Set();
2131
2182
  targets.forEach((target, targetIndex) => {
@@ -2387,6 +2438,14 @@ function mapInvocation(generator, language, activeLanguages, index) {
2387
2438
  ...prefix,
2388
2439
  "config"
2389
2440
  ]);
2441
+ const apiWideIdempotency = idempotencyKeyGenerationFrom(
2442
+ generator.idempotencyKeyGenerationConfig,
2443
+ [...prefix, "idempotencyKeyGenerationConfig"],
2444
+ state
2445
+ );
2446
+ if (apiWideIdempotency && client.idempotencyKeyGeneration === void 0) {
2447
+ client.idempotencyKeyGeneration = apiWideIdempotency;
2448
+ }
2390
2449
  const rawGenerator = isObject(generator.raw) ? generator.raw : void 0;
2391
2450
  const smartCasing = typeof rawGenerator?.["smart-casing"] === "boolean" ? rawGenerator["smart-casing"] : generator.smartCasing === false ? false : void 0;
2392
2451
  const smartCasingDigitWordBoundary = typeof rawGenerator?.["smart-casing-digit-word-boundary"] === "boolean" ? rawGenerator["smart-casing-digit-word-boundary"] : generator.smartCasingDigitWordBoundary === true ? true : void 0;
@@ -2405,9 +2464,6 @@ function mapInvocation(generator, language, activeLanguages, index) {
2405
2464
  if (generator.keywords?.length) {
2406
2465
  generation.reservedKeywords = [...generator.keywords];
2407
2466
  }
2408
- if (generator.generateFullProject !== void 0) {
2409
- generation.generateFullProject = generator.generateFullProject;
2410
- }
2411
2467
  const settings = isObject(generator.settings) ? generator.settings : void 0;
2412
2468
  if (settings) {
2413
2469
  const inlinePathParameters = takeBoolean(settings, ["inlinePathParameters"], state, [
@@ -2423,21 +2479,25 @@ function mapInvocation(generator, language, activeLanguages, index) {
2423
2479
  ...collectUnsupported(config, [...prefix, "config"], state),
2424
2480
  ...settings ? collectUnsupported(settings, [...prefix, "settings"], state) : [],
2425
2481
  ...isObject(generator.readme) ? collectUnsupported(generator.readme, [...prefix, "readme"], state) : [],
2426
- ...unsupportedResolvedFields(generator, index)
2482
+ ...unsupportedResolvedFields(generator, index, apiWideIdempotency !== void 0)
2427
2483
  ];
2428
2484
  return { client, docs, generation, package: packageConfig, targetGeneration, unsupportedFields };
2429
2485
  }
2430
- function unsupportedResolvedFields(generator, index) {
2486
+ function unsupportedResolvedFields(generator, index, idempotencyMapped) {
2431
2487
  const values = [
2432
2488
  ["automation", isDefaultAutomation(generator.automation) ? void 0 : generator.automation],
2433
2489
  ["containerImage", generator.containerImage],
2434
2490
  ["irVersionOverride", generator.irVersionOverride],
2435
- ["idempotencyKeyGenerationConfig", generator.idempotencyKeyGenerationConfig],
2491
+ [
2492
+ "idempotencyKeyGenerationConfig",
2493
+ idempotencyMapped ? void 0 : generator.idempotencyKeyGenerationConfig
2494
+ ],
2436
2495
  ["absolutePathToLocalSnippets", generator.absolutePathToLocalSnippets],
2437
2496
  [
2438
2497
  "disableExamples",
2439
2498
  generator.disableExamples === false ? void 0 : generator.disableExamples
2440
2499
  ],
2500
+ ["generateFullProject", generator.generateFullProject],
2441
2501
  ["apiOverride", generator.apiOverride]
2442
2502
  ];
2443
2503
  return values.flatMap(([field, value]) => {
@@ -2464,7 +2524,13 @@ function resolvedFieldGuidance(field) {
2464
2524
  }
2465
2525
  if (field === "idempotencyKeyGenerationConfig") {
2466
2526
  return {
2467
- suggestedAction: "Preserve this orchestration setting outside SDK Config; public v1 has no idempotency-generation field."
2527
+ sdkConfigPath: ["client", "idempotencyKeyGeneration"],
2528
+ suggestedAction: "Use true, false, or an object with header-name and methods, or set client.idempotencyKeyGeneration manually."
2529
+ };
2530
+ }
2531
+ if (field === "generateFullProject") {
2532
+ return {
2533
+ suggestedAction: "Preserve this packaging setting on the generation request; it is not customer-authored SDK configuration."
2468
2534
  };
2469
2535
  }
2470
2536
  return {
@@ -2474,6 +2540,20 @@ function resolvedFieldGuidance(field) {
2474
2540
  function isDefaultAutomation(value) {
2475
2541
  return isObject(value) && value.generate === true && value.upgrade === true && value.preview === true && value.verify === true;
2476
2542
  }
2543
+ var HTTP_METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"];
2544
+ function idempotencyKeyGenerationFrom(value, path, state) {
2545
+ if (typeof value === "boolean") {
2546
+ consume(state, path);
2547
+ return { enabled: value };
2548
+ }
2549
+ if (!isObject(value)) return void 0;
2550
+ const probe = { consumedPaths: /* @__PURE__ */ new Set() };
2551
+ const headerName = takeString(value, ["headerName"], probe, path);
2552
+ const methods = takeEnumArray(value, ["methods"], HTTP_METHODS, probe, path);
2553
+ if (probe.consumedPaths.size !== Object.keys(value).length) return void 0;
2554
+ consume(state, path);
2555
+ return { enabled: true, ...optional("headerName", headerName), ...optional("methods", methods) };
2556
+ }
2477
2557
  function mapCommonConfig(language, config, state, client, generation, packageConfig, basePath) {
2478
2558
  const inlinePath = takeBoolean(config, ["inlinePathParameters"], state, basePath);
2479
2559
  const inlineFile = takeBoolean(config, ["inlineFileProperties"], state, basePath);
@@ -2498,6 +2578,23 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2498
2578
  if (useDefaults !== void 0) client.useDefaultRequestParameterValues = useDefaults;
2499
2579
  const respectOptionalBody = takeBoolean(config, ["respectOptionalRequestBody"], state, basePath);
2500
2580
  if (respectOptionalBody !== void 0) client.respectOptionalRequestBody = respectOptionalBody;
2581
+ const idempotency = locate(config, ["autoGenerateIdempotencyKey"], basePath);
2582
+ const idempotencyKeyGeneration = idempotency && idempotencyKeyGenerationFrom(idempotency.value, idempotency.path, state);
2583
+ if (idempotencyKeyGeneration) client.idempotencyKeyGeneration = idempotencyKeyGeneration;
2584
+ const userAgent = compact({
2585
+ template: takeString(config, ["userAgent"], state, basePath),
2586
+ includePlatformInfo: takeBoolean(config, ["includePlatformHeaders"], state, basePath),
2587
+ allowAppInfo: takeBoolean(config, ["allowUserAgentAppInfo"], state, basePath)
2588
+ });
2589
+ if (Object.keys(userAgent).length) client.userAgent = userAgent;
2590
+ const offsetSemantics = takeEnum(
2591
+ config,
2592
+ ["offsetSemantics"],
2593
+ ["item-index", "page-index"],
2594
+ state,
2595
+ basePath
2596
+ );
2597
+ if (offsetSemantics !== void 0) client.offsetSemantics = offsetSemantics;
2501
2598
  const maxRetries = takeNumber(config, ["maxRetries"], state, basePath);
2502
2599
  const statusCodeProfile = takeEnum(
2503
2600
  config,
@@ -2515,7 +2612,10 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2515
2612
  const pythonClient = language === "python" ? takeObject(config, ["client"], state, basePath) : void 0;
2516
2613
  const typescriptNaming = language === "typescript" || language === "mcp" ? takeObject(config, ["naming"], state, basePath) : void 0;
2517
2614
  const directClientName = takeString(config, ["clientName", "clientClassName"], state, basePath);
2518
- const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) : void 0;
2615
+ const nestedClientName = pythonClient ? takeString(pythonClient.value, ["className"], state, pythonClient.path) : typescriptNaming ? takeString(typescriptNaming.value, ["client"], state, typescriptNaming.path) : language === "ruby" ? (
2616
+ // Fern's Ruby generator renames the root client class (`Auth0::Management`) with it.
2617
+ takeString(config, ["clientModuleName"], state, basePath)
2618
+ ) : void 0;
2519
2619
  const directExportedClientName = takeString(
2520
2620
  config,
2521
2621
  ["exportedClientName", "exportedClientClassName"],
@@ -2557,8 +2657,6 @@ function mapCommonConfig(language, config, state, client, generation, packageCon
2557
2657
  const streams = mapTypescriptStreams(config, state, basePath);
2558
2658
  if (streams) generation.streams = streams;
2559
2659
  }
2560
- const generateFullProject = takeBoolean(config, ["generateFullProject"], state, basePath);
2561
- if (generateFullProject !== void 0) generation.generateFullProject = generateFullProject;
2562
2660
  const inlineTypes = takeBoolean(config, ["enableInlineTypes"], state, basePath);
2563
2661
  const omitUndefined = takeBoolean(config, ["omitUndefined"], state, basePath);
2564
2662
  const forwardEnums = takeBoolean(config, ["enableForwardCompatibleEnums"], state, basePath);
@@ -2788,6 +2886,8 @@ function mapComposerRequirements(manifest, state, packageConfig) {
2788
2886
  function mapRuby(config, state, packageConfig, basePath) {
2789
2887
  const moduleName = takeString(config, ["moduleName"], state, basePath);
2790
2888
  if (moduleName !== void 0) packageConfig.moduleName = moduleName;
2889
+ const packageName = takeString(config, ["package-name"], state, basePath);
2890
+ if (packageName !== void 0) packageConfig.packageName = packageName;
2791
2891
  return compact({ requirePaths: takeStringArray(config, ["requirePaths"], state, basePath) });
2792
2892
  }
2793
2893
  function mapRust(config, state, packageConfig, basePath) {
@@ -3094,71 +3194,90 @@ function takeToolsets(value, aliases, state, basePath) {
3094
3194
  return Object.fromEntries(entries.filter((entry) => entry !== void 0));
3095
3195
  }
3096
3196
  var unsupportedFieldSchema = z.strictObject({
3097
- source: z.enum(["fern", "postman", "sdk-config-ir"]),
3098
- path: z.array(z.union([nonEmptyStringSchema, z.number().int().nonnegative()])).min(1),
3099
- code: nonEmptyStringSchema.optional(),
3100
- reason: nonEmptyStringSchema,
3101
- severity: z.enum(["error", "warning", "info"]),
3102
- risk: z.enum(["high", "medium", "low"]),
3103
- owner: nonEmptyStringSchema,
3104
- suggestedAction: nonEmptyStringSchema
3197
+ source: z.enum(["fern", "postman", "sdk-config-ir"]).describe("The configuration surface containing the unsupported field."),
3198
+ path: z.array(z.union([nonEmptyStringSchema, z.number().int().nonnegative()])).min(1).describe("The property path to the unsupported field in its source configuration."),
3199
+ code: nonEmptyStringSchema.optional().describe("A stable diagnostic code for the unsupported field."),
3200
+ reason: nonEmptyStringSchema.describe(
3201
+ "Why the field could not be represented in normalized configuration."
3202
+ ),
3203
+ severity: z.enum(["error", "warning", "info"]).describe("The diagnostic severity."),
3204
+ risk: z.enum(["high", "medium", "low"]).describe("The migration risk of omitting this field."),
3205
+ owner: nonEmptyStringSchema.describe("The component or team responsible for resolving the gap."),
3206
+ suggestedAction: nonEmptyStringSchema.describe(
3207
+ "Recommended action for preserving the intended behavior."
3208
+ )
3105
3209
  });
3106
3210
  var postmanLegacyInputSchema = z.strictObject({
3107
- kind: z.literal("postman-build-parameters"),
3108
- value: jsonObjectSchema
3211
+ kind: z.literal("postman-build-parameters").describe("Identifies legacy Postman build parameters."),
3212
+ value: jsonObjectSchema.describe("A debugging copy of the original Postman build parameters.")
3109
3213
  });
3110
3214
  var fernLegacyInputSchema = z.strictObject({
3111
- kind: z.literal("fern-generator-invocation"),
3112
- value: jsonObjectSchema
3215
+ kind: z.literal("fern-generator-invocation").describe("Identifies a legacy Fern generator invocation."),
3216
+ value: jsonObjectSchema.describe("A debugging copy of the original Fern generator invocation.")
3113
3217
  });
3114
3218
  var legacyInputSchema = z.discriminatedUnion("kind", [
3115
3219
  postmanLegacyInputSchema,
3116
3220
  fernLegacyInputSchema
3117
3221
  ]);
3118
3222
  var compatibilityConfigSchema = z.strictObject({
3119
- outputProfile: z.enum(["converged", "postman-legacy", "fern-legacy"]),
3120
- legacyInput: legacyInputSchema.optional(),
3121
- unsupportedFields: z.array(unsupportedFieldSchema).optional()
3223
+ outputProfile: z.enum(["converged", "postman-legacy", "fern-legacy"]).describe("The output-default profile retained while legacy producers converge."),
3224
+ legacyInput: legacyInputSchema.optional().describe("Original producer input retained only for migration debugging."),
3225
+ unsupportedFields: z.array(unsupportedFieldSchema).optional().describe("Legacy fields that could not be represented in normalized configuration.")
3122
3226
  });
3123
3227
  var generationAssetSchema = z.discriminatedUnion("type", [
3124
- z.strictObject({ type: z.literal("path"), location: relativePathSchema }),
3125
- z.strictObject({ type: z.literal("url"), location: nonEmptyStringSchema }),
3126
- z.strictObject({ type: z.literal("artifact"), location: nonEmptyStringSchema })
3228
+ z.strictObject({
3229
+ type: z.literal("path").describe("Loads the generation asset from a relative path."),
3230
+ location: relativePathSchema.describe("The relative path to the generation asset.")
3231
+ }),
3232
+ z.strictObject({
3233
+ type: z.literal("url").describe("Loads the generation asset from a URL."),
3234
+ location: nonEmptyStringSchema.describe("The URL of the generation asset.")
3235
+ }),
3236
+ z.strictObject({
3237
+ type: z.literal("artifact").describe("Loads the generation asset from stored build output."),
3238
+ location: nonEmptyStringSchema.describe("The artifact identifier or location.")
3239
+ })
3127
3240
  ]);
3128
- var hookDependencySchema2 = z.strictObject({
3129
- name: nonEmptyStringSchema,
3130
- version: nonEmptyStringSchema,
3131
- groupId: nonEmptyStringSchema.optional()
3241
+ var hookDependencySchema = z.strictObject({
3242
+ name: nonEmptyStringSchema.describe("The hook dependency name."),
3243
+ version: nonEmptyStringSchema.describe("The hook dependency version requirement."),
3244
+ groupId: nonEmptyStringSchema.optional().describe("The Maven group identifier for the dependency.")
3132
3245
  });
3133
- var hooksConfigSchema2 = z.strictObject({
3134
- enabled: z.boolean(),
3135
- source: generationAssetSchema.optional(),
3136
- dependencies: z.array(hookDependencySchema2).optional()
3246
+ var hooksConfigSchema = z.strictObject({
3247
+ enabled: z.boolean().describe("Whether custom request and response hooks are generated."),
3248
+ source: generationAssetSchema.optional().describe("The source containing custom hook implementations."),
3249
+ dependencies: z.array(hookDependencySchema).optional().describe("Dependencies required by custom hooks.")
3137
3250
  });
3138
3251
  var customCodeConfigSchema2 = z.strictObject({
3139
- enabled: z.boolean(),
3140
- source: generationAssetSchema.optional(),
3141
- conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional(),
3142
- trackChanges: z.boolean().optional(),
3143
- previousBuildId: z.number().int().positive().optional(),
3144
- protectedFiles: z.array(nonEmptyStringSchema).optional()
3252
+ enabled: z.boolean().describe("Whether customer-authored code is merged into generated output."),
3253
+ source: generationAssetSchema.optional().describe("The source containing customer-authored code."),
3254
+ conflictStrategy: z.enum(["mark", "ours", "theirs"]).optional().describe("How merge conflicts between generated and custom code are handled."),
3255
+ trackChanges: z.boolean().optional().describe("Whether custom-code changes are tracked between builds."),
3256
+ previousBuildId: z.number().int().positive().optional().describe("The previous build used as the merge baseline."),
3257
+ protectedFiles: z.array(nonEmptyStringSchema).optional().describe("Generated file paths that custom-code merging must not overwrite.")
3145
3258
  });
3146
- var workflowConfigSchema2 = z.strictObject({
3147
- path: relativePathSchema,
3148
- outputName: nonEmptyStringSchema.optional()
3259
+ var workflowConfigSchema = z.strictObject({
3260
+ path: relativePathSchema.describe("The relative path to the workflow definition."),
3261
+ outputName: nonEmptyStringSchema.optional().describe("The file name used for the generated workflow.")
3149
3262
  });
3150
3263
  var analyticsHeaderSchema2 = z.union([
3151
- z.strictObject({ name: nonEmptyStringSchema, value: z.string() }),
3152
- z.strictObject({ name: nonEmptyStringSchema, valueRef: nonEmptyStringSchema })
3264
+ z.strictObject({
3265
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
3266
+ value: z.string().describe("The literal telemetry header value.")
3267
+ }),
3268
+ z.strictObject({
3269
+ name: nonEmptyStringSchema.describe("The exported telemetry header name."),
3270
+ valueRef: nonEmptyStringSchema.describe("A reference to the telemetry header value.")
3271
+ })
3153
3272
  ]);
3154
3273
  var analyticsConfigSchema2 = z.strictObject({
3155
- enabled: z.boolean(),
3156
- endpoint: nonEmptyStringSchema.optional(),
3157
- exporter: z.enum(["otlp-http", "console"]).optional(),
3158
- headers: z.array(analyticsHeaderSchema2).optional(),
3159
- batchSize: z.number().int().positive().optional(),
3160
- scheduledDelayMs: z.number().nonnegative().optional(),
3161
- exportTimeoutMs: z.number().nonnegative().optional()
3274
+ enabled: z.boolean().describe("Whether generated clients export usage telemetry."),
3275
+ endpoint: nonEmptyStringSchema.optional().describe("The telemetry export endpoint."),
3276
+ exporter: z.enum(["otlp-http", "console"]).optional().describe("The telemetry exporter implementation."),
3277
+ headers: z.array(analyticsHeaderSchema2).optional().describe("Headers sent by the telemetry exporter."),
3278
+ batchSize: z.number().int().positive().optional().describe("The maximum spans in each export batch."),
3279
+ scheduledDelayMs: z.number().nonnegative().optional().describe("The delay between scheduled exports, in milliseconds."),
3280
+ exportTimeoutMs: z.number().nonnegative().optional().describe("The maximum time allowed for an export, in milliseconds.")
3162
3281
  }).superRefine(({ enabled, endpoint }, context) => {
3163
3282
  if (enabled && endpoint === void 0) {
3164
3283
  context.addIssue({
@@ -3169,91 +3288,93 @@ var analyticsConfigSchema2 = z.strictObject({
3169
3288
  }
3170
3289
  });
3171
3290
  var wireTestsSchema2 = z.strictObject({
3172
- enabled: z.boolean(),
3173
- exclusions: z.array(nonEmptyStringSchema).optional(),
3174
- fallbackToGeneratedErrorExamples: z.boolean().optional(),
3175
- fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional()
3291
+ enabled: z.boolean().describe("Whether wire-level request and response tests are generated."),
3292
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from wire tests."),
3293
+ fallbackToGeneratedErrorExamples: z.boolean().optional().describe("Whether missing error fixtures are synthesized from generated examples."),
3294
+ fixtureSource: z.enum(["synthetic", "recorded", "auto"]).optional().describe("Where wire-test fixtures are obtained.")
3176
3295
  });
3177
3296
  var unitTestsSchema2 = z.strictObject({
3178
- enabled: z.boolean(),
3179
- mode: z.enum(["core-runtime", "schema-driven", "both"]).optional(),
3180
- exclusions: z.array(nonEmptyStringSchema).optional()
3297
+ enabled: z.boolean().describe("Whether SDK unit tests are generated."),
3298
+ mode: z.enum(["core-runtime", "schema-driven", "both"]).optional().describe("The unit-test generation strategy."),
3299
+ exclusions: z.array(nonEmptyStringSchema).optional().describe("Operations excluded from unit tests.")
3181
3300
  });
3182
3301
  var fernDefinitionMetadataSchema = z.strictObject({
3183
- definitionS3DownloadUrl: nonEmptyStringSchema,
3184
- outputPath: nonEmptyStringSchema.optional(),
3185
- cliVersion: nonEmptyStringSchema.optional()
3302
+ definitionS3DownloadUrl: nonEmptyStringSchema.describe(
3303
+ "The download URL for the materialized Fern definition archive."
3304
+ ),
3305
+ outputPath: nonEmptyStringSchema.optional().describe("The destination path for Fern definition support files."),
3306
+ cliVersion: nonEmptyStringSchema.optional().describe("The Fern CLI version associated with the definition.")
3186
3307
  });
3187
3308
  var streamsSchema2 = z.strictObject({
3188
- enabled: z.boolean(),
3189
- responseType: z.enum(["wrapper", "native", "web"]).optional(),
3190
- fileResponseType: z.enum(["stream", "binary-response"]).optional(),
3191
- defaultChunkSizeBytes: z.number().int().positive().optional()
3309
+ enabled: z.boolean().describe("Whether generated clients expose streaming response APIs."),
3310
+ responseType: z.enum(["wrapper", "native", "web"]).optional().describe("The streaming response abstraction exposed by generated clients."),
3311
+ fileResponseType: z.enum(["stream", "binary-response"]).optional().describe("The response type used for file downloads."),
3312
+ defaultChunkSizeBytes: z.number().int().positive().optional().describe("The default number of bytes yielded by streaming iterators.")
3192
3313
  });
3193
3314
  var layoutConfigSchema2 = z.strictObject({
3194
- outputDirectory: z.enum(["project-root", "source-root"]).optional(),
3195
- packagePath: nonEmptyStringSchema.optional()
3315
+ outputDirectory: z.enum(["project-root", "source-root"]).optional().describe("Whether generated source is rooted at the project or its source directory."),
3316
+ packagePath: nonEmptyStringSchema.optional().describe("The package-relative path for generated source files.")
3196
3317
  });
3197
3318
  var serializationConfigSchema2 = z.strictObject({
3198
- enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional(),
3199
- additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional(),
3200
- inlineTypes: z.boolean().optional(),
3201
- omitUndefined: z.boolean().optional()
3319
+ enumRepresentation: z.enum(["enum", "union", "literal", "forward-compatible-enum", "language-default"]).optional().describe("How schema enums are represented in generated code."),
3320
+ additionalProperties: z.enum(["allow", "forbid", "ignore", "language-default"]).optional().describe("How undeclared object properties are handled."),
3321
+ inlineTypes: z.boolean().optional().describe("Whether inline schemas remain nested under their parent types."),
3322
+ omitUndefined: z.boolean().optional().describe("Whether undefined properties are omitted during serialization.")
3202
3323
  });
3203
3324
  var languageGenerationConfigSchema = z.strictObject({
3204
- typescript: typescriptGenerationConfigSchema.optional(),
3205
- python: pythonGenerationConfigSchema.optional(),
3206
- java: javaGenerationConfigSchema.optional(),
3207
- kotlin: kotlinGenerationConfigSchema.optional(),
3208
- go: goGenerationConfigSchema.optional(),
3209
- csharp: csharpGenerationConfigSchema.optional(),
3210
- php: phpGenerationConfigSchema.optional(),
3211
- ruby: rubyGenerationConfigSchema.optional(),
3212
- rust: rustGenerationConfigSchema.optional(),
3213
- cli: cliGenerationConfigSchema.optional(),
3214
- mcp: mcpGenerationConfigSchema.optional(),
3215
- swift: swiftGenerationConfigSchema.optional(),
3216
- terraform: terraformGenerationConfigSchema.optional()
3325
+ typescript: typescriptGenerationConfigSchema.optional().describe("TypeScript-specific generation settings."),
3326
+ python: pythonGenerationConfigSchema.optional().describe("Python-specific generation settings."),
3327
+ java: javaGenerationConfigSchema.optional().describe("Java-specific generation settings."),
3328
+ kotlin: kotlinGenerationConfigSchema.optional().describe("Kotlin-specific generation settings."),
3329
+ go: goGenerationConfigSchema.optional().describe("Go-specific generation settings."),
3330
+ csharp: csharpGenerationConfigSchema.optional().describe("C#-specific generation settings."),
3331
+ php: phpGenerationConfigSchema.optional().describe("PHP-specific generation settings."),
3332
+ ruby: rubyGenerationConfigSchema.optional().describe("Ruby-specific generation settings."),
3333
+ rust: rustGenerationConfigSchema.optional().describe("Rust-specific generation settings."),
3334
+ cli: cliGenerationConfigSchema.optional().describe("CLI-specific generation settings."),
3335
+ mcp: mcpGenerationConfigSchema.optional().describe("MCP-specific generation settings."),
3336
+ swift: swiftGenerationConfigSchema.optional().describe("Swift-specific generation settings."),
3337
+ terraform: terraformGenerationConfigSchema.optional().describe("Terraform-specific generation settings.")
3217
3338
  });
3218
3339
  var generationConfigSchema = z.strictObject({
3219
- includeWatermark: z.boolean().default(false),
3340
+ includeWatermark: z.boolean().default(false).describe("Whether generated files include a generator watermark."),
3220
3341
  /** Emits an AI service into the generated SDK. Python, Java and TypeScript honour it. */
3221
- ai: z.boolean().default(false),
3222
- includeOptionalSnippetParameters: z.boolean().optional(),
3223
- buildAllModels: z.boolean().default(false),
3224
- inferServiceNames: z.boolean().default(false),
3225
- includeDeprecatedOperations: z.boolean().default(true),
3226
- multipleResponses: z.boolean().default(false),
3342
+ ai: z.boolean().default(false).describe("Whether the SDK includes generated AI service helpers."),
3343
+ includeOptionalSnippetParameters: z.boolean().optional().describe("Whether usage snippets include optional request parameters."),
3344
+ buildAllModels: z.boolean().default(false).describe("Whether models not referenced by operations are also generated."),
3345
+ inferServiceNames: z.boolean().default(false).describe("Whether service names are inferred from API structure."),
3346
+ includeDeprecatedOperations: z.boolean().default(true).describe("Whether deprecated API operations are generated."),
3347
+ multipleResponses: z.boolean().default(false).describe("Whether operations model multiple successful response types."),
3227
3348
  /** Generate the entire SDK project, including package manifests and publishable artifacts. */
3228
- generateFullProject: z.boolean().default(false),
3229
- devContainer: z.boolean().default(false),
3230
- allowMockClient: z.boolean().default(false),
3231
- ignoreFiles: z.array(nonEmptyStringSchema).optional(),
3349
+ generateFullProject: z.boolean().default(false).describe("Whether generation emits a complete publishable project."),
3350
+ devContainer: z.boolean().default(false).describe("Whether development-container configuration is generated."),
3351
+ allowMockClient: z.boolean().default(false).describe("Whether a mock API client is included in the generated SDK."),
3352
+ ignoreFiles: z.array(nonEmptyStringSchema).optional().describe("Generated paths excluded from the final output."),
3232
3353
  /**
3233
3354
  * Raw .fernignore file contents supplied to external publishers that need Fern ignore semantics.
3234
3355
  * This is separate from generation.ignoreFiles because raw contents preserve comments, ordering,
3235
3356
  * blank lines, and negation rules.
3236
3357
  */
3237
- fernignoreContents: z.string().optional(),
3358
+ fernignoreContents: z.string().optional().describe("The raw .fernignore contents retained for external publishers."),
3238
3359
  /**
3239
3360
  * Optional Fern definition metadata for publisher paths that need to write definition or
3240
3361
  * mock-server support files. This is not required for core GitHub artifact publishing.
3241
3362
  */
3242
- fernDefinitionMetadata: fernDefinitionMetadataSchema.optional(),
3243
- reservedKeywords: z.array(nonEmptyStringSchema).optional(),
3244
- hooks: hooksConfigSchema2.optional(),
3245
- customCode: customCodeConfigSchema2.optional(),
3246
- workflows: z.array(workflowConfigSchema2).optional(),
3247
- customQueryPaths: z.array(relativePathSchema).optional(),
3248
- analytics: analyticsConfigSchema2.optional(),
3249
- wireTests: wireTestsSchema2.optional(),
3250
- unitTests: unitTestsSchema2.optional(),
3251
- webSockets: z.boolean().optional(),
3252
- streams: streamsSchema2.optional(),
3253
- naming: namingConfigSchema.optional(),
3254
- layout: layoutConfigSchema2.optional(),
3255
- serialization: serializationConfigSchema2.optional(),
3256
- language: languageGenerationConfigSchema.optional()
3363
+ fernDefinitionMetadata: fernDefinitionMetadataSchema.optional().describe("Materialized Fern definition metadata used by external publishers."),
3364
+ reservedKeywords: z.array(nonEmptyStringSchema).optional().describe("Additional identifiers treated as reserved words."),
3365
+ hooks: hooksConfigSchema.optional().describe("Custom SDK request and response hook configuration."),
3366
+ customCode: customCodeConfigSchema2.optional().describe("Customer-authored code merge configuration."),
3367
+ workflows: z.array(workflowConfigSchema).optional().describe("Workflow definitions included in generated output."),
3368
+ customQueryPaths: z.array(relativePathSchema).optional().describe("Relative paths to custom query definitions."),
3369
+ analytics: analyticsConfigSchema2.optional().describe("Generated client telemetry configuration."),
3370
+ wireTests: wireTestsSchema2.optional().describe("Wire-level request and response test generation."),
3371
+ unitTests: unitTestsSchema2.optional().describe("SDK unit-test generation."),
3372
+ webSockets: z.boolean().optional().describe("Whether WebSocket clients are generated for supported channels."),
3373
+ streams: streamsSchema2.optional().describe("Streaming response generation behavior."),
3374
+ naming: namingConfigSchema.optional().describe("Names and casing used by generated code."),
3375
+ layout: layoutConfigSchema2.optional().describe("Generated project and source layout."),
3376
+ serialization: serializationConfigSchema2.optional().describe("Generated model serialization behavior."),
3377
+ language: languageGenerationConfigSchema.optional().describe("Settings specific to the selected target language.")
3257
3378
  });
3258
3379
  var publishRegistrySchema = z.enum([
3259
3380
  "npm",
@@ -3271,154 +3392,160 @@ var credentialResolutionSchema = z.enum([
3271
3392
  "resolved-by-fiddle"
3272
3393
  ]);
3273
3394
  var registryCredentialsSchema = z.strictObject({
3274
- username: nonEmptyStringSchema.optional(),
3275
- password: nonEmptyStringSchema.optional(),
3276
- token: nonEmptyStringSchema.optional(),
3277
- apiKey: nonEmptyStringSchema.optional()
3395
+ username: nonEmptyStringSchema.optional().describe("The resolved credential username."),
3396
+ password: nonEmptyStringSchema.optional().describe("The resolved credential password."),
3397
+ token: nonEmptyStringSchema.optional().describe("The resolved credential token."),
3398
+ apiKey: nonEmptyStringSchema.optional().describe("The resolved credential API key.")
3278
3399
  });
3279
3400
  var commonPublishShape2 = {
3280
- url: nonEmptyStringSchema.optional(),
3401
+ url: nonEmptyStringSchema.optional().describe("A custom package registry URL."),
3281
3402
  /** Reference to registry publishing credentials. */
3282
- credentialsRef: nonEmptyStringSchema.optional(),
3403
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to registry publishing credentials."),
3283
3404
  /** Raw registry credentials. These values can be sensitive and must be handled as secrets. */
3284
- credentials: registryCredentialsSchema.optional(),
3405
+ credentials: registryCredentialsSchema.optional().describe("Resolved registry publishing credentials."),
3285
3406
  /**
3286
3407
  * Registry-specific package version override. If omitted, the external publisher/orchestrator may
3287
3408
  * fall back to target.sdkVersion.
3288
3409
  */
3289
- version: nonEmptyStringSchema.optional(),
3290
- releaseBranch: nonEmptyStringSchema.optional(),
3291
- tolerateRepublish: z.boolean().optional(),
3410
+ version: nonEmptyStringSchema.optional().describe("A registry-specific package version override."),
3411
+ releaseBranch: nonEmptyStringSchema.optional().describe("The branch used by generated package release workflows."),
3412
+ tolerateRepublish: z.boolean().optional().describe("Whether publishing succeeds when this package version already exists."),
3292
3413
  /** Generate registry publishing workflow files when publishing through GitHub delivery. */
3293
- shouldGeneratePublishWorkflow: z.boolean().optional()
3414
+ shouldGeneratePublishWorkflow: z.boolean().optional().describe("Whether GitHub delivery includes a registry publishing workflow.")
3294
3415
  };
3295
3416
  var trustedPublishingShape = {
3296
3417
  /** Use registry trusted publishing / OIDC instead of a static token secret. */
3297
- trustedPublishing: z.boolean().optional()
3418
+ trustedPublishing: z.boolean().optional().describe("Whether registry publication uses trusted publishing or OIDC.")
3298
3419
  };
3299
3420
  var mavenCoordinateSchema = nonEmptyStringSchema.regex(
3300
3421
  /^[A-Za-z0-9_.-]+:[A-Za-z0-9_.-]+$/,
3301
3422
  "Maven coordinate must be in groupId:artifactId form"
3302
3423
  );
3303
3424
  var mavenSignatureEnvironmentSchema = z.strictObject({
3304
- keyIdEnvironmentVariable: nonEmptyStringSchema.optional(),
3305
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3306
- secretKeyEnvironmentVariable: nonEmptyStringSchema.optional()
3425
+ keyIdEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key ID."),
3426
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the signing key password."),
3427
+ secretKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the armored secret key.")
3307
3428
  });
3308
3429
  var mavenSignatureSchema2 = z.strictObject({
3309
- keyId: nonEmptyStringSchema,
3310
- password: nonEmptyStringSchema,
3311
- secretKey: nonEmptyStringSchema
3430
+ keyId: nonEmptyStringSchema.describe("The resolved signing key identifier."),
3431
+ password: nonEmptyStringSchema.describe("The resolved signing key password."),
3432
+ secretKey: nonEmptyStringSchema.describe("The resolved armored secret key.")
3312
3433
  });
3313
3434
  var publishConfigSchema = z.discriminatedUnion("registry", [
3314
3435
  z.strictObject({
3315
- registry: z.literal("npm"),
3436
+ registry: z.literal("npm").describe("Publishes the package to an npm-compatible registry."),
3316
3437
  /** Environment variable name containing the npm registry token. */
3317
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
3438
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the npm registry token."),
3318
3439
  /** Write npm package metadata as private when the publisher creates/updates package.json. */
3319
- isPackagePrivate: z.boolean().optional(),
3440
+ isPackagePrivate: z.boolean().optional().describe("Whether generated npm package metadata marks the package as private."),
3320
3441
  /** Also publish the TypeScript package to JSR from the npm publishing path. */
3321
- publishToJsr: z.boolean().optional(),
3442
+ publishToJsr: z.boolean().optional().describe("Whether the npm publishing flow also publishes the package to JSR."),
3322
3443
  ...trustedPublishingShape,
3323
3444
  ...commonPublishShape2
3324
3445
  }),
3325
3446
  z.strictObject({
3326
- registry: z.literal("pypi"),
3327
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
3328
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3447
+ registry: z.literal("pypi").describe("Publishes the package to a PyPI-compatible registry."),
3448
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI username."),
3449
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the PyPI password or token."),
3329
3450
  ...trustedPublishingShape,
3330
3451
  ...commonPublishShape2
3331
3452
  }),
3332
3453
  z.strictObject({
3333
- registry: z.literal("nuget"),
3334
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
3454
+ registry: z.literal("nuget").describe("Publishes the package to a NuGet-compatible registry."),
3455
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the NuGet API key."),
3335
3456
  ...trustedPublishingShape,
3336
3457
  ...commonPublishShape2
3337
3458
  }),
3338
3459
  z.strictObject({
3339
- registry: z.literal("rubygems"),
3340
- apiKeyEnvironmentVariable: nonEmptyStringSchema.optional(),
3460
+ registry: z.literal("rubygems").describe("Publishes the package to a RubyGems-compatible registry."),
3461
+ apiKeyEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the RubyGems API key."),
3462
+ ...commonPublishShape2
3463
+ }),
3464
+ z.strictObject({
3465
+ registry: z.literal("crates").describe("Publishes the crate to a Cargo-compatible registry."),
3466
+ tokenEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Cargo registry token."),
3467
+ ...commonPublishShape2
3468
+ }),
3469
+ z.strictObject({
3470
+ registry: z.literal("go").describe("Publishes the SDK as a Go module."),
3341
3471
  ...commonPublishShape2
3342
3472
  }),
3343
3473
  z.strictObject({
3344
- registry: z.literal("crates"),
3345
- tokenEnvironmentVariable: nonEmptyStringSchema.optional(),
3474
+ registry: z.literal("composer").describe("Publishes the package to a Composer-compatible registry."),
3346
3475
  ...commonPublishShape2
3347
3476
  }),
3348
- z.strictObject({ registry: z.literal("go"), ...commonPublishShape2 }),
3349
- z.strictObject({ registry: z.literal("composer"), ...commonPublishShape2 }),
3350
3477
  z.strictObject({
3351
- registry: z.literal("maven"),
3478
+ registry: z.literal("maven").describe("Publishes the package to a Maven-compatible repository."),
3352
3479
  /** Maven coordinate in groupId:artifactId form when consumers need the combined value. */
3353
- coordinate: mavenCoordinateSchema.optional(),
3354
- usernameEnvironmentVariable: nonEmptyStringSchema.optional(),
3355
- passwordEnvironmentVariable: nonEmptyStringSchema.optional(),
3356
- mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional(),
3357
- signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional(),
3480
+ coordinate: mavenCoordinateSchema.optional().describe("The Maven coordinate in groupId:artifactId form."),
3481
+ usernameEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven username."),
3482
+ passwordEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven password."),
3483
+ mavenUrlEnvironmentVariable: nonEmptyStringSchema.optional().describe("The environment variable containing the Maven repository URL."),
3484
+ signatureEnvironmentVariables: mavenSignatureEnvironmentSchema.optional().describe("Environment variables containing Maven signing material."),
3358
3485
  /** Reference to Maven signing credentials. */
3359
- signingCredentialsRef: nonEmptyStringSchema.optional(),
3486
+ signingCredentialsRef: nonEmptyStringSchema.optional().describe("A reference to Maven signing credentials."),
3360
3487
  /** Raw Maven signing material. These values can be sensitive and must be handled as secrets. */
3361
- signature: mavenSignatureSchema2.optional(),
3488
+ signature: mavenSignatureSchema2.optional().describe("Resolved Maven signing material."),
3362
3489
  ...commonPublishShape2
3363
3490
  })
3364
3491
  ]);
3365
3492
  var reviewersSchema2 = z.strictObject({
3366
- teams: z.array(nonEmptyStringSchema).optional(),
3367
- users: z.array(nonEmptyStringSchema).optional()
3493
+ teams: z.array(nonEmptyStringSchema).optional().describe("GitHub teams requested as reviewers."),
3494
+ users: z.array(nonEmptyStringSchema).optional().describe("GitHub users requested as reviewers.")
3368
3495
  });
3369
3496
  var replayControlSchema = z.strictObject({
3370
- enabled: z.boolean()
3497
+ enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
3371
3498
  });
3372
3499
  var githubLicenseSchema = z.strictObject({
3373
3500
  /** SPDX identifier or license key for the repository license (for example, "MIT"). */
3374
- type: nonEmptyStringSchema.optional(),
3501
+ type: nonEmptyStringSchema.optional().describe("The SPDX identifier or license key for the repository license."),
3375
3502
  /** Path to a custom license file to be committed into the GitHub repository. */
3376
- customPath: nonEmptyStringSchema.optional()
3503
+ customPath: nonEmptyStringSchema.optional().describe("The path to a custom license file committed to the repository.")
3377
3504
  }).refine((value) => value.type !== void 0 || value.customPath !== void 0, {
3378
3505
  message: "GitHub license must set type or customPath"
3379
3506
  });
3380
3507
  var githubOutputSchema2 = z.strictObject({
3381
- repository: nonEmptyStringSchema,
3382
- host: nonEmptyStringSchema.optional(),
3383
- branch: nonEmptyStringSchema.optional(),
3384
- mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional(),
3385
- reviewers: reviewersSchema2.optional(),
3508
+ repository: nonEmptyStringSchema.describe("The GitHub repository that receives generated files."),
3509
+ host: nonEmptyStringSchema.optional().describe("The GitHub host for enterprise installations."),
3510
+ branch: nonEmptyStringSchema.optional().describe("The target branch for generated changes."),
3511
+ mode: z.enum(["release", "pull-request", "push", "commit", "commit-and-release"]).optional().describe("How generated changes are delivered to the repository."),
3512
+ reviewers: reviewersSchema2.optional().describe("Reviewers requested for generated pull requests."),
3386
3513
  /** Reference to GitHub credentials. */
3387
- credentialsRef: nonEmptyStringSchema.optional(),
3514
+ credentialsRef: nonEmptyStringSchema.optional().describe("A reference to GitHub credentials."),
3388
3515
  /** Raw GitHub credentials. These values can be sensitive and must be handled as secrets. */
3389
- credentials: registryCredentialsSchema.optional(),
3390
- privateRepository: z.boolean().optional(),
3516
+ credentials: registryCredentialsSchema.optional().describe("Resolved GitHub credentials."),
3517
+ privateRepository: z.boolean().optional().describe("Whether the destination repository is private."),
3391
3518
  /** GitHub license block scoped to repository delivery. */
3392
- license: githubLicenseSchema.optional(),
3519
+ license: githubLicenseSchema.optional().describe("License configuration for the destination repository."),
3393
3520
  /** GitHub replay control. If omitted, the external publisher applies its default behavior. */
3394
- replay: replayControlSchema.optional(),
3521
+ replay: replayControlSchema.optional().describe("Replay behavior for the external GitHub publisher."),
3395
3522
  /** Run GitHub publishing verification. Defaults to false to match current Fiddle job behavior. */
3396
- verify: z.boolean().default(false),
3523
+ verify: z.boolean().default(false).describe("Whether the GitHub publisher verifies the generated result."),
3397
3524
  /** Skip creating/updating a GitHub PR when no files changed. Defaults to false. */
3398
- skipIfNoDiff: z.boolean().default(false),
3525
+ skipIfNoDiff: z.boolean().default(false).describe("Whether GitHub publication is skipped when no generated files changed."),
3399
3526
  /** Automatically merge the GitHub publishing PR. Defaults to false. */
3400
- autoMerge: z.boolean().default(false)
3527
+ autoMerge: z.boolean().default(false).describe("Whether the GitHub publisher automatically merges its pull request.")
3401
3528
  });
3402
3529
  var credentialResolutionShape = {
3403
3530
  /** Where output credential references are resolved. */
3404
- credentialResolution: credentialResolutionSchema.default("refs-only")
3531
+ credentialResolution: credentialResolutionSchema.default("refs-only").describe("Where output credential references are resolved.")
3405
3532
  };
3406
3533
  var filesOutputSchema2 = z.strictObject({
3407
- delivery: z.literal("files"),
3408
- path: nonEmptyStringSchema.optional(),
3409
- publish: publishConfigSchema.optional(),
3534
+ delivery: z.literal("files").describe("Writes the generated SDK to a directory."),
3535
+ path: nonEmptyStringSchema.optional().describe("The destination directory for generated files."),
3536
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3410
3537
  ...credentialResolutionShape
3411
3538
  });
3412
3539
  var zipOutputSchema2 = z.strictObject({
3413
- delivery: z.literal("zip"),
3414
- fileName: nonEmptyStringSchema.optional(),
3415
- publish: publishConfigSchema.optional(),
3540
+ delivery: z.literal("zip").describe("Packages the generated SDK as a ZIP archive."),
3541
+ fileName: nonEmptyStringSchema.optional().describe("The generated ZIP archive file name."),
3542
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3416
3543
  ...credentialResolutionShape
3417
3544
  });
3418
3545
  var githubDeliverySchema2 = z.strictObject({
3419
- delivery: z.literal("github"),
3420
- github: githubOutputSchema2,
3421
- publish: publishConfigSchema.optional(),
3546
+ delivery: z.literal("github").describe("Delivers the generated SDK to GitHub."),
3547
+ github: githubOutputSchema2.describe("GitHub repository delivery settings."),
3548
+ publish: publishConfigSchema.optional().describe("Optional package registry publication."),
3422
3549
  ...credentialResolutionShape
3423
3550
  });
3424
3551
  var outputConfigSchema = z.discriminatedUnion(
@@ -3429,21 +3556,23 @@ var outputConfigSchema = z.discriminatedUnion(
3429
3556
  }
3430
3557
  );
3431
3558
  var replayConfigSchema = z.strictObject({
3432
- enabled: z.boolean()
3559
+ enabled: z.boolean().describe("Whether regeneration reapplies customer-authored repository changes.")
3433
3560
  });
3434
3561
  var sourceSpecConfigSchema = z.strictObject({
3435
- id: nonEmptyStringSchema.optional(),
3436
- name: nonEmptyStringSchema.optional(),
3437
- namespace: nonEmptyStringSchema.optional(),
3438
- specUrl: nonEmptyStringSchema,
3439
- specType: sourceSpecTypeSchema,
3440
- apiImportSettings: apiImportSettingsSchema.optional(),
3441
- overlays: z.array(nonEmptyStringSchema).optional(),
3442
- overrides: z.array(nonEmptyStringSchema).optional()
3562
+ id: nonEmptyStringSchema.optional().describe("A unique identifier for this API source."),
3563
+ name: nonEmptyStringSchema.optional().describe("A human-readable name for this API source."),
3564
+ namespace: nonEmptyStringSchema.optional().describe("A namespace used to isolate this source in a multi-source SDK."),
3565
+ specUrl: nonEmptyStringSchema.describe(
3566
+ "The materialized URL from which the generator retrieves the API source."
3567
+ ),
3568
+ specType: sourceSpecTypeSchema.describe("The API description format of this source."),
3569
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Import behavior that overrides the source-level defaults for this spec."),
3570
+ overlays: z.array(nonEmptyStringSchema).optional().describe("Materialized overlays applied to this source in order."),
3571
+ overrides: z.array(nonEmptyStringSchema).optional().describe("Materialized source overrides applied in order.")
3443
3572
  });
3444
3573
  var sourceConfigSchema = z.strictObject({
3445
- specs: z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec"),
3446
- apiImportSettings: apiImportSettingsSchema.optional()
3574
+ specs: z.array(sourceSpecConfigSchema).min(1, "source.specs must contain at least one source spec").describe("Materialized API sources in authoritative processing order."),
3575
+ apiImportSettings: apiImportSettingsSchema.optional().describe("Default import behavior shared by every source spec.")
3447
3576
  }).superRefine(({ specs }, context) => {
3448
3577
  const seenIds = /* @__PURE__ */ new Set();
3449
3578
  specs.forEach(({ id }, index) => {
@@ -3475,25 +3604,27 @@ var targetLanguageSchema = z.enum([
3475
3604
  "terraform"
3476
3605
  ]);
3477
3606
  var targetConfigSchema = z.strictObject({
3478
- language: targetLanguageSchema,
3479
- generatorVersion: exactSemverSchema.optional(),
3480
- sourceOrigin: z.enum(["postman", "fern"]),
3481
- sdkName: nonEmptyStringSchema,
3607
+ language: targetLanguageSchema.describe(
3608
+ "The language or platform generated by this single-target request."
3609
+ ),
3610
+ generatorVersion: exactSemverSchema.optional().describe("The exact generator version requested for this target."),
3611
+ sourceOrigin: z.enum(["postman", "fern"]).describe("The configuration system from which this IR was normalized."),
3612
+ sdkName: nonEmptyStringSchema.describe("The name used for the generated SDK."),
3482
3613
  /**
3483
3614
  * Stable Fern/Fiddle API identity for external publishing.
3484
3615
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
3485
3616
  * target.sdkName because SDK display names and Fern API names are not equivalent.
3486
3617
  */
3487
- apiName: nonEmptyStringSchema.optional(),
3488
- organization: nonEmptyStringSchema.optional(),
3618
+ apiName: nonEmptyStringSchema.optional().describe("The stable API identity used for external publishing."),
3619
+ organization: nonEmptyStringSchema.optional().describe("Source organization metadata retained for generation."),
3489
3620
  /**
3490
3621
  * Stable Fern/Fiddle organization identity for external publishing.
3491
3622
  * Producers must set this explicitly for GitHub or registry publishing; it is not inferred from
3492
3623
  * target.organization because source organization metadata is optional and may not match Fern.
3493
3624
  */
3494
- organizationName: nonEmptyStringSchema.optional(),
3495
- sdkVersion: nonEmptyStringSchema.default("1.0.0"),
3496
- apiVersion: nonEmptyStringSchema.optional()
3625
+ organizationName: nonEmptyStringSchema.optional().describe("The stable organization identity used for external publishing."),
3626
+ sdkVersion: nonEmptyStringSchema.default("1.0.0").describe("The version of the generated SDK."),
3627
+ apiVersion: nonEmptyStringSchema.optional().describe("The version of the API represented by the SDK.")
3497
3628
  });
3498
3629
 
3499
3630
  // src/sdk-config-ir/v1/sdk-config-ir-v1.ts
@@ -3555,17 +3686,21 @@ function validatePublishingIdentity2(packageConfig, registry, context) {
3555
3686
  }
3556
3687
  }
3557
3688
  var sdkConfigIrV1Schema = z.strictObject({
3558
- schemaVersion: z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION),
3559
- source: sourceConfigSchema,
3560
- target: targetConfigSchema,
3561
- api: apiConfigSchema,
3562
- client: clientConfigSchema,
3563
- package: packageConfigSchema,
3564
- output: outputConfigSchema,
3565
- replay: replayConfigSchema.optional(),
3566
- docs: docsConfigSchema,
3567
- generation: generationConfigSchema,
3568
- compatibility: compatibilityConfigSchema.optional()
3689
+ schemaVersion: z.literal(SDK_CONFIG_IR_V1_SCHEMA_VERSION).describe("The version of the normalized SDK Config IR schema."),
3690
+ source: sourceConfigSchema.describe("Materialized API descriptions consumed by generation."),
3691
+ target: targetConfigSchema.describe(
3692
+ "Identity and provenance for this single generation target."
3693
+ ),
3694
+ api: apiConfigSchema.describe("API behavior exposed by the generated SDK."),
3695
+ client: clientConfigSchema.describe("Behavior of the generated API client."),
3696
+ package: packageConfigSchema.describe("Package identity and metadata for the generated SDK."),
3697
+ output: outputConfigSchema.describe("Artifact delivery and optional package publication."),
3698
+ replay: replayConfigSchema.optional().describe("Generation replay behavior."),
3699
+ docs: docsConfigSchema.describe("Generated documentation settings."),
3700
+ generation: generationConfigSchema.describe(
3701
+ "Shared and language-specific generation behavior."
3702
+ ),
3703
+ compatibility: compatibilityConfigSchema.optional().describe("Temporary provenance and diagnostics retained during legacy migration.")
3569
3704
  }).superRefine(({ compatibility, generation, output, package: packageConfig, target }, context) => {
3570
3705
  const configuredLanguages = Object.keys(generation.language ?? {});
3571
3706
  const requiresExternalPublishIdentity = output.delivery === "github" || output.publish !== void 0;