-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Simplified code * Removed marker interface * Reworked response codes * Fixed code style * Change CS php version * Fixed statical errors * Removed forced cache clearing * Refresh command removed, generate command now removes unused files * Updated README.md * Improved handling of empty responses * Added skipHttpCodes option * Renamed object type to object schema * Simplified DTO structure and unified request handler interface generation * Added components support * Fixed codestyle * Fixed namings * Fixed `Variable "_" is not in valid camel caps format` error * fixed phpstan errors * Fixed DocblockTypeContradiction error * fixed UnnecessaryVarAnnotation * fixed generation and functional tests * generation test. Fixed error * Functional test. Fixed error * Fixed ObjectType and ResponseDto errors * fixed RequestDtoDefinitionTest * fixed unit tests * fixed code styles errors * fixed mutation tests * codestyle fix * fixed file paths on windows os * returned var annotations * refactoring --------- Co-authored-by: Dimannn <dk@csgo.com> Co-authored-by: Marat Salakhov <salakhov.marat@gmail.com>
- Loading branch information
1 parent
8df21f3
commit 1aec01f
Showing
94 changed files
with
1,770 additions
and
1,679 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OnMoon\OpenApiServerBundle\CodeGenerator\Definitions; | ||
|
||
interface ClassReference | ||
{ | ||
public function getClassName(): string; | ||
|
||
public function getNamespace(): string; | ||
|
||
public function getFQCN(): string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OnMoon\OpenApiServerBundle\CodeGenerator\Definitions; | ||
|
||
class ComponentDefinition | ||
{ | ||
private DtoDefinition $dto; | ||
|
||
public function __construct(private string $name) | ||
{ | ||
} | ||
|
||
public function getName(): string | ||
{ | ||
return $this->name; | ||
} | ||
|
||
public function getDto(): DtoDefinition | ||
{ | ||
return $this->dto; | ||
} | ||
|
||
public function setDto(DtoDefinition $dto): self | ||
{ | ||
$this->dto = $dto; | ||
|
||
return $this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace OnMoon\OpenApiServerBundle\CodeGenerator\Definitions; | ||
|
||
class ComponentReference implements DtoReference | ||
{ | ||
public function __construct(private ComponentDefinition $referencedComponent) | ||
{ | ||
} | ||
|
||
public function getClassName(): string | ||
{ | ||
return $this->referencedComponent->getDto()->getClassName(); | ||
} | ||
|
||
public function getNamespace(): string | ||
{ | ||
return $this->referencedComponent->getDto()->getNamespace(); | ||
} | ||
|
||
public function getFQCN(): string | ||
{ | ||
return $this->referencedComponent->getDto()->getFQCN(); | ||
} | ||
|
||
public function isEmpty(): bool | ||
{ | ||
return $this->referencedComponent->getDto()->isEmpty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.