mirror of
https://github.com/anyproto/anytype-heart.git
synced 2025-06-08 05:47:07 +09:00
GO-5589: Rename swagger* docs to openapi*
This commit is contained in:
parent
963e7fc53d
commit
0983e91cbd
5 changed files with 9 additions and 6 deletions
|
@ -50,7 +50,7 @@ func (s *Server) NewRouter(mw apicore.ClientCommands) *gin.Engine {
|
|||
})
|
||||
|
||||
router.GET("/openapi.yaml", func(c *gin.Context) {
|
||||
data, err := os.ReadFile("./core/api/docs/swagger.yaml")
|
||||
data, err := os.ReadFile("./core/api/docs/openapi.yaml")
|
||||
if err != nil {
|
||||
c.String(http.StatusInternalServerError, "Failed to read OpenAPI spec")
|
||||
return
|
||||
|
|
|
@ -10,8 +10,10 @@ lint:
|
|||
@echo 'Linting with golint...'
|
||||
@golint `go list ./... | grep -v /vendor/`
|
||||
|
||||
swagger:
|
||||
@echo 'Generating swagger docs...'
|
||||
@swag init --v3.1 -q -d core/api -g service.go -o core/api/docs
|
||||
@echo 'Formatting swagger docs...'
|
||||
@swag fmt -d core/api
|
||||
openapi:
|
||||
@echo 'Generating openapi docs...'
|
||||
@swag init --v3.1 -q -d core/api -g service.go -o $(OPENAPI_DOCS_DIR)
|
||||
@mv $(OPENAPI_DOCS_DIR)/swagger.json $(OPENAPI_DOCS_DIR)/openapi.json
|
||||
@mv $(OPENAPI_DOCS_DIR)/swagger.yaml $(OPENAPI_DOCS_DIR)/openapi.yaml
|
||||
@echo 'Formatting openapi docs...'
|
||||
@swag fmt -d core/api
|
|
@ -1,4 +1,5 @@
|
|||
CUSTOM_NETWORK_FILE ?= ./core/anytype/config/nodes/custom.yml
|
||||
OPENAPI_DOCS_DIR ?= ./core/api/docs
|
||||
CLIENT_DESKTOP_PATH ?= ../anytype-ts
|
||||
CLIENT_ANDROID_PATH ?= ../anytype-kotlin
|
||||
CLIENT_IOS_PATH ?= ../anytype-swift
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue