Search Options

Results per page
Sort
Preferred Languages
Advance

Results 401 - 410 of 563 for Model1 (0.04 sec)

  1. docs_src/additional_responses/tutorial001.py

    
    class Item(BaseModel):
        id: str
        value: str
    
    
    class Message(BaseModel):
        message: str
    
    
    app = FastAPI()
    
    
    @app.get("/items/{item_id}", response_model=Item, responses={404: {"model": Message}})
    async def read_item(item_id: str):
        if item_id == "foo":
            return {"id": "foo", "value": "there goes my hero"}
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 26 13:32:30 UTC 2022
    - 506 bytes
    - Viewed (0)
  2. docs/pt/docs/advanced/settings.md

    ///
    
    ### Criando o objeto `Settings`
    
    Importe a classe `BaseSettings` do Pydantic e crie uma nova subclasse, de forma parecida com um modelo do Pydantic.
    
    Os atributos da classe são declarados com anotações de tipo, e possíveis valores padrão, da mesma maneira que os modelos do Pydantic.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 17K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/additional-responses.md

    # OPENAPI 中的其他响应
    
    您可以声明附加响应,包括附加状态代码、媒体类型、描述等。
    
    这些额外的响应将包含在OpenAPI模式中,因此它们也将出现在API文档中。
    
    但是对于那些额外的响应,你必须确保你直接返回一个像 `JSONResponse` 一样的 `Response` ,并包含你的状态代码和内容。
    
    ## `model`附加响应
    您可以向路径操作装饰器传递参数 `responses` 。
    
    它接收一个 `dict`,键是每个响应的状态代码(如`200`),值是包含每个响应信息的其他 `dict`。
    
    每个响应字典都可以有一个关键模型,其中包含一个 `Pydantic` 模型,就像 `response_model` 一样。
    
    **FastAPI**将采用该模型,生成其`JSON Schema`并将其包含在`OpenAPI`中的正确位置。
    
    例如,要声明另一个具有状态码 `404` 和`Pydantic`模型 `Message` 的响应,可以写:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. api/maven-api-core/pom.xml

        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-api-meta</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-api-model</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.maven</groupId>
          <artifactId>maven-api-settings</artifactId>
        </dependency>
        <dependency>
          <groupId>org.apache.maven</groupId>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Sat Oct 19 18:11:20 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  5. compat/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-expected.xml

        <artifactId>parent</artifactId>
        <version>11-SNAPSHOT</version>
      </parent>
    
      <groupId>inheritance</groupId>
      <artifactId>inheritance</artifactId>
      <version>11-SNAPSHOT</version>
      <name>Model urls inheritance test child</name>
      <description>MNG-5951 MNG-6059 child.x.y.inherit.append.path="false" for each url to avoid automatic path addition when inheriting</description>
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  6. compat/maven-model-builder/src/test/resources/poms/inheritance/no-append-urls-parent.xml

      child.project.url.inherit.append.path="false">
      <modelVersion>4.0.0</modelVersion>
    
      <groupId>inheritance</groupId>
      <artifactId>parent</artifactId>
      <version>11-SNAPSHOT</version>
    
      <name>Model urls inheritance test parent</name>
      <description>MNG-5951 MNG-6059 child.x.y.inherit.append.path="false" for each url to avoid automatic path addition when inheriting</description>
    
      <modules>
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/BlockTableRenderer.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package gradlebuild.docs.dsl.docbook;
    
    import gradlebuild.docs.dsl.docbook.model.BlockDoc;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    
    public class BlockTableRenderer {
        public void renderTo(Iterable<BlockDoc> blocks, Element parent) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 2.8K bytes
    - Viewed (0)
  8. build-logic/documentation/src/main/groovy/gradlebuild/docs/dsl/docbook/PropertyTableRenderer.java

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    
    package gradlebuild.docs.dsl.docbook;
    
    import gradlebuild.docs.dsl.docbook.model.PropertyDoc;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    
    public class PropertyTableRenderer {
        public void renderTo(Iterable<PropertyDoc> properties, Element parent) {
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Dec 09 08:14:05 UTC 2020
    - 3.1K bytes
    - Viewed (0)
  9. compat/maven-toolchain-builder/src/test/java/org/apache/maven/toolchain/merge/MavenToolchainMergerTest.java

    import java.io.IOException;
    import java.io.InputStream;
    import java.util.Collections;
    
    import org.apache.maven.toolchain.io.DefaultToolchainsReader;
    import org.apache.maven.toolchain.model.PersistedToolchains;
    import org.apache.maven.toolchain.model.TrackableBase;
    import org.codehaus.plexus.util.xml.Xpp3Dom;
    import org.junit.jupiter.api.Test;
    
    import static org.junit.jupiter.api.Assertions.assertEquals;
    
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 6K bytes
    - Viewed (0)
  10. compat/maven-embedder/src/main/java/org/apache/maven/cli/internal/BootstrapCoreExtensionManager.java

    import org.apache.maven.RepositoryUtils;
    import org.apache.maven.api.Service;
    import org.apache.maven.api.Session;
    import org.apache.maven.api.cli.extensions.CoreExtension;
    import org.apache.maven.api.model.Plugin;
    import org.apache.maven.api.services.ArtifactCoordinatesFactory;
    import org.apache.maven.api.services.ArtifactManager;
    import org.apache.maven.api.services.ArtifactResolver;
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 13.2K bytes
    - Viewed (0)
Back to top