first commit
This commit is contained in:
15
core/schemas/manifest.py
Normal file
15
core/schemas/manifest.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
|
||||
class ModuleManifest(BaseModel):
|
||||
model_config = ConfigDict(
|
||||
extra="forbid",
|
||||
frozen=True,
|
||||
)
|
||||
|
||||
identifier: str = Field(pattern=r"^[a-z][a-z0-9_-]*$")
|
||||
name: str = Field(min_length=1)
|
||||
category: str = Field(min_length=1)
|
||||
version: str = Field(pattern=r"^\d+\.\d+\.\d+$")
|
||||
api_version: str = Field("1", pattern=r"^\d+$")
|
||||
description: str = ""
|
||||
Reference in New Issue
Block a user