mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-31 08:14:41 +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;
|
||||
|
||||
use ApiPlatform\Metadata\ApiFilter;
|
||||
use ApiPlatform\Metadata\ApiResource;
|
||||
use ApiPlatform\Metadata\Get;
|
||||
use ApiPlatform\Serializer\Filter\PropertyFilter;
|
||||
use App\State\PartDBInfoProvider;
|
||||
|
||||
/**
|
||||
* This class is used to provide various information about the system.
|
||||
*/
|
||||
#[ApiResource(
|
||||
uriTemplate: '/info',
|
||||
uriTemplate: '/info.{_format}',
|
||||
description: 'Basic information about Part-DB like version, title, etc.',
|
||||
operations: [new Get()],
|
||||
provider: PartDBInfoProvider::class
|
||||
)]
|
||||
#[ApiFilter(PropertyFilter::class)]
|
||||
class PartDBInfo
|
||||
{
|
||||
public function __construct(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue