Skip to content

[BUG] [php-nextgen] return type in doc-comment and function definition are different #17113

@individual-it

Description

@individual-it

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions