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

Enums array to string not resolving in docs #120

Closed
jackkitley opened this issue Feb 8, 2023 · 6 comments
Closed

Enums array to string not resolving in docs #120

jackkitley opened this issue Feb 8, 2023 · 6 comments
Assignees
Labels
bug Something isn't working work in progress

Comments

@jackkitley
Copy link

jackkitley commented Feb 8, 2023

We have enums to string as suggested rules for the request but it doesnt seem to resolve when generating api docs.

This used to work in older versions of laravel-request-docs

@jackkitley
Copy link
Author

Screenshot 2023-02-08 at 15 22 14

@jackkitley
Copy link
Author

Screenshot 2023-02-08 at 15 24 28

@kevincobain2000
Copy link
Member

Similar #80
Unable to fix and can't fix. Sorry.

@kevincobain2000
Copy link
Member

ok so enums are normally supported.

But because the rule in the screenshot has $this->input('lead.dealership_id', the reflection class fails to obtain the inherited methods, it fails and falls back to regexp matching.

This is the root cause.

cc @kitloong

--
Not sure what can be done here.

@kevincobain2000
Copy link
Member

Actually this https://github.com/rakutentech/laravel-request-docs/pull/84/files

The following may fix the issue

                    // $requestClass = $reflection->newInstanceWithoutConstructor();
                    $requestClass = $reflection->newInstance();

@kevincobain2000
Copy link
Member

Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working work in progress
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants