[MGNLRESTCL-158] Support for API's using Content Type json but returning a String Created: 21/Apr/20  Updated: 21/Apr/20

Status: Open
Project: REST Client
Component/s: API
Affects Version/s: 2.0
Fix Version/s: None

Type: Improvement Priority: High
Reporter: Scot Rhodes Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File magentoCartService.yaml    
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)

 Description   

This issue is based on performing authentication with Magento. Using the Bearer Security Scheme, the API returns a String value, although the API specifies application/json. This results in a failure to get the authentication token. The following Curl command will show provide clarification of the issue.
curl -X POST "https://demo1-m2.mage.direct/rest/V1/integration/admin/token" \
   -H "Content-Type:application/json" \
   -d '{"username":"demo", "password":"demo123"}'
The result of this command is (for example):
"77gdagby0gs1f3xff03u4q8wt9gf3n55"% 

You can reproduce this by adding the attached magentoCartService.yaml to a light-module's restClients folder, and test the function in the Rest Client tool.

 


Generated at Mon Feb 12 10:43:45 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.