GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — $ref using '{' and '}' characters are creating wrong path to resolve Headers · Issue #2033 · swagger-api/swagger-parser

$ref using '{' and '}' characters are creating wrong path to resolve Headers #2033

New issue
Copy link
New issue
Copy link
Closed
#2394
Closed
$ref using '{' and '}' characters are creating wrong path to resolve Headers#2033
#2394
Copy link

Description

@vfouqueron
vfouqueron
opened on Jan 5, 2024
Issue body actions
openapi: 3.0.3
info:
  title: My Title
  description: Mydescription
  version: 0.0.1
paths:
  /nodes/{uuid}/rights:
    $ref: "traceability/nodes.yaml#/paths/~1nodes~1{uuid}~1rights"
openapi: 3.0.3
info:
  title: nodes.yaml
  version: 0.0.1
paths:
   /nodes/{uuid}/rights:
    get:
      operationId: listNodeRights
      tags:
        - Nodes

      responses:
        206:
          description: Partial
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "../rights.yaml#/components/schemas/NodeRightDto"
          headers:
            Content-Range:
              $ref: "../common-spec-openapi.yaml#/components/headers/Content-Range"
openapi: 3.0.3
info:
  title: common-spec-openapi.yaml
  version: 0.0.1
components:
  headers:
    Content-Range:
      schema:
        pattern: \d+-\d+\/\d+
        type: string
paths: {}

When in ExternalRefProcessor, in method processRefHeader, we call the join function. This function calls a new URI with "traceability/nodes.yaml#/paths/1nodes1{uuid}~1rights", the URI method throws an Exception as { is an invalid URI character, resulting into being caught and returning the source value, "traceability/nodes.yaml#/paths/1nodes1{uuid}~1rights" instead of ./common-spec-openapi.yaml#/components/headers/Content-Range

Activity

  1. ewaostrowska
    added a commit that references this issue on Aug 31, 2026

    fix: Fix resolution of external refs inside path items with templated…

    1fa765b
  2. ewaostrowska commented on Aug 31, 2026

    @ewaostrowska
    ewaostrowska
    on Aug 31, 2026
    Contributor
    More actions

    Hi @vfouqueron, , thank you for the report!
    This issue should be resolved when the PR #2394 is merged

  3. ewaostrowska
    closed this as completedon Aug 31, 2026
  4. ewaostrowska
    added a commit that references this issue on Aug 31, 2026

    Fix: resolution of external refs inside path items with templated fra…

    28b1a73
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.