Skip to content

Add file placeholder#288

Open
archey347 wants to merge 1 commit into
jhthorsen:mainfrom
archey347:archey/add-file-placeholder
Open

Add file placeholder#288
archey347 wants to merge 1 commit into
jhthorsen:mainfrom
archey347:archey/add-file-placeholder

Conversation

@archey347
Copy link
Copy Markdown

@archey347 archey347 commented Nov 19, 2025

Summary

Add JSON::Validator::FilePlaceholder that can be used as a placeholder for files

Motivation

See jhthorsen/mojolicious-plugin-openapi#266

Allows for files to be validated against without having to make a clone of the file.

References

Is depended on by jhthorsen/mojolicious-plugin-openapi#266

return lc $ref if $ref and !$blessed;
return 'null' if !defined $_[0];
return 'boolean' if $blessed and ("$_[0]" eq "1" or !"$_[0]");
return 'file' if $ref eq 'JSON::Validator::FilePlaceholder';
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: misaligned if statement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant