blob: 76bd6b3b88f8f73ac5d4a49e1fa18d9920bd4bb3 [file] [log] [blame]
刘洪青47205852020-08-14 13:39:30 +08001#!/bin/sh
2
3cd /root/poa-api-docs
4
5ls -al
6
7# user-data-service-poa.v1.yaml
8
9curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user'
10
11# 1. 创建服务
12curl -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. 创建版本
15curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/user/apiVersions/v1'
16
17# 3. 上传OAS Yaml
18curl -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. 发布版本
21curl -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
26curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz'
27
28# 1. 创建服务
29curl -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. 创建版本
32curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/authz/apiVersions/v1'
33
34# 3. 上传OAS Yaml
35curl -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. 发布版本
38curl -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
43curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter'
44
45# 1. 创建服务
46curl -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. 创建版本
49curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/admincenter/apiVersions/v1'
50
51# 3. 上传OAS Yaml
52curl -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. 发布版本
55curl -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
60curl -i -s -X DELETE 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate'
61
62# 1. 创建服务
63curl -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. 创建版本
66curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate/apiVersions/v1'
67
68# 3. 上传OAS Yaml
69curl -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. 发布版本
72curl -i -s -X POST 'http://poa-sa-svc.poa.svc.cluster.local:8443/v1/services/communicate/apiVersions/v1/publish'