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

Validate JSON snippets in configuration.md (or directly in the rust docs) #2525

Open
t4lz opened this issue Jun 13, 2024 · 2 comments · May be fixed by #2630
Open

Validate JSON snippets in configuration.md (or directly in the rust docs) #2525

t4lz opened this issue Jun 13, 2024 · 2 comments · May be fixed by #2630
Assignees
Labels
enhancement New feature or request

Comments

@t4lz
Copy link
Member

t4lz commented Jun 13, 2024

We generate the documentation for mirrord's configuration from the doc comments in the rust code of the configuration, using medschool.

In this documentation, we usually include examples in the form of JSON.

Currently there is nothing preventing us from including invalid JSON file snippets in this documentation. Those invalid snippets then make it into configuration.md via medschool, and at some point into https://github.com/metalbear-co/mirrord.dev.

It would be nice to have a validation mechanism that would prevent us from merging invalid JSON snippets into main.

We could also consider validating the one full mirrord configuration at the top of the documentation against our JSON schema, to make sure it is always valid and up to date, even when we make changes to our configuration schema. But this should probably be a separate PR at a later time.

@t4lz t4lz added the enhancement New feature or request label Jun 13, 2024
@infiniteregrets
Copy link
Contributor

I can give this one a try!

@eyalb181
Copy link
Member

Always glad to receive outside contributions ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants