|
|
|
@ -44,6 +44,8 @@ evaluate_forwardref = eval_type_lenient |
|
|
|
class GenerateJsonSchema(_GenerateJsonSchema): |
|
|
|
def bytes_schema(self, schema: CoreSchema) -> JsonSchemaValue: |
|
|
|
json_schema = {"type": "string", "contentMediaType": "application/octet-stream"} |
|
|
|
if self._config.ser_json_bytes == "base64": |
|
|
|
json_schema["contentEncoding"] = "base64" |
|
|
|
self.update_with_validations(json_schema, schema, self.ValidationsMapping.bytes) |
|
|
|
return json_schema |
|
|
|
|
|
|
|
|