Skip to content

--ext-refs is not working properly #191

Open
@mrstegeman

Description

@mrstegeman

This new flag was added (per my request in #186) in a894170. However, it doesn't seem to be working properly.

Here's a stripped down openapi.yaml to test with:

openapi: 3.0.3
paths:
  /metrics:
    post:
      tags:
        - metrics
      summary: Upload metrics.
      description: Proxies metrics to Prometheus and any other configured sinks.
      operationId: uploadMetrics
      parameters:
        - $ref: '#/components/parameters/XRequestIdHeaderParameter'
      responses:
        '204':
          $ref: '#/components/responses/NoContent'
components:
  schemas:
    Text:
      type: string
      description: Text string.
  responses:
    NoContent:
      description: No Content
      headers:
        x-request-id:
          $ref: '#/components/headers/x-request-id'
  parameters:
    XRequestIdHeaderParameter:
      description: |-
        Unique request ID. If one is not provided, it will be generated automatically and returned in the
        response headers. The request ID is useful when tracing logs.
      name: x-request-id
      in: header
      required: false
      schema:
        $ref: '#/components/schemas/Text'
  headers:
    x-request-id:
      description: Unique request ID, useful when tracing logs.
      required: false
      schema:
        $ref: '#/components/schemas/Text'
➜   openapi-changes summary -n --ext-refs -b ./openapi.yaml ./openapi.yaml
2025-02-19 21:51:24 ERROR unable to locate reference anywhere in the rolodex reference: #/components/headers/x-request-id
2025-02-19 21:51:24 ERROR unable to locate reference anywhere in the rolodex reference: #/components/headers/x-request-id
ERROR: cannot resolve reference `#/components/headers/x-request-id`, it's missing: $.components.headers['x-request-id'] [25:11]
ERROR: cannot resolve reference `#/components/headers/x-request-id`, it's missing: $.components.headers['x-request-id'] [25:11]
Error: cannot resolve reference `#/components/headers/x-request-id`, it's missing: $.components.headers['x-request-id'] [25:11]
cannot resolve reference `#/components/headers/x-request-id`, it's missing: $.components.headers['x-request-id'] [25:11]

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions