- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for DataClass (0.14 sec)
-
platforms/core-configuration/declarative-dsl-tooling-models/src/main/kotlin/org/gradle/declarative/dsl/schema/DataClass.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.declarative.dsl.schema interface DataClass : DataType { val name: FqName val supertypes: Set<FqName> val properties: List<DataProperty> val memberFunctions: List<SchemaMemberFunction> val constructors: List<DataConstructor>
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 14 10:08:03 UTC 2024 - 884 bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/transformer/impl/XpathTransformer.java
public void setCharsetName(final String charsetName) { this.charsetName = charsetName; } public Class<?> getDataClass() { return dataClass; } public void setDataClass(final Class<?> dataClass) { this.dataClass = dataClass; }
Registered: Wed Jun 12 15:17:51 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 8.8K bytes - Viewed (0) -
docs_src/dataclasses/tutorial001.py
from dataclasses import dataclass from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 312 bytes - Viewed (0) -
docs/en/docs/advanced/dataclasses.md
You can also use `dataclasses` in the `response_model` parameter: ```Python hl_lines="1 7-13 19" {!../../../docs_src/dataclasses/tutorial002.py!} ``` The dataclass will be automatically converted to a Pydantic dataclass. This way, its schema will show up in the API docs user interface: <img src="/img/tutorial/dataclasses/image01.png"> ## Dataclasses in Nested Data Structures
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Thu Apr 18 19:53:19 UTC 2024 - 4.1K bytes - Viewed (0) -
platforms/core-configuration/declarative-dsl-core/src/main/kotlin/org/gradle/internal/declarativedsl/analysis/utils.kt
action() } finally { leaveScope(scope) } } internal fun checkIsAssignable(valueType: DataType, isAssignableTo: DataType): Boolean = when (isAssignableTo) { is DataClass -> valueType is DataClass && (sameType(valueType, isAssignableTo) || isAssignableTo.name in valueType.supertypes) else -> sameType(valueType, isAssignableTo) } /**
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Thu May 30 12:25:47 UTC 2024 - 3K bytes - Viewed (0) -
docs_src/dataclasses/tutorial003.py
from dataclasses import field # (1) from typing import List, Union from fastapi import FastAPI from pydantic.dataclasses import dataclass # (2) @dataclass class Item: name: str description: Union[str, None] = None @dataclass class Author: name: str items: List[Item] = field(default_factory=list) # (3) app = FastAPI()
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 1.4K bytes - Viewed (0) -
docs_src/dataclasses/tutorial002.py
from dataclasses import dataclass, field from typing import List, Union from fastapi import FastAPI @dataclass class Item: name: str price: float tags: List[str] = field(default_factory=list) description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return {
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Sat May 14 11:59:59 UTC 2022 - 552 bytes - Viewed (0) -
platforms/core-configuration/declarative-dsl-tooling-models/src/main/kotlin/org/gradle/declarative/dsl/schema/AnalysisSchema.kt
*/ package org.gradle.declarative.dsl.schema import java.io.Serializable interface AnalysisSchema : Serializable { val topLevelReceiverType: DataClass val dataClassesByFqName: Map<FqName, DataClass> val externalFunctionsByFqName: Map<FqName, DataTopLevelFunction> val externalObjectsByFqName: Map<FqName, ExternalObjectProviderKey> val defaultImports: Set<FqName>
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Tue May 14 10:08:01 UTC 2024 - 1003 bytes - Viewed (0) -
tests/test_validate_response_dataclass.py
from typing import List, Optional import pytest from fastapi import FastAPI from fastapi.exceptions import ResponseValidationError from fastapi.testclient import TestClient from pydantic.dataclasses import dataclass app = FastAPI() @dataclass class Item: name: str price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/invalid", response_model=Item) def get_invalid():
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 1.2K bytes - Viewed (0) -
tests/test_serialize_response_dataclass.py
from dataclasses import dataclass from datetime import datetime from typing import List, Optional from fastapi import FastAPI from fastapi.testclient import TestClient app = FastAPI() @dataclass class Item: name: str date: datetime price: Optional[float] = None owner_ids: Optional[List[int]] = None @app.get("/items/valid", response_model=Item) def get_valid():
Registered: Mon Jun 17 08:32:26 UTC 2024 - Last Modified: Fri Aug 26 13:56:47 UTC 2022 - 4.9K bytes - Viewed (0)