You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One work-around could be to set them as an environment variable (or put them into a .env file), and then refer to them using the ${env.SOME_VAR} syntax.
We were considering having something like the components concept that OpenAPI specs use, for reusable elements in a config file. Would something like this work for you?
The workaround with the environment variables seems tempting, although it might obscure things a bit, because the regex pattern in my case would be defined outside the YAML file, which can make it easier to read, because you get a nice label for the pattern. On the other hand, it might be a little harder for people to reason about the spec. if some arbitrary environment variables are defined elsewhere.
A fully blown components concept would of course be helpful. Might be a bit too much, though for my use case. Would you consider referencing simple String values as well?
Seems like you are using Jackson Dataformats YAML under the hood, which unfortunately doesn't handle anchors and references in YAML files nicely:
FasterXML/jackson-dataformats-text#98
Which is a pain, because I want to reuse regex patterns in my config file, which currently does not work:
The text was updated successfully, but these errors were encountered: