{"openapi":"3.0.0","info":{"title":"AAA API","description":"API for handling various requests including chat, OpenAPI field descriptions, and test case generation.","version":"1.0.0"},"paths":{"/chat":{"post":{"summary":"Get chat response","description":"This endpoint processes a chat request and returns a response from the OpenAI model.","operationId":"getChatResponse","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The input message for the chat.","example":"Hello, how are you?"},"systemPrompt":{"type":"string","description":"The system prompt to guide the chat model.","example":"You are a helpful assistant."},"model":{"type":"string","description":"The OpenAI model to use.","example":"gpt-3.5-turbo"},"temperature":{"type":"number","description":"The temperature setting for the model, between 0 and 1.","example":0.7}},"required":["message","systemPrompt","temperature"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"completion":{"type":"string","description":"The response from the chat model.","example":"I'm doing well, thank you!"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Missing or invalid input message"},"code":{"type":"integer","description":"Error code","example":400}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Internal server error"},"code":{"type":"integer","description":"Error code","example":500}}}}}}}}},"/oas/spec/generation":{"post":{"summary":"Generate OpenAPI specification","description":"This endpoint processes a request to generate an OpenAPI specification based on a description.","operationId":"generateOpenAPISpec","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"description":{"type":"string","description":"The description of the API to generate the OpenAPI spec for.","example":"This API allows users to manage their tasks."}},"required":["description"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"specification":{"type":"string","description":"The generated OpenAPI specification.","example":"openapi: 3.0.0\ninfo:\n  title: Task Management API\n  version: 1.0.0\npaths:\n  /tasks:\n    get:\n      summary: Get all tasks\n      responses:\n        '200':\n          description: Successful response\n"}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Missing or invalid API description"},"code":{"type":"integer","description":"Error code","example":400}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Internal server error"},"code":{"type":"integer","description":"Error code","example":500}}}}}}}}},"/oas/field/description":{"post":{"summary":"Get field descriptions from OpenAPI spec","description":"This endpoint processes a request to describe fields from an OpenAPI spec fragment.","operationId":"getFieldDescriptions","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spec_fragment":{"type":"string","description":"The OpenAPI spec fragment.","example":"openapi: 3.0.0\ninfo:\n  title: Sample API\n  version: 1.0.0\npaths:\n  /sample:\n    get:\n      summary: Sample endpoint\n      responses:\n        '200':\n          description: Successful response\n"},"fields":{"type":"array","items":{"type":"string"},"description":"List of fields to describe.","example":["paths./sample.get.summary","info.title"]},"context":{"type":"string","description":"Optional context for the description.","example":"Provide detailed descriptions for the fields."}},"required":["spec_fragment","fields"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"descriptions":{"type":"object","additionalProperties":{"type":"string"},"description":"A map of field names to their descriptions.","example":{"paths./sample.get.summary":"This is a summary of the sample endpoint.","info.title":"The title of the API."}}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Missing or invalid OpenAPI spec"},"code":{"type":"integer","description":"Error code","example":400}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Internal server error"},"code":{"type":"integer","description":"Error code","example":500}}}}}}}}},"/tcm/test/generation":{"post":{"summary":"Generate test cases","description":"This endpoint processes a request to generate test cases based on a provided story and other optional parameters.","operationId":"generateTestCases","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the test case.","example":"User Login Test"},"story":{"type":"string","description":"The story or scenario for the test case.","example":"As a user, I want to log in to the application so that I can access my account."},"related_tests":{"type":"array","items":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"instruction":{"type":"string","description":"The instruction for the test step."},"data":{"type":"string","description":"The data for the test step."},"expectedResult":{"type":"string","description":"The expected result for the test step."}}}},"name":{"type":"string","description":"The name of the related test."},"story":{"type":"string","description":"The story of the related test."}}},"description":"List of related tests.","example":[{"name":"Related Test 1","story":"As a user, I want to reset my password.","steps":[{"instruction":"Navigate to the reset password page.","data":"URL: /reset-password","expectedResult":"Reset password page is displayed."}]}]},"defined_terms":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the defined term."},"description":{"type":"string","description":"The description of the defined term."}}},"description":"List of defined terms.","example":[{"name":"User","description":"An individual who uses the application."}]},"verbosity":{"type":"number","description":"The verbosity level for the generated test cases.","example":2}},"required":["name","story"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"instruction":{"type":"string","description":"The instruction for the test step."},"data":{"type":"string","description":"The data for the test step."},"expectedResult":{"type":"string","description":"The expected result for the test step."}}},"description":"List of generated test case steps.","example":[{"instruction":"Navigate to the login page.","data":"URL: /login","expectedResult":"Login page is displayed."}]}}}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Missing test name."},"code":{"type":"integer","description":"Error code","example":400}}}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error message","example":"Internal server error"},"code":{"type":"integer","description":"Error code","example":500}}}}}}}}}},"components":{"schemas":{"ChatRequest":{"type":"object","properties":{"message":{"type":"string","description":"The input message for the chat."},"systemPrompt":{"type":"string","description":"The system prompt to guide the chat model."},"model":{"type":"string","description":"The OpenAI model to use."},"temperature":{"type":"number","description":"The temperature setting for the model, between 0 and 1."}},"required":["message","systemPrompt","temperature"]},"FieldDescriptionRequestBody":{"type":"object","properties":{"spec_fragment":{"type":"string","description":"The OpenAPI spec fragment."},"fields":{"type":"array","items":{"type":"string"},"description":"List of fields to describe."},"context":{"type":"string","description":"Optional context for the description."}},"required":["spec_fragment","fields"]},"FieldDescriptionResponse":{"type":"object","properties":{"descriptions":{"type":"object","additionalProperties":{"type":"string"},"description":"A map of field names to their descriptions."}}},"SpecGenerationRequestBody":{"type":"object","properties":{"description":{"type":"string","description":"The description of the API to generate the OpenAPI spec for."}},"required":["description"]},"SpecGenerationResponse":{"type":"object","properties":{"specification":{"type":"string","description":"The generated OpenAPI specification."}}},"TestGenerationRequestBody":{"type":"object","properties":{"name":{"type":"string","description":"The name of the test case."},"story":{"type":"string","description":"The story or scenario for the test case."},"related_tests":{"type":"array","items":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"instruction":{"type":"string","description":"The instruction for the test step."},"data":{"type":"string","description":"The data for the test step."},"expectedResult":{"type":"string","description":"The expected result for the test step."}}}},"name":{"type":"string","description":"The name of the related test."},"story":{"type":"string","description":"The story of the related test."}}}},"defined_terms":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the defined term."},"description":{"type":"string","description":"The description of the defined term."}}}},"verbosity":{"type":"number","description":"The verbosity level for the generated test cases."}},"required":["name","story"]},"TestGenerationResponse":{"type":"object","properties":{"steps":{"type":"array","items":{"type":"object","properties":{"instruction":{"type":"string","description":"The instruction for the test step."},"data":{"type":"string","description":"The data for the test step."},"expectedResult":{"type":"string","description":"The expected result for the test step."}}}}}},"ErrorResponse":{"type":"object","properties":{"message":{"type":"string","description":"Error message"},"code":{"type":"integer","description":"Error code"}}}}}}