Open
Conversation
svix-mman
commented
Nov 27, 2025
Comment on lines
+5
to
+16
| struct TemplateFrontmatter { | ||
| template_scope: TemplateScope, | ||
| } | ||
|
|
||
| #[derive(Debug, serde::Deserialize, PartialEq, Eq)] | ||
| #[serde(rename_all = "kebab-case")] | ||
| enum TemplateScope { | ||
| /// The template will have access to the whole openapi spec, and will evaluated once. | ||
| Spec, | ||
| /// The template will have access to a single resource, and will evaluated once per resources. | ||
| Resource, | ||
| } |
Contributor
Author
There was a problem hiding this comment.
This struct and enum are subject to change, I included them so I can test the toml parsing.
616300f to
b9a764d
Compare
b9a764d to
2fa5c19
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add new frontmatter parser to be used in the new v2 CLI.
Add dependency on
toml(for frontmatter parsing)thiserrorFor nice error enums (I prefer to be forced to think about all possible error statuses, instead of just magically converting the error to anyhow::Error and forgetting about it)Add dev dependency on
rstest, allows me to easily test permutations of comment syntax.