Skip to content

feat(core): support COOKIE parameter location#80

Open
halotukozak wants to merge 1 commit into
masterfrom
feat/34-cookie-params
Open

feat(core): support COOKIE parameter location#80
halotukozak wants to merge 1 commit into
masterfrom
feat/34-cookie-params

Conversation

@halotukozak

Copy link
Copy Markdown
Member

What

Adds support for in: cookie parameters (OpenAPI's 4th parameter location), previously silently dropped.

  • ParameterLocation enum gains COOKIE; the // todo: add cookie is gone.
  • Parser auto-maps in: cookie through the existing toEnumOrNull path — no parser change needed beyond the enum.
  • ClientGenerator emits cookie params as function arguments.
  • BodyGenerator sets them via Ktor's cookie(name, value) builder, null-guarded when optional.

Tests

  • Parser: in: cookieParameterLocation.COOKIE.
  • Generator: cookie param becomes a function parameter; required → cookie("...") call; optional → null-guarded.

Closes #34

🤖 Generated with Claude Code

Add COOKIE to ParameterLocation enum. Parser picks it up via the
existing toEnumOrNull mapping. ClientGenerator emits cookie params as
function arguments; BodyGenerator sets them via Ktor's cookie() builder,
null-guarded when optional.

Closes #34

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

Coverage Report

Overall Project 96.79% 🍏
Files changed 100% 🍏

File Coverage
Names.kt 100% 🍏
ApiSpec.kt 100% 🍏
ClientGenerator.kt 99.81% 🍏
BodyGenerator.kt 94.17% 🍏

@halotukozak halotukozak self-assigned this Jun 9, 2026
@halotukozak halotukozak added this to the 1.0.0 milestone Jun 9, 2026
@halotukozak halotukozak added the enhancement New feature or request label Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support COOKIE parameter location in OpenAPI spec parsing and code generation

1 participant