fb37eefa28
This adds a API for getting License templates. This tries to be as close to the [GitHub API](https://docs.github.com/en/rest/licenses?apiVersion=2022-11-28) as possible, but Gitea does not support all features that GitHub has. I think they should been added, but this out f the scope of this PR. You should merge #23006 before this PR for security reasons.
36 lines
792 B
Go
36 lines
792 B
Go
// Copyright 2017 The Gitea Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package swagger
|
|
|
|
import (
|
|
api "code.gitea.io/gitea/modules/structs"
|
|
)
|
|
|
|
// ServerVersion
|
|
// swagger:response ServerVersion
|
|
type swaggerResponseServerVersion struct {
|
|
// in:body
|
|
Body api.ServerVersion `json:"body"`
|
|
}
|
|
|
|
// LicenseTemplateList
|
|
// swagger:response LicenseTemplateList
|
|
type swaggerResponseLicensesTemplateList struct {
|
|
// in:body
|
|
Body []api.LicensesTemplateListEntry `json:"body"`
|
|
}
|
|
|
|
// LicenseTemplateInfo
|
|
// swagger:response LicenseTemplateInfo
|
|
type swaggerResponseLicenseTemplateInfo struct {
|
|
// in:body
|
|
Body api.LicenseTemplateInfo `json:"body"`
|
|
}
|
|
|
|
// StringSlice
|
|
// swagger:response StringSlice
|
|
type swaggerResponseStringSlice struct {
|
|
// in:body
|
|
Body []string `json:"body"`
|
|
}
|