Skip to content

Commit

Permalink
Merge pull request #1 from php-etl/feature/update-client
Browse files Browse the repository at this point in the history
Updated API endpoints and models
  • Loading branch information
sebprt authored Oct 6, 2022
2 parents 7092a32 + 7031808 commit a3a4e65
Show file tree
Hide file tree
Showing 1,254 changed files with 56,239 additions and 37,787 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
}
},
"require-dev": {
"jane-php/open-api-3": "^7.2"
"jane-php/open-api-3": "^7.2",
"friendsofphp/php-cs-fixer": "^3.11"
},
"config": {
"bin-dir": "bin"
Expand Down
1,901 changes: 1,465 additions & 436 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion jane/gyroscops.json

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions jane/open_api.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
'openapi-file' => __DIR__.'/gyroscops.json',
'namespace' => 'Gyroscops\Api',
'directory' => __DIR__ . '/../src/',
'strict' => false,
'use-fixer' => true,
];
14 changes: 9 additions & 5 deletions src/Authentication/ApiKeyAuthentication.php
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
<?php

declare(strict_types=1);

namespace Gyroscops\Api\Authentication;

class ApiKeyAuthentication implements \Jane\Component\OpenApiRuntime\Client\AuthenticationPlugin
{
private $apiKey;

public function __construct(string $apiKey)
{
$this->{'apiKey'} = $apiKey;
}
public function authentication(\Psr\Http\Message\RequestInterface $request) : \Psr\Http\Message\RequestInterface

public function authentication(\Psr\Http\Message\RequestInterface $request): \Psr\Http\Message\RequestInterface
{
$request = $request->withHeader('Authorization', $this->{'apiKey'});
return $request;
return $request->withHeader('Authorization', $this->{'apiKey'});
}
public function getScope() : string

public function getScope(): string
{
return 'apiKey';
}
}
}
Loading

0 comments on commit a3a4e65

Please sign in to comment.