Skip to content

fix(api): accept notes, marker_type, and position on markers endpoints#770

Open
jrsphoto wants to merge 1 commit intoCrosstalk-Solutions:devfrom
jrsphoto:fix/markers-api-validator-fields
Open

fix(api): accept notes, marker_type, and position on markers endpoints#770
jrsphoto wants to merge 1 commit intoCrosstalk-Solutions:devfrom
jrsphoto:fix/markers-api-validator-fields

Conversation

@jrsphoto
Copy link
Copy Markdown

Fixes #768.

The VineJS validators in createMarker and updateMarker silently dropped fields not in their schema. notes and marker_type exist on the model and are returned by GET responses but could not be set via POST or PATCH. updateMarker additionally did not accept latitude/longitude, so markers could not be repositioned.

Changes:

  • Add notes and marker_type to both validators and model assignments.
  • Add latitude/longitude to the update validator.
  • Add coordinate range validation (-90..90, -180..180) on both endpoints.

Release notes updated under Unreleased > Bug Fixes.

@chriscrosstalk chriscrosstalk changed the base branch from main to dev April 22, 2026 15:55
The VineJS validators in createMarker and updateMarker silently
dropped fields not in their schema. The MapMarker model and DB
include notes and marker_type, and GET responses return them, but
POST and PATCH would not persist them.

updateMarker additionally did not accept latitude/longitude, so
markers could not be repositioned via the API after creation.

- Add notes and marker_type to both validators and model assignments.
- Add latitude/longitude to the update validator.
- Add coordinate range validation on both endpoints.

Closes Crosstalk-Solutions#768
Copy link
Copy Markdown
Collaborator

@chriscrosstalk chriscrosstalk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean, focused fix — matches the diagnosis in #768 exactly. Coordinate range validation is a nice bonus and fixes a latent problem the original markers feature shipped with. Release-notes entry is in the right spot.

I took the liberty of retargeting from main to dev and rebasing onto current dev (the only conflict was the release-notes section, which I resolved by merging your bullet into the existing Unreleased > Bug Fixes list). Your authorship is preserved on the commit.

Approving. Thanks for the thorough writeup and fast turnaround on the fix.

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.

[Bug]: Markers API silently drops notes and marker_type; update endpoint cannot change position

2 participants