Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Add /licenses endpoint #270

Open
DanielJDufour opened this issue Sep 25, 2018 · 0 comments
Open

Add /licenses endpoint #270

DanielJDufour opened this issue Sep 25, 2018 · 0 comments

Comments

@DanielJDufour
Copy link
Contributor

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
We want to be able to dynamically display filter options for licenses in the browse projects page without having to make a request for data from all of the repositories. It would be great if we could hit a licenses endpoint, which returns the valid, normalized, and standardized licenses that exist within our index.

Describe the solution you'd like
A clear and concise description of what you want to happen.
I'd like to fetch /licenses and have it return an array of objects like

[
    { "name": "Creative Commons Zero v1.0 Universal", "id": "CC0-1.0" },
    { "name": "Apache License 2.0", "id": "Apache-2.0" }
]

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
I can write a script that runs this process and saves it to a file as a part of the webpack build process. This would mean however the licenses filter box would not auto-update.

Additional context
Add any other context or screenshots about the feature request here.
This is a medium priority because I can work around this with a static manually-generated licenses file. The set of licenses used on code.gov doesn't change at a high frequency.

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

3 participants