-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Option to plain-format some keys like /models/{model} #493
Comments
If the maintainers are open to it, I'm happy to fund a PR. |
Huh, that's a bit odd. This will probably require some spelunking in the YAML spec and the codebase to figure out if it the check can be safely relaxed, or if the parser should complain about the input. And if the parser really should complain about the input, then the fix might require a major release because it may break user code. Given the potential impact and delicacy of the work, receiving some targeted funding would indeed help with its prioritisation. As I'm the only maintainer and Finnish donation laws are rather strict, the only platform that's currently set up to funnel any donations is thanks.dev, though you'll also find me on PayPal as |
Sent you an email! |
Is your feature request related to a problem? Please describe.
I'm trying to minimize diffs when using
yaml-diff-patch
on OpenAPI specs likeThe
/models/{model}
key gets quoted after a roundtrip.EDIT: I thought this is an implicit key but I think I misinterpreted the spec, so seems like this is valid?
Question: is it actually a valid key? It seems to parse okay and linting tools seem okay with it. But, I found in your code that you intentionally quote implicit keys containing
{
or}
, and the YAML spec seems pretty clear on this:Describe the solution you'd like
If an implicit key like
/models/{model}
is actually unambiguous, can we havedefaultKeyType: 'PLAIN'
not quote it?Describe alternatives you've considered
If using an unquoted key in this form is bad and not technically valid, I'm wondering if there's a good example why it shouldn't be done I can relay back to folks who are outputting YAML in this format?
Additional context
The text was updated successfully, but these errors were encountered: