{ "openapi": "3.0.1", "info": { "title": "API Name", "version": "1.0" }, "paths": { "/basket": { "summary": "Get basket", "description": "Get basket", "servers": [ { "url": "https://api.example.com" } ], "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "string" } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BasketResponse" } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/ApiError" } ] } } } } } } } }, "/customers/{customerId}": { "get": { "parameters": [ { "name": "x-auth-token", "in": "header", "description": "Authentication Token", "required": true, "example": "123e4567-e89b-12d3-a456-426614174000" } ], "responses": { "200": { "description": "Data found, returned attributes", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomerAttributes" } } } } } } }, "/Locations": { "get": { "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationModel" } } }, "application/custom-thingy.v3+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LocationModel" } } } } } } } }, "/Cards": { "get": { "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CardModel" } } }, "application/custom.v3+json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CardModel" } } } } } } } } }, "components": { "schemas": { "ApiBaseProduct": { "type": "object", "properties": { "co2EmissionInGramsPerPassenger": { "type": "integer", "format": "int32", "nullable": true } }, "additionalProperties": false }, "BasketResponse": { "type": "object", "properties": { "products": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/ApiProduct" }, { "$ref": "#/components/schemas/ApiReservedProduct" } ] }, "nullable": true } }, "additionalProperties": false }, "ApiProduct": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiBaseProduct" } ], "properties": { "eligibleForVouchers": { "type": "boolean" } }, "additionalProperties": false }, "ApiReservedProduct": { "type": "object", "allOf": [ { "$ref": "#/components/schemas/ApiBaseProduct" } ], "properties": { "reservationExpiresAt": { "type": "string", "nullable": true } }, "additionalProperties": false }, "ApiError": { "required": ["code", "description"], "type": "object", "properties": { "code": { "type": "string" } }, "additionalProperties": false }, "CustomerAttributes": { "required": ["attributes"], "type": "object", "properties": { "attributes": { "type": "array", "properties": {}, "items": { "$ref": "#/components/schemas/Attribute" } } } }, "Attribute": { "required": ["name"], "type": "object", "properties": { "name": { "type": "string" }, "more": { "type": ["string", "number", "boolean", "integer", "array"] } } }, "LocationModel": { "type": "object", "properties": { "email": { "type": "string", "pattern": "^(?(\")(\".+?(?