Skip to content

Commit fd3551a

Browse files
committed
update README.md
1 parent 7031be3 commit fd3551a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,13 +223,20 @@ bin/console apidocbundle:component:schema "App\DTO\UserDTO" --format=both
223223
When generating a component, the command will automatically check if a component with the same name already exists in your codebase:
224224

225225
1. **Same format exists**: If you're generating a YAML file and a YAML file with the same component already exists (or PHP for PHP), you will be prompted to confirm if you want to overwrite it.
226+
- **Diff View**: If the file exists, the command will display a colored diff (green for additions, red for deletions) showing exactly what will change if you overwrite the file.
226227

227228
2. **Different format exists**: If you're generating a YAML file but a PHP file with the same component already exists (or vice versa), you will be warned about potential duplicate definitions and asked to confirm before continuing.
228229

229230
**Example output:**
230231
```
231232
Component already exists in YAML file: /path/to/schemas/UserDTO.yaml
232-
Do you want to overwrite this file with new values ? (yes or no, default is YES)
233+
Differences found:
234+
--- Original
235+
+++ New
236+
- type: string
237+
+ type: integer
238+
239+
Do you want to overwrite this file? (yes or no, default is YES)
233240

234241
Component also exists in PHP file: /path/to/schemas/UserDTO.php
235242
Do you want to continue generating the YAML file? This may cause duplicate definitions. (yes or no, default is YES)

0 commit comments

Comments
 (0)