mirror of
https://github.com/fastapi/sqlmodel.git
synced 2025-10-27 19:47:12 +08:00
📝 Fix docs for Pydantic's fields using le (lte is invalid, use le ) (#207)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@ -57,9 +57,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert response.status_code == 404, response.text
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -82,9 +81,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
@ -62,9 +62,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert data[0]["name"] == hero2_data["name"]
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -87,9 +86,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
@ -105,9 +105,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert len(data) == 1
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -130,9 +129,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
@ -329,9 +328,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
@ -57,9 +57,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert response.status_code == 404, response.text
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -82,9 +81,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
@ -92,9 +92,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert len(data) == 1
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -117,9 +116,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
@ -316,9 +315,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
@ -64,9 +64,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
assert response.status_code == 404, response.text
|
||||
|
||||
response = client.get("/openapi.json")
|
||||
data = response.json()
|
||||
assert response.status_code == 200, response.text
|
||||
assert data == {
|
||||
assert response.json() == {
|
||||
"openapi": "3.0.2",
|
||||
"info": {"title": "FastAPI", "version": "0.1.0"},
|
||||
"paths": {
|
||||
@ -89,9 +88,9 @@ def test_tutorial(clear_sqlmodel):
|
||||
"required": False,
|
||||
"schema": {
|
||||
"title": "Limit",
|
||||
"maximum": 100.0,
|
||||
"type": "integer",
|
||||
"default": 100,
|
||||
"lte": 100,
|
||||
},
|
||||
"name": "limit",
|
||||
"in": "query",
|
||||
|
||||
Reference in New Issue
Block a user