Skip to content

Regenerate OpenAPI client & add more features#35

Merged
fizikiukas merged 1 commit into
mainfrom
feat/modernize-vps-and-regenerate-client
Jun 11, 2026
Merged

Regenerate OpenAPI client & add more features#35
fizikiukas merged 1 commit into
mainfrom
feat/modernize-vps-and-regenerate-client

Conversation

@fizikiukas

@fizikiukas fizikiukas commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Regenerated client code with oapi-codegen v2.7.1. Added a large set of CLI commands for billing, DNS, and VPS (including Docker and VM actions), added/updated related command implementations, and generated corresponding Hostinger API docs.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added billing management: view catalog items, manage payment methods, and control subscriptions.
    • Added DNS management: list and manage DNS records and zone snapshots.
    • Added Docker Compose support: create, manage, and monitor Docker projects on virtual machines.
    • Added virtual machine provisioning: purchase and setup new virtual machines via CLI.
  • Improvements

    • Added virtual machine restart functionality.
    • Updated PTR record management for IP address-specific operations.
    • Enhanced API endpoint routing for improved performance and consistency.

Regenerated client code with oapi-codegen v2.7.1, updating enum names and adding Valid() helpers for many enums and new types. Added a large set of CLI commands for billing, DNS, and VPS (including Docker and VM actions), added/updated related command implementations, and generated corresponding HAPI docs. Also includes minor command refactors and doc updates to reflect new API surface.
@fizikiukas fizikiukas requested a review from a team as a code owner June 11, 2026 12:40
@coderabbitai

coderabbitai Bot commented Jun 11, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR introduces comprehensive expansions to the CLI: a new billing command hierarchy for catalog, payment methods, and subscriptions; a new dns command hierarchy for record and snapshot management; Docker Compose project management under VPS; VM purchase and setup workflows; and modernizes numerous VPS API endpoint calls to updated versions.

Changes

CLI Feature Expansion: Billing, DNS, Docker, and VM Operations

Layer / File(s) Summary
Billing command hierarchy
cmd/billing/billing.go, cmd/billing/catalog/..., cmd/billing/payment_methods/..., cmd/billing/subscriptions/...
Introduces billing command group with catalog list (item filtering by category/name), payment-methods list/delete/set-default, and subscriptions list/enable-disable auto-renewal subcommands, each with API integration and optional flag handling.
DNS command hierarchy
cmd/dns/dns.go, cmd/dns/records/..., cmd/dns/snapshots/...
Introduces dns command group with records subcommands (list/delete with filters/update/validate/reset) and snapshots subcommands (list/get/restore), including zone operation request builders.
Root command registration
cmd/root.go
Imports and registers billing and dns command groups alongside existing vps and version commands.
VPS Docker project management
cmd/vps/docker/..., cmd/vps/vps.go
New docker subcommand group with full CRUD: list/get/create/update/delete projects, containers/logs inspection, start/stop/restart lifecycle controls; includes project creation request builders with environment variable support.
VPS virtual machine operations
cmd/vps/virtual_machines/purchase.go, cmd/vps/virtual_machines/setup.go, cmd/vps/virtual_machines/restart.go, cmd/vps/virtual_machines/virtual_machines.go
New purchase, setup, and restart subcommands for VMs, with complex request builders assembling flags for data center selection, OS template, networking, authentication, backups, and post-install scripts; updates group description.
PTR record enhancements
cmd/vps/ptr/create.go, cmd/vps/ptr/delete.go, cmd/vps/ptr_create.md, cmd/vps/ptr_delete.md
Updates create and delete to accept IP address ID as second argument; adds --domain flag to create command for specifying PTR record domain.
API endpoint version migrations
cmd/vps/actions/, cmd/vps/backups/, cmd/vps/data_centers/, cmd/vps/firewall/, cmd/vps/post_install_scripts/, cmd/vps/public_keys/, cmd/vps/templates/, cmd/vps/virtual_machines/
Updates 25 existing command endpoints: actions (get/list), backups list, data centers list, firewall get, post-install scripts (list/delete), public keys (create/delete/list), templates (get/list), and virtual machines (get/list) now target newer API method versions with matching parameter type updates.
Command documentation
docs/hapi*.md, docs/hapi_billing*.md, docs/hapi_dns*.md, docs/hapi_vps_docker*.md, docs/hapi_vps_vm_*.md
Adds 76+ markdown pages documenting the new billing, DNS, Docker, and VM purchase/setup commands; updates existing index and SEE ALSO sections; standardizes help descriptions across the hierarchy.

🎯 4 (Complex) | ⏱️ ~60 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 2.94% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: regenerating the OpenAPI client and adding extensive new CLI features for billing, DNS, and Docker management.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/modernize-vps-and-regenerate-client

Comment @coderabbitai help to get the list of available commands and usage tips.

@fizikiukas fizikiukas merged commit 77eb4a9 into main Jun 11, 2026
1 check was pending
@fizikiukas fizikiukas deleted the feat/modernize-vps-and-regenerate-client branch June 11, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants