Skip to content

Commit

Permalink
hide endpoint from openapi.json @pcrespov @matusdrobuliak66
Browse files Browse the repository at this point in the history
  • Loading branch information
bisgaard-itis committed Dec 12, 2024
1 parent 87f5b57 commit 30eb799
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 222 deletions.
220 changes: 0 additions & 220 deletions services/api-server/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 30eb799

Please sign in to comment.