-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.py
63 lines (46 loc) · 1.21 KB
/
model.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# generated by datamodel-codegen:
# filename: application_schema.yaml
# timestamp: 2024-03-14T14:54:14+00:00
from __future__ import annotations
from datetime import date
from typing import List, Optional
from pydantic import AnyUrl, BaseModel, ConfigDict, RootModel
class Link(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
title: str
url: AnyUrl
class Settings(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
application: str
team: str
class ThreatModelingComponent(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
date: date
title: str
links: List[Link]
class ThreatModeling(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
components: List[ThreatModelingComponent]
class Activities(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
threat_modeling: Optional[ThreatModeling] = None
class DSOMMapplication(BaseModel):
model_config = ConfigDict(
extra='forbid',
)
apiVersion: str = '1'
kind: str = 'application'
settings: Settings
activities: Activities
class Model(RootModel[DSOMMapplication]):
root: DSOMMapplication