diff --git a/frontend/src/services/api/semanticBrowseSchemas.ts b/frontend/src/services/api/semanticBrowseSchemas.ts index 74fa8e4a..25128184 100644 --- a/frontend/src/services/api/semanticBrowseSchemas.ts +++ b/frontend/src/services/api/semanticBrowseSchemas.ts @@ -23,7 +23,7 @@ export type AuthToken = { }; /** - * @example {"id":1,"username":"takoyaki_lover","name":"Takoyaki Lover","bio":"I love takoyaki!","followersCount":100,"gender":"unknown","profilePicture":"https://images.unsplash.com/photo-1633790450512-98e68a55ef15?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=brunno-tozzo-GAIC2WHxm5A-unsplash.jpg&w=640","diets":["keto"],"recipeCount":10,"bookmarks":[{"id":1,"name":"My Takoyaki Recipe","description":"A delicious takoyaki recipe that I learned from my grandmother.","cookTime":30,"images":["http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg"],"rating":4.5,"dish":{"id":"http://www.wikidata.org/entity/Q905527","name":"takoyaki"}}],"recipes":[{"id":1,"name":"My Takoyaki Recipe","description":"A delicious takoyaki recipe that I learned from my grandmother.","cookTime":30,"images":["http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg"],"rating":4.5,"dish":{"id":"http://www.wikidata.org/entity/Q905527","name":"takoyaki"}}]} + * @example {"id":1,"username":"takoyaki_lover","name":"Takoyaki Lover","bio":"I love takoyaki!","followersCount":100,"gender":"unknown","profilePicture":"https://images.unsplash.com/photo-1633790450512-98e68a55ef15?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=brunno-tozzo-GAIC2WHxm5A-unsplash.jpg&w=640","diets":["keto"],"selfFollowing":true,"recipeCount":10,"bookmarks":[{"id":1,"name":"My Takoyaki Recipe","description":"A delicious takoyaki recipe that I learned from my grandmother.","cookTime":30,"images":["http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg"],"rating":4.5,"dish":{"id":"http://www.wikidata.org/entity/Q905527","name":"takoyaki"}}],"recipes":[{"id":1,"name":"My Takoyaki Recipe","description":"A delicious takoyaki recipe that I learned from my grandmother.","cookTime":30,"images":["http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg"],"rating":4.5,"dish":{"id":"http://www.wikidata.org/entity/Q905527","name":"takoyaki"}}]} */ export type UserProfile = { id?: number; @@ -38,6 +38,7 @@ export type UserProfile = { profilePicture?: string; diets?: string[]; recipeCount?: number; + selfFollowing?: boolean; /** * Only available when querying the current user's profile. */ @@ -46,7 +47,7 @@ export type UserProfile = { }; /** - * @example {"id":1,"username":"takoyaki_lover","name":"Takoyaki Lover","followersCount":100,"profilePicture":"http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg","recipeCount":10,"avgRating":4.5} + * @example {"id":1,"username":"takoyaki_lover","name":"Takoyaki Lover","followersCount":100,"profilePicture":"http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg","recipeCount":10,"avgRating":4.5,"selfFollowing":false} */ export type UserSummary = { id: number; @@ -57,6 +58,7 @@ export type UserSummary = { * @format uri */ profilePicture: string; + selfFollowing?: boolean; recipeCount: number; /** * @format float @@ -111,6 +113,7 @@ export type RecipeSummary = { */ cookTime: number; images: string[]; + selfBookmarked?: boolean; /** * @format float */ @@ -139,6 +142,7 @@ export type RecipeDetails = { allergens: string[]; cuisine?: CuisineSummary; dish: DishSummary; + selfBookmarked?: boolean; /** * @format float */ @@ -187,7 +191,7 @@ export type DishSummary = { export type Comment = { id: number; author: UserSummary; - recipeId?: number; + recipeId: number; upvoteCount: number; content: string; hasSelfUpvoted: boolean; diff --git a/swagger/openapi.yml b/swagger/openapi.yml index 66860ff4..320b899b 100644 --- a/swagger/openapi.yml +++ b/swagger/openapi.yml @@ -1009,6 +1009,8 @@ components: type: string recipeCount: type: integer + selfFollowing: + type: boolean bookmarks: type: array description: Only available when querying the current user's profile. @@ -1027,6 +1029,7 @@ components: gender: unknown profilePicture: "https://images.unsplash.com/photo-1633790450512-98e68a55ef15?ixlib=rb-4.0.3&q=85&fm=jpg&crop=entropy&cs=srgb&dl=brunno-tozzo-GAIC2WHxm5A-unsplash.jpg&w=640" diets: ["keto"] + selfFollowing: true recipeCount: 10 bookmarks: - id: 1 @@ -1072,6 +1075,8 @@ components: profilePicture: type: string format: uri + selfFollowing: + type: boolean recipeCount: type: integer avgRating: @@ -1085,6 +1090,7 @@ components: profilePicture: "http://commons.wikimedia.org/wiki/Special:FilePath/Takoyaki%20by%20yomi955.jpg" recipeCount: 10 avgRating: 4.5 + selfFollowing: false DishDetails: type: object @@ -1183,6 +1189,8 @@ components: items: type: string format: uri + selfBookmarked: + type: boolean avgRating: type: number format: float @@ -1269,6 +1277,8 @@ components: $ref: "#/components/schemas/CuisineSummary" dish: $ref: "#/components/schemas/DishSummary" + selfBookmarked: + type: boolean avgRating: type: number format: float