mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-02-06 06:21:41 +00:00
feat: Initial commit of FitTrack_GarminSync project
This commit is contained in:
102
specs/002-intialspecv2/contracts/sync_garmin_workouts.json
Normal file
102
specs/002-intialspecv2/contracts/sync_garmin_workouts.json
Normal file
@@ -0,0 +1,102 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "GarminSync Service API - Workout Upload",
|
||||
"version": "1.0.0",
|
||||
"description": "API for uploading workouts to Garmin Connect."
|
||||
},
|
||||
"paths": {
|
||||
"/api/sync/garmin/workouts": {
|
||||
"post": {
|
||||
"summary": "Upload Workout to Garmin Connect",
|
||||
"operationId": "uploadGarminWorkout",
|
||||
"requestBody": {
|
||||
"description": "Workout definition to be uploaded.",
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"workout_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique identifier of the workout within the application."
|
||||
},
|
||||
"workout_name": {
|
||||
"type": "string",
|
||||
"description": "Name of the workout."
|
||||
},
|
||||
"workout_type": {
|
||||
"type": "string",
|
||||
"description": "Type of workout (e.g., 'running', 'cycling')."
|
||||
},
|
||||
"scheduled_date": {
|
||||
"type": "string",
|
||||
"format": "date",
|
||||
"description": "Date the workout is scheduled for (YYYY-MM-DD)."
|
||||
},
|
||||
"workout_data": {
|
||||
"type": "object",
|
||||
"description": "Structured data defining the workout steps and targets. (Schema to be defined based on Garmin Connect workout API)."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"workout_id",
|
||||
"workout_name",
|
||||
"workout_type",
|
||||
"scheduled_date",
|
||||
"workout_data"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"202": {
|
||||
"description": "Workout upload initiated successfully. Returns a SyncJob ID.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"job_id": {
|
||||
"type": "string",
|
||||
"format": "uuid",
|
||||
"description": "Unique identifier for the initiated workout upload job."
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"description": "Current status of the job (e.g., 'pending', 'in_progress')."
|
||||
},
|
||||
"message": {
|
||||
"type": "string",
|
||||
"description": "Confirmation message."
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"job_id",
|
||||
"status",
|
||||
"message"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Invalid workout data provided."
|
||||
},
|
||||
"401": {
|
||||
"description": "Unauthorized. User not authenticated with Garmin Connect."
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error."
|
||||
}
|
||||
},
|
||||
"tags": [
|
||||
"Synchronization"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user