OAI / OAI/OpenAPI-Specification

Hypermedia and path variable

Open
#1,553 17 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

links
Dominant language
Markdown
Stars
31.2k
Forks
9.2k
Avg merge
6h 37m
Merged PRs (30d)
27

Description

Hi everyone,

I'm facing an issue an i don't know if there is a solution yet.

Is it possible to pass an absolute URI from a links object as a variable for a path ?

Example :

links:
  pathLink:
    operationId: whatever
      parameters:
        pathUri: '$response.body#_links/whatever/href'

And then having as a path :

paths:
  '{pathUri}':
    get:
    operationId: whatever
      parameters:
        - name: pathUri
          in: path
          required: true
          schema:
            type: string

According to the specification, paths must be relative but in that specific case could it be acceptable ?

Thanks for your answers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file, test, or entry point is named. Start with the YAML examples and review the relevant OpenAPI path and link rules alongside the comment discussion; done means reaching a documented decision on whether an absolute URI may be used as a path variable.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.