feat(api): Improve OpenAPI spec and add rate limit handling for Hetzner

- Add 429 response with Retry-After header for Hetzner server creation
- Create RateLimitException for proper rate limit error handling
- Rename cloud_provider_token_id to cloud_provider_token_uuid with deprecation
- Fix prices array schema in server-types endpoint with proper items definition
- Add explicit default: true to autogenerate_domain properties
- Add timeout and retry options to Docker install curl commands
- Fix race condition in deployment status update using atomic query
This commit is contained in:
Andras Bacsai committed 2025-12-11 12:12:43 +01:00
1 parent cf4985c596
commit 5d38147899
10 files changed
+238 -46

No files matched your search

+31 -6
View File
@@ -267,6 +267,7 @@ paths:
description: 'Force domain usage even if conflicts are detected. Default is false.'
autogenerate_domain:
type: boolean
default: true
description: "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true."
type: object
responses:
@@ -536,6 +537,7 @@ paths:
description: 'Force domain usage even if conflicts are detected. Default is false.'
autogenerate_domain:
type: boolean
default: true
description: "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true."
type: object
responses:
@@ -805,6 +807,7 @@ paths:
description: 'Force domain usage even if conflicts are detected. Default is false.'
autogenerate_domain:
type: boolean
default: true
description: "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true."
type: object
responses:
@@ -1021,6 +1024,7 @@ paths:
description: 'Force domain usage even if conflicts are detected. Default is false.'
autogenerate_domain:
type: boolean
default: true
description: "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true."
type: object
responses:
@@ -1228,6 +1232,7 @@ paths:
description: 'Force domain usage even if conflicts are detected. Default is false.'
autogenerate_domain:
type: boolean
default: true
description: "If true and domains is empty, auto-generate a domain using the server's wildcard domain or sslip.io fallback. Default: true."
type: object
responses:
@@ -4405,11 +4410,19 @@ paths:
description: 'Get all available Hetzner system images (operating systems).'
operationId: get-hetzner-images
parameters:
-
name: cloud_provider_token_uuid
in: query
description: 'Cloud provider token UUID. Required if cloud_provider_token_id is not provided.'
required: false
schema:
type: string
-
name: cloud_provider_token_id
in: query
description: 'Cloud provider token UUID'
required: true
description: 'Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.'
required: false
deprecated: true
schema:
type: string
responses:
@@ -4437,11 +4450,19 @@ paths:
description: 'Get all SSH keys stored in the Hetzner account.'
operationId: get-hetzner-ssh-keys
parameters:
-
name: cloud_provider_token_uuid
in: query
description: 'Cloud provider token UUID. Required if cloud_provider_token_id is not provided.'
required: false
schema:
type: string
-
name: cloud_provider_token_id
in: query
description: 'Cloud provider token UUID'
required: true
description: 'Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.'
required: false
deprecated: true
schema:
type: string
responses:
@@ -4475,16 +4496,20 @@ paths:
application/json:
schema:
required:
- cloud_provider_token_id
- location
- server_type
- image
- private_key_uuid
properties:
cloud_provider_token_uuid:
type: string
example: abc123
description: 'Cloud provider token UUID. Required if cloud_provider_token_id is not provided.'
cloud_provider_token_id:
type: string
example: abc123
description: 'Cloud provider token UUID'
description: 'Deprecated: Use cloud_provider_token_uuid instead. Cloud provider token UUID.'
deprecated: true
location:
type: string
example: nbg1