api: add gps device capture to records schema#75
Open
sjperaltas wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenAPI specification (reference/rest-api.json) to document the new gps_device_capture shape on Records v2 responses and to accept corresponding input on record create/update requests, aligning the published schema with the backend contract for FLCRM-20532.
Changes:
- Add
gps_device_captureto theRecordandRecordHistoryItemresponse schemas. - Introduce reusable
GpsDeviceCapture(response) andGpsDeviceCaptureRequest(write) schemas, withgeometry_matches_capturemodeled as response-only (readOnly). - Extend
RecordRequestandRecordPatchRequestto acceptgps_device_captureviaGpsDeviceCaptureRequest.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+272
to
+274
| "gps_device_capture": { | ||
| "$ref": "#/components/schemas/GpsDeviceCapture" | ||
| }, |
Comment on lines
+464
to
+466
| "gps_device_capture": { | ||
| "$ref": "#/components/schemas/GpsDeviceCapture" | ||
| }, |
Comment on lines
+520
to
+524
| "GpsDeviceCapture": { | ||
| "type": "object", | ||
| "description": "Flexible GPS device metadata captured with a record.", | ||
| "additionalProperties": true, | ||
| "properties": { |
Comment on lines
+520
to
+526
| "GpsDeviceCapture": { | ||
| "type": "object", | ||
| "description": "Flexible GPS device metadata captured with a record.", | ||
| "additionalProperties": true, | ||
| "properties": { | ||
| "device_name": { | ||
| "type": "string", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
gps_device_captureto Records v2 response schemasGpsDeviceCaptureresponse schema with read-onlygeometry_matches_captureGpsDeviceCaptureRequestschema for record create/update requestsWhy?
geometry_matches_capturefieldRelated PRs:
Resolution
RecordandRecordHistoryItemto includegps_device_captureRecordRequestandRecordPatchRequestto acceptgps_device_capturegeometry_matches_captureas a response-only boolean inside the response schemaCode Review
High quality code reviews are expected. You can utilize this PR review checklist to help you conduct one.
Testing
reference/rest-api.jsonparses as valid JSONnpx --yes rdme openapi validate rest-api.jsonsuccessfullyRAW_BODYanti-patterns