Swagger file generation on Spring Boot lambda

オープン
#338 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
aws, java, spring-boot
領域
api, backend, cloud

調査の方向性

まず、issue に記載されている Swagger2Config とアノテーション付きコントローラーマッピングを確認し、次に Spring Boot アプリケーションが Lambda としてどのようにデプロイされるかを調べます。デプロイされた Lambda が swagger-ui.html を公開できるかどうかを判断し、検証可能なアクセスパスを定義します。デプロイ後に Swagger UI にアクセスできるか、またはサポートされる制限が文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

  • Implementations: Spring Boot

Scenario

I have annotated my spring boot 2 lambda with a Swagger2Config so that it auto-generates a Swagger-file for the annotated methods in the controller. Is there a way to access the swagger-ui.html after deploying the lambda? The annotated request mapping are reacheable just fine.

Steps to reproduce

Add these maven dependencies to your spring boot 2 mvn lambda:

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger2</artifactId>
            <version>2.6.1</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>io.springfox</groupId>
            <artifactId>springfox-swagger-ui</artifactId>
            <version>2.6.1</version>
            <scope>compile</scope>
        </dependency>

Add a Swagger2Config file and annotate the controller methods with Swagger annotations.

    @RequestMapping(path = "/categories", method = RequestMethod.POST)
    @ApiOperation(value="Add a new category",response=Category.class)
    @ApiResponses(value={
            @ApiResponse(code=200,message="Category created successfully",response=Category.class, responseContainer="List"),
            @ApiResponse(code=500,message="Internal server error")
    })
主要言語
Java
スター
1.6k
フォーク
575
平均マージ
1日 15時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aws/serverless-java-container のほかの issue

aws/serverless-java-container の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。