`Bundle` writes `components.pathItems` into OpenAPI 3.0 documents
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
- Domain
- backend-api-design
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from speakeasy-api/openapi
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
speakeasy-api/openapi#285 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
speakeasy-api/openapi#283 ·
Maintainers usually reply within 1 day
-
`openapi spec lint --fix` drops node-level fixes and can duplicate pathsPossibly taken @RaphaelFakhri claimed this 4 days ago. Open
Difficulty 4/5 1-2 days Newbie friendliness 35/100
speakeasy-api/openapi#280 ·
Maintainers usually reply within 1 day
All issues in speakeasy-api/openapi
Similar issues
-
VLAgent `spec.k8sCollector.includePodLabels: false` has no effectPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
VictoriaMetrics/operator#2772 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Gaurav-Gosain/tuios#1316 ·
Maintainers usually reply within 1 day
-
needs: investigation
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
area:auth documentation priority:low
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Mend: dependency security vulnerability
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
kube-tarian/sigrun#203 ·