openapi: 3.0.0 info: title: Acorn Hunt Control Plane API description: | Control plane operations for Acorn Hunt version: 1.0.0 x-amazon-apigateway-request-validators: Validate All: validateRequestParameters: true validateRequestBody: true x-amazon-apigateway-gateway-responses: BAD_REQUEST_BODY: statusCode: 400 responseTemplates: application/json: '{ "message": "$context.error.validationErrorString" }' paths: /authenticate: post: summary: Gets an auth token requestBody: required: true content: application/json: schema: type: object required: - username properties: username: type: string description: User name to display minLength: 3 maxLength: 20 responses: 200: description: Generated auth token content: application/json: schema: $ref: '#/components/schemas/auth' 400: $ref: '#/components/responses/BadRequest' 500: $ref: '#/components/responses/UnknownError' x-amazon-apigateway-request-validator: Validate All x-amazon-apigateway-integration: uri: Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${CreateWebSocketJwt.Arn}/invocations httpMethod: POST type: aws_proxy /userinfo: get: summary: Gets the information about the logged in user responses: 200: content: application/json: schema: $ref: '#components/schemas/user' x-amazon-apigateway-request-validator: Validate All x-amazon-apigateway-integration: uri: Fn::Sub: arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${UserInfoFunction.Arn}/invocations httpMethod: POST type: aws_proxy components: schemas: auth: description: Generated auth token type: object required: - authToken properties: authToken: type: string expiresIn: type: integer user: description: User information type: object required: - firstName properties: firstName: type: string lastName: type: string level: type: integer responses: BadRequest: description: Invalid input was provided content: application/json: schema: type: object required: - message properties: message: type: string example: Invalid input was provided UnknownError: description: An unexpected error occurred on the server. content: application/json: schema: type: object required: - message properties: message: type: string description: Unknown error message example: An unexpected error occurred.