Skip to content

$ref in parameters not being transpiled #984

@wolfy1339

Description

@wolfy1339

Description

A brief description of the bug.

ReferenceObjects are not being transpiled into the types from the schema when used in OperationObject for the parameters field

This was working fine in 5.x, it stopped working in the 6.x releases.

Name Version
openapi-typescript 6.0.3
Node.js 18.12.0
OS + version macOS 13, Windows 11, etc.

Reproduction

How can this be reproduced / when did the error occur?
https://raw.githubusercontent.com/octokit/octokit-next.js/main/cache/types-openapi/ghes-3.2.json on line 431, for the /admin/hooks/{hook_id} path
Generated types: https://raw.githubusercontent.com/octokit/octokit-next.js/fix-types/packages/types-openapi-ghes-3.2/index.d.ts on line 17291

You can see that only the first parameter gets transpiled

Expected result

(in case it’s not obvious)

Checklist

  • My OpenAPI schema passes a validator
  • I’m willing to open a PR (see CONTRIBUTING.md)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions