1111 AliasChoices ,
1212 AwareDatetime ,
1313 BaseModel ,
14+ BeforeValidator ,
1415 ConfigDict ,
1516 Field ,
1617 HttpUrl ,
2021from pydantic_core import CoreSchema
2122from typing_extensions import override
2223
24+ from ._demo_value_sanitizers import (
25+ demo_bool_false_or_passthrough ,
26+ demo_bool_true_or_passthrough ,
27+ demo_int_or_passthrough ,
28+ )
29+
2330__all__ = (
2431 "ExtractTextResponse" ,
2532 "ExtractedTextDocument" ,
@@ -851,6 +858,7 @@ class PdfRestInfoResponse(BaseModel):
851858
852859 tagged : Annotated [
853860 bool | None ,
861+ BeforeValidator (demo_bool_false_or_passthrough ),
854862 Field (
855863 description = "Indicates whether structure tags are present in the PDF "
856864 "document. The result is true or false."
@@ -860,6 +868,7 @@ class PdfRestInfoResponse(BaseModel):
860868
861869 image_only : Annotated [
862870 bool | None ,
871+ BeforeValidator (demo_bool_false_or_passthrough ),
863872 Field (
864873 description = (
865874 "Indicates whether the document is 'image only,' meaning it consists "
@@ -995,6 +1004,7 @@ class PdfRestInfoResponse(BaseModel):
9951004
9961005 contains_annotations : Annotated [
9971006 bool | None ,
1007+ BeforeValidator (demo_bool_false_or_passthrough ),
9981008 Field (
9991009 description = (
10001010 "Indicates whether the PDF document contains annotations such as "
@@ -1007,6 +1017,7 @@ class PdfRestInfoResponse(BaseModel):
10071017
10081018 contains_signature : Annotated [
10091019 bool | None ,
1020+ BeforeValidator (demo_bool_false_or_passthrough ),
10101021 Field (
10111022 description = "Indicates whether the PDF contains any digital signatures. "
10121023 "The result is true or false."
@@ -1028,6 +1039,7 @@ class PdfRestInfoResponse(BaseModel):
10281039
10291040 file_size : Annotated [
10301041 int | None ,
1042+ BeforeValidator (demo_int_or_passthrough ),
10311043 Field (
10321044 description = "The size of the PDF file in bytes. The result is an integer."
10331045 ),
@@ -1042,6 +1054,7 @@ class PdfRestInfoResponse(BaseModel):
10421054
10431055 restrict_permissions_set : Annotated [
10441056 bool | None ,
1057+ BeforeValidator (demo_bool_false_or_passthrough ),
10451058 Field (
10461059 description = (
10471060 "Indicates whether the PDF file has restricted permissions, such as "
@@ -1054,6 +1067,7 @@ class PdfRestInfoResponse(BaseModel):
10541067
10551068 contains_xfa : Annotated [
10561069 bool | None ,
1070+ BeforeValidator (demo_bool_false_or_passthrough ),
10571071 Field (
10581072 description = "Indicates whether the PDF contains XFA forms. The result is "
10591073 "true or false."
@@ -1063,6 +1077,7 @@ class PdfRestInfoResponse(BaseModel):
10631077
10641078 contains_acroforms : Annotated [
10651079 bool | None ,
1080+ BeforeValidator (demo_bool_false_or_passthrough ),
10661081 Field (
10671082 description = "Indicates whether the PDF contains Acroforms. The result is "
10681083 "true or false."
@@ -1072,6 +1087,7 @@ class PdfRestInfoResponse(BaseModel):
10721087
10731088 contains_javascript : Annotated [
10741089 bool | None ,
1090+ BeforeValidator (demo_bool_false_or_passthrough ),
10751091 Field (
10761092 description = "Indicates whether the PDF contains JavaScript. The result is "
10771093 "true or false."
@@ -1081,6 +1097,7 @@ class PdfRestInfoResponse(BaseModel):
10811097
10821098 contains_transparency : Annotated [
10831099 bool | None ,
1100+ BeforeValidator (demo_bool_false_or_passthrough ),
10841101 Field (
10851102 description = "Indicates whether the PDF contains transparent objects. The "
10861103 "result is true or false."
@@ -1090,6 +1107,7 @@ class PdfRestInfoResponse(BaseModel):
10901107
10911108 contains_embedded_file : Annotated [
10921109 bool | None ,
1110+ BeforeValidator (demo_bool_false_or_passthrough ),
10931111 Field (
10941112 description = "Indicates whether the PDF contains one or more embedded "
10951113 "files. The result is true or false."
@@ -1099,6 +1117,7 @@ class PdfRestInfoResponse(BaseModel):
10991117
11001118 uses_embedded_fonts : Annotated [
11011119 bool | None ,
1120+ BeforeValidator (demo_bool_false_or_passthrough ),
11021121 Field (
11031122 description = "Indicates whether the PDF contains fully embedded fonts. "
11041123 "The result is true or false."
@@ -1108,6 +1127,7 @@ class PdfRestInfoResponse(BaseModel):
11081127
11091128 uses_nonembedded_fonts : Annotated [
11101129 bool | None ,
1130+ BeforeValidator (demo_bool_false_or_passthrough ),
11111131 Field (
11121132 description = "Indicates whether the PDF contains non-embedded fonts. The "
11131133 "result is true or false."
@@ -1117,6 +1137,7 @@ class PdfRestInfoResponse(BaseModel):
11171137
11181138 pdfa : Annotated [
11191139 bool | None ,
1140+ BeforeValidator (demo_bool_false_or_passthrough ),
11201141 Field (
11211142 description = "Indicates whether the document conforms to the PDF/A "
11221143 "standard. The result is true or false."
@@ -1126,6 +1147,7 @@ class PdfRestInfoResponse(BaseModel):
11261147
11271148 pdfua_claim : Annotated [
11281149 bool | None ,
1150+ BeforeValidator (demo_bool_false_or_passthrough ),
11291151 Field (
11301152 description = "Indicates whether the document claims to conform to the "
11311153 "PDF/UA standard. The result is true or false."
@@ -1135,6 +1157,7 @@ class PdfRestInfoResponse(BaseModel):
11351157
11361158 pdfe_claim : Annotated [
11371159 bool | None ,
1160+ BeforeValidator (demo_bool_false_or_passthrough ),
11381161 Field (
11391162 description = "Indicates whether the document claims to conform to the "
11401163 "PDF/E standard. The result is true or false."
@@ -1144,6 +1167,7 @@ class PdfRestInfoResponse(BaseModel):
11441167
11451168 pdfx_claim : Annotated [
11461169 bool | None ,
1170+ BeforeValidator (demo_bool_false_or_passthrough ),
11471171 Field (
11481172 description = "Indicates whether the document claims to conform to the "
11491173 "PDF/X standard. The result is true or false."
@@ -1153,6 +1177,7 @@ class PdfRestInfoResponse(BaseModel):
11531177
11541178 requires_password_to_open : Annotated [
11551179 bool | None ,
1180+ BeforeValidator (demo_bool_false_or_passthrough ),
11561181 Field (
11571182 description = (
11581183 "Indicates whether the PDF requires a password to open. The result "
@@ -1165,6 +1190,7 @@ class PdfRestInfoResponse(BaseModel):
11651190
11661191 all_queries_processed : Annotated [
11671192 bool ,
1193+ BeforeValidator (demo_bool_true_or_passthrough ),
11681194 Field (
11691195 validation_alias = AliasChoices (
11701196 "all_queries_processed" , "allQueriesProcessed"
0 commit comments