Skip to content

Commit

Permalink
refactor(instance): separately define the instance region (#339)
Browse files Browse the repository at this point in the history
Separately define the instance region to explicitly enumerate the
allowed instance regions.
  • Loading branch information
ttshivers authored May 26, 2024
1 parent 5fda581 commit 9bef4dc
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion openapi/components/requests/CreateInstanceRequest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ properties:
type:
$ref: ../schemas/InstanceType.yaml
region:
$ref: ../schemas/Region.yaml
$ref: ../schemas/InstanceRegion.yaml
ownerId:
$ref: ../schemas/InstanceOwnerId.yaml
roleIds:
Expand Down
2 changes: 1 addition & 1 deletion openapi/components/schemas/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ properties:
platforms:
$ref: ./InstancePlatforms.yaml
region:
$ref: ./Region.yaml
$ref: ./InstanceRegion.yaml
secureName:
type: string
minLength: 1
Expand Down
10 changes: 10 additions & 0 deletions openapi/components/schemas/InstanceRegion.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
type: string
title: InstanceRegion
default: us
example: us
enum:
- us
- use
- eu
- jp
description: Instance region

0 comments on commit 9bef4dc

Please sign in to comment.