diff --git a/api/specs/web-server/_common.py b/api/specs/web-server/_common.py index 7c0f3c97d44..505e525c4f4 100644 --- a/api/specs/web-server/_common.py +++ b/api/specs/web-server/_common.py @@ -12,7 +12,7 @@ from common_library.pydantic_fields_extension import get_type from fastapi import FastAPI, Query from models_library.basic_types import LogLevel -from pydantic import BaseModel, ConfigDict, Field, create_model +from pydantic import BaseModel, ConfigDict, Field, Json, create_model from pydantic.fields import FieldInfo from servicelib.fastapi.openapi import override_fastapi_openapi_method @@ -77,7 +77,7 @@ def as_query(model_class: type[BaseModel]) -> type[BaseModel]: "json_schema_extra": field_info.json_schema_extra or {}, } - json_field_type = str + json_field_type = Json # _create_json_type( # description=query_kwargs["description"], # example=query_kwargs.get("json_schema_extra", {}).get("example_json"), diff --git a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml index 3a32e4cb7ba..906c7016ec2 100644 --- a/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml +++ b/services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml @@ -2625,6 +2625,8 @@ paths: schema: anyOf: - type: string + contentMediaType: application/json + contentSchema: {} - type: 'null' title: Filters - name: order_by @@ -2632,6 +2634,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"modified","direction":"desc"}' title: Order By - name: limit @@ -2688,6 +2692,8 @@ paths: schema: anyOf: - type: string + contentMediaType: application/json + contentSchema: {} - type: 'null' title: Filters - name: order_by @@ -2695,6 +2701,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"modified","direction":"desc"}' title: Order By - name: limit @@ -3234,6 +3242,8 @@ paths: schema: anyOf: - type: string + contentMediaType: application/json + contentSchema: {} - type: 'null' title: Filters - name: order_by @@ -3241,6 +3251,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"last_change_date","direction":"desc"}' title: Order By - name: limit @@ -3376,6 +3388,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"last_change_date","direction":"desc"}' title: Order By - name: limit @@ -4382,7 +4396,7 @@ paths: '403': description: ProjectInvalidRightsError '404': - description: UserDefaultWalletNotFoundError, ProjectNotFoundError + description: ProjectNotFoundError, UserDefaultWalletNotFoundError '409': description: ProjectTooManyProjectOpenedError '422': @@ -4605,6 +4619,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"started_at","direction":"desc"}' title: Order By - name: wallet_id @@ -4624,8 +4640,7 @@ paths: anyOf: - type: string contentMediaType: application/json - contentSchema: - type: string + contentSchema: {} - type: 'null' title: Filters - name: limit @@ -4709,6 +4724,8 @@ paths: required: false schema: type: string + contentMediaType: application/json + contentSchema: {} default: '{"field":"started_at","direction":"desc"}' title: Order By - name: wallet_id @@ -4728,8 +4745,7 @@ paths: anyOf: - type: string contentMediaType: application/json - contentSchema: - type: string + contentSchema: {} - type: 'null' title: Filters responses: