fix: make sure validation of invalid document exits `1`
Description
- Fixes the issue #861 having validation exit code error by checking the return status
- Added a enum for validation return status
Related issue(s) Resolves #861
@smoya @Souvikns Please review it
@shawakash there are some lint issues.
Kudos, SonarCloud Quality Gate passed! 
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
@Souvikns fixed the lint issue
@Souvikns @derberg Should we close this PR as the bug related is already solved by https://github.com/asyncapi/cli/pull/1068 ?
We can close it, but this PR adds some refactoring, that we can use.
We can close it, but this PR adds some refactoring, that we can use.
@Souvikns
Yeah, we can keep it as a refactor then. Should we change the PR title from fix: to refactor: in that case?
@shawakash Do you need some help to move forward with this PR?
there are conflicts so I suggest you @peter-rr to open separate PR with refactor