-
I'm trying to support @hey-api/openapi-ts in my api router. I've got logic for returning the OpenAPI schema, but for path params, the url is something like However, it looks like Hey API expects this to be /* src/client/sdk.gen.ts */
export const getUserId = <ThrowOnError extends boolean = false>(options: Options<GetUserIdData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).get<unknown, unknown, ThrowOnError>({
url: `/user/{id}`,
...options
});
}; I have a POC where I transform the path strings myself, before returning the OpenAPI schema, but should Hey API be doing this? If every code generator use the braces syntax, then I guess I can just do the transform. Or maybe I should be changing it anyway, even for my auto-generated OpenAPI docs, but I assumed most people were accustomed to seeing the colon syntax. Just looking for some general guidance here. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @j4w8n, I'm not quite sure what the ask is here? The paths follow the same syntax as OpenAPI https://swagger.io/docs/specification/v3_0/paths-and-operations/. How does the generated client interact with your API router? I'd need to see more to understand what's going on |
Beta Was this translation helpful? Give feedback.
Hi @j4w8n, I'm not quite sure what the ask is here? The paths follow the same syntax as OpenAPI https://swagger.io/docs/specification/v3_0/paths-and-operations/. How does the generated client interact with your API router? I'd need to see more to understand what's going on