- Sort Score
- Result 10 results
- Languages All
Results 881 - 890 of 1,729 for djson (0.03 sec)
-
tests/test_tutorial/test_dependencies/test_tutorial004_py310.py
response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 5.6K bytes - Viewed (0) -
tests/test_param_in_path_and_dependency.py
def test_read_users(): response = client.get("/users/42") assert response.status_code == 200, response.text def test_openapi_schema(): response = client.get("/openapi.json") data = response.json() assert data == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/users/{user_id}": { "get": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/test_validate_response_recursive/test_validate_response_recursive_pv1.py
assert response.status_code == 200, response.text assert response.json() == { "sub_items": [{"name": "subitem", "sub_items": []}], "name": "item", } response = client.get("/items/recursive-submodel") assert response.status_code == 200, response.text assert response.json() == { "name": "item", "sub_items1": [ {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 900 bytes - Viewed (0) -
istioctl/pkg/writer/compare/sds/writer_test.go
[]string{"olinger", "serial_number", "expires", "valid", "type"}, secretItemColumns...), unexpected: []string{"source", "destination", "certdata"}, }, { name: "test JSON output with a single secret item", format: JSON, items: []SecretItem{ { Name: "olinger", Data: "certdata", Source: "source", Destination: "destination", SecretMeta: SecretMeta{
Registered: Wed Nov 06 22:53:10 UTC 2024 - Last Modified: Fri May 29 20:42:01 UTC 2020 - 4.9K bytes - Viewed (0) -
docs/de/docs/advanced/behind-a-proxy.md
Das Frontend (das im Browser läuft) würde also versuchen, `/openapi.json` zu erreichen und wäre nicht in der Lage, das OpenAPI-Schema abzurufen. Da wir für unsere Anwendung einen Proxy mit dem Pfadpräfix `/api/v1` haben, muss das Frontend das OpenAPI-Schema unter `/api/v1/openapi.json` abrufen. ```mermaid graph LR browser("Browser")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 13.1K bytes - Viewed (0) -
docs/zh/docs/advanced/behind-a-proxy.md
哪怕所有代码都假设只有 `/app`。 代理只在把请求传送给 Uvicorn 之前才会**移除路径前缀**,让应用以为它是在 `/app` 提供服务,因此不必在代码中加入前缀 `/api/v1`。 但之后,在(前端)打开 API 文档时,代理会要求在 `/openapi.json`,而不是 `/api/v1/openapi.json` 中提取 OpenAPI 概图。 因此, (运行在浏览器中的)前端会尝试访问 `/openapi.json`,但没有办法获取 OpenAPI 概图。 这是因为应用使用了以 `/api/v1` 为路径前缀的代理,前端要从 `/api/v1/openapi.json` 中提取 OpenAPI 概图。 ```mermaid graph LR browser("Browser") proxy["Proxy on http://0.0.0.0:9999/api/v1/app"]
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 10.4K bytes - Viewed (0) -
docs/zh/docs/advanced/generate-clients.md
我们可以将 OpenAPI JSON 下载到一个名为`openapi.json`的文件中,然后使用以下脚本**删除此前缀的标签**: ```Python {!../../docs_src/generate_clients/tutorial004.py!} ``` 通过这样做,操作ID将从类似于 `items-get_items` 的名称重命名为 `get_items` ,这样客户端生成器就可以生成更简洁的方法名称。 ### 使用预处理的OpenAPI生成TypeScript客户端 现在,由于最终结果保存在文件openapi.json中,你可以修改 package.json 文件以使用此本地文件,例如: ```JSON hl_lines="7" { "name": "frontend-app",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Sun Oct 06 20:36:54 UTC 2024 - 9K bytes - Viewed (0) -
tests/test_tutorial/test_custom_response/test_tutorial005.py
assert response.status_code == 200, response.text assert response.text == "Hello World" def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200, response.text assert response.json() == { "openapi": "3.1.0", "info": {"title": "FastAPI", "version": "0.1.0"}, "paths": { "/": { "get": {
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 980 bytes - Viewed (0) -
tests/test_response_model_data_filter.py
def test_filter_top_level_model(): response = client.post( "/users", json={"email": "******@****.***", "password": "secret"} ) assert response.json() == {"email": "******@****.***"} def test_filter_second_level_model(): response = client.get("/pets/1") assert response.json() == { "name": "Nibbler", "owner": {"email": "******@****.***"}, }
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.7K bytes - Viewed (0) -
docs/debugging/inspect/export.go
b = nbuf } nVers, v, e := decodeXLHeaders(v) if e != nil { return nil, e } type version struct { Idx int Header json.RawMessage Metadata json.RawMessage } versions := make([]version, nVers) e = decodeVersions(v, nVers, func(idx int, hdr, meta []byte) error { var header xlMetaV2VersionHeaderV2
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 08 15:58:02 UTC 2022 - 9.1K bytes - Viewed (0)