📝 Update ModelRead to ModelPublic documentation and examples (#885)
Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
This commit is contained in:
@@ -134,7 +134,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Heroes Heroes Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -171,7 +171,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -207,7 +207,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -279,7 +279,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -333,7 +333,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Teams Teams Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -370,7 +370,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -406,7 +406,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -478,7 +478,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -541,8 +541,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
),
|
||||
},
|
||||
},
|
||||
"HeroRead": {
|
||||
"title": "HeroRead",
|
||||
"HeroPublic": {
|
||||
"title": "HeroPublic",
|
||||
"required": ["name", "secret_name", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -626,8 +626,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
"headquarters": {"title": "Headquarters", "type": "string"},
|
||||
},
|
||||
},
|
||||
"TeamRead": {
|
||||
"title": "TeamRead",
|
||||
"TeamPublic": {
|
||||
"title": "TeamPublic",
|
||||
"required": ["name", "headquarters", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -137,7 +137,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Heroes Heroes Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -210,7 +210,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -282,7 +282,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -336,7 +336,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Teams Teams Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -373,7 +373,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -409,7 +409,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -481,7 +481,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -544,8 +544,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
),
|
||||
},
|
||||
},
|
||||
"HeroRead": {
|
||||
"title": "HeroRead",
|
||||
"HeroPublic": {
|
||||
"title": "HeroPublic",
|
||||
"required": ["name", "secret_name", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -629,8 +629,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
"headquarters": {"title": "Headquarters", "type": "string"},
|
||||
},
|
||||
},
|
||||
"TeamRead": {
|
||||
"title": "TeamRead",
|
||||
"TeamPublic": {
|
||||
"title": "TeamPublic",
|
||||
"required": ["name", "headquarters", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
@@ -137,7 +137,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Heroes Heroes Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -174,7 +174,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -210,7 +210,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -282,7 +282,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/HeroRead"
|
||||
"$ref": "#/components/schemas/HeroPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -336,7 +336,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"title": "Response Read Teams Teams Get",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -373,7 +373,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -409,7 +409,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -481,7 +481,7 @@ def test_tutorial(clear_sqlmodel):
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/TeamRead"
|
||||
"$ref": "#/components/schemas/TeamPublic"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -544,8 +544,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
),
|
||||
},
|
||||
},
|
||||
"HeroRead": {
|
||||
"title": "HeroRead",
|
||||
"HeroPublic": {
|
||||
"title": "HeroPublic",
|
||||
"required": ["name", "secret_name", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -629,8 +629,8 @@ def test_tutorial(clear_sqlmodel):
|
||||
"headquarters": {"title": "Headquarters", "type": "string"},
|
||||
},
|
||||
},
|
||||
"TeamRead": {
|
||||
"title": "TeamRead",
|
||||
"TeamPublic": {
|
||||
"title": "TeamPublic",
|
||||
"required": ["name", "headquarters", "id"],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user