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

Updating ServiceErrorHandler to list all paths that have the requested Path as a prefix #7883

Closed
wants to merge 1 commit into from

Conversation

nikhiljindal
Copy link
Contributor

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:
vh1gdjtaobs

After:
f48gqf0vo0q

Some more examples:
/api/v1beta3/watch:
d1gtwrdyehl

/api/v1beta3/dasdas
a871h5k7ufb

@nikhiljindal
Copy link
Contributor Author

@bgrant0607

@mbforbes
Copy link
Contributor

mbforbes commented May 7, 2015

_cc @smarterclayton

@smarterclayton
Copy link
Contributor

That's a lot of paths for the root case. Do we need to return all subpaths?

@bgrant0607
Copy link
Member

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.

@bgrant0607
Copy link
Member

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.

@bgrant0607 bgrant0607 added this to the v1.0-post milestone May 22, 2015
@bgrant0607 bgrant0607 removed this from the v1.0-post milestone Jul 24, 2015
@wojtek-t
Copy link
Member

wojtek-t commented Aug 6, 2015

@nikhiljindal - is there a plan to proceed with this PR? Or can we close it?

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 27, 2015
@k8s-github-robot
Copy link

Labelling this PR as size/S

@caesarxuchao
Copy link
Member

@nikhiljindal, FYI, we have new design at #12951.

@nikhiljindal
Copy link
Contributor Author

Great. Closing this PR then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return valid API paths for GET /api/<version>
8 participants