- Sort Score
- Num 10 results
- Language All
Results 2431 - 2440 of 3,625 for Gist (0.04 seconds)
-
docs/zh/docs/tutorial/response-model.md
/// note | 注意 注意,`response_model` 是「装饰器」方法(`get`、`post` 等)的一个参数。不是你的*路径操作函数*的参数,不像所有查询参数和请求体那样。 /// `response_model` 接收的类型与为 Pydantic 模型字段声明的类型相同,因此它可以是一个 Pydantic 模型,也可以是一个由 Pydantic 模型组成的 `list`,例如 `List[Item]`。 FastAPI 会使用这个 `response_model` 来完成数据文档、校验等,并且还会将输出数据**转换并过滤**为其类型声明。 /// tip | 提示 如果你的编辑器、mypy 等进行严格类型检查,你可以将函数返回类型声明为 `Any`。 这样你告诉编辑器你是有意返回任意类型。但 FastAPI 仍会使用 `response_model` 做数据文档、校验、过滤等工作。
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 17:06:37 GMT 2026 - 14.5K bytes - Click Count (0) -
scripts/docs.py
], ) def get_en_config() -> dict[str, Any]: return mkdocs.utils.yaml_load(en_config_path.read_text(encoding="utf-8")) def get_lang_paths() -> list[Path]: return sorted(docs_path.iterdir()) def lang_callback(lang: str | None) -> str | None: if lang is None: return None lang = lang.lower() return langCreated: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 05 17:46:10 GMT 2026 - 25.4K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/dict/kuromoji/KuromojiFileTest.java
* governing permissions and limitations under the License. */ package org.codelibs.fess.dict.kuromoji; import java.util.ArrayList; import java.util.Date; import java.util.List; import org.codelibs.fess.dict.DictionaryFile.PagingList; import org.codelibs.fess.unit.UnitFessTestCase; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInfo;
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 7.4K bytes - Click Count (0) -
guava-tests/test/com/google/common/reflect/ImmutableTypeToInstanceMapTest.java
import com.google.common.collect.testing.features.CollectionFeature; import com.google.common.collect.testing.features.CollectionSize; import com.google.common.collect.testing.features.MapFeature; import java.util.List; import java.util.Map; import java.util.Map.Entry; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; import org.jspecify.annotations.NullUnmarked; /**
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Thu Dec 19 18:03:30 GMT 2024 - 6.9K bytes - Click Count (0) -
impl/maven-core/src/main/java/org/apache/maven/configuration/internal/DefaultBeanConfigurator.java
import javax.inject.Named; import javax.inject.Singleton; import java.io.File; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; import java.util.List; import java.util.Objects; import org.apache.maven.api.xml.XmlNode; import org.apache.maven.configuration.BeanConfigurationException; import org.apache.maven.configuration.BeanConfigurationPathTranslator;
Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Fri Jun 06 14:28:57 GMT 2025 - 8.3K bytes - Click Count (0) -
tests/test_custom_swagger_ui_redirect.py
def test_swagger_ui(): response = client.get("/docs") assert response.status_code == 200, response.text assert response.headers["content-type"] == "text/html; charset=utf-8" assert "swagger-ui-dist" in response.text print(client.base_url) assert ( f"oauth2RedirectUrl: window.location.origin + '{swagger_ui_oauth2_redirect_url}'" in response.text )
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 08 04:37:38 GMT 2020 - 1.1K bytes - Click Count (0) -
docs_src/body_updates/tutorial001_py310.py
from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str | None = None description: str | None = None price: float | None = None tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Jan 07 14:11:31 GMT 2022 - 856 bytes - Click Count (0) -
docs_src/generate_clients/tutorial003_py310.py
email: str @app.post("/items/", response_model=ResponseMessage, tags=["items"]) async def create_item(item: Item): return {"message": "Item received"} @app.get("/items/", response_model=list[Item], tags=["items"]) async def get_items(): return [ {"name": "Plumbus", "price": 3}, {"name": "Portal Gun", "price": 9001}, ]
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 12 13:19:43 GMT 2026 - 914 bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/publicsuffix/PublicSuffixList.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.internal.publicsuffix import okio.ByteString /** * Basic I/O for `PublicSuffixDatabase.list` */ internal interface PublicSuffixList { fun ensureLoaded() val bytes: ByteString val exceptionBytes: ByteString companion object }Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Tue May 27 22:00:49 GMT 2025 - 929 bytes - Click Count (0) -
docs/ja/docs/advanced/security/oauth2-scopes.md
<img src="/img/tutorial/security/image11.png"> ## スコープ付きの JWT トークン { #jwt-token-with-scopes } 次に、トークンの path operation を修正して、要求されたスコープを返すようにします。 引き続き同じ `OAuth2PasswordRequestForm` を使用します。これには、リクエストで受け取った各スコープを含む、`str` の `list` である `scopes` プロパティが含まれます。 そして、そのスコープを JWT トークンの一部として返します。 /// danger | 警告 簡単のため、ここでは受け取ったスコープをそのままトークンに追加しています。 しかし、本番アプリケーションではセキュリティのため、ユーザーが実際に持つことができるスコープ、または事前に定義したスコープだけを追加するようにしてください。 ///
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 16.6K bytes - Click Count (0)