1
0
Fork 0
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:
Jannis Metrikat 2025-05-14 00:10:50 +02:00
parent 963e7fc53d
commit 0983e91cbd
No known key found for this signature in database
GPG key ID: B223CAC5AAF85615
5 changed files with 9 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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