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

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

Open
4 of 6 tasks
individual-it opened this issue Nov 17, 2023 · 0 comments
Open
4 of 6 tasks

Comments

@individual-it
Copy link
Contributor

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant