Skip to content

Issue #5 - [BUG] Path parameters missing from operation display #8

@zenocross

Description

@zenocross

Description

Path parameters defined in the OpenAPI specification are not being displayed in the operation details, making it unclear what parameters are required in the URL path.

Current Behavior

  • Operations with path parameters are rendered
  • Path parameters are not shown in the parameters section
  • Users cannot see which path variables need to be provided
  • Only query, header, and body parameters are visible

Expected Behavior

  • Path parameters should appear in the parameters list
  • Each path parameter should show:
    • Parameter name
    • Type
    • Description
    • Required status
    • Example value
  • Path parameters should be clearly distinguished from other parameter types

Steps to Reproduce

  1. Load an OpenAPI specification with path parameters
  2. Example: GET /users/{userId}/posts/{postId}
  3. Navigate to this operation in the API reference
  4. Check the parameters section
  5. Observe that userId and postId are not listed

Proposed Solution

Update the operation parameter rendering logic to include path parameters from the OpenAPI specification. This requires:

  • Extracting path parameters from the operation object
  • Adding them to the parameters list in the UI
  • Ensuring proper formatting and labeling as "path" parameters

Technical Context

  • Component: api-reference
  • Involves OpenAPI specification parsing
  • Vue component updates for parameter display
  • May require updating parameter extraction logic

Download https://cap.so/ to record your screen (use Studio mode). Export as an mp4, and drag and drop into an issue comment below.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions