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
Updating ServiceErrorHandler to list all paths that have the requested Path as a prefix #7883
Conversation
_cc @smarterclayton |
That's a lot of paths for the root case. Do we need to return all subpaths? |
I agree we should not return all subpaths in a single operation. The intent of this isn't to be redundant with swagger, but to be usable as a programmatic discovery API. The one example we have is the script to touch all resources. I could also imagine someone wanting to get all resources in their namespace. Maybe GET /api/v1beta3/ should return just namespace-less resources, like nodes, and just the names of the resources, not full paths. And GET /api/v1beta1/namespaces/mynamespace should return all namespaced resources. The object returned should be versioned, so we can change it if we don't like it. Ideally, it would be called ResourceList. That name is taken in older API versions, but we could fix that in v1. |
Actually, it's only in the Go code, so we could potentially just rename it to ResourceMap and then use ResourceList for this new object. |
@nikhiljindal - is there a plan to proceed with this PR? Or can we close it? |
Labelling this PR as size/S |
@nikhiljindal, FYI, we have new design at #12951. |
Great. Closing this PR then |
Fixes #2057
ServiceErrorHandler now outputs all paths that have the requested path as their prefix, if there is atleast one such.
Otherwise, it gives a 404.
This should help in API discovery.
Example output for:
/api/v1beta3/:
Before:
After:
Some more examples:
/api/v1beta3/watch:
/api/v1beta3/dasdas