[MGNLREST-153] Retrieve one language with delivery endpoint Created: 20/Nov/17 Updated: 14/Mar/18 Resolved: 09/Feb/18 |
|
| Status: | Closed |
| Project: | Magnolia REST Framework |
| Component/s: | delivery |
| Affects Version/s: | None |
| Fix Version/s: | 2.1 |
| Type: | Story | Priority: | Major |
| Reporter: | Christopher Zimmermann | Assignee: | Ngoc Nguyenthanh |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 9.25d | ||
| Original Estimate: | 5d | ||
| 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)
|
||||||||||||
| Release notes required: |
Yes
|
||||||||||||
| Documentation update required: |
Yes
|
||||||||||||
| Date of First Response: | |||||||||||||
| Epic Link: | REST Phase2 | ||||||||||||
| Sprint: | Saigon 131, Saigon 132, Saigon 133 | ||||||||||||
| Story Points: | 8 | ||||||||||||
| Description |
|
User story: Capabilities: Currently, every response includes the content from all locales. Christoph Meier was collecting ideas for localization of the JSON provided by the delivery endpoint in the context of the ideation (of PM); see Prototyping: Hybrid Headless - cmeier - the linked google doc also provides linked to earlier research done by the VN core team. |
| Comments |
| Comment by Ngoc Nguyenthanh [ 24/Jan/18 ] |
|
Solution
Behaviors:
Testing
Agreements:
Open points:
|
| Comment by Ngoc Nguyenthanh [ 01/Feb/18 ] |
|
Follows the standard & best practices for Content Negotiation (http://docs.jboss.org/resteasy/docs/3.1.4.Final/userguide/html/JAX-RS_Content_Negotiation.html), supporting request language in query parameter of the URL is not a good option (excepts : Query String Parameter-based negotiation ) No Accept-Language header + NO lang query parameter
Has Accept-Language header + Has lang query parameter
Has Accept-Language header + NO lang query parameter
NO Accept-Language header + Has lang query parameter
See the integration tests for more cases - info.magnolia.integrationtests.rest.delivery.jcr.v2.I18nDeliveryEndpointTest |
| Comment by Christopher Zimmermann [ 01/Feb/18 ] |
|
Sounds good. I know its not backwards compatible, but developers will anyways be actively selecting the new version of the delivery class to get these new features - won't they? In which case it does not need to be backwards compatible. |
| Comment by Ngoc Nguyenthanh [ 01/Feb/18 ] |
|
czimmermann Agree, it's common sense. Because of we're only apply this feature on Delivery endpoint version 2, then back-compatibility is not an issue I guess. |
| Comment by Christopher Zimmermann [ 01/Feb/18 ] |
|
I like the lang=all approach for the reasons that you mention. |
| Comment by Ngoc Nguyenthanh [ 06/Feb/18 ] |
|
I've updated the current behavior in the comment above. |