mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	This commit is contained in:
		
							
								
								
									
										6
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								Makefile
									
									
									
									
									
								
							@@ -46,8 +46,9 @@ TAGS ?=
 | 
			
		||||
TMPDIR := $(shell mktemp -d 2>/dev/null || mktemp -d -t 'gitea-temp')
 | 
			
		||||
 | 
			
		||||
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
 | 
			
		||||
SWAGGER_SPEC_S_TMPL := s|"basePath":\s*"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
 | 
			
		||||
SWAGGER_SPEC_S_JSON := s|"basePath":\s*"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
 | 
			
		||||
SWAGGER_SPEC_S_TMPL := s|"basePath": *"/api/v1"|"basePath": "{{AppSubUrl}}/api/v1"|g
 | 
			
		||||
SWAGGER_SPEC_S_JSON := s|"basePath": *"{{AppSubUrl}}/api/v1"|"basePath": "/api/v1"|g
 | 
			
		||||
SWAGGER_NEWLINE_COMMAND := -e '$$a\'
 | 
			
		||||
 | 
			
		||||
TEST_MYSQL_HOST ?= mysql:3306
 | 
			
		||||
TEST_MYSQL_DBNAME ?= testgitea
 | 
			
		||||
@@ -111,6 +112,7 @@ generate-swagger:
 | 
			
		||||
	fi
 | 
			
		||||
	swagger generate spec -o './$(SWAGGER_SPEC)'
 | 
			
		||||
	$(SED_INPLACE) '$(SWAGGER_SPEC_S_TMPL)' './$(SWAGGER_SPEC)'
 | 
			
		||||
	$(SED_INPLACE) $(SWAGGER_NEWLINE_COMMAND) './$(SWAGGER_SPEC)'
 | 
			
		||||
 | 
			
		||||
.PHONY: swagger-check
 | 
			
		||||
swagger-check: generate-swagger
 | 
			
		||||
 
 | 
			
		||||
@@ -9222,4 +9222,4 @@
 | 
			
		||||
      "SudoHeader": []
 | 
			
		||||
    }
 | 
			
		||||
  ]
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user