mirror of
https://github.com/grocy/grocy.git
synced 2025-08-15 10:14:39 +00:00
Produce a schema-valid OpenAPI specification (closes #1457)
This commit is contained in:
@@ -11,7 +11,7 @@ class FilesApiController extends BaseApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->internalSchemas->FileGroups->enum))
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->schemas->FileGroups->enum))
|
||||
{
|
||||
throw new \Exception('Invalid file group');
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class FilesApiController extends BaseApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->internalSchemas->FileGroups->enum))
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->schemas->FileGroups->enum))
|
||||
{
|
||||
throw new \Exception('Invalid file group');
|
||||
}
|
||||
@@ -69,7 +69,7 @@ class FilesApiController extends BaseApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->internalSchemas->FileGroups->enum))
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->schemas->FileGroups->enum))
|
||||
{
|
||||
throw new \Exception('Invalid file group');
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class FilesApiController extends BaseApiController
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->internalSchemas->FileGroups->enum))
|
||||
if (!in_array($args['group'], $this->getOpenApiSpec()->components->schemas->FileGroups->enum))
|
||||
{
|
||||
throw new \Exception('Invalid file group');
|
||||
}
|
||||
|
Reference in New Issue
Block a user