tao12345666333 commented on code in PR #10065:
URL: https://github.com/apache/apisix/pull/10065#discussion_r1300818920
##########
docs/en/latest/admin-api.md:
##########
@@ -1514,3 +1514,52 @@ Proto resource request address: /apisix/admin/protos/{id}
| content | True | String | content of `.proto` or `.pb` files | See
[here](./plugins/grpc-transcode.md#enabling-the-plugin) |
| create_time | False | Epoch timestamp (in seconds) of the created time.
If missing, this field will be populated automatically. |
1602883670 |
| update_time | False | Epoch timestamp (in seconds) of the updated time.
If missing, this field will be populated automatically. |
1602883670 |
+
+## Schema validate
+
+Check the validity of a configuration against its entity schema. This allows
you to test your input before submitting a request to the entity endpoints of
the Admin API.
+
+Note that this only performs the schema validation checks, checking that the
input configuration is well-formed. Requests to the entity endpoint using the
given configuration may still fail due to other reasons, such as invalid
foreign key relationships or uniqueness check failures against the contents of
the data store.
+
+### Schema validate API
+
+Schema validate request address: /apisix/admin/schema/validate/{resource}
+
+### Request Methods
+
+| Method | Request URI | Request Body | Description
|
+| ------ | -------------------------------- | ------------ |
----------------------------------------------- |
+| POST | /apisix/admin/schema/validate/{resource} | {..resource conf..}
| Validate the resource configuration against corresponding schema.
|
+
+### Request Body Parameters
+
+* 200: validate ok.
+* 400: validate failed, with error as response body in JSON format.
+
+Example:
+
+```bash
+curl http://127.0.0.1:9180/apisix/admin/schema/validate/routes \
+ -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X POST -i -d '{
+ "uri": 1980,
+ "upstream": {
+ "scheme": "https",
+ "type": "roundrobin",
+ "nodes": {
+ "nghttp2.org": 1
Review Comment:
yes.
FYI We can use httpbun.org also
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]