mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-11-06 15:21:13 +02:00
Fix enum use in schemas
This commit is contained in:
1 parent
bd9af3fe90
commit
31ae70894e
5 files changed
+33
-33
No files matched your search
@@ -20,7 +20,7 @@ from typing import Optional
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class UDPNIOType(Enum):
|
||||
class UDPNIOType(str, Enum):
|
||||
|
||||
udp = "nio_udp"
|
||||
|
||||
@@ -38,7 +38,7 @@ class UDPNIO(BaseModel):
|
||||
filters: Optional[dict] = Field(None, description="Packet filters")
|
||||
|
||||
|
||||
class EthernetNIOType(Enum):
|
||||
class EthernetNIOType(str, Enum):
|
||||
|
||||
ethernet = "nio_ethernet"
|
||||
|
||||
@@ -52,7 +52,7 @@ class EthernetNIO(BaseModel):
|
||||
ethernet_device: str = Field(..., description="Ethernet device name e.g. eth0")
|
||||
|
||||
|
||||
class TAPNIOType(Enum):
|
||||
class TAPNIOType(str, Enum):
|
||||
|
||||
tap = "nio_tap"
|
||||
|
||||
|
||||
Reference in new issue
Block a user