Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"check:deps": "pnpm -r -F !./tests/smoke-tests -F !./sample-cap exec depcheck --ignores=\"nock,@jest/globals\" --quiet"
},
"devDependencies": {
"orval": "^7.13.2",
"orval": "^7.14.0",
"zod": "^3.25.76",
"@changesets/cli": "^2.29.7",
"@jest/globals": "^30.2.0",
Expand Down
46 changes: 25 additions & 21 deletions packages/prompt-registry/orval.config.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,28 @@
export const prompt_registry = {
output: {
client: 'zod',
mode: 'single',
target: './src/zod/prompt-registry.zod.ts',
override: {
header: info => [
`Generated by orval 🍺`,
`Do not edit manually.`,
...(info.title ? [info.title] : []),
...(info.description ? [info.description] : []),
...(info.version ? [`OpenAPI spec version: ${info.version}`] : [])
]
}
},
input: {
target: './src/spec/prompt-registry.yaml',
validation: false,
filters: {
mode: 'include',
schemas: ['PromptTemplatePostRequest']
const config = {
prompt_registry: {
output: {
client: 'zod',
mode: 'single',
target: './src/zod/prompt-registry.zod.ts',
override: {
header: info => [
`Generated by orval 🍺`,
`Do not edit manually.`,
...(info.title ? [info.title] : []),
...(info.description ? [info.description] : []),
...(info.version ? [`OpenAPI spec version: ${info.version}`] : [])
]
}
},
input: {
target: './src/spec/prompt-registry.yaml',
validation: false,
filters: {
mode: 'include',
schemas: ['PromptTemplatePostRequest']
}
}
}
};

export default config;
24 changes: 12 additions & 12 deletions packages/prompt-registry/src/zod/prompt-registry.zod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const registryControllerPromptControllerCreateUpdatePromptTemplateBody =
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -161,7 +161,7 @@ export const registryControllerPromptControllerCreateUpdatePromptTemplateBody =
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down Expand Up @@ -312,7 +312,7 @@ export const registryControllerPromptControllerListPromptTemplatesResponse =
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -357,7 +357,7 @@ export const registryControllerPromptControllerListPromptTemplatesResponse =
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down Expand Up @@ -492,7 +492,7 @@ export const registryControllerPromptControllerListPromptTemplateHistoryResponse
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -537,7 +537,7 @@ export const registryControllerPromptControllerListPromptTemplateHistoryResponse
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down Expand Up @@ -665,7 +665,7 @@ export const registryControllerPromptControllerGetPromptTemplateByUuidResponse =
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -710,7 +710,7 @@ export const registryControllerPromptControllerGetPromptTemplateByUuidResponse =
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down Expand Up @@ -924,7 +924,7 @@ export const registryControllerPromptControllerParsePromptTemplateByIdResponse =
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -969,7 +969,7 @@ export const registryControllerPromptControllerParsePromptTemplateByIdResponse =
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down Expand Up @@ -1149,7 +1149,7 @@ export const registryControllerPromptControllerParsePromptTemplateByNameVersionR
'The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
schema: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The schema for the response format, described as a JSON Schema object.'
Expand Down Expand Up @@ -1194,7 +1194,7 @@ export const registryControllerPromptControllerParsePromptTemplateByNameVersionR
'The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.'
),
parameters: zod
.record(zod.string(), zod.any())
.record(zod.string(), zod.unknown())
.optional()
.describe(
'The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format. Omitting `parameters` defines a function with an empty parameter list.'
Expand Down
Loading
Loading