start adding new ninja-based OpenAPI-compatible API v2, starting with mesh

This commit is contained in:
Laura Klünder 2023-11-11 03:01:15 +01:00
parent 0b6362c8ab
commit f5c33724dc
9 changed files with 101 additions and 4 deletions

View file

@ -5,6 +5,7 @@ from typing import TypeVar
import channels
from channels.db import database_sync_to_async
from c3nav.api.utils import EnumSchemaByNameMixin
from c3nav.mesh.baseformats import (BoolFormat, EnumFormat, FixedStrFormat, SimpleFormat, StructType, VarArrayFormat,
VarBytesFormat, VarStrFormat, normalize_name)
from c3nav.mesh.dataformats import (BoardConfig, FirmwareAppDescription, MacAddressesListFormat, MacAddressFormat,
@ -68,7 +69,7 @@ M = TypeVar('M', bound='MeshMessage')
@unique
class ChipType(IntEnum):
class ChipType(EnumSchemaByNameMixin, IntEnum):
ESP32_S2 = 2
ESP32_C3 = 5