Skip to content

[Bug] Silent failure when parsing modular OpenAPI 3.1.0 specs #7585

Description

@vridhib

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

  1. Clone the v5 branch and install openbb-cli.
  2. 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.
  3. Run: openbb --generate-spec --server http://localhost:8000 --openapi-path /openapi.yaml --output eodhd.spec
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    V5PRs and issues for ODP V5bugBugs and bug fixescliOpenBB Platform CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions