MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / genRequestBody

Function genRequestBody

module/ai-api/schema.go:38–46  ·  view source on GitHub ↗
(variables []*ai_api_dto.AiPromptVariable)

Source from the content-addressed store, hash-verified

36}
37
38func genRequestBody(variables []*ai_api_dto.AiPromptVariable) *openapi3.RequestBodyRef {
39 requestBody := openapi3.NewRequestBody()
40 requestBody.Description = "Request body"
41 requestBody.Required = true
42 requestBody.Content = openapi3.NewContentWithSchema(genRequestBodySchema(variables), []string{"application/json"})
43 return &openapi3.RequestBodyRef{
44 Value: requestBody,
45 }
46}
47
48func genResponse() *openapi3.ResponseRef {
49 response := openapi3.NewResponse()

Callers 1

genOperationFunction · 0.85

Calls 1

genRequestBodySchemaFunction · 0.85

Tested by

no test coverage detected