Skip to content

Conversation

@romannekhor
Copy link

Problem Description

The openapi-extract tool does not currently copy the contents of #/components/parameters/<param_name> when a $ref is used at the #/paths/<path>/parameters level.

Steps to Replicate the Problem

Using the following OpenAPI specification: PagerDuty API Schema.

Run the command:

openapi-extract -d -r -x -v openapiv3.json -o getAnalyticsIncidentsById

This results in #/components/parameters/id being referenced but not correctly copied into the final spec's components block.

Solution

This patch adds a deref(...) call after cloning the path parameters block. This ensures that the $ref references are properly resolved, resulting in a valid and complete spec file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant