Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 141 - 150 of 930 for toOptional (0.12 seconds)

  1. docs_src/separate_openapi_schemas/tutorial001_py39.py

    from typing import Optional
    
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    
    class Item(BaseModel):
        name: str
        description: Optional[str] = None
    
    
    app = FastAPI()
    
    
    @app.post("/items/")
    def create_item(item: Item):
        return item
    
    
    @app.get("/items/")
    def read_items() -> list[Item]:
        return [
            Item(
                name="Portal Gun",
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Fri Aug 25 19:10:22 GMT 2023
    - 483 bytes
    - Click Count (0)
  2. fastapi/types.py

    from enum import Enum
    from typing import Any, Callable, Optional, TypeVar, Union
    
    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = dict[Union[type[BaseModel], type[Enum]], str]
    IncEx = Union[set[int], set[str], dict[int, Any], dict[str, Any]]
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 455 bytes
    - Click Count (0)
  3. compat/maven-compat/src/test/resources/inheritance-repo/t05/maven-test/poms/t05-b-1.0.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t05-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>false</optional>
        </dependency>
      </dependencies>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 622 bytes
    - Click Count (0)
  4. compat/maven-compat/src/test/resources/inheritance-repo/t06/maven-test/poms/t06-b-1.1.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t06-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>false</optional>
        </dependency>
      </dependencies>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 622 bytes
    - Click Count (0)
  5. compat/maven-compat/src/test/resources/inheritance-repo/t07/maven-test/poms/t07-b-1.0.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t07-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>true</optional>
        </dependency>
      </dependencies>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 621 bytes
    - Click Count (0)
  6. compat/maven-compat/src/test/resources/inheritance-repo/t07/maven-test/poms/t07-b-1.1.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t07-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>true</optional>
        </dependency>
      </dependencies>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 621 bytes
    - Click Count (0)
  7. compat/maven-model-builder/src/main/java/org/apache/maven/model/profile/activation/PackagingProfileActivator.java

            return Objects.equals(p, packaging);
        }
    
        private static Optional<String> getActivationPackaging(org.apache.maven.model.Profile profile) {
            return Optional.ofNullable(profile)
                    .map(org.apache.maven.model.Profile::getDelegate)
                    .map(Profile::getActivation)
                    .map(Activation::getPackaging);
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Tue Feb 25 08:27:34 GMT 2025
    - 2.5K bytes
    - Click Count (0)
  8. tests/test_validate_response.py

    from typing import Optional, Union
    
    import pytest
    from fastapi import FastAPI
    from fastapi.exceptions import ResponseValidationError
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        price: Optional[float] = None
        owner_ids: Optional[list[int]] = None
    
    
    @app.get("/items/invalid", response_model=Item)
    def get_invalid():
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 2K bytes
    - Click Count (0)
  9. impl/maven-core/src/main/java/org/apache/maven/artifact/factory/DefaultArtifactFactory.java

                VersionRange versionRange,
                String type,
                String classifier,
                String scope,
                boolean optional) {
            return createArtifact(groupId, artifactId, versionRange, type, classifier, scope, null, optional);
        }
    
        @Override
        public Artifact createDependencyArtifact(
                String groupId,
                String artifactId,
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Jun 06 14:28:57 GMT 2025
    - 7.1K bytes
    - Click Count (0)
  10. compat/maven-compat/src/test/resources/inheritance-repo/t06/maven-test/poms/t06-b-1.0.pom

        </dependency>
        <dependency>
          <groupId>maven-test</groupId>
          <artifactId>t06-d</artifactId>
          <version>1.1</version>
          <type>jar</type>
          <scope>compile</scope>
          <optional>false</optional>
        </dependency>
      </dependencies>
    Created: Sun Dec 28 03:35:09 GMT 2025
    - Last Modified: Fri Oct 25 12:31:46 GMT 2024
    - 622 bytes
    - Click Count (0)
Back to Top