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

x/pkgsite: Proxy protocol @v/list endpoint version data structures as json? #55969

Closed
ein-tier opened this issue Sep 30, 2022 · 3 comments
Closed

Comments

@ein-tier
Copy link

What is the URL of the page with the issue?

https://proxy.golang.org
https://go.dev/ref/mod#goproxy-protocol

What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36

Screenshot

Screen Shot 2022-09-30 at 2 46 38 PM

What did you do?

Make an HTTP GET request to https://proxy.golang.org/github.com/aws/aws-sdk-go-v2/service/lexruntimev2/@v/list

curl --location --request GET 'https://proxy.golang.org/github.com/aws/aws-sdk-go-v2/service/lexruntimev2/@v/list'

What did you expect to see?

In the GOPROXY Protocol documentation there are two paragraphs next to the .../@v/list endpoint: https://go.dev/ref/mod#goproxy-protocol

The first says

Returns a list of known versions of the given module in plain text, one per line. This list should not include pseudo-versions.

The second says

Returns JSON-formatted metadata about a specific version of a module. The response must be a JSON object that corresponds to the Go data structure below:

type Info struct {
    Version string    // version string
    Time    time.Time // commit time
}

I would love to have the behavior described in the second paragraph, but I cannot figure out how to get it. I have tried some of the obvious things like setting Accept and Content-type headers to application/json, but I note that above the documentation says that no query parameters or headers are required and, indeed, they don't seem to do anything.

What did you see instead?

A list of newline separated version strings is returned, but no additional information (Time timestamps).

@gopherbot gopherbot added this to the Unreleased milestone Sep 30, 2022
@seankhliao
Copy link
Member

That paragraph is part of the next row in the table about .info endpoints

@andersthomson
Copy link

The table really could do with borders. More than once I've had to manually piece together the sections as each cell is vertically centered (which is not a common practice in formal specifications.)

@nieomylnieja
Copy link

nieomylnieja commented Nov 7, 2023

Got caught up by this one too :D The invisible border explains it :) thanks

@golang golang locked and limited conversation to collaborators Nov 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants