@@ -26,6 +26,7 @@ class LicensedItemRpcGet(BaseModel):
2626 pricing_plan_id : PricingPlanId
2727 created_at : datetime
2828 modified_at : datetime
29+
2930 model_config = ConfigDict (
3031 json_schema_extra = {
3132 "examples" : [
@@ -76,21 +77,33 @@ class LicensedItemRestGet(OutputSchema):
7677 created_at : datetime
7778 modified_at : datetime
7879
79- model_config = ConfigDict (
80- json_schema_extra = {
81- "examples" : [
82- {
83- "licensed_item_id" : "0362b88b-91f8-4b41-867c-35544ad1f7a1" ,
84- "display_name" : "best-model" ,
85- "licensed_resource_type" : f"{ LicensedResourceType .VIP_MODEL } " ,
86- "licensed_resource_data" : cast (JsonDict , VIP_DETAILS_EXAMPLE ),
87- "pricing_plan_id" : "15" ,
88- "created_at" : "2024-12-12 09:59:26.422140" ,
89- "modified_at" : "2024-12-12 09:59:26.422140" ,
90- }
91- ]
92- }
93- )
80+ @staticmethod
81+ def _update_json_schema_extra (schema : JsonDict ) -> None :
82+ schema .update (
83+ {
84+ "examples" : [
85+ {
86+ "licensedItemId" : "0362b88b-91f8-4b41-867c-35544ad1f7a1" ,
87+ "displayName" : "my best model" ,
88+ "licensedResourceName" : "best-model" ,
89+ "licensedResourceType" : f"{ LicensedResourceType .VIP_MODEL } " ,
90+ "licensedResourceData" : cast (
91+ JsonDict ,
92+ {
93+ "categoryId" : "HumanWholeBody" ,
94+ "categoryDisplay" : "Humans" ,
95+ "source" : VIP_DETAILS_EXAMPLE ,
96+ },
97+ ),
98+ "pricingPlanId" : "15" ,
99+ "createdAt" : "2024-12-12 09:59:26.422140" ,
100+ "modifiedAt" : "2024-12-12 09:59:26.422140" ,
101+ }
102+ ]
103+ }
104+ )
105+
106+ model_config = ConfigDict (json_schema_extra = _update_json_schema_extra )
94107
95108 @classmethod
96109 def from_domain_model (cls , item : LicensedItem ) -> Self :
0 commit comments