Skip to content

Swagger path ref remote URL of another Swagger document #2071

Closed
@thisiskarthikj

Description

@thisiskarthikj

I am try to set a path's ref to another document in the remote server like as follows:

swagger: '2.0'
info:
  title: REST API specification
  description: >-
    test
host: 'localhost:3000'
basePath: /rest/abc/v4
schemes:
  - http
paths:
  /proxy2:
    $ref: "http://localhost:8080/api-docs/abc-rest-api-spec.yaml#/config"

Where abc-rest-api-spec.yaml is in another server. When I start the NodeJS server and access the swagger docs (with http://localhost:3000/api-docs), I do not see the API /proxy2 in swagger document.

The Spec documentation shows that using $ref for path is supported and it can point to absolute external URLs. Am I missing something ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions