Search Options

Results per page
Sort
Preferred Languages
Advance

Results 511 - 520 of 1,321 for rjsonp (0.07 sec)

  1. tests/test_response_model_sub_types.py

        response = client.get("/valid4")
        assert response.status_code == 200, response.text
    
    
    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": {
                "/valid1": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 5.3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_request_form_models/test_tutorial002.py

        assert response.status_code == 200
        assert response.json() == {"username": "Foo", "password": "secret"}
    
    
    @needs_pydanticv2
    def test_post_body_extra_form(client: TestClient):
        response = client.post(
            "/login/", data={"username": "Foo", "password": "secret", "extra": "extra"}
        )
        assert response.status_code == 422
        assert response.json() == {
            "detail": [
                {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Sep 06 17:31:18 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_testing_dependencies/test_tutorial001_py310.py

        assert response.json() == {
            "message": "Hello Users!",
            "params": {"q": None, "skip": 5, "limit": 10},
        }
    
    
    @needs_py310
    def test_override_in_users_with_q():
        from docs_src.dependency_testing.tutorial001_py310 import client
    
        response = client.get("/users/?q=foo")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "message": "Hello Users!",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Mar 18 12:29:59 UTC 2023
    - 2K bytes
    - Viewed (0)
  4. docs/vi/docs/tutorial/first-steps.md

    Trong trường hợp đó, nó có nghĩa là các thuộc tính JSON và các kiểu dữ liệu họ có,...
    
    #### OpenAPI và JSON Schema
    
    OpenAPI định nghĩa một cấu trúc API cho API của bạn. Và cấu trúc đó bao gồm các dịnh nghĩa (or "schema") về dữ liệu được gửi đi và nhận về bởi API của bạn, sử dụng **JSON Schema**, một tiêu chuẩn cho cấu trúc dữ liệu JSON.
    
    #### Kiểm tra `openapi.json`
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_nested_models/test_tutorial009_py39.py

        response = client.post("/index-weights/", json=data)
        assert response.status_code == 200, response.text
        assert response.json() == data
    
    
    @needs_py39
    def test_post_invalid_body(client: TestClient):
        data = {"foo": 2.2, "3": 3.3}
        response = client.post("/index-weights/", json=data)
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/schema-extra-example.md

    Поля `example` как такового не существует в стандартах **JSON Schema**. В последних версиях JSON-схемы определено поле <a href="https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.5" class="external-link" target="_blank">`examples`</a>, но OpenAPI 3.0.3 основан на более старой версии JSON-схемы, которая не имела поля `examples`.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_files/test_tutorial002_an.py

                    }
                ]
            }
        )
    
    
    def test_post_body_json():
        response = client.post("/files/", json={"file": "Foo"})
        assert response.status_code == 422, response.text
        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "missing",
                        "loc": ["body", "files"],
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  8. docs/de/docs/advanced/additional-responses.md

    Die richtige Stelle ist:
    
    * Im Schlüssel `content`, der als Wert ein weiteres JSON-Objekt (`dict`) hat, welches Folgendes enthält:
        * Ein Schlüssel mit dem Medientyp, z. B. `application/json`, der als Wert ein weiteres JSON-Objekt hat, welches Folgendes enthält:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 9.6K bytes
    - Viewed (0)
  9. docs/en/docs/advanced/additional-responses.md

    **FastAPI** will take the Pydantic model from there, generate the JSON Schema, and put it in the correct place.
    
    The correct place is:
    
    * In the key `content`, that has as value another JSON object (`dict`) that contains:
        * A key with the media type, e.g. `application/json`, that contains as value another JSON object, that contains:
            * A key `schema`, that has as the value the JSON Schema from the model, here's the correct place.
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 16:07:07 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_testing/test_tutorial001.py

    from docs_src.app_testing.tutorial001 import client, test_read_main
    
    
    def test_main():
        test_read_main()
    
    
    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
    - 821 bytes
    - Viewed (0)
Back to top