Skip to content

Commit aadeb83

Browse files
committed
fix ci
1 parent 68af9ca commit aadeb83

3 files changed

Lines changed: 923 additions & 109 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -124,25 +124,25 @@ documentation:
124124
You can define your documentation programmatically using PHP classes. This offers strong typing and IDE autocompletion.
125125

126126
1. Create a class that implements `Ehyiah\ApiDocBundle\Interfaces\ApiDocConfigInterface`.
127-
2. Add the `#[ApiDocComponent]` attribute with a unique `id`.
127+
2. Add the `#[ApiDocConfig]` attribute with a unique `component` name.
128128
3. Implement the `configure` method.
129129
4. Your class is automatically autoloaded and parsed.
130130

131-
The `#[ApiDocComponent]` attribute is **required**. It lets the TUI find and edit your component regardless of file location or class name.
131+
The `#[ApiDocConfig]` attribute lets the DI registry find your component regardless of file location or class name.
132132

133-
- **`id`** — A unique string that identifies this component. Use the same name as the OpenAPI component key (e.g., for a schema named `User`, use `id: 'User'`). For routes, use the route name (e.g., `id: 'api_users'`).
134-
- **`type`** — Optional. A hint for the TUI (e.g., `'schema'`, `'response'`, `'tag'`). Auto-detected in most cases.
133+
- **`component`** — A unique string that identifies this component. Use the same name as the OpenAPI component key (e.g., for a schema named `User`, use `component: 'User'`). For routes, use the route name (e.g., `component: 'api_users'`).
134+
- **`type`** — The component type (e.g., `'schemas'`, `'responses'`, `'routes'`).
135135

136136
**Example `src/ApiDoc/UserDocConfig.php`:**
137137
```php
138138
<?php
139139
namespace App\ApiDoc;
140140
141-
use Ehyiah\ApiDocBundle\Attributes\ApiDocComponent;
141+
use Ehyiah\ApiDocBundle\Attributes\ApiDocConfig;
142142
use Ehyiah\ApiDocBundle\Builder\ApiDocBuilder;
143143
use Ehyiah\ApiDocBundle\Interfaces\ApiDocConfigInterface;
144144
145-
#[ApiDocComponent(id: 'api_user_by_id')]
145+
#[ApiDocConfig(component: 'api_user_by_id', type: 'routes')]
146146
class UserDocConfig implements ApiDocConfigInterface
147147
{
148148
public function configure(ApiDocBuilder $builder): void

0 commit comments

Comments
 (0)