Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 73 for declaring (0.05 seconds)

  1. docs/en/docs/tutorial/dependencies/classes-as-dependencies.md

    ///
    
    ```Python
    commons = Depends(CommonQueryParams)
    ```
    
    ////
    
    ...as in:
    
    {* ../../docs_src/dependencies/tutorial003_an_py310.py hl[19] *}
    
    But declaring the type is encouraged as that way your editor will know what will be passed as the parameter `commons`, and then it can help you with code completion, type checks, etc:
    
    <img src="/img/tutorial/dependencies/image02.png">
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  2. docs/en/docs/tutorial/extra-models.md

    {* ../../docs_src/extra_models/tutorial004_py39.py hl[18] *}
    
    ## Response with arbitrary `dict` { #response-with-arbitrary-dict }
    
    You can also declare a response using a plain arbitrary `dict`, declaring just the type of the keys and values, without using a Pydantic model.
    
    This is useful if you don't know the valid field/attribute names (that would be needed for a Pydantic model) beforehand.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 6.9K bytes
    - Click Count (0)
  3. docs/en/docs/advanced/path-operation-advanced-configuration.md

    For example, in this application we don't use FastAPI's integrated functionality to extract the JSON Schema from Pydantic models nor the automatic validation for JSON. In fact, we are declaring the request content type as YAML, not JSON:
    
    {* ../../docs_src/path_operation_advanced_configuration/tutorial007_py39.py hl[15:20, 22] *}
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 7.2K bytes
    - Click Count (0)
  4. src/bytes/buffer.go

    //
    // In most cases, new([Buffer]) (or just declaring a [Buffer] variable) is
    // sufficient to initialize a [Buffer].
    func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} }
    
    // NewBufferString creates and initializes a new [Buffer] using string s as its
    // initial contents. It is intended to prepare a buffer to read an existing
    // string.
    //
    // In most cases, new([Buffer]) (or just declaring a [Buffer] variable) is
    Created: Tue Dec 30 11:13:12 GMT 2025
    - Last Modified: Fri Nov 14 19:01:17 GMT 2025
    - 16.5K bytes
    - Click Count (0)
  5. impl/maven-core/src/test/java/org/apache/maven/project/ProjectSorterTest.java

            assertTrue(
                    projects.contains(pluginLevelDepProject),
                    "Expected " + projects + " to contain " + pluginLevelDepProject);
    
            // the declaring project MUST be listed after the plugin and its plugin-level dep, though.
            assertEquals(declaringProject, projects.get(3));
        }
    
        @Test
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Wed Sep 17 10:01:14 GMT 2025
    - 12.7K bytes
    - Click Count (0)
  6. docs/en/docs/tutorial/body.md

    Then you declare your data model as a class that inherits from `BaseModel`.
    
    Use standard Python types for all the attributes:
    
    {* ../../docs_src/body/tutorial001_py310.py hl[5:9] *}
    
    
    The same as when declaring query parameters, when a model attribute has a default value, it is not required. Otherwise, it is required. Use `None` to make it just optional.
    
    For example, this model above declares a JSON "`object`" (or Python `dict`) like:
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 6.8K bytes
    - Click Count (0)
  7. docs/en/docs/tutorial/dependencies/index.md

    current_user --> public
    active_user --> private
    admin_user --> activate_user
    paying_user --> pro_items
    ```
    
    ## Integrated with **OpenAPI** { #integrated-with-openapi_1 }
    
    All these dependencies, while declaring their requirements, also add parameters, validations, etc. to your *path operations*.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sun Aug 31 09:15:41 GMT 2025
    - 9.6K bytes
    - Click Count (0)
  8. docs/en/docs/tutorial/schema-extra-example.md

    Now, as Swagger UI didn't support multiple JSON Schema examples (as of 2023-08-26), users didn't have a way to show multiple examples in the docs.
    
    To solve that, FastAPI `0.103.0` **added support** for declaring the same old **OpenAPI-specific** `examples` field with the new parameter `openapi_examples`. 🤓
    
    ### Summary { #summary }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Dec 20 15:55:38 GMT 2025
    - 8.9K bytes
    - Click Count (0)
  9. docs/en/docs/alternatives.md

    It used custom types in its declarations instead of standard Python types, but it was still a huge step forward.
    
    It also was one of the first frameworks to generate a custom schema declaring the whole API in JSON.
    
    It was not based on a standard like OpenAPI and JSON Schema. So it wouldn't be straightforward to integrate it with other tools, like Swagger UI. But again, it was a very innovative idea.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Oct 11 17:48:49 GMT 2025
    - 23.6K bytes
    - Click Count (0)
  10. android/guava-testlib/src/com/google/common/testing/AbstractPackageSanityTests.java

            /*
             * These classes handle null properly but throw IllegalArgumentException for the default
             * Class argument that this test uses. Normally we'd fix that by declaring a
             * ReflectionFreeAssertThrowsTest with a testNulls method, but that's annoying to have to do
             * for a package-private utility class. So we skip the class entirely instead.
             */
            continue;
    Created: Fri Dec 26 12:43:10 GMT 2025
    - Last Modified: Tue May 13 17:27:14 GMT 2025
    - 17.8K bytes
    - Click Count (0)
Back to Top