Fix bug in dartgen: Increase the processing logic when route.RequestType is empty

This commit is contained in:
zhoumingji
2023-03-04 11:39:29 +08:00
committed by kevin
parent 2cf09f3c36
commit 8c31525378
2 changed files with 5 additions and 1 deletions

View File

@@ -194,6 +194,10 @@ func extractPositionalParamsFromPath(route spec.Route) string {
func makeDartRequestUrlPath(route spec.Route) string {
path := route.Path
if route.RequestType == nil {
return `"` + path + `"`
}
ds, ok := route.RequestType.(spec.DefineStruct)
if !ok {
return path