You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/07/19 13:49:31 UTC

[GitHub] [apisix-ingress-controller] gxthrj commented on a change in pull request #601: feat: implement plugin schema API

gxthrj commented on a change in pull request #601:
URL: https://github.com/apache/apisix-ingress-controller/pull/601#discussion_r672307972



##########
File path: pkg/types/apisix/v1/types.go
##########
@@ -463,3 +463,23 @@ func ComposeConsumerName(namespace, name string) string {
 
 	return buf.String()
 }
+
+// Schema represents the schema of APISIX objects.
+type Schema struct {

Review comment:
       If you changed the types.go, Please use the `make codegen` to genrate code.
   `

##########
File path: pkg/apisix/cluster.go
##########
@@ -550,3 +557,27 @@ func readBody(r io.ReadCloser, url string) string {
 	}
 	return string(data)
 }
+
+// getSchema returns the schema of APISIX object.
+func (c *cluster) getSchema(ctx context.Context, url string) (string, error) {
+	req, err := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)

Review comment:
       I am not sure if this url is right. Because I can not see the prefix contains `/schema/plugins/xxx`.
   For example, if we want to get the schema of plugin `kafka-logger`. We can use this `http://127.0.0.1:9080/apisix/admin/schema/plugins/kafka-logger`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org