|
|
@ -420,7 +420,7 @@ func (p *Parser) checkServices(apiItem *Api, types map[string]TypeExpr, linePref
|
|
|
|
|
|
|
|
|
|
|
|
_, ok := types[structName]
|
|
|
|
_, ok := types[structName]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("%s line %d:%d can not found declaration '%s' in context",
|
|
|
|
return fmt.Errorf("%s line %d:%d can not find declaration '%s' in context",
|
|
|
|
linePrefix, route.Reply.Name.Expr().Line(), route.Reply.Name.Expr().Column(), structName)
|
|
|
|
linePrefix, route.Reply.Name.Expr().Line(), route.Reply.Name.Expr().Column(), structName)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -433,7 +433,7 @@ func (p *Parser) checkRequestBody(route *Route, types map[string]TypeExpr, lineP
|
|
|
|
if route.Req != nil && route.Req.Name.IsNotNil() && route.Req.Name.Expr().IsNotNil() {
|
|
|
|
if route.Req != nil && route.Req.Name.IsNotNil() && route.Req.Name.Expr().IsNotNil() {
|
|
|
|
_, ok := types[route.Req.Name.Expr().Text()]
|
|
|
|
_, ok := types[route.Req.Name.Expr().Text()]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("%s line %d:%d can not found declaration '%s' in context",
|
|
|
|
return fmt.Errorf("%s line %d:%d can not find declaration '%s' in context",
|
|
|
|
linePrefix, route.Req.Name.Expr().Line(), route.Req.Name.Expr().Column(), route.Req.Name.Expr().Text())
|
|
|
|
linePrefix, route.Req.Name.Expr().Line(), route.Req.Name.Expr().Column(), route.Req.Name.Expr().Text())
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -470,7 +470,7 @@ func (p *Parser) checkType(linePrefix string, types map[string]TypeExpr, expr Da
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, ok := types[name]
|
|
|
|
_, ok := types[name]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("%s line %d:%d can not found declaration '%s' in context",
|
|
|
|
return fmt.Errorf("%s line %d:%d can not find declaration '%s' in context",
|
|
|
|
linePrefix, v.Literal.Line(), v.Literal.Column(), name)
|
|
|
|
linePrefix, v.Literal.Line(), v.Literal.Column(), name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -481,7 +481,7 @@ func (p *Parser) checkType(linePrefix string, types map[string]TypeExpr, expr Da
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_, ok := types[name]
|
|
|
|
_, ok := types[name]
|
|
|
|
if !ok {
|
|
|
|
if !ok {
|
|
|
|
return fmt.Errorf("%s line %d:%d can not found declaration '%s' in context",
|
|
|
|
return fmt.Errorf("%s line %d:%d can not find declaration '%s' in context",
|
|
|
|
linePrefix, v.Name.Line(), v.Name.Column(), name)
|
|
|
|
linePrefix, v.Name.Line(), v.Name.Column(), name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
case *Map:
|
|
|
|
case *Map:
|
|
|
|