Generates a JSON schema that matches a frozenset schema. Args: schema: The core schema. Returns: The generated JSON schema.
(self, schema: core_schema.FrozenSetSchema)
| 1037 | return self._common_set_schema(schema) |
| 1038 | |
| 1039 | def frozenset_schema(self, schema: core_schema.FrozenSetSchema) -> JsonSchemaValue: |
| 1040 | """Generates a JSON schema that matches a frozenset schema. |
| 1041 | |
| 1042 | Args: |
| 1043 | schema: The core schema. |
| 1044 | |
| 1045 | Returns: |
| 1046 | The generated JSON schema. |
| 1047 | """ |
| 1048 | return self._common_set_schema(schema) |
| 1049 | |
| 1050 | def _common_set_schema(self, schema: core_schema.SetSchema | core_schema.FrozenSetSchema) -> JsonSchemaValue: |
| 1051 | items_schema = {} if 'items_schema' not in schema else self.generate_inner(schema['items_schema']) |