Licenses API

Licenses API

在 GitLab 中,有一个 API 端点可用于处理各种开源许可证模板. 有关各种许可条款的更多信息,请访问此站点或在线提供的许多其他资源.

    响应示例:

    Single license template

    Attribute Type Required Description
    key string yes 许可证模板的密钥
    string no 受版权保护的项目名称
    fullname string no 著作权人的全名

    注意:如果省略参数但对请求进行身份验证,则将使用经过身份验证的用户名来替换版权所有者占位符.

    1. { "key": "mit", "name": "MIT License", "nickname": null, "featured": true, "html_url": "http://choosealicense.com/licenses/mit/", "source_url": "http://opensource.org/licenses/MIT", "description": "A permissive license that is short and to the point. It lets people do anything with your code with proper attribution and without warranty.", "conditions": [ "include-copyright" ], "permissions": [ "commercial-use", "modifications", "distribution", "private-use" ], "limitations": [ "no-liability" ], "content": "The MIT License (MIT)\n\nCopyright (c) 2016 John Doe\n [...]" }