mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-21 08:31:14 +00:00
fcd494f67e
Mirror of AZ-794 (inventory z/x/y rename). RequestRegionRequest.cs renames C#
props Latitude→Lat / Longitude→Lon and adds [JsonPropertyName("lat"/"lon")] so
the wire format is unambiguous under the AZ-795 strict-parsing stack
(UnmappedMemberHandling.Disallow → legacy {"latitude":..,"longitude":..} now
returns HTTP 400 instead of silently coercing).
Updates all in-repo consumers: API handler (Program.cs), integration tests
(Models.cs, RegionTests.cs, IdempotentPostTests.cs, SecurityTests.cs), the
performance harness (run-performance-tests.sh PT-03/04/05/07), and module
docs (common_dtos.md, api_program.md; system-flows.md F2 already used
lat/lon). New RegionFieldRenameTests.cs covers AC-4 both directions (new
format → 200, legacy format → 400). Smoke green; no regressions.
region-request.md contract doc not bumped here — AZ-808 publishes v1.0.0
directly with the post-rename names per AZ-812 coordination clause.
Batch 01 of cycle 8. PASS_WITH_WARNINGS (one Low DRY finding for follow-up
test-helper consolidation; details in
_docs/03_implementation/reviews/batch_01_cycle8_review.md).
Co-authored-by: Cursor <cursoragent@cursor.com>
117 lines
3.8 KiB
C#
117 lines
3.8 KiB
C#
namespace SatelliteProvider.IntegrationTests;
|
|
|
|
public record DownloadTileResponse
|
|
{
|
|
public Guid Id { get; set; }
|
|
public int ZoomLevel { get; set; }
|
|
public double Latitude { get; set; }
|
|
public double Longitude { get; set; }
|
|
public double TileSizeMeters { get; set; }
|
|
public int TileSizePixels { get; set; }
|
|
public string ImageType { get; set; } = string.Empty;
|
|
public string FilePath { get; set; } = string.Empty;
|
|
public DateTime CreatedAt { get; set; }
|
|
public DateTime UpdatedAt { get; set; }
|
|
}
|
|
|
|
public record RequestRegionRequest
|
|
{
|
|
public Guid Id { get; set; }
|
|
|
|
[System.Text.Json.Serialization.JsonPropertyName("lat")]
|
|
public double Lat { get; set; }
|
|
|
|
[System.Text.Json.Serialization.JsonPropertyName("lon")]
|
|
public double Lon { get; set; }
|
|
|
|
public double SizeMeters { get; set; }
|
|
public int ZoomLevel { get; set; }
|
|
public bool StitchTiles { get; set; } = false;
|
|
}
|
|
|
|
public record RegionStatusResponse
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string Status { get; set; } = string.Empty;
|
|
public string? CsvFilePath { get; set; }
|
|
public string? SummaryFilePath { get; set; }
|
|
public int TilesDownloaded { get; set; }
|
|
public int TilesReused { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public DateTime UpdatedAt { get; set; }
|
|
}
|
|
|
|
public class RoutePointInput
|
|
{
|
|
[System.Text.Json.Serialization.JsonPropertyName("lat")]
|
|
public double Lat { get; set; }
|
|
[System.Text.Json.Serialization.JsonPropertyName("lon")]
|
|
public double Lon { get; set; }
|
|
}
|
|
|
|
public class GeoPointInput
|
|
{
|
|
[System.Text.Json.Serialization.JsonPropertyName("lat")]
|
|
public double Lat { get; set; }
|
|
[System.Text.Json.Serialization.JsonPropertyName("lon")]
|
|
public double Lon { get; set; }
|
|
}
|
|
|
|
public class GeofencePolygonInput
|
|
{
|
|
[System.Text.Json.Serialization.JsonPropertyName("northWest")]
|
|
public GeoPointInput? NorthWest { get; set; }
|
|
[System.Text.Json.Serialization.JsonPropertyName("southEast")]
|
|
public GeoPointInput? SouthEast { get; set; }
|
|
}
|
|
|
|
public class GeofencesInput
|
|
{
|
|
[System.Text.Json.Serialization.JsonPropertyName("polygons")]
|
|
public List<GeofencePolygonInput> Polygons { get; set; } = new();
|
|
}
|
|
|
|
public class CreateRouteRequest
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string? Description { get; set; }
|
|
public double RegionSizeMeters { get; set; }
|
|
public int ZoomLevel { get; set; }
|
|
public List<RoutePointInput> Points { get; set; } = new();
|
|
[System.Text.Json.Serialization.JsonPropertyName("geofences")]
|
|
public GeofencesInput? Geofences { get; set; }
|
|
public bool RequestMaps { get; set; } = false;
|
|
public bool CreateTilesZip { get; set; } = false;
|
|
}
|
|
|
|
public class RoutePointModel
|
|
{
|
|
public double Latitude { get; set; }
|
|
public double Longitude { get; set; }
|
|
public string PointType { get; set; } = string.Empty;
|
|
public int SequenceNumber { get; set; }
|
|
public int SegmentIndex { get; set; }
|
|
public double? DistanceFromPrevious { get; set; }
|
|
}
|
|
|
|
public class RouteResponseModel
|
|
{
|
|
public Guid Id { get; set; }
|
|
public string Name { get; set; } = string.Empty;
|
|
public string? Description { get; set; }
|
|
public double RegionSizeMeters { get; set; }
|
|
public int ZoomLevel { get; set; }
|
|
public double TotalDistanceMeters { get; set; }
|
|
public int TotalPoints { get; set; }
|
|
public List<RoutePointModel> Points { get; set; } = new();
|
|
public bool RequestMaps { get; set; }
|
|
public bool MapsReady { get; set; }
|
|
public string? CsvFilePath { get; set; }
|
|
public string? SummaryFilePath { get; set; }
|
|
public string? StitchedImagePath { get; set; }
|
|
public string? TilesZipPath { get; set; }
|
|
public DateTime CreatedAt { get; set; }
|
|
public DateTime UpdatedAt { get; set; }
|
|
}
|