Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

`Bundle` writes `components.pathItems` into OpenAPI 3.0 documents

Open Beginner friendly
#284 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
83/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
go, openapi

Research direction

Start with openapi/bundle.go, where bundleObject sends referenced path items to bundleGenericReference with the pathItems component name. Check how the bundle code determines the OpenAPI version and look for existing bundle tests covering referenced path items. For OpenAPI 3.0, the path item should appear inline under paths; confirm the bundled document no longer adds components.pathItems.

Written by the indexing model from the issue text.

Description

Summary

For an OpenAPI 3.0 document, openapi.Bundle (and openapi spec bundle) moves a path item that lives in another file into components.pathItems. That field was added in 3.1: the 3.0 Components Object has no pathItems (its fixed fields are schemas, responses, parameters, examples, requestBodies, headers, securitySchemes, links and callbacks), so the bundled document is no longer valid 3.0.

Reproduction

openapi.yaml:

openapi: 3.0.3
info: {title: t, version: "1"}
paths:
  /items:
    $ref: ./paths/items.yaml

paths/items.yaml:

get:
  responses:
    "200":
      description: ok
$ openapi spec bundle openapi.yaml
openapi: 3.0.3
info: {title: t, version: "1"}
paths:
  /items:
    $ref: '#/components/pathItems/items'
components:
  pathItems:
    items:
      get:
        responses:
          "200":
            description: ok

Expected result

A valid 3.0 document: with nowhere in 3.0 components to hold it, the path item written inline under paths./items. redocly bundle does this for the same input.

Actual result

components.pathItems in a 3.0.3 document. vacuum's oas3-schema rule rejects it (schema invalid: `/components` additional properties not allowed: `[pathItems]` ), while openapi spec validate reports it valid.

Version

v1.26.0 (also main, d269643). CLI from go install github.com/speakeasy-api/openapi/cmd/openapi@latest (v0.0.0-20261016011534-d2696438ec74).

Cause

bundleObject sends every ReferencedPathItem to bundleGenericReference(..., "pathItems") (openapi/bundle.go:199) whatever the document's openapi version.

Dominant language
Go
Stars
276
Forks
21
Avg merge
1d 5h
Merged PRs (30d)
18

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from speakeasy-api/openapi

All issues in speakeasy-api/openapi

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.