Skip to content

Fix for #738#841

Open
harismh wants to merge 4 commits into
replikativ:mainfrom
harismh:harismh/738-fix-swagger-server-error
Open

Fix for #738#841
harismh wants to merge 4 commits into
replikativ:mainfrom
harismh:harismh/738-fix-swagger-server-error

Conversation

@harismh

@harismh harismh commented Jun 20, 2026

Copy link
Copy Markdown

SUMMARY

Fixes #738. Root cause was not swagger code itself, but local GET requests to swagger not having Content-Type set. encode-plain-value then calls a nil function, causing the crash. Fix was to make the encoder a noop if nil. Added basic tests to better catch swagger issues in the future.

Note: Had to run codegen-java before running bb http-server-uber on a first clone. I added jcompile as build dependency to http-server-jcompile to workaround that.

Checks

Bugfix
  • Related issues linked using fixes #number
Feature
  • Related issues linked using fixes #number

ADDITIONAL INFORMATION

New tests pass. Original reproduction is fixed too.

  1. bb http-server-uber
  2. java -jar target-http-server/datahike-http-server-XXX.jar resources/example_server.edn
  3. browse http://localhost:4444/index.html

harismh added 3 commits June 20, 2026 17:42
GET requests like for Swagger do not
have content-type set, causing #(encoder %)
to eventually call a nil function. Encoder
is now a noop if formatter is nil.
@harismh harismh changed the title Harismh/738 fix swagger server error Fix for #738 Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: datahike.http.server fails to load swagger.json

1 participant