Data Models & Schemas
Relevant source files
The following files were used as context for generating this wiki page:
Introduction
The flext-oracle-oic extension implements a structured data modeling layer for interacting with Oracle Integration Cloud (OIC). This system utilizes the FLEXT Unified Models pattern, extending base Pydantic-based models to provide centralized validation, type safety, and clear domain boundaries for OIC resources such as integrations, connections, and authentication configurations.
These models serve as the foundational schema for API requests, response parsing, and internal data processing within the extension. By segregating configuration (Value Objects) from resource representations (Entities), the project ensures consistent data handling across the CRUD services and utility modules.
Sources: src/flext_oracle_oic/models.py:12-23, src/flext_oracle_oic/constants.py:17-23
Core Data Architecture
The data architecture is organized into the FlextOracleOicModels class, which acts as a namespace for the OracleOic domain. It distinguishes between configuration objects used for establishing connectivity and entity objects that represent remote OIC resources.
Model Class Hierarchy
The following class diagram illustrates the relationship between the core model definitions:
The models leverage m.Value for immutable configuration data and m.Entity for objects identified by unique IDs.
Sources: src/flext_oracle_oic/models.py:18-120, tests/unit/test_models.py:16-110
Configuration Models
These models handle the sensitive and structural data required to communicate with Oracle IDCS and OIC instances.
OIC Authentication Configuration
The OICAuthConfig model encapsulates OAuth2 credentials. It uses t.SecretStr for the client secret to prevent accidental logging or exposure.
| Field | Type | Description |
|---|---|---|
oauth_client_id | str | IDCS OAuth2 client identifier |
oauth_client_secret | t.SecretStr | Sensitive OAuth2 client secret |
oauth_token_url | str | Identity service token endpoint |
oauth_client_aud | str | None | Optional OAuth2 audience |
oauth_scope | str | OAuth2 permission scope |
Sources: src/flext_oracle_oic/models.py:31-52, src/flext_oracle_oic/settings.py:38-44
OIC Connection Configuration
Defines the parameters for the HTTP client interacting with the OIC REST API.
| Field | Type | Default | Description |
|---|---|---|---|
base_url | str | (Required) | Instance base URL |
api_version | str | v1 | OIC API version |
request_timeout | int | 30 | Timeout in seconds |
max_retries | int | 3 | Max retry attempts |
verify_ssl | bool | True | SSL verification flag |
Sources: src/flext_oracle_oic/models.py:59-86, src/flext_oracle_oic/constants.py:59-67
Resource Entity Models
These models represent the state of objects retrieved from or sent to the Oracle Integration Cloud service.
Integration Information
OICIntegrationInfo represents the metadata of an OIC integration flow.
class OICIntegrationInfo(m.Entity):
integration_id: Annotated[str, u.Field(description="Integration unique identifier")]
name: Annotated[str, u.Field(description="Integration name")]
status: Annotated[str, u.Field(description="Integration status")]
integration_version: Annotated[str, u.Field(description="Integration version")]
description: Annotated[str, u.Field(description="Integration description")] = ""
Sources: src/flext_oracle_oic/models.py:88-111, src/flext_oracle_oic/services/integration_crud.py:175-188
Connection Information
OICConnectionInfo provides details about configured adapters (e.g., REST, SOAP, Database) within the OIC environment.
| Field | Type | Description |
|---|---|---|
connection_id | str | Unique connection identifier |
adapter_type | str | Type of adapter (REST, Database, etc.) |
status | str | Current status (ACTIVE, ERROR) |
connection_type | str | Internal OIC connection category |
Sources: src/flext_oracle_oic/models.py:113-131, src/flext_oracle_oic/constants.py:110-128
Validation & Constraints
Data integrity is enforced through a combination of Pydantic types and utility-based regex validation.
Validation Flow
When data enters the system (e.g., during integration deployment), it undergoes a validation plan before being cast to a model.
Validation constants define the following constraints:
- Integration Names: Must match
^[a-zA-Z0-9_\-\s]+$and be between 1 and 100 characters. - Versions: Must follow the
XX.XX.XXXXpattern. - Statuses: Must be within the allowed set (ACTIVATED, DEACTIVATED, DRAFT, etc.).
Sources: src/flext_oracle_oic/constants.py:177-204, src/flext_oracle_oic/_utilities/oracle_oic.py:35-65
Conclusion
The Data Models & Schemas in flext-oracle-oic provide a robust, type-safe framework for managing Oracle Integration Cloud metadata. By centralizing validation logic in the models.py and constants.py files, the project ensures that any data processed by services—whether for CRUD operations or monitoring—adheres to OIC's technical requirements and enterprise standards.