[MGNLREST-178] Attempts to request multiple languages with a pipe should return an error instead of unpredictable results Created: 14/Mar/18 Updated: 16/Apr/20 Resolved: 29/Mar/18 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | delivery |
| Affects Version/s: | 2.1 |
| Fix Version/s: | 2.1.1 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Martin Drápela | Assignee: | Ngoc Nguyenthanh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 5.5h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Sprint: | Saigon 139, Saigon 140 | ||||||||
| Story Points: | 5 | ||||||||
| Description |
|
Retrieval of multiple languages in REST 2.1 is not implemented (yet). Still while the following three requests work correctly in the current one-language implementation (the third as if ignoring the |en-EN part) http://localhost:8080/magnoliaAuthor/.rest/ep/travel/about?lang=de http://localhost:8080/magnoliaAuthor/.rest/ep/travel/about?lang=de-DE http://localhost:8080/magnoliaAuthor/.rest/ep/travel/about?lang=de-DE|en-GB all throwing: "title": "Über uns" by analogy one would think that http://localhost:8080/magnoliaAuthor/.rest/ep/travel/about?lang=de|en will also work by ignoring the regionless |en part, but it returns: "title": "About" instead. |
| Comments |
| Comment by Mikaël Geljić [ 14/Mar/18 ] |
|
Indeed, multiple locales with the OR operator are not supported, on purpose.
So it's either get one language, or get all with the lang=all param. |