-
Notifications
You must be signed in to change notification settings - Fork 5
"bump overlay" should log a warning when JSONPath doesn't match anything #588
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
Comments
Big +1 to this. I'm starting to write and maintain overlays for my spec and I'm worried about updates to my API unknowingly affecting how my overlays work. I would like to know so I can update the overlays. |
Thanks for your feedback, it fully makes sense. We're talking about it internally to see how it could be added to our roadmap. |
Hi, This feature is now available in the last version of the CLI. Thanks again for your feedback 🙏 Have a great day, |
@grossyoan thank you for adding this! Would it be possible to force the I don't have faith that all engineers at my company will heed the warnings without an explicitly failing command 😅 |
Thanks for your feedback. We don't usually fail an action unless there's something "fatal" to it, we prefer to output warnings, like we do during deployment. However, I totally get your use case. We'll talk about it internally to see if we offer a Have a nice day, |
When writing JSONPath expressions, it's common to make mistakes where the expression is syntactically valid but matches nothing. Currently
bump overlay
just silently ignores such targets, which complicates troubleshooting.It would be nice if the tool could warn the user about such noop targets. These warnings could be either always on, or enabled by some flag. For example
speakeasy overlay apply
has the--strict
flag for this purpose.Some common errors:
Typos in node names, values, filters:
Skipping nodes in a path:
Extra nodes in a path:
Consider an overlay that targets an endpoint by its path or
operationId
:Later this endpoint gets renamed (e.g.
/foos/{id}
becomes/foos/{foo_id}
) or itsoperationId
gets changed (e.g. maybe op IDs are autogenerated and the algorithm changes).As an overlay author and maintainer, I would like to get notified about non-matches so that I can update the overlay to match the current state of my API.
The text was updated successfully, but these errors were encountered: