Skip to content

Commit

Permalink
Add UsersArticlesPopular to swagger.
Browse files Browse the repository at this point in the history
  • Loading branch information
keillera committed Oct 5, 2020
1 parent d714383 commit b392afe
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
9 changes: 9 additions & 0 deletions permission-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -296,3 +296,12 @@ Resources:
Fn::Sub: "${AlisAppId}-MeWalletNonceShow"
Principal: "apigateway.amazonaws.com"
SourceArn: !Sub ${RestApiArn}/*/GET/me/wallet/nonce
UsersArticlesPopularApiGatewayInvoke:
Type: "AWS::Lambda::Permission"
Properties:
Action: "lambda:InvokeFunction"
FunctionName:
Fn::ImportValue:
Fn::Sub: "${AlisAppId}-UsersArticlesPopular"
Principal: "apigateway.amazonaws.com"
SourceArn: !Sub ${RestApiArn}/*/GET/users/*/articles/popular
47 changes: 47 additions & 0 deletions swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,53 @@ paths:
passthroughBehavior: when_no_templates
httpMethod: POST
type: aws_proxy
/users/{user_id}/articles/popular:
get:
description: '指定されたユーザーの人気記事一覧情報を取得'
parameters:
- name: 'user_id'
in: 'path'
description: '対象ユーザを指定するために使用'
required: true
type: 'string'
- name: 'limit'
in: 'query'
description: '取得件数'
required: false
type: 'integer'
minimum: 1
- name: 'article_id'
in: 'query'
description: 'ページング処理における、現在のページの最後の記事のID'
required: false
type: 'string'
- name: 'popular_sort_key'
in: 'query'
description: 'ページング処理における、現在のページの最後の記事のソートキー'
required: false
type: 'integer'
minimum: 1
responses:
'200':
description: 'ユーザ人気記事一覧'
schema:
type: array
items:
$ref: '#/definitions/ArticleInfo'
x-amazon-apigateway-integration:
responses:
default:
statusCode: '200'
uri:
Fn::Join:
- ''
- - Fn::Sub: "arn:aws:apigateway:${AWS::Region}:lambda:path/2015-03-31/functions/"
- Fn::ImportValue:
Fn::Sub: "${AlisAppId}-UsersArticlesPopular"
- "/invocations"
passthroughBehavior: when_no_templates
httpMethod: POST
type: aws_proxy
/me/articles/{article_id}/drafts:
get:
description: '指定されたIDの下書き記事取得を取得'
Expand Down

0 comments on commit b392afe

Please sign in to comment.