刘洪青 | 4720585 | 2020-08-14 13:39:30 +0800 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | cd /root/poa-api-docs |
| 4 | |
| 5 | ls -al |
| 6 | |
| 7 | # user-data-service-poa.v1.yaml |
| 8 | |
| 9 | curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user' |
| 10 | |
| 11 | # 1. 创建服务 |
| 12 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services' -H 'Content-Type: application/json' -d '{"id": "user", "origin": "http://user-data-service-poa-svc.user-data-service.svc.cluster.local:8080", "name": "用户服务", "description": "用户服务"}' |
| 13 | |
| 14 | # 2. 创建版本 |
| 15 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user/apiVersions/v1' |
| 16 | |
| 17 | # 3. 上传OAS Yaml |
| 18 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @user-data-service-poa.v1.yaml |
| 19 | |
| 20 | # 4. 发布版本 |
| 21 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user/apiVersions/v1/publish' |
| 22 | |
| 23 | |
| 24 | # user-authorization-service-poa.v1.yaml |
| 25 | |
| 26 | curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz' |
| 27 | |
| 28 | # 1. 创建服务 |
| 29 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services' -H 'Content-Type: application/json' -d '{"id": "authz", "origin": "http://user-authorization-poa-svc.user-authorization-service.svc.cluster.local:8080", "name": "授权服务", "description": "授权服务"}' |
| 30 | |
| 31 | # 2. 创建版本 |
| 32 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz/apiVersions/v1' |
| 33 | |
| 34 | # 3. 上传OAS Yaml |
| 35 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @user-authorization-service-poa.v1.yaml |
| 36 | |
| 37 | # 4. 发布版本 |
| 38 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz/apiVersions/v1/publish' |
| 39 | |
| 40 | |
| 41 | # admin-center-poa.v1.yaml |
| 42 | |
| 43 | curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter' |
| 44 | |
| 45 | # 1. 创建服务 |
| 46 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services' -H 'Content-Type: application/json' -d '{"id": "admincenter", "origin": "http://admin-center-poa-svc.admin-center.svc.cluster.local:8080", "name": "管理中心", "description": "管理中心"}' |
| 47 | |
| 48 | # 2. 创建版本 |
| 49 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter/apiVersions/v1' |
| 50 | |
| 51 | # 3. 上传OAS Yaml |
| 52 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @admin-center-poa.v1.yaml |
| 53 | |
| 54 | # 4. 发布版本 |
| 55 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter/apiVersions/v1/publish' |
| 56 | |
| 57 | |
| 58 | # communicate-center-poa.v1.yaml |
| 59 | |
| 60 | curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate' |
| 61 | |
| 62 | # 1. 创建服务 |
| 63 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services' -H 'Content-Type: application/json' -d '{"id": "communicate", "origin": "http://communicate-center-poa-svc.communicate-center.svc.cluster.local:8080", "name": "通信服务", "description": "通信服务"}' |
| 64 | |
| 65 | # 2. 创建版本 |
| 66 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate/apiVersions/v1' |
| 67 | |
| 68 | # 3. 上传OAS Yaml |
| 69 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate/apiVersions/v1/apiSpecs' -H 'Content-Type: application/yaml' --data-binary @communicate-center-poa.v1.yaml |
| 70 | |
| 71 | # 4. 发布版本 |
| 72 | curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate/apiVersions/v1/publish' |