mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Swagger info corrections (#9441)
* use numbers and not http.Status___ enum
* fix test
* add many missing swagger responses
* code format
* Deletion Sould return 204 ...
* error handling improvements
* if special error type ... then add it to swagger too
* one smal nit
* invalidTopicsError is []string
* valid swagger specification 2.0
 - if you add responses swagger can tell you if you do it right 👍
* use ctx.InternalServerError
* Revert "use numbers and not http.Status___ enum"
This reverts commit b1ff386e2418ed6a7f183e756b13277d701278ef.
* use http.Status* enum everywhere
			
			
This commit is contained in:
		@@ -39,6 +39,13 @@ type APIValidationError struct {
 | 
			
		||||
	URL     string `json:"url"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// APIInvalidTopicsError is error format response to invalid topics
 | 
			
		||||
// swagger:response invalidTopicsError
 | 
			
		||||
type APIInvalidTopicsError struct {
 | 
			
		||||
	Topics  []string `json:"invalidTopics"`
 | 
			
		||||
	Message string   `json:"message"`
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//APIEmpty is an empty response
 | 
			
		||||
// swagger:response empty
 | 
			
		||||
type APIEmpty struct{}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user