Add a way to create schemas
- Dominant language
- PHP
- Stars
- 500
- Forks
- 99
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
The library allows to create paths, but apparently doesn't provide any way to add schemas.
Doing something like:
`$objOpenapi->components->schemas['foo'] = new Schema([
'type' => Type::INTEGER,
]);`
gives a warning and the element is not created:
PHP Notice: Indirect modification of overloaded property cebe\openapi\spec\Components::$schemas has no effect in G:\test.php on line 119
Am I missing something ?
If not, it would be nice if we could create dynamically elements using this library.
Thank in advance
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the example in the issue and inspect how cebe\openapi\spec\Components handles the overloaded schemas property. Determine the supported path for adding a schema dynamically; done means a schema can be created and added without the reported PHP notice.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100