Coverage for src/common/models/openapi_entity.py: 100%
9 statements
« prev ^ index » next coverage.py v7.6.10, created at 2025-02-08 15:51 -0500
« prev ^ index » next coverage.py v7.6.10, created at 2025-02-08 15:51 -0500
1"""Class for storing the data objects, called entities, that the CueCode
2Config algorithm can detect in an OpenAPI spec."""
4import uuid
6from sqlalchemy import Column, ForeignKey, Text
7from sqlalchemy.dialects.postgresql import UUID
9from .base import Base
12class OpenAPIEntity(Base): # pylint: disable=too-few-public-methods
13 """Stores the data objects, called entities, that the CueCode
14 Config algorithm can detect in an OpenAPI spec."""
16 __tablename__ = "openapi_entity"
18 openapi_entity_id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
19 contained_in_oa_spec_id = Column(
20 UUID(as_uuid=True), ForeignKey("openapi_spec.openapi_spec_id"), nullable=False
21 )
22 noun_prompt = Column(Text, nullable=False)
23 # TODO: add embedding pylint: disable=fixme