mirror of
https://github.com/sstent/FitTrack_GarminSync.git
synced 2026-04-04 12:03:37 +00:00
feat: Implement Garmin sync, login improvements, and utility scripts
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"title": "Garmin Authentication API",
|
||||
"version": "1.0.0",
|
||||
"description": "API for authenticating with Garmin Connect and managing credentials."
|
||||
},
|
||||
"paths": {
|
||||
"/login": {
|
||||
"post": {
|
||||
"summary": "Authenticate with Garmin Connect",
|
||||
"description": "Allows a user to provide Garmin Connect credentials to authenticate and store tokens for the FitTrack Garmin Sync service. This endpoint is publicly accessible.",
|
||||
"requestBody": {
|
||||
"required": true,
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": ["username", "password"],
|
||||
"properties": {
|
||||
"username": {
|
||||
"type": "string",
|
||||
"format": "email",
|
||||
"description": "Garmin Connect username (email address)"
|
||||
},
|
||||
"password": {
|
||||
"type": "string",
|
||||
"format": "password",
|
||||
"description": "Garmin Connect password"
|
||||
}
|
||||
},
|
||||
"example": {
|
||||
"username": "user@example.com",
|
||||
"password": "myGarminPassword"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Garmin account linked successfully",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string",
|
||||
"example": "Garmin account linked successfully."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"401": {
|
||||
"description": "Authentication failed",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"detail": {
|
||||
"type": "string",
|
||||
"example": "Invalid Garmin credentials provided."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal server error",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"detail": {
|
||||
"type": "string",
|
||||
"example": "An unexpected error occurred during Garmin authentication."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user