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

Resolver error: Could not resolve reference: Could not resolve pointer: #9922

Open
avrahamGross opened this issue May 7, 2024 · 0 comments

Comments

@avrahamGross
Copy link

  • OS: macOS
  • Browser: chrome, safari, firefox
  • Version: [e.g. 22]
  • Method of installation: npm
  • Swagger-UI version: > 5.17.2
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

openapi: 3.0.0
info:
  title: Test API
  description: test spec
  version: 0.0.1
paths:
  /test/v1/endpoint:
    get:
      parameters:
      - $ref: https://dev-apiforge.cvshealth.com/api-oas/global-domains/test-domain-v1~0.0.1.yaml#/components/parameters/A
      - $ref: http://localhost:3000/oas/test-domain-v1~0.0.1.yaml#/components/parameters/B
      responses:
        '200':
          description: Success.
          content:
            application/json:
              schema:
                $ref: http://localhost:3000/oas/test-domain-v1~0.0.1.yaml#/components/parameters/A

Describe the bug you're encountering

I have refs retrieved through an API endpoint. They are properly returned and resolved inside the editor. However, swagger-ui has a problem resolving them.
When expanding an operation an error displays:

Resolver error at paths./test/v1/endpoint.get.parameters.0.$ref
Could not resolve reference: Could not resolve pointer: /components/parameters/A does not exist in document

Screenshots

Screenshot 2024-05-07 at 1 15 24 PM

Expected behavior

Additional context or thoughts

Interestingly, when added the reference files to the public folder and referencing them through there, there is no error. However it is undesirable to require a new build every time a ref is modified or added to the referenced file.

Screenshot 2024-05-07 at 1 16 49 PM

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

No branches or pull requests

1 participant