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

Invalid type given as required for multiple methods #1425

Open
AJenbo opened this issue Feb 20, 2025 · 4 comments
Open

Invalid type given as required for multiple methods #1425

AJenbo opened this issue Feb 20, 2025 · 4 comments

Comments

@AJenbo
Copy link

AJenbo commented Feb 20, 2025

* refresh: enum, // If `true` then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` (the default) then do nothing with refreshes.

enum is not a valid PHP type, the correct type for a generic enum is \UnitEnum, you probably just want string.

number is not a valid type, the correct one is numeric if you want int|float|numeric-string.

list is used for comma-separated lists, this should be string, but comment might be misleading as it appears it might accept both, in which case string|list would be better.

long is not a valid type, use int

time is not a valid type, use \DateTime, int or string

@AJenbo AJenbo changed the title Invalid type enum given as required for multiple methods Invalid type given as required for multiple methods Feb 20, 2025
@MidnightDesign
Copy link

This has been a issue for almost 2 years, but nobody is responding.

@AJenbo
Copy link
Author

AJenbo commented Mar 3, 2025

This has been a issue for almost 2 years, but nobody is responding.

Have you figured out what is used to generate the code?

@MidnightDesign
Copy link

I think had found it at some point, but I don't know right now.

@momala454
Copy link

https://github.com/elastic/elasticsearch/blob/113f0c17cc48913225d5c9e4e06ebb44a3a56e14/rest-api-spec/src/main/resources/rest-api-spec/api/_common.json#L28

this contains the comment and "type" in all of those json files, so maybe changing here to like list|string instead of list may work. I don't know where it's generated, or how to change it to optional

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants