[Bug] v2 API: custom field options are an object on read but must be a JSON string on write

Open
#442 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
go, json

Research direction

Start with the api/openapi-v2.json schema for options on custom fields, then find the v2 handlers for GET /custom-fields and POST/PATCH /custom-fields/{id} to compare how each side encodes and decodes it. Agree with maintainers whether the parsed object or the JSON string is canonical before editing, since the issue leaves that open. Done when a read can be written back unchanged and the OpenAPI document matches the actual behaviour.

Written by the indexing model from the issue text.

Description

Version: main (b1a9898)

GET /rest/api/v2/custom-fields returns each field's options already parsed ({"next_id": N, "items": [{"id", "label"}]}), while POST /custom-fields and PATCH /custom-fields/{id} declare options as a string in api/openapi-v2.json and accept the same structure JSON-encoded. A client that reads a multiselect field, adds an option and writes it back has to re-encode in between; one that assumes the documented string on read crashes.

Expected: the same representation both ways, ideally the parsed object, with the OpenAPI document updated to match.

Minor, but it cost a failed sync run on our side, so noting it.

Dominant language
Go
Stars
421
Forks
50
Avg merge
17h 34m
Merged PRs (30d)
80

Getting set up

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.

More from Windshiftapp/core

All issues in Windshiftapp/core

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.