Skip to content

Commit

Permalink
Add custom generator support to open api spec (#912)
Browse files Browse the repository at this point in the history
* Add custom generator support to open api spec

* Add documentation and improve naming

* fix phpdoc

* fix override generator

* Resolve conflicts

---------

Co-authored-by: Shalvah <[email protected]>
  • Loading branch information
olivernybroe and shalvah authored Feb 3, 2025
1 parent 81bb70b commit 9323b8b
Show file tree
Hide file tree
Showing 11 changed files with 912 additions and 620 deletions.
4 changes: 4 additions & 0 deletions config/scribe.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
'overrides' => [
// 'info.version' => '2.0.0',
],

// Additional generators to use when generating the OpenAPI spec.
// Should extend `Knuckles\Scribe\Writing\OpenApiSpecGenerators\OpenApiGenerator`.
'generators' => [],
],

'groups' => [
Expand Down
1 change: 1 addition & 0 deletions src/Config/Output.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public static function postman(
public static function openApi(
bool $enabled = true,
array $overrides = [],
array $generators = [],
): array
{
return get_defined_vars();
Expand Down
652 changes: 39 additions & 613 deletions src/Writing/OpenAPISpecWriter.php

Large diffs are not rendered by default.

Loading

0 comments on commit 9323b8b

Please sign in to comment.