Context
While testing the new V5 codegen workflow suggested by @deeleeramone in issue #7582, I attempted to generate an extension using the OpenAPI 3.1.0 spec (https://github.com/EodHistoricalData/EODHD-openapi) listed on EODHD's website.
Since EODHD does not host a public OpenAPI spec on their API domain, I cloned their modular OpenAPI repo (which splits 84 endpoints across different YAML files using $ref) and served it locally.
Steps to Reproduce
- Clone the
v5 branch and install openbb-cli.
- Clone the
EodHistoricalData/EODHD-openapi repo (git clone https://github.com/EodHistoricalData/EODHD-openapi) and serve the root openapi.yaml locally via python3 -m http.server 8000.
- Run:
openbb --generate-spec --server http://localhost:8000 --openapi-path /openapi.yaml --output eodhd.spec
- Run:
openbb --generate-extension --spec eodhd.spec --provider-name eodhd --output ./openbb-eodhd
Expected Behavior
The codegen parser should either successfully map the modular YAML $ref tags into OpenBB's internal command schema, or it should throw a clear ValidationError/ParseError to warn the user that the spec format is incompatible.
As noted in the CLI help docs, YAML is an accepted format:
--openapi-path PATH Path (or full URL) to the OpenAPI document on the server. Defaults to /openapi.json. Servers that publish under a different name (e.g. NY Fed at /static/docs/markets-api.yml) need this. JSON or YAML accepted.
Actual Behavior
The tool completes without throwing a traceback, but outputs a skeleton package with zero commands, as shown here:
wrote 0 commands to eodhd.spec
providers (1): eodhd
routers (1): eodhd
fetchers: 0 GET (across all providers)
POST: 0 local-compute commands
The generated __init__.py contains an empty fetcher_dict={}. If a user sees the "success" message, they will install the package assuming it works, yet discover that it has no commands.
Environment
Context
While testing the new V5 codegen workflow suggested by @deeleeramone in issue #7582, I attempted to generate an extension using the OpenAPI 3.1.0 spec (https://github.com/EodHistoricalData/EODHD-openapi) listed on EODHD's website.
Since EODHD does not host a public OpenAPI spec on their API domain, I cloned their modular OpenAPI repo (which splits 84 endpoints across different YAML files using
$ref) and served it locally.Steps to Reproduce
v5branch and installopenbb-cli.EodHistoricalData/EODHD-openapirepo (git clone https://github.com/EodHistoricalData/EODHD-openapi) and serve the rootopenapi.yamllocally viapython3 -m http.server 8000.openbb --generate-spec --server http://localhost:8000 --openapi-path /openapi.yaml --output eodhd.specopenbb --generate-extension --spec eodhd.spec --provider-name eodhd --output ./openbb-eodhdExpected Behavior
The codegen parser should either successfully map the modular YAML
$reftags into OpenBB's internal command schema, or it should throw a clearValidationError/ParseErrorto warn the user that the spec format is incompatible.As noted in the CLI help docs, YAML is an accepted format:
Actual Behavior
The tool completes without throwing a traceback, but outputs a skeleton package with zero commands, as shown here:
The generated
__init__.pycontains an emptyfetcher_dict={}. If a user sees the "success" message, they will install the package assuming it works, yet discover that it has no commands.Environment