https://www.jhipster.tech/doing-api-first-development/
src/main/resources/swagger/api.yml
デフォルトでは、セキュリティに関する記述はあるが何もAPIが記載されていない。
なので、以下のコードをapi.ymlに追加して確認するとする
/health:
get:
operationId: openapitutorial.controller.health.call
summary: サーバーの状態を返します
description: サーバーの状態を返します。
responses:
'200':
description: サーバーは正常に動作しています
content:
application/json:
schema:
$ref: '#/components/schemas/get_health_response'
components:
schemas:
get_health_response:
description: サーバーの状態のレスポンス
type: object
properties:
status:
type: string
enum:
- ok
required:
- status
個人的には、getメソッドとpostメソッドなど、swaggerのアノテーションを付ける箇所は
自動的に生成すればいいのにと思う。