{"openapi":"3.0.0","info":{"title":"Academy Management API","description":"API for managing academies","version":"1.0.0"},"paths":{"/academies":{"get":{"operationId":"getAllAcademies","summary":"Retrieve all academies","responses":{"200":{"description":"A list of academies","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Academy"}}}}}}},"post":{"operationId":"createAcademy","summary":"Create a new academy","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcademyCreate"}}}},"responses":{"201":{"description":"Academy created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Academy"}}}}}}},"/academies/{id}":{"get":{"operationId":"getAcademyById","summary":"Retrieve a single academy by ID","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"A single academy","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Academy"}}}}}},"put":{"operationId":"updateAcademy","summary":"Update an existing academy","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AcademyUpdate"}}}},"responses":{"200":{"description":"Academy updated successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Academy"}}}}}},"delete":{"operationId":"deleteAcademy","summary":"Delete an academy","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"Academy deleted successfully"}}}}},"components":{"schemas":{"Academy":{"type":"object","description":"An academy entity","properties":{"id":{"type":"string","description":"Unique identifier for the academy"},"academyName":{"type":"string"},"ownerName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"address":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"sportType":{"type":"string"},"plan":{"type":"string","description":"Plan type (TRIAL, STANDARD, PREMIUM)","enum":["TRIAL","STANDARD","PREMIUM"]},"tenantId":{"type":"string","nullable":true},"status":{"type":"string","description":"Academy status","enum":["PENDING","APPROVED","REJECTED"]},"createdBy":{"type":"string","nullable":true,"description":"Super Admin ID or \"SELF\""},"approvedBy":{"type":"string","nullable":true,"description":"Super Admin ID who approved"},"approvedAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"AcademyCreate":{"type":"object","required":["academyName","ownerName","email","phone","city","sportType","plan"],"properties":{"academyName":{"type":"string"},"ownerName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"address":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"sportType":{"type":"string"},"plan":{"type":"string","enum":["TRIAL","STANDARD","PREMIUM"]},"tenantId":{"type":"string","nullable":true},"createdBy":{"type":"string","nullable":true}}},"AcademyUpdate":{"type":"object","properties":{"academyName":{"type":"string"},"ownerName":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"address":{"type":"string","nullable":true},"city":{"type":"string"},"state":{"type":"string","nullable":true},"country":{"type":"string","nullable":true},"sportType":{"type":"string"},"plan":{"type":"string","enum":["TRIAL","STANDARD","PREMIUM"]},"tenantId":{"type":"string","nullable":true},"status":{"type":"string","enum":["PENDING","APPROVED","REJECTED"]},"createdBy":{"type":"string","nullable":true},"approvedBy":{"type":"string","nullable":true},"approvedAt":{"type":"string","format":"date-time","nullable":true}}}}}}