-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
swag init generates empty paths/routes with v1.8.3 onwards #1622
Comments
Same problem here. Project structure: project main function is importing a StartServer function from the server package, where the router is settled. The question is: how swaggo is parsing the server endpoints? |
|
That doesn't work either Got this error:
The resolution of the folder structure is incorrect. |
Same issue here, project structure : ├── README.md
├── controllers
│ ├── bozo-coin.go
│ ├── controller.go
│ ├── default-route.go
│ └── user.go
├── docs
│ ├── docs.go
│ ├── swagger.json
│ └── swagger.yaml
├── go.mod
├── go.sum
├── license
├── main.go
├── metrics
│ ├── bozo-coin.go
│ └── metrics.go
├── models
│ ├── bozo-coin.go
│ ├── models.go
│ └── user.go
└── utils
├── db-connection.go
├── error.go
└── message.go Go version : 1.18.10 (also tried in 1.20.1 and 1.17.10) Output json : {
"swagger": "2.0",
"info": {
"description": "A Bozo coin management service API in Go using Gin framework, storing data in PostgreSQL and using Prometheus for metrics.",
"title": "Bozo API",
"contact": {
"name": "Bozo Support",
"url": "https://danstonkube.fr",
"email": "[email protected]"
},
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"version": "1.0"
},
"basePath": "/api/v1",
"paths": {}
} Obtained by running : swag init --pd -g main.go |
In my case empty paths were due to |
I am adding more context b/c it could be related : ❯ swag init --pd
2023/07/27 14:22:36 Generate swagger docs....
2023/07/27 14:22:36 Generate general API Info, search dir:./
2023/07/27 14:22:38 warning: failed to evaluate const locb at /Users/panz/go/1.18.10/pkg/mod/github.com/pelletier/go-toml/[email protected]/internal/characters/utf8.go:183:2, strconv.ParseUint: parsing "b10000000": invalid syntax
2023/07/27 14:22:38 warning: failed to evaluate const hicb at /Users/panz/go/1.18.10/pkg/mod/github.com/pelletier/go-toml/[email protected]/internal/characters/utf8.go:184:2, strconv.ParseUint: parsing "b10111111": invalid syntax
2023/07/27 14:22:40 create docs.go at docs/docs.go
2023/07/27 14:22:40 create swagger.json at docs/swagger.json
2023/07/27 14:22:40 create swagger.yaml at docs/swagger.yaml Issue on this repo
package main
import (
"flag"
"fmt"
"log"
"net/http"
"runtime"
swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
"gitlab.com/panzouh/bozo-api/controllers"
"gitlab.com/panzouh/bozo-api/docs"
)
func main() {
address := flag.String("address", ":", "address to listen on")
port := flag.String("port", "3000", "port to listen on")
// Truncated
appRouter := gin.Default()
// programmatically set swagger info
docs.SwaggerInfo.Title = "Bozo API"
docs.SwaggerInfo.Description = "A REST API for the Bozo app using Gin and GORM, PostgreSQL, and Prometheus."
docs.SwaggerInfo.Version = "1.0"
docs.SwaggerInfo.Host = *address + *port
docs.SwaggerInfo.BasePath = "/api/v1"
// Truncated
// Set swagger route
appRouter.GET("/docs/*any", ginSwagger.WrapHandler(swaggerFiles.Handler))
//fmt Print runtime goroot
fmt.Println(runtime.GOROOT())
// Truncated
// Run the app server
err := appRouter.Run(*address + *port)
if err != nil {
panic(err)
}
} ❯ go run main.go
/Users/panz/.goenv/versions/1.18.10 |
Any updates? |
I have this issue as well, the paths block is empty, even though I've added a section to (minimally) describe it:
The title and version info are created in the generated swagger.json, but the paths entry is empty. I do also get the invalid syntax that I see some other folks posting when I run with --pd:
|
Posting an update since I somehow figured how to generate documentation, it seems that including my controller directory and persist dependencies affected swag's behavior : ❯ swag init -g main.go --pd -d ./,./controllers
2023/08/17 14:36:38 Generate swagger docs....
2023/08/17 14:36:38 Generate general API Info, search dir:./
2023/08/17 14:36:38 Generate general API Info, search dir:./controllers
2023/08/17 14:36:40 warning: failed to evaluate const locb at /Users/panz/go/1.20.1/pkg/mod/github.com/pelletier/go-toml/[email protected]/internal/characters/utf8.go:183:2, strconv.ParseUint: parsing "b10000000": invalid syntax
2023/08/17 14:36:40 warning: failed to evaluate const hicb at /Users/panz/go/1.20.1/pkg/mod/github.com/pelletier/go-toml/[email protected]/internal/characters/utf8.go:184:2, strconv.ParseUint: parsing "b10111111": invalid syntax
2023/08/17 14:36:40 Generating utils.HTTPError
2023/08/17 14:36:40 Generating controllers.FindBozoCoinResponse
2023/08/17 14:36:40 Generating models.BozoCoin
2023/08/17 14:36:40 Generating gorm.Model
2023/08/17 14:36:40 Generating gorm.DeletedAt
2023/08/17 14:36:40 Generating sql.NullTime
2023/08/17 14:36:40 Generating utils.Message
2023/08/17 14:36:40 Generating models.CreateBozoCoinInput
2023/08/17 14:36:40 Generating controllers.CreateBozoCoinResponse
2023/08/17 14:36:40 Generating models.DeleteBozoCoinInput
2023/08/17 14:36:40 Generating controllers.DeleteBozoCoinResponse
2023/08/17 14:36:40 Generating controllers.FindGroupsResponse
2023/08/17 14:36:40 Generating models.Group
2023/08/17 14:36:40 Generating models.User
2023/08/17 14:36:40 Generating models.ReverseBozoCoin
2023/08/17 14:36:40 Generating models.UserAchievement
2023/08/17 14:36:40 Generating models.CreateGroupInput
2023/08/17 14:36:40 Generating controllers.CreateGroupResponse
2023/08/17 14:36:40 Generating controllers.DeleteGroupResponse
2023/08/17 14:36:40 Generating controllers.LivenessResponse
2023/08/17 14:36:40 Generating models.AdminUserLoginInput
2023/08/17 14:36:40 Generating controllers.LoginResponse
2023/08/17 14:36:40 Generating controllers.ReadinessResponse
2023/08/17 14:36:40 Generating controllers.FindReverseBozoCoinResponse
2023/08/17 14:36:40 Generating models.CreateReverseBozoCoinInput
2023/08/17 14:36:40 Generating controllers.CreateReverseBozoCoinResponse
2023/08/17 14:36:40 Generating models.DeleteReverseBozoCoinInput
2023/08/17 14:36:40 Generating controllers.DeleteReverseBozoCoinResponse
2023/08/17 14:36:40 Generating controllers.FindUsersResponse
2023/08/17 14:36:40 Generating models.CreateUserInput
2023/08/17 14:36:40 Generating controllers.CreateUserResponse
2023/08/17 14:36:40 Generating controllers.DeleteUserResponse
2023/08/17 14:36:40 create docs.go at docs/docs.go
2023/08/17 14:36:40 create swagger.json at docs/swagger.json
2023/08/17 14:36:40 create swagger.yaml at docs/swagger.yaml This warning may be irrelevent Sample controller func : type FindGroupsResponse struct {
Data []models.Group `json:"data"`
}
// FindGroups godoc
//
// @Summary Find Groups
// @Description Retrieve a list of all groups along with their associated users.
// @Tags Groups
// @Accept json
// @Produce json
// @Success 200 {object} FindGroupsResponse
// @Failure 400 {object} utils.HTTPError
// @Failure 500 {object} utils.HTTPError
// @Router /groups [get]
func (c *Controller) FindGroups(ctx *gin.Context) {
var groups []models.Group
if err := c.Database.Preload("Users").Find(&groups).Error; err != nil {
utils.NewError(ctx, 500, err)
return
}
// Append Group data to to FindGroupsResponse
var response FindGroupsResponse
response.Data = groups
// Return group data
ctx.JSON(200, response)
} |
I have the same problem |
Mitrate to version 1.7.0 Work to me
|
Mine works if I downgrade to v1.8.2 or less. But v1.8.3 onwards the swag build time is improved. The point is to able to use the latest versions. |
I think I was running into a similar thing and it turned out that I was adding an extra space or newline in between my doc comments and my function definition. at least for me that seemed to be the issue and just posting in case this helps |
I encountered the same problem, and when I introduced the vendor dependency in main.go, the generation speed changed from one minute to one second. |
I'm using
in my Makefile. |
In some situations, such as when using the go-swag Nix package, runtime.GOROOT() will be empty, and RangeFiles will skip all source paths since technically, all paths are prefixed with the empty string. See also NixOS/nixpkgs#224701 May resolve some cases of swaggo#1622.
In some situations, such as when using the go-swag Nix package, runtime.GOROOT() will be empty, and RangeFiles will skip all source paths since technically, all paths are prefixed with the empty string. See also NixOS/nixpkgs#224701 May resolve some cases of #1622.
Same at my end with 1.16.3. Is there any solution to it? I am using the go-chi router. Thanks |
* Update README_zh-CN.md (#1545) remove repeat net/http * Add option to set template delimiters (#1499) * Add template action delimiter cli flag * Add delims to generator config and template Also adds tests using the "quote" test as a base. This has to have a custom Instance name or it will clash with the "quotes" one and panic since it will have registered two "swagger" instances in the package test. * Add testdata for custom delim flags Based on the "quote" testdata. * Add delims to the spec, with tests. Make sure we don't add delims if they are empty. This shouldn't be possible, but might as well be safe. * Go mod tidy and sum update * Make the CLI experience a bit cleaner * Revert go.mod and sum * Update readme * fix bug: enums of explicit type conversion (#1556) Signed-off-by: sdghchj <[email protected]> * add retract to fix proxy cache caused by accidentally pushed tags (#1562) * add retract caused by accidentally pushed tags * update version to match new tag version --------- Co-authored-by: Tobias Theel <[email protected]> * docs: doc to pt Add option to set template delims. (#1563) * fix: lint error for generated docs.go (#1583) Co-authored-by: wanglonghui7 <[email protected]> * fix bug: enums of underscored number (#1581) Signed-off-by: sdghchj <[email protected]> * fix using tab (\t) as separator for custom type names (#1594) * chore(deps): bump github.com/gin-gonic/gin (#1598) Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.7.7 to 1.9.1. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](gin-gonic/gin@v1.7.7...v1.9.1) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/gin-gonic/gin in /example/celler (#1599) Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.7.7 to 1.9.1. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](gin-gonic/gin@v1.7.7...v1.9.1) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump github.com/gin-gonic/gin in /example/go-module-support (#1600) Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.7.7 to 1.9.1. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](gin-gonic/gin@v1.7.7...v1.9.1) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix required params parsing for routes with multiple paths and multiple params (#1621) * fix required params parsing for routes with multiple paths and multiple params * fix incorrect variable declaration of validParams * parser: if all tags negate return true on no hits (#1624) * parser: if all tags negate return true on no hits * fix: enums in body got parse incorrectly (#1625) * parse binary literal const (#1593) * support binary const Signed-off-by: sdghchj <[email protected]> * add test Signed-off-by: sdghchj <[email protected]> --------- Signed-off-by: sdghchj <[email protected]> * feat: global security (#1620) * global security * improve test * add cli flag --pdl to determine whether parse operations in dependency (#1605) * change cli flag to parse operations in dependency Signed-off-by: sdghchj <[email protected]> * change cli flag to parse operations in dependency Signed-off-by: sdghchj <[email protected]> * add cli flag --pdl to determine whether parse operations in dependency Signed-off-by: sdghchj <[email protected]> * add cli flag --pdl to determine whether parse operations in dependency Signed-off-by: sdghchj <[email protected]> * add cli flag --pdl to determine whether parse operations in dependency Signed-off-by: sdghchj <[email protected]> --------- Signed-off-by: sdghchj <[email protected]> * feat: add --packagePrefix=P for only parse packages matched by prefix P (#1582) * enchancement: report which property is triggering a parsing error (#1439) * add byte check before and after file is formatted (#1637) * feat: preserve file permission when write formatted files (#1636) test: add a test case to validate permission equal * docs(readme): fix param brace (#1647) * chore(deps): bump gopkg.in/yaml.v3 (#1663) Bumps gopkg.in/yaml.v3 from 3.0.0-20200615113413-eeeca48fe776 to 3.0.0. --- updated-dependencies: - dependency-name: gopkg.in/yaml.v3 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * yaml.v3 security patch (#1664) * test: remove redundant `filepath.Clean` call (#1675) * chore(deps): bump golang.org/x/net from 0.8.0 to 0.17.0 (#1686) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.8.0 to 0.17.0. - [Commits](golang/net@v0.8.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/markdown (#1685) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.17.0. - [Commits](golang/net@v0.7.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * When the return value defined by the @success tag is equal to a null value, make fixes to prevent a null pointer exception occurs (#1667) * chore(deps): bump golang.org/x/net in /example/go-module-support (#1682) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0. - [Commits](golang/net@v0.10.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/object-map-example (#1684) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0. - [Commits](golang/net@v0.10.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/celler (#1683) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.10.0 to 0.17.0. - [Commits](golang/net@v0.10.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * docs: add PT and EN examples for Go generic types (#1697) * Update README.md (#1698) Adding instructions to finish the steps in `Getting started` section before `How to use it with Gin` It is easy for anybody to miss out that section which causes unwanted failures in the Swagger UI * update gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 to 3.0.0 (#1640) * improve docker container usage (#1704) * Update Go build version for Docker container * Explicitly specify copy target * Set ENTRYPOINT * Move binary to /bin * Add docker usage instructions to the README * Set /code as the default WORKDIR --------- Co-authored-by: Norman Gehrsitz <[email protected]> * fix issue #1662: find definitions from external packages first (#1666) Signed-off-by: sdghchj <[email protected]> * Drop support for go v1.17.x (#1723) * Drop support for go v1.17.x Signed-off-by: sdghchj <[email protected]> * Add flag state #1628 (#1629) * add state flag * fix deps (#1724) Signed-off-by: sdghchj <[email protected]> * chore(deps): bump golang.org/x/crypto in /example/celler (#1727) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/crypto in /example/go-module-support (#1726) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/crypto in /example/object-map-example (#1725) Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0. - [Commits](golang/crypto@v0.14.0...v0.17.0) --- updated-dependencies: - dependency-name: golang.org/x/crypto dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * deprecate some parts of routers in an operation (#1735) Signed-off-by: sdghchj <[email protected]> * bug: array form filed name should not contains bracket which led to invalid fieldname in ts codegen (#1706) * Struct fields supported for header and path param types (#1740) * Support object data types for header params Add initial struct test for header names and validation. * Add form and query struct test for operations * Operation param add path struct model support and tests wip: fix merge * fix #1742 (#1744) * fix #1742 Signed-off-by: sdghchj <[email protected]> * Feat: Support generic with map params (#1746) * support generic with map params Signed-off-by: sdghchj <[email protected]> * Update version.go (#1751) * Update operation.go (#1753) getUnderlyingSchema can return nil, so it has to be checked here otherwise the code is exposed to invalid memory address or nil pointer dereference * fix: remove dropped tags from general infos (#1764) * fix: remove unneeded tags from general infos Signed-off-by: sdghchj <[email protected]> * Update docker go build version to 1.21 (#1758) * add support for "title" tag (#1762) feat: add support for "title" tag in structField struct to allow specifying a custom field title * chore: fix some typos in comments (#1788) Signed-off-by: camcui <[email protected]> * bump go version (#1797) * bump go version * cleanup pipeline * chore(deps): bump golang.org/x/net from 0.17.0 to 0.23.0 (#1793) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/markdown (#1792) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/celler (#1794) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/go-module-support (#1795) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump golang.org/x/net in /example/object-map-example (#1796) Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0. - [Commits](golang/net@v0.17.0...v0.23.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Handle case of empty GOROOT (#1798) In some situations, such as when using the go-swag Nix package, runtime.GOROOT() will be empty, and RangeFiles will skip all source paths since technically, all paths are prefixed with the empty string. See also NixOS/nixpkgs#224701 May resolve some cases of #1622. * Added multiline support for @description attribute for securityDefinitions (#1786) * Feat: multi-arch docker image (#1756) * Feat: multi-arch docker image - adapt Dockerfile to support cross-compilation depending on TARGETARCH and TARGETOS variables see https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/ - set target platforms for docker/build-push-action * Support running on forks * Fix ARG format * Fix docker digest step * Restrict permissions * Update action versions * Set $TARGETPLATFORM explicitly docker/build-push-action#820 (comment) --------- Co-authored-by: Norman Gehrsitz <[email protected]> * chore(deps): bump google.golang.org/protobuf (#1773) Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump google.golang.org/protobuf (#1774) Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump google.golang.org/protobuf in /example/celler (#1775) Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix issue: #1780: filter $GOROOT path (#1827) Signed-off-by: song <[email protected]> * feat: read from stdin, write to stdout (#1831) (#1832) Co-authored-by: Bruno Bonatto <[email protected]> * Added suport for parsing comments inside of function bodies (#1824) Added suport for parsing comments inside of function bodies --------- Co-authored-by: Jonas Ha <[email protected]> * adds support for complex types with function scope (#1813) * [Issue 1812] fix misalignment in expected.json and api.go messing with parser_test (#1836) * Fixes Issue 1829 (#1830) * fix: fixes a bug that could select wrong tag description markdown file * fixes parser to be able to parse file names with and without ext * Fix global overrides for any/interface ref types (#1835) When overriding with any or interface{}, the code should prefer the "any" (empty) schema instead, not the object schema since that's different e.g. * adds support for pointer function scoped fields (#1841) * fix parse nested structs and aliases (#1866) Co-authored-by: ma.mikhaylov <[email protected]> * Fix generics used with function scoped types (#1883) * Fix param comment escaping issue (#1890) This commit fixes a param comment issue where a "\n" gets escaped so it would not be applied to the output swagger file. * support markdown description for declaration (#1893) * feat: support markdown description for declaration * fix: range PackagesDefinitions.uniqueDefinitions cause panic --------- Co-authored-by: xinbi.nie <[email protected]> * update README (#1856) * Update docs for request and response headers (#1825) * fix:parse all field names declared in a row (#1872) * fix:parse all fields names declared in a row * Flags to parse internal and dependency package (#1894) * fix: failing assert in enums test on 32bit (#1634) * Feat: Add support for parenthesis in router patterns (#1859) * chore: Update ci.yml (#1902) * new release (#1901) * fix some issues * fix unit tests --------- Signed-off-by: sdghchj <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: camcui <[email protected]> Signed-off-by: song <[email protected]> Co-authored-by: tzxdtc10 <[email protected]> Co-authored-by: Leo Palmer Sunmo <[email protected]> Co-authored-by: sdghchj <[email protected]> Co-authored-by: Nerzal <[email protected]> Co-authored-by: Tobias Theel <[email protected]> Co-authored-by: Paulo Lopes Estevão <[email protected]> Co-authored-by: lowang-bh <[email protected]> Co-authored-by: wanglonghui7 <[email protected]> Co-authored-by: Martin W. Kirst <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Phenix66 <[email protected]> Co-authored-by: Roy Marples <[email protected]> Co-authored-by: Billy Ho <[email protected]> Co-authored-by: nameoffnv <[email protected]> Co-authored-by: Shengyu Zhang <[email protected]> Co-authored-by: Sakis <[email protected]> Co-authored-by: Daniel Moncada <[email protected]> Co-authored-by: wholesome-ghoul <[email protected]> Co-authored-by: Shimizu1111 <[email protected]> Co-authored-by: Renan Silva <[email protected]> Co-authored-by: Saurabh Chatterjee <[email protected]> Co-authored-by: caption <[email protected]> Co-authored-by: ngehrsitz <[email protected]> Co-authored-by: Norman Gehrsitz <[email protected]> Co-authored-by: Ivan Volkov <[email protected]> Co-authored-by: Jinof <[email protected]> Co-authored-by: Joe Shaw <[email protected]> Co-authored-by: Mathieu Chauvet <[email protected]> Co-authored-by: Matteo Bassan <[email protected]> Co-authored-by: camcui <[email protected]> Co-authored-by: Evan Goode <[email protected]> Co-authored-by: Vladimir Avchenov <[email protected]> Co-authored-by: Timo Naroska <[email protected]> Co-authored-by: bob <[email protected]> Co-authored-by: bfbonatto <[email protected]> Co-authored-by: Bruno Bonatto <[email protected]> Co-authored-by: j-d-ha <[email protected]> Co-authored-by: Jonas Ha <[email protected]> Co-authored-by: Kristoffer Fage Jensen <[email protected]> Co-authored-by: Michi H <[email protected]> Co-authored-by: Ezequiel Rodriguez <[email protected]> Co-authored-by: zdon0 <[email protected]> Co-authored-by: ma.mikhaylov <[email protected]> Co-authored-by: Berk Karaal <[email protected]> Co-authored-by: Yuki Omoto <[email protected]> Co-authored-by: nicoxix <[email protected]> Co-authored-by: xinbi.nie <[email protected]> Co-authored-by: Eike Haller <[email protected]> Co-authored-by: Harsh Mittal <[email protected]> Co-authored-by: Leso_KN <[email protected]> Co-authored-by: alifemove <[email protected]>
Describe the bug
Not able to generate swagger files for my project. Tried
swag init --parseDependency -g main.go
as well. Still the same.Only these lines are outputted in the console.
It works fine with version v1.8.2 and below.
Your swag version
swag v1.8.3 and onwards
Your go version
Go 1.19.3
The text was updated successfully, but these errors were encountered: