Open sunakan opened 1 year ago
OpenAPI Generator + Kotlin SpringBootではまだっぽい
↓がうまく生成されない
securitySchemes:
cookieAuth:
type: apiKey
in: cookie
name: token
https://gist.github.com/puneetugru/ec65183b4ad2da3ee8a7b43def2eea4a
貢献するための勉強が必要そう
https://openapi-generator.tech/docs/generators/kotlin-spring/
Cookie はサポートしているとある
これではうまく行かない
openapi: '3.0.2'
info:
title: 空き家で Go の URL 一覧
version: '1.0'
servers:
- url: https://akiyadego.com
paths:
/top:
get:
description: '全投稿一覧'
operationId: AllPost
parameters:
- in: cookie
name: hogehoge
schema:
type: string
security:
- cookieAuth: []
responses:
'200':
....
components:
securitySchemes:
cookieAuth:
type: apiKey
in: cookie
name: hogehoge
public String test(
@CookieValue(name = "hoge", required = false) String hoge
) {
return hoge;
}
こういうのが生成されて欲しい
触り
Spring BootでHTTPセッションをあつかう3つのパターン
によると、
@SessionAttribute
)の3種があるらしい