WIP allow processing routes with no response
This commit is contained in:
parent
9d2aad1134
commit
7689f7ef6f
2 changed files with 2 additions and 9 deletions
|
@ -329,16 +329,10 @@ class Builder
|
|||
$methodName = $namespace . \ucfirst($route->getLabel('sdk.method', ''));
|
||||
$responseModelNames = $route->getLabel('sdk.response.model', "none");
|
||||
|
||||
if ($responseModelNames === "none") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$responseModels = \is_array($responseModelNames)
|
||||
? \array_map(static fn($m) => $response->getModel($m), $responseModelNames)
|
||||
: [$response->getModel($responseModelNames)];
|
||||
|
||||
|
||||
|
||||
foreach ($responseModels as $responseModel) {
|
||||
$type = self::getModelTypeMapping($responseModel, $response);
|
||||
$description = $route->getDesc();
|
||||
|
|
|
@ -159,11 +159,10 @@ class GraphQLServerTest extends Scope
|
|||
|
||||
$errorMessage = 'User (role: guest) missing scope (users.write)';
|
||||
$this->assertEquals($errorMessage, $user['body']['errors'][0]['message']);
|
||||
$this->assertIsArray($user['body']['data']);
|
||||
$this->assertNull($user['body']['data']['users_deleteUser']);
|
||||
$this->assertArrayNotHasKey('data', $user['body']);
|
||||
|
||||
/**
|
||||
* Delete the user with the reqiured scopes
|
||||
* Delete the user with the required scopes
|
||||
*/
|
||||
$key = $this->getNewKey(['users.write']);
|
||||
$user = $this->client->call(Client::METHOD_POST, '/graphql', array_merge([
|
||||
|
|
Loading…
Reference in a new issue