@@ -34,6 +34,9 @@ public function generate(string $namespace, string $destinationPath)
34
34
}
35
35
foreach ($ this ->spec ->components ->schemas as $ name => $ schema ) {
36
36
$ schemaClassName = $ schemaClassNameMap [spl_object_hash ($ schema )];
37
+ if (strlen ($ schemaClassName ) === 0 ) {
38
+ continue ;
39
+ }
37
40
@mkdir (dirname ($ destinationPath . '/Schema/ ' . $ schemaClassName ), 0777 , true );
38
41
file_put_contents ($ destinationPath . '/Schema/ ' . $ schemaClassName . '.php ' , $ codePrinter ->prettyPrintFile ([
39
42
Schema::generate (
@@ -48,6 +51,9 @@ public function generate(string $namespace, string $destinationPath)
48
51
49
52
foreach ($ this ->spec ->paths as $ path => $ pathItem ) {
50
53
$ pathClassName = $ this ->className ($ path );
54
+ if (strlen ($ pathClassName ) === 0 ) {
55
+ continue ;
56
+ }
51
57
@mkdir (dirname ($ destinationPath . '/Path/ ' . $ pathClassName ), 0777 , true );
52
58
file_put_contents ($ destinationPath . '/Path/ ' . $ pathClassName . '.php ' , $ codePrinter ->prettyPrintFile ([
53
59
Path::generate (
@@ -61,7 +67,9 @@ public function generate(string $namespace, string $destinationPath)
61
67
foreach ($ pathItem ->getOperations () as $ method => $ operation ) {
62
68
$ operationClassName = $ this ->className ((new Convert ($ operation ->operationId ))->fromTrain ()->toPascal ());
63
69
$ operations [$ method ] = $ operationClassName ;
64
-
70
+ if (strlen ($ operationClassName ) === 0 ) {
71
+ continue ;
72
+ }
65
73
@mkdir (dirname ($ destinationPath . '/Operation/ ' . $ operationClassName ), 0777 , true );
66
74
file_put_contents ($ destinationPath . '/Operation/ ' . $ operationClassName . '.php ' , $ codePrinter ->prettyPrintFile ([
67
75
Operation::generate (
0 commit comments