這篇官方文件就有使用相對路徑
    definitions:
      CatalogItem:
        type: object
        properties:
          id:
            type: integer
            example: 38
          title:
            type: string
            example: T-shirt
          image:
            type: object
            properties:
              url:
                type: string
              width:
                type: integer
              height:
                type: integer
            required:
              - url
            example:   # <-----
              url: images/38.png
              width: 100
              height: 100
        required:
          - id
          - title
萬一你的「相對路徑」指的是「本機的檔案路徑」
那就更容易了
你直接設定看看就知道可不可以了images/38.png./images/38.pngfile://images/38.png