Merge pull request #3097 from cliffhall/sep-1330-enums

Update Everything server's elicitation request
This commit is contained in:
Ola Hungerford
2025-12-11 21:05:59 -07:00
committed by GitHub

View File

@@ -734,23 +734,23 @@ export const createServer = () => {
type: 'object', type: 'object',
properties: { properties: {
name: { name: {
title: 'Full Name', title: 'String',
type: 'string', type: 'string',
description: 'Your full, legal name', description: 'Your full, legal name',
}, },
check: { check: {
title: 'Agree to terms', title: 'Boolean',
type: 'boolean', type: 'boolean',
description: 'A boolean check', description: 'Agree to the terms and conditions',
}, },
color: { firstLine: {
title: 'Favorite Color', title: 'String with default',
type: 'string', type: 'string',
description: 'Favorite color (open text)', description: 'Favorite first line of a story',
default: 'blue', default: 'It was a dark and stormy night.',
}, },
email: { email: {
title: 'Email Address', title: 'String with email format',
type: 'string', type: 'string',
format: 'email', format: 'email',
description: 'Your email address (will be verified, and never shared with anyone else)', description: 'Your email address (will be verified, and never shared with anyone else)',
@@ -758,16 +758,17 @@ export const createServer = () => {
homepage: { homepage: {
type: 'string', type: 'string',
format: 'uri', format: 'uri',
description: 'Homepage / personal site', title: 'String with uri format',
description: 'Portfolio / personal website',
}, },
birthdate: { birthdate: {
title: 'Birthdate', title: 'String with date format',
type: 'string', type: 'string',
format: 'date', format: 'date',
description: 'Your date of birth (will never be shared with anyone else)', description: 'Your date of birth',
}, },
integer: { integer: {
title: 'Favorite Integer', title: 'Integer',
type: 'integer', type: 'integer',
description: 'Your favorite integer (do not give us your phone number, pin, or other sensitive info)', description: 'Your favorite integer (do not give us your phone number, pin, or other sensitive info)',
minimum: 1, minimum: 1,
@@ -775,21 +776,63 @@ export const createServer = () => {
default: 42, default: 42,
}, },
number: { number: {
title: 'Favorite Number', title: 'Number in range 1-1000',
type: 'number', type: 'number',
description: 'Favorite number (there are no wrong answers)', description: 'Favorite number (there are no wrong answers)',
minimum: 0, minimum: 0,
maximum: 1000, maximum: 1000,
default: 3.14, default: 3.14,
}, },
petType: { untitledSingleSelectEnum: {
title: 'Pet type',
type: 'string', type: 'string',
enum: ['cats', 'dogs', 'birds', 'fish', 'reptiles'], title: 'Untitled Single Select Enum',
enumNames: ['Cats', 'Dogs', 'Birds', 'Fish', 'Reptiles'], description: 'Choose your favorite friend',
default: 'dogs', enum: ['Monica', 'Rachel', 'Joey', 'Chandler', 'Ross', 'Phoebe'],
description: 'Your favorite pet type', default: 'Monica'
}, },
untitledMultipleSelectEnum: {
type: 'array',
title: 'Untitled Multiple Select Enum',
description: 'Choose your favorite instruments',
minItems: 1,
maxItems: 3,
items: { type: 'string', enum: ['Guitar', 'Piano', 'Violin', 'Drums', 'Bass'] },
default: ['Guitar']
},
titledSingleSelectEnum: {
type: 'string',
title: 'Titled Single Select Enum',
description: 'Choose your favorite hero',
oneOf: [
{ const: 'hero-1', title: 'Superman' },
{ const: 'hero-2', title: 'Green Lantern' },
{ const: 'hero-3', title: 'Wonder Woman' }
],
default: 'hero-1'
},
titledMultipleSelectEnum: {
type: 'array',
title: 'Titled Multiple Select Enum',
description: 'Choose your favorite types of fish',
minItems: 1,
maxItems: 3,
items: {
anyOf: [
{ const: 'fish-1', title: 'Tuna' },
{ const: 'fish-2', title: 'Salmon' },
{ const: 'fish-3', title: 'Trout' }
]
},
default: ['fish-1']
},
legacyTitledEnum: {
type: 'string',
title: 'Legacy Titled Single Select Enum',
description: 'Choose your favorite type of pet',
enum: ['pet-1', 'pet-2', 'pet-3', 'pet-4', 'pet-5'],
enumNames: ['Cats', 'Dogs', 'Birds', 'Fish', 'Reptiles'],
default: 'pet-1',
}
}, },
required: ['name'], required: ['name'],
}, },