Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
138 changes: 113 additions & 25 deletions apollo-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAppDTO'
example:
dataChangeCreatedBy: 'apollo'
dataChangeLastModifiedBy: 'apollo'
dataChangeCreatedTime: '2024-01-15T10:30:00.000Z'
dataChangeLastModifiedTime: '2024-01-15T10:30:00.000Z'
name: 'Sample Application'
appId: 'sample-app'
orgId: 'default'
orgName: 'Default Organization'
ownerName: 'Apollo Admin'
ownerEmail: 'admin@apollo.com'
$ref: '#/components/schemas/SuccessEmptyResponse'
headers: {}
'400':
description: '请求参数错误'
Expand Down Expand Up @@ -290,6 +279,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -345,6 +340,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
responses:
'200':
description: '应用删除成功'
Expand Down Expand Up @@ -454,9 +455,7 @@ paths:
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/OpenEnvClusterInfo'
$ref: '#/components/schemas/MultiResponseEntity'
example:
- env: 'DEV'
clusters:
Expand Down Expand Up @@ -487,6 +486,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -540,9 +545,7 @@ paths:
content:
application/json:
schema:
type: array
items:
type: string
$ref: '#/components/schemas/MultiResponseEntity'
headers: {}
'404':
description: '应用不存在'
Expand Down Expand Up @@ -743,7 +746,7 @@ paths:
- name: operator
in: query
description: '操作人用户名'
required: false
required: true
schema:
type: string
responses:
Expand Down Expand Up @@ -882,6 +885,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -1112,7 +1121,7 @@ paths:
- name: operator
in: query
description: ''
required: false
required: true
schema:
type: string
responses:
Expand Down Expand Up @@ -1160,6 +1169,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -1402,6 +1417,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -1528,6 +1549,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
responses:
'200':
description: '配置项更改撤销成功'
Expand Down Expand Up @@ -1630,6 +1657,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
responses:
'200':
description: '集群删除成功'
Expand Down Expand Up @@ -2113,7 +2146,7 @@ paths:
- name: operator
in: query
description: '操作人用户名'
required: false
required: true
schema:
type: string
responses:
Expand Down Expand Up @@ -2362,6 +2395,7 @@ paths:
/openapi/v1/envs/{env}/releases/{releaseId}/instances:
get:
summary: 根据发布版本查询实例(支持分页) (new added)
operationId: getByRelease
deprecated: false
description: GET /openapi/v1/envs/{env}/releases/{releaseId}/instances
tags:
Expand Down Expand Up @@ -2428,9 +2462,10 @@ paths:
dataChangeLastModifiedTime: ''
dataChangeCreatedTime: ''
headers: {}
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_int: # avoidng confliction with other server endpoint
/openapi/v1/envs/{env}/apps/{appId}/clusters/{clusterName}/namespaces/{namespaceName}/instances_not_in: # avoidng confliction with other server endpoint
get:
summary: 查询不在指定发布版本中的实例 (new added)
operationId: getByReleasesNotIn
deprecated: false
description: >-
GET
Expand Down Expand Up @@ -2868,6 +2903,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
responses:
'200':
description: 'AppNamespace删除成功'
Expand Down Expand Up @@ -3105,6 +3146,12 @@ paths:
required: true
schema:
type: string
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
responses:
'200':
description: '解除关联成功'
Expand Down Expand Up @@ -3261,7 +3308,7 @@ paths:
- name: operator
in: query
description: '操作人用户名'
required: false
required: true
schema:
type: string
responses:
Expand Down Expand Up @@ -3334,7 +3381,7 @@ paths:
- name: operator
in: query
description: 操作人用户名
required: false
required: true
schema:
type: string
responses:
Expand Down Expand Up @@ -3397,6 +3444,12 @@ paths:
example: 'true'
schema:
type: boolean
- name: operator
in: query
description: '操作人用户名'
required: true
schema:
type: string
requestBody:
content:
application/json:
Expand Down Expand Up @@ -3527,7 +3580,7 @@ paths:
- name: operator
in: query
description: 操作人用户名
required: false
required: true
schema:
type: string
requestBody:
Expand Down Expand Up @@ -4160,5 +4213,40 @@ components:
projectB:
darkMode: true

MultiResponseEntity:
type: object
description: A response container holding multiple RichResponseEntity objects
properties:
code:
type: integer
description: Overall HTTP status code
example: 200
entities:
type: array
description: List of rich response entities
items:
$ref: '#/components/schemas/RichResponseEntity'
required:
- code
- entities

RichResponseEntity:
type: object
description: A wrapper for a single response entity with code, message, and body
properties:
code:
type: integer
description: HTTP status code
example: 200
message:
type: object
description: Response message (can be string or object)
example: "OK"
body:
type: object
description: Response payload (generic type T)
required:
- code
- message

servers: []
14 changes: 7 additions & 7 deletions generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ echo "📦 Adding Maven Wrapper to Spring Boot 2 project..."
cd "$SPRING_BOOT2_DIR"
mvn -N io.takari:maven:wrapper -Dmaven=3.8.6

# this is for removing illegal symbols generated by a generator.
echo "Cleaning files (trailing spaces, CRLF, EOF newlines)..."
find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \
-type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.sh" -o -name ".editorconfig" -o -name ".gitignore" -o -name "mvnw" \) -print0 \
| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/\s*\z/\n/s'
echo "Cleaning files (trailing spaces, CRLF, EOF newlines)... Done!"

cd ..

echo "💡 Spring Boot 2 project ready! To start the server, run:"
Expand All @@ -77,3 +70,10 @@ openapi-generator generate \
--additional-properties=packageName=apollo-openapi,packageVersion=0.0.1

echo "✅ SDK generation complete."

# this is for removing illegal symbols generated by a generator.
echo "Cleaning files (trailing spaces, CRLF, EOF newlines, wrong spellings)..."
find . -type d \( -name .git -o -name .idea -o -name .mvn -o -name target -o -name build -o -name node_modules \) -prune -o \
-type f \( -name "*.java" -o -name "*.xml" -o -name "*.properties" -o -name "*.md" -o -name "*.yml" -o -name "*.yaml" -o -name "*.gradle" -o -name "*.sh" -o -name "*.py" -o -name "*.pyi" -o -name "*.ts" -o -name "*.rs" -o -name ".editorconfig" -o -name ".gitignore" -o -name ".npmignore" -o -name "mvnw" -o -name "VERSION" \) -print0 \
| xargs -0 perl -i -0777 -pe 's/[ \t]+(?=\r?$)//mg; s/\r//g; s/filesystme/filesystem/g; s/\s*\z/\n/s'
echo "Cleaning files (trailing spaces, CRLF, EOF newlines, wrong spellings)... Done!"
6 changes: 3 additions & 3 deletions java-client/.github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ 17, 21 ]
java: [ '8' ]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
Expand Down
Loading