|
|
@ -64,7 +64,7 @@ func (p parser) convert2Spec() error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (p parser) fillInfo() {
|
|
|
|
func (p parser) fillInfo() {
|
|
|
|
properties := make(map[string]string, 0)
|
|
|
|
properties := make(map[string]string)
|
|
|
|
if p.ast.Info != nil {
|
|
|
|
if p.ast.Info != nil {
|
|
|
|
p.spec.Info = spec.Info{}
|
|
|
|
p.spec.Info = spec.Info{}
|
|
|
|
for _, kv := range p.ast.Info.Kvs {
|
|
|
|
for _, kv := range p.ast.Info.Kvs {
|
|
|
@ -258,7 +258,7 @@ func (p parser) fillService() error {
|
|
|
|
route.ResponseType = p.astTypeToSpec(astRoute.Route.Reply.Name)
|
|
|
|
route.ResponseType = p.astTypeToSpec(astRoute.Route.Reply.Name)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if astRoute.AtDoc != nil {
|
|
|
|
if astRoute.AtDoc != nil {
|
|
|
|
properties := make(map[string]string, 0)
|
|
|
|
properties := make(map[string]string)
|
|
|
|
for _, kv := range astRoute.AtDoc.Kv {
|
|
|
|
for _, kv := range astRoute.AtDoc.Kv {
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -290,7 +290,7 @@ func (p parser) fillService() error {
|
|
|
|
|
|
|
|
|
|
|
|
func (p parser) fillRouteAtServer(astRoute *ast.ServiceRoute, route *spec.Route) error {
|
|
|
|
func (p parser) fillRouteAtServer(astRoute *ast.ServiceRoute, route *spec.Route) error {
|
|
|
|
if astRoute.AtServer != nil {
|
|
|
|
if astRoute.AtServer != nil {
|
|
|
|
properties := make(map[string]string, 0)
|
|
|
|
properties := make(map[string]string)
|
|
|
|
for _, kv := range astRoute.AtServer.Kv {
|
|
|
|
for _, kv := range astRoute.AtServer.Kv {
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -314,7 +314,7 @@ func (p parser) fillRouteAtServer(astRoute *ast.ServiceRoute, route *spec.Route)
|
|
|
|
|
|
|
|
|
|
|
|
func (p parser) fillAtServer(item *ast.Service, group *spec.Group) {
|
|
|
|
func (p parser) fillAtServer(item *ast.Service, group *spec.Group) {
|
|
|
|
if item.AtServer != nil {
|
|
|
|
if item.AtServer != nil {
|
|
|
|
properties := make(map[string]string, 0)
|
|
|
|
properties := make(map[string]string)
|
|
|
|
for _, kv := range item.AtServer.Kv {
|
|
|
|
for _, kv := range item.AtServer.Kv {
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
properties[kv.Key.Text()] = kv.Value.Text()
|
|
|
|
}
|
|
|
|
}
|
|
|
|