Skip to content

Commit 4918761

Browse files
committed
feat: add params from the path if they are not already defined. technically off spec, but kind and friendly
1 parent a1ee32d commit 4918761

22 files changed

Lines changed: 78 additions & 30 deletions

__tests__/fixtures/docker/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:22:09.389Z
6+
* Generated on 2026-01-09T08:35:53.827Z
77
*
88
*/
99
/** eslint-disable max-classes */

__tests__/fixtures/docker/hono-valibot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:22:09.389Z
6+
* Generated on 2026-01-09T08:35:53.827Z
77
*
88
*/
99
import { validator } from "hono/validator";

__tests__/fixtures/docker/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:22:09.389Z
6+
* Generated on 2026-01-09T08:35:53.827Z
77
*
88
*/
99
import {

__tests__/fixtures/docker/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:22:09.389Z
6+
* Generated on 2026-01-09T08:35:53.827Z
77
*
88
*/
99
import type { Jsonifiable } from "type-fest";

__tests__/fixtures/docker/valibot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:22:09.389Z
6+
* Generated on 2026-01-09T08:35:53.827Z
77
*
88
*/
99
import * as v from "valibot";

__tests__/fixtures/openai/commands.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:23:27.053Z
6+
* Generated on 2026-01-09T08:35:34.785Z
77
*
88
*/
99
/** eslint-disable max-classes */
@@ -1628,7 +1628,7 @@ export class ModifyUserCommand extends Command<ModifyUserCommandInput, User> {
16281628
public override method = "post" as const;
16291629

16301630
constructor(input: ModifyUserCommandInput) {
1631-
const body = input;
1631+
const { user_id, ...body } = input;
16321632
super(`/organization/users/${user_id}`, jsonStringify(body));
16331633
}
16341634
}
@@ -1719,7 +1719,7 @@ export class ModifyProjectCommand extends Command<
17191719
public override method = "post" as const;
17201720

17211721
constructor(input: ModifyProjectCommandInput) {
1722-
const body = input;
1722+
const { project_id, ...body } = input;
17231723
super(`/organization/projects/${project_id}`, jsonStringify(body));
17241724
}
17251725
}
@@ -1811,7 +1811,7 @@ export class ModifyProjectUserCommand extends Command<
18111811
public override method = "post" as const;
18121812

18131813
constructor(input: ModifyProjectUserCommandInput) {
1814-
const body = input;
1814+
const { project_id, user_id, ...body } = input;
18151815
super(
18161816
`/organization/projects/${project_id}/users/${user_id}`,
18171817
jsonStringify(body),

__tests__/fixtures/openai/hono-valibot.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:23:27.053Z
6+
* Generated on 2026-01-09T08:35:34.785Z
77
*
88
*/
99
import { validator } from "hono/validator";
@@ -102,12 +102,15 @@ import {
102102
modifyMessageCommandBodySchema,
103103
modifyMessageCommandParamsSchema,
104104
modifyProjectCommandBodySchema,
105+
modifyProjectCommandParamsSchema,
105106
modifyProjectUserCommandBodySchema,
107+
modifyProjectUserCommandParamsSchema,
106108
modifyRunCommandBodySchema,
107109
modifyRunCommandParamsSchema,
108110
modifyThreadCommandBodySchema,
109111
modifyThreadCommandParamsSchema,
110112
modifyUserCommandBodySchema,
113+
modifyUserCommandParamsSchema,
111114
modifyVectorStoreCommandBodySchema,
112115
modifyVectorStoreCommandParamsSchema,
113116
retrieveBatchCommandParamsSchema,
@@ -539,6 +542,9 @@ export const modifyuser = [
539542
validator("json", (value) => {
540543
return v.parse(modifyUserCommandBodySchema, value);
541544
}),
545+
validator("param", (value) => {
546+
return v.parse(modifyUserCommandParamsSchema, value);
547+
}),
542548
] as const;
543549
export const deleteuser = [
544550
validator("param", (value) => {
@@ -564,6 +570,9 @@ export const modifyproject = [
564570
validator("json", (value) => {
565571
return v.parse(modifyProjectCommandBodySchema, value);
566572
}),
573+
validator("param", (value) => {
574+
return v.parse(modifyProjectCommandParamsSchema, value);
575+
}),
567576
] as const;
568577
export const archiveproject = [
569578
validator("param", (value) => {
@@ -595,6 +604,9 @@ export const modifyprojectuser = [
595604
validator("json", (value) => {
596605
return v.parse(modifyProjectUserCommandBodySchema, value);
597606
}),
607+
validator("param", (value) => {
608+
return v.parse(modifyProjectUserCommandParamsSchema, value);
609+
}),
598610
] as const;
599611
export const deleteprojectuser = [
600612
validator("param", (value) => {

__tests__/fixtures/openai/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:23:27.053Z
6+
* Generated on 2026-01-09T08:35:34.785Z
77
*
88
*/
99
import {

__tests__/fixtures/openai/types.ts

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:23:27.053Z
6+
* Generated on 2026-01-09T08:35:34.785Z
77
*
88
*/
99
import type { Jsonifiable } from "type-fest";
@@ -4152,8 +4152,12 @@ export type RetrieveUserCommandParams = {
41524152
user_id: string;
41534153
};
41544154
export type RetrieveUserCommandInput = RetrieveUserCommandParams;
4155+
export type ModifyUserCommandParams = {
4156+
user_id: string;
4157+
};
41554158
export type ModifyUserCommandBody = UserRoleUpdateRequest;
4156-
export type ModifyUserCommandInput = UserRoleUpdateRequest;
4159+
export type ModifyUserCommandInput = UserRoleUpdateRequest &
4160+
ModifyUserCommandParams;
41574161
export type DeleteUserCommandParams = {
41584162
user_id: string;
41594163
};
@@ -4170,8 +4174,12 @@ export type RetrieveProjectCommandParams = {
41704174
project_id: string;
41714175
};
41724176
export type RetrieveProjectCommandInput = RetrieveProjectCommandParams;
4177+
export type ModifyProjectCommandParams = {
4178+
project_id: string;
4179+
};
41734180
export type ModifyProjectCommandBody = ProjectUpdateRequest;
4174-
export type ModifyProjectCommandInput = ProjectUpdateRequest;
4181+
export type ModifyProjectCommandInput = ProjectUpdateRequest &
4182+
ModifyProjectCommandParams;
41754183
export type ArchiveProjectCommandParams = {
41764184
project_id: string;
41774185
};
@@ -4196,8 +4204,13 @@ export type RetrieveProjectUserCommandParams = {
41964204
user_id: string;
41974205
};
41984206
export type RetrieveProjectUserCommandInput = RetrieveProjectUserCommandParams;
4207+
export type ModifyProjectUserCommandParams = {
4208+
project_id: string;
4209+
user_id: string;
4210+
};
41994211
export type ModifyProjectUserCommandBody = ProjectUserUpdateRequest;
4200-
export type ModifyProjectUserCommandInput = ProjectUserUpdateRequest;
4212+
export type ModifyProjectUserCommandInput = ProjectUserUpdateRequest &
4213+
ModifyProjectUserCommandParams;
42014214
export type DeleteProjectUserCommandParams = {
42024215
project_id: string;
42034216
user_id: string;

__tests__/fixtures/openai/valibot.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* WARN: Do not edit directly.
55
*
6-
* Generated on 2026-01-09T08:23:27.053Z
6+
* Generated on 2026-01-09T08:35:34.785Z
77
*
88
*/
99
import * as v from "valibot";
@@ -6912,6 +6912,9 @@ export const retrieveUserCommandParamsSchema = v.strictObject({
69126912
user_id: v.string(),
69136913
});
69146914
export const modifyUserCommandBodySchema = userRoleUpdateRequestSchema;
6915+
export const modifyUserCommandParamsSchema = v.strictObject({
6916+
user_id: v.string(),
6917+
});
69156918
export const deleteUserCommandParamsSchema = v.strictObject({
69166919
user_id: v.string(),
69176920
});
@@ -6925,6 +6928,9 @@ export const retrieveProjectCommandParamsSchema = v.strictObject({
69256928
project_id: v.string(),
69266929
});
69276930
export const modifyProjectCommandBodySchema = projectUpdateRequestSchema;
6931+
export const modifyProjectCommandParamsSchema = v.strictObject({
6932+
project_id: v.string(),
6933+
});
69286934
export const archiveProjectCommandParamsSchema = v.strictObject({
69296935
project_id: v.string(),
69306936
});
@@ -6946,6 +6952,10 @@ export const retrieveProjectUserCommandParamsSchema = v.strictObject({
69466952
});
69476953
export const modifyProjectUserCommandBodySchema =
69486954
projectUserUpdateRequestSchema;
6955+
export const modifyProjectUserCommandParamsSchema = v.strictObject({
6956+
project_id: v.string(),
6957+
user_id: v.string(),
6958+
});
69496959
export const deleteProjectUserCommandParamsSchema = v.strictObject({
69506960
project_id: v.string(),
69516961
user_id: v.string(),

0 commit comments

Comments
 (0)