Skip to content

chore: cleanup and unify - #50

Merged
ma-hartma merged 12 commits into
vm-updatesfrom
api-cleanup
Nov 20, 2026
Merged

ma-hartma merged 12 commits into
vm-updatesfrom
api-cleanup

Conversation

@ma-hartma

@ma-hartma ma-hartma commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR streamlines the API to match best practices and our WIP API guidelines better:

  • add units to field names
  • add validations where missing
  • use snake_case consistently
  • fix some comments

Changes

  • JSON and client field names:

    • ram → ram_gb
    • size → size_gb
    • order_number → order_reference
    • macaddress → mac_address
    • driveletter → drive_letter
    • mvmtype → mvm_type (Go Mvmtype → MvmType)
  • Required fields: initial_ip_address on create, size_gb on disks, and the contact phone.

  • Stricter validation:

    • ip_address must be IPv4; it used to accept hostnames.
    • order_reference is 2–128 characters.
    • FQDN rule.
    • CPU, RAM and disk limits.
  • Moved rules: is_name_code moved from fits.api.v1 to fits.api.mvm.v1, and the shared macaddress extension is now mac_address. The published JS and Python packages export these under the new names.

Used AI-Tools ✨

  • Qwen 3.8
  • Kiro auto

References:

@ma-hartma
ma-hartma requested a review from vknabel November 13, 2026 14:05
@ma-hartma
ma-hartma marked this pull request as ready for review November 13, 2026 14:06
Comment thread proto/fits/api/mvm/v1/mvm.proto Resolved
Comment thread proto/fits/api/mvm/v1/mvm.proto Resolved
@ma-hartma
ma-hartma requested a review from simcod November 17, 2026 12:26
Comment thread proto/fits/api/mvm/v1/mvm.proto Resolved
@ma-hartma

Copy link
Copy Markdown
Contributor Author

Needs to be overhauled after #15

@ma-hartma
ma-hartma changed the base branch from main to vm-updates November 19, 2026 16:45
@ma-hartma
ma-hartma requested a review from Pilzington November 19, 2026 16:47
@ma-hartma

Copy link
Copy Markdown
Contributor Author

@vknabel and @Pilzington this can go into #15.

Comment thread proto/fits/api/mvm/v1/mvm.proto Resolved
Comment thread proto/fits/api/mvm/v1/mvm.proto Resolved

@vknabel vknabel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine from my pov

@Pilzington Pilzington left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🦁

@ma-hartma
ma-hartma merged commit 9de1d6c into vm-updates Nov 20, 2026
@ma-hartma
ma-hartma deleted the api-cleanup branch November 20, 2026 10:48
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.

4 participants