- Sort Score
- Num 10 results
- Language All
Results 211 - 220 of 1,171 for optionals (0.05 seconds)
-
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) -
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) -
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) -
impl/maven-core/src/main/java/org/apache/maven/internal/impl/DefaultArtifactManager.java
return Optional.of(project.getArtifact().getFile().toPath()); } } } Path path = paths.get(id); if (path == null && artifact instanceof DefaultArtifact defaultArtifact) { path = defaultArtifact.getArtifact().getPath(); } return Optional.ofNullable(path); } @Override
Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Wed Sep 17 16:01:38 GMT 2025 - 4.4K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/Event.java
* * @return the current project or {@code empty()} if not applicable */ @Nonnull Optional<Project> getProject(); /** * Gets the current mojo execution (if any). * * @return the current mojo execution or {@code empty()} if not applicable */ @Nonnull Optional<MojoExecution> getMojoExecution(); /** * Gets the exception that caused the event (if any). *Created: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Thu Mar 23 05:29:39 GMT 2023 - 2.1K bytes - Click Count (0) -
api/maven-api-core/src/main/java/org/apache/maven/api/services/DependencyResolverRequest.java
} @Nonnull @Override public Optional<Project> getProject() { return Optional.ofNullable(project); } @Nonnull @Override public Optional<Artifact> getRootArtifact() { return Optional.ofNullable(rootArtifact); } @Nonnull @OverrideCreated: Sun Dec 28 03:35:09 GMT 2025 - Last Modified: Fri Oct 10 07:30:49 GMT 2025 - 23K bytes - Click Count (0) -
pom.xml
<dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>2.0.16</version> <optional>true</optional> </dependency> <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.3.5</version> <optional>true</optional> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId>
Created: Sat Dec 20 08:55:33 GMT 2025 - Last Modified: Sat Dec 20 04:15:34 GMT 2025 - 4.9K bytes - Click Count (0) -
build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/tasks/ClasspathManifest.kt
properties["runtime"] = runtime.get().joinToString(",") properties["projects"] = projects.get().joinToString(",") optionalProjects.get().takeIf { it.isNotEmpty() }?.let { optional -> properties["optional"] = optional.joinForProperties() } } private fun FileSystemLocation.toGradleModuleName(): String = asFile.name.run { substring(0, lastIndexOf('-')) } private
Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Thu Mar 28 20:26:58 GMT 2024 - 2.4K bytes - Click Count (0) -
build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/rules/MethodsRemovedInInternalSuperClassRuleTest.groovy
} def "method removal can be reported if current class is first public class"() { given: apiClass.oldClass >> Optional.of(classes['OldBase']) apiClass.newClass >> Optional.of(classes['NewBase']) when: Violation violation = rule.maybeViolation(apiClass) then: violation.humanExplanation.contains('SuperInternal.publicMethod()')Created: Wed Dec 31 11:36:14 GMT 2025 - Last Modified: Wed Dec 24 14:15:15 GMT 2025 - 3.2K bytes - Click Count (0) -
tests/test_param_class.py
from typing import Optional from fastapi import FastAPI from fastapi.params import Param from fastapi.testclient import TestClient app = FastAPI() @app.get("/items/") def read_items(q: Optional[str] = Param(default=None)): # type: ignore return {"q": q} client = TestClient(app) def test_default_param_query_none(): response = client.get("/items/") assert response.status_code == 200, response.text
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri May 13 23:38:22 GMT 2022 - 636 bytes - Click Count (0)