mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 20:22:25 -05:00 
			
		
		
		
	[docs] Fix swagger operation descriptions (#3830)
* Fix swagger operation descriptions Signed-off-by: mkljczk <git@mkljczk.pl> * generate a swagger file Signed-off-by: mkljczk <git@mkljczk.pl> --------- Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
		
					parent
					
						
							
								f7ac15fc1f
							
						
					
				
			
			
				commit
				
					
						2decea6335
					
				
			
		
					 3 changed files with 61 additions and 63 deletions
				
			
		|  | @ -6990,6 +6990,34 @@ paths: | ||||||
|             tags: |             tags: | ||||||
|                 - admin |                 - admin | ||||||
|     /api/v1/admin/instance/rules: |     /api/v1/admin/instance/rules: | ||||||
|  |         get: | ||||||
|  |             description: The rules will be returned in order (sorted by Order ascending). | ||||||
|  |             operationId: adminsRuleGet | ||||||
|  |             produces: | ||||||
|  |                 - application/json | ||||||
|  |             responses: | ||||||
|  |                 "200": | ||||||
|  |                     description: An array with all the rules for the local instance. | ||||||
|  |                     schema: | ||||||
|  |                         items: | ||||||
|  |                             $ref: '#/definitions/instanceRule' | ||||||
|  |                         type: array | ||||||
|  |                 "400": | ||||||
|  |                     description: bad request | ||||||
|  |                 "401": | ||||||
|  |                     description: unauthorized | ||||||
|  |                 "404": | ||||||
|  |                     description: not found | ||||||
|  |                 "406": | ||||||
|  |                     description: not acceptable | ||||||
|  |                 "500": | ||||||
|  |                     description: internal server error | ||||||
|  |             security: | ||||||
|  |                 - OAuth2 Bearer: | ||||||
|  |                     - admin | ||||||
|  |             summary: View instance rules, with IDs. | ||||||
|  |             tags: | ||||||
|  |                 - admin | ||||||
|         post: |         post: | ||||||
|             consumes: |             consumes: | ||||||
|                 - multipart/form-data |                 - multipart/form-data | ||||||
|  | @ -7062,6 +7090,37 @@ paths: | ||||||
|             summary: Delete an existing instance rule. |             summary: Delete an existing instance rule. | ||||||
|             tags: |             tags: | ||||||
|                 - admin |                 - admin | ||||||
|  |         get: | ||||||
|  |             operationId: adminRuleGet | ||||||
|  |             parameters: | ||||||
|  |                 - description: The id of the rule. | ||||||
|  |                   in: path | ||||||
|  |                   name: id | ||||||
|  |                   required: true | ||||||
|  |                   type: string | ||||||
|  |             produces: | ||||||
|  |                 - application/json | ||||||
|  |             responses: | ||||||
|  |                 "200": | ||||||
|  |                     description: The requested rule. | ||||||
|  |                     schema: | ||||||
|  |                         $ref: '#/definitions/instanceRule' | ||||||
|  |                 "400": | ||||||
|  |                     description: bad request | ||||||
|  |                 "401": | ||||||
|  |                     description: unauthorized | ||||||
|  |                 "404": | ||||||
|  |                     description: not found | ||||||
|  |                 "406": | ||||||
|  |                     description: not acceptable | ||||||
|  |                 "500": | ||||||
|  |                     description: internal server error | ||||||
|  |             security: | ||||||
|  |                 - OAuth2 Bearer: | ||||||
|  |                     - admin | ||||||
|  |             summary: View instance rule with the given id. | ||||||
|  |             tags: | ||||||
|  |                 - admin | ||||||
|         patch: |         patch: | ||||||
|             consumes: |             consumes: | ||||||
|                 - multipart/form-data |                 - multipart/form-data | ||||||
|  | @ -7326,67 +7385,6 @@ paths: | ||||||
|             summary: Mark a report as resolved. |             summary: Mark a report as resolved. | ||||||
|             tags: |             tags: | ||||||
|                 - admin |                 - admin | ||||||
|     /api/v1/admin/rules: |  | ||||||
|         get: |  | ||||||
|             description: The rules will be returned in order (sorted by Order ascending). |  | ||||||
|             operationId: adminsRuleGet |  | ||||||
|             produces: |  | ||||||
|                 - application/json |  | ||||||
|             responses: |  | ||||||
|                 "200": |  | ||||||
|                     description: An array with all the rules for the local instance. |  | ||||||
|                     schema: |  | ||||||
|                         items: |  | ||||||
|                             $ref: '#/definitions/instanceRule' |  | ||||||
|                         type: array |  | ||||||
|                 "400": |  | ||||||
|                     description: bad request |  | ||||||
|                 "401": |  | ||||||
|                     description: unauthorized |  | ||||||
|                 "404": |  | ||||||
|                     description: not found |  | ||||||
|                 "406": |  | ||||||
|                     description: not acceptable |  | ||||||
|                 "500": |  | ||||||
|                     description: internal server error |  | ||||||
|             security: |  | ||||||
|                 - OAuth2 Bearer: |  | ||||||
|                     - admin |  | ||||||
|             summary: View instance rules, with IDs. |  | ||||||
|             tags: |  | ||||||
|                 - admin |  | ||||||
|     /api/v1/admin/rules/{id}: |  | ||||||
|         get: |  | ||||||
|             operationId: adminRuleGet |  | ||||||
|             parameters: |  | ||||||
|                 - description: The id of the rule. |  | ||||||
|                   in: path |  | ||||||
|                   name: id |  | ||||||
|                   required: true |  | ||||||
|                   type: string |  | ||||||
|             produces: |  | ||||||
|                 - application/json |  | ||||||
|             responses: |  | ||||||
|                 "200": |  | ||||||
|                     description: The requested rule. |  | ||||||
|                     schema: |  | ||||||
|                         $ref: '#/definitions/instanceRule' |  | ||||||
|                 "400": |  | ||||||
|                     description: bad request |  | ||||||
|                 "401": |  | ||||||
|                     description: unauthorized |  | ||||||
|                 "404": |  | ||||||
|                     description: not found |  | ||||||
|                 "406": |  | ||||||
|                     description: not acceptable |  | ||||||
|                 "500": |  | ||||||
|                     description: internal server error |  | ||||||
|             security: |  | ||||||
|                 - OAuth2 Bearer: |  | ||||||
|                     - admin |  | ||||||
|             summary: View instance rule with the given id. |  | ||||||
|             tags: |  | ||||||
|                 - admin |  | ||||||
|     /api/v1/announcements: |     /api/v1/announcements: | ||||||
|         get: |         get: | ||||||
|             description: 'THIS ENDPOINT IS CURRENTLY NOT FULLY IMPLEMENTED: it will always return an empty array.' |             description: 'THIS ENDPOINT IS CURRENTLY NOT FULLY IMPLEMENTED: it will always return an empty array.' | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ import ( | ||||||
| 	"github.com/superseriousbusiness/gotosocial/internal/oauth" | 	"github.com/superseriousbusiness/gotosocial/internal/oauth" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // RuleGETHandler swagger:operation GET /api/v1/admin/rules/{id} adminRuleGet | // RuleGETHandler swagger:operation GET /api/v1/admin/instance/rules/{id} adminRuleGet | ||||||
| // | // | ||||||
| // View instance rule with the given id. | // View instance rule with the given id. | ||||||
| // | // | ||||||
|  |  | ||||||
|  | @ -27,7 +27,7 @@ import ( | ||||||
| 	"github.com/superseriousbusiness/gotosocial/internal/oauth" | 	"github.com/superseriousbusiness/gotosocial/internal/oauth" | ||||||
| ) | ) | ||||||
| 
 | 
 | ||||||
| // RulesGETHandler swagger:operation GET /api/v1/admin/rules adminsRuleGet | // RulesGETHandler swagger:operation GET /api/v1/admin/instance/rules adminsRuleGet | ||||||
| // | // | ||||||
| // View instance rules, with IDs. | // View instance rules, with IDs. | ||||||
| // | // | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue