You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: samples/server/petstore/python-fastapi/src/openapi_server/apis/pet_api.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@
50
50
response_model_by_alias=True,
51
51
)
52
52
asyncdefupdate_pet(
53
-
pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")] =Body(None, description="Pet object that needs to be added to the store"),
53
+
pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")] =Body(..., description="Pet object that needs to be added to the store"),
pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")] =Body(None, description="Pet object that needs to be added to the store"),
75
+
pet: Annotated[Pet, Field(description="Pet object that needs to be added to the store")] =Body(..., description="Pet object that needs to be added to the store"),
status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")] =Query(None, description="Status values that need to be considered for filter", alias="status"),
97
+
status: Annotated[List[StrictStr], Field(description="Status values that need to be considered for filter")] =Query(..., description="Status values that need to be considered for filter", alias="status"),
username: Annotated[str, Field(strict=True, description="The user name for login")] =Query(None, description="The user name for login", alias="username", regex=r"^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$"),
114
-
password: Annotated[StrictStr, Field(description="The password for login in clear text")] =Query(None, description="The password for login in clear text", alias="password"),
113
+
username: Annotated[str, Field(strict=True, description="The user name for login")] =Query(..., description="The user name for login", alias="username", regex=r"^[a-zA-Z0-9]+[a-zA-Z0-9\.\-_]*[a-zA-Z0-9]+$"),
114
+
password: Annotated[StrictStr, Field(description="The password for login in clear text")] =Query(..., description="The password for login in clear text", alias="password"),
115
115
) ->str:
116
116
""""""
117
117
ifnotBaseUserApi.subclasses:
@@ -171,7 +171,7 @@ async def get_user_by_name(
171
171
)
172
172
asyncdefupdate_user(
173
173
username: Annotated[StrictStr, Field(description="name that need to be deleted")] =Path(..., description="name that need to be deleted"),
174
-
user: Annotated[User, Field(description="Updated user object")] =Body(None, description="Updated user object"),
174
+
user: Annotated[User, Field(description="Updated user object")] =Body(..., description="Updated user object"),
0 commit comments