Skip to content

Commit bcb3be0

Browse files
authored
Merge pull request #429 from keillera/ALIS-5769
ALIS-5769: Add UsersArticlesPopular to swagger and permission.
2 parents 3d024be + b392afe commit bcb3be0

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

permission-template.yaml

+9
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,12 @@ Resources:
296296
Fn::Sub: "${AlisAppId}-MeWalletNonceShow"
297297
Principal: "apigateway.amazonaws.com"
298298
SourceArn: !Sub ${RestApiArn}/*/GET/me/wallet/nonce
299+
UsersArticlesPopularApiGatewayInvoke:
300+
Type: "AWS::Lambda::Permission"
301+
Properties:
302+
Action: "lambda:InvokeFunction"
303+
FunctionName:
304+
Fn::ImportValue:
305+
Fn::Sub: "${AlisAppId}-UsersArticlesPopular"
306+
Principal: "apigateway.amazonaws.com"
307+
SourceArn: !Sub ${RestApiArn}/*/GET/users/*/articles/popular

swagger/swagger.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -2115,6 +2115,53 @@ paths:
21152115
passthroughBehavior: when_no_templates
21162116
httpMethod: POST
21172117
type: aws_proxy
2118+
/users/{user_id}/articles/popular:
2119+
get:
2120+
description: '指定されたユーザーの人気記事一覧情報を取得'
2121+
parameters:
2122+
- name: 'user_id'
2123+
in: 'path'
2124+
description: '対象ユーザを指定するために使用'
2125+
required: true
2126+
type: 'string'
2127+
- name: 'limit'
2128+
in: 'query'
2129+
description: '取得件数'
2130+
required: false
2131+
type: 'integer'
2132+
minimum: 1
2133+
- name: 'article_id'
2134+
in: 'query'
2135+
description: 'ページング処理における、現在のページの最後の記事のID'
2136+
required: false
2137+
type: 'string'
2138+
- name: 'popular_sort_key'
2139+
in: 'query'
2140+
description: 'ページング処理における、現在のページの最後の記事のソートキー'
2141+
required: false
2142+
type: 'integer'
2143+
minimum: 1
2144+
responses:
2145+
'200':
2146+
description: 'ユーザ人気記事一覧'
2147+
schema:
2148+
type: array
2149+
items:
2150+
$ref: '#/definitions/ArticleInfo'
2151+
x-amazon-apigateway-integration:
2152+
responses:
2153+
default:
2154+
statusCode: '200'
2155+
uri:
2156+
Fn::Join:
2157+
- ''
2158+
- - Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/"
2159+
- Fn::ImportValue:
2160+
Fn::Sub: "${AlisAppId}-UsersArticlesPopular"
2161+
- "/invocations"
2162+
passthroughBehavior: when_no_templates
2163+
httpMethod: POST
2164+
type: aws_proxy
21182165
/me/articles/{article_id}/drafts:
21192166
get:
21202167
description: '指定されたIDの下書き記事取得を取得'

0 commit comments

Comments
 (0)