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

/crate/:crate/latest/builds.json strips the .json suffix #170

Closed
suhr opened this issue Dec 22, 2017 · 4 comments · Fixed by #1258
Closed

/crate/:crate/latest/builds.json strips the .json suffix #170

suhr opened this issue Dec 22, 2017 · 4 comments · Fixed by #1258
Labels
A-backend Area: Webserver backend C-bug Category: This is a bug E-easy Effort: Should be easy to implement and would make a good first PR

Comments

@suhr
Copy link

suhr commented Dec 22, 2017

This may be useful for external badge services like shields.io.

See also: badges/shields#1382

@paulmelnikow
Copy link

Hi! Just wanted to mention again that a JSON endpoint with build info would be really helpful! I'd be happy to help design a schema based on the other endpoints you have, if it would be helpful!

@jyn514
Copy link
Member

jyn514 commented Jan 21, 2021

@paulmelnikow What are you looking for from the JSON API? What info do you need that builds.json doesn't currently provide? Do you want to be able to get the info from the latest version? https://docs.rs/crate/cargo/latest/builds.json doesn't currently work (it strips the JSON suffix), but I consider that a bug and I'd be happy to fix it.

@jyn514
Copy link
Member

jyn514 commented Jan 21, 2021

For context, builds.json is a mostly undocumented feature I wish we didn't have, we introduced it so crates.io knows whether it can link to docs.rs (i.e. whether the build succeeded). I don't mind expanding that endpoint to be more useful, but I don't want to introduce other endpoints if possible.

@calebcartwright
Copy link
Member

Do you want to be able to get the info from the latest version? https://docs.rs/crate/cargo/latest/builds.json doesn't currently work (it strips the JSON suffix), but I consider that a bug and I'd be happy to fix it.

Putting my Shields hat on... I do think this would suffice for the use case. IIUC the only option available today would require a badge be pinned to a specific version which would be of limited use, whereas being able to have a badge that dynamically reflected the build status for the latest version of a crate seems like it'd be useful for folks.

@jyn514 jyn514 mentioned this issue Jan 21, 2021
@jyn514 jyn514 added the A-backend Area: Webserver backend label Jan 21, 2021
@jyn514 jyn514 changed the title Badge API /crate/:crate/latest/builds.json strips the .json suffix Jan 21, 2021
@jyn514 jyn514 added C-bug Category: This is a bug E-easy Effort: Should be easy to implement and would make a good first PR labels Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-backend Area: Webserver backend C-bug Category: This is a bug E-easy Effort: Should be easy to implement and would make a good first PR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants