16 lines
434 B
Python
16 lines
434 B
Python
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 = ""
|