You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by xi...@apache.org on 2021/09/16 06:14:52 UTC
[incubator-shenyu] branch master updated: [type:feature] add http
test file (#2089)
This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new a6f4057 [type:feature] add http test file (#2089)
a6f4057 is described below
commit a6f4057d7a43aa7220f6382a4e8e84e169050f13
Author: li-keguo <33...@users.noreply.github.com>
AuthorDate: Thu Sep 16 14:14:12 2021 +0800
[type:feature] add http test file (#2089)
* a little modification
* Revert "add http test file to examples"
This reverts commit 5a0fcdf0671989dd330a422f9ac237d055cea35d.
# Conflicts:
# shenyu-examples/shenyu-examples-http/src/main/http/http-test-api.http
* remove never used environment
* remove never used environment
* remove never used environment
* remove never used environment
* Revert "Revert "add http test file to examples""
This reverts commit 7981bebe
* Revert "remove never used environment"
This reverts commit 8f4f0fef
* remove never used environment
* add http file to examples[grpc,http,spring cloud]
* add http file to examples[grpc,http,spring cloud]
* Rollback
* add http file to examples[dubbo,motan,sofa]
* rollback
* add sofa-test-api.http
* add tars-test-api.http
* Revert "add sofa-test-api.http"
This reverts commit d7c9f5a9
* add sofa-test-api.http
Co-authored-by: likeguo <li...@mininglamp.com>
---
.../src/main/http/sofa-test-api.http | 57 ++++++++++++++++++++--
.../src/main/http/tars-test-api.http | 37 ++++++++++++++
2 files changed, 90 insertions(+), 4 deletions(-)
diff --git a/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/src/main/http/sofa-test-api.http b/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/src/main/http/sofa-test-api.http
index f839b4e..0d4639b 100644
--- a/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/src/main/http/sofa-test-api.http
+++ b/shenyu-examples/shenyu-examples-sofa/shenyu-examples-sofa-service/src/main/http/sofa-test-api.http
@@ -135,7 +135,7 @@ Content-Type: application/json
"name": "test"
}
],
- "id": 123,
+ "id": "123",
"name": "test"
}
@@ -145,7 +145,27 @@ Accept: application/json
Content-Type: application/json
{
+ "sofaSimpleTypeBean": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ 123,
+ 124
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+}
+### shengyu getway proxy saveComplexBeanAndName
+PUT http://localhost:9195/sofa/saveComplexBeanAndName
+Accept: application/json
+Content-Type: application/json
+
+{
+ "sofaComplexTypeBean": {
"sofaSimpleTypeBean": {
"id": "123",
"name": "test"
@@ -158,9 +178,38 @@ Content-Type: application/json
"abc": "abc",
"cbd": "cbd"
}
-
+ },
+ "name": "name"
}
+### shengyu getway proxy saveTwoList
+PUT http://localhost:9195/sofa/saveTwoList
+Accept: application/json
+Content-Type: application/json
-
-
+{
+ "sofaComplexTypeBeanList": [
+ {
+ "sofaSimpleTypeBean": {
+ "id": "123",
+ "name": "test"
+ },
+ "idLists": [
+ 123,
+ 124
+ ],
+ "idMaps": {
+ "abc": "abc",
+ "cbd": "cbd"
+ }
+ }
+ ],
+ "testKey1": {
+ "id": "123",
+ "name": "test"
+ },
+ "testKey2": {
+ "id": "123",
+ "name": "test"
+ }
+}
diff --git a/shenyu-examples/shenyu-examples-tars/src/main/http/tars-test-api.http b/shenyu-examples/shenyu-examples-tars/src/main/http/tars-test-api.http
new file mode 100644
index 0000000..665445e
--- /dev/null
+++ b/shenyu-examples/shenyu-examples-tars/src/main/http/tars-test-api.http
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+
+### shengyu getway proxy hello
+GET http://localhost:9195/tars/hello
+Accept: application/json
+Content-Type: application/json
+
+{
+ "no": 123,
+ "name": "order"
+}
+
+### shengyu getway proxy helloInt
+GET http://localhost:9195/tars/helloInt
+Accept: application/json
+Content-Type: application/json
+
+{
+ "no": 123,
+ "name": "order"
+}