openapi: 3.2.0 info: title: Pineapple Competition API description: Pineapple version: 0.0.1 servers: - url: http://127.0.0.1:1234/api security: - OpenID: - openid - email - profile - ApiKeyAuth: [] tags: - name: Competition paths: /competition: get: tags: - Competition summary: list competition parameters: - in: query name: beginning schema: type: string format: date-time required: false - in: query name: end schema: type: string format: date-time required: false responses: 200: description: OK content: application/json: schema: type: array items: $ref: '#/components/schemas/CompetitionInfo' 400: $ref: '#/components/responses/RequestError' 500: $ref: '#/components/responses/ServerError' operationId: getCompetition x-operation-id-source: derived /competition/{competitionID}: parameters: - in: path name: competitionID schema: type: string description: computition id post: tags: - Competition summary: join competition parameters: - in: query name: inviter schema: type: string description: inviter id required: false requestBody: content: application/json: schema: type: object additionalProperties: type: string responses: 200: description: OK 400: $ref: '#/components/responses/RequestError' 500: $ref: '#/components/responses/ServerError' operationId: postCompetitionByCompetitionID x-operation-id-source: derived get: tags: - Competition summary: check joined competition responses: 200: description: OK content: text/plain: schema: type: boolean 400: $ref: '#/components/responses/RequestError' 500: $ref: '#/components/responses/ServerError' operationId: getCompetitionByCompetitionID x-operation-id-source: derived /competition/{competitionID}/invitation: parameters: - in: path name: competitionID schema: type: string description: computition id get: tags: - Competition summary: get invitation number in a competition responses: 200: description: OK content: text/plain: schema: type: integer format: int64 400: $ref: '#/components/responses/RequestError' 500: $ref: '#/components/responses/ServerError' operationId: getCompetitionByCompetitionIDInvitation x-operation-id-source: derived components: schemas: ComputeUnitId: description: compute unit name type: string example: 1c-1g maxLength: 32 CompetitionInfo: type: object properties: name: type: string id: type: string beginning: type: string format: date-time deadline: type: string format: date-time avl: type: boolean participant: type: integer format: int64 computingResource: type: array items: $ref: '#/components/schemas/ComputeUnitSpec' ComputeUnitSpec: description: compute unit spec type: object properties: name: type: string description: compute unit spec example: Free CPU id: $ref: '#/components/schemas/ComputeUnitId' price: type: number format: double description: price example: 15.0 description: type: string responses: ServerError: description: server error content: text/plain: schema: type: string example: Something went wrong. RequestError: description: http request error content: application/json: schema: type: object properties: content: type: object message: type: string type: type: string securitySchemes: OpenID: type: openIdConnect openIdConnectUrl: /.well-known/openid-configuration ApiKeyAuth: type: apiKey in: header name: Authorization