mirror of
https://github.com/ClusterCockpit/cc-backend
synced 2025-07-23 04:51:39 +02:00
Fix API data types, use unsecured router for /docs
- Note: Use /docs swagger playground without login - Otherwise: Session User will be used which leads to role mismatch
This commit is contained in:
@@ -327,7 +327,7 @@ func (api *RestApi) tagJob(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Tags jobs
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body schema.Job true "Job to add"
|
||||
// @Param request body schema.JobMeta true "Job to add"
|
||||
// @Success 201 {object} api.StartJobApiResponse "Job added successfully"
|
||||
// @Failure 400 {object} api.ErrorResponse "Bad Request"
|
||||
// @Failure 422 {object} api.ErrorResponse "The combination of jobId, clusterId and startTime does already exist"
|
||||
@@ -507,7 +507,7 @@ func (api *RestApi) stopJobById(rw http.ResponseWriter, r *http.Request) {
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param request body api.StopJobApiRequest true "All fields required"
|
||||
// @Success 201 {object} schema.Job "Job resource"
|
||||
// @Success 201 {object} schema.JobMeta "Job resource"
|
||||
// @Failure 400 {object} api.ErrorResponse "Bad Request"
|
||||
// @Failure 404 {object} api.ErrorResponse "Resource not found"
|
||||
// @Security ApiKeyAuth
|
||||
|
Reference in New Issue
Block a user