mirror of
https://github.com/dcs-retribution/dcs-retribution.git
synced 2025-11-10 15:41:24 +00:00
Fix FastAPI doc pages.
We can't directly use frozen dataclasses from pydcs in our interface because pydantic can't process them. Pydantic is able to automatically convert to our modelview type from the pydcs type though.
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dcs.mapping import LatLng
|
||||
from pydantic import BaseModel
|
||||
|
||||
from game.server.leaflet import LeafletPoly, ShapelyUtil
|
||||
from game.server.leaflet import LeafletPoint, LeafletPoly, ShapelyUtil
|
||||
from game.theater import ConflictTheater
|
||||
from game.threatzones import ThreatZones
|
||||
|
||||
@@ -15,7 +14,7 @@ class MapZonesJs(BaseModel):
|
||||
|
||||
|
||||
class UnculledZoneJs(BaseModel):
|
||||
position: LatLng
|
||||
position: LeafletPoint
|
||||
radius: float
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user