-
Notifications
You must be signed in to change notification settings - Fork 365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upcoming: [M3-8014] - Update APIv4 and Validation packages based on Image Service spec #10541
Changes from all commits
0068c6d
4c63136
4cbd78a
04aecb1
ee9d693
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/api-v4": Upcoming Features | ||
--- | ||
|
||
Update images endpoints to reflect the image service API spec ([#10541](https://github.com/linode/manager/pull/10541)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/manager": Changed | ||
--- | ||
|
||
Add `regions` and `total_size` fields to `imageFactory` ([#10541](https://github.com/linode/manager/pull/10541)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@linode/validation": Added | ||
--- | ||
|
||
`updateImageRegionsSchema` ([#10541](https://github.com/linode/manager/pull/10541)) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ export const baseImageSchema = object({ | |
label: labelSchema.notRequired(), | ||
description: string().notRequired().min(1).max(65000), | ||
cloud_init: boolean().notRequired(), | ||
tags: array(string()).notRequired(), | ||
tags: array(string().min(3).max(50)).max(500).notRequired(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if we have a validation schema we can share across linodes, volumes, etc for tags There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the requirements for tags always the same across the API? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not 100% sure, but I would assume they are. Might require some investigation |
||
}); | ||
|
||
export const createImageSchema = baseImageSchema.shape({ | ||
|
@@ -33,3 +33,9 @@ export const updateImageSchema = object({ | |
.max(65000, 'Length must be 65000 characters or less.'), | ||
tags: array(string()).notRequired(), | ||
}); | ||
|
||
export const updateImageRegionsSchema = object({ | ||
regions: array(string()) | ||
.required('Regions are required.') | ||
.min(1, 'Must specify at least one region.'), | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should ask for verification on this... It would be very unusual to have a status with spaces instead of underscores so I'm surprised this is what was reflected in the spec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirmed by Priyank Patel on API team