Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 348 for unicos (0.3 sec)

  1. docs/zh/docs/tutorial/extra-models.md

        ```
    
    ## `Union` 或者 `anyOf`
    
    响应可以声明为两种类型的 `Union` 类型,即该响应可以是两种类型中的任意类型。
    
    在 OpenAPI 中可以使用 `anyOf` 定义。
    
    为此,请使用 Python 标准类型提示 <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note "笔记"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Apr 01 01:15:53 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  2. docs/en/docs/tutorial/extra-models.md

        ```
    
    ## `Union` or `anyOf`
    
    You can declare a response to be the `Union` of two types, that means, that the response would be any of the two.
    
    It will be defined in OpenAPI with `anyOf`.
    
    To do that, use the standard Python type hint <a href="https://docs.python.org/3/library/typing.html#typing.Union" class="external-link" target="_blank">`typing.Union`</a>:
    
    !!! note
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (1)
  3. docs/pt/docs/tutorial/body-multiple-params.md

        ```
    
    !!! info "Informação"
        `Body` também possui todas as validações adicionais e metadados de parâmetros como em `Query`,`Path` e outras que você verá depois.
    
    ## Declare um único parâmetro de corpo indicando sua chave
    
    Suponha que você tem um único parâmetro de corpo `item`, a partir de um modelo Pydantic `Item`.
    
    Por padrão, o **FastAPI** esperará que seu conteúdo venha no corpo diretamente.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  4. docs/pt/docs/tutorial/query-params-str-validations.md

    ```
    
    O parâmetro de consulta `q` é do tipo `Union[str, None]`, o que significa que é do tipo `str` mas que também pode ser `None`, e de fato, o valor padrão é `None`, então o FastAPI saberá que não é obrigatório.
    
    !!! note "Observação"
        O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= None`.
    
    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)
  5. docs/pt/docs/tutorial/body-nested-models.md

    ```
    
    ## Tipo "set"
    
    
    Mas então, quando nós pensamos mais, percebemos que as tags não devem se repetir, elas provavelmente devem ser strings únicas.
    
    E que o Python tem um tipo de dados especial para conjuntos de itens únicos, o `set`.
    
    Então podemos importar `Set` e declarar `tags` como um `set` de `str`s:
    
    
    ```Python hl_lines="1  14"
    {!../../../docs_src/body_nested_models/tutorial003.py!}
    ```
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  6. docs/pt/docs/tutorial/body.md

    * Se o parâmetro é de um **tipo único** (como `int`, `float`, `str`, `bool`, etc) será interpretado como um parâmetro de **consulta**.
    * Se o parâmetro é declarado como um **modelo Pydantic**, será interpretado como o **corpo** da requisição.
    
    !!! note "Observação"
        O FastAPI saberá que o valor de `q` não é obrigatório por causa do valor padrão `= None`.
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  7. okhttp/src/test/java/okhttp3/internal/idn/PunycodeTest.kt

      }
    
      private fun testEncodeDecode(
        unicode: String,
        punycode: String,
      ) {
        assertEquals(unicode, Punycode.decode(punycode))
        assertEquals(punycode, Punycode.encode(unicode))
      }
    
      private fun testDecodeOnly(
        unicode: String,
        punycode: String,
      ) {
        assertEquals(unicode, Punycode.decode(punycode))
      }
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 5.3K bytes
    - Viewed (0)
  8. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

      }
    
      /**
       * Asserts that a Unicode escaper does not escape the given character.
       *
       * @param escaper the non-null escaper to test
       * @param cp the Unicode code point to test
       */
      public static void assertUnescaped(UnicodeEscaper escaper, int cp) {
        Assert.assertNull(computeReplacement(escaper, cp));
      }
    
      /**
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  9. src/main/java/jcifs/smb1/smb1/Trans2GetDfsReferralResponse.java

                    path = readString( buffer, start + pathOffset, len, (flags2 & FLAGS2_UNICODE) != 0);
                    if (nodeOffset > 0)
                        node = readString( buffer, start + nodeOffset, len, (flags2 & FLAGS2_UNICODE) != 0);
                } else if( version == 1 ) {
                    node = readString( buffer, bufferIndex, len, (flags2 & FLAGS2_UNICODE) != 0);
                }
    
                return size;
            }
    
    Java
    - Registered: Sun May 05 00:10:10 GMT 2024
    - Last Modified: Fri Mar 22 21:10:40 GMT 2019
    - 5K bytes
    - Viewed (0)
  10. docs/zh/docs/tutorial/handling-errors.md

    且需要 FastAPI 实现全局处理该异常。
    
    此时,可以用 `@app.exception_handler()` 添加自定义异常控制器:
    
    ```Python hl_lines="5-7  13-18  24"
    {!../../../docs_src/handling_errors/tutorial003.py!}
    
    ```
    
    请求 `/unicorns/yolo` 时,路径操作会触发 `UnicornException`。
    
    但该异常将会被 `unicorn_exception_handler` 处理。
    
    接收到的错误信息清晰明了,HTTP 状态码为 `418`,JSON 内容如下:
    
    ```JSON
    {"message": "Oops! yolo did something. There goes a rainbow..."}
    
    ```
    
    !!! note "技术细节"
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 8.4K bytes
    - Viewed (0)
Back to top