Skip to content

CustomDefinitionProvider on void Methods #440

Closed Answered by CarstenWickner
PintOfBitter asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @PintOfBitter,

I can confirm your observation and can reproduce it.
The reason for that behavior is this short-circuiting logic for void methods at the moment:

private JsonNode createMethodSchema(MemberDetails<MethodScope> methodDetails) {
if (methodDetails.getScope().isVoid()) {
return BooleanNode.FALSE;
}

Any custom definition would only be considered after this check.
Out of curiosity: what kind of schema do you intend to assign to such a void method's return value?

An extra caveat could be…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@PintOfBitter
Comment options

@CarstenWickner
Comment options

@CarstenWickner
Comment options

Answer selected by PintOfBitter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants