Imports Validation Schemas into the Examples README during CI #805
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Many thanks for submitting your Pull Request ❤️!
Please specify parts of this PR update:
Discussion or Issue link:
#801
What this PR does / why we need it:
At the moment, examples are located both in the README and in files for the verification pipeline of the CI.
This means one change needs to be applied to 3 locations: the README json sample, the README yaml sample and the example json file.
This PR adds the possibility to reference external files thanks to an
include
tag.When a pull request is merged and at least an example file has been modified, a script will render
README_TEMPLATE.md
and replaceREADME.md
with the output (in the example folder).This means modifications should not be applied manually to
README.md
anymore but to the TEMPLATE instead. To try and prevent users from modifying the README directly, a disclaimer header is added to the file and a specific CI check is run when a pull request is opened and the README has been modified.For the template, the
include
tag have two attributes:file
(string) the file to render in place of the tagformat
(string: json | yaml) if the file should be rendered as JSON or YAMLe.g.:
<include file="event-based-greeting.json" format="json" />
When the CI workflow is run, a bot will push a signed commit to a branch and open a PR. To do so, the owners of this repository have to:
Special notes for reviewers:
Additional information: