Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: adjust ParameterSchema type for workspace creation#2384

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Kira-Pilot merged 7 commits intomainfromadd-schema-null-guard/kira-pilot
Jun 15, 2022
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletioncodersdk/parameters.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -72,7 +72,7 @@ type ParameterSchema struct {

// This is a special array of items provided if the validation condition
// explicitly states the value must be one of a set.
ValidationContains []string `json:"validation_contains"`
ValidationContains []string `json:"validation_contains,omitempty"`
}

// CreateParameterRequest is used to create a new parameter value for a scope.
Expand Down
2 changes: 1 addition & 1 deletionsite/src/api/typesGenerated.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -190,7 +190,7 @@ export interface ParameterSchema {
readonly validation_condition: string
readonly validation_type_system: string
readonly validation_value_type: string
readonly validation_contains: string[]
readonly validation_contains?: string[]
}

// From codersdk/provisionerdaemons.go:33:6
Expand Down
2 changes: 1 addition & 1 deletionsite/src/components/ParameterInput/ParameterInput.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -29,7 +29,7 @@ export const ParameterInput: FC<ParameterInputProps> = ({ disabled, onChange, sc
}

const ParameterField: React.FC<ParameterInputProps> = ({ disabled, onChange, schema }) => {
if (schema.validation_contains.length > 0) {
if (schema.validation_contains && schema.validation_contains.length > 0) {
return (
<RadioGroup
defaultValue={schema.default_source_value}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp