Closed luisvillalobossalgado1987 closed 3 months ago
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
I think something like this could work:
handle_validate() {
echo -e "${BLUE}Validating AsyncAPI file...${NC}"
echo "::group::Debug information"
if [ ! -f "$FILEPATH" ]; then
handle_file_error "$FILEPATH"
exit 1
fi
echo -e "${BLUE}Executing command:${NC}" "asyncapi validate $FILEPATH $PARAMETERS"
eval "asyncapi validate $FILEPATH $PARAMETERS"
# Fix: Check exit code after validation
if [ $? -ne 0 ]; then
echo "::endgroup::" # Close the debug group before exiting
echo "Validation failed."
exit 1
fi
echo "::endgroup::"
}
Great suggestion @luisvillalobossalgado1987 do you wish to work on this issue ?
@Shurtu-gal I would like to work on this ,if it is up for contribution
@Shurtu-gal I would like to work on this ,if it is up for contribution
Sure, you can do so.
@Shurtu-gal I would like to work on this ,if it is up for contribution
Do you need any help regarding this ?
I think the change is simple, but I'm not sure how to test it. And since the issue is still open, I understand that a new version has not been released with this. How can I help move forward?
You can implement the change and add a test case in the github workflow which tests it failing. Please let me know if you need any help.
Version 3.1.2 has already implemented the requested feature. My apologies for not noticing it earlier. Please close the issue.
Sure.
Why do we need this improvement?
I want to break the pipeline flow so that developers are forced to fix the asyncapi specification
How will this change help?
This would cause the complete execution of the pipeline or workflow to be marked as failed and therefore the following steps or jobs would not be executed.
Screenshots
The image shows that during validation 1 error was found:
However, the step or job is marked as successful.
How could it be implemented/designed?
It could be implemented depending on the output.
🚧 Breaking changes
Yes
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue?
None