Skip to content

Commit

Permalink
fix field
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo committed Nov 18, 2024
1 parent f4f7b0e commit a7fe6c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/specs/web-server/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from typing import Any, ClassVar, NamedTuple

import yaml
from common_library.pydantic_fields_extension import get_type
from fastapi import FastAPI
from models_library.basic_types import LogLevel
from pydantic import BaseModel, Field
Expand Down Expand Up @@ -116,8 +117,8 @@ def assert_handler_signature_against_model(

# query and path parameters
implemented_params = [
ParamSpec(field.name, field.type_, field.field_info)
for field in model_cls.__fields__.values()
ParamSpec(name, get_type(info), info)
for name, info in model_cls.model_fields.items()
]

assert {p.name for p in implemented_params}.issubset( # nosec
Expand Down

0 comments on commit a7fe6c0

Please sign in to comment.