cebe / cebe/php-openapi

allOf is not properly merged

Open
#31 16 comments 0 reactions 0 assignees View on GitHub
bug help wanted needs investigation
Dominant language
PHP
Stars
500
Forks
99
PR merge metrics
No merged PRs in 30d

Description

Given a schema that uses `allOf` to combine two different `object` schemas, the properties of the two schemas are not combined:

```json
{
"components": {
"schemas": {
"identifier": {
"type": "object",
"properties": {
"id": {"type": "string"}
}
},
"person": {
"allOf": [
{"$ref": "#/components/schemas/identifier"},
{
"type": "object",
"properties": {
"name": {
"type": "string"
}
}
}
]
}
}
}
}
```

Not 100% sure that schema validates, but it should be a good start.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the provided OpenAPI schema in the project's schema parsing path and confirm whether the example validates. Trace how allOf schemas are combined, then verify that the resulting person schema exposes both id and name properties.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.