-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
Hi -- it appears that this library currently only supports the following parameter types: query
, path
, header
, and body
based on what I'm seeing in the source code. Was it an intentional decision to not include cookie
parameters? If not would it be possible to add support?
Here's an example for reference.
Swagger doc OpenAPI example endpoint:
{
...
"/v1/testUserData/{locale}": {
"get": {
"tags": [
"test-controller"
],
"summary": "A summary of the test user endpoint",
"description": "A description of the test user endpoint.",
"operationId": "getTestUserData",
"parameters": [
{
"name": "AUTH_TOKEN",
"in": "cookie",
"description": "Auth Cookie",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
},
{
"name": "locale",
"in": "path",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestResponse"
}
}
}
}
}
}
},
...
}
...
typed-openapi
output based on the Swagger doc OpenAPI example above:
...
export type get_GetTestUserData = typeof get_GetTestUserData;
export const get_GetTestUserData = {
method: z.literal("GET"),
path: z.literal("/v1/testUserData/{locale}"),
parameters: z.object({
path: z.object({
locale: z.string(),
}),
}),
response: TestResponse,
};
...
As you can see it is stripping out the AUTH_TOKEN
parameter.
Metadata
Metadata
Assignees
Labels
No labels