Skip to content

* fix: pass productID as query param for story/create and bug/create - #3

Open
chendx-github wants to merge 1 commit into
easysoft:mainfrom
chendx-github:fix/story-bug-create-productID
Open

* fix: pass productID as query param for story/create and bug/create#3
chendx-github wants to merge 1 commit into
easysoft:mainfrom
chendx-github:fix/story-bug-create-productID

Conversation

@chendx-github

Copy link
Copy Markdown

Zentao server requires productID in URL query for POST /stories and POST /bugs, but the action definition only declares it in requestBody.schema. This caused buildQuery to never include it in the URL and buildRequestBody to throw E_MISSING_PARAM when callers pass --product=N.

Zentao server requires productID in URL query string for POST /stories and POST /bugs,
but the action definition only declares productID in requestBody.schema, not action.params.
This caused buildQuery to never include it in the URL and buildRequestBody to throw
E_MISSING_PARAM when callers pass --product=N (without an explicit productID=N).

Changes:
- override.ts: add productID to action.params and remove it from requestBody.schema
  so buildQuery moves it to the URL query and buildRequestBody no longer validates it.
- resolve.ts: buildQuery falls back to the base key (e.g. product) when a param is
  named with the ID suffix (e.g. productID) to match the CLI calling convention.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant