This issue re-appeared again today. This is annoying because I’ve patched a lot of enum altered values.
I’m calling PATCH https://api.forestadmin.com/api/layout
Got a 422 error code.
Request payload is :
[{"path":"/collections/roles/layout/fields/8f50a993-45fe-11eb-989c-c91269751825/displayName","op":"replace","value":"Libelle"},{"path":"/collections/roles/layout/fields/8f50a993-45fe-11eb-989c-c91269751825/widgetEdit","op":"replace","value":{"name":"dropdown","parameters":{}}},{"path":"/collections/roles/layout/fields/8f50a993-45fe-11eb-989c-c91269751825/widgetDisplay","op":"replace","value":{"name":"text","parameters":{}}},{"path":"/collections/roles/layout/fields/8f50a993-45fe-11eb-989c-c91269751825/mappingValues","op":"replace","value":[{"value":"director","label":"Directeur d'agence"},{"value":"director_assistant","label":"Directeur assistant de l'agence"},{"value":"coowner_accountant","label":"Comptable de l'immeuble"},{"value":"recovery_responsible","label":"N/A"},{"value":"claims_manager","label":"N/A"},{"value":"property_developer","label":"N/A"},{"value":"coowner_manager","label":"Gestionnaire de l'immeuble"},{"value":"coowner_assistant","label":"Assistant de gestion sur l'immeuble"},{"value":"sergic_partner_admin","label":"super_admin"},{"value":"sergic_partner","label":"Collaborateur sergic"},{"value":"biller_reviewer","label":"N/A"},{"value":"president_board_member","label":"President du CS"},{"value":"coownership_board_member","label":"Membre du CS"},{"value":"coowner","label":"Copropriétaire"},{"value":"coowner_secondary","label":"Copropriétaire secondaire"},{"value":"lessor","label":"Bailleur"},{"value":"tenant","label":"Locataire"},{"value":"caretaker","label":"Gardien d'immeuble"},{"value":"employee","label":"Employé immeuble"},{"value":"representative","label":"Mandataire"}]}]
Response is
{"errors":[{"status":422,"detail":"Invalid patch value (path: \"/collections/roles/layout/fields/8f50a993-45fe-11eb-989c-c91269751825/widgetEdit\", op: \"replace\", value: {\"name\":\"dropdown\",\"parameters\":{}}): ValidationError: child \"parameters\" fails because [child \"isSearchable\" fails because [\"isSearchable\" is required]]","meta":{}}]}