Skip to content

Commit

Permalink
Add OpenAPI spec for dedicated egress IPs (#875)
Browse files Browse the repository at this point in the history
* Add OpenAPI spec for dedicated egress IPs

* Update OpenAPI for app creation and updates
  • Loading branch information
ZachEddy authored May 13, 2024
1 parent 010aabc commit 88ef8cf
Show file tree
Hide file tree
Showing 8 changed files with 60 additions and 0 deletions.
2 changes: 2 additions & 0 deletions specification/resources/apps/apps_create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ requestBody:
instance_size_slug: apps-s-1vcpu-0.5gb
routes:
- path: /api
egress:
type: DEDICATED_IP
required: true

responses:
Expand Down
6 changes: 6 additions & 0 deletions specification/resources/apps/models/app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ properties:
allOf:
- description: The deployment that the app is pinned to.
- $ref: apps_deployment.yml
dedicated_ips:
readOnly: true
title: The dedicated egress IP addresses associated with the app.
type: array
items:
$ref: apps_dedicated_egress_ip.yml
required:
- spec
type: object
5 changes: 5 additions & 0 deletions specification/resources/apps/models/app_egress_spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type: object
description: Specification for app egress configurations.
properties:
type:
$ref: app_egress_type_spec.yml
7 changes: 7 additions & 0 deletions specification/resources/apps/models/app_egress_type_spec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: The app egress type.
type: string
default: AUTOASSIGN
example: AUTOASSIGN
enum:
- AUTOASSIGN
- DEDICATED_IP
3 changes: 3 additions & 0 deletions specification/resources/apps/models/app_spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,8 @@ properties:
ingress:
$ref: app_ingress_spec.yml

egress:
$ref: app_egress_spec.yml

required:
- name
13 changes: 13 additions & 0 deletions specification/resources/apps/models/apps_dedicated_egress_ip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
type: object
readOnly: true
properties:
ip:
title: The IP address of the dedicated egress IP.
type: string
example: 192.168.1.1
id:
title: The ID of the dedicated egress IP.
type: string
example: 9e7bc2ac-205a-45d6-919c-e1ac5e73f962
status:
$ref: apps_dedicated_egress_ip_status.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title: The status of the dedicated egress IP.
type: string
readOnly: true
default: UNKNOWN
enum:
- UNKNOWN
- ASSIGNING
- ASSIGNED
- REMOVED
example: ASSIGNED
14 changes: 14 additions & 0 deletions specification/resources/apps/responses/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ apps:
name: configuration-alert
started_at: '2023-01-30T22:15:46.278987808Z'
status: SUCCESS
dedicated_ips:
- ip: 192.168.1.1
id: c24d8f48-3bc4-49f5-8ca0-58e8164427ac
status: ASSIGNED
- ip: 192.168.1.2
id: 4768fb15-2837-4dda-9be5-3951df4bc3d0
status: ASSIGNED
links:
pages: {}
meta:
Expand Down Expand Up @@ -414,6 +421,13 @@ app:
name: configuration-alert
started_at: '0001-01-01T00:00:00'
status: PENDING
dedicated_ips:
- ip: 192.168.1.1
id: c24d8f48-3bc4-49f5-8ca0-58e8164427ac
status: ASSIGNED
- ip: 192.168.1.2
id: 4768fb15-2837-4dda-9be5-3951df4bc3d0
status: ASSIGNED


deployments:
Expand Down

0 comments on commit 88ef8cf

Please sign in to comment.