openapi: 3.0.1 info: title: shipit-clicker description: ShipIt Clicker version: 1.0.0 servers: - url: /api/v1 tags: - name: Examples description: Simple example endpoints - name: Specification description: The swagger API specification paths: /examples: get: tags: - Examples description: Fetch all examples responses: 200: description: Return the example with the specified id content: application/json: schema: type: array items: $ref: '#/components/schemas/Example' 4XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' 5XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' post: tags: - Examples description: Create a new example requestBody: description: an example content: application/json: schema: $ref: '#/components/schemas/ExampleBody' required: true responses: 201: description: Return the example with the specified id content: application/json: schema: $ref: '#/components/schemas/Example' 4XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' 5XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' /examples/{id}: get: tags: - Examples parameters: - name: id in: path description: The id of the example to retrieve required: true schema: type: integer responses: 200: description: Return the example with the specified id content: application/json: schema: $ref: '#/components/schemas/Example' 4XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' 5XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' /games/: post: tags: - Game description: Create or update a new game item requestBody: description: The game item to create or update content: application/json: schema: $ref: '#/components/schemas/GameBody' required: true responses: 201: description: Return the newly created game item with the specified id content: application/json: schema: $ref: '#/components/schemas/Game' 5XX: description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' /games/{id}/{element}: get: tags: - Game parameters: - name: id in: path description: The id of the game item to retrieve required: true schema: type: string - name: element in: path description: The element of the game item to retrieve required: true schema: type: string responses: 200: description: Return the game item with the specified id content: application/json: schema: $ref: '#/components/schemas/Game' 4XX: description: Example not found content: application/json: schema: $ref: '#/components/schemas/Error' 5XX: description: Server Error content: application/json: schema: $ref: '#/components/schemas/Error' patch: tags: - Game description: Increment a game item by a certain amount requestBody: description: The amonunt of the game item to increment content: application/json: schema: $ref: '#/components/schemas/GameBody' required: true responses: 200: description: The increment has been accepted content: application/json: schema: $ref: '#/components/schemas/Game' 5XX: description: Server error content: application/json: schema: $ref: '#/components/schemas/Error' /spec: get: tags: - Specification responses: 200: description: Return the API specification content: {} components: schemas: Game: type: object properties: id: type: string example: sample-game element: type: string example: score value: type: integer example: 3 GameBody: title: Game Body required: - id - element - value type: object properties: id: type: string example: sample-game element: type: string example: score value: type: integer example: 3 Example: type: object properties: id: type: integer example: 3 name: type: string example: example 3 Error: type: object additionalProperties: true ExampleBody: title: example required: - name type: object properties: name: type: string example: no_stress