forked from aws-samples/aws-serverless-ecommerce-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.yaml
75 lines (71 loc) · 1.93 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
openapi: "3.0.2"
info:
title:
Fn::Sub: "${AWS::StackName}-api"
version: 1.0.0
description: Orders service API definition
license:
name: MIT-0
url: https://github.com/aws/mit-0
paths:
/backend/{orderId}:
get:
description: |
Retrieve a single order.
This is a backend operation that requires IAM credentials.
operationId: backendGetOrder
parameters:
- name: orderId
in: path
description: Order ID in UUID format
required: true
schema:
type: string
format: uuid
responses:
200:
description: Order item
content:
application/json:
schema:
type: object
properties:
order:
$ref: "../../shared/resources/schemas.yaml#/Order"
default:
description: Something went wrong
content:
application/json:
schema:
$ref: "../../shared/resources/schemas.yaml#/Message"
security:
- AWS_IAM: []
x-amazon-apigateway-integration:
httpMethod: "POST"
type: aws_proxy
uri:
Fn::Sub: "arn:${AWS::Partition}:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/${GetOrderFunction.Arn}/invocations"
components:
schemas:
OrderRequest:
type: object
description: Information necessary for creating an order.
properties:
products:
type: array
items:
$ref: "../../shared/resources/schemas.yaml#/Product"
address:
$ref: "../../shared/resources/schemas.yaml#/Address"
deliveryPrice:
type: integer
minimum: 0
total:
type: integer
minimum: 0
securitySchemes:
AWS_IAM:
type: apiKey
name: Authorization
in: header
x-amazon-apigateway-authtype: awsSigv4