Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding support to validate an architecture without relying on a pattern #793

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

lbulanti-ms
Copy link
Member

In this PR I added the support to validate an architecture without the need of a pattern. The architecture validation for now is based on the spectral rules that already exist in the project.

}
} catch (error) {
logger.error('An error occured:', error);
process.exit(1);
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if at some point it would make sense to not exit the process here, but instead in the CLI component instead which calls this code. I'm thinking from a reuse perspective, there could potentially be an app which doesn't want to exit when an error occurs, but instead just displays it

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I agree, this is something that we will probably need to do!

Copy link
Member

Choose a reason for hiding this comment

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

Yes. This is going to be important for the CLI server, I would imagine. We want to just return the validation output back to the calling module

* @param failOnWarnings Whether or not to treat a warning as a failure in the validation process.
* @param jsonSchemaLocation the location of the patterns JSON Schema to validate.
* @param metaSchemaPath the path of the meta schemas to use for ajv.
* @param debug the flag to enable debug logging.
Copy link
Member

Choose a reason for hiding this comment

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

small thing - might be good to have a dash after the param name, I was ever so briefly confused because I thought this was telling me to 'debug the flag' 😆

aidanm3341
aidanm3341 previously approved these changes Jan 13, 2025
@lbulanti-ms lbulanti-ms merged commit 747f359 into finos:main Jan 17, 2025
5 checks passed
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.

4 participants