vmware / vmware/singleton

[BUG] [Java Service]"machineTranslation" item as response data in key-based GET API.

Open
#1,562 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/java-service kind/bug priority/low
Dominant language
Java
Stars
72
Forks
69
Avg merge
23h 32m
Merged PRs (30d)
4

Description

Describe the bug
commit:2a16c214690243b83109a776751ed50773689bf7
"machineTranslation" item as response data in key-based GET API.
GET [/i18n/api/v2/translation/products/{productName}/versions/{version}/locales/{locale}/components/{component}/keys]
GET [/i18n/api/v2/translation/products/{productName}/versions/{version}/locales/{locale}/components/{component}/keys/{key}]
GET [/i18n/api/v1/translation/product/{productName}/component/{component}/key/{key}]
GET [/i18n/api/v1/translation/product/{productName}/key/{key}]

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'GET [/i18n/api/v2/translation/products/{productName}/versions/{version}/locales/{locale}/components/{component}/keys]' API.
  2. Input valid product/version/locale/component/key in this API:
    http://localhost:8091/i18n/api/v2/translation/products/VMwareVIP2018/versions/1.1.0/locales/en/components/Test.ABC_abc-123/keys?keys=Test.ABC_abc-123&pseudo=false
  3. See the response:
{
  "response": {
    "code": 200,
    "message": "OK",
    "serverTime": ""
  },
  "signature": "",
  "data": {
    "productName": "VMwareVIP2018",
    "version": "1.1.0",
    "dataOrigin": "",
    "pseudo": false,
    "machineTranslation": false,
    "component": "Test.ABC_abc-123",
    "messages": {
      "Test.ABC_abc-123": "The 1st Notes"
    },
    "locale": "en",
    "status": "",
    "id": 0
  }
}

Expected behavior
As there is no machineTranslation parameter in API input, it is redundant and unnecessary in response.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the response with the listed v1 and v2 key-based GET endpoints, using the example request and checking the returned data object. Trace the response model or serialization path for these endpoints and confirm that the redundant machineTranslation field is absent from each response when the input has no such parameter.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.