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

Add /licenses endpoint #270

Description

@DanielJDufour

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions