rename extra dict

This commit is contained in:
montezdesousa
2024-02-14 13:15:11 +00:00
parent 94e5a5d866
commit 47a97dfb26
11 changed files with 11 additions and 11 deletions

View File

@@ -26,7 +26,7 @@ class QueryParams(BaseModel):
"""
__alias_dict__: Dict[str, str] = {}
__openbb_extra__: Dict[str, Any] = {}
__json_schema_extra__: Dict[str, Any] = {}
def __repr__(self):
"""Return the string representation of the QueryParams object."""

View File

@@ -113,7 +113,7 @@ class RegistryMap:
extra_query,
):
model: BaseModel = RegistryMap._get_model(fetcher, type_)
for f, props in getattr(model, "__openbb_extra__", {}).items():
for f, props in getattr(model, "__json_schema_extra__", {}).items():
for p in props:
if f in standard_query["fields"]:
model_field = standard_query["fields"][f]

View File

@@ -35,7 +35,7 @@ class AVEquityHistoricalQueryParams(EquityHistoricalQueryParams):
Source: https://www.alphavantage.co/documentation/#time-series-data
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: Literal["1m", "5m", "15m", "30m", "60m", "1d", "1W", "1M"] = Field(
default="1d",

View File

@@ -30,7 +30,7 @@ class CboeEquityHistoricalQueryParams(EquityHistoricalQueryParams):
Source: https://www.cboe.com/
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: Literal["1m", "1d"] = Field(
default="1d",

View File

@@ -24,7 +24,7 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
"""
__alias_dict__ = {"start_date": "from", "end_date": "to"}
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
timeseries: Optional[NonNegativeInt] = Field(
default=None, description="Number of days to look back."

View File

@@ -26,7 +26,7 @@ class FMPEquityHistoricalQueryParams(EquityHistoricalQueryParams):
"""
__alias_dict__ = {"start_date": "from", "end_date": "to"}
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
limit: Optional[NonNegativeInt] = Field(
default=None,

View File

@@ -36,7 +36,7 @@ class PolygonCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
Source: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: str = Field(
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")

View File

@@ -36,7 +36,7 @@ class PolygonEquityHistoricalQueryParams(EquityHistoricalQueryParams):
Source: https://polygon.io/docs/stocks/getting-started
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: str = Field(
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")

View File

@@ -24,7 +24,7 @@ class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams):
"start_date": "startDate",
"end_date": "endDate",
}
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: Literal["1d", "1W", "1M", "1Y"] = Field(
default="1d", description=QUERY_DESCRIPTIONS.get("interval", "")

View File

@@ -26,7 +26,7 @@ class YFinanceCryptoHistoricalQueryParams(CryptoHistoricalQueryParams):
Source: https://finance.yahoo.com/crypto/
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: Optional[INTERVALS] = Field(default="1d", description="Data granularity.")
period: Optional[PERIODS] = Field(

View File

@@ -26,7 +26,7 @@ class YFinanceEquityHistoricalQueryParams(EquityHistoricalQueryParams):
Source: https://finance.yahoo.com/
"""
__openbb_extra__ = {"symbol": ["multiple_items_allowed"]}
__json_schema_extra__ = {"symbol": ["multiple_items_allowed"]}
interval: Optional[
Literal[