mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-29 17:42:12 +08:00
Update forked code to fastapi 0.128.0
This commit is contained in:
@@ -18853,6 +18853,22 @@ export interface components {
|
|||||||
*/
|
*/
|
||||||
oldest_create_time: string;
|
oldest_create_time: string;
|
||||||
};
|
};
|
||||||
|
/** Organization */
|
||||||
|
Organization: {
|
||||||
|
/**
|
||||||
|
* Name
|
||||||
|
* @description Name of the organization responsible for the service
|
||||||
|
* @example My organization
|
||||||
|
*/
|
||||||
|
name: string;
|
||||||
|
/**
|
||||||
|
* Url
|
||||||
|
* Format: uri
|
||||||
|
* @description URL of the website of the organization (RFC 3986 format)
|
||||||
|
* @example https://example.com
|
||||||
|
*/
|
||||||
|
url: string;
|
||||||
|
};
|
||||||
/** OutputReferenceByLabel */
|
/** OutputReferenceByLabel */
|
||||||
OutputReferenceByLabel: {
|
OutputReferenceByLabel: {
|
||||||
/**
|
/**
|
||||||
@@ -21061,7 +21077,7 @@ export interface components {
|
|||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
/** @description Organization providing the service */
|
/** @description Organization providing the service */
|
||||||
organization: components["schemas"]["galaxy__schema__drs__Organization"];
|
organization: components["schemas"]["Organization"];
|
||||||
type: components["schemas"]["ServiceType"];
|
type: components["schemas"]["ServiceType"];
|
||||||
/**
|
/**
|
||||||
* Updatedat
|
* Updatedat
|
||||||
@@ -24883,22 +24899,6 @@ export interface components {
|
|||||||
name?: string | null;
|
name?: string | null;
|
||||||
};
|
};
|
||||||
/** Organization */
|
/** Organization */
|
||||||
galaxy__schema__drs__Organization: {
|
|
||||||
/**
|
|
||||||
* Name
|
|
||||||
* @description Name of the organization responsible for the service
|
|
||||||
* @example My organization
|
|
||||||
*/
|
|
||||||
name: string;
|
|
||||||
/**
|
|
||||||
* Url
|
|
||||||
* Format: uri
|
|
||||||
* @description URL of the website of the organization (RFC 3986 format)
|
|
||||||
* @example https://example.com
|
|
||||||
*/
|
|
||||||
url: string;
|
|
||||||
};
|
|
||||||
/** Organization */
|
|
||||||
galaxy__schema__schema__Organization: {
|
galaxy__schema__schema__Organization: {
|
||||||
/** Address */
|
/** Address */
|
||||||
address?: string | null;
|
address?: string | null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
from .main import get_definitions as get_definitions
|
from .v2 import get_definitions as get_definitions
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
"get_definitions",
|
"get_definitions",
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
import sys
|
|
||||||
from typing import (
|
|
||||||
Any,
|
|
||||||
Union,
|
|
||||||
)
|
|
||||||
|
|
||||||
from fastapi._compat import (
|
|
||||||
may_v1,
|
|
||||||
v2,
|
|
||||||
)
|
|
||||||
from fastapi._compat.model_field import ModelField
|
|
||||||
from fastapi.types import ModelNameMap
|
|
||||||
from typing_extensions import Literal
|
|
||||||
|
|
||||||
from .v2 import (
|
|
||||||
GenerateJsonSchema as GenerateJsonSchema,
|
|
||||||
get_definitions as v2_get_definitions,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
def get_definitions(
|
|
||||||
*,
|
|
||||||
fields: list[ModelField],
|
|
||||||
model_name_map: ModelNameMap,
|
|
||||||
separate_input_output_schemas: bool = True,
|
|
||||||
schema_generator: Union[GenerateJsonSchema, None] = None,
|
|
||||||
) -> tuple[
|
|
||||||
dict[tuple[ModelField, Literal["validation", "serialization"]], may_v1.JsonSchemaValue],
|
|
||||||
dict[str, dict[str, Any]],
|
|
||||||
]:
|
|
||||||
if sys.version_info < (3, 14):
|
|
||||||
v1_fields = [field for field in fields if isinstance(field, may_v1.ModelField)] # type: ignore[unreachable]
|
|
||||||
v1_field_maps, v1_definitions = may_v1.get_definitions(
|
|
||||||
fields=v1_fields, # type: ignore[arg-type]
|
|
||||||
model_name_map=model_name_map,
|
|
||||||
separate_input_output_schemas=separate_input_output_schemas,
|
|
||||||
)
|
|
||||||
v2_fields = [field for field in fields if isinstance(field, v2.ModelField)]
|
|
||||||
v2_field_maps, v2_definitions = v2_get_definitions(
|
|
||||||
fields=v2_fields,
|
|
||||||
model_name_map=model_name_map,
|
|
||||||
separate_input_output_schemas=separate_input_output_schemas,
|
|
||||||
schema_generator=schema_generator,
|
|
||||||
)
|
|
||||||
all_definitions = {**v1_definitions, **v2_definitions}
|
|
||||||
all_field_maps = {**v1_field_maps, **v2_field_maps} # type: ignore[misc]
|
|
||||||
return all_field_maps, all_definitions
|
|
||||||
|
|
||||||
# Pydantic v1 is not supported since Python 3.14
|
|
||||||
else:
|
|
||||||
v2_fields = [field for field in fields if isinstance(field, v2.ModelField)]
|
|
||||||
v2_field_maps, v2_definitions = v2_get_definitions(
|
|
||||||
fields=v2_fields,
|
|
||||||
model_name_map=model_name_map,
|
|
||||||
separate_input_output_schemas=separate_input_output_schemas,
|
|
||||||
schema_generator=schema_generator,
|
|
||||||
)
|
|
||||||
return v2_field_maps, v2_definitions # type: ignore[return-value]
|
|
||||||
Reference in New Issue
Block a user