Skip to content

feat: Add validation plan generator #375

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

Merged
merged 21 commits into from
Apr 23, 2024
Merged

Conversation

nieomylnieja
Copy link
Collaborator

@nieomylnieja nieomylnieja commented Apr 18, 2024

Motivation

When documenting an API it's often a struggle to keep consistency between the code and documentation we write for it.
What If your code could be self descriptive? Specifically, what If we could generate documentation out of our validation rules?

This PR explores this topic attempting to create a builtin mechanism for generating a validation plan, which could then be used to generate human-readable documentation for validation rules.

You can generate a validation plan by running:

go run internal/cmd/docgen/generator.go

This PR does not attempt to make the whole validation plan fully polished and ready to go, but rather create a foundation on top of which to build on at the same time proving it can be done.

@n9-machine-user n9-machine-user added enhancement New feature or request go minor labels Apr 18, 2024
@nieomylnieja nieomylnieja changed the base branch from main to stabilize-validation-api April 18, 2024 16:40
Base automatically changed from stabilize-validation-api to main April 19, 2024 08:13
@nieomylnieja nieomylnieja force-pushed the add-validation-plan-generator branch from 5c9fbc5 to 3ca97a3 Compare April 19, 2024 12:36
@nieomylnieja nieomylnieja marked this pull request as ready for review April 22, 2024 13:44
Copy link
Member

@skrolikiewicz skrolikiewicz left a comment

Choose a reason for hiding this comment

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

Looks like a solid foundation :)

@nieomylnieja nieomylnieja merged commit be388e3 into main Apr 23, 2024
5 checks passed
@nieomylnieja nieomylnieja deleted the add-validation-plan-generator branch April 23, 2024 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go minor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants