Skip to content

Commit

Permalink
PMM-12985 Apply v3 API infra modifications and update docs (#3207)
Browse files Browse the repository at this point in the history
* PMM-12985 Apply API infra modifications

* PMM-12985 Apply API infra modifications

* PMM-12985 add --version flag to spec sync

* PMM-12985 change the slug name

* PMM-12985 migrate from IDs to slugs

* PMM-12985 update the intro with links

* PMM-12985 update inventory overview

* Update docs/api/inventory/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/inventory/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update api/server/v1/server.proto

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/access-control/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/advisor-api/advisors-and-advisor-checks.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/advisor-api/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/advisor-api/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/inventory/overview.md

Co-authored-by: Catalina A <[email protected]>

* Update docs/api/advisor-api/overview.md

Co-authored-by: Catalina A <[email protected]>

* PMM-12985 Regenerate.

---------

Co-authored-by: Catalina A <[email protected]>
Co-authored-by: Nurlan Moldomurov <[email protected]>
  • Loading branch information
3 people authored Nov 5, 2024
1 parent 7d2c4fd commit 8e92466
Show file tree
Hide file tree
Showing 41 changed files with 444 additions and 366 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
sync:
name: Sync
name: Sync API Docs
runs-on: ubuntu-22.04

steps:
Expand All @@ -29,11 +29,12 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "ID=$ID" >> $GITHUB_ENV
- name: Provision rdme
run: npm install -g rdme

- name: Sync API spec
run: rdme openapi ./api/swagger/swagger.json --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }}
uses: readmeio/rdme@v8
with:
rdme: openapi ./api/swagger/swagger.json --version=${{ env.VERSION }} --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }}

- name: Sync Markdown docs
run: rdme docs docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }}
uses: readmeio/rdme@v8
with:
rdme: docs ./docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ jobs:
fi
# One may need to suppress passing to reviewdog because of https://github.com/reviewdog/reviewdog/issues/1696
echo "$out" | bin/reviewdog -f=buf -reporter=github-pr-review -fail-on-error=true
echo "$out" | bin/reviewdog -f=buf -reporter=github-pr-review -fail-level=error
- name: Run code linters
uses: reviewdog/action-golangci-lint@v2
Expand All @@ -126,7 +126,7 @@ jobs:
exit $exit_code
fi
echo "$out" | bin/reviewdog -f=go-consistent -reporter=github-pr-review -fail-on-error=true
echo "$out" | bin/reviewdog -f=go-consistent -reporter=github-pr-review -fail-level=error
- name: Test common API
run: make test-common
Expand Down
153 changes: 77 additions & 76 deletions api/advisors/v1/advisors.pb.go

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions api/advisors/v1/advisors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ service AdvisorService {
rpc GetFailedChecks(GetFailedChecksRequest) returns (GetFailedChecksResponse) {
option (google.api.http) = {get: "/v1/advisors/checks/failed"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "Get Failed Checks"
summary: "Get Failed Advisor Checks"
description: "Returns the latest check results for a given service."
};
}
Expand All @@ -196,15 +196,15 @@ service AdvisorService {
rpc ListAdvisorChecks(ListAdvisorChecksRequest) returns (ListAdvisorChecksResponse) {
option (google.api.http) = {get: "/v1/advisors/checks"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List advisor checks"
summary: "List Advisor Checks"
description: "List advisor checks available to the user."
};
}
// ListAdvisors returns a list of advisors available for the user.
rpc ListAdvisors(ListAdvisorsRequest) returns (ListAdvisorsResponse) {
option (google.api.http) = {get: "/v1/advisors"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List advisors"
summary: "List Advisors"
description: "List advisors available to the user."
};
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/advisors/v1/json/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"tags": [
"AdvisorService"
],
"summary": "List advisors",
"summary": "List Advisors",
"operationId": "ListAdvisors",
"responses": {
"200": {
Expand Down Expand Up @@ -160,7 +160,7 @@
"tags": [
"AdvisorService"
],
"summary": "List advisor checks",
"summary": "List Advisor Checks",
"operationId": "ListAdvisorChecks",
"responses": {
"200": {
Expand Down Expand Up @@ -264,7 +264,7 @@
"tags": [
"AdvisorService"
],
"summary": "Get Failed Checks",
"summary": "Get Failed Advisor Checks",
"operationId": "GetFailedChecks",
"parameters": [
{
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/server/v1/json/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -798,11 +798,11 @@
},
"/v1/server/updates/changelogs": {
"get": {
"description": "List all the changes between the installed version and the latest available version",
"description": "Display a changelog comparing the installed version to the latest available version.",
"tags": [
"ServerService"
],
"summary": "List all the changes between the installed version and the latest available version",
"summary": "Get the changelog",
"operationId": "ListChangeLogs",
"responses": {
"200": {
Expand Down
130 changes: 63 additions & 67 deletions api/server/v1/server.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions api/server/v1/server.proto
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,12 @@ service ServerService {
description: "Checks for available PMM Server updates."
};
}

// ListChangeLogs delivers the changelog.
rpc ListChangeLogs(ListChangeLogsRequest) returns (ListChangeLogsResponse) {
option (google.api.http) = {get: "/v1/server/updates/changelogs"};
option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_operation) = {
summary: "List all the changes between the installed version and the latest available version"
description: "List all the changes between the installed version and the latest available version"
summary: "Get the changelog"
description: "Display a changelog comparing the installed version to the latest available version."
};
}
// StartUpdate starts PMM Server update.
Expand Down
Loading

0 comments on commit 8e92466

Please sign in to comment.