-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Closed
Closed
Copy link
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The return type in function declaration contains only one type, the doc comments can contain multiple (even not unique)
...
* @return \OpenAPI\Client\Model\Permission|\OpenAPI\Client\Model\OdataError|\OpenAPI\Client\Model\OdataError
*/
public function invite(
string $drive_id,
string $item_id,
?\OpenAPI\Client\Model\DriveItemInvite $drive_item_invite = null,
string $contentType = self::contentTypes['invite'][0]
): \OpenAPI\Client\Model\Permission
....
openapi-generator version
7.1.0
OpenAPI declaration file content or url
https://github.com/owncloud/libre-graph-api/blob/main/api/openapi-spec/v1.0.yaml
Generation Details
docker run --rm -v $PWD:/local openapitools/openapi-generator-cli:v7.1.0 generate --enable-post-process-file -i /local/api/openapi-spec/v1.0.yaml --additional-properties=packageName=libregraph --git-user-id=owncloud --git-repo-id=libre-graph-api-php -g php-nextgen -o /local/out/php-nextgen
Steps to reproduce
- generate PHP-nextgen code from the above specs
Suggest a fix
- ether set the return value to
mixedinLine 183 in 48f454c
operation.vendorExtensions.putIfAbsent("x-php-return-type", operation.returnType); - or list all possible return types in the function declaration, but then it must be ensured that no type is repeated
Reactions are currently unavailable