--- openapi: 3.1.0 tags: - name: Game Management - name: Inventory Management - name: Shop Management - name: Shop Operations - name: Shop Upgrades components: schemas: ItemRequest: type: object properties: quantity: type: number format: float type: $ref: "#/components/schemas/ResourceType" ItemResponse: type: object properties: id: type: integer format: int32 quantity: type: number format: float type: $ref: "#/components/schemas/ResourceType" ItemsRequest: type: object properties: itemsRequest: type: array items: $ref: "#/components/schemas/ItemRequest" ItemsResponse: type: object properties: itemsResponse: type: array items: $ref: "#/components/schemas/ItemResponse" ResourceType: type: string enum: - MONEY - GROUND - WATER - ROCK - WOOD ShopPriceResponse: type: object properties: shopPrice: type: number format: float ShopResponse: type: object properties: id: type: integer format: int32 priceMultiplier: type: number format: float upgradePrice: type: number format: float ShopsResponse: type: object properties: shops: type: array items: $ref: "#/components/schemas/ShopResponse" paths: /: get: summary: Get all shops. description: Retrieves all available shops. x-quarkus-openapi-method-ref: m869844210_-222983088 tags: - Shop Management responses: "200": description: The shops were successfully retrieved. content: application/json: schema: $ref: "#/components/schemas/ShopsResponse" "400": description: The game is not running. servers: - url: http://localhost:8082/ post: summary: Create a new shop. description: Creates a new shop. x-quarkus-openapi-method-ref: m869844210_1764851887 tags: - Shop Management responses: "204": description: The shop creation request was successfully sent. "400": description: "The game has reached its max capacity, you do not have enough\ \ money, or the game is not running." "404": description: No money item found. servers: - url: http://localhost:8082/ /price: get: summary: Get the current shop price. description: Retrieves the current shop price. x-quarkus-openapi-method-ref: m869844210_-271831484 tags: - Shop Management responses: "200": description: The shop price was successfully retrieved. content: application/json: schema: $ref: "#/components/schemas/ShopPriceResponse" "400": description: The game is not running. servers: - url: http://localhost:8082/ /resources: get: summary: Retrieve available resources in inventory. description: Fetch all resources currently available in the inventory. x-quarkus-openapi-method-ref: m911209932_-1184004262 tags: - Inventory Management responses: "200": description: The resources were successfully retrieved. content: application/json: schema: $ref: "#/components/schemas/ItemsResponse" "400": description: The game is not running or the request is invalid. servers: - url: http://localhost:8082/ /sell/{id}: patch: summary: Sell items to a client. description: Processes the sale of items to a client. x-quarkus-openapi-method-ref: m869844210_-1356306674 tags: - Shop Operations parameters: - name: id in: path required: true schema: type: integer format: int32 requestBody: content: application/json: schema: $ref: "#/components/schemas/ItemsRequest" required: true responses: "204": description: The sell request was successfully sent. "400": description: "You do not have enough resources, an item is not sellable,\ \ an amount is invalid, or the game is not running." "404": description: The shop or an item was not found. servers: - url: http://localhost:8082/ /start: post: summary: Start the game. description: Starts the game by sending a Kafka command. x-quarkus-openapi-method-ref: m869844210_1873672464 tags: - Game Management responses: "204": description: The game started successfully. servers: - url: http://localhost:8082/ /upgrade/price/{id}: patch: summary: Upgrade the resource price for a specific shop. description: Increases the resource price for a specific shop. x-quarkus-openapi-method-ref: m869844210_-999917025 tags: - Shop Upgrades parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "204": description: The price upgrade request was successfully sent. "400": description: You do not have enough money or the game is not running. "404": description: The shop was not found or the money was not found. servers: - url: http://localhost:8082/ /{id}: get: summary: Get a specific shop. description: Retrieves details of a specific shop. x-quarkus-openapi-method-ref: m869844210_868322035 tags: - Shop Management parameters: - name: id in: path required: true schema: type: integer format: int32 responses: "200": description: The shop was successfully retrieved. content: application/json: schema: $ref: "#/components/schemas/ShopResponse" "400": description: The game is not running or the ID is not valid. "404": description: The shop was not found. servers: - url: http://localhost:8082/ info: title: shop API version: 1.0.0