Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: Undefined array key "object" in /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php on line 197 #771

Open
comod opened this issue Nov 22, 2023 · 0 comments
Labels

Comments

@comod
Copy link

comod commented Nov 22, 2023

Jane version(s) affected: 7.5 (latest install according to docs)

Description
Code-Gen fails with Warning:

PHP Warning:  Undefined array key "object" in /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php on line 197
PHP Fatal error:  Uncaught TypeError: Jane\Component\OpenApi3\Generator\Parameter\NonBodyParameterGenerator::convertParameterType(): Return value must be of type array, null returned in /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php:197
Stack trace:
#0 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php(153): Jane\Component\OpenApi3\Generator\Parameter\NonBodyParameterGenerator->convertParameterType()
#1 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Endpoint/GetConstructorTrait.php(60): Jane\Component\OpenApi3\Generator\Parameter\NonBodyParameterGenerator->generateOptionDocParameter()
#2 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/EndpointGenerator.php(82): Jane\Component\OpenApi3\Generator\EndpointGenerator->getConstructor()
#3 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-common/Generator/OperationGenerator.php(38): Jane\Component\OpenApi3\Generator\EndpointGenerator->createEndpointClass()
#4 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-common/Generator/ClientGenerator.php(38): Jane\Component\OpenApiCommon\Generator\OperationGenerator->createOperation()
#5 /home/xxx/projects/camunda-api-client/vendor/jane-php/json-schema/Generator/ChainGenerator.php(28): Jane\Component\OpenApiCommon\Generator\ClientGenerator->generate()
#6 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-common/Console/Command/GenerateCommand.php(61): Jane\Component\JsonSchema\Generator\ChainGenerator->generate()
#7 /home/xxx/projects/camunda-api-client/vendor/symfony/console/Command/Command.php(326): Jane\Component\OpenApiCommon\Console\Command\GenerateCommand->execute()
#8 /home/xxx/projects/camunda-api-client/vendor/symfony/console/Application.php(1063): Symfony\Component\Console\Command\Command->run()
#9 /home/xxx/projects/camunda-api-client/vendor/symfony/console/Application.php(320): Symfony\Component\Console\Application->doRunCommand()
#10 /home/xxx/projects/camunda-api-client/vendor/symfony/console/Application.php(174): Symfony\Component\Console\Application->doRun()
#11 /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-common/bin/jane-openapi(24): Symfony\Component\Console\Application->run()
#12 /home/xxx/projects/camunda-api-client/vendor/bin/jane-openapi(120): include('...')
#13 {main}
  thrown in /home/xxx/projects/camunda-api-client/vendor/jane-php/open-api-3/Generator/Parameter/NonBodyParameterGenerator.php on line 197

How to reproduce
Specs file: https://docs.camunda.org/rest/camunda-bpm-platform/7.21-SNAPSHOT/

<?php
// jane-openapi-configuration.php
return [
    'openapi-file' => __DIR__ . '/openapi-camunda-7.21.0.json',
    'namespace' => 'Xxx\NewCamundaApiClient',
    'directory' => __DIR__ . '/generated',
];

With command:

php vendor/bin/jane-openapi generate --config-file=jane-openapi-configuration.php

@comod comod added the bug label Nov 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant