Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--ext-refs is not working properly #191

Open
mrstegeman opened this issue Feb 25, 2025 · 5 comments
Open

--ext-refs is not working properly #191

mrstegeman opened this issue Feb 25, 2025 · 5 comments

Comments

@mrstegeman
Copy link

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]
@lupor
Copy link

lupor commented Feb 25, 2025

I think this is related to the issue that i posted here: #190

@mrstegeman
Copy link
Author

Ah yes, I think you're right!

daveshanley added a commit that referenced this issue Feb 26, 2025
Addresses issues #190 and #191
daveshanley added a commit that referenced this issue Feb 26, 2025
Addresses issues #190 and #191
@daveshanley
Copy link
Member

fixed in v0.0.76

@mrstegeman
Copy link
Author

@daveshanley This is still not working on 0.0.76. I'm getting the exact same error output.

@daveshanley daveshanley reopened this Feb 26, 2025
@daveshanley
Copy link
Member

Damn, sorry wil re-investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants