-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support nested values #8
Comments
This part of the RFC feels very under specified to me. For example, what should expanding Annoyingly the official test suite doesn't touch on this at all. |
Ah, there actually is a test for this: https://github.com/uri-templates/uritemplate-test/blob/520fdd8b0f78779d12178c357a986e0e727f4bd0/extended-tests.json#L14 If that can be trusted, Burrito currently does the right thing. |
I'm not sure where I land on this. On one hand, the RFC does clearly allow for values to be nested. On the other hand, it's so under specified that I feel there's no way to implement it in an unsurprising way. For example:
All this gets further complicated when you consider doing expansion in reverse (#4). I think it would be reasonable to say that Burrito doesn't support this. If this is a feature that people are interested in, they can ask for it. |
For the time being I am not going to allow this. |
I'm not sure how I missed this so far, but section 2.4.2 of the RFC says:
Currently Burrito only allows "simple" structures: a string, a list of strings, or a map from strings to strings. That should be expanded to allow nested values.
This also suggests that the representation for variable names should be some type of non-empty list. The elements would be separated by periods, representing potential nesting of values.
The text was updated successfully, but these errors were encountered: