docs(swagger): document admin master child key endpoints

This commit is contained in:
zenfun
2026-01-10 01:19:53 +08:00
parent e7db9f319f
commit f52c7acbe6
3 changed files with 542 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
basePath: /
definitions:
gin.H:
additionalProperties: {}
type: object
github_com_ez-api_ez-api_internal_dto.APIKeyDTO:
properties:
access_token:
@@ -3801,6 +3804,63 @@ paths:
tags:
- admin
/admin/masters/{id}/keys:
get:
description: List child keys issued under a master (admin view)
parameters:
- description: Master ID
in: path
name: id
required: true
type: integer
- description: page (1-based)
in: query
name: page
type: integer
- description: limit (default 50, max 200)
in: query
name: limit
type: integer
- description: search by group/scopes/namespaces/status
in: query
name: search
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
items:
$ref: '#/definitions/internal_api.TokenView'
type: array
type: object
"400":
description: Bad Request
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
"500":
description: Internal Server Error
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
security:
- AdminAuth: []
summary: List child keys for a master
tags:
- admin
post:
consumes:
- application/json
@@ -3871,6 +3931,64 @@ paths:
summary: Issue a child key on behalf of a master
tags:
- admin
/admin/masters/{id}/keys/{key_id}:
delete:
description: Revokes and removes a child key under the specified master
parameters:
- description: Master ID
in: path
name: id
required: true
type: integer
- description: Token ID
in: path
name: key_id
required: true
type: integer
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
"400":
description: Bad Request
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
"404":
description: Not Found
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
"500":
description: Internal Server Error
schema:
allOf:
- $ref: '#/definitions/internal_api.ResponseEnvelope'
- properties:
data:
$ref: '#/definitions/gin.H'
type: object
security:
- AdminAuth: []
summary: Delete child key
tags:
- admin
/admin/masters/{id}/manage:
post:
consumes: