openapi: 3.0.3 info: title: API Shadow Fixture (Spring) description: > Static OpenAPI specification for the api-shadow-fixture-spring test project. This document intentionally describes ONLY the documented part of the API. The application also exposes additional REST endpoints that are deliberately absent from this specification (see README.md). Do not synchronize this file with the controllers — the mismatch is the purpose of the fixture. version: 1.0.0 servers: - url: http://localhost:8080 description: Local instance tags: - name: users - name: orders - name: products - name: catalog - name: cart - name: payments - name: shipping - name: health paths: /api/v1/users: get: tags: - users summary: List users operationId: listUsers responses: '200': description: List of users content: application/json: schema: type: array items: $ref: '#/components/schemas/User' example: - id: 1 name: John Doe email: john@example.com post: tags: - users summary: Create user operationId: createUser requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UserRequest' example: name: Jane Roe email: jane@example.com responses: '200': description: Created user content: application/json: schema: $ref: '#/components/schemas/User' example: id: 3 name: Jane Roe email: jane@example.com /api/v1/users/current: get: tags: - users summary: Current user operationId: currentUser responses: '200': description: Current user content: application/json: schema: $ref: '#/components/schemas/User' example: id: 1 name: John Doe email: john@example.com /api/v1/orders: get: tags: - orders summary: List orders operationId: listOrders responses: '200': description: List of orders content: application/json: schema: type: array items: $ref: '#/components/schemas/Order' example: - id: 500 status: CREATED total: 12990 post: tags: - orders summary: Create order operationId: createOrder requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/OrderRequest' example: productId: 100 quantity: 2 responses: '200': description: Created order content: application/json: schema: $ref: '#/components/schemas/Order' example: id: 502 status: CREATED total: 3980 /api/v1/orders/recent: get: tags: - orders summary: Recent orders operationId: recentOrders responses: '200': description: Recent orders content: application/json: schema: type: array items: $ref: '#/components/schemas/Order' example: - id: 501 status: PAID total: 4380 /api/v1/products: get: tags: - products summary: List products operationId: listProducts responses: '200': description: List of products content: application/json: schema: type: array items: $ref: '#/components/schemas/Product' example: - id: 100 sku: SKU-10001 title: Wireless headphones price: 12990 post: tags: - products summary: Create product operationId: createProduct requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProductRequest' example: sku: SKU-10003 title: Coffee grinder price: 5400 responses: '200': description: Created product content: application/json: schema: $ref: '#/components/schemas/Product' example: id: 102 sku: SKU-10003 title: Coffee grinder price: 5400 /api/v1/products/featured: get: tags: - products summary: Featured products operationId: featuredProducts responses: '200': description: Featured products content: application/json: schema: type: array items: $ref: '#/components/schemas/Product' example: - id: 100 sku: SKU-10001 title: Wireless headphones price: 12990 /api/v1/catalog/categories: get: tags: - catalog summary: List catalog categories operationId: listCategories responses: '200': description: List of categories content: application/json: schema: type: array items: $ref: '#/components/schemas/Category' example: - code: ELECTRONICS title: Electronics /api/v1/cart: get: tags: - cart summary: Get cart operationId: getCart responses: '200': description: Cart content: application/json: schema: $ref: '#/components/schemas/Cart' example: id: cart-1 skus: - SKU-10001 subtotal: 12990 /api/v1/cart/items: post: tags: - cart summary: Add item to cart operationId: addCartItem requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CartItemRequest' example: sku: SKU-10002 quantity: 1 responses: '200': description: Cart with the item added content: application/json: schema: $ref: '#/components/schemas/Cart' example: id: cart-1 skus: - SKU-10001 - SKU-10002 subtotal: 14980 /api/v1/payments: get: tags: - payments summary: List payments operationId: listPayments responses: '200': description: List of payments content: application/json: schema: type: array items: $ref: '#/components/schemas/Payment' example: - id: 900 orderId: 500 status: CAPTURED post: tags: - payments summary: Authorize payment operationId: authorizePayment requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PaymentRequest' example: orderId: 500 amount: 12990 responses: '200': description: Authorized payment content: application/json: schema: $ref: '#/components/schemas/Payment' example: id: 901 orderId: 500 status: AUTHORIZED /api/v1/shipping/methods: get: tags: - shipping summary: List shipping methods operationId: listShippingMethods responses: '200': description: List of shipping methods content: application/json: schema: type: array items: $ref: '#/components/schemas/ShippingMethod' example: - code: COURIER title: Courier delivery price: 490 /api/v1/health: get: tags: - health summary: Service health operationId: health responses: '200': description: Health status content: application/json: schema: $ref: '#/components/schemas/Health' example: status: UP version: 1.0.0 components: schemas: User: type: object required: - id - name properties: id: type: integer format: int64 example: 1 name: type: string example: John Doe email: type: string example: john@example.com UserRequest: type: object required: - name - email properties: name: type: string example: Jane Roe email: type: string example: jane@example.com Order: type: object required: - id - status properties: id: type: integer format: int64 example: 500 status: type: string example: CREATED total: type: integer format: int64 example: 12990 OrderRequest: type: object required: - productId - quantity properties: productId: type: integer format: int64 example: 100 quantity: type: integer format: int32 example: 2 Product: type: object required: - id - sku - title properties: id: type: integer format: int64 example: 100 sku: type: string example: SKU-10001 title: type: string example: Wireless headphones price: type: integer format: int64 example: 12990 ProductRequest: type: object required: - sku - title - price properties: sku: type: string example: SKU-10003 title: type: string example: Coffee grinder price: type: integer format: int64 example: 5400 Category: type: object required: - code - title properties: code: type: string example: ELECTRONICS title: type: string example: Electronics Cart: type: object required: - id - subtotal properties: id: type: string example: cart-1 skus: type: array items: type: string example: - SKU-10001 subtotal: type: integer format: int64 example: 12990 CartItemRequest: type: object required: - sku - quantity properties: sku: type: string example: SKU-10002 quantity: type: integer format: int32 example: 1 Payment: type: object required: - id - orderId - status properties: id: type: integer format: int64 example: 900 orderId: type: integer format: int64 example: 500 status: type: string example: CAPTURED PaymentRequest: type: object required: - orderId - amount properties: orderId: type: integer format: int64 example: 500 amount: type: integer format: int64 example: 12990 ShippingMethod: type: object required: - code - title properties: code: type: string example: COURIER title: type: string example: Courier delivery price: type: integer format: int64 example: 490 Health: type: object required: - status properties: status: type: string example: UP version: type: string example: 1.0.0