Pattern properties do not load external $refs
Open
Nobody has claimed this yet.
openapi
Type: Bug
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
Describe the bug
Pattern properties do not load external $refs, it seems to work if the $refs are local, but I didn't properly test it
Expected behavior
$refs should properly load external files
Minimal reproducible OpenAPI snippet(if possible)
test.yaml
openapi: 3.1.0
info:
title: "Example"
version: "1.0"
description: "Example"
paths:
"/test/":
get:
summary: Example
responses:
200:
description: List of shops and their details
content:
"application/json":
schema:
type: object
properties:
"working":
$ref: "testobj.yaml"
patternProperties:
"not-working":
$ref: "testobj.yaml"
testobj.yaml
type: object
properties:
key:
type: number
Screenshots
Contributor guide
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.
Research direction
Reproduce the issue with test.yaml and the referenced testobj.yaml, comparing the properties and patternProperties cases. Trace how external $refs are loaded for the OpenAPI 3.1 schema and verify that the patternProperties reference renders or resolves like the local and properties references.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100