Skip to content

fix: x-microcks-refs not resolved when response is a $ref to a component - #2342

Merged
lbroudoux merged 1 commit into
microcks:masterfrom
vleon1a:fix/x-microcks-refs
Sep 28, 2026
Merged

lbroudoux merged 1 commit into
microcks:masterfrom
vleon1a:fix/x-microcks-refs

Conversation

@vleon1a

@vleon1a vleon1a commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Description

When an OpenAPI operation's response uses a $ref to a component (e.g. $ref: '#/components/responses/MyResponse') and x-microcks-refs is defined on that component, Microcks fails to discover the operation's samples. The operation appears with zero samples:
image

Looking at the code, it seems most of the methods rely on followRefIfAny, but it was not the case here.

Fix done applying TDD approach, and also validated by building the Uber Docker locally and running it on the project where I discovered the issue,

After the fix the samples are found:
image

Related issue(s)

Resolves #2336

Can this be backported to the release-1.15 branch?

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you!

@lbroudoux
lbroudoux merged commit 09a312c into microcks:master Sep 28, 2026
10 checks passed
@lbroudoux

Copy link
Copy Markdown
Member

Can this be backported to the release-1.15 branch?

Unfortunately no, 1.16.0 is expected to land soon with no breaking changes since 1.15.0. It will be trivial to update in a week or two.

@vleon1a
vleon1a deleted the fix/x-microcks-refs branch September 28, 2026 13:13
@vleon1a

vleon1a commented Sep 28, 2026

Copy link
Copy Markdown
Contributor Author

Can this be backported to the release-1.15 branch?

Unfortunately no, 1.16.0 is expected to land soon with no breaking changes since 1.15.0. It will be trivial to update in a week or two.

Alright, good to know! Thanks a lot @lbroudoux !

@lbroudoux

Copy link
Copy Markdown
Member

And in the meantime you can also used the nightly tag of the image.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

x-microcks-refs not resolved when response is a $ref to a component

2 participants