You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error when generating from an OpenAPI spec with two endpoints containing a shared referenced component for a path variable.
There is no error if the same referenced component is not used for two endpoints.
See the success in the readme.
We should be able to use shared components for multiple endpoints
# error
Reference not found: #/paths/~1test1~1%7BpathId%7D/get/parameters/0
Error: Reference not found: #/paths/~1test1~1%7BpathId%7D/get/parameters/0
at Kn (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:12:1919)
at Dr.resolveRef (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:14:410)
at ve (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:14:26247)
at Qn (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:14:29550)
at oa (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:14:85572)
at uo (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:14:90818)
at async Promise.all (index 0)
at async pj (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/dist/index.cjs:1311:4503)
at async start (/Users/seriouslag/openapi-ts-error/node_modules/@hey-api/openapi-ts/bin/index.cjs:124:21)
# error.yamlopenapi: 3.0.0info:
version: 1.0.0title: TESTservers:
- url: http://localhost:3000paths:
/test1/{pathId}:
get:
summary: This endpoint uses the same pathId as the other endpointparameters:
- $ref: path.yaml#/pathIdresponses:
'200':
description: Test 1 response/test2/{pathId}:
get:
summary: This endpoint uses the same pathId as the other endpointparameters:
- $ref: path.yaml#/pathIdresponses:
'200':
description: Test 2 response
Description
Error when generating from an OpenAPI spec with two endpoints containing a shared referenced component for a path variable.
There is no error if the same referenced component is not used for two endpoints.
See the success in the readme.
We should be able to use shared components for multiple endpoints
Reproducible example or configuration
https://github.com/seriouslag/openapi-ts-error
OpenAPI specification (optional)
System information (optional)
mac os, node 22.x, npm 10.x, latest @hey-api/openapi-ts
The text was updated successfully, but these errors were encountered: