-
Notifications
You must be signed in to change notification settings - Fork 64
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] Some Namespaces do not exist in the API spec #262
Comments
@dblock Can we confirm these no longer exist before we create an MR to remove them from the client lib? |
Maybe we should deprecate them first. |
I just found this #204 which added
Not really sure how to proceed here. |
I am guessing this was added to the generator to skip generating the namespaces for which we had written code by hand and that did not have API specs yet (@saimedhi can confirm). So we still have the manually rolled out code? I see https://github.com/opensearch-project/opensearch-php/blob/main/src/OpenSearch/Namespaces/AsyncSearchNamespace.php. We can just leave it alone and would need to fix it not to use deprecated classes. Now, for each of these namespace we may have added a spec since, so check https://github.com/opensearch-project/opensearch-api-specification/ for it and if it's present, remove the exception that you mention above, and use the generated version after comparing it to the manual version. This can be done later, too. Eventually no manual code should be in the client for these endpoints. |
@dblock , yes I added those lines for namespaces that do not have OpenSearch API specifications at the time of PHP Client Generation implementation. |
|
@kimpepper I think the spec for async search was added after, and it was misnamed before here. A backwards compatible version would make |
Had another look and these were added for bakwards compatibility, ie. they previously existed but don't anymore in the current API spec. They weren't added for future compatiblity for a spec that doesn't exist yet. I've created #270 which deprecates these namespaces for removal in 3.0.0. |
This was resolved in #270 |
What is the bug?
There are a few endpoints and namespaces that look like they no longer exist. They don't get generated when running
composer run generate-api
.Namespaces:
MonitoringNamespace
AsyncSearchNamespace
DataFrameTransformDeprecatedNamespace
SslNamespace
SearchableSnapshotsNamespace
This was discovered by phpstan error messages about the class using deprecated methods in #259 ✨
How can one reproduce the bug?
Delete the endpoints/namespaces and run
composer run generate-api
What is the expected behavior?
The endpoints/namespaces should be generated.
What is your host/environment?
Operating system, version.
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: