Skip to content

Commit 97e4f9e

Browse files
night556JacksonTian
authored andcommitted
delete API help information link
1 parent bc0f7f7 commit 97e4f9e

File tree

5 files changed

+3
-22
lines changed

5 files changed

+3
-22
lines changed

meta/api.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ func findParameterInner(params []Parameter, name string) *Parameter {
9999
return nil
100100
}
101101

102-
func (a *Api) GetDocumentLink() string {
103-
return fmt.Sprintf("https://help.aliyun.com/api/%s/%s.html", strings.ToLower(a.Product.Code), a.Name)
104-
}
105-
106102
func (a *Api) CheckRequiredParameters(checker func(string) bool) error {
107103
missing := false
108104
s := ""

meta/api_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,6 @@ func TestApi_ForeachParameters(t *testing.T) {
128128
assert.Equal(t, api.Parameters[0].SubParameters[0].Name, "subparameters")
129129
}
130130

131-
func TestApi_GetDocumentLink(t *testing.T) {
132-
api := &Api{
133-
Name: "apitest",
134-
Product: &Product{
135-
Code: "code",
136-
},
137-
}
138-
link := api.GetDocumentLink()
139-
assert.Equal(t, link, "https://help.aliyun.com/api/code/apitest.html")
140-
}
141-
142131
func TestApi_CheckRequiredParameters(t *testing.T) {
143132
api := &Api{
144133
Parameters: []Parameter{

meta/product_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import (
2020
"testing"
2121
)
2222

23-
func TestProduct_GetLowerCodeAndGetDocumentLink(t *testing.T) {
23+
func TestProduct_GetLowerCode(t *testing.T) {
2424
product := &Product{
2525
Code: "code",
2626
}

openapi/library.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,10 @@ func (a *Library) PrintApiUsage(productCode string, apiName string) error {
136136

137137
if product.ApiStyle == "restful" {
138138
cli.Printf(a.writer, "\nProduct: %s (%s)\n", product.Code, product.Name[i18n.GetLanguage()])
139-
// cli.Printf("Api: %s %s\n", api.Name, api.Description[i18n.GetLanguage()])
140-
cli.Printf(a.writer, "Link: %s\n", api.GetDocumentLink())
141139
cli.Printf(a.writer, "Method: %s\n", api.Method)
142140
cli.Printf(a.writer, "PathPattern: %s\n", api.PathPattern)
143141
} else {
144142
cli.Printf(a.writer, "\nProduct: %s (%s)\n", product.Code, product.Name[i18n.GetLanguage()])
145-
// cli.Printf("Api: %s %s\n", api.Name, api.Description[i18n.GetLanguage()])
146-
cli.Printf(a.writer, "Link: %s\n", api.GetDocumentLink())
147143
}
148144

149145
cli.Printf(a.writer, "\nParameters:\n")

openapi/rpc.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ func (a *RpcInvoker) Prepare(ctx *cli.Context) error {
7979

8080
if err != nil {
8181
return cli.NewErrorWithTip(err,
82-
"See %s or use `aliyun %s %s --help` to get more information",
83-
api.GetDocumentLink(), api.Product.GetLowerCode(), api.Name)
82+
"use `aliyun %s %s --help` to get more information",
83+
api.Product.GetLowerCode(), api.Name)
8484
}
8585
return nil
8686
}

0 commit comments

Comments
 (0)