Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for queryId (0.18 sec)

  1. docs/ko/docs/tutorial/query-params-str-validations.md

    ## 추가 검증
    
    `q`가 선택적이지만 값이 주어질 때마다 **값이 50 글자를 초과하지 않게** 강제하려 합니다.
    
    ### `Query` 임포트
    
    이를 위해 먼저 `fastapi`에서 `Query`를 임포트합니다:
    
    ```Python hl_lines="3"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    ## 기본값으로 `Query` 사용
    
    이제 `Query`를 매개변수의 기본값으로 사용하여 `max_length` 매개변수를 50으로 설정합니다:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sun Feb 11 13:48:31 GMT 2024
    - 9.6K bytes
    - Viewed (0)
  2. docs/pt/docs/tutorial/query-params-str-validations.md

    ### Importe `Query`
    
    Para isso, primeiro importe `Query` de `fastapi`:
    
    ```Python hl_lines="3"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    ## Use `Query` como o valor padrão
    
    Agora utilize-o como valor padrão do seu parâmetro, definindo o parâmetro `max_length` para 50:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 9.3K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/query-params-str-validations.md

    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    ## 使用 `Query` 作为默认值
    
    现在,将 `Query` 用作查询参数的默认值,并将它的 `max_length` 参数设置为 50:
    
    ```Python hl_lines="9"
    {!../../../docs_src/query_params_str_validations/tutorial002.py!}
    ```
    
    由于我们必须用 `Query(default=None)` 替换默认值 `None`,`Query` 的第一个参数同样也是用于定义默认值。
    
    所以:
    
    ```Python
    q: Union[str, None] = Query(default=None)
    ```
    
    ...使得参数可选,等同于:
    
    ```Python
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 9.2K bytes
    - Viewed (0)
Back to top