Updated xgrammar backend to not deny supported string formats (#27253)
Signed-off-by: CNE Pierre FICHEPOIL <pierre-1.fichepoil@gendarmerie.interieur.gouv.fr> Signed-off-by: ExtReMLapin <3909752+ExtReMLapin@users.noreply.github.com> Co-authored-by: CNE Pierre FICHEPOIL <pierre-1.fichepoil@gendarmerie.interieur.gouv.fr> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ pytestmark = pytest.mark.cpu_test
|
||||
@pytest.fixture
|
||||
def unsupported_string_schemas():
|
||||
return [
|
||||
{"type": "string", "format": "email"},
|
||||
{"type": "string", "format": "non_existing_format"},
|
||||
]
|
||||
|
||||
|
||||
@@ -58,6 +58,7 @@ def supported_schema():
|
||||
"properties": {
|
||||
"name": {"type": "string"},
|
||||
"age": {"type": "integer"},
|
||||
"email": {"type": "string", "format": "email"},
|
||||
"status": {"type": "string"},
|
||||
"scores": {"type": "array", "items": {"type": "number"}},
|
||||
"car_type": {"type": "string", "enum": ["sedan", "suv", "truck"]},
|
||||
|
||||
Reference in New Issue
Block a user