mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat: Add Swagger documentation for admin and master API endpoints
- Added Swagger documentation for the following admin endpoints: - Create a new master tenant - Create a new provider - Register a new model - List all models - Update a model - Force sync snapshot - Ingest logs - Added Swagger documentation for the master endpoint: - Issue a child key - Updated go.mod and go.sum to include necessary dependencies for Swagger.
This commit is contained in:
@@ -23,6 +23,20 @@ type IssueChildKeyRequest struct {
|
||||
Scopes string `json:"scopes"`
|
||||
}
|
||||
|
||||
// IssueChildKey godoc
|
||||
// @Summary Issue a child key
|
||||
// @Description Issue a new access token (child key) for the authenticated master
|
||||
// @Tags master
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Security MasterAuth
|
||||
// @Param request body IssueChildKeyRequest true "Key Request"
|
||||
// @Success 201 {object} gin.H
|
||||
// @Failure 400 {object} gin.H
|
||||
// @Failure 401 {object} gin.H
|
||||
// @Failure 403 {object} gin.H
|
||||
// @Failure 500 {object} gin.H
|
||||
// @Router /v1/tokens [post]
|
||||
func (h *MasterHandler) IssueChildKey(c *gin.Context) {
|
||||
master, exists := c.Get("master")
|
||||
if !exists {
|
||||
|
||||
Reference in New Issue
Block a user