Refactor secret-ref format registration to use a UI hint for Paperclip secret UUIDs
This commit is contained in:
parent
6d65800173
commit
6c7ebaeb59
1 changed files with 3 additions and 2 deletions
|
|
@ -35,8 +35,9 @@ export function validateInstanceConfig(
|
|||
const applyFormats = (addFormats as any).default ?? addFormats;
|
||||
applyFormats(ajv);
|
||||
// Register the secret-ref format used by plugin manifests to mark fields that
|
||||
// hold a Paperclip secret UUID rather than a raw value.
|
||||
ajv.addFormat("secret-ref", /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i);
|
||||
// hold a Paperclip secret UUID rather than a raw value. The format is a UI
|
||||
// hint only — UUID validation happens in the secrets handler at resolve time.
|
||||
ajv.addFormat("secret-ref", { validate: () => true });
|
||||
const validate = ajv.compile(schema);
|
||||
const valid = validate(configJson);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue