Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(api): add swagger desc for Arthas & Metric & Cypher & White API #2337

Merged
merged 9 commits into from
Nov 6, 2023
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
HEAD_BRANCH_NAME: ${{ github.head_ref }}
BASE_BRANCH_NAME: ${{ github.base_ref }}
TARGET_BRANCH_NAME: ${{ github.base_ref != '' && github.base_ref || github.ref_name }}
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }}
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') }}

strategy:
fail-fast: false
Expand All @@ -42,7 +42,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

Expand Down Expand Up @@ -88,6 +88,6 @@ jobs:
$TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.0.0
uses: codecov/codecov-action@v3
with:
file: ${{ env.REPORT_DIR }}/*.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import com.codahale.metrics.annotation.Timed;
import com.taobao.arthas.agent.attach.ArthasAgent;

import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
import jakarta.inject.Singleton;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
Expand All @@ -35,6 +37,7 @@

@Path("arthas")
@Singleton
@Tag(name = "ArthasAPI")
SunnyBoy-WYH marked this conversation as resolved.
Show resolved Hide resolved
public class ArthasAPI extends API {

@Context
Expand All @@ -43,6 +46,7 @@ public class ArthasAPI extends API {
@PUT
@Timed
@Produces(APPLICATION_JSON_WITH_CHARSET)
@ApiOperation("start arthas agent")
public Object startArthas() {
HugeConfig config = this.configProvider.get();
HashMap<String, String> configMap = new HashMap<>(4);
Expand Down
Loading