id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v04
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-pydantic-v2-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v05
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
id: cache
with:
path: ${{ env.pythonLocation }}
- key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v04
+ key: ${{ runner.os }}-python-${{ env.pythonLocation }}-${{ matrix.pydantic-version }}-${{ hashFiles('pyproject.toml', 'requirements-tests.txt') }}-test-v05
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: pip install -r requirements-tests.txt
"loc": ["body", 0, "age"],
"msg": "Input should be greater than 0",
"input": -1.0,
- "ctx": {"gt": "0"},
+ "ctx": {"gt": 0},
"url": match_pydantic_error_url("greater_than"),
}
]
"input": {"age": "five"},
"url": match_pydantic_error_url("missing"),
},
- {
- "ctx": {"class": "Decimal"},
- "input": "five",
- "loc": ["body", 0, "age", "is-instance[Decimal]"],
- "msg": "Input should be an instance of Decimal",
- "type": "is_instance_of",
- "url": match_pydantic_error_url("is_instance_of"),
- },
{
"type": "decimal_parsing",
- "loc": [
- "body",
- 0,
- "age",
- "function-after[to_decimal(), "
- "union[int,constrained-str,function-plain[str()]]]",
- ],
+ "loc": ["body", 0, "age"],
"msg": "Input should be a valid decimal",
"input": "five",
+ "url": match_pydantic_error_url("decimal_parsing"),
},
{
"type": "missing",
"input": {"age": "six"},
"url": match_pydantic_error_url("missing"),
},
- {
- "ctx": {"class": "Decimal"},
- "input": "six",
- "loc": ["body", 1, "age", "is-instance[Decimal]"],
- "msg": "Input should be an instance of Decimal",
- "type": "is_instance_of",
- "url": match_pydantic_error_url("is_instance_of"),
- },
{
"type": "decimal_parsing",
- "loc": [
- "body",
- 1,
- "age",
- "function-after[to_decimal(), "
- "union[int,constrained-str,function-plain[str()]]]",
- ],
+ "loc": ["body", 1, "age"],
"msg": "Input should be a valid decimal",
"input": "six",
+ "url": match_pydantic_error_url("decimal_parsing"),
},
]
}
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"type": "object",
"properties": {
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"type": "object",
"required": ["name", "description", "price", "tax", "tags"],
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"type": "object",
"properties": {
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"type": "object",
"required": ["name", "description", "price", "tax", "tags"],
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"type": "object",
"properties": {
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"type": "object",
"required": ["name", "description", "price", "tax", "tags"],
"schema": {
"title": "Items",
"type": "array",
- "items": {"$ref": "#/components/schemas/ItemInput"},
+ "items": {
+ "$ref": "#/components/schemas/Item-Input"
+ },
}
}
},
"items": {
"title": "Items",
"type": "array",
- "items": {"$ref": "#/components/schemas/ItemOutput"},
+ "items": {"$ref": "#/components/schemas/Item-Output"},
},
},
},
}
},
},
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"required": ["name"],
"type": "object",
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"required": ["name", "description"],
"type": "object",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"required": ["name", "price"],
"type": "object",
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"required": ["name", "description", "price", "tax", "tags"],
"type": "object",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"required": ["name", "price"],
"type": "object",
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"required": ["name", "description", "price", "tax", "tags"],
"type": "object",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"required": ["name", "price"],
"type": "object",
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"required": ["name", "description", "price", "tax", "tags"],
"type": "object",
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/ItemOutput"
+ "$ref": "#/components/schemas/Item-Output"
}
}
},
"requestBody": {
"content": {
"application/json": {
- "schema": {"$ref": "#/components/schemas/ItemInput"}
+ "schema": {"$ref": "#/components/schemas/Item-Input"}
}
},
"required": True,
},
"components": {
"schemas": {
- "ItemInput": {
+ "Item-Input": {
"title": "Item",
"required": ["name", "price"],
"type": "object",
},
},
},
- "ItemOutput": {
+ "Item-Output": {
"title": "Item",
"required": ["name", "description", "price", "tax", "tags"],
"type": "object",