Closed
Description
Problem statement
Even though there is a message in such file saying
// This file is safe to edit. Once it exists it will not be overwritten
the file gets always rewritten by calling swagger generate server...
Swagger specification
any
Steps to reproduce
- Execute 'swagger generate server -f swagger.json'
- Modify the file generated which starts with 'configure_' and sits in restapi folder
- Execute 'swagger generate server -f swagger.json' again
It seems like the problem is in ToFileName function from github.com\go-openapi\swag\util.go
I extended the test for this function with case: {"FileWithExtension.go", "file_with_extension.go"}
And it failed with this message:
--- FAIL: TestToFileName (0.01s)
Error Trace: util_test.go:133
Error: Not equal:
expected: "file_with_extension.go"
received: "file_with_extension_go"
Metadata
Metadata
Assignees
Labels
No labels