some typo fixes in the new API
This commit is contained in:
parent
715d6c2f11
commit
62f53d7847
4 changed files with 7 additions and 10 deletions
|
@ -53,4 +53,3 @@ GeometrySchema = Annotated[
|
|||
PointSchema,],
|
||||
Discriminator("type"),
|
||||
]
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import json
|
||||
from typing import Annotated, Union
|
||||
|
||||
from django.core.cache import cache
|
||||
from django.core.serializers.json import DjangoJSONEncoder
|
||||
|
@ -9,7 +8,6 @@ from ninja import Query
|
|||
from ninja import Router as APIRouter
|
||||
from ninja import Schema
|
||||
from pydantic import Field as APIField
|
||||
from pydantic import PositiveInt
|
||||
|
||||
from c3nav.api.exceptions import API404
|
||||
from c3nav.api.newauth import auth_responses, validate_responses
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
from typing import Annotated, Any, ClassVar, Optional, Union
|
||||
from typing import Annotated, Any, Optional, Union
|
||||
|
||||
from ninja import Schema
|
||||
from pydantic import Field as APIField
|
||||
|
|
|
@ -606,13 +606,13 @@ class LocationDisplay(SerializableSchema):
|
|||
)
|
||||
display: list[
|
||||
tuple[
|
||||
Annotated[NonEmptyStr, APIField(name="field title")],
|
||||
Annotated[NonEmptyStr, APIField(title="field title")],
|
||||
Annotated[Union[
|
||||
Annotated[str, APIField(name="a simple string value")],
|
||||
Annotated[DisplayLink, APIField(namen="a link value")],
|
||||
Annotated[list[DisplayLink], APIField(name="a list of link values")],
|
||||
Annotated[Literal[None], APIField(name="no value")]
|
||||
], APIField(name="field value", union_mode='left_to_right')]
|
||||
Annotated[str, APIField(title="a simple string value")],
|
||||
Annotated[DisplayLink, APIField(title="a link value")],
|
||||
Annotated[list[DisplayLink], APIField(title="a list of link values")],
|
||||
Annotated[Literal[None], APIField(title="no value")]
|
||||
], APIField(title="field value", union_mode='left_to_right')]
|
||||
]
|
||||
] = APIField(description="a list of human-readable display values")
|
||||
geometry: Optional[GeometrySchema] = APIField(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue