julee.api.requests

Pydantic models for API requests. These define the contract between the API and external clients.

Following clean architecture principles, request models delegate validation to domain model class methods and reuse field descriptions to avoid duplication while maintaining single source of truth in the domain layer.

Classes

CreateAssemblySpecificationRequest

Request model for creating an assembly specification.

CreateKnowledgeServiceQueryRequest

Request model for creating a knowledge service query.

Module Contents

class julee.api.requests.CreateAssemblySpecificationRequest(/, **data)[source]

Bases: pydantic.BaseModel

Request model for creating an assembly specification.

This model defines what clients need to provide when creating a new assembly specification. Validation logic is delegated to the domain model to ensure consistency and avoid duplication.

Fields excluded from client control: - assembly_specification_id: Always generated by the server - status: Always set to DRAFT initially by the server - created_at/updated_at: System-managed timestamps

to_domain_model(assembly_specification_id)[source]

Convert this request to a complete AssemblySpecification object.

Parameters:

assembly_specification_id (str) – The ID to assign to the new spec

Returns:

Complete domain object with system fields

Return type:

AssemblySpecification

classmethod validate_applicability(v)[source]
classmethod validate_jsonschema(v)[source]
classmethod validate_knowledge_service_queries(v, info)[source]
classmethod validate_name(v)[source]
classmethod validate_version(v)[source]
applicability: str = None[source]
jsonschema: dict[str, Any] = None[source]
knowledge_service_queries: dict[str, str] = None[source]
name: str = None[source]
version: str = None[source]
class julee.api.requests.CreateKnowledgeServiceQueryRequest(/, **data)[source]

Bases: pydantic.BaseModel

Request model for creating a knowledge service query.

This model defines what clients need to provide when creating a new knowledge service query. Validation logic is delegated to the domain model and descriptions are reused to avoid duplication while maintaining single source of truth in the domain layer.

Fields excluded from client control: - query_id: Always generated by the server - created_at/updated_at: System-managed timestamps

to_domain_model(query_id)[source]

Convert this request to a complete KnowledgeServiceQuery object.

Parameters:

query_id (str) – The ID to assign to the new query

Returns:

Complete domain object with system fields

Return type:

KnowledgeServiceQuery

classmethod validate_knowledge_service_id(v)[source]
classmethod validate_name(v)[source]
classmethod validate_prompt(v)[source]
assistant_prompt: str | None = None[source]
knowledge_service_id: str = None[source]
name: str = None[source]
prompt: str = None[source]
query_metadata: dict[str, Any] = None[source]