Skip to content

plugins下通过cli新增多级分组的 api 文件格式有问题 #405

@mtpdx

Description

@mtpdx
jzero new simpleapi --frame api -m foo
cd simpleapi 
jzero gen
go mod tidy
jzero new simpleplugin --frame api --serverless --mono
cd plugins/simpleplugin 
jzero add api aa/bb/cc

错误信息:

$ jzero add api aa/bb/cc
Error: simpleplugin 16:11 syntax error: expected '{', got '/'

api文件:

syntax = "v1"

info (
    go_package: "aa/bb/cc"
)

type CreateRequest {}

type CreateResponse {}

@server (
    prefix: /api/aa/bb/cc
    group:  aa/bb/cc
    compact_handler: true
)
service aa/bb/cc {
    @handler Create
    post / (CreateRequest) returns (CreateResponse)
}

service aa/bb/cc 应该替换为 plugins名

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions