Skip to content

bug: crash when spec contains external $ref (HTTP/HTTPS URLs) #121

Description

DO NOT SUBMIT SECURITY REPORTS HERE

If you have a security vulnerability, please report it following our security policy.

Bug Report

Amazing GitHub Template version:
2.4.0

Current behavior:
When the OpenAPI spec contains $ref pointing to external URLs
(e.g. $ref: 'https://raw.githubusercontent.com/...'), o2p crashes:

TypeError: Cannot read properties of undefined (reading '')
at findObject (refs.js:32)

Expected behavior:
Either support external $ref resolution, or show a clear error message
indicating they are not supported, instead of an unhandled crash.

Steps to reproduce:

  1. Use an OpenAPI spec with at least one $ref pointing to an external URL
  2. Run o2p with any config
  3. o2p crashes before generating any output

Related code:
src/parser/openapi3/refs.js:32

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions