diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 4aefa14550..6174390dc0 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -14,9 +14,6 @@ jobs: sync: name: Sync runs-on: ubuntu-22.04 - env: - VERSION: v2 - ID: 626badcabbc59c02acc1a53f steps: - name: Check out code @@ -32,12 +29,11 @@ jobs: echo "VERSION=$VERSION" >> $GITHUB_ENV echo "ID=$ID" >> $GITHUB_ENV - - name: API - uses: readmeio/rdme@v8 - with: - rdme: openapi ./api/swagger/swagger.json --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }} + - name: Provision rdme + run: npm install -g rdme - - name: Markdown docs - uses: readmeio/rdme@v8 - with: - rdme: docs docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }} + - name: Sync API spec + run: rdme openapi ./api/swagger/swagger.json --id=${{ env.ID }} --key=${{ secrets.README_TOKEN }} + + - name: Sync Markdown docs + run: rdme docs docs/api --version=${{ env.VERSION }} --key=${{ secrets.README_TOKEN }} diff --git a/admin/commands/management/management.go b/admin/commands/management/management.go index 6d3921e9f5..e8e88e2f63 100644 --- a/admin/commands/management/management.go +++ b/admin/commands/management/management.go @@ -15,9 +15,7 @@ // Package management provides management commands. package management -import ( - "github.com/percona/pmm/api/inventory/v1/types" -) +import "github.com/percona/pmm/api/inventory/v1/types" var ( allNodeTypes = map[string]string{ diff --git a/api/swagger/header.json b/api/swagger/header.json index 90c8445d6f..15009b0031 100644 --- a/api/swagger/header.json +++ b/api/swagger/header.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "v2" + "version": "v3" }, "schemes": [ "https", @@ -26,5 +26,5 @@ "python" ] }, - "x-readme-id": "626badcabbc59c02acc1a53f" + "x-readme-id": "622892a957a7410330bc6184" } diff --git a/api/swagger/swagger.json b/api/swagger/swagger.json index a69241f74f..765fbdcdd3 100644 --- a/api/swagger/swagger.json +++ b/api/swagger/swagger.json @@ -12,7 +12,7 @@ "swagger": "2.0", "info": { "title": "PMM API", - "version": "v2" + "version": "v3" }, "paths": { "/v1/actions/{action_id}": { @@ -27172,5 +27172,5 @@ "python" ] }, - "x-readme-id": "626badcabbc59c02acc1a53f" + "x-readme-id": "622892a957a7410330bc6184" } \ No newline at end of file diff --git a/docs/api/access-control/access-control.md b/docs/api/access-control/access-control.md index d1cf0d6a87..17aeba9c43 100644 --- a/docs/api/access-control/access-control.md +++ b/docs/api/access-control/access-control.md @@ -1,7 +1,7 @@ --- title: Access Control slug: access-control -category: 64e49e26498dc6002b62ebf4 +category: 66aca8d40bf230001846b567 --- ## Overview diff --git a/docs/api/advisor-api/advisors-and-advisor-checks.md b/docs/api/advisor-api/advisors-and-advisor-checks.md index ae9d17337c..d39b0289b3 100644 --- a/docs/api/advisor-api/advisors-and-advisor-checks.md +++ b/docs/api/advisor-api/advisors-and-advisor-checks.md @@ -1,7 +1,7 @@ --- title: Percona Advisors and Advisors checks slug: advisors-and-advisor-checks -category: 6291050b9400a1001ae1877d +category: 66acabbe485c6000126b0499 order: 1 hidden: 0 --- diff --git a/docs/api/advisor-api/changing-advisor-checks.md b/docs/api/advisor-api/changing-advisor-checks.md index 36265f0c63..240ee068d3 100644 --- a/docs/api/advisor-api/changing-advisor-checks.md +++ b/docs/api/advisor-api/changing-advisor-checks.md @@ -1,7 +1,7 @@ --- title: Changing Advisors and Advisor checks slug: changing-advisor-checks -category: 6291050b9400a1001ae1877d +category: 66acabbe485c6000126b0499 order: 3 hidden: 0 --- diff --git a/docs/api/advisor-api/failed-checks.md b/docs/api/advisor-api/failed-checks.md index a112246bd2..4e10586a4f 100644 --- a/docs/api/advisor-api/failed-checks.md +++ b/docs/api/advisor-api/failed-checks.md @@ -1,7 +1,7 @@ --- title: List of problems detected by Advisors slug: failed-checks -category: 6291050b9400a1001ae1877d +category: 66acabbe485c6000126b0499 order: 2 hidden: 0 --- diff --git a/docs/api/advisor-api/overview.md b/docs/api/advisor-api/overview.md index ae9fa13284..7d0e1b648c 100644 --- a/docs/api/advisor-api/overview.md +++ b/docs/api/advisor-api/overview.md @@ -1,7 +1,7 @@ --- title: Overview slug: pmm-advisors -category: 6291050b9400a1001ae1877d +category: 66acabbe485c6000126b0499 order: 0 --- diff --git a/docs/api/backups/list-locations.md b/docs/api/backups/list-locations.md index 97723f3152..7834ccd6c5 100644 --- a/docs/api/backups/list-locations.md +++ b/docs/api/backups/list-locations.md @@ -2,7 +2,7 @@ title: List Locations slug: listlocations excerpt: ListLocations returns a list of all backup locations. -category: 66aa56507e69ed004a736efe +category: 66acac6024b4bc0022d980f3 --- The following API call will list all the available backup locations: diff --git a/docs/api/backups/overview.md b/docs/api/backups/overview.md index c4f8b2915e..b7b520cfeb 100644 --- a/docs/api/backups/overview.md +++ b/docs/api/backups/overview.md @@ -1,7 +1,7 @@ --- title: Overview slug: database-backups -category: 66aa56507e69ed004a736efe +category: 66acac6024b4bc0022d980f3 order: 0 --- diff --git a/docs/api/backups/restore-backup.md b/docs/api/backups/restore-backup.md index feb19c1528..31589c3461 100644 --- a/docs/api/backups/restore-backup.md +++ b/docs/api/backups/restore-backup.md @@ -2,7 +2,7 @@ title: Restore from a backup slug: restorebackup excerpt: This endpoint allows to restore a database from a previously made backup. -category: 66aa56507e69ed004a736efe +category: 66acac6024b4bc0022d980f3 --- PMM can backup the monitored services. diff --git a/docs/api/backups/start-backup.md b/docs/api/backups/start-backup.md index 788f7ffbe8..fcb935660b 100644 --- a/docs/api/backups/start-backup.md +++ b/docs/api/backups/start-backup.md @@ -2,7 +2,7 @@ title: Make a backup slug: startbackup excerpt: This endpoint allows to make an unscheduled, or ad-hoc, backup of a given service. -category: 66aa56507e69ed004a736efe +category: 66acac6024b4bc0022d980f3 --- PMM can backup the monitored services. diff --git a/docs/api/inventory/add-agent.md b/docs/api/inventory/add-agent.md index 71eef04c71..6c77ea95f4 100644 --- a/docs/api/inventory/add-agent.md +++ b/docs/api/inventory/add-agent.md @@ -1,7 +1,7 @@ --- title: Add an Agent slug: addagent -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add an Agent diff --git a/docs/api/inventory/add-node.md b/docs/api/inventory/add-node.md index 1a96ed40ec..6cfe8529ed 100644 --- a/docs/api/inventory/add-node.md +++ b/docs/api/inventory/add-node.md @@ -1,7 +1,7 @@ --- title: Add a Node slug: addnode -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add a Node diff --git a/docs/api/inventory/add-service.md b/docs/api/inventory/add-service.md index c37bfeb819..406e24d06e 100644 --- a/docs/api/inventory/add-service.md +++ b/docs/api/inventory/add-service.md @@ -1,7 +1,7 @@ --- title: Add a Service slug: addservice -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Add a Service diff --git a/docs/api/inventory/change-agent.md b/docs/api/inventory/change-agent.md index a3dc043886..5db94ac192 100644 --- a/docs/api/inventory/change-agent.md +++ b/docs/api/inventory/change-agent.md @@ -1,7 +1,7 @@ --- title: Change Agent Attributes slug: changeagent -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## Change Agent Attributes diff --git a/docs/api/inventory/list-nodes.md b/docs/api/inventory/list-nodes.md index 2ba49557dd..5709c8b8f5 100644 --- a/docs/api/inventory/list-nodes.md +++ b/docs/api/inventory/list-nodes.md @@ -1,7 +1,7 @@ --- title: List Nodes slug: listnodes -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## List Nodes diff --git a/docs/api/inventory/list-services.md b/docs/api/inventory/list-services.md index a26f97c6a6..3c32f8bc0b 100644 --- a/docs/api/inventory/list-services.md +++ b/docs/api/inventory/list-services.md @@ -1,7 +1,7 @@ --- title: List Services slug: listservices -category: 626de009b977e3003179f7dd +category: 66aca9bf17142b005ad4e9fa --- ## List Services diff --git a/docs/api/pmm-server-config/account-management/bulk-add-users.md b/docs/api/pmm-server-config/account-management/bulk-add-users.md index 43aede9d08..4a2de7ca90 100644 --- a/docs/api/pmm-server-config/account-management/bulk-add-users.md +++ b/docs/api/pmm-server-config/account-management/bulk-add-users.md @@ -1,8 +1,8 @@ --- title: Create user accounts slug: bulk-add-users -category: 626bd6a45c6ea70129427eff -parentDoc: 626be9a93ab1240284d0d27d +category: 66acab7b0bf230001846b5e2 +parentDoc: 66acad52c21a1a0036295235 order: 1 --- diff --git a/docs/api/pmm-server-config/account-management/change-admin-password.md b/docs/api/pmm-server-config/account-management/change-admin-password.md index de935a1838..910ecb52aa 100644 --- a/docs/api/pmm-server-config/account-management/change-admin-password.md +++ b/docs/api/pmm-server-config/account-management/change-admin-password.md @@ -1,8 +1,8 @@ --- title: Change the administrator's password slug: change-admin-password -category: 626bd6a45c6ea70129427eff -parentDoc: 626be9a93ab1240284d0d27d +category: 66acab7b0bf230001846b5e2 +parentDoc: 66acad52c21a1a0036295235 order: 0 --- diff --git a/docs/api/pmm-server-config/overview.md b/docs/api/pmm-server-config/overview.md index 69e4a9b27c..ac269b3533 100644 --- a/docs/api/pmm-server-config/overview.md +++ b/docs/api/pmm-server-config/overview.md @@ -1,7 +1,7 @@ --- title: Overview slug: pmm-server-configuration -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 0 --- diff --git a/docs/api/pmm-server-config/pmm-server-settings.md b/docs/api/pmm-server-config/pmm-server-settings.md index e9923b15ca..e9e95df6c7 100644 --- a/docs/api/pmm-server-config/pmm-server-settings.md +++ b/docs/api/pmm-server-config/pmm-server-settings.md @@ -1,7 +1,7 @@ --- title: PMM Server Settings slug: pmm-server-settings -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 2 --- diff --git a/docs/api/pmm-server-config/pmm-server-troubleshooting.md b/docs/api/pmm-server-config/pmm-server-troubleshooting.md index 58e23de2d6..7b1bf8d931 100644 --- a/docs/api/pmm-server-config/pmm-server-troubleshooting.md +++ b/docs/api/pmm-server-config/pmm-server-troubleshooting.md @@ -1,7 +1,7 @@ --- title: Troubleshooting slug: pmm-server-troubleshooting -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 4 hidden: 0 --- diff --git a/docs/api/pmm-server-config/pmm-server-upgrade.md b/docs/api/pmm-server-config/pmm-server-upgrade.md index ae5116a0d6..012db77a63 100644 --- a/docs/api/pmm-server-config/pmm-server-upgrade.md +++ b/docs/api/pmm-server-config/pmm-server-upgrade.md @@ -1,7 +1,7 @@ --- title: Upgrade your PMM Server slug: pmm-server-upgrade -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 3 --- diff --git a/docs/api/pmm-server-config/troubleshooting/logs.md b/docs/api/pmm-server-config/troubleshooting/logs.md index dbb4b30b3f..97439aaeeb 100644 --- a/docs/api/pmm-server-config/troubleshooting/logs.md +++ b/docs/api/pmm-server-config/troubleshooting/logs.md @@ -1,7 +1,7 @@ --- title: Logs slug: "logs" -category: 626badcabbc59c02acc1a540 +category: 66acab7b0bf230001846b5e2 --- Sometimes users need to troubleshoot an issue. PMM Server offers an ability to download the logs as well as configuration of its components. diff --git a/docs/api/pmm-server-config/user-account-management.md b/docs/api/pmm-server-config/user-account-management.md index b5fac01365..01d53fa149 100644 --- a/docs/api/pmm-server-config/user-account-management.md +++ b/docs/api/pmm-server-config/user-account-management.md @@ -1,7 +1,7 @@ --- title: User account management slug: pmm-server-config-security -category: 626bd6a45c6ea70129427eff +category: 66acab7b0bf230001846b5e2 order: 1 --- diff --git a/docs/api/welcome/authentication.md b/docs/api/welcome/authentication.md index cec8d37873..a6c737023b 100644 --- a/docs/api/welcome/authentication.md +++ b/docs/api/welcome/authentication.md @@ -1,7 +1,7 @@ --- title: Authentication slug: authentication -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 1 --- diff --git a/docs/api/welcome/introduction.md b/docs/api/welcome/introduction.md index 454c89171c..fffbc9a29c 100644 --- a/docs/api/welcome/introduction.md +++ b/docs/api/welcome/introduction.md @@ -1,7 +1,7 @@ --- title: Introduction slug: introduction -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 0 --- diff --git a/docs/api/welcome/monitoring.md b/docs/api/welcome/monitoring.md index 55a9570353..5ca61a84b9 100644 --- a/docs/api/welcome/monitoring.md +++ b/docs/api/welcome/monitoring.md @@ -1,7 +1,7 @@ --- title: Monitoring slug: monitoring -category: 651bd218baa868000c212203 +category: 66aca6ddfd9bfe004c97cd48 order: 2 --- diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 89a006f59f..4bb4ee1a02 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -348,8 +348,7 @@ func runHTTP1Server(ctx context.Context, deps *http1ServerDeps) { proxyMux := grpc_gateway.NewServeMux( grpc_gateway.WithMarshalerOption(grpc_gateway.MIMEWildcard, marshaller), grpc_gateway.WithErrorHandler(pmmerrors.PMMHTTPErrorHandler), - grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler), - ) + grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler)) opts := []grpc.DialOption{ grpc.WithTransportCredentials(insecure.NewCredentials()), diff --git a/qan-api2/main.go b/qan-api2/main.go index 2d982afb3f..382bff4e38 100644 --- a/qan-api2/main.go +++ b/qan-api2/main.go @@ -149,8 +149,7 @@ func runJSONServer(ctx context.Context, grpcBindF, jsonBindF string) { proxyMux := grpc_gateway.NewServeMux( grpc_gateway.WithMarshalerOption(grpc_gateway.MIMEWildcard, marshaller), - grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler), - ) + grpc_gateway.WithRoutingErrorHandler(pmmerrors.PMMRoutingErrorHandler)) opts := []grpc.DialOption{grpc.WithTransportCredentials(insecure.NewCredentials())} type registrar func(context.Context, *grpc_gateway.ServeMux, string, []grpc.DialOption) error