{ "openapi": "3.0.1", "info": { "title": "API", "version": "1.0" }, "paths": { "/api/Meals/{profile}": { "get": { "tags": [ "Meals" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Meal" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Meal" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Meal" } } } } } } }, "post": { "tags": [ "Meals" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MealDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/MealDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/MealDto" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Meal" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Meal" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Meal" } } } } } } }, "/api/Meals/{profile}/{id}": { "delete": { "tags": [ "Meals" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK" } } } }, "/api/Profiles/{profile}": { "get": { "tags": [ "Profiles" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/Profile" } }, "application/json": { "schema": { "$ref": "#/components/schemas/Profile" } }, "text/json": { "schema": { "$ref": "#/components/schemas/Profile" } } } } } } }, "/api/Profiles/{profile}/target": { "post": { "tags": [ "Profiles" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/ProfileDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/ProfileDto" } } } }, "responses": { "200": { "description": "OK" } } } }, "/api/Weights/{profile}": { "get": { "tags": [ "Weights" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WeightEntry" } } }, "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WeightEntry" } } }, "text/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/WeightEntry" } } } } } } }, "post": { "tags": [ "Weights" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WeightEntryDto" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WeightEntryDto" } }, "application/*+json": { "schema": { "$ref": "#/components/schemas/WeightEntryDto" } } } }, "responses": { "200": { "description": "OK", "content": { "text/plain": { "schema": { "$ref": "#/components/schemas/WeightEntry" } }, "application/json": { "schema": { "$ref": "#/components/schemas/WeightEntry" } }, "text/json": { "schema": { "$ref": "#/components/schemas/WeightEntry" } } } } } } }, "/api/Weights/{profile}/{id}": { "delete": { "tags": [ "Weights" ], "parameters": [ { "name": "profile", "in": "path", "required": true, "schema": { "type": "string" } }, { "name": "id", "in": "path", "required": true, "schema": { "type": "string", "format": "uuid" } } ], "responses": { "200": { "description": "OK" } } } } }, "components": { "schemas": { "Meal": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "date": { "type": "string", "format": "date-time" }, "name": { "type": "string", "nullable": true }, "calories": { "type": "integer", "format": "int32" }, "profile": { "type": "string", "nullable": true } }, "additionalProperties": false }, "MealDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "nullable": true }, "date": { "type": "string", "format": "date-time" }, "name": { "type": "string", "nullable": true }, "calories": { "type": "integer", "format": "int32" }, "profile": { "type": "string", "nullable": true } }, "additionalProperties": false }, "Profile": { "type": "object", "properties": { "profileName": { "type": "string", "nullable": true }, "targetCalories": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "ProfileDto": { "type": "object", "properties": { "profileName": { "type": "string", "nullable": true }, "targetCalories": { "type": "integer", "format": "int32" } }, "additionalProperties": false }, "WeightEntry": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "date": { "type": "string", "format": "date-time" }, "weightKg": { "type": "number", "format": "double" }, "profile": { "type": "string", "nullable": true } }, "additionalProperties": false }, "WeightEntryDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "nullable": true }, "date": { "type": "string", "format": "date-time" }, "weightKg": { "type": "number", "format": "double" }, "profile": { "type": "string", "nullable": true } }, "additionalProperties": false } } } }