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

Ouverte
#442 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
45/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
Active
Stack technique
go, json

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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.

Langage dominant
Go
Étoiles
421
Forks
50
Merge moyen
17 h 34 min
PR mergées (30 j)
80

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Windshiftapp/core

Toutes les issues de Windshiftapp/core

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.