Open jrunning opened 1 week ago
Using the following OpenAPI spec:
openapi: 3.0.3 info: title: My API version: v2 paths: /api/{SomeId}: put: operationId: SomeOperation parameters: - $ref: '#/components/parameters/SomeId' responses: '200': description: Success components: parameters: SomeId: name: SomeId in: path required: true schema: type: string format: uuid
Counterfact (invoked as npx counterfact test.yaml api) is generating the following type in api/types/paths/api/{SomeId}.types.ts:
npx counterfact test.yaml api
api/types/paths/api/{SomeId}.types.ts
export type HTTP_PUT = ( $: OmitValueWhenNever<{ query: never; path: never; // ...
As you can see the path property has type never even though the spec defines a path parameter (SomeId).
path
never
SomeId
This might be a duplicate of #1089; if so please feel free to close it.
Thanks! Yeah looks related but I'll leave this open because it's extra motivation to finish the fix.
Using the following OpenAPI spec:
Counterfact (invoked as
npx counterfact test.yaml api
) is generating the following type inapi/types/paths/api/{SomeId}.types.ts
:As you can see the
path
property has typenever
even though the spec defines a path parameter (SomeId
).This might be a duplicate of #1089; if so please feel free to close it.