{
    "openapi": "3.0.0",
    "info": {
        "title": "eCare License API",
        "description": "API for plugin license validation and version management",
        "contact": {
            "name": "Support",
            "email": "support@ecare.com"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "/api",
            "description": "API Server"
        }
    ],
    "paths": {
        "/validate": {
            "post": {
                "tags": [
                    "License"
                ],
                "summary": "Validate license key",
                "description": "Validates a license key for a specific domain and returns license status with update information",
                "operationId": "0170caf9733eb04f6de1638fe2053403",
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "required": [
                                    "license_key",
                                    "domain"
                                ],
                                "properties": {
                                    "license_key": {
                                        "type": "string",
                                        "example": "LIC-XXXXXXXX"
                                    },
                                    "domain": {
                                        "type": "string",
                                        "example": "example.com"
                                    },
                                    "current_version": {
                                        "type": "string",
                                        "example": "1.0.0"
                                    }
                                },
                                "type": "object"
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "License validation result",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "enum": [
                                                "valid",
                                                "expired",
                                                "suspended",
                                                "blocked"
                                            ]
                                        },
                                        "license_type": {
                                            "type": "string"
                                        },
                                        "expiry_date": {
                                            "type": "string"
                                        },
                                        "update_available": {
                                            "type": "boolean"
                                        },
                                        "download_url": {
                                            "type": "string"
                                        },
                                        "signature": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/latest-version": {
            "get": {
                "tags": [
                    "Version"
                ],
                "summary": "Get latest version",
                "description": "Returns information about the latest available plugin version",
                "operationId": "a4d4e35a74b32cc993ead77d57167d1c",
                "responses": {
                    "200": {
                        "description": "Latest version information",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "properties": {
                                        "version": {
                                            "type": "string",
                                            "example": "1.0.0"
                                        },
                                        "changelog": {
                                            "type": "string"
                                        },
                                        "download_url": {
                                            "type": "string"
                                        },
                                        "github_url": {
                                            "type": "string"
                                        },
                                        "release_date": {
                                            "type": "string"
                                        }
                                    },
                                    "type": "object"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "No latest version found"
                    }
                }
            }
        }
    },
    "tags": [
        {
            "name": "License",
            "description": "License validation endpoints"
        },
        {
            "name": "Version",
            "description": "Version check endpoints"
        }
    ]
}