mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-01 08:44:48 +02:00
Improved PartDB Info endpoint
This commit is contained in:
parent
6d3b0261b3
commit
f5a15b23d6
1 changed files with 4 additions and 1 deletions
|
@ -23,19 +23,22 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace App\ApiResource;
|
namespace App\ApiResource;
|
||||||
|
|
||||||
|
use ApiPlatform\Metadata\ApiFilter;
|
||||||
use ApiPlatform\Metadata\ApiResource;
|
use ApiPlatform\Metadata\ApiResource;
|
||||||
use ApiPlatform\Metadata\Get;
|
use ApiPlatform\Metadata\Get;
|
||||||
|
use ApiPlatform\Serializer\Filter\PropertyFilter;
|
||||||
use App\State\PartDBInfoProvider;
|
use App\State\PartDBInfoProvider;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used to provide various information about the system.
|
* This class is used to provide various information about the system.
|
||||||
*/
|
*/
|
||||||
#[ApiResource(
|
#[ApiResource(
|
||||||
uriTemplate: '/info',
|
uriTemplate: '/info.{_format}',
|
||||||
description: 'Basic information about Part-DB like version, title, etc.',
|
description: 'Basic information about Part-DB like version, title, etc.',
|
||||||
operations: [new Get()],
|
operations: [new Get()],
|
||||||
provider: PartDBInfoProvider::class
|
provider: PartDBInfoProvider::class
|
||||||
)]
|
)]
|
||||||
|
#[ApiFilter(PropertyFilter::class)]
|
||||||
class PartDBInfo
|
class PartDBInfo
|
||||||
{
|
{
|
||||||
public function __construct(
|
public function __construct(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue