Add source reference on Envelope.parameterType
#2719
Labels
⚡ enhancement
Request for new functionality
Envelope.parameterType
#2719
🤔 What's the problem you're trying to solve?
When implementing a plugin, I can determine the source reference of a Step Definition (using handler on
Envelope.stepDefinition
), but I cannot determine the source reference for aParameterType
.The cause is
CachingGlue.emitParameterTypeDefined
which creates anEnvelope
with aParameterType
which miss the source reference information.✨ What's your proposed solution?
A simple solution would be to:
SourceReference
in theio.cucumber.messages.types.ParameterType
. Hint: requires changing the cucumber messages schema (https://github.com/cucumber/messages/tree/main/jsonschema) which generates classes for Java and other languages, see Add theSourceReference
inParameterType
messages#145. A snapshot version of the library should be made.io.cucumber.messages.types.StepDefinition
(in this case: based on theio.cucumber.cucumberexpressions.ParameterType
which contains the JavaMethod
). Hint: the cucumber messages snapshot library should be used in the PR⛏ Have you considered any alternatives or workarounds?
The
ParameterType
can be obtained by looking at all methods annotated@ParameterType
on all classes of the classpath, but this is not really efficient.The text was updated successfully, but these errors were encountered: