diff --git a/services/api-server/openapi.json b/services/api-server/openapi.json index 3faeaa58e7f..d70ef50e6bc 100644 --- a/services/api-server/openapi.json +++ b/services/api-server/openapi.json @@ -5348,118 +5348,6 @@ } ] } - }, - "/v0/licensed-items/page": { - "get": { - "tags": [ - "licensed-items" - ], - "summary": "Get Licensed Items", - "description": "Get all licensed items", - "operationId": "get_licensed_items", - "security": [ - { - "HTTPBasic": [] - } - ], - "parameters": [ - { - "name": "limit", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "maximum": 100, - "minimum": 1, - "default": 50, - "title": "Limit" - } - }, - { - "name": "offset", - "in": "query", - "required": false, - "schema": { - "type": "integer", - "minimum": 0, - "default": 0, - "title": "Offset" - } - } - ], - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Page_LicensedItemGet_" - } - } - } - }, - "429": { - "description": "Too many requests", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorGet" - } - } - } - }, - "500": { - "description": "Internal server error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorGet" - } - } - } - }, - "502": { - "description": "Unexpected error when communicating with backend service", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorGet" - } - } - } - }, - "503": { - "description": "Service unavailable", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorGet" - } - } - } - }, - "504": { - "description": "Request to a backend service timed out.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ErrorGet" - } - } - } - }, - "422": { - "description": "Validation Error", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/HTTPValidationError" - } - } - } - } - } - } } }, "components": { @@ -6198,55 +6086,6 @@ "submitted_at": "2021-04-01 07:15:54.631007" } }, - "LicensedItemGet": { - "properties": { - "licensed_item_id": { - "type": "string", - "format": "uuid", - "title": "Licensed Item Id" - }, - "name": { - "type": "string", - "title": "Name" - }, - "licensed_resource_type": { - "$ref": "#/components/schemas/LicensedResourceType" - }, - "pricing_plan_id": { - "type": "integer", - "exclusiveMinimum": true, - "title": "Pricing Plan Id", - "minimum": 0 - }, - "created_at": { - "type": "string", - "format": "date-time", - "title": "Created At" - }, - "modified_at": { - "type": "string", - "format": "date-time", - "title": "Modified At" - } - }, - "type": "object", - "required": [ - "licensed_item_id", - "name", - "licensed_resource_type", - "pricing_plan_id", - "created_at", - "modified_at" - ], - "title": "LicensedItemGet" - }, - "LicensedResourceType": { - "type": "string", - "enum": [ - "VIP_MODEL" - ], - "title": "LicensedResourceType" - }, "Links": { "properties": { "first": { @@ -6570,65 +6409,6 @@ ], "title": "Page[Job]" }, - "Page_LicensedItemGet_": { - "properties": { - "items": { - "items": { - "$ref": "#/components/schemas/LicensedItemGet" - }, - "type": "array", - "title": "Items" - }, - "total": { - "anyOf": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Total" - }, - "limit": { - "anyOf": [ - { - "type": "integer", - "minimum": 1 - }, - { - "type": "null" - } - ], - "title": "Limit" - }, - "offset": { - "anyOf": [ - { - "type": "integer", - "minimum": 0 - }, - { - "type": "null" - } - ], - "title": "Offset" - }, - "links": { - "$ref": "#/components/schemas/Links" - } - }, - "type": "object", - "required": [ - "items", - "total", - "limit", - "offset", - "links" - ], - "title": "Page[LicensedItemGet]" - }, "Page_Study_": { "properties": { "items": { diff --git a/services/api-server/src/simcore_service_api_server/api/routes/licensed_items.py b/services/api-server/src/simcore_service_api_server/api/routes/licensed_items.py index 4bfe4e8e44d..3384f7ac243 100644 --- a/services/api-server/src/simcore_service_api_server/api/routes/licensed_items.py +++ b/services/api-server/src/simcore_service_api_server/api/routes/licensed_items.py @@ -22,6 +22,7 @@ status_code=status.HTTP_200_OK, responses=_LICENSE_ITEMS_STATUS_CODES, description="Get all licensed items", + include_in_schema=False, ) async def get_licensed_items( page_params: Annotated[PaginationParams, Depends()], diff --git a/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py b/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py index 64938f9fceb..e5a04e198c5 100644 --- a/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py +++ b/services/api-server/src/simcore_service_api_server/models/schemas/model_adapter.py @@ -129,7 +129,7 @@ class ServicePricingPlanGetLegacy(BaseModel): class LicensedItemGet(BaseModel): licensed_item_id: LicensedItemID - display_name: str + name: Annotated[str, Field(alias="display_name")] licensed_resource_type: LicensedResourceType pricing_plan_id: PricingPlanId created_at: datetime diff --git a/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py b/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py index 39cd216529c..b26535f6762 100644 --- a/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py +++ b/services/api-server/src/simcore_service_api_server/services_rpc/wb_api_server.py @@ -33,7 +33,7 @@ async def get_licensed_items( [ LicensedItemGet( licensed_item_id=elm.licensed_item_id, - display_name=elm.name, + name=elm.name, licensed_resource_type=elm.licensed_resource_type, pricing_plan_id=elm.pricing_plan_id, created_at=elm.created_at,