singleton
singleton copied to clipboard
[BUG] [Java Service] \ in standard ascii but collect source failed when key contain "\" in POST&GET api both in V1&V2
Describe the bug \ in standard ascii but collect source failed when key contain "" in POST api both in V1&V2
To Reproduce 1.use post api http://localhost:8091/i18n/api/v2/translation/products/test/versions/1.1.0/locales/en-US/components/0728post/keys/%23%2412%3Caa11%3E%3D%27%27%40%3B%5BAWE%7D~xyT%5E.%22df1%27-%3F%2B23-a%2A9%26%25%23%21%2C%2Fand?collectSource=true
-
request key = \ or double \
-
response error ,can see picture
Expected behavior request key = \ or double \
the key also can be collected .details can see below picture :
Screenshots
commit 93ffa26a7c0616ff7fee3eb25318342d1dc8975b
Same issue in
V1 GET key-based APIs: Failed to collect or get the translation of key name with "\".
V2 GET key API: Failed to collect or get the translation of key name with "\".
The issue is reproducible on l10n APIs: V1: GET /l10n/api/v1/source/products/{productName}/components/{component}/keys/{key} V2: POST /i18n/l10n/api/v2/translation/products/{productName}/versions/{version}/locales/{locale}/components/{component}/keys/{key}
this is swaggerui3's issue, it doesn't support the url encode, we need to wait the swaggers' upgrade to support url encoding feature. Please use Postman do testing, it will be work successfully.
Tried with Postman, it still get same response.
test failed in 0826
The issue is fixed with commit 5ff0dfac9f918c4b230a25a209c3c1d0c34bb6ae, the regression bug is tracked with new bug https://github.com/vmware/singleton/issues/1871